From df70919556f509232274a380761b306d48d1ee96 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 22 Nov 2010 15:07:06 +0000 Subject: [PATCH] add git-svn-id: https://svn.dealii.org/trunk@22835 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/boost/algorithm/minmax.hpp | 47 + .../boost/algorithm/minmax_element.hpp | 551 + .../include/boost/algorithm/string.hpp | 31 + .../boost/algorithm/string/case_conv.hpp | 176 + .../boost/algorithm/string/classification.hpp | 312 + .../boost/algorithm/string/compare.hpp | 199 + .../boost/algorithm/string/concept.hpp | 83 + .../include/boost/algorithm/string/config.hpp | 28 + .../boost/algorithm/string/constants.hpp | 36 + .../algorithm/string/detail/case_conv.hpp | 121 + .../string/detail/classification.hpp | 353 + .../algorithm/string/detail/find_format.hpp | 204 + .../string/detail/find_format_all.hpp | 273 + .../string/detail/find_format_store.hpp | 89 + .../algorithm/string/detail/find_iterator.hpp | 87 + .../boost/algorithm/string/detail/finder.hpp | 646 + .../algorithm/string/detail/finder_regex.hpp | 122 + .../algorithm/string/detail/formatter.hpp | 94 + .../string/detail/formatter_regex.hpp | 61 + .../algorithm/string/detail/predicate.hpp | 77 + .../string/detail/replace_storage.hpp | 159 + .../algorithm/string/detail/sequence.hpp | 200 + .../boost/algorithm/string/detail/trim.hpp | 95 + .../boost/algorithm/string/detail/util.hpp | 106 + .../include/boost/algorithm/string/erase.hpp | 844 + .../include/boost/algorithm/string/find.hpp | 334 + .../boost/algorithm/string/find_format.hpp | 287 + .../boost/algorithm/string/find_iterator.hpp | 375 + .../include/boost/algorithm/string/finder.hpp | 270 + .../boost/algorithm/string/formatter.hpp | 103 + .../boost/algorithm/string/iter_find.hpp | 193 + .../include/boost/algorithm/string/join.hpp | 145 + .../boost/algorithm/string/predicate.hpp | 475 + .../algorithm/string/predicate_facade.hpp | 42 + .../include/boost/algorithm/string/regex.hpp | 646 + .../algorithm/string/regex_find_format.hpp | 90 + .../boost/algorithm/string/replace.hpp | 928 + .../algorithm/string/sequence_traits.hpp | 193 + .../include/boost/algorithm/string/split.hpp | 163 + .../algorithm/string/std/list_traits.hpp | 85 + .../algorithm/string/std/rope_traits.hpp | 101 + .../algorithm/string/std/slist_traits.hpp | 85 + .../algorithm/string/std/string_traits.hpp | 52 + .../string/std_containers_traits.hpp | 26 + .../include/boost/algorithm/string/trim.hpp | 398 + .../boost/algorithm/string/yes_no_type.hpp | 33 + .../include/boost/algorithm/string_regex.hpp | 23 + .../include/boost/aligned_storage.hpp | 181 + .../boost-1.45.0/include/boost/any.hpp | 253 + .../include/boost/archive/add_facet.hpp | 55 + .../boost/archive/archive_exception.hpp | 97 + .../include/boost/archive/basic_archive.hpp | 300 + .../boost/archive/basic_binary_iarchive.hpp | 196 + .../boost/archive/basic_binary_iprimitive.hpp | 190 + .../boost/archive/basic_binary_oarchive.hpp | 180 + .../boost/archive/basic_binary_oprimitive.hpp | 184 + .../archive/basic_streambuf_locale_saver.hpp | 73 + .../boost/archive/basic_text_iarchive.hpp | 91 + .../boost/archive/basic_text_iprimitive.hpp | 144 + .../boost/archive/basic_text_oarchive.hpp | 116 + .../boost/archive/basic_text_oprimitive.hpp | 173 + .../boost/archive/basic_xml_archive.hpp | 67 + .../boost/archive/basic_xml_iarchive.hpp | 127 + .../boost/archive/basic_xml_oarchive.hpp | 145 + .../include/boost/archive/binary_iarchive.hpp | 103 + .../boost/archive/binary_iarchive_impl.hpp | 96 + .../include/boost/archive/binary_oarchive.hpp | 66 + .../boost/archive/binary_oarchive_impl.hpp | 97 + .../boost/archive/binary_wiarchive.hpp | 93 + .../boost/archive/binary_woarchive.hpp | 61 + .../include/boost/archive/codecvt_null.hpp | 100 + .../boost/archive/detail/abi_prefix.hpp | 20 + .../boost/archive/detail/abi_suffix.hpp | 19 + .../archive/detail/archive_serializer_map.hpp | 55 + .../archive/detail/auto_link_archive.hpp | 48 + .../archive/detail/auto_link_warchive.hpp | 47 + .../archive/detail/basic_archive_impl.hpp | 48 + .../boost/archive/detail/basic_config.hpp | 45 + .../boost/archive/detail/basic_iarchive.hpp | 110 + .../archive/detail/basic_iserializer.hpp | 95 + .../boost/archive/detail/basic_oarchive.hpp | 106 + .../archive/detail/basic_oserializer.hpp | 93 + .../detail/basic_pointer_iserializer.hpp | 73 + .../detail/basic_pointer_oserializer.hpp | 72 + .../boost/archive/detail/basic_serializer.hpp | 79 + .../archive/detail/basic_serializer_map.hpp | 69 + .../include/boost/archive/detail/check.hpp | 169 + .../boost/archive/detail/common_iarchive.hpp | 88 + .../boost/archive/detail/common_oarchive.hpp | 87 + .../include/boost/archive/detail/decl.hpp | 79 + .../archive/detail/interface_iarchive.hpp | 77 + .../archive/detail/interface_oarchive.hpp | 84 + .../boost/archive/detail/iserializer.hpp | 632 + .../boost/archive/detail/oserializer.hpp | 531 + .../detail/polymorphic_iarchive_route.hpp | 215 + .../detail/polymorphic_oarchive_route.hpp | 205 + .../boost/archive/detail/register_archive.hpp | 91 + .../archive/detail/utf8_codecvt_facet.hpp | 21 + .../include/boost/archive/dinkumware.hpp | 224 + .../archive/impl/archive_serializer_map.ipp | 71 + .../archive/impl/basic_binary_iarchive.ipp | 129 + .../archive/impl/basic_binary_iprimitive.ipp | 209 + .../archive/impl/basic_binary_oarchive.ipp | 46 + .../archive/impl/basic_binary_oprimitive.ipp | 160 + .../archive/impl/basic_text_iarchive.ipp | 79 + .../archive/impl/basic_text_iprimitive.ipp | 154 + .../archive/impl/basic_text_oarchive.ipp | 62 + .../archive/impl/basic_text_oprimitive.ipp | 114 + .../boost/archive/impl/basic_xml_grammar.hpp | 196 + .../boost/archive/impl/basic_xml_iarchive.ipp | 114 + .../boost/archive/impl/basic_xml_oarchive.ipp | 275 + .../boost/archive/impl/text_iarchive_impl.ipp | 128 + .../boost/archive/impl/text_oarchive_impl.ipp | 124 + .../archive/impl/text_wiarchive_impl.ipp | 118 + .../archive/impl/text_woarchive_impl.ipp | 85 + .../boost/archive/impl/xml_iarchive_impl.ipp | 204 + .../boost/archive/impl/xml_oarchive_impl.ipp | 117 + .../boost/archive/impl/xml_wiarchive_impl.ipp | 206 + .../boost/archive/impl/xml_woarchive_impl.ipp | 160 + .../archive/iterators/base64_exception.hpp | 68 + .../archive/iterators/base64_from_binary.hpp | 112 + .../archive/iterators/binary_from_base64.hpp | 120 + .../boost/archive/iterators/dataflow.hpp | 105 + .../archive/iterators/dataflow_exception.hpp | 80 + .../boost/archive/iterators/escape.hpp | 115 + .../boost/archive/iterators/head_iterator.hpp | 80 + .../archive/iterators/insert_linebreaks.hpp | 101 + .../archive/iterators/istream_iterator.hpp | 95 + .../boost/archive/iterators/mb_from_wchar.hpp | 136 + .../archive/iterators/ostream_iterator.hpp | 83 + .../archive/iterators/remove_whitespace.hpp | 169 + .../archive/iterators/transform_width.hpp | 168 + .../boost/archive/iterators/unescape.hpp | 91 + .../boost/archive/iterators/wchar_from_mb.hpp | 129 + .../boost/archive/iterators/xml_escape.hpp | 125 + .../boost/archive/iterators/xml_unescape.hpp | 128 + .../iterators/xml_unescape_exception.hpp | 49 + .../archive/polymorphic_binary_iarchive.hpp | 54 + .../archive/polymorphic_binary_oarchive.hpp | 43 + .../boost/archive/polymorphic_iarchive.hpp | 181 + .../boost/archive/polymorphic_oarchive.hpp | 159 + .../archive/polymorphic_text_iarchive.hpp | 54 + .../archive/polymorphic_text_oarchive.hpp | 39 + .../archive/polymorphic_text_wiarchive.hpp | 59 + .../archive/polymorphic_text_woarchive.hpp | 44 + .../archive/polymorphic_xml_iarchive.hpp | 54 + .../archive/polymorphic_xml_oarchive.hpp | 39 + .../archive/polymorphic_xml_wiarchive.hpp | 50 + .../archive/polymorphic_xml_woarchive.hpp | 44 + .../boost/archive/shared_ptr_helper.hpp | 219 + .../include/boost/archive/text_iarchive.hpp | 155 + .../include/boost/archive/text_oarchive.hpp | 118 + .../include/boost/archive/text_wiarchive.hpp | 152 + .../include/boost/archive/text_woarchive.hpp | 145 + .../include/boost/archive/tmpdir.hpp | 50 + .../include/boost/archive/wcslen.hpp | 56 + .../boost/archive/xml_archive_exception.hpp | 56 + .../include/boost/archive/xml_iarchive.hpp | 164 + .../include/boost/archive/xml_oarchive.hpp | 133 + .../include/boost/archive/xml_wiarchive.hpp | 171 + .../include/boost/archive/xml_woarchive.hpp | 140 + .../boost-1.45.0/include/boost/array.hpp | 388 + .../boost-1.45.0/include/boost/asio.hpp | 100 + .../boost-1.45.0/include/boost/assert.hpp | 50 + .../boost-1.45.0/include/boost/assign.hpp | 24 + .../boost-1.45.0/include/boost/bimap.hpp | 19 + .../boost-1.45.0/include/boost/bind.hpp | 24 + .../boost-1.45.0/include/boost/bind/apply.hpp | 74 + .../boost-1.45.0/include/boost/bind/arg.hpp | 62 + .../boost-1.45.0/include/boost/bind/bind.hpp | 1751 ++ .../include/boost/bind/bind_cc.hpp | 117 + .../include/boost/bind/bind_mf2_cc.hpp | 228 + .../include/boost/bind/bind_mf_cc.hpp | 227 + .../include/boost/bind/bind_template.hpp | 345 + .../include/boost/bind/make_adaptable.hpp | 187 + .../include/boost/bind/mem_fn.hpp | 389 + .../include/boost/bind/mem_fn_cc.hpp | 103 + .../include/boost/bind/mem_fn_template.hpp | 1047 + .../include/boost/bind/mem_fn_vw.hpp | 130 + .../include/boost/bind/placeholders.hpp | 69 + .../include/boost/bind/protect.hpp | 304 + .../include/boost/bind/storage.hpp | 475 + .../boost-1.45.0/include/boost/blank.hpp | 106 + .../boost-1.45.0/include/boost/blank_fwd.hpp | 22 + .../include/boost/call_traits.hpp | 24 + .../boost-1.45.0/include/boost/cast.hpp | 107 + .../boost-1.45.0/include/boost/cerrno.hpp | 331 + .../include/boost/checked_delete.hpp | 69 + .../include/boost/circular_buffer.hpp | 74 + .../include/boost/circular_buffer_fwd.hpp | 43 + .../boost/compatibility/cpp_c_headers/cassert | 10 + .../boost/compatibility/cpp_c_headers/cctype | 26 + .../boost/compatibility/cpp_c_headers/cerrno | 10 + .../boost/compatibility/cpp_c_headers/cfloat | 10 + .../boost/compatibility/cpp_c_headers/climits | 10 + .../boost/compatibility/cpp_c_headers/clocale | 16 + .../boost/compatibility/cpp_c_headers/cmath | 35 + .../boost/compatibility/cpp_c_headers/csetjmp | 15 + .../boost/compatibility/cpp_c_headers/csignal | 16 + .../boost/compatibility/cpp_c_headers/cstdarg | 14 + .../boost/compatibility/cpp_c_headers/cstddef | 15 + .../boost/compatibility/cpp_c_headers/cstdio | 57 + .../boost/compatibility/cpp_c_headers/cstdlib | 43 + .../boost/compatibility/cpp_c_headers/cstring | 36 + .../boost/compatibility/cpp_c_headers/ctime | 26 + .../boost/compatibility/cpp_c_headers/cwchar | 156 + .../boost/compatibility/cpp_c_headers/cwctype | 39 + .../include/boost/compressed_pair.hpp | 24 + .../include/boost/concept/assert.hpp | 46 + .../concept/detail/backward_compatibility.hpp | 16 + .../include/boost/concept/detail/borland.hpp | 30 + .../boost/concept/detail/concept_def.hpp | 51 + .../boost/concept/detail/concept_undef.hpp | 5 + .../include/boost/concept/detail/general.hpp | 75 + .../boost/concept/detail/has_constraints.hpp | 50 + .../include/boost/concept/detail/msvc.hpp | 114 + .../include/boost/concept/requires.hpp | 78 + .../include/boost/concept/usage.hpp | 44 + .../include/boost/concept_archetype.hpp | 669 + .../include/boost/concept_check.hpp | 1045 + .../include/boost/concept_check/borland.hpp | 25 + .../include/boost/concept_check/general.hpp | 82 + .../boost/concept_check/has_constraints.hpp | 31 + .../include/boost/concept_check/msvc.hpp | 90 + .../boost-1.45.0/include/boost/config.hpp | 70 + .../boost/config/abi/borland_prefix.hpp | 27 + .../boost/config/abi/borland_suffix.hpp | 12 + .../include/boost/config/abi/msvc_prefix.hpp | 22 + .../include/boost/config/abi/msvc_suffix.hpp | 8 + .../include/boost/config/abi_prefix.hpp | 25 + .../include/boost/config/abi_suffix.hpp | 27 + .../include/boost/config/auto_link.hpp | 420 + .../include/boost/config/compiler/borland.hpp | 277 + .../include/boost/config/compiler/clang.hpp | 63 + .../boost/config/compiler/codegear.hpp | 177 + .../include/boost/config/compiler/comeau.hpp | 59 + .../boost/config/compiler/common_edg.hpp | 97 + .../boost/config/compiler/compaq_cxx.hpp | 19 + .../boost/config/compiler/digitalmars.hpp | 96 + .../include/boost/config/compiler/gcc.hpp | 245 + .../include/boost/config/compiler/gcc_xml.hpp | 56 + .../boost/config/compiler/greenhills.hpp | 28 + .../include/boost/config/compiler/hp_acc.hpp | 137 + .../include/boost/config/compiler/intel.hpp | 196 + .../include/boost/config/compiler/kai.hpp | 33 + .../boost/config/compiler/metrowerks.hpp | 140 + .../include/boost/config/compiler/mpw.hpp | 82 + .../include/boost/config/compiler/nvcc.hpp | 87 + .../include/boost/config/compiler/pgi.hpp | 78 + .../boost/config/compiler/sgi_mipspro.hpp | 29 + .../boost/config/compiler/sunpro_cc.hpp | 145 + .../include/boost/config/compiler/vacpp.hpp | 97 + .../include/boost/config/compiler/visualc.hpp | 276 + .../include/boost/config/no_tr1/cmath.hpp | 28 + .../include/boost/config/no_tr1/complex.hpp | 28 + .../boost/config/no_tr1/functional.hpp | 28 + .../include/boost/config/no_tr1/memory.hpp | 28 + .../include/boost/config/no_tr1/utility.hpp | 28 + .../include/boost/config/platform/aix.hpp | 33 + .../include/boost/config/platform/amigaos.hpp | 15 + .../include/boost/config/platform/beos.hpp | 26 + .../include/boost/config/platform/bsd.hpp | 86 + .../include/boost/config/platform/cygwin.hpp | 55 + .../include/boost/config/platform/hpux.hpp | 87 + .../include/boost/config/platform/irix.hpp | 31 + .../include/boost/config/platform/linux.hpp | 98 + .../include/boost/config/platform/macos.hpp | 86 + .../include/boost/config/platform/qnxnto.hpp | 31 + .../include/boost/config/platform/solaris.hpp | 28 + .../include/boost/config/platform/symbian.hpp | 94 + .../include/boost/config/platform/vms.hpp | 25 + .../include/boost/config/platform/vxworks.hpp | 31 + .../include/boost/config/platform/win32.hpp | 65 + .../include/boost/config/posix_features.hpp | 95 + .../include/boost/config/requires_threads.hpp | 92 + .../boost/config/select_compiler_config.hpp | 129 + .../boost/config/select_platform_config.hpp | 101 + .../boost/config/select_stdlib_config.hpp | 77 + .../boost/config/stdlib/dinkumware.hpp | 149 + .../include/boost/config/stdlib/libcomo.hpp | 73 + .../boost/config/stdlib/libstdcpp3.hpp | 134 + .../include/boost/config/stdlib/modena.hpp | 57 + .../include/boost/config/stdlib/msl.hpp | 85 + .../include/boost/config/stdlib/roguewave.hpp | 181 + .../include/boost/config/stdlib/sgi.hpp | 138 + .../include/boost/config/stdlib/stlport.hpp | 238 + .../include/boost/config/stdlib/vacpp.hpp | 45 + .../include/boost/config/suffix.hpp | 647 + .../include/boost/config/user.hpp | 124 + .../include/boost/config/warning_disable.hpp | 47 + .../boost-1.45.0/include/boost/crc.hpp | 1110 + .../boost-1.45.0/include/boost/cregex.hpp | 39 + .../boost-1.45.0/include/boost/cstdint.hpp | 508 + .../boost-1.45.0/include/boost/cstdlib.hpp | 41 + .../include/boost/current_function.hpp | 67 + .../boost-1.45.0/include/boost/date_time.hpp | 17 + .../boost/date_time/adjust_functors.hpp | 178 + .../boost/date_time/c_local_time_adjustor.hpp | 66 + .../include/boost/date_time/c_time.hpp | 107 + .../boost/date_time/compiler_config.hpp | 171 + .../boost/date_time/constrained_value.hpp | 121 + .../include/boost/date_time/date.hpp | 208 + .../boost/date_time/date_clock_device.hpp | 77 + .../include/boost/date_time/date_defs.hpp | 26 + .../include/boost/date_time/date_duration.hpp | 146 + .../boost/date_time/date_duration_types.hpp | 269 + .../include/boost/date_time/date_facet.hpp | 764 + .../boost/date_time/date_format_simple.hpp | 159 + .../boost/date_time/date_formatting.hpp | 127 + .../date_time/date_formatting_limited.hpp | 121 + .../date_time/date_formatting_locales.hpp | 233 + .../date_time/date_generator_formatter.hpp | 265 + .../boost/date_time/date_generator_parser.hpp | 330 + .../boost/date_time/date_generators.hpp | 509 + .../include/boost/date_time/date_iterator.hpp | 101 + .../boost/date_time/date_names_put.hpp | 320 + .../include/boost/date_time/date_parsing.hpp | 316 + .../include/boost/date_time/dst_rules.hpp | 391 + .../date_time/dst_transition_generators.hpp | 75 + .../boost/date_time/filetime_functions.hpp | 170 + .../boost/date_time/format_date_parser.hpp | 743 + .../boost/date_time/gregorian/conversion.hpp | 68 + .../boost/date_time/gregorian/formatters.hpp | 162 + .../gregorian/formatters_limited.hpp | 81 + .../date_time/gregorian/greg_calendar.hpp | 48 + .../boost/date_time/gregorian/greg_date.hpp | 136 + .../boost/date_time/gregorian/greg_day.hpp | 57 + .../date_time/gregorian/greg_day_of_year.hpp | 38 + .../date_time/gregorian/greg_duration.hpp | 134 + .../gregorian/greg_duration_types.hpp | 43 + .../boost/date_time/gregorian/greg_facet.hpp | 354 + .../boost/date_time/gregorian/greg_month.hpp | 105 + .../date_time/gregorian/greg_serialize.hpp | 490 + .../date_time/gregorian/greg_weekday.hpp | 66 + .../boost/date_time/gregorian/greg_year.hpp | 53 + .../boost/date_time/gregorian/greg_ymd.hpp | 33 + .../boost/date_time/gregorian/gregorian.hpp | 38 + .../date_time/gregorian/gregorian_io.hpp | 784 + .../date_time/gregorian/gregorian_types.hpp | 109 + .../boost/date_time/gregorian/parsers.hpp | 91 + .../boost/date_time/gregorian_calendar.hpp | 70 + .../boost/date_time/gregorian_calendar.ipp | 219 + .../include/boost/date_time/int_adapter.hpp | 509 + .../include/boost/date_time/iso_format.hpp | 303 + .../boost/date_time/local_time/conversion.hpp | 34 + .../date_time/local_time/custom_time_zone.hpp | 169 + .../local_time/date_duration_operators.hpp | 115 + .../local_time/dst_transition_day_rules.hpp | 77 + .../date_time/local_time/local_date_time.hpp | 528 + .../boost/date_time/local_time/local_time.hpp | 24 + .../date_time/local_time/local_time_io.hpp | 186 + .../date_time/local_time/local_time_types.hpp | 52 + .../date_time/local_time/posix_time_zone.hpp | 474 + .../date_time/local_time/tz_database.hpp | 32 + .../boost/date_time/local_time_adjustor.hpp | 218 + .../boost/date_time/local_timezone_defs.hpp | 193 + .../include/boost/date_time/locale_config.hpp | 31 + .../boost/date_time/microsec_time_clock.hpp | 127 + .../boost/date_time/parse_format_base.hpp | 29 + .../include/boost/date_time/period.hpp | 377 + .../boost/date_time/period_formatter.hpp | 196 + .../include/boost/date_time/period_parser.hpp | 198 + .../boost/date_time/posix_time/conversion.hpp | 94 + .../posix_time/date_duration_operators.hpp | 114 + .../boost/date_time/posix_time/posix_time.hpp | 39 + .../posix_time/posix_time_config.hpp | 178 + .../posix_time/posix_time_duration.hpp | 82 + .../date_time/posix_time/posix_time_io.hpp | 239 + .../posix_time/posix_time_legacy_io.hpp | 153 + .../posix_time/posix_time_system.hpp | 68 + .../date_time/posix_time/posix_time_types.hpp | 55 + .../boost/date_time/posix_time/ptime.hpp | 65 + .../date_time/posix_time/time_formatters.hpp | 289 + .../posix_time/time_formatters_limited.hpp | 212 + .../date_time/posix_time/time_parsers.hpp | 44 + .../date_time/posix_time/time_period.hpp | 29 + .../date_time/posix_time/time_serialize.hpp | 201 + .../include/boost/date_time/special_defs.hpp | 25 + .../date_time/special_values_formatter.hpp | 96 + .../boost/date_time/special_values_parser.hpp | 159 + .../boost/date_time/string_convert.hpp | 33 + .../boost/date_time/string_parse_tree.hpp | 278 + .../boost/date_time/strings_from_facet.hpp | 125 + .../include/boost/date_time/time.hpp | 191 + .../include/boost/date_time/time_clock.hpp | 83 + .../include/boost/date_time/time_defs.hpp | 43 + .../include/boost/date_time/time_duration.hpp | 282 + .../include/boost/date_time/time_facet.hpp | 1367 ++ .../date_time/time_formatting_streams.hpp | 122 + .../include/boost/date_time/time_iterator.hpp | 52 + .../include/boost/date_time/time_parsing.hpp | 321 + .../date_time/time_resolution_traits.hpp | 144 + .../boost/date_time/time_system_counted.hpp | 254 + .../boost/date_time/time_system_split.hpp | 207 + .../boost/date_time/time_zone_base.hpp | 99 + .../boost/date_time/time_zone_names.hpp | 98 + .../include/boost/date_time/tz_db_base.hpp | 378 + .../include/boost/date_time/wrapping_int.hpp | 169 + .../boost/date_time/year_month_day.hpp | 45 + .../include/boost/detail/algorithm.hpp | 82 + .../boost/detail/allocator_utilities.hpp | 212 + .../include/boost/detail/atomic_count.hpp | 21 + .../include/boost/detail/binary_search.hpp | 216 + .../include/boost/detail/call_traits.hpp | 164 + .../include/boost/detail/catch_exceptions.hpp | 146 + .../include/boost/detail/compressed_pair.hpp | 443 + .../include/boost/detail/container_fwd.hpp | 101 + .../include/boost/detail/dynamic_bitset.hpp | 229 + .../include/boost/detail/endian.hpp | 76 + .../boost/detail/has_default_constructor.hpp | 29 + .../include/boost/detail/identifier.hpp | 89 + .../include/boost/detail/indirect_traits.hpp | 487 + .../include/boost/detail/interlocked.hpp | 142 + .../boost/detail/is_function_ref_tester.hpp | 135 + .../include/boost/detail/is_incrementable.hpp | 134 + .../include/boost/detail/is_xxx.hpp | 61 + .../include/boost/detail/iterator.hpp | 494 + .../include/boost/detail/lcast_precision.hpp | 184 + .../boost/detail/lightweight_mutex.hpp | 22 + .../include/boost/detail/lightweight_test.hpp | 91 + .../boost/detail/lightweight_thread.hpp | 135 + .../include/boost/detail/limits.hpp | 449 + .../boost/detail/named_template_params.hpp | 177 + .../boost/detail/no_exceptions_support.hpp | 87 + .../include/boost/detail/none_t.hpp | 28 + .../include/boost/detail/numeric_traits.hpp | 191 + .../include/boost/detail/ob_call_traits.hpp | 168 + .../boost/detail/ob_compressed_pair.hpp | 510 + .../include/boost/detail/quick_allocator.hpp | 23 + .../boost/detail/reference_content.hpp | 141 + .../boost/detail/scoped_enum_emulation.hpp | 56 + .../include/boost/detail/select_type.hpp | 36 + .../include/boost/detail/sp_typeinfo.hpp | 135 + .../boost/detail/templated_streams.hpp | 74 + .../boost/detail/utf8_codecvt_facet.hpp | 190 + .../include/boost/detail/workaround.hpp | 267 + .../include/boost/dynamic_bitset.hpp | 17 + .../include/boost/dynamic_bitset_fwd.hpp | 25 + .../include/boost/enable_shared_from_this.hpp | 18 + .../boost-1.45.0/include/boost/exception.hpp | 11 + .../include/boost/exception/all.hpp | 36 + .../exception/current_exception_cast.hpp | 43 + .../exception/detail/attribute_noreturn.hpp | 17 + .../exception/detail/error_info_impl.hpp | 75 + .../boost/exception/detail/exception_ptr.hpp | 431 + .../exception/detail/is_output_streamable.hpp | 60 + .../exception/detail/object_hex_dump.hpp | 50 + .../boost/exception/detail/type_info.hpp | 83 + .../exception/diagnostic_information.hpp | 184 + .../exception/enable_current_exception.hpp | 6 + .../boost/exception/enable_error_info.hpp | 6 + .../boost/exception/errinfo_api_function.hpp | 22 + .../boost/exception/errinfo_at_line.hpp | 18 + .../include/boost/exception/errinfo_errno.hpp | 44 + .../boost/exception/errinfo_file_handle.hpp | 20 + .../boost/exception/errinfo_file_name.hpp | 26 + .../exception/errinfo_file_open_mode.hpp | 26 + .../exception/errinfo_nested_exception.hpp | 19 + .../exception/errinfo_type_info_name.hpp | 23 + .../include/boost/exception/error_info.hpp | 6 + .../include/boost/exception/exception.hpp | 436 + .../boost/exception/get_error_info.hpp | 130 + .../include/boost/exception/info.hpp | 200 + .../include/boost/exception/info_tuple.hpp | 76 + .../include/boost/exception/to_string.hpp | 83 + .../boost/exception/to_string_stub.hpp | 109 + .../include/boost/exception_ptr.hpp | 11 + .../boost-1.45.0/include/boost/filesystem.hpp | 38 + .../boost-1.45.0/include/boost/flyweight.hpp | 22 + .../boost-1.45.0/include/boost/foreach.hpp | 1104 + .../boost-1.45.0/include/boost/format.hpp | 59 + .../include/boost/format/alt_sstream.hpp | 176 + .../include/boost/format/alt_sstream_impl.hpp | 313 + .../format/detail/compat_workarounds.hpp | 86 + .../boost/format/detail/config_macros.hpp | 97 + .../format/detail/msvc_disambiguater.hpp | 56 + .../boost/format/detail/unset_macros.hpp | 34 + .../format/detail/workarounds_gcc-2_95.hpp | 162 + .../format/detail/workarounds_stlport.hpp | 42 + .../include/boost/format/exceptions.hpp | 103 + .../include/boost/format/feed_args.hpp | 277 + .../include/boost/format/format_class.hpp | 168 + .../include/boost/format/format_fwd.hpp | 49 + .../boost/format/format_implementation.hpp | 329 + .../include/boost/format/free_funcs.hpp | 70 + .../include/boost/format/group.hpp | 684 + .../include/boost/format/internals.hpp | 201 + .../include/boost/format/internals_fwd.hpp | 60 + .../include/boost/format/parsing.hpp | 504 + .../boost-1.45.0/include/boost/function.hpp | 66 + .../function/detail/function_iterate.hpp | 16 + .../function/detail/gen_maybe_include.pl | 37 + .../boost/function/detail/maybe_include.hpp | 267 + .../boost/function/detail/prologue.hpp | 26 + .../include/boost/function/function0.hpp | 12 + .../include/boost/function/function1.hpp | 12 + .../include/boost/function/function10.hpp | 12 + .../include/boost/function/function2.hpp | 12 + .../include/boost/function/function3.hpp | 12 + .../include/boost/function/function4.hpp | 12 + .../include/boost/function/function5.hpp | 12 + .../include/boost/function/function6.hpp | 12 + .../include/boost/function/function7.hpp | 12 + .../include/boost/function/function8.hpp | 12 + .../include/boost/function/function9.hpp | 12 + .../include/boost/function/function_base.hpp | 904 + .../include/boost/function/function_fwd.hpp | 70 + .../boost/function/function_template.hpp | 1158 + .../boost/function/function_typeof.hpp | 45 + .../include/boost/function/gen_function_N.pl | 26 + .../include/boost/function_equal.hpp | 28 + .../boost/function_output_iterator.hpp | 56 + .../boost/function_types/components.hpp | 431 + .../boost/function_types/config/cc_names.hpp | 31 + .../boost/function_types/config/compiler.hpp | 116 + .../boost/function_types/config/config.hpp | 59 + .../function_types/detail/class_transform.hpp | 62 + .../function_types/detail/classifier.hpp | 82 + .../detail/classifier_impl/arity10_0.hpp | 55 + .../detail/classifier_impl/arity10_1.hpp | 52 + .../detail/classifier_impl/arity20_0.hpp | 53 + .../detail/classifier_impl/arity20_1.hpp | 53 + .../detail/classifier_impl/arity30_0.hpp | 53 + .../detail/classifier_impl/arity30_1.hpp | 53 + .../detail/classifier_impl/arity40_0.hpp | 53 + .../detail/classifier_impl/arity40_1.hpp | 53 + .../detail/classifier_impl/arity50_0.hpp | 53 + .../detail/classifier_impl/arity50_1.hpp | 52 + .../detail/classifier_impl/master.hpp | 33 + .../detail/components_as_mpl_sequence.hpp | 138 + .../detail/components_impl/arity10_0.hpp | 132 + .../detail/components_impl/arity10_1.hpp | 122 + .../detail/components_impl/arity20_0.hpp | 123 + .../detail/components_impl/arity20_1.hpp | 123 + .../detail/components_impl/arity30_0.hpp | 123 + .../detail/components_impl/arity30_1.hpp | 123 + .../detail/components_impl/arity40_0.hpp | 123 + .../detail/components_impl/arity40_1.hpp | 123 + .../detail/components_impl/arity50_0.hpp | 123 + .../detail/components_impl/arity50_1.hpp | 123 + .../detail/components_impl/master.hpp | 61 + .../boost/function_types/detail/cv_traits.hpp | 134 + .../detail/encoding/aliases_def.hpp | 16 + .../detail/encoding/aliases_undef.hpp | 16 + .../function_types/detail/encoding/def.hpp | 51 + .../function_types/detail/encoding/undef.hpp | 38 + .../function_types/detail/pp_arity_loop.hpp | 149 + .../detail/pp_cc_loop/master.hpp | 136 + .../detail/pp_cc_loop/preprocessed.hpp | 120 + .../boost/function_types/detail/pp_loop.hpp | 80 + .../detail/pp_retag_default_cc/master.hpp | 103 + .../pp_retag_default_cc/preprocessed.hpp | 59 + .../function_types/detail/pp_tags/cc_tag.hpp | 17 + .../function_types/detail/pp_tags/master.hpp | 126 + .../detail/pp_tags/preprocessed.hpp | 77 + .../detail/pp_variate_loop/master.hpp | 152 + .../detail/pp_variate_loop/preprocessed.hpp | 283 + .../detail/retag_default_cc.hpp | 23 + .../function_types/detail/synthesize.hpp | 79 + .../detail/synthesize_impl/arity10_0.hpp | 334 + .../detail/synthesize_impl/arity10_1.hpp | 326 + .../detail/synthesize_impl/arity20_0.hpp | 517 + .../detail/synthesize_impl/arity20_1.hpp | 527 + .../detail/synthesize_impl/arity30_0.hpp | 717 + .../detail/synthesize_impl/arity30_1.hpp | 727 + .../detail/synthesize_impl/arity40_0.hpp | 917 + .../detail/synthesize_impl/arity40_1.hpp | 927 + .../detail/synthesize_impl/arity50_0.hpp | 1117 + .../detail/synthesize_impl/arity50_1.hpp | 1127 + .../detail/synthesize_impl/master.hpp | 87 + .../function_types/detail/to_sequence.hpp | 47 + .../boost/function_types/function_arity.hpp | 38 + .../boost/function_types/function_pointer.hpp | 32 + .../function_types/function_reference.hpp | 32 + .../boost/function_types/function_type.hpp | 29 + .../function_types/is_callable_builtin.hpp | 35 + .../boost/function_types/is_function.hpp | 34 + .../function_types/is_function_pointer.hpp | 34 + .../function_types/is_function_reference.hpp | 34 + .../is_member_function_pointer.hpp | 33 + .../is_member_object_pointer.hpp | 34 + .../function_types/is_member_pointer.hpp | 34 + .../is_nonmember_callable_builtin.hpp | 35 + .../member_function_pointer.hpp | 33 + .../function_types/member_object_pointer.hpp | 34 + .../boost/function_types/parameter_types.hpp | 55 + .../boost/function_types/property_tags.hpp | 149 + .../boost/function_types/result_type.hpp | 50 + .../boost-1.45.0/include/boost/functional.hpp | 548 + .../boost/functional/detail/container_fwd.hpp | 19 + .../include/boost/functional/factory.hpp | 163 + .../boost/functional/forward_adapter.hpp | 472 + .../include/boost/functional/hash.hpp | 7 + .../hash/detail/float_functions.hpp | 246 + .../functional/hash/detail/hash_float.hpp | 101 + .../hash/detail/hash_float_generic.hpp | 91 + .../functional/hash/detail/hash_float_x86.hpp | 56 + .../boost/functional/hash/detail/limits.hpp | 61 + .../boost/functional/hash/extensions.hpp | 286 + .../include/boost/functional/hash/hash.hpp | 517 + .../boost/functional/hash/hash_fwd.hpp | 40 + .../include/boost/functional/hash_fwd.hpp | 7 + .../lightweight_forward_adapter.hpp | 259 + .../boost/functional/value_factory.hpp | 70 + .../include/boost/fusion/adapted.hpp | 19 + .../include/boost/fusion/adapted/adt.hpp | 18 + .../boost/fusion/adapted/adt/adapt_adt.hpp | 73 + .../fusion/adapted/adt/adapt_adt_named.hpp | 30 + .../fusion/adapted/adt/adapt_assoc_adt.hpp | 87 + .../adapted/adt/adapt_assoc_adt_named.hpp | 28 + .../fusion/adapted/adt/detail/adapt_base.hpp | 181 + .../fusion/adapted/adt/detail/extension.hpp | 24 + .../include/boost/fusion/adapted/array.hpp | 27 + .../boost/fusion/adapted/array/at_impl.hpp | 38 + .../boost/fusion/adapted/array/begin_impl.hpp | 42 + .../fusion/adapted/array/category_of_impl.hpp | 32 + .../boost/fusion/adapted/array/deref_impl.hpp | 40 + .../boost/fusion/adapted/array/end_impl.hpp | 44 + .../fusion/adapted/array/is_sequence_impl.hpp | 28 + .../fusion/adapted/array/is_view_impl.hpp | 28 + .../boost/fusion/adapted/array/size_impl.hpp | 29 + .../boost/fusion/adapted/array/tag_of.hpp | 72 + .../fusion/adapted/array/value_at_impl.hpp | 28 + .../fusion/adapted/array/value_of_impl.hpp | 28 + .../boost/fusion/adapted/boost_array.hpp | 22 + .../adapted/boost_array/array_iterator.hpp | 107 + .../adapted/boost_array/detail/at_impl.hpp | 45 + .../adapted/boost_array/detail/begin_impl.hpp | 40 + .../boost_array/detail/category_of_impl.hpp | 35 + .../adapted/boost_array/detail/end_impl.hpp | 40 + .../boost_array/detail/is_sequence_impl.hpp | 31 + .../boost_array/detail/is_view_impl.hpp | 32 + .../adapted/boost_array/detail/size_impl.hpp | 29 + .../boost_array/detail/value_at_impl.hpp | 32 + .../fusion/adapted/boost_array/tag_of.hpp | 58 + .../boost/fusion/adapted/boost_tuple.hpp | 20 + .../boost_tuple/boost_tuple_iterator.hpp | 189 + .../adapted/boost_tuple/detail/at_impl.hpp | 50 + .../adapted/boost_tuple/detail/begin_impl.hpp | 39 + .../boost_tuple/detail/category_of_impl.hpp | 32 + .../adapted/boost_tuple/detail/end_impl.hpp | 54 + .../boost_tuple/detail/is_sequence_impl.hpp | 30 + .../boost_tuple/detail/is_view_impl.hpp | 30 + .../adapted/boost_tuple/detail/size_impl.hpp | 31 + .../boost_tuple/detail/value_at_impl.hpp | 30 + .../fusion/adapted/boost_tuple/tag_of.hpp | 114 + .../include/boost/fusion/adapted/mpl.hpp | 21 + .../fusion/adapted/mpl/detail/at_impl.hpp | 40 + .../fusion/adapted/mpl/detail/begin_impl.hpp | 45 + .../adapted/mpl/detail/category_of_impl.hpp | 54 + .../fusion/adapted/mpl/detail/empty_impl.hpp | 28 + .../fusion/adapted/mpl/detail/end_impl.hpp | 45 + .../adapted/mpl/detail/has_key_impl.hpp | 31 + .../adapted/mpl/detail/is_sequence_impl.hpp | 31 + .../adapted/mpl/detail/is_view_impl.hpp | 32 + .../fusion/adapted/mpl/detail/size_impl.hpp | 31 + .../adapted/mpl/detail/value_at_impl.hpp | 31 + .../boost/fusion/adapted/mpl/mpl_iterator.hpp | 113 + .../include/boost/fusion/adapted/std_pair.hpp | 24 + .../include/boost/fusion/adapted/struct.hpp | 20 + .../adapted/struct/adapt_assoc_struct.hpp | 93 + .../struct/adapt_assoc_struct_named.hpp | 36 + .../fusion/adapted/struct/adapt_struct.hpp | 70 + .../adapted/struct/adapt_struct_named.hpp | 38 + .../adapted/struct/define_assoc_struct.hpp | 41 + .../fusion/adapted/struct/define_struct.hpp | 41 + .../adapted/struct/detail/adapt_base.hpp | 241 + .../fusion/adapted/struct/detail/at_impl.hpp | 38 + .../adapted/struct/detail/begin_impl.hpp | 67 + .../struct/detail/category_of_impl.hpp | 42 + .../adapted/struct/detail/define_struct.hpp | 308 + .../adapted/struct/detail/deref_data_impl.hpp | 22 + .../adapted/struct/detail/deref_impl.hpp | 41 + .../fusion/adapted/struct/detail/end_impl.hpp | 67 + .../adapted/struct/detail/extension.hpp | 57 + .../struct/detail/is_sequence_impl.hpp | 35 + .../adapted/struct/detail/is_view_impl.hpp | 33 + .../adapted/struct/detail/key_of_impl.hpp | 29 + .../adapted/struct/detail/namespace.hpp | 51 + .../adapted/struct/detail/proxy_type.hpp | 39 + .../adapted/struct/detail/size_impl.hpp | 33 + .../adapted/struct/detail/value_at_impl.hpp | 33 + .../struct/detail/value_of_data_impl.hpp | 22 + .../adapted/struct/detail/value_of_impl.hpp | 29 + .../include/boost/fusion/algorithm.hpp | 14 + .../boost/fusion/algorithm/iteration.hpp | 17 + .../fusion/algorithm/iteration/accumulate.hpp | 40 + .../algorithm/iteration/detail/fold.hpp | 436 + .../algorithm/iteration/detail/for_each.hpp | 130 + .../algorithm/iteration/ext_/for_each_s.hpp | 91 + .../boost/fusion/algorithm/iteration/fold.hpp | 15 + .../fusion/algorithm/iteration/for_each.hpp | 43 + .../fusion/algorithm/iteration/iter_fold.hpp | 17 + .../algorithm/iteration/reverse_fold.hpp | 17 + .../algorithm/iteration/reverse_iter_fold.hpp | 19 + .../include/boost/fusion/algorithm/query.hpp | 18 + .../boost/fusion/algorithm/query/all.hpp | 34 + .../boost/fusion/algorithm/query/any.hpp | 35 + .../boost/fusion/algorithm/query/count.hpp | 35 + .../boost/fusion/algorithm/query/count_if.hpp | 35 + .../fusion/algorithm/query/detail/all.hpp | 127 + .../fusion/algorithm/query/detail/any.hpp | 130 + .../fusion/algorithm/query/detail/count.hpp | 78 + .../algorithm/query/detail/count_if.hpp | 170 + .../fusion/algorithm/query/detail/find_if.hpp | 232 + .../fusion/algorithm/query/ext_/find_if_s.hpp | 222 + .../boost/fusion/algorithm/query/find.hpp | 72 + .../boost/fusion/algorithm/query/find_if.hpp | 64 + .../boost/fusion/algorithm/query/none.hpp | 33 + .../boost/fusion/algorithm/transformation.hpp | 30 + .../fusion/algorithm/transformation/clear.hpp | 32 + .../transformation/detail/replace.hpp | 73 + .../transformation/detail/replace_if.hpp | 73 + .../fusion/algorithm/transformation/erase.hpp | 108 + .../algorithm/transformation/erase_key.hpp | 34 + .../algorithm/transformation/filter.hpp | 34 + .../algorithm/transformation/filter_if.hpp | 32 + .../algorithm/transformation/insert.hpp | 63 + .../algorithm/transformation/insert_range.hpp | 55 + .../fusion/algorithm/transformation/join.hpp | 33 + .../algorithm/transformation/pop_back.hpp | 43 + .../algorithm/transformation/pop_front.hpp | 43 + .../algorithm/transformation/push_back.hpp | 39 + .../algorithm/transformation/push_front.hpp | 39 + .../algorithm/transformation/remove.hpp | 35 + .../algorithm/transformation/remove_if.hpp | 35 + .../algorithm/transformation/replace.hpp | 35 + .../algorithm/transformation/replace_if.hpp | 37 + .../algorithm/transformation/reverse.hpp | 32 + .../algorithm/transformation/transform.hpp | 51 + .../fusion/algorithm/transformation/zip.hpp | 86 + .../include/boost/fusion/container.hpp | 17 + .../include/boost/fusion/container/deque.hpp | 15 + .../container/deque/back_extended_deque.hpp | 37 + .../boost/fusion/container/deque/convert.hpp | 48 + .../boost/fusion/container/deque/deque.hpp | 94 + .../fusion/container/deque/deque_fwd.hpp | 24 + .../fusion/container/deque/deque_iterator.hpp | 111 + .../container/deque/detail/as_deque.hpp | 102 + .../fusion/container/deque/detail/at_impl.hpp | 59 + .../container/deque/detail/begin_impl.hpp | 46 + .../container/deque/detail/convert_impl.hpp | 45 + .../deque/detail/deque_forward_ctor.hpp | 31 + .../deque/detail/deque_initial_size.hpp | 33 + .../deque/detail/deque_keyed_values.hpp | 75 + .../deque/detail/deque_keyed_values_call.hpp | 38 + .../container/deque/detail/end_impl.hpp | 46 + .../container/deque/detail/keyed_element.hpp | 111 + .../container/deque/detail/value_at_impl.hpp | 43 + .../container/deque/front_extended_deque.hpp | 39 + .../boost/fusion/container/deque/limits.hpp | 15 + .../boost/fusion/container/ext_/tree.hpp | 130 + .../boost/fusion/container/generation.hpp | 20 + .../fusion/container/generation/cons_tie.hpp | 43 + .../fusion/container/generation/deque_tie.hpp | 79 + .../fusion/container/generation/ignore.hpp | 32 + .../fusion/container/generation/list_tie.hpp | 79 + .../fusion/container/generation/make_cons.hpp | 43 + .../container/generation/make_deque.hpp | 98 + .../fusion/container/generation/make_list.hpp | 91 + .../fusion/container/generation/make_map.hpp | 106 + .../fusion/container/generation/make_set.hpp | 93 + .../container/generation/make_vector.hpp | 91 + .../fusion/container/generation/map_tie.hpp | 110 + .../fusion/container/generation/pair_tie.hpp | 43 + .../container/generation/vector_tie.hpp | 78 + .../include/boost/fusion/container/list.hpp | 17 + .../boost/fusion/container/list/cons.hpp | 143 + .../fusion/container/list/cons_iterator.hpp | 89 + .../boost/fusion/container/list/convert.hpp | 56 + .../fusion/container/list/detail/at_impl.hpp | 132 + .../container/list/detail/begin_impl.hpp | 49 + .../container/list/detail/build_cons.hpp | 57 + .../container/list/detail/convert_impl.hpp | 51 + .../container/list/detail/deref_impl.hpp | 52 + .../container/list/detail/empty_impl.hpp | 37 + .../fusion/container/list/detail/end_impl.hpp | 51 + .../container/list/detail/equal_to_impl.hpp | 39 + .../list/detail/list_forward_ctor.hpp | 47 + .../container/list/detail/list_to_cons.hpp | 49 + .../list/detail/list_to_cons_call.hpp | 43 + .../container/list/detail/next_impl.hpp | 59 + .../container/list/detail/value_at_impl.hpp | 42 + .../container/list/detail/value_of_impl.hpp | 36 + .../boost/fusion/container/list/limits.hpp | 19 + .../boost/fusion/container/list/list.hpp | 68 + .../boost/fusion/container/list/list_fwd.hpp | 24 + .../include/boost/fusion/container/map.hpp | 15 + .../boost/fusion/container/map/convert.hpp | 47 + .../fusion/container/map/detail/as_map.hpp | 101 + .../container/map/detail/begin_impl.hpp | 43 + .../container/map/detail/convert_impl.hpp | 45 + .../container/map/detail/deref_data_impl.hpp | 48 + .../container/map/detail/deref_impl.hpp | 45 + .../fusion/container/map/detail/end_impl.hpp | 43 + .../container/map/detail/key_of_impl.hpp | 32 + .../container/map/detail/map_forward_ctor.hpp | 38 + .../map/detail/value_of_data_impl.hpp | 32 + .../container/map/detail/value_of_impl.hpp | 39 + .../boost/fusion/container/map/limits.hpp | 25 + .../boost/fusion/container/map/map.hpp | 71 + .../boost/fusion/container/map/map_fwd.hpp | 26 + .../include/boost/fusion/container/set.hpp | 15 + .../boost/fusion/container/set/convert.hpp | 47 + .../fusion/container/set/detail/as_set.hpp | 101 + .../container/set/detail/begin_impl.hpp | 43 + .../container/set/detail/convert_impl.hpp | 45 + .../container/set/detail/deref_data_impl.hpp | 24 + .../container/set/detail/deref_impl.hpp | 45 + .../fusion/container/set/detail/end_impl.hpp | 43 + .../container/set/detail/key_of_impl.hpp | 24 + .../container/set/detail/set_forward_ctor.hpp | 39 + .../set/detail/value_of_data_impl.hpp | 24 + .../container/set/detail/value_of_impl.hpp | 34 + .../boost/fusion/container/set/limits.hpp | 25 + .../boost/fusion/container/set/set.hpp | 71 + .../boost/fusion/container/set/set_fwd.hpp | 26 + .../include/boost/fusion/container/vector.hpp | 21 + .../boost/fusion/container/vector/convert.hpp | 47 + .../container/vector/detail/advance_impl.hpp | 42 + .../container/vector/detail/as_vector.hpp | 101 + .../container/vector/detail/at_impl.hpp | 56 + .../container/vector/detail/begin_impl.hpp | 39 + .../container/vector/detail/convert_impl.hpp | 45 + .../container/vector/detail/deref_impl.hpp | 53 + .../container/vector/detail/distance_impl.hpp | 41 + .../container/vector/detail/end_impl.hpp | 40 + .../container/vector/detail/equal_to_impl.hpp | 39 + .../container/vector/detail/next_impl.hpp | 43 + .../container/vector/detail/prior_impl.hpp | 43 + .../container/vector/detail/value_at_impl.hpp | 33 + .../container/vector/detail/value_of_impl.hpp | 37 + .../vector/detail/vector_forward_ctor.hpp | 39 + .../container/vector/detail/vector_n.hpp | 150 + .../vector/detail/vector_n_chooser.hpp | 81 + .../boost/fusion/container/vector/limits.hpp | 19 + .../boost/fusion/container/vector/vector.hpp | 151 + .../fusion/container/vector/vector10.hpp | 67 + .../fusion/container/vector/vector20.hpp | 50 + .../fusion/container/vector/vector30.hpp | 50 + .../fusion/container/vector/vector40.hpp | 50 + .../fusion/container/vector/vector50.hpp | 50 + .../fusion/container/vector/vector_fwd.hpp | 25 + .../container/vector/vector_iterator.hpp | 50 + .../include/boost/fusion/functional.hpp | 17 + .../boost/fusion/functional/adapter.hpp | 16 + .../functional/adapter/detail/access.hpp | 41 + .../boost/fusion/functional/adapter/fused.hpp | 95 + .../adapter/fused_function_object.hpp | 100 + .../functional/adapter/fused_procedure.hpp | 80 + .../fusion/functional/adapter/limits.hpp | 26 + .../fusion/functional/adapter/unfused.hpp | 162 + .../functional/adapter/unfused_typed.hpp | 164 + .../boost/fusion/functional/generation.hpp | 17 + .../generation/detail/gen_make_adapter.hpp | 44 + .../functional/generation/make_fused.hpp | 18 + .../generation/make_fused_function_object.hpp | 18 + .../generation/make_fused_procedure.hpp | 18 + .../functional/generation/make_unfused.hpp | 18 + .../boost/fusion/functional/invocation.hpp | 16 + .../functional/invocation/detail/that_ptr.hpp | 87 + .../fusion/functional/invocation/invoke.hpp | 331 + .../invocation/invoke_function_object.hpp | 203 + .../invocation/invoke_procedure.hpp | 194 + .../fusion/functional/invocation/limits.hpp | 23 + .../boost/fusion/include/accumulate.hpp | 12 + .../boost/fusion/include/adapt_adt.hpp | 13 + .../boost/fusion/include/adapt_adt_named.cpp | 12 + .../boost/fusion/include/adapt_adt_named.hpp | 13 + .../boost/fusion/include/adapt_assoc_adt.hpp | 13 + .../fusion/include/adapt_assoc_adt_named.hpp | 13 + .../fusion/include/adapt_assoc_class.hpp | 13 + .../include/adapt_assoc_class_named.hpp | 13 + .../fusion/include/adapt_assoc_struct.hpp | 13 + .../include/adapt_assoc_struct_named.hpp | 13 + .../boost/fusion/include/adapt_struct.hpp | 13 + .../fusion/include/adapt_struct_named.hpp | 13 + .../include/boost/fusion/include/adapted.hpp | 12 + .../include/boost/fusion/include/adapter.hpp | 12 + .../include/boost/fusion/include/advance.hpp | 12 + .../boost/fusion/include/algorithm.hpp | 12 + .../include/boost/fusion/include/all.hpp | 12 + .../include/boost/fusion/include/any.hpp | 12 + .../include/boost/fusion/include/array.hpp | 12 + .../include/boost/fusion/include/as_deque.hpp | 12 + .../include/boost/fusion/include/as_list.hpp | 12 + .../include/boost/fusion/include/as_map.hpp | 12 + .../include/boost/fusion/include/as_set.hpp | 12 + .../boost/fusion/include/as_vector.hpp | 12 + .../include/boost/fusion/include/at.hpp | 12 + .../include/boost/fusion/include/at_c.hpp | 12 + .../include/boost/fusion/include/at_key.hpp | 12 + .../include/boost/fusion/include/back.hpp | 12 + .../include/boost/fusion/include/begin.hpp | 12 + .../boost/fusion/include/boost_array.hpp | 12 + .../boost/fusion/include/boost_tuple.hpp | 12 + .../boost/fusion/include/category_of.hpp | 12 + .../include/boost/fusion/include/clear.hpp | 12 + .../boost/fusion/include/comparison.hpp | 12 + .../include/boost/fusion/include/cons.hpp | 12 + .../include/boost/fusion/include/cons_tie.hpp | 12 + .../boost/fusion/include/container.hpp | 12 + .../include/boost/fusion/include/convert.hpp | 12 + .../include/boost/fusion/include/count.hpp | 12 + .../include/boost/fusion/include/count_if.hpp | 12 + .../include/boost/fusion/include/deduce.hpp | 12 + .../boost/fusion/include/deduce_sequence.hpp | 12 + .../fusion/include/define_assoc_struct.hpp | 13 + .../boost/fusion/include/define_struct.hpp | 13 + .../include/boost/fusion/include/deque.hpp | 12 + .../boost/fusion/include/deque_fwd.hpp | 12 + .../boost/fusion/include/deque_tie.hpp | 13 + .../include/boost/fusion/include/deref.hpp | 12 + .../boost/fusion/include/deref_data.hpp | 13 + .../include/boost/fusion/include/distance.hpp | 12 + .../include/boost/fusion/include/empty.hpp | 12 + .../include/boost/fusion/include/end.hpp | 12 + .../include/boost/fusion/include/equal_to.hpp | 13 + .../include/boost/fusion/include/erase.hpp | 12 + .../boost/fusion/include/erase_key.hpp | 12 + .../include/boost/fusion/include/filter.hpp | 12 + .../boost/fusion/include/filter_if.hpp | 12 + .../boost/fusion/include/filter_view.hpp | 12 + .../include/boost/fusion/include/find.hpp | 12 + .../include/boost/fusion/include/find_if.hpp | 12 + .../include/boost/fusion/include/fold.hpp | 12 + .../include/boost/fusion/include/for_each.hpp | 12 + .../include/boost/fusion/include/front.hpp | 12 + .../boost/fusion/include/functional.hpp | 12 + .../include/boost/fusion/include/fused.hpp | 12 + .../fusion/include/fused_function_object.hpp | 12 + .../boost/fusion/include/fused_procedure.hpp | 12 + .../boost/fusion/include/generation.hpp | 13 + .../include/boost/fusion/include/greater.hpp | 12 + .../boost/fusion/include/greater_equal.hpp | 12 + .../include/boost/fusion/include/has_key.hpp | 12 + .../include/boost/fusion/include/ignore.hpp | 13 + .../include/boost/fusion/include/in.hpp | 12 + .../include/boost/fusion/include/insert.hpp | 12 + .../boost/fusion/include/insert_range.hpp | 12 + .../boost/fusion/include/intrinsic.hpp | 12 + .../boost/fusion/include/invocation.hpp | 12 + .../include/boost/fusion/include/invoke.hpp | 12 + .../fusion/include/invoke_function_object.hpp | 12 + .../boost/fusion/include/invoke_procedure.hpp | 12 + .../include/boost/fusion/include/io.hpp | 12 + .../boost/fusion/include/is_iterator.hpp | 12 + .../boost/fusion/include/is_sequence.hpp | 12 + .../include/boost/fusion/include/is_view.hpp | 12 + .../boost/fusion/include/iter_fold.hpp | 13 + .../boost/fusion/include/iteration.hpp | 12 + .../include/boost/fusion/include/iterator.hpp | 12 + .../boost/fusion/include/iterator_base.hpp | 12 + .../boost/fusion/include/iterator_facade.hpp | 12 + .../boost/fusion/include/iterator_range.hpp | 12 + .../include/boost/fusion/include/join.hpp | 12 + .../boost/fusion/include/joint_view.hpp | 12 + .../include/boost/fusion/include/key_of.hpp | 13 + .../include/boost/fusion/include/less.hpp | 12 + .../boost/fusion/include/less_equal.hpp | 12 + .../include/boost/fusion/include/list.hpp | 12 + .../include/boost/fusion/include/list_fwd.hpp | 12 + .../include/boost/fusion/include/list_tie.hpp | 13 + .../boost/fusion/include/make_cons.hpp | 12 + .../boost/fusion/include/make_deque.hpp | 12 + .../boost/fusion/include/make_fused.hpp | 12 + .../include/make_fused_function_object.hpp | 12 + .../fusion/include/make_fused_procedure.hpp | 12 + .../boost/fusion/include/make_list.hpp | 12 + .../include/boost/fusion/include/make_map.hpp | 12 + .../include/boost/fusion/include/make_set.hpp | 12 + .../boost/fusion/include/make_tuple.hpp | 12 + .../fusion/include/make_unfused_generic.hpp | 12 + .../include/make_unfused_lvalue_args.hpp | 12 + .../include/make_unfused_rvalue_args.hpp | 12 + .../boost/fusion/include/make_vector.hpp | 12 + .../include/boost/fusion/include/map.hpp | 12 + .../include/boost/fusion/include/map_fwd.hpp | 12 + .../include/boost/fusion/include/map_tie.hpp | 12 + .../include/boost/fusion/include/mpl.hpp | 13 + .../include/boost/fusion/include/next.hpp | 12 + .../include/boost/fusion/include/none.hpp | 12 + .../boost/fusion/include/not_equal_to.hpp | 13 + .../include/boost/fusion/include/nview.hpp | 12 + .../include/boost/fusion/include/out.hpp | 12 + .../include/boost/fusion/include/pair.hpp | 12 + .../include/boost/fusion/include/pair_tie.hpp | 12 + .../include/boost/fusion/include/pop_back.hpp | 12 + .../boost/fusion/include/pop_front.hpp | 12 + .../include/boost/fusion/include/prior.hpp | 12 + .../boost/fusion/include/proxy_type.hpp | 13 + .../boost/fusion/include/push_back.hpp | 12 + .../boost/fusion/include/push_front.hpp | 12 + .../include/boost/fusion/include/query.hpp | 12 + .../include/boost/fusion/include/remove.hpp | 12 + .../boost/fusion/include/remove_if.hpp | 12 + .../boost/fusion/include/repetetive_view.hpp | 12 + .../include/boost/fusion/include/replace.hpp | 12 + .../boost/fusion/include/replace_if.hpp | 12 + .../include/boost/fusion/include/reverse.hpp | 12 + .../boost/fusion/include/reverse_fold.hpp | 13 + .../fusion/include/reverse_iter_fold.hpp | 13 + .../boost/fusion/include/reverse_view.hpp | 12 + .../include/boost/fusion/include/sequence.hpp | 12 + .../boost/fusion/include/sequence_base.hpp | 12 + .../boost/fusion/include/sequence_facade.hpp | 12 + .../include/boost/fusion/include/set.hpp | 12 + .../include/boost/fusion/include/set_fwd.hpp | 12 + .../boost/fusion/include/single_view.hpp | 12 + .../include/boost/fusion/include/size.hpp | 12 + .../include/boost/fusion/include/std_pair.hpp | 12 + .../include/boost/fusion/include/struct.hpp | 12 + .../include/boost/fusion/include/support.hpp | 12 + .../include/boost/fusion/include/swap.hpp | 12 + .../include/boost/fusion/include/tag_of.hpp | 12 + .../boost/fusion/include/tag_of_fwd.hpp | 12 + .../boost/fusion/include/transform.hpp | 12 + .../boost/fusion/include/transform_view.hpp | 12 + .../boost/fusion/include/transformation.hpp | 12 + .../include/boost/fusion/include/tuple.hpp | 12 + .../boost/fusion/include/tuple_fwd.hpp | 12 + .../boost/fusion/include/tuple_tie.hpp | 12 + .../boost/fusion/include/unfused_generic.hpp | 12 + .../fusion/include/unfused_lvalue_args.hpp | 12 + .../fusion/include/unfused_rvalue_args.hpp | 12 + .../boost/fusion/include/unfused_typed.hpp | 12 + .../include/boost/fusion/include/unused.hpp | 12 + .../include/boost/fusion/include/value_at.hpp | 12 + .../boost/fusion/include/value_at_key.hpp | 12 + .../include/boost/fusion/include/value_of.hpp | 12 + .../boost/fusion/include/value_of_data.hpp | 13 + .../include/boost/fusion/include/vector.hpp | 12 + .../include/boost/fusion/include/vector10.hpp | 12 + .../include/boost/fusion/include/vector20.hpp | 12 + .../include/boost/fusion/include/vector30.hpp | 12 + .../include/boost/fusion/include/vector40.hpp | 12 + .../include/boost/fusion/include/vector50.hpp | 12 + .../boost/fusion/include/vector_fwd.hpp | 12 + .../boost/fusion/include/vector_tie.hpp | 12 + .../include/boost/fusion/include/view.hpp | 12 + .../include/boost/fusion/include/void.hpp | 12 + .../include/boost/fusion/include/zip.hpp | 12 + .../include/boost/fusion/include/zip_view.hpp | 12 + .../include/boost/fusion/iterator.hpp | 20 + .../include/boost/fusion/iterator/advance.hpp | 92 + .../boost/fusion/iterator/basic_iterator.hpp | 141 + .../include/boost/fusion/iterator/deref.hpp | 72 + .../boost/fusion/iterator/deref_data.hpp | 49 + .../iterator/detail/adapt_deref_traits.hpp | 34 + .../iterator/detail/adapt_value_traits.hpp | 28 + .../boost/fusion/iterator/detail/advance.hpp | 102 + .../boost/fusion/iterator/detail/distance.hpp | 64 + .../boost/fusion/iterator/distance.hpp | 81 + .../boost/fusion/iterator/equal_to.hpp | 93 + .../boost/fusion/iterator/iterator_facade.hpp | 57 + .../include/boost/fusion/iterator/key_of.hpp | 42 + .../include/boost/fusion/iterator/mpl.hpp | 13 + .../fusion/iterator/mpl/convert_iterator.hpp | 58 + .../fusion/iterator/mpl/fusion_iterator.hpp | 79 + .../include/boost/fusion/iterator/next.hpp | 63 + .../include/boost/fusion/iterator/prior.hpp | 63 + .../boost/fusion/iterator/value_of.hpp | 57 + .../boost/fusion/iterator/value_of_data.hpp | 42 + .../boost-1.45.0/include/boost/fusion/mpl.hpp | 32 + .../include/boost/fusion/mpl/at.hpp | 33 + .../include/boost/fusion/mpl/back.hpp | 32 + .../include/boost/fusion/mpl/begin.hpp | 31 + .../include/boost/fusion/mpl/clear.hpp | 33 + .../include/boost/fusion/mpl/detail/clear.hpp | 46 + .../include/boost/fusion/mpl/empty.hpp | 26 + .../include/boost/fusion/mpl/end.hpp | 31 + .../include/boost/fusion/mpl/erase.hpp | 39 + .../include/boost/fusion/mpl/erase_key.hpp | 39 + .../include/boost/fusion/mpl/front.hpp | 28 + .../include/boost/fusion/mpl/has_key.hpp | 27 + .../include/boost/fusion/mpl/insert.hpp | 39 + .../include/boost/fusion/mpl/insert_range.hpp | 39 + .../include/boost/fusion/mpl/pop_back.hpp | 39 + .../include/boost/fusion/mpl/pop_front.hpp | 39 + .../include/boost/fusion/mpl/push_back.hpp | 39 + .../include/boost/fusion/mpl/push_front.hpp | 39 + .../include/boost/fusion/mpl/size.hpp | 26 + .../include/boost/fusion/sequence.hpp | 16 + .../boost/fusion/sequence/comparison.hpp | 17 + .../comparison/detail/enable_comparison.hpp | 38 + .../sequence/comparison/detail/equal_to.hpp | 60 + .../sequence/comparison/detail/greater.hpp | 49 + .../comparison/detail/greater_equal.hpp | 49 + .../sequence/comparison/detail/less.hpp | 49 + .../sequence/comparison/detail/less_equal.hpp | 49 + .../comparison/detail/not_equal_to.hpp | 60 + .../fusion/sequence/comparison/equal_to.hpp | 56 + .../fusion/sequence/comparison/greater.hpp | 52 + .../sequence/comparison/greater_equal.hpp | 52 + .../boost/fusion/sequence/comparison/less.hpp | 43 + .../fusion/sequence/comparison/less_equal.hpp | 80 + .../sequence/comparison/not_equal_to.hpp | 55 + .../include/boost/fusion/sequence/convert.hpp | 48 + .../boost/fusion/sequence/intrinsic.hpp | 22 + .../boost/fusion/sequence/intrinsic/at.hpp | 106 + .../boost/fusion/sequence/intrinsic/at_c.hpp | 13 + .../fusion/sequence/intrinsic/at_key.hpp | 92 + .../boost/fusion/sequence/intrinsic/back.hpp | 42 + .../boost/fusion/sequence/intrinsic/begin.hpp | 74 + .../boost/fusion/sequence/intrinsic/empty.hpp | 60 + .../boost/fusion/sequence/intrinsic/end.hpp | 74 + .../sequence/intrinsic/ext_/segments.hpp | 56 + .../fusion/sequence/intrinsic/ext_/size_s.hpp | 57 + .../boost/fusion/sequence/intrinsic/front.hpp | 41 + .../fusion/sequence/intrinsic/has_key.hpp | 78 + .../boost/fusion/sequence/intrinsic/size.hpp | 74 + .../boost/fusion/sequence/intrinsic/swap.hpp | 59 + .../fusion/sequence/intrinsic/value_at.hpp | 67 + .../sequence/intrinsic/value_at_key.hpp | 65 + .../include/boost/fusion/sequence/io.hpp | 13 + .../boost/fusion/sequence/io/detail/in.hpp | 85 + .../boost/fusion/sequence/io/detail/manip.hpp | 320 + .../boost/fusion/sequence/io/detail/out.hpp | 85 + .../include/boost/fusion/sequence/io/in.hpp | 42 + .../include/boost/fusion/sequence/io/out.hpp | 44 + .../boost/fusion/sequence/sequence_facade.hpp | 27 + .../include/boost/fusion/support.hpp | 22 + .../boost/fusion/support/category_of.hpp | 112 + .../include/boost/fusion/support/deduce.hpp | 117 + .../boost/fusion/support/deduce_sequence.hpp | 44 + .../boost/fusion/support/detail/access.hpp | 64 + .../support/detail/as_fusion_element.hpp | 47 + .../fusion/support/detail/category_of.hpp | 19 + .../fusion/support/detail/is_mpl_sequence.hpp | 27 + .../boost/fusion/support/detail/is_view.hpp | 19 + .../support/detail/mpl_iterator_category.hpp | 66 + .../fusion/support/detail/unknown_key.hpp | 16 + .../fusion/support/ext_/is_segmented.hpp | 48 + .../boost/fusion/support/is_iterator.hpp | 20 + .../boost/fusion/support/is_sequence.hpp | 66 + .../include/boost/fusion/support/is_view.hpp | 63 + .../boost/fusion/support/iterator_base.hpp | 31 + .../include/boost/fusion/support/pair.hpp | 112 + .../boost/fusion/support/sequence_base.hpp | 45 + .../include/boost/fusion/support/tag_of.hpp | 75 + .../boost/fusion/support/tag_of_fwd.hpp | 20 + .../include/boost/fusion/support/unused.hpp | 85 + .../include/boost/fusion/support/void.hpp | 15 + .../include/boost/fusion/tuple.hpp | 15 + .../fusion/tuple/detail/tuple_expand.hpp | 50 + .../include/boost/fusion/tuple/make_tuple.hpp | 56 + .../include/boost/fusion/tuple/tuple.hpp | 88 + .../include/boost/fusion/tuple/tuple_fwd.hpp | 24 + .../include/boost/fusion/tuple/tuple_tie.hpp | 49 + .../include/boost/fusion/view.hpp | 19 + .../view/detail/strictest_traversal.hpp | 68 + .../boost/fusion/view/ext_/multiple_view.hpp | 178 + .../fusion/view/ext_/segmented_iterator.hpp | 448 + .../view/ext_/segmented_iterator_range.hpp | 537 + .../include/boost/fusion/view/filter_view.hpp | 13 + .../view/filter_view/detail/begin_impl.hpp | 46 + .../filter_view/detail/deref_data_impl.hpp | 37 + .../view/filter_view/detail/deref_impl.hpp | 29 + .../view/filter_view/detail/end_impl.hpp | 45 + .../view/filter_view/detail/equal_to_impl.hpp | 34 + .../view/filter_view/detail/key_of_impl.hpp | 28 + .../view/filter_view/detail/next_impl.hpp | 77 + .../view/filter_view/detail/size_impl.hpp | 38 + .../filter_view/detail/value_of_data_impl.hpp | 28 + .../view/filter_view/detail/value_of_impl.hpp | 29 + .../fusion/view/filter_view/filter_view.hpp | 64 + .../view/filter_view/filter_view_iterator.hpp | 70 + .../boost/fusion/view/iterator_range.hpp | 12 + .../view/iterator_range/detail/at_impl.hpp | 44 + .../view/iterator_range/detail/begin_impl.hpp | 39 + .../view/iterator_range/detail/end_impl.hpp | 39 + .../iterator_range/detail/value_at_impl.hpp | 38 + .../view/iterator_range/iterator_range.hpp | 59 + .../include/boost/fusion/view/joint_view.hpp | 13 + .../view/joint_view/detail/begin_impl.hpp | 67 + .../joint_view/detail/deref_data_impl.hpp | 37 + .../view/joint_view/detail/deref_impl.hpp | 29 + .../view/joint_view/detail/end_impl.hpp | 40 + .../view/joint_view/detail/key_of_impl.hpp | 28 + .../view/joint_view/detail/next_impl.hpp | 71 + .../joint_view/detail/value_of_data_impl.hpp | 28 + .../view/joint_view/detail/value_of_impl.hpp | 29 + .../fusion/view/joint_view/joint_view.hpp | 75 + .../view/joint_view/joint_view_iterator.hpp | 59 + .../include/boost/fusion/view/nview.hpp | 15 + .../fusion/view/nview/detail/advance_impl.hpp | 49 + .../fusion/view/nview/detail/at_impl.hpp | 45 + .../fusion/view/nview/detail/begin_impl.hpp | 48 + .../fusion/view/nview/detail/deref_impl.hpp | 48 + .../view/nview/detail/distance_impl.hpp | 44 + .../fusion/view/nview/detail/end_impl.hpp | 50 + .../view/nview/detail/equal_to_impl.hpp | 33 + .../fusion/view/nview/detail/next_impl.hpp | 48 + .../fusion/view/nview/detail/nview_impl.hpp | 77 + .../fusion/view/nview/detail/prior_impl.hpp | 48 + .../fusion/view/nview/detail/size_impl.hpp | 38 + .../view/nview/detail/value_at_impl.hpp | 39 + .../view/nview/detail/value_of_impl.hpp | 44 + .../include/boost/fusion/view/nview/nview.hpp | 109 + .../fusion/view/nview/nview_iterator.hpp | 58 + .../boost/fusion/view/repetitive_view.hpp | 15 + .../repetitive_view/detail/begin_impl.hpp | 49 + .../repetitive_view/detail/deref_impl.hpp | 44 + .../view/repetitive_view/detail/end_impl.hpp | 49 + .../view/repetitive_view/detail/next_impl.hpp | 90 + .../repetitive_view/detail/value_of_impl.hpp | 34 + .../view/repetitive_view/repetitive_view.hpp | 52 + .../repetitive_view/repetitive_view_fwd.hpp | 19 + .../repetitive_view_iterator.hpp | 55 + .../boost/fusion/view/reverse_view.hpp | 13 + .../view/reverse_view/detail/advance_impl.hpp | 47 + .../view/reverse_view/detail/at_impl.hpp | 41 + .../view/reverse_view/detail/begin_impl.hpp | 42 + .../reverse_view/detail/deref_data_impl.hpp | 37 + .../view/reverse_view/detail/deref_impl.hpp | 48 + .../reverse_view/detail/distance_impl.hpp | 45 + .../view/reverse_view/detail/end_impl.hpp | 42 + .../view/reverse_view/detail/key_of_impl.hpp | 28 + .../view/reverse_view/detail/next_impl.hpp | 47 + .../view/reverse_view/detail/prior_impl.hpp | 47 + .../reverse_view/detail/value_at_impl.hpp | 33 + .../detail/value_of_data_impl.hpp | 28 + .../reverse_view/detail/value_of_impl.hpp | 42 + .../fusion/view/reverse_view/reverse_view.hpp | 68 + .../reverse_view/reverse_view_iterator.hpp | 56 + .../include/boost/fusion/view/single_view.hpp | 13 + .../view/single_view/detail/begin_impl.hpp | 42 + .../view/single_view/detail/deref_impl.hpp | 43 + .../view/single_view/detail/end_impl.hpp | 42 + .../view/single_view/detail/next_impl.hpp | 47 + .../view/single_view/detail/value_of_impl.hpp | 34 + .../fusion/view/single_view/single_view.hpp | 64 + .../view/single_view/single_view_iterator.hpp | 57 + .../boost/fusion/view/transform_view.hpp | 13 + .../transform_view/detail/advance_impl.hpp | 75 + .../detail/apply_transform_result.hpp | 37 + .../view/transform_view/detail/at_impl.hpp | 63 + .../view/transform_view/detail/begin_impl.hpp | 68 + .../view/transform_view/detail/deref_impl.hpp | 76 + .../transform_view/detail/distance_impl.hpp | 59 + .../view/transform_view/detail/end_impl.hpp | 68 + .../transform_view/detail/equal_to_impl.hpp | 42 + .../view/transform_view/detail/next_impl.hpp | 74 + .../view/transform_view/detail/prior_impl.hpp | 73 + .../transform_view/detail/value_at_impl.hpp | 53 + .../transform_view/detail/value_of_impl.hpp | 63 + .../view/transform_view/transform_view.hpp | 115 + .../transform_view/transform_view_fwd.hpp | 22 + .../transform_view_iterator.hpp | 77 + .../include/boost/fusion/view/zip_view.hpp | 14 + .../view/zip_view/detail/advance_impl.hpp | 69 + .../fusion/view/zip_view/detail/at_impl.hpp | 92 + .../view/zip_view/detail/begin_impl.hpp | 92 + .../view/zip_view/detail/deref_impl.hpp | 83 + .../view/zip_view/detail/distance_impl.hpp | 82 + .../fusion/view/zip_view/detail/end_impl.hpp | 103 + .../view/zip_view/detail/equal_to_impl.hpp | 62 + .../fusion/view/zip_view/detail/next_impl.hpp | 83 + .../view/zip_view/detail/prior_impl.hpp | 83 + .../fusion/view/zip_view/detail/size_impl.hpp | 35 + .../view/zip_view/detail/value_at_impl.hpp | 61 + .../view/zip_view/detail/value_of_impl.hpp | 61 + .../boost/fusion/view/zip_view/zip_view.hpp | 115 + .../view/zip_view/zip_view_iterator.hpp | 47 + .../view/zip_view/zip_view_iterator_fwd.hpp | 22 + .../include/boost/generator_iterator.hpp | 80 + .../include/boost/get_pointer.hpp | 33 + .../include/boost/graph/accounting.hpp | 36 + .../boost/graph/adj_list_serialize.hpp | 113 + .../boost/graph/adjacency_iterator.hpp | 102 + .../include/boost/graph/adjacency_list.hpp | 618 + .../include/boost/graph/adjacency_list_io.hpp | 406 + .../include/boost/graph/adjacency_matrix.hpp | 1362 ++ .../include/boost/graph/astar_search.hpp | 378 + .../include/boost/graph/bandwidth.hpp | 83 + .../include/boost/graph/bc_clustering.hpp | 166 + .../graph/bellman_ford_shortest_paths.hpp | 241 + .../boost/graph/betweenness_centrality.hpp | 619 + .../boost/graph/biconnected_components.hpp | 415 + .../include/boost/graph/bipartite.hpp | 386 + .../boost/graph/boyer_myrvold_planar_test.hpp | 322 + .../graph/boykov_kolmogorov_max_flow.hpp | 866 + .../boost/graph/breadth_first_search.hpp | 352 + .../boost/graph/bron_kerbosch_all_cliques.hpp | 309 + .../include/boost/graph/buffer_concepts.hpp | 91 + .../boost/graph/chrobak_payne_drawing.hpp | 270 + .../include/boost/graph/circle_layout.hpp | 58 + .../boost/graph/closeness_centrality.hpp | 157 + .../boost/graph/clustering_coefficient.hpp | 158 + .../graph/compressed_sparse_row_graph.hpp | 1599 ++ .../boost/graph/connected_components.hpp | 106 + .../boost-1.45.0/include/boost/graph/copy.hpp | 465 + .../include/boost/graph/core_numbers.hpp | 350 + .../boost/graph/create_condensation_graph.hpp | 83 + .../boost/graph/cuthill_mckee_ordering.hpp | 191 + .../boost/graph/dag_shortest_paths.hpp | 157 + .../include/boost/graph/degree_centrality.hpp | 130 + .../boost/graph/depth_first_search.hpp | 331 + .../graph/detail/adj_list_edge_iterator.hpp | 117 + .../boost/graph/detail/adjacency_list.hpp | 2837 +++ .../boost/graph/detail/array_binary_tree.hpp | 181 + .../detail/compressed_sparse_row_struct.hpp | 652 + .../graph/detail/connected_components.hpp | 208 + .../include/boost/graph/detail/d_ary_heap.hpp | 311 + .../include/boost/graph/detail/edge.hpp | 124 + .../include/boost/graph/detail/geodesic.hpp | 130 + .../boost/graph/detail/histogram_sort.hpp | 286 + .../boost/graph/detail/incidence_iterator.hpp | 79 + .../graph/detail/incremental_components.hpp | 77 + .../include/boost/graph/detail/index.hpp | 74 + .../boost/graph/detail/indexed_properties.hpp | 284 + .../include/boost/graph/detail/is_same.hpp | 48 + .../graph/detail/labeled_graph_traits.hpp | 237 + .../include/boost/graph/detail/list_base.hpp | 220 + .../boost/graph/detail/permutation.hpp | 205 + .../boost/graph/detail/read_graphviz_new.hpp | 108 + .../graph/detail/read_graphviz_spirit.hpp | 612 + .../boost/graph/detail/self_avoiding_walk.hpp | 418 + .../boost/graph/detail/set_adaptor.hpp | 123 + .../boost/graph/detail/shadow_iterator.hpp | 139 + .../boost/graph/detail/sparse_ordering.hpp | 198 + .../boost/graph/dijkstra_shortest_paths.hpp | 487 + .../dijkstra_shortest_paths_no_color_map.hpp | 249 + .../include/boost/graph/dimacs.hpp | 309 + .../include/boost/graph/directed_graph.hpp | 684 + .../graph/distributed/adjacency_list.hpp | 3970 ++++ .../graph/distributed/adjlist/handlers.hpp | 148 + .../graph/distributed/adjlist/initialize.hpp | 319 + .../distributed/adjlist/redistribute.hpp | 393 + .../distributed/adjlist/serialization.hpp | 1007 + .../distributed/betweenness_centrality.hpp | 1724 ++ .../boman_et_al_graph_coloring.hpp | 372 + .../distributed/breadth_first_search.hpp | 164 + .../compressed_sparse_row_graph.hpp | 2152 ++ .../boost/graph/distributed/concepts.hpp | 216 + .../distributed/connected_components.hpp | 766 + .../connected_components_parallel_search.hpp | 408 + .../crauser_et_al_shortest_paths.hpp | 664 + .../dehne_gotz_min_spanning_tree.hpp | 938 + .../delta_stepping_shortest_paths.hpp | 513 + .../graph/distributed/depth_first_search.hpp | 306 + .../detail/dijkstra_shortest_paths.hpp | 50 + .../distributed/detail/filtered_queue.hpp | 108 + .../distributed/detail/mpi_process_group.ipp | 1007 + .../boost/graph/distributed/detail/queue.ipp | 177 + .../distributed/detail/remote_update_set.hpp | 259 + .../distributed/detail/tag_allocator.hpp | 84 + .../distributed/dijkstra_shortest_paths.hpp | 205 + .../distributed/distributed_graph_utility.hpp | 154 + .../eager_dijkstra_shortest_paths.hpp | 446 + .../graph/distributed/filtered_graph.hpp | 51 + .../distributed/fruchterman_reingold.hpp | 384 + .../boost/graph/distributed/graphviz.hpp | 294 + .../hohberg_biconnected_components.hpp | 1129 + .../graph/distributed/local_subgraph.hpp | 175 + .../graph/distributed/mpi_process_group.hpp | 809 + .../boost/graph/distributed/named_graph.hpp | 1239 + .../graph/distributed/one_bit_color_map.hpp | 116 + .../boost/graph/distributed/page_rank.hpp | 225 + .../include/boost/graph/distributed/queue.hpp | 278 + .../boost/graph/distributed/reverse_graph.hpp | 38 + .../distributed/rmat_graph_generator.hpp | 163 + .../boost/graph/distributed/selector.hpp | 36 + .../distributed/shuffled_distribution.hpp | 113 + .../boost/graph/distributed/st_connected.hpp | 186 + .../graph/distributed/strong_components.hpp | 987 + .../graph/distributed/two_bit_color_map.hpp | 116 + .../graph/distributed/unsafe_serialize.hpp | 85 + .../graph/distributed/vertex_list_adaptor.hpp | 403 + .../include/boost/graph/dll_import_export.hpp | 30 + .../include/boost/graph/dominator_tree.hpp | 491 + .../include/boost/graph/eccentricity.hpp | 113 + .../include/boost/graph/edge_connectivity.hpp | 183 + .../include/boost/graph/edge_list.hpp | 304 + .../boost/graph/edmonds_karp_max_flow.hpp | 250 + .../boost/graph/edmunds_karp_max_flow.hpp | 19 + .../boost/graph/erdos_renyi_generator.hpp | 195 + .../include/boost/graph/exception.hpp | 55 + .../include/boost/graph/exterior_property.hpp | 117 + .../include/boost/graph/filtered_graph.hpp | 536 + .../boost/graph/floyd_warshall_shortest.hpp | 251 + .../boost/graph/fruchterman_reingold.hpp | 442 + .../include/boost/graph/geodesic_distance.hpp | 210 + .../include/boost/graph/graph_archetypes.hpp | 292 + .../include/boost/graph/graph_as_tree.hpp | 154 + .../include/boost/graph/graph_concepts.hpp | 606 + .../boost/graph/graph_mutability_traits.hpp | 204 + .../include/boost/graph/graph_selectors.hpp | 38 + .../include/boost/graph/graph_stats.hpp | 136 + .../include/boost/graph/graph_test.hpp | 384 + .../include/boost/graph/graph_traits.hpp | 353 + .../include/boost/graph/graph_utility.hpp | 510 + .../include/boost/graph/graphml.hpp | 350 + .../include/boost/graph/graphviz.hpp | 855 + .../include/boost/graph/grid_graph.hpp | 999 + .../boost/graph/gursoy_atun_layout.hpp | 358 + .../boost/graph/howard_cycle_ratio.hpp | 634 + .../boost/graph/incremental_components.hpp | 231 + .../boost/graph/is_kuratowski_subgraph.hpp | 332 + .../boost/graph/is_straight_line_drawing.hpp | 252 + .../include/boost/graph/isomorphism.hpp | 465 + .../include/boost/graph/iteration_macros.hpp | 140 + .../boost/graph/iteration_macros_undef.hpp | 22 + .../graph/johnson_all_pairs_shortest.hpp | 204 + .../graph/kamada_kawai_spring_layout.hpp | 605 + .../include/boost/graph/king_ordering.hpp | 321 + .../boost/graph/kolmogorov_max_flow.hpp | 814 + .../boost/graph/kruskal_min_spanning_tree.hpp | 155 + .../include/boost/graph/labeled_graph.hpp | 813 + .../include/boost/graph/leda_graph.hpp | 952 + .../include/boost/graph/lookup_edge.hpp | 50 + .../boost/graph/loop_erased_random_walk.hpp | 119 + .../boost/graph/make_biconnected_planar.hpp | 121 + .../include/boost/graph/make_connected.hpp | 99 + .../boost/graph/make_maximal_planar.hpp | 275 + .../include/boost/graph/matrix_as_graph.hpp | 127 + .../boost/graph/max_cardinality_matching.hpp | 883 + .../boost/graph/mcgregor_common_subgraphs.hpp | 1142 + .../boost/graph/mesh_graph_generator.hpp | 158 + .../include/boost/graph/metis.hpp | 339 + .../include/boost/graph/metric_tsp_approx.hpp | 314 + .../boost/graph/minimum_degree_ordering.hpp | 655 + .../boost/graph/named_function_params.hpp | 621 + .../include/boost/graph/named_graph.hpp | 537 + .../include/boost/graph/neighbor_bfs.hpp | 322 + .../include/boost/graph/numeric_values.hpp | 52 + .../include/boost/graph/one_bit_color_map.hpp | 103 + .../include/boost/graph/overloading.hpp | 46 + .../include/boost/graph/page_rank.hpp | 161 + .../boost/graph/parallel/algorithm.hpp | 84 + .../boost/graph/parallel/basic_reduce.hpp | 42 + .../boost/graph/parallel/container_traits.hpp | 45 + .../parallel/detail/inplace_all_to_all.hpp | 78 + .../parallel/detail/property_holders.hpp | 152 + .../graph/parallel/detail/untracked_pair.hpp | 85 + .../boost/graph/parallel/distribution.hpp | 614 + .../boost/graph/parallel/process_group.hpp | 101 + .../boost/graph/parallel/properties.hpp | 111 + .../boost/graph/parallel/simple_trigger.hpp | 108 + .../boost/graph/planar_canonical_ordering.hpp | 214 + .../graph/planar_detail/add_edge_visitors.hpp | 59 + .../planar_detail/boyer_myrvold_impl.hpp | 2012 ++ .../boost/graph/planar_detail/bucket_sort.hpp | 144 + .../graph/planar_detail/face_handles.hpp | 497 + .../graph/planar_detail/face_iterators.hpp | 375 + .../boost/graph/planar_face_traversal.hpp | 210 + .../include/boost/graph/plod_generator.hpp | 253 + .../include/boost/graph/point_traits.hpp | 26 + .../graph/prim_minimum_spanning_tree.hpp | 91 + .../include/boost/graph/profile.hpp | 43 + .../include/boost/graph/properties.hpp | 511 + .../boost/graph/property_iter_range.hpp | 118 + .../property_maps/constant_property_map.hpp | 59 + .../property_maps/container_property_map.hpp | 75 + .../property_maps/matrix_property_map.hpp | 67 + .../graph/property_maps/null_property_map.hpp | 41 + .../boost/graph/push_relabel_max_flow.hpp | 746 + .../boost/graph/r_c_shortest_paths.hpp | 733 + .../include/boost/graph/random.hpp | 266 + .../include/boost/graph/random_layout.hpp | 36 + .../boost/graph/random_spanning_tree.hpp | 109 + .../include/boost/graph/read_dimacs.hpp | 312 + .../include/boost/graph/relax.hpp | 79 + .../include/boost/graph/reverse_graph.hpp | 359 + .../boost/graph/rmat_graph_generator.hpp | 594 + .../graph/sequential_vertex_coloring.hpp | 124 + .../include/boost/graph/simple_point.hpp | 23 + .../include/boost/graph/sloan_ordering.hpp | 447 + .../boost/graph/small_world_generator.hpp | 114 + .../boost/graph/smallest_last_ordering.hpp | 140 + .../boost/graph/ssca_graph_generator.hpp | 169 + .../include/boost/graph/st_connected.hpp | 82 + .../include/boost/graph/stanford_graph.hpp | 565 + .../boost/graph/stoer_wagner_min_cut.hpp | 240 + .../include/boost/graph/strong_components.hpp | 341 + .../include/boost/graph/subgraph.hpp | 1243 + .../boost/graph/tiernan_all_cycles.hpp | 376 + .../include/boost/graph/topological_sort.hpp | 77 + .../include/boost/graph/topology.hpp | 598 + .../boost/graph/transitive_closure.hpp | 370 + .../boost/graph/transitive_reduction.hpp | 130 + .../include/boost/graph/transpose_graph.hpp | 40 + .../include/boost/graph/tree_traits.hpp | 43 + .../include/boost/graph/two_bit_color_map.hpp | 108 + .../include/boost/graph/undirected_dfs.hpp | 250 + .../include/boost/graph/undirected_graph.hpp | 698 + .../include/boost/graph/use_mpi.hpp | 15 + .../include/boost/graph/vector_as_graph.hpp | 332 + .../boost/graph/vertex_and_edge_range.hpp | 141 + .../include/boost/graph/visitors.hpp | 320 + .../include/boost/graph/wavefront.hpp | 135 + .../include/boost/graph/write_dimacs.hpp | 72 + .../include/boost/implicit_cast.hpp | 29 + .../include/boost/indirect_reference.hpp | 43 + .../boost-1.45.0/include/boost/integer.hpp | 257 + .../include/boost/integer/integer_mask.hpp | 126 + .../include/boost/integer/static_log2.hpp | 127 + .../include/boost/integer/static_min_max.hpp | 51 + .../include/boost/integer_fwd.hpp | 164 + .../include/boost/integer_traits.hpp | 261 + .../include/boost/intrusive/any_hook.hpp | 344 + .../include/boost/intrusive/avl_set.hpp | 2324 ++ .../include/boost/intrusive/avl_set_hook.hpp | 297 + .../include/boost/intrusive/avltree.hpp | 1647 ++ .../boost/intrusive/avltree_algorithms.hpp | 943 + .../include/boost/intrusive/bs_set_hook.hpp | 296 + .../intrusive/circular_list_algorithms.hpp | 407 + .../intrusive/circular_slist_algorithms.hpp | 405 + .../intrusive/derivation_value_traits.hpp | 67 + .../detail/any_node_and_algorithms.hpp | 300 + .../include/boost/intrusive/detail/assert.hpp | 41 + .../boost/intrusive/detail/avltree_node.hpp | 179 + .../detail/clear_on_destructor_base.hpp | 36 + .../detail/common_slist_algorithms.hpp | 103 + .../boost/intrusive/detail/config_begin.hpp | 52 + .../boost/intrusive/detail/config_end.hpp | 15 + .../intrusive/detail/ebo_functor_holder.hpp | 95 + .../intrusive/detail/function_detector.hpp | 87 + .../boost/intrusive/detail/generic_hook.hpp | 203 + .../boost/intrusive/detail/hashtable_node.hpp | 216 + .../detail/is_stateful_value_traits.hpp | 77 + .../boost/intrusive/detail/list_node.hpp | 188 + .../include/boost/intrusive/detail/mpl.hpp | 370 + .../intrusive/detail/parent_from_member.hpp | 69 + .../intrusive/detail/pointer_to_other.hpp | 65 + .../boost/intrusive/detail/rbtree_node.hpp | 177 + .../boost/intrusive/detail/slist_node.hpp | 163 + .../intrusive/detail/transform_iterator.hpp | 173 + .../intrusive/detail/tree_algorithms.hpp | 1693 ++ .../boost/intrusive/detail/tree_node.hpp | 190 + .../boost/intrusive/detail/utilities.hpp | 740 + .../boost/intrusive/detail/workaround.hpp | 30 + .../include/boost/intrusive/hashtable.hpp | 3020 +++ .../include/boost/intrusive/intrusive_fwd.hpp | 542 + .../intrusive/linear_slist_algorithms.hpp | 327 + .../include/boost/intrusive/link_mode.hpp | 46 + .../include/boost/intrusive/list.hpp | 1504 ++ .../include/boost/intrusive/list_hook.hpp | 290 + .../boost/intrusive/member_value_traits.hpp | 65 + .../include/boost/intrusive/options.hpp | 812 + .../boost/intrusive/parent_from_member.hpp | 42 + .../boost/intrusive/pointer_plus_bits.hpp | 82 + .../boost/intrusive/priority_compare.hpp | 39 + .../include/boost/intrusive/rbtree.hpp | 1656 ++ .../boost/intrusive/rbtree_algorithms.hpp | 909 + .../include/boost/intrusive/set.hpp | 2352 ++ .../include/boost/intrusive/set_hook.hpp | 300 + .../include/boost/intrusive/sg_set.hpp | 2397 ++ .../include/boost/intrusive/sgtree.hpp | 1876 ++ .../boost/intrusive/sgtree_algorithms.hpp | 783 + .../include/boost/intrusive/slist.hpp | 2115 ++ .../include/boost/intrusive/slist_hook.hpp | 294 + .../include/boost/intrusive/splay_set.hpp | 2369 ++ .../boost/intrusive/splay_set_hook.hpp | 292 + .../include/boost/intrusive/splaytree.hpp | 1651 ++ .../boost/intrusive/splaytree_algorithms.hpp | 976 + .../include/boost/intrusive/treap.hpp | 1746 ++ .../boost/intrusive/treap_algorithms.hpp | 894 + .../include/boost/intrusive/treap_set.hpp | 2547 ++ .../boost/intrusive/trivial_value_traits.hpp | 43 + .../include/boost/intrusive/unordered_set.hpp | 2084 ++ .../boost/intrusive/unordered_set_hook.hpp | 433 + .../include/boost/intrusive_ptr.hpp | 18 + .../include/boost/io/detail/quoted_manip.hpp | 190 + .../include/boost/io/ios_state.hpp | 439 + .../boost-1.45.0/include/boost/io_fwd.hpp | 67 + .../include/boost/iostreams/categories.hpp | 175 + .../include/boost/iostreams/chain.hpp | 594 + .../include/boost/iostreams/char_traits.hpp | 73 + .../boost/iostreams/checked_operations.hpp | 158 + .../include/boost/iostreams/close.hpp | 259 + .../boost/iostreams/code_converter.hpp | 424 + .../include/boost/iostreams/combine.hpp | 260 + .../include/boost/iostreams/compose.hpp | 494 + .../include/boost/iostreams/concepts.hpp | 129 + .../include/boost/iostreams/constants.hpp | 42 + .../include/boost/iostreams/copy.hpp | 252 + .../boost/iostreams/detail/absolute_path.hpp | 46 + .../boost/iostreams/detail/access_control.hpp | 87 + .../detail/adapter/concept_adapter.hpp | 284 + .../detail/adapter/device_adapter.hpp | 67 + .../detail/adapter/direct_adapter.hpp | 281 + .../detail/adapter/filter_adapter.hpp | 69 + .../iostreams/detail/adapter/mode_adapter.hpp | 123 + .../detail/adapter/non_blocking_adapter.hpp | 59 + .../adapter/output_iterator_adapter.hpp | 41 + .../detail/adapter/range_adapter.hpp | 187 + .../boost/iostreams/detail/add_facet.hpp | 49 + .../boost/iostreams/detail/bool_trait_def.hpp | 49 + .../broken_overload_resolution/forward.hpp | 31 + .../broken_overload_resolution/stream.hpp | 184 + .../stream_buffer.hpp | 189 + .../include/boost/iostreams/detail/buffer.hpp | 200 + .../boost/iostreams/detail/call_traits.hpp | 32 + .../boost/iostreams/detail/char_traits.hpp | 63 + .../boost/iostreams/detail/codecvt_helper.hpp | 237 + .../boost/iostreams/detail/codecvt_holder.hpp | 63 + .../iostreams/detail/config/auto_link.hpp | 49 + .../boost/iostreams/detail/config/bzip2.hpp | 48 + .../boost/iostreams/detail/config/codecvt.hpp | 80 + .../detail/config/disable_warnings.hpp | 30 + .../iostreams/detail/config/dyn_link.hpp | 37 + .../detail/config/enable_warnings.hpp | 18 + .../boost/iostreams/detail/config/fpos.hpp | 31 + .../boost/iostreams/detail/config/gcc.hpp | 24 + .../boost/iostreams/detail/config/limits.hpp | 19 + .../detail/config/overload_resolution.hpp | 32 + .../boost/iostreams/detail/config/rtl.hpp | 72 + .../detail/config/unreachable_return.hpp | 25 + .../iostreams/detail/config/wide_streams.hpp | 55 + .../iostreams/detail/config/windows_posix.hpp | 25 + .../boost/iostreams/detail/config/zlib.hpp | 50 + .../boost/iostreams/detail/counted_array.hpp | 64 + .../iostreams/detail/current_directory.hpp | 65 + .../boost/iostreams/detail/default_arg.hpp | 25 + .../boost/iostreams/detail/dispatch.hpp | 41 + .../boost/iostreams/detail/double_object.hpp | 114 + .../iostreams/detail/enable_if_stream.hpp | 32 + .../include/boost/iostreams/detail/error.hpp | 45 + .../boost/iostreams/detail/execute.hpp | 135 + .../boost/iostreams/detail/file_handle.hpp | 32 + .../boost/iostreams/detail/forward.hpp | 124 + .../boost/iostreams/detail/fstream.hpp | 33 + .../boost/iostreams/detail/functional.hpp | 189 + .../include/boost/iostreams/detail/ios.hpp | 66 + .../boost/iostreams/detail/iostream.hpp | 34 + .../iostreams/detail/is_dereferenceable.hpp | 85 + .../iostreams/detail/is_iterator_range.hpp | 49 + .../boost/iostreams/detail/newline.hpp | 32 + .../boost/iostreams/detail/optional.hpp | 114 + .../boost/iostreams/detail/param_type.hpp | 27 + .../include/boost/iostreams/detail/path.hpp | 189 + .../include/boost/iostreams/detail/push.hpp | 154 + .../boost/iostreams/detail/push_params.hpp | 21 + .../boost/iostreams/detail/resolve.hpp | 235 + .../boost/iostreams/detail/restrict_impl.hpp | 482 + .../include/boost/iostreams/detail/select.hpp | 86 + .../boost/iostreams/detail/select_by_size.hpp | 160 + .../boost/iostreams/detail/streambuf.hpp | 34 + .../iostreams/detail/streambuf/chainbuf.hpp | 116 + .../detail/streambuf/direct_streambuf.hpp | 313 + .../detail/streambuf/indirect_streambuf.hpp | 432 + .../detail/streambuf/linked_streambuf.hpp | 114 + .../boost/iostreams/detail/system_failure.hpp | 84 + .../iostreams/detail/template_params.hpp | 26 + .../iostreams/detail/translate_int_type.hpp | 62 + .../boost/iostreams/detail/vc6/close.hpp | 129 + .../boost/iostreams/detail/vc6/read.hpp | 238 + .../boost/iostreams/detail/vc6/write.hpp | 159 + .../boost/iostreams/detail/wrap_unwrap.hpp | 127 + .../include/boost/iostreams/device/array.hpp | 144 + .../boost/iostreams/device/back_inserter.hpp | 41 + .../include/boost/iostreams/device/file.hpp | 191 + .../iostreams/device/file_descriptor.hpp | 318 + .../boost/iostreams/device/mapped_file.hpp | 599 + .../include/boost/iostreams/device/null.hpp | 66 + .../boost/iostreams/filter/aggregate.hpp | 168 + .../include/boost/iostreams/filter/bzip2.hpp | 414 + .../boost/iostreams/filter/counter.hpp | 82 + .../include/boost/iostreams/filter/grep.hpp | 109 + .../include/boost/iostreams/filter/gzip.hpp | 757 + .../include/boost/iostreams/filter/line.hpp | 227 + .../boost/iostreams/filter/newline.hpp | 442 + .../include/boost/iostreams/filter/regex.hpp | 98 + .../include/boost/iostreams/filter/stdio.hpp | 84 + .../boost/iostreams/filter/symmetric.hpp | 310 + .../include/boost/iostreams/filter/test.hpp | 322 + .../include/boost/iostreams/filter/zlib.hpp | 427 + .../boost/iostreams/filtering_stream.hpp | 166 + .../boost/iostreams/filtering_streambuf.hpp | 70 + .../include/boost/iostreams/flush.hpp | 125 + .../include/boost/iostreams/get.hpp | 17 + .../include/boost/iostreams/imbue.hpp | 82 + .../boost/iostreams/input_sequence.hpp | 72 + .../include/boost/iostreams/invert.hpp | 167 + .../include/boost/iostreams/operations.hpp | 26 + .../boost/iostreams/operations_fwd.hpp | 41 + .../boost/iostreams/optimal_buffer_size.hpp | 87 + .../boost/iostreams/output_sequence.hpp | 72 + .../include/boost/iostreams/pipeline.hpp | 128 + .../include/boost/iostreams/positioning.hpp | 117 + .../include/boost/iostreams/put.hpp | 17 + .../include/boost/iostreams/putback.hpp | 17 + .../include/boost/iostreams/read.hpp | 247 + .../include/boost/iostreams/restrict.hpp | 26 + .../include/boost/iostreams/seek.hpp | 180 + .../include/boost/iostreams/skip.hpp | 112 + .../include/boost/iostreams/slice.hpp | 28 + .../include/boost/iostreams/stream.hpp | 151 + .../include/boost/iostreams/stream_buffer.hpp | 116 + .../include/boost/iostreams/tee.hpp | 216 + .../include/boost/iostreams/traits.hpp | 391 + .../include/boost/iostreams/traits_fwd.hpp | 111 + .../include/boost/iostreams/write.hpp | 171 + .../include/boost/is_placeholder.hpp | 31 + .../boost-1.45.0/include/boost/iterator.hpp | 59 + .../boost/iterator/counting_iterator.hpp | 215 + .../iterator/detail/any_conversion_eater.hpp | 19 + .../boost/iterator/detail/config_def.hpp | 137 + .../boost/iterator/detail/config_undef.hpp | 25 + .../boost/iterator/detail/enable_if.hpp | 86 + .../detail/facade_iterator_category.hpp | 200 + .../iterator/detail/minimum_category.hpp | 116 + .../boost/iterator/filter_iterator.hpp | 135 + .../boost/iterator/indirect_iterator.hpp | 139 + .../include/boost/iterator/interoperable.hpp | 50 + .../boost/iterator/is_lvalue_iterator.hpp | 150 + .../boost/iterator/is_readable_iterator.hpp | 108 + .../boost/iterator/iterator_adaptor.hpp | 371 + .../boost/iterator/iterator_archetypes.hpp | 515 + .../boost/iterator/iterator_categories.hpp | 188 + .../boost/iterator/iterator_concepts.hpp | 284 + .../boost/iterator/iterator_facade.hpp | 878 + .../boost/iterator/iterator_traits.hpp | 92 + .../boost/iterator/new_iterator_tests.hpp | 264 + .../boost/iterator/permutation_iterator.hpp | 72 + .../boost/iterator/reverse_iterator.hpp | 69 + .../boost/iterator/transform_iterator.hpp | 187 + .../include/boost/iterator/zip_iterator.hpp | 585 + .../include/boost/iterator_adaptors.hpp | 13 + .../include/boost/lambda/algorithm.hpp | 1377 ++ .../include/boost/lambda/bind.hpp | 19 + .../include/boost/lambda/casts.hpp | 226 + .../include/boost/lambda/closures.hpp | 274 + .../include/boost/lambda/construct.hpp | 240 + .../boost/lambda/control_structures.hpp | 23 + .../include/boost/lambda/core.hpp | 79 + .../include/boost/lambda/detail/actions.hpp | 174 + .../boost/lambda/detail/arity_code.hpp | 110 + .../boost/lambda/detail/bind_functions.hpp | 1879 ++ .../detail/control_constructs_common.hpp | 50 + .../boost/lambda/detail/function_adaptors.hpp | 782 + .../boost/lambda/detail/is_instance_of.hpp | 104 + .../boost/lambda/detail/lambda_config.hpp | 48 + .../lambda/detail/lambda_functor_base.hpp | 615 + .../boost/lambda/detail/lambda_functors.hpp | 324 + .../boost/lambda/detail/lambda_fwd.hpp | 74 + .../boost/lambda/detail/lambda_traits.hpp | 578 + .../boost/lambda/detail/member_ptr.hpp | 737 + .../boost/lambda/detail/operator_actions.hpp | 139 + .../detail/operator_lambda_func_base.hpp | 271 + .../detail/operator_return_type_traits.hpp | 917 + .../include/boost/lambda/detail/operators.hpp | 370 + .../include/boost/lambda/detail/ret.hpp | 325 + .../lambda/detail/return_type_traits.hpp | 282 + .../boost/lambda/detail/select_functions.hpp | 74 + .../boost/lambda/detail/suppress_unused.hpp | 27 + .../include/boost/lambda/exceptions.hpp | 1741 ++ .../boost-1.45.0/include/boost/lambda/if.hpp | 462 + .../include/boost/lambda/lambda.hpp | 34 + .../include/boost/lambda/loops.hpp | 505 + .../include/boost/lambda/numeric.hpp | 119 + .../include/boost/lambda/switch.hpp | 508 + .../boost-1.45.0/include/boost/last_value.hpp | 54 + .../include/boost/lexical_cast.hpp | 1213 + .../boost-1.45.0/include/boost/limits.hpp | 146 + .../include/boost/make_shared.hpp | 17 + .../math/bindings/detail/big_digamma.hpp | 294 + .../math/bindings/detail/big_lanczos.hpp | 887 + .../include/boost/math/bindings/mpfr.hpp | 850 + .../include/boost/math/bindings/rr.hpp | 873 + .../include/boost/math/common_factor.hpp | 16 + .../include/boost/math/common_factor_ct.hpp | 180 + .../include/boost/math/common_factor_rt.hpp | 523 + .../include/boost/math/complex.hpp | 32 + .../include/boost/math/complex/acos.hpp | 235 + .../include/boost/math/complex/acosh.hpp | 34 + .../include/boost/math/complex/asin.hpp | 245 + .../include/boost/math/complex/asinh.hpp | 32 + .../include/boost/math/complex/atan.hpp | 36 + .../include/boost/math/complex/atanh.hpp | 245 + .../include/boost/math/complex/details.hpp | 104 + .../include/boost/math/complex/fabs.hpp | 23 + .../boost/math/concepts/distributions.hpp | 206 + .../boost/math/concepts/real_concept.hpp | 441 + .../boost/math/concepts/real_type_concept.hpp | 109 + .../boost/math/concepts/std_real_concept.hpp | 386 + .../boost/math/constants/constants.hpp | 75 + .../include/boost/math/distributions.hpp | 48 + .../boost/math/distributions/bernoulli.hpp | 325 + .../include/boost/math/distributions/beta.hpp | 544 + .../boost/math/distributions/binomial.hpp | 724 + .../boost/math/distributions/cauchy.hpp | 347 + .../boost/math/distributions/chi_squared.hpp | 347 + .../boost/math/distributions/complement.hpp | 195 + .../detail/common_error_handling.hpp | 157 + .../detail/derived_accessors.hpp | 163 + .../distributions/detail/generic_mode.hpp | 149 + .../distributions/detail/generic_quantile.hpp | 91 + .../detail/hypergeometric_cdf.hpp | 100 + .../detail/hypergeometric_pdf.hpp | 432 + .../detail/hypergeometric_quantile.hpp | 199 + .../detail/inv_discrete_quantile.hpp | 481 + .../boost/math/distributions/exponential.hpp | 261 + .../math/distributions/extreme_value.hpp | 260 + .../math/distributions/find_location.hpp | 146 + .../boost/math/distributions/find_scale.hpp | 211 + .../boost/math/distributions/fisher_f.hpp | 387 + .../include/boost/math/distributions/fwd.hpp | 130 + .../boost/math/distributions/gamma.hpp | 349 + .../math/distributions/hypergeometric.hpp | 290 + .../distributions/inverse_chi_squared.hpp | 391 + .../math/distributions/inverse_gamma.hpp | 458 + .../boost/math/distributions/laplace.hpp | 302 + .../boost/math/distributions/logistic.hpp | 287 + .../boost/math/distributions/lognormal.hpp | 310 + .../math/distributions/negative_binomial.hpp | 588 + .../math/distributions/non_central_beta.hpp | 842 + .../distributions/non_central_chi_squared.hpp | 963 + .../math/distributions/non_central_f.hpp | 409 + .../math/distributions/non_central_t.hpp | 1065 + .../boost/math/distributions/normal.hpp | 308 + .../boost/math/distributions/pareto.hpp | 444 + .../boost/math/distributions/poisson.hpp | 588 + .../boost/math/distributions/rayleigh.hpp | 293 + .../boost/math/distributions/students_t.hpp | 374 + .../boost/math/distributions/triangular.hpp | 523 + .../boost/math/distributions/uniform.hpp | 379 + .../boost/math/distributions/weibull.hpp | 387 + .../include/boost/math/octonion.hpp | 4754 ++++ .../boost/math/policies/error_handling.hpp | 653 + .../include/boost/math/policies/policy.hpp | 955 + .../include/boost/math/quaternion.hpp | 1924 ++ .../include/boost/math/special_functions.hpp | 59 + .../boost/math/special_functions/acosh.hpp | 114 + .../boost/math/special_functions/asinh.hpp | 116 + .../boost/math/special_functions/atanh.hpp | 128 + .../boost/math/special_functions/bessel.hpp | 508 + .../boost/math/special_functions/beta.hpp | 1445 ++ .../boost/math/special_functions/binomial.hpp | 81 + .../boost/math/special_functions/cbrt.hpp | 178 + .../boost/math/special_functions/cos_pi.hpp | 68 + .../special_functions/detail/bessel_i0.hpp | 101 + .../special_functions/detail/bessel_i1.hpp | 104 + .../special_functions/detail/bessel_ik.hpp | 337 + .../special_functions/detail/bessel_j0.hpp | 152 + .../special_functions/detail/bessel_j1.hpp | 157 + .../special_functions/detail/bessel_jn.hpp | 103 + .../special_functions/detail/bessel_jy.hpp | 447 + .../detail/bessel_jy_asym.hpp | 302 + .../special_functions/detail/bessel_k0.hpp | 121 + .../special_functions/detail/bessel_k1.hpp | 117 + .../special_functions/detail/bessel_kn.hpp | 74 + .../special_functions/detail/bessel_y0.hpp | 182 + .../special_functions/detail/bessel_y1.hpp | 155 + .../special_functions/detail/bessel_yn.hpp | 84 + .../math/special_functions/detail/erf_inv.hpp | 471 + .../special_functions/detail/fp_traits.hpp | 569 + .../special_functions/detail/gamma_inva.hpp | 233 + .../special_functions/detail/ibeta_inv_ab.hpp | 324 + .../detail/ibeta_inverse.hpp | 941 + .../math/special_functions/detail/iconv.hpp | 41 + .../detail/igamma_inverse.hpp | 552 + .../special_functions/detail/igamma_large.hpp | 769 + .../special_functions/detail/lanczos_sse2.hpp | 201 + .../special_functions/detail/lgamma_small.hpp | 512 + .../special_functions/detail/round_fwd.hpp | 80 + .../detail/t_distribution_inv.hpp | 541 + .../detail/unchecked_factorial.hpp | 402 + .../boost/math/special_functions/digamma.hpp | 450 + .../boost/math/special_functions/ellint_1.hpp | 187 + .../boost/math/special_functions/ellint_2.hpp | 168 + .../boost/math/special_functions/ellint_3.hpp | 333 + .../math/special_functions/ellint_rc.hpp | 115 + .../math/special_functions/ellint_rd.hpp | 130 + .../math/special_functions/ellint_rf.hpp | 132 + .../math/special_functions/ellint_rj.hpp | 180 + .../boost/math/special_functions/erf.hpp | 1088 + .../boost/math/special_functions/expint.hpp | 1514 ++ .../boost/math/special_functions/expm1.hpp | 309 + .../math/special_functions/factorials.hpp | 233 + .../math/special_functions/fpclassify.hpp | 534 + .../boost/math/special_functions/gamma.hpp | 1536 ++ .../boost/math/special_functions/hermite.hpp | 76 + .../boost/math/special_functions/hypot.hpp | 86 + .../boost/math/special_functions/laguerre.hpp | 139 + .../boost/math/special_functions/lanczos.hpp | 1242 + .../boost/math/special_functions/legendre.hpp | 194 + .../boost/math/special_functions/log1p.hpp | 471 + .../boost/math/special_functions/math_fwd.hpp | 1055 + .../boost/math/special_functions/modf.hpp | 70 + .../boost/math/special_functions/next.hpp | 312 + .../boost/math/special_functions/pow.hpp | 140 + .../boost/math/special_functions/powm1.hpp | 61 + .../boost/math/special_functions/prime.hpp | 1214 + .../boost/math/special_functions/round.hpp | 92 + .../boost/math/special_functions/sign.hpp | 90 + .../boost/math/special_functions/sin_pi.hpp | 70 + .../boost/math/special_functions/sinc.hpp | 177 + .../boost/math/special_functions/sinhc.hpp | 167 + .../special_functions/spherical_harmonic.hpp | 204 + .../boost/math/special_functions/sqrt1pm1.hpp | 48 + .../boost/math/special_functions/trunc.hpp | 92 + .../boost/math/special_functions/zeta.hpp | 903 + .../include/boost/math/tools/config.hpp | 304 + .../tools/detail/polynomial_horner1_10.hpp | 84 + .../tools/detail/polynomial_horner1_11.hpp | 90 + .../tools/detail/polynomial_horner1_12.hpp | 96 + .../tools/detail/polynomial_horner1_13.hpp | 102 + .../tools/detail/polynomial_horner1_14.hpp | 108 + .../tools/detail/polynomial_horner1_15.hpp | 114 + .../tools/detail/polynomial_horner1_16.hpp | 120 + .../tools/detail/polynomial_horner1_17.hpp | 126 + .../tools/detail/polynomial_horner1_18.hpp | 132 + .../tools/detail/polynomial_horner1_19.hpp | 138 + .../tools/detail/polynomial_horner1_2.hpp | 36 + .../tools/detail/polynomial_horner1_20.hpp | 144 + .../tools/detail/polynomial_horner1_3.hpp | 42 + .../tools/detail/polynomial_horner1_4.hpp | 48 + .../tools/detail/polynomial_horner1_5.hpp | 54 + .../tools/detail/polynomial_horner1_6.hpp | 60 + .../tools/detail/polynomial_horner1_7.hpp | 66 + .../tools/detail/polynomial_horner1_8.hpp | 72 + .../tools/detail/polynomial_horner1_9.hpp | 78 + .../tools/detail/polynomial_horner2_10.hpp | 90 + .../tools/detail/polynomial_horner2_11.hpp | 97 + .../tools/detail/polynomial_horner2_12.hpp | 104 + .../tools/detail/polynomial_horner2_13.hpp | 111 + .../tools/detail/polynomial_horner2_14.hpp | 118 + .../tools/detail/polynomial_horner2_15.hpp | 125 + .../tools/detail/polynomial_horner2_16.hpp | 132 + .../tools/detail/polynomial_horner2_17.hpp | 139 + .../tools/detail/polynomial_horner2_18.hpp | 146 + .../tools/detail/polynomial_horner2_19.hpp | 153 + .../tools/detail/polynomial_horner2_2.hpp | 48 + .../tools/detail/polynomial_horner2_20.hpp | 160 + .../tools/detail/polynomial_horner2_3.hpp | 48 + .../tools/detail/polynomial_horner2_4.hpp | 48 + .../tools/detail/polynomial_horner2_5.hpp | 55 + .../tools/detail/polynomial_horner2_6.hpp | 62 + .../tools/detail/polynomial_horner2_7.hpp | 69 + .../tools/detail/polynomial_horner2_8.hpp | 76 + .../tools/detail/polynomial_horner2_9.hpp | 83 + .../tools/detail/polynomial_horner3_10.hpp | 156 + .../tools/detail/polynomial_horner3_11.hpp | 181 + .../tools/detail/polynomial_horner3_12.hpp | 208 + .../tools/detail/polynomial_horner3_13.hpp | 237 + .../tools/detail/polynomial_horner3_14.hpp | 268 + .../tools/detail/polynomial_horner3_15.hpp | 301 + .../tools/detail/polynomial_horner3_16.hpp | 336 + .../tools/detail/polynomial_horner3_17.hpp | 373 + .../tools/detail/polynomial_horner3_18.hpp | 412 + .../tools/detail/polynomial_horner3_19.hpp | 453 + .../tools/detail/polynomial_horner3_2.hpp | 48 + .../tools/detail/polynomial_horner3_20.hpp | 496 + .../tools/detail/polynomial_horner3_3.hpp | 48 + .../tools/detail/polynomial_horner3_4.hpp | 48 + .../tools/detail/polynomial_horner3_5.hpp | 61 + .../tools/detail/polynomial_horner3_6.hpp | 76 + .../tools/detail/polynomial_horner3_7.hpp | 93 + .../tools/detail/polynomial_horner3_8.hpp | 112 + .../tools/detail/polynomial_horner3_9.hpp | 133 + .../math/tools/detail/rational_horner1_10.hpp | 138 + .../math/tools/detail/rational_horner1_11.hpp | 150 + .../math/tools/detail/rational_horner1_12.hpp | 162 + .../math/tools/detail/rational_horner1_13.hpp | 174 + .../math/tools/detail/rational_horner1_14.hpp | 186 + .../math/tools/detail/rational_horner1_15.hpp | 198 + .../math/tools/detail/rational_horner1_16.hpp | 210 + .../math/tools/detail/rational_horner1_17.hpp | 222 + .../math/tools/detail/rational_horner1_18.hpp | 234 + .../math/tools/detail/rational_horner1_19.hpp | 246 + .../math/tools/detail/rational_horner1_2.hpp | 42 + .../math/tools/detail/rational_horner1_20.hpp | 258 + .../math/tools/detail/rational_horner1_3.hpp | 54 + .../math/tools/detail/rational_horner1_4.hpp | 66 + .../math/tools/detail/rational_horner1_5.hpp | 78 + .../math/tools/detail/rational_horner1_6.hpp | 90 + .../math/tools/detail/rational_horner1_7.hpp | 102 + .../math/tools/detail/rational_horner1_8.hpp | 114 + .../math/tools/detail/rational_horner1_9.hpp | 126 + .../math/tools/detail/rational_horner2_10.hpp | 144 + .../math/tools/detail/rational_horner2_11.hpp | 160 + .../math/tools/detail/rational_horner2_12.hpp | 176 + .../math/tools/detail/rational_horner2_13.hpp | 192 + .../math/tools/detail/rational_horner2_14.hpp | 208 + .../math/tools/detail/rational_horner2_15.hpp | 224 + .../math/tools/detail/rational_horner2_16.hpp | 240 + .../math/tools/detail/rational_horner2_17.hpp | 256 + .../math/tools/detail/rational_horner2_18.hpp | 272 + .../math/tools/detail/rational_horner2_19.hpp | 288 + .../math/tools/detail/rational_horner2_2.hpp | 48 + .../math/tools/detail/rational_horner2_20.hpp | 304 + .../math/tools/detail/rational_horner2_3.hpp | 48 + .../math/tools/detail/rational_horner2_4.hpp | 48 + .../math/tools/detail/rational_horner2_5.hpp | 64 + .../math/tools/detail/rational_horner2_6.hpp | 80 + .../math/tools/detail/rational_horner2_7.hpp | 96 + .../math/tools/detail/rational_horner2_8.hpp | 112 + .../math/tools/detail/rational_horner2_9.hpp | 128 + .../math/tools/detail/rational_horner3_10.hpp | 396 + .../math/tools/detail/rational_horner3_11.hpp | 482 + .../math/tools/detail/rational_horner3_12.hpp | 576 + .../math/tools/detail/rational_horner3_13.hpp | 678 + .../math/tools/detail/rational_horner3_14.hpp | 788 + .../math/tools/detail/rational_horner3_15.hpp | 906 + .../math/tools/detail/rational_horner3_16.hpp | 1032 + .../math/tools/detail/rational_horner3_17.hpp | 1166 + .../math/tools/detail/rational_horner3_18.hpp | 1308 ++ .../math/tools/detail/rational_horner3_19.hpp | 1458 ++ .../math/tools/detail/rational_horner3_2.hpp | 48 + .../math/tools/detail/rational_horner3_20.hpp | 1616 ++ .../math/tools/detail/rational_horner3_3.hpp | 48 + .../math/tools/detail/rational_horner3_4.hpp | 48 + .../math/tools/detail/rational_horner3_5.hpp | 86 + .../math/tools/detail/rational_horner3_6.hpp | 132 + .../math/tools/detail/rational_horner3_7.hpp | 186 + .../math/tools/detail/rational_horner3_8.hpp | 248 + .../math/tools/detail/rational_horner3_9.hpp | 318 + .../include/boost/math/tools/fraction.hpp | 252 + .../include/boost/math/tools/minima.hpp | 152 + .../include/boost/math/tools/polynomial.hpp | 323 + .../include/boost/math/tools/precision.hpp | 322 + .../include/boost/math/tools/promotion.hpp | 149 + .../include/boost/math/tools/rational.hpp | 333 + .../include/boost/math/tools/real_cast.hpp | 29 + .../include/boost/math/tools/remez.hpp | 667 + .../include/boost/math/tools/roots.hpp | 532 + .../include/boost/math/tools/series.hpp | 158 + .../include/boost/math/tools/solve.hpp | 79 + .../include/boost/math/tools/stats.hpp | 88 + .../include/boost/math/tools/test.hpp | 257 + .../include/boost/math/tools/test_data.hpp | 767 + .../boost/math/tools/toms748_solve.hpp | 584 + .../include/boost/math/tools/traits.hpp | 111 + .../include/boost/math/tools/tuple.hpp | 112 + .../include/boost/math/tools/user.hpp | 97 + .../include/boost/math/tools/workaround.hpp | 38 + .../boost-1.45.0/include/boost/math/tr1.hpp | 865 + .../boost-1.45.0/include/boost/math_fwd.hpp | 108 + .../boost-1.45.0/include/boost/mem_fn.hpp | 24 + .../include/boost/memory_order.hpp | 53 + .../boost-1.45.0/include/boost/mpi.hpp | 35 + .../include/boost/mpl/O1_size.hpp | 40 + .../include/boost/mpl/O1_size_fwd.hpp | 24 + .../include/boost/mpl/accumulate.hpp | 39 + .../include/boost/mpl/advance.hpp | 76 + .../include/boost/mpl/advance_fwd.hpp | 28 + .../boost-1.45.0/include/boost/mpl/alias.hpp | 21 + .../boost-1.45.0/include/boost/mpl/always.hpp | 39 + .../boost-1.45.0/include/boost/mpl/and.hpp | 60 + .../boost-1.45.0/include/boost/mpl/apply.hpp | 229 + .../include/boost/mpl/apply_fwd.hpp | 107 + .../include/boost/mpl/apply_wrap.hpp | 234 + .../boost-1.45.0/include/boost/mpl/arg.hpp | 131 + .../include/boost/mpl/arg_fwd.hpp | 28 + .../include/boost/mpl/arithmetic.hpp | 25 + .../include/boost/mpl/as_sequence.hpp | 38 + .../boost-1.45.0/include/boost/mpl/assert.hpp | 370 + .../boost-1.45.0/include/boost/mpl/at.hpp | 52 + .../boost-1.45.0/include/boost/mpl/at_fwd.hpp | 24 + .../include/boost/mpl/aux_/O1_size_impl.hpp | 87 + .../include/boost/mpl/aux_/adl_barrier.hpp | 48 + .../boost/mpl/aux_/advance_backward.hpp | 128 + .../boost/mpl/aux_/advance_forward.hpp | 127 + .../include/boost/mpl/aux_/apply_1st.hpp | 35 + .../include/boost/mpl/aux_/arg_typedef.hpp | 31 + .../include/boost/mpl/aux_/arithmetic_op.hpp | 92 + .../include/boost/mpl/aux_/arity.hpp | 39 + .../include/boost/mpl/aux_/arity_spec.hpp | 67 + .../include/boost/mpl/aux_/at_impl.hpp | 45 + .../include/boost/mpl/aux_/back_impl.hpp | 43 + .../include/boost/mpl/aux_/basic_bind.hpp | 21 + .../include/boost/mpl/aux_/begin_end_impl.hpp | 101 + .../include/boost/mpl/aux_/clear_impl.hpp | 35 + .../boost/mpl/aux_/common_name_wknd.hpp | 34 + .../include/boost/mpl/aux_/comparison_op.hpp | 83 + .../include/boost/mpl/aux_/config/adl.hpp | 40 + .../include/boost/mpl/aux_/config/arrays.hpp | 30 + .../include/boost/mpl/aux_/config/bcc.hpp | 28 + .../include/boost/mpl/aux_/config/bind.hpp | 33 + .../boost/mpl/aux_/config/compiler.hpp | 66 + .../include/boost/mpl/aux_/config/ctps.hpp | 30 + .../boost/mpl/aux_/config/dependent_nttp.hpp | 35 + .../mpl/aux_/config/dmc_ambiguous_ctps.hpp | 27 + .../include/boost/mpl/aux_/config/dtp.hpp | 46 + .../include/boost/mpl/aux_/config/eti.hpp | 47 + .../boost/mpl/aux_/config/forwarding.hpp | 27 + .../include/boost/mpl/aux_/config/gcc.hpp | 23 + .../boost/mpl/aux_/config/has_apply.hpp | 32 + .../include/boost/mpl/aux_/config/has_xxx.hpp | 34 + .../boost/mpl/aux_/config/integral.hpp | 38 + .../include/boost/mpl/aux_/config/intel.hpp | 21 + .../include/boost/mpl/aux_/config/lambda.hpp | 32 + .../include/boost/mpl/aux_/config/msvc.hpp | 21 + .../boost/mpl/aux_/config/msvc_typename.hpp | 26 + .../include/boost/mpl/aux_/config/nttp.hpp | 41 + .../boost/mpl/aux_/config/operators.hpp | 33 + .../mpl/aux_/config/overload_resolution.hpp | 29 + .../boost/mpl/aux_/config/pp_counter.hpp | 26 + .../boost/mpl/aux_/config/preprocessor.hpp | 39 + .../boost/mpl/aux_/config/static_constant.hpp | 25 + .../include/boost/mpl/aux_/config/ttp.hpp | 41 + .../include/boost/mpl/aux_/config/typeof.hpp | 38 + .../mpl/aux_/config/use_preprocessed.hpp | 19 + .../boost/mpl/aux_/config/workaround.hpp | 19 + .../include/boost/mpl/aux_/contains_impl.hpp | 61 + .../include/boost/mpl/aux_/count_args.hpp | 105 + .../include/boost/mpl/aux_/count_impl.hpp | 44 + .../include/boost/mpl/aux_/empty_impl.hpp | 43 + .../include/boost/mpl/aux_/erase_impl.hpp | 69 + .../include/boost/mpl/aux_/erase_key_impl.hpp | 32 + .../include/boost/mpl/aux_/filter_iter.hpp | 140 + .../include/boost/mpl/aux_/find_if_pred.hpp | 31 + .../include/boost/mpl/aux_/fold_impl.hpp | 43 + .../include/boost/mpl/aux_/fold_impl_body.hpp | 365 + .../include/boost/mpl/aux_/fold_op.hpp | 37 + .../include/boost/mpl/aux_/fold_pred.hpp | 37 + .../include/boost/mpl/aux_/front_impl.hpp | 41 + .../include/boost/mpl/aux_/full_lambda.hpp | 354 + .../include/boost/mpl/aux_/has_apply.hpp | 32 + .../include/boost/mpl/aux_/has_begin.hpp | 23 + .../include/boost/mpl/aux_/has_key_impl.hpp | 34 + .../include/boost/mpl/aux_/has_rebind.hpp | 99 + .../include/boost/mpl/aux_/has_size.hpp | 23 + .../include/boost/mpl/aux_/has_tag.hpp | 23 + .../include/boost/mpl/aux_/has_type.hpp | 23 + .../boost/mpl/aux_/include_preprocessed.hpp | 42 + .../include/boost/mpl/aux_/insert_impl.hpp | 68 + .../boost/mpl/aux_/insert_range_impl.hpp | 77 + .../boost/mpl/aux_/inserter_algorithm.hpp | 159 + .../boost/mpl/aux_/integral_wrapper.hpp | 93 + .../boost/mpl/aux_/is_msvc_eti_arg.hpp | 64 + .../include/boost/mpl/aux_/iter_apply.hpp | 47 + .../boost/mpl/aux_/iter_fold_if_impl.hpp | 210 + .../include/boost/mpl/aux_/iter_fold_impl.hpp | 42 + .../boost/mpl/aux_/iter_push_front.hpp | 36 + .../include/boost/mpl/aux_/joint_iter.hpp | 120 + .../boost/mpl/aux_/lambda_arity_param.hpp | 25 + .../include/boost/mpl/aux_/lambda_no_ctps.hpp | 193 + .../include/boost/mpl/aux_/lambda_spec.hpp | 49 + .../include/boost/mpl/aux_/lambda_support.hpp | 169 + .../include/boost/mpl/aux_/largest_int.hpp | 63 + .../include/boost/mpl/aux_/logical_op.hpp | 165 + .../include/boost/mpl/aux_/msvc_dtw.hpp | 68 + .../include/boost/mpl/aux_/msvc_eti_base.hpp | 77 + .../include/boost/mpl/aux_/msvc_is_class.hpp | 58 + .../boost/mpl/aux_/msvc_never_true.hpp | 34 + .../include/boost/mpl/aux_/msvc_type.hpp | 62 + .../include/boost/mpl/aux_/na.hpp | 95 + .../include/boost/mpl/aux_/na_assert.hpp | 34 + .../include/boost/mpl/aux_/na_fwd.hpp | 31 + .../include/boost/mpl/aux_/na_spec.hpp | 175 + .../boost/mpl/aux_/nested_type_wknd.hpp | 48 + .../include/boost/mpl/aux_/nttp_decl.hpp | 35 + .../boost/mpl/aux_/numeric_cast_utils.hpp | 77 + .../include/boost/mpl/aux_/numeric_op.hpp | 315 + .../include/boost/mpl/aux_/order_impl.hpp | 76 + .../include/boost/mpl/aux_/overload_names.hpp | 48 + .../include/boost/mpl/aux_/partition_op.hpp | 58 + .../include/boost/mpl/aux_/pop_back_impl.hpp | 34 + .../include/boost/mpl/aux_/pop_front_impl.hpp | 44 + .../preprocessed/bcc/advance_backward.hpp | 97 + .../aux_/preprocessed/bcc/advance_forward.hpp | 97 + .../boost/mpl/aux_/preprocessed/bcc/and.hpp | 69 + .../boost/mpl/aux_/preprocessed/bcc/apply.hpp | 169 + .../mpl/aux_/preprocessed/bcc/apply_fwd.hpp | 52 + .../mpl/aux_/preprocessed/bcc/apply_wrap.hpp | 461 + .../boost/mpl/aux_/preprocessed/bcc/arg.hpp | 117 + .../mpl/aux_/preprocessed/bcc/basic_bind.hpp | 300 + .../boost/mpl/aux_/preprocessed/bcc/bind.hpp | 397 + .../mpl/aux_/preprocessed/bcc/bind_fwd.hpp | 46 + .../mpl/aux_/preprocessed/bcc/bitand.hpp | 147 + .../boost/mpl/aux_/preprocessed/bcc/bitor.hpp | 147 + .../mpl/aux_/preprocessed/bcc/bitxor.hpp | 147 + .../boost/mpl/aux_/preprocessed/bcc/deque.hpp | 323 + .../mpl/aux_/preprocessed/bcc/divides.hpp | 146 + .../mpl/aux_/preprocessed/bcc/equal_to.hpp | 94 + .../mpl/aux_/preprocessed/bcc/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/bcc/full_lambda.hpp | 558 + .../mpl/aux_/preprocessed/bcc/greater.hpp | 94 + .../aux_/preprocessed/bcc/greater_equal.hpp | 94 + .../mpl/aux_/preprocessed/bcc/inherit.hpp | 139 + .../preprocessed/bcc/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/bcc/iter_fold_impl.hpp | 180 + .../aux_/preprocessed/bcc/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/bcc/less.hpp | 94 + .../mpl/aux_/preprocessed/bcc/less_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc/list.hpp | 323 + .../mpl/aux_/preprocessed/bcc/list_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/bcc/map.hpp | 323 + .../boost/mpl/aux_/preprocessed/bcc/minus.hpp | 146 + .../mpl/aux_/preprocessed/bcc/modulus.hpp | 101 + .../aux_/preprocessed/bcc/not_equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc/or.hpp | 69 + .../aux_/preprocessed/bcc/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/bcc/plus.hpp | 146 + .../boost/mpl/aux_/preprocessed/bcc/quote.hpp | 119 + .../preprocessed/bcc/reverse_fold_impl.hpp | 295 + .../bcc/reverse_iter_fold_impl.hpp | 295 + .../boost/mpl/aux_/preprocessed/bcc/set.hpp | 323 + .../boost/mpl/aux_/preprocessed/bcc/set_c.hpp | 328 + .../mpl/aux_/preprocessed/bcc/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/bcc/shift_right.hpp | 99 + .../aux_/preprocessed/bcc/template_arity.hpp | 40 + .../boost/mpl/aux_/preprocessed/bcc/times.hpp | 146 + .../mpl/aux_/preprocessed/bcc/unpack_args.hpp | 97 + .../mpl/aux_/preprocessed/bcc/vector.hpp | 323 + .../mpl/aux_/preprocessed/bcc/vector_c.hpp | 309 + .../preprocessed/bcc551/advance_backward.hpp | 97 + .../preprocessed/bcc551/advance_forward.hpp | 97 + .../mpl/aux_/preprocessed/bcc551/and.hpp | 69 + .../mpl/aux_/preprocessed/bcc551/apply.hpp | 169 + .../aux_/preprocessed/bcc551/apply_fwd.hpp | 52 + .../aux_/preprocessed/bcc551/apply_wrap.hpp | 456 + .../mpl/aux_/preprocessed/bcc551/arg.hpp | 123 + .../aux_/preprocessed/bcc551/basic_bind.hpp | 306 + .../mpl/aux_/preprocessed/bcc551/bind.hpp | 403 + .../mpl/aux_/preprocessed/bcc551/bind_fwd.hpp | 46 + .../mpl/aux_/preprocessed/bcc551/bitand.hpp | 147 + .../mpl/aux_/preprocessed/bcc551/bitor.hpp | 147 + .../mpl/aux_/preprocessed/bcc551/bitxor.hpp | 147 + .../mpl/aux_/preprocessed/bcc551/deque.hpp | 323 + .../mpl/aux_/preprocessed/bcc551/divides.hpp | 146 + .../mpl/aux_/preprocessed/bcc551/equal_to.hpp | 94 + .../aux_/preprocessed/bcc551/fold_impl.hpp | 180 + .../aux_/preprocessed/bcc551/full_lambda.hpp | 558 + .../mpl/aux_/preprocessed/bcc551/greater.hpp | 94 + .../preprocessed/bcc551/greater_equal.hpp | 94 + .../mpl/aux_/preprocessed/bcc551/inherit.hpp | 141 + .../preprocessed/bcc551/iter_fold_if_impl.hpp | 133 + .../preprocessed/bcc551/iter_fold_impl.hpp | 180 + .../preprocessed/bcc551/lambda_no_ctps.hpp | 229 + .../mpl/aux_/preprocessed/bcc551/less.hpp | 94 + .../aux_/preprocessed/bcc551/less_equal.hpp | 94 + .../mpl/aux_/preprocessed/bcc551/list.hpp | 323 + .../mpl/aux_/preprocessed/bcc551/list_c.hpp | 328 + .../mpl/aux_/preprocessed/bcc551/map.hpp | 323 + .../mpl/aux_/preprocessed/bcc551/minus.hpp | 146 + .../mpl/aux_/preprocessed/bcc551/modulus.hpp | 101 + .../aux_/preprocessed/bcc551/not_equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/bcc551/or.hpp | 69 + .../aux_/preprocessed/bcc551/placeholders.hpp | 105 + .../mpl/aux_/preprocessed/bcc551/plus.hpp | 146 + .../mpl/aux_/preprocessed/bcc551/quote.hpp | 11 + .../preprocessed/bcc551/reverse_fold_impl.hpp | 295 + .../bcc551/reverse_iter_fold_impl.hpp | 295 + .../mpl/aux_/preprocessed/bcc551/set.hpp | 323 + .../mpl/aux_/preprocessed/bcc551/set_c.hpp | 328 + .../aux_/preprocessed/bcc551/shift_left.hpp | 99 + .../aux_/preprocessed/bcc551/shift_right.hpp | 99 + .../preprocessed/bcc551/template_arity.hpp | 40 + .../mpl/aux_/preprocessed/bcc551/times.hpp | 146 + .../aux_/preprocessed/bcc551/unpack_args.hpp | 97 + .../mpl/aux_/preprocessed/bcc551/vector.hpp | 323 + .../mpl/aux_/preprocessed/bcc551/vector_c.hpp | 309 + .../bcc_pre590/advance_backward.hpp | 97 + .../bcc_pre590/advance_forward.hpp | 97 + .../mpl/aux_/preprocessed/bcc_pre590/and.hpp | 69 + .../aux_/preprocessed/bcc_pre590/apply.hpp | 169 + .../preprocessed/bcc_pre590/apply_fwd.hpp | 52 + .../preprocessed/bcc_pre590/apply_wrap.hpp | 456 + .../mpl/aux_/preprocessed/bcc_pre590/arg.hpp | 117 + .../preprocessed/bcc_pre590/basic_bind.hpp | 300 + .../mpl/aux_/preprocessed/bcc_pre590/bind.hpp | 397 + .../aux_/preprocessed/bcc_pre590/bind_fwd.hpp | 46 + .../aux_/preprocessed/bcc_pre590/bitand.hpp | 147 + .../aux_/preprocessed/bcc_pre590/bitor.hpp | 147 + .../aux_/preprocessed/bcc_pre590/bitxor.hpp | 147 + .../aux_/preprocessed/bcc_pre590/deque.hpp | 323 + .../aux_/preprocessed/bcc_pre590/divides.hpp | 146 + .../aux_/preprocessed/bcc_pre590/equal_to.hpp | 94 + .../preprocessed/bcc_pre590/fold_impl.hpp | 180 + .../preprocessed/bcc_pre590/full_lambda.hpp | 558 + .../aux_/preprocessed/bcc_pre590/greater.hpp | 94 + .../preprocessed/bcc_pre590/greater_equal.hpp | 94 + .../aux_/preprocessed/bcc_pre590/inherit.hpp | 139 + .../bcc_pre590/iter_fold_if_impl.hpp | 133 + .../bcc_pre590/iter_fold_impl.hpp | 180 + .../bcc_pre590/lambda_no_ctps.hpp | 229 + .../mpl/aux_/preprocessed/bcc_pre590/less.hpp | 94 + .../preprocessed/bcc_pre590/less_equal.hpp | 94 + .../mpl/aux_/preprocessed/bcc_pre590/list.hpp | 323 + .../aux_/preprocessed/bcc_pre590/list_c.hpp | 328 + .../mpl/aux_/preprocessed/bcc_pre590/map.hpp | 323 + .../aux_/preprocessed/bcc_pre590/minus.hpp | 146 + .../aux_/preprocessed/bcc_pre590/modulus.hpp | 101 + .../preprocessed/bcc_pre590/not_equal_to.hpp | 94 + .../mpl/aux_/preprocessed/bcc_pre590/or.hpp | 69 + .../preprocessed/bcc_pre590/placeholders.hpp | 105 + .../mpl/aux_/preprocessed/bcc_pre590/plus.hpp | 146 + .../aux_/preprocessed/bcc_pre590/quote.hpp | 11 + .../bcc_pre590/reverse_fold_impl.hpp | 295 + .../bcc_pre590/reverse_iter_fold_impl.hpp | 295 + .../mpl/aux_/preprocessed/bcc_pre590/set.hpp | 323 + .../aux_/preprocessed/bcc_pre590/set_c.hpp | 328 + .../preprocessed/bcc_pre590/shift_left.hpp | 99 + .../preprocessed/bcc_pre590/shift_right.hpp | 99 + .../bcc_pre590/template_arity.hpp | 40 + .../aux_/preprocessed/bcc_pre590/times.hpp | 146 + .../preprocessed/bcc_pre590/unpack_args.hpp | 97 + .../aux_/preprocessed/bcc_pre590/vector.hpp | 323 + .../aux_/preprocessed/bcc_pre590/vector_c.hpp | 309 + .../preprocessed/dmc/advance_backward.hpp | 97 + .../aux_/preprocessed/dmc/advance_forward.hpp | 97 + .../boost/mpl/aux_/preprocessed/dmc/and.hpp | 69 + .../boost/mpl/aux_/preprocessed/dmc/apply.hpp | 169 + .../mpl/aux_/preprocessed/dmc/apply_fwd.hpp | 52 + .../mpl/aux_/preprocessed/dmc/apply_wrap.hpp | 84 + .../boost/mpl/aux_/preprocessed/dmc/arg.hpp | 123 + .../mpl/aux_/preprocessed/dmc/basic_bind.hpp | 406 + .../boost/mpl/aux_/preprocessed/dmc/bind.hpp | 515 + .../mpl/aux_/preprocessed/dmc/bind_fwd.hpp | 53 + .../mpl/aux_/preprocessed/dmc/bitand.hpp | 147 + .../boost/mpl/aux_/preprocessed/dmc/bitor.hpp | 147 + .../mpl/aux_/preprocessed/dmc/bitxor.hpp | 147 + .../boost/mpl/aux_/preprocessed/dmc/deque.hpp | 323 + .../mpl/aux_/preprocessed/dmc/divides.hpp | 146 + .../mpl/aux_/preprocessed/dmc/equal_to.hpp | 94 + .../mpl/aux_/preprocessed/dmc/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/dmc/full_lambda.hpp | 536 + .../mpl/aux_/preprocessed/dmc/greater.hpp | 94 + .../aux_/preprocessed/dmc/greater_equal.hpp | 94 + .../mpl/aux_/preprocessed/dmc/inherit.hpp | 141 + .../preprocessed/dmc/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/dmc/iter_fold_impl.hpp | 180 + .../aux_/preprocessed/dmc/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/dmc/less.hpp | 94 + .../mpl/aux_/preprocessed/dmc/less_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/dmc/list.hpp | 323 + .../mpl/aux_/preprocessed/dmc/list_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/dmc/map.hpp | 323 + .../boost/mpl/aux_/preprocessed/dmc/minus.hpp | 146 + .../mpl/aux_/preprocessed/dmc/modulus.hpp | 101 + .../aux_/preprocessed/dmc/not_equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/dmc/or.hpp | 69 + .../aux_/preprocessed/dmc/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/dmc/plus.hpp | 146 + .../boost/mpl/aux_/preprocessed/dmc/quote.hpp | 123 + .../preprocessed/dmc/reverse_fold_impl.hpp | 231 + .../dmc/reverse_iter_fold_impl.hpp | 231 + .../boost/mpl/aux_/preprocessed/dmc/set.hpp | 323 + .../boost/mpl/aux_/preprocessed/dmc/set_c.hpp | 328 + .../mpl/aux_/preprocessed/dmc/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/dmc/shift_right.hpp | 99 + .../aux_/preprocessed/dmc/template_arity.hpp | 11 + .../boost/mpl/aux_/preprocessed/dmc/times.hpp | 146 + .../mpl/aux_/preprocessed/dmc/unpack_args.hpp | 94 + .../mpl/aux_/preprocessed/dmc/vector.hpp | 323 + .../mpl/aux_/preprocessed/dmc/vector_c.hpp | 309 + .../preprocessed/gcc/advance_backward.hpp | 97 + .../aux_/preprocessed/gcc/advance_forward.hpp | 97 + .../boost/mpl/aux_/preprocessed/gcc/and.hpp | 69 + .../boost/mpl/aux_/preprocessed/gcc/apply.hpp | 169 + .../mpl/aux_/preprocessed/gcc/apply_fwd.hpp | 52 + .../mpl/aux_/preprocessed/gcc/apply_wrap.hpp | 84 + .../boost/mpl/aux_/preprocessed/gcc/arg.hpp | 123 + .../mpl/aux_/preprocessed/gcc/basic_bind.hpp | 440 + .../boost/mpl/aux_/preprocessed/gcc/bind.hpp | 561 + .../mpl/aux_/preprocessed/gcc/bind_fwd.hpp | 52 + .../mpl/aux_/preprocessed/gcc/bitand.hpp | 147 + .../boost/mpl/aux_/preprocessed/gcc/bitor.hpp | 147 + .../mpl/aux_/preprocessed/gcc/bitxor.hpp | 147 + .../boost/mpl/aux_/preprocessed/gcc/deque.hpp | 323 + .../mpl/aux_/preprocessed/gcc/divides.hpp | 146 + .../mpl/aux_/preprocessed/gcc/equal_to.hpp | 94 + .../mpl/aux_/preprocessed/gcc/fold_impl.hpp | 180 + .../mpl/aux_/preprocessed/gcc/full_lambda.hpp | 558 + .../mpl/aux_/preprocessed/gcc/greater.hpp | 94 + .../aux_/preprocessed/gcc/greater_equal.hpp | 94 + .../mpl/aux_/preprocessed/gcc/inherit.hpp | 141 + .../preprocessed/gcc/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/gcc/iter_fold_impl.hpp | 180 + .../aux_/preprocessed/gcc/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/gcc/less.hpp | 94 + .../mpl/aux_/preprocessed/gcc/less_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/gcc/list.hpp | 323 + .../mpl/aux_/preprocessed/gcc/list_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/gcc/map.hpp | 323 + .../boost/mpl/aux_/preprocessed/gcc/minus.hpp | 146 + .../mpl/aux_/preprocessed/gcc/modulus.hpp | 101 + .../aux_/preprocessed/gcc/not_equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/gcc/or.hpp | 69 + .../aux_/preprocessed/gcc/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/gcc/plus.hpp | 146 + .../boost/mpl/aux_/preprocessed/gcc/quote.hpp | 123 + .../preprocessed/gcc/reverse_fold_impl.hpp | 231 + .../gcc/reverse_iter_fold_impl.hpp | 231 + .../boost/mpl/aux_/preprocessed/gcc/set.hpp | 323 + .../boost/mpl/aux_/preprocessed/gcc/set_c.hpp | 328 + .../mpl/aux_/preprocessed/gcc/shift_left.hpp | 99 + .../mpl/aux_/preprocessed/gcc/shift_right.hpp | 99 + .../aux_/preprocessed/gcc/template_arity.hpp | 97 + .../boost/mpl/aux_/preprocessed/gcc/times.hpp | 146 + .../mpl/aux_/preprocessed/gcc/unpack_args.hpp | 94 + .../mpl/aux_/preprocessed/gcc/vector.hpp | 323 + .../mpl/aux_/preprocessed/gcc/vector_c.hpp | 309 + .../preprocessed/msvc60/advance_backward.hpp | 132 + .../preprocessed/msvc60/advance_forward.hpp | 132 + .../mpl/aux_/preprocessed/msvc60/and.hpp | 73 + .../mpl/aux_/preprocessed/msvc60/apply.hpp | 166 + .../aux_/preprocessed/msvc60/apply_fwd.hpp | 46 + .../aux_/preprocessed/msvc60/apply_wrap.hpp | 247 + .../mpl/aux_/preprocessed/msvc60/arg.hpp | 123 + .../aux_/preprocessed/msvc60/basic_bind.hpp | 328 + .../mpl/aux_/preprocessed/msvc60/bind.hpp | 432 + .../mpl/aux_/preprocessed/msvc60/bind_fwd.hpp | 46 + .../mpl/aux_/preprocessed/msvc60/bitand.hpp | 149 + .../mpl/aux_/preprocessed/msvc60/bitor.hpp | 149 + .../mpl/aux_/preprocessed/msvc60/bitxor.hpp | 149 + .../mpl/aux_/preprocessed/msvc60/deque.hpp | 556 + .../mpl/aux_/preprocessed/msvc60/divides.hpp | 148 + .../mpl/aux_/preprocessed/msvc60/equal_to.hpp | 102 + .../aux_/preprocessed/msvc60/fold_impl.hpp | 293 + .../aux_/preprocessed/msvc60/full_lambda.hpp | 554 + .../mpl/aux_/preprocessed/msvc60/greater.hpp | 102 + .../preprocessed/msvc60/greater_equal.hpp | 102 + .../mpl/aux_/preprocessed/msvc60/inherit.hpp | 166 + .../preprocessed/msvc60/iter_fold_if_impl.hpp | 133 + .../preprocessed/msvc60/iter_fold_impl.hpp | 293 + .../preprocessed/msvc60/lambda_no_ctps.hpp | 229 + .../mpl/aux_/preprocessed/msvc60/less.hpp | 102 + .../aux_/preprocessed/msvc60/less_equal.hpp | 102 + .../mpl/aux_/preprocessed/msvc60/list.hpp | 556 + .../mpl/aux_/preprocessed/msvc60/list_c.hpp | 534 + .../mpl/aux_/preprocessed/msvc60/map.hpp | 556 + .../mpl/aux_/preprocessed/msvc60/minus.hpp | 148 + .../mpl/aux_/preprocessed/msvc60/modulus.hpp | 115 + .../aux_/preprocessed/msvc60/not_equal_to.hpp | 102 + .../boost/mpl/aux_/preprocessed/msvc60/or.hpp | 73 + .../aux_/preprocessed/msvc60/placeholders.hpp | 105 + .../mpl/aux_/preprocessed/msvc60/plus.hpp | 148 + .../mpl/aux_/preprocessed/msvc60/quote.hpp | 11 + .../preprocessed/msvc60/reverse_fold_impl.hpp | 343 + .../msvc60/reverse_iter_fold_impl.hpp | 343 + .../mpl/aux_/preprocessed/msvc60/set.hpp | 556 + .../mpl/aux_/preprocessed/msvc60/set_c.hpp | 534 + .../aux_/preprocessed/msvc60/shift_left.hpp | 114 + .../aux_/preprocessed/msvc60/shift_right.hpp | 114 + .../preprocessed/msvc60/template_arity.hpp | 46 + .../mpl/aux_/preprocessed/msvc60/times.hpp | 148 + .../aux_/preprocessed/msvc60/unpack_args.hpp | 109 + .../mpl/aux_/preprocessed/msvc60/vector.hpp | 556 + .../mpl/aux_/preprocessed/msvc60/vector_c.hpp | 534 + .../preprocessed/msvc70/advance_backward.hpp | 97 + .../preprocessed/msvc70/advance_forward.hpp | 97 + .../mpl/aux_/preprocessed/msvc70/and.hpp | 71 + .../mpl/aux_/preprocessed/msvc70/apply.hpp | 160 + .../aux_/preprocessed/msvc70/apply_fwd.hpp | 46 + .../aux_/preprocessed/msvc70/apply_wrap.hpp | 138 + .../mpl/aux_/preprocessed/msvc70/arg.hpp | 123 + .../aux_/preprocessed/msvc70/basic_bind.hpp | 328 + .../mpl/aux_/preprocessed/msvc70/bind.hpp | 432 + .../mpl/aux_/preprocessed/msvc70/bind_fwd.hpp | 46 + .../mpl/aux_/preprocessed/msvc70/bitand.hpp | 151 + .../mpl/aux_/preprocessed/msvc70/bitor.hpp | 151 + .../mpl/aux_/preprocessed/msvc70/bitxor.hpp | 151 + .../mpl/aux_/preprocessed/msvc70/deque.hpp | 556 + .../mpl/aux_/preprocessed/msvc70/divides.hpp | 150 + .../mpl/aux_/preprocessed/msvc70/equal_to.hpp | 102 + .../aux_/preprocessed/msvc70/fold_impl.hpp | 245 + .../aux_/preprocessed/msvc70/full_lambda.hpp | 554 + .../mpl/aux_/preprocessed/msvc70/greater.hpp | 102 + .../preprocessed/msvc70/greater_equal.hpp | 102 + .../mpl/aux_/preprocessed/msvc70/inherit.hpp | 166 + .../preprocessed/msvc70/iter_fold_if_impl.hpp | 133 + .../preprocessed/msvc70/iter_fold_impl.hpp | 245 + .../preprocessed/msvc70/lambda_no_ctps.hpp | 229 + .../mpl/aux_/preprocessed/msvc70/less.hpp | 102 + .../aux_/preprocessed/msvc70/less_equal.hpp | 102 + .../mpl/aux_/preprocessed/msvc70/list.hpp | 556 + .../mpl/aux_/preprocessed/msvc70/list_c.hpp | 534 + .../mpl/aux_/preprocessed/msvc70/map.hpp | 556 + .../mpl/aux_/preprocessed/msvc70/minus.hpp | 150 + .../mpl/aux_/preprocessed/msvc70/modulus.hpp | 115 + .../aux_/preprocessed/msvc70/not_equal_to.hpp | 102 + .../boost/mpl/aux_/preprocessed/msvc70/or.hpp | 71 + .../aux_/preprocessed/msvc70/placeholders.hpp | 105 + .../mpl/aux_/preprocessed/msvc70/plus.hpp | 150 + .../mpl/aux_/preprocessed/msvc70/quote.hpp | 116 + .../preprocessed/msvc70/reverse_fold_impl.hpp | 295 + .../msvc70/reverse_iter_fold_impl.hpp | 295 + .../mpl/aux_/preprocessed/msvc70/set.hpp | 556 + .../mpl/aux_/preprocessed/msvc70/set_c.hpp | 534 + .../aux_/preprocessed/msvc70/shift_left.hpp | 114 + .../aux_/preprocessed/msvc70/shift_right.hpp | 114 + .../preprocessed/msvc70/template_arity.hpp | 46 + .../mpl/aux_/preprocessed/msvc70/times.hpp | 150 + .../aux_/preprocessed/msvc70/unpack_args.hpp | 109 + .../mpl/aux_/preprocessed/msvc70/vector.hpp | 556 + .../mpl/aux_/preprocessed/msvc70/vector_c.hpp | 534 + .../preprocessed/mwcw/advance_backward.hpp | 97 + .../preprocessed/mwcw/advance_forward.hpp | 97 + .../boost/mpl/aux_/preprocessed/mwcw/and.hpp | 69 + .../mpl/aux_/preprocessed/mwcw/apply.hpp | 169 + .../mpl/aux_/preprocessed/mwcw/apply_fwd.hpp | 52 + .../mpl/aux_/preprocessed/mwcw/apply_wrap.hpp | 456 + .../boost/mpl/aux_/preprocessed/mwcw/arg.hpp | 123 + .../mpl/aux_/preprocessed/mwcw/basic_bind.hpp | 440 + .../boost/mpl/aux_/preprocessed/mwcw/bind.hpp | 561 + .../mpl/aux_/preprocessed/mwcw/bind_fwd.hpp | 52 + .../mpl/aux_/preprocessed/mwcw/bitand.hpp | 147 + .../mpl/aux_/preprocessed/mwcw/bitor.hpp | 147 + .../mpl/aux_/preprocessed/mwcw/bitxor.hpp | 147 + .../mpl/aux_/preprocessed/mwcw/deque.hpp | 323 + .../mpl/aux_/preprocessed/mwcw/divides.hpp | 146 + .../mpl/aux_/preprocessed/mwcw/equal_to.hpp | 94 + .../mpl/aux_/preprocessed/mwcw/fold_impl.hpp | 180 + .../aux_/preprocessed/mwcw/full_lambda.hpp | 554 + .../mpl/aux_/preprocessed/mwcw/greater.hpp | 94 + .../aux_/preprocessed/mwcw/greater_equal.hpp | 94 + .../mpl/aux_/preprocessed/mwcw/inherit.hpp | 141 + .../preprocessed/mwcw/iter_fold_if_impl.hpp | 133 + .../aux_/preprocessed/mwcw/iter_fold_impl.hpp | 180 + .../aux_/preprocessed/mwcw/lambda_no_ctps.hpp | 229 + .../boost/mpl/aux_/preprocessed/mwcw/less.hpp | 94 + .../mpl/aux_/preprocessed/mwcw/less_equal.hpp | 94 + .../boost/mpl/aux_/preprocessed/mwcw/list.hpp | 323 + .../mpl/aux_/preprocessed/mwcw/list_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/mwcw/map.hpp | 323 + .../mpl/aux_/preprocessed/mwcw/minus.hpp | 146 + .../mpl/aux_/preprocessed/mwcw/modulus.hpp | 101 + .../aux_/preprocessed/mwcw/not_equal_to.hpp | 94 + .../boost/mpl/aux_/preprocessed/mwcw/or.hpp | 69 + .../aux_/preprocessed/mwcw/placeholders.hpp | 105 + .../boost/mpl/aux_/preprocessed/mwcw/plus.hpp | 146 + .../mpl/aux_/preprocessed/mwcw/quote.hpp | 123 + .../preprocessed/mwcw/reverse_fold_impl.hpp | 231 + .../mwcw/reverse_iter_fold_impl.hpp | 231 + .../boost/mpl/aux_/preprocessed/mwcw/set.hpp | 323 + .../mpl/aux_/preprocessed/mwcw/set_c.hpp | 328 + .../mpl/aux_/preprocessed/mwcw/shift_left.hpp | 99 + .../aux_/preprocessed/mwcw/shift_right.hpp | 99 + .../aux_/preprocessed/mwcw/template_arity.hpp | 11 + .../mpl/aux_/preprocessed/mwcw/times.hpp | 146 + .../aux_/preprocessed/mwcw/unpack_args.hpp | 94 + .../mpl/aux_/preprocessed/mwcw/vector.hpp | 323 + .../mpl/aux_/preprocessed/mwcw/vector_c.hpp | 309 + .../preprocessed/no_ctps/advance_backward.hpp | 97 + .../preprocessed/no_ctps/advance_forward.hpp | 97 + .../mpl/aux_/preprocessed/no_ctps/and.hpp | 73 + .../mpl/aux_/preprocessed/no_ctps/apply.hpp | 268 + .../aux_/preprocessed/no_ctps/apply_fwd.hpp | 50 + .../aux_/preprocessed/no_ctps/apply_wrap.hpp | 78 + .../mpl/aux_/preprocessed/no_ctps/arg.hpp | 123 + .../aux_/preprocessed/no_ctps/basic_bind.hpp | 486 + .../mpl/aux_/preprocessed/no_ctps/bind.hpp | 590 + .../aux_/preprocessed/no_ctps/bind_fwd.hpp | 52 + .../mpl/aux_/preprocessed/no_ctps/bitand.hpp | 134 + .../mpl/aux_/preprocessed/no_ctps/bitor.hpp | 134 + .../mpl/aux_/preprocessed/no_ctps/bitxor.hpp | 134 + .../mpl/aux_/preprocessed/no_ctps/deque.hpp | 556 + .../mpl/aux_/preprocessed/no_ctps/divides.hpp | 133 + .../aux_/preprocessed/no_ctps/equal_to.hpp | 94 + .../aux_/preprocessed/no_ctps/fold_impl.hpp | 245 + .../aux_/preprocessed/no_ctps/full_lambda.hpp | 554 + .../mpl/aux_/preprocessed/no_ctps/greater.hpp | 94 + .../preprocessed/no_ctps/greater_equal.hpp | 94 + .../mpl/aux_/preprocessed/no_ctps/inherit.hpp | 166 + .../no_ctps/iter_fold_if_impl.hpp | 133 + .../preprocessed/no_ctps/iter_fold_impl.hpp | 245 + .../preprocessed/no_ctps/lambda_no_ctps.hpp | 229 + .../mpl/aux_/preprocessed/no_ctps/less.hpp | 94 + .../aux_/preprocessed/no_ctps/less_equal.hpp | 94 + .../mpl/aux_/preprocessed/no_ctps/list.hpp | 556 + .../mpl/aux_/preprocessed/no_ctps/list_c.hpp | 534 + .../mpl/aux_/preprocessed/no_ctps/map.hpp | 556 + .../mpl/aux_/preprocessed/no_ctps/minus.hpp | 133 + .../mpl/aux_/preprocessed/no_ctps/modulus.hpp | 101 + .../preprocessed/no_ctps/not_equal_to.hpp | 94 + .../mpl/aux_/preprocessed/no_ctps/or.hpp | 73 + .../preprocessed/no_ctps/placeholders.hpp | 105 + .../mpl/aux_/preprocessed/no_ctps/plus.hpp | 133 + .../mpl/aux_/preprocessed/no_ctps/quote.hpp | 116 + .../no_ctps/reverse_fold_impl.hpp | 295 + .../no_ctps/reverse_iter_fold_impl.hpp | 295 + .../mpl/aux_/preprocessed/no_ctps/set.hpp | 556 + .../mpl/aux_/preprocessed/no_ctps/set_c.hpp | 534 + .../aux_/preprocessed/no_ctps/shift_left.hpp | 99 + .../aux_/preprocessed/no_ctps/shift_right.hpp | 99 + .../preprocessed/no_ctps/template_arity.hpp | 40 + .../mpl/aux_/preprocessed/no_ctps/times.hpp | 133 + .../aux_/preprocessed/no_ctps/unpack_args.hpp | 109 + .../mpl/aux_/preprocessed/no_ctps/vector.hpp | 556 + .../aux_/preprocessed/no_ctps/vector_c.hpp | 534 + .../preprocessed/no_ttp/advance_backward.hpp | 97 + .../preprocessed/no_ttp/advance_forward.hpp | 97 + .../mpl/aux_/preprocessed/no_ttp/and.hpp | 69 + .../mpl/aux_/preprocessed/no_ttp/apply.hpp | 169 + .../aux_/preprocessed/no_ttp/apply_fwd.hpp | 52 + .../aux_/preprocessed/no_ttp/apply_wrap.hpp | 84 + .../mpl/aux_/preprocessed/no_ttp/arg.hpp | 123 + .../aux_/preprocessed/no_ttp/basic_bind.hpp | 369 + .../mpl/aux_/preprocessed/no_ttp/bind.hpp | 466 + .../mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp | 52 + .../mpl/aux_/preprocessed/no_ttp/bitand.hpp | 157 + .../mpl/aux_/preprocessed/no_ttp/bitor.hpp | 157 + .../mpl/aux_/preprocessed/no_ttp/bitxor.hpp | 157 + .../mpl/aux_/preprocessed/no_ttp/deque.hpp | 323 + .../mpl/aux_/preprocessed/no_ttp/divides.hpp | 156 + .../mpl/aux_/preprocessed/no_ttp/equal_to.hpp | 98 + .../aux_/preprocessed/no_ttp/fold_impl.hpp | 180 + .../aux_/preprocessed/no_ttp/full_lambda.hpp | 554 + .../mpl/aux_/preprocessed/no_ttp/greater.hpp | 98 + .../preprocessed/no_ttp/greater_equal.hpp | 98 + .../mpl/aux_/preprocessed/no_ttp/inherit.hpp | 141 + .../preprocessed/no_ttp/iter_fold_if_impl.hpp | 133 + .../preprocessed/no_ttp/iter_fold_impl.hpp | 180 + .../preprocessed/no_ttp/lambda_no_ctps.hpp | 229 + .../mpl/aux_/preprocessed/no_ttp/less.hpp | 98 + .../aux_/preprocessed/no_ttp/less_equal.hpp | 98 + .../mpl/aux_/preprocessed/no_ttp/list.hpp | 323 + .../mpl/aux_/preprocessed/no_ttp/list_c.hpp | 328 + .../mpl/aux_/preprocessed/no_ttp/map.hpp | 323 + .../mpl/aux_/preprocessed/no_ttp/minus.hpp | 156 + .../mpl/aux_/preprocessed/no_ttp/modulus.hpp | 111 + .../aux_/preprocessed/no_ttp/not_equal_to.hpp | 98 + .../boost/mpl/aux_/preprocessed/no_ttp/or.hpp | 69 + .../aux_/preprocessed/no_ttp/placeholders.hpp | 105 + .../mpl/aux_/preprocessed/no_ttp/plus.hpp | 156 + .../mpl/aux_/preprocessed/no_ttp/quote.hpp | 11 + .../preprocessed/no_ttp/reverse_fold_impl.hpp | 231 + .../no_ttp/reverse_iter_fold_impl.hpp | 231 + .../mpl/aux_/preprocessed/no_ttp/set.hpp | 323 + .../mpl/aux_/preprocessed/no_ttp/set_c.hpp | 328 + .../aux_/preprocessed/no_ttp/shift_left.hpp | 110 + .../aux_/preprocessed/no_ttp/shift_right.hpp | 110 + .../preprocessed/no_ttp/template_arity.hpp | 40 + .../mpl/aux_/preprocessed/no_ttp/times.hpp | 156 + .../aux_/preprocessed/no_ttp/unpack_args.hpp | 94 + .../mpl/aux_/preprocessed/no_ttp/vector.hpp | 323 + .../mpl/aux_/preprocessed/no_ttp/vector_c.hpp | 309 + .../preprocessed/plain/advance_backward.hpp | 97 + .../preprocessed/plain/advance_forward.hpp | 97 + .../boost/mpl/aux_/preprocessed/plain/and.hpp | 64 + .../mpl/aux_/preprocessed/plain/apply.hpp | 139 + .../mpl/aux_/preprocessed/plain/apply_fwd.hpp | 52 + .../aux_/preprocessed/plain/apply_wrap.hpp | 84 + .../boost/mpl/aux_/preprocessed/plain/arg.hpp | 123 + .../aux_/preprocessed/plain/basic_bind.hpp | 440 + .../mpl/aux_/preprocessed/plain/bind.hpp | 561 + .../mpl/aux_/preprocessed/plain/bind_fwd.hpp | 52 + .../mpl/aux_/preprocessed/plain/bitand.hpp | 142 + .../mpl/aux_/preprocessed/plain/bitor.hpp | 142 + .../mpl/aux_/preprocessed/plain/bitxor.hpp | 142 + .../mpl/aux_/preprocessed/plain/deque.hpp | 323 + .../mpl/aux_/preprocessed/plain/divides.hpp | 141 + .../mpl/aux_/preprocessed/plain/equal_to.hpp | 92 + .../mpl/aux_/preprocessed/plain/fold_impl.hpp | 180 + .../aux_/preprocessed/plain/full_lambda.hpp | 554 + .../mpl/aux_/preprocessed/plain/greater.hpp | 92 + .../aux_/preprocessed/plain/greater_equal.hpp | 92 + .../mpl/aux_/preprocessed/plain/inherit.hpp | 125 + .../preprocessed/plain/iter_fold_if_impl.hpp | 133 + .../preprocessed/plain/iter_fold_impl.hpp | 180 + .../preprocessed/plain/lambda_no_ctps.hpp | 228 + .../mpl/aux_/preprocessed/plain/less.hpp | 92 + .../aux_/preprocessed/plain/less_equal.hpp | 92 + .../mpl/aux_/preprocessed/plain/list.hpp | 323 + .../mpl/aux_/preprocessed/plain/list_c.hpp | 328 + .../boost/mpl/aux_/preprocessed/plain/map.hpp | 323 + .../mpl/aux_/preprocessed/plain/minus.hpp | 141 + .../mpl/aux_/preprocessed/plain/modulus.hpp | 99 + .../aux_/preprocessed/plain/not_equal_to.hpp | 92 + .../boost/mpl/aux_/preprocessed/plain/or.hpp | 64 + .../aux_/preprocessed/plain/placeholders.hpp | 105 + .../mpl/aux_/preprocessed/plain/plus.hpp | 141 + .../mpl/aux_/preprocessed/plain/quote.hpp | 123 + .../preprocessed/plain/reverse_fold_impl.hpp | 231 + .../plain/reverse_iter_fold_impl.hpp | 231 + .../boost/mpl/aux_/preprocessed/plain/set.hpp | 323 + .../mpl/aux_/preprocessed/plain/set_c.hpp | 328 + .../aux_/preprocessed/plain/shift_left.hpp | 97 + .../aux_/preprocessed/plain/shift_right.hpp | 97 + .../preprocessed/plain/template_arity.hpp | 11 + .../mpl/aux_/preprocessed/plain/times.hpp | 141 + .../aux_/preprocessed/plain/unpack_args.hpp | 94 + .../mpl/aux_/preprocessed/plain/vector.hpp | 323 + .../mpl/aux_/preprocessed/plain/vector_c.hpp | 309 + .../boost/mpl/aux_/preprocessor/add.hpp | 65 + .../mpl/aux_/preprocessor/def_params_tail.hpp | 105 + .../mpl/aux_/preprocessor/default_params.hpp | 67 + .../boost/mpl/aux_/preprocessor/enum.hpp | 62 + .../mpl/aux_/preprocessor/ext_params.hpp | 78 + .../mpl/aux_/preprocessor/filter_params.hpp | 28 + .../boost/mpl/aux_/preprocessor/is_seq.hpp | 54 + .../boost/mpl/aux_/preprocessor/params.hpp | 65 + .../aux_/preprocessor/partial_spec_params.hpp | 32 + .../boost/mpl/aux_/preprocessor/range.hpp | 23 + .../boost/mpl/aux_/preprocessor/repeat.hpp | 51 + .../boost/mpl/aux_/preprocessor/sub.hpp | 65 + .../mpl/aux_/preprocessor/token_equal.hpp | 56 + .../boost/mpl/aux_/preprocessor/tuple.hpp | 29 + .../include/boost/mpl/aux_/ptr_to_ref.hpp | 46 + .../include/boost/mpl/aux_/push_back_impl.hpp | 70 + .../boost/mpl/aux_/push_front_impl.hpp | 71 + .../boost/mpl/aux_/range_c/O1_size.hpp | 31 + .../include/boost/mpl/aux_/range_c/back.hpp | 34 + .../include/boost/mpl/aux_/range_c/empty.hpp | 37 + .../include/boost/mpl/aux_/range_c/front.hpp | 33 + .../boost/mpl/aux_/range_c/iterator.hpp | 106 + .../include/boost/mpl/aux_/range_c/size.hpp | 37 + .../include/boost/mpl/aux_/range_c/tag.hpp | 24 + .../boost/mpl/aux_/reverse_fold_impl.hpp | 44 + .../boost/mpl/aux_/reverse_fold_impl_body.hpp | 412 + .../boost/mpl/aux_/reverse_iter_fold_impl.hpp | 43 + .../boost/mpl/aux_/sequence_wrapper.hpp | 292 + .../include/boost/mpl/aux_/shift_op.hpp | 87 + .../boost/mpl/aux_/single_element_iter.hpp | 118 + .../include/boost/mpl/aux_/size_impl.hpp | 52 + .../include/boost/mpl/aux_/sort_impl.hpp | 121 + .../include/boost/mpl/aux_/static_cast.hpp | 27 + .../include/boost/mpl/aux_/template_arity.hpp | 189 + .../boost/mpl/aux_/template_arity_fwd.hpp | 23 + .../include/boost/mpl/aux_/test.hpp | 32 + .../include/boost/mpl/aux_/test/assert.hpp | 29 + .../include/boost/mpl/aux_/test/data.hpp | 25 + .../include/boost/mpl/aux_/test/test_case.hpp | 21 + .../boost/mpl/aux_/traits_lambda_spec.hpp | 63 + .../include/boost/mpl/aux_/transform_iter.hpp | 123 + .../include/boost/mpl/aux_/type_wrapper.hpp | 47 + .../include/boost/mpl/aux_/unwrap.hpp | 47 + .../include/boost/mpl/aux_/value_wknd.hpp | 89 + .../include/boost/mpl/aux_/yes_no.hpp | 58 + .../boost-1.45.0/include/boost/mpl/back.hpp | 39 + .../include/boost/mpl/back_fwd.hpp | 24 + .../include/boost/mpl/back_inserter.hpp | 34 + .../boost-1.45.0/include/boost/mpl/base.hpp | 35 + .../boost-1.45.0/include/boost/mpl/begin.hpp | 19 + .../include/boost/mpl/begin_end.hpp | 57 + .../include/boost/mpl/begin_end_fwd.hpp | 27 + .../boost-1.45.0/include/boost/mpl/bind.hpp | 551 + .../include/boost/mpl/bind_fwd.hpp | 99 + .../boost-1.45.0/include/boost/mpl/bitand.hpp | 45 + .../boost-1.45.0/include/boost/mpl/bitor.hpp | 45 + .../include/boost/mpl/bitwise.hpp | 24 + .../boost-1.45.0/include/boost/mpl/bitxor.hpp | 23 + .../boost-1.45.0/include/boost/mpl/bool.hpp | 39 + .../include/boost/mpl/bool_fwd.hpp | 33 + .../boost-1.45.0/include/boost/mpl/char.hpp | 22 + .../include/boost/mpl/char_fwd.hpp | 27 + .../boost-1.45.0/include/boost/mpl/clear.hpp | 39 + .../include/boost/mpl/clear_fwd.hpp | 24 + .../include/boost/mpl/comparison.hpp | 24 + .../include/boost/mpl/contains.hpp | 41 + .../include/boost/mpl/contains_fwd.hpp | 25 + .../boost-1.45.0/include/boost/mpl/copy.hpp | 58 + .../include/boost/mpl/copy_if.hpp | 96 + .../boost-1.45.0/include/boost/mpl/count.hpp | 40 + .../include/boost/mpl/count_fwd.hpp | 24 + .../include/boost/mpl/count_if.hpp | 79 + .../boost-1.45.0/include/boost/mpl/deque.hpp | 58 + .../boost-1.45.0/include/boost/mpl/deref.hpp | 41 + .../include/boost/mpl/distance.hpp | 78 + .../include/boost/mpl/distance_fwd.hpp | 28 + .../include/boost/mpl/divides.hpp | 21 + .../boost-1.45.0/include/boost/mpl/empty.hpp | 39 + .../include/boost/mpl/empty_base.hpp | 59 + .../include/boost/mpl/empty_fwd.hpp | 24 + .../include/boost/mpl/empty_sequence.hpp | 42 + .../boost-1.45.0/include/boost/mpl/end.hpp | 19 + .../boost-1.45.0/include/boost/mpl/equal.hpp | 112 + .../include/boost/mpl/equal_to.hpp | 21 + .../boost-1.45.0/include/boost/mpl/erase.hpp | 42 + .../include/boost/mpl/erase_fwd.hpp | 24 + .../include/boost/mpl/erase_key.hpp | 41 + .../include/boost/mpl/erase_key_fwd.hpp | 24 + .../include/boost/mpl/eval_if.hpp | 71 + .../include/boost/mpl/filter_view.hpp | 46 + .../boost-1.45.0/include/boost/mpl/find.hpp | 38 + .../include/boost/mpl/find_if.hpp | 50 + .../boost-1.45.0/include/boost/mpl/fold.hpp | 48 + .../include/boost/mpl/for_each.hpp | 116 + .../boost-1.45.0/include/boost/mpl/front.hpp | 39 + .../include/boost/mpl/front_fwd.hpp | 24 + .../include/boost/mpl/front_inserter.hpp | 33 + .../include/boost/mpl/greater.hpp | 21 + .../include/boost/mpl/greater_equal.hpp | 21 + .../include/boost/mpl/has_key.hpp | 41 + .../include/boost/mpl/has_key_fwd.hpp | 25 + .../include/boost/mpl/has_xxx.hpp | 640 + .../include/boost/mpl/identity.hpp | 45 + .../boost-1.45.0/include/boost/mpl/if.hpp | 135 + .../include/boost/mpl/index_if.hpp | 60 + .../include/boost/mpl/index_of.hpp | 39 + .../include/boost/mpl/inherit.hpp | 229 + .../include/boost/mpl/inherit_linearly.hpp | 39 + .../boost-1.45.0/include/boost/mpl/insert.hpp | 41 + .../include/boost/mpl/insert_fwd.hpp | 24 + .../include/boost/mpl/insert_range.hpp | 41 + .../include/boost/mpl/insert_range_fwd.hpp | 24 + .../include/boost/mpl/inserter.hpp | 32 + .../boost-1.45.0/include/boost/mpl/int.hpp | 22 + .../include/boost/mpl/int_fwd.hpp | 27 + .../include/boost/mpl/integral_c.hpp | 51 + .../include/boost/mpl/integral_c_fwd.hpp | 32 + .../include/boost/mpl/integral_c_tag.hpp | 26 + .../include/boost/mpl/is_placeholder.hpp | 67 + .../include/boost/mpl/is_sequence.hpp | 112 + .../include/boost/mpl/iter_fold.hpp | 49 + .../include/boost/mpl/iter_fold_if.hpp | 117 + .../include/boost/mpl/iterator_category.hpp | 35 + .../include/boost/mpl/iterator_range.hpp | 42 + .../include/boost/mpl/iterator_tags.hpp | 27 + .../include/boost/mpl/joint_view.hpp | 65 + .../include/boost/mpl/key_type.hpp | 42 + .../include/boost/mpl/key_type_fwd.hpp | 25 + .../boost-1.45.0/include/boost/mpl/lambda.hpp | 29 + .../include/boost/mpl/lambda_fwd.hpp | 57 + .../boost-1.45.0/include/boost/mpl/less.hpp | 21 + .../include/boost/mpl/less_equal.hpp | 21 + .../include/boost/mpl/limits/arity.hpp | 21 + .../include/boost/mpl/limits/list.hpp | 21 + .../include/boost/mpl/limits/map.hpp | 21 + .../include/boost/mpl/limits/set.hpp | 21 + .../include/boost/mpl/limits/string.hpp | 21 + .../include/boost/mpl/limits/unrolling.hpp | 21 + .../include/boost/mpl/limits/vector.hpp | 21 + .../boost-1.45.0/include/boost/mpl/list.hpp | 57 + .../include/boost/mpl/list/aux_/O1_size.hpp | 33 + .../include/boost/mpl/list/aux_/begin_end.hpp | 44 + .../include/boost/mpl/list/aux_/clear.hpp | 34 + .../include/boost/mpl/list/aux_/empty.hpp | 34 + .../include/boost/mpl/list/aux_/front.hpp | 33 + .../mpl/list/aux_/include_preprocessed.hpp | 35 + .../include/boost/mpl/list/aux_/item.hpp | 55 + .../include/boost/mpl/list/aux_/iterator.hpp | 76 + .../include/boost/mpl/list/aux_/numbered.hpp | 68 + .../boost/mpl/list/aux_/numbered_c.hpp | 71 + .../include/boost/mpl/list/aux_/pop_front.hpp | 34 + .../list/aux_/preprocessed/plain/list10.hpp | 149 + .../list/aux_/preprocessed/plain/list10_c.hpp | 164 + .../list/aux_/preprocessed/plain/list20.hpp | 169 + .../list/aux_/preprocessed/plain/list20_c.hpp | 173 + .../list/aux_/preprocessed/plain/list30.hpp | 189 + .../list/aux_/preprocessed/plain/list30_c.hpp | 183 + .../list/aux_/preprocessed/plain/list40.hpp | 209 + .../list/aux_/preprocessed/plain/list40_c.hpp | 193 + .../list/aux_/preprocessed/plain/list50.hpp | 229 + .../list/aux_/preprocessed/plain/list50_c.hpp | 203 + .../include/boost/mpl/list/aux_/push_back.hpp | 36 + .../boost/mpl/list/aux_/push_front.hpp | 39 + .../include/boost/mpl/list/aux_/size.hpp | 33 + .../include/boost/mpl/list/aux_/tag.hpp | 24 + .../include/boost/mpl/list/list0.hpp | 42 + .../include/boost/mpl/list/list0_c.hpp | 31 + .../include/boost/mpl/list/list10.hpp | 43 + .../include/boost/mpl/list/list10_c.hpp | 43 + .../include/boost/mpl/list/list20.hpp | 43 + .../include/boost/mpl/list/list20_c.hpp | 43 + .../include/boost/mpl/list/list30.hpp | 43 + .../include/boost/mpl/list/list30_c.hpp | 43 + .../include/boost/mpl/list/list40.hpp | 43 + .../include/boost/mpl/list/list40_c.hpp | 43 + .../include/boost/mpl/list/list50.hpp | 43 + .../include/boost/mpl/list/list50_c.hpp | 43 + .../boost-1.45.0/include/boost/mpl/list_c.hpp | 60 + .../include/boost/mpl/logical.hpp | 21 + .../boost-1.45.0/include/boost/mpl/long.hpp | 22 + .../include/boost/mpl/long_fwd.hpp | 27 + .../include/boost/mpl/lower_bound.hpp | 143 + .../boost-1.45.0/include/boost/mpl/map.hpp | 57 + .../include/boost/mpl/map/aux_/at_impl.hpp | 144 + .../boost/mpl/map/aux_/begin_end_impl.hpp | 50 + .../include/boost/mpl/map/aux_/clear_impl.hpp | 35 + .../boost/mpl/map/aux_/contains_impl.hpp | 43 + .../include/boost/mpl/map/aux_/empty_impl.hpp | 34 + .../include/boost/mpl/map/aux_/erase_impl.hpp | 41 + .../boost/mpl/map/aux_/erase_key_impl.hpp | 53 + .../boost/mpl/map/aux_/has_key_impl.hpp | 44 + .../mpl/map/aux_/include_preprocessed.hpp | 53 + .../boost/mpl/map/aux_/insert_impl.hpp | 72 + .../include/boost/mpl/map/aux_/item.hpp | 138 + .../include/boost/mpl/map/aux_/iterator.hpp | 169 + .../boost/mpl/map/aux_/key_type_impl.hpp | 36 + .../include/boost/mpl/map/aux_/map0.hpp | 74 + .../include/boost/mpl/map/aux_/numbered.hpp | 110 + .../map/aux_/preprocessed/no_ctps/map10.hpp | 350 + .../map/aux_/preprocessed/no_ctps/map20.hpp | 370 + .../map/aux_/preprocessed/no_ctps/map30.hpp | 390 + .../map/aux_/preprocessed/no_ctps/map40.hpp | 410 + .../map/aux_/preprocessed/no_ctps/map50.hpp | 430 + .../mpl/map/aux_/preprocessed/plain/map10.hpp | 290 + .../mpl/map/aux_/preprocessed/plain/map20.hpp | 310 + .../mpl/map/aux_/preprocessed/plain/map30.hpp | 330 + .../mpl/map/aux_/preprocessed/plain/map40.hpp | 350 + .../mpl/map/aux_/preprocessed/plain/map50.hpp | 370 + .../aux_/preprocessed/typeof_based/map10.hpp | 150 + .../aux_/preprocessed/typeof_based/map20.hpp | 170 + .../aux_/preprocessed/typeof_based/map30.hpp | 190 + .../aux_/preprocessed/typeof_based/map40.hpp | 210 + .../aux_/preprocessed/typeof_based/map50.hpp | 230 + .../include/boost/mpl/map/aux_/size_impl.hpp | 33 + .../include/boost/mpl/map/aux_/tag.hpp | 24 + .../boost/mpl/map/aux_/value_type_impl.hpp | 36 + .../include/boost/mpl/map/map0.hpp | 36 + .../include/boost/mpl/map/map10.hpp | 44 + .../include/boost/mpl/map/map20.hpp | 44 + .../include/boost/mpl/map/map30.hpp | 44 + .../include/boost/mpl/map/map40.hpp | 44 + .../include/boost/mpl/map/map50.hpp | 44 + .../include/boost/mpl/math/fixed_c.hpp | 36 + .../include/boost/mpl/math/is_even.hpp | 54 + .../include/boost/mpl/math/rational_c.hpp | 37 + .../boost-1.45.0/include/boost/mpl/max.hpp | 19 + .../include/boost/mpl/max_element.hpp | 72 + .../boost-1.45.0/include/boost/mpl/min.hpp | 19 + .../include/boost/mpl/min_element.hpp | 40 + .../include/boost/mpl/min_max.hpp | 46 + .../boost-1.45.0/include/boost/mpl/minus.hpp | 21 + .../include/boost/mpl/modulus.hpp | 22 + .../include/boost/mpl/multiplies.hpp | 53 + .../boost/mpl/multiset/aux_/count_impl.hpp | 82 + .../boost/mpl/multiset/aux_/insert_impl.hpp | 34 + .../include/boost/mpl/multiset/aux_/item.hpp | 114 + .../boost/mpl/multiset/aux_/multiset0.hpp | 34 + .../include/boost/mpl/multiset/aux_/tag.hpp | 23 + .../include/boost/mpl/multiset/multiset0.hpp | 36 + .../boost-1.45.0/include/boost/mpl/negate.hpp | 81 + .../boost-1.45.0/include/boost/mpl/next.hpp | 19 + .../include/boost/mpl/next_prior.hpp | 49 + .../boost-1.45.0/include/boost/mpl/not.hpp | 51 + .../include/boost/mpl/not_equal_to.hpp | 21 + .../include/boost/mpl/numeric_cast.hpp | 41 + .../boost-1.45.0/include/boost/mpl/or.hpp | 61 + .../boost-1.45.0/include/boost/mpl/order.hpp | 41 + .../include/boost/mpl/order_fwd.hpp | 25 + .../boost-1.45.0/include/boost/mpl/pair.hpp | 70 + .../include/boost/mpl/pair_view.hpp | 169 + .../include/boost/mpl/partition.hpp | 53 + .../include/boost/mpl/placeholders.hpp | 100 + .../boost-1.45.0/include/boost/mpl/plus.hpp | 21 + .../include/boost/mpl/pop_back.hpp | 39 + .../include/boost/mpl/pop_back_fwd.hpp | 24 + .../include/boost/mpl/pop_front.hpp | 39 + .../include/boost/mpl/pop_front_fwd.hpp | 24 + .../boost-1.45.0/include/boost/mpl/print.hpp | 74 + .../boost-1.45.0/include/boost/mpl/prior.hpp | 19 + .../include/boost/mpl/protect.hpp | 55 + .../include/boost/mpl/push_back.hpp | 53 + .../include/boost/mpl/push_back_fwd.hpp | 24 + .../include/boost/mpl/push_front.hpp | 52 + .../include/boost/mpl/push_front_fwd.hpp | 24 + .../boost-1.45.0/include/boost/mpl/quote.hpp | 151 + .../include/boost/mpl/range_c.hpp | 48 + .../boost-1.45.0/include/boost/mpl/remove.hpp | 52 + .../include/boost/mpl/remove_if.hpp | 83 + .../include/boost/mpl/replace.hpp | 55 + .../include/boost/mpl/replace_if.hpp | 88 + .../include/boost/mpl/reverse.hpp | 38 + .../include/boost/mpl/reverse_fold.hpp | 50 + .../include/boost/mpl/reverse_iter_fold.hpp | 56 + .../include/boost/mpl/same_as.hpp | 55 + .../include/boost/mpl/sequence_tag.hpp | 124 + .../include/boost/mpl/sequence_tag_fwd.hpp | 26 + .../boost-1.45.0/include/boost/mpl/set.hpp | 57 + .../include/boost/mpl/set/aux_/at_impl.hpp | 40 + .../boost/mpl/set/aux_/begin_end_impl.hpp | 43 + .../include/boost/mpl/set/aux_/clear_impl.hpp | 35 + .../include/boost/mpl/set/aux_/empty_impl.hpp | 34 + .../include/boost/mpl/set/aux_/erase_impl.hpp | 41 + .../boost/mpl/set/aux_/erase_key_impl.hpp | 53 + .../boost/mpl/set/aux_/has_key_impl.hpp | 60 + .../mpl/set/aux_/include_preprocessed.hpp | 42 + .../boost/mpl/set/aux_/insert_impl.hpp | 65 + .../include/boost/mpl/set/aux_/item.hpp | 80 + .../include/boost/mpl/set/aux_/iterator.hpp | 98 + .../boost/mpl/set/aux_/key_type_impl.hpp | 34 + .../include/boost/mpl/set/aux_/numbered.hpp | 48 + .../include/boost/mpl/set/aux_/numbered_c.hpp | 48 + .../mpl/set/aux_/preprocessed/plain/set10.hpp | 140 + .../set/aux_/preprocessed/plain/set10_c.hpp | 145 + .../mpl/set/aux_/preprocessed/plain/set20.hpp | 168 + .../set/aux_/preprocessed/plain/set20_c.hpp | 154 + .../mpl/set/aux_/preprocessed/plain/set30.hpp | 195 + .../set/aux_/preprocessed/plain/set30_c.hpp | 164 + .../mpl/set/aux_/preprocessed/plain/set40.hpp | 221 + .../set/aux_/preprocessed/plain/set40_c.hpp | 174 + .../mpl/set/aux_/preprocessed/plain/set50.hpp | 250 + .../set/aux_/preprocessed/plain/set50_c.hpp | 184 + .../include/boost/mpl/set/aux_/set0.hpp | 69 + .../include/boost/mpl/set/aux_/size_impl.hpp | 33 + .../include/boost/mpl/set/aux_/tag.hpp | 24 + .../boost/mpl/set/aux_/value_type_impl.hpp | 34 + .../include/boost/mpl/set/set0.hpp | 35 + .../include/boost/mpl/set/set0_c.hpp | 32 + .../include/boost/mpl/set/set10.hpp | 44 + .../include/boost/mpl/set/set10_c.hpp | 45 + .../include/boost/mpl/set/set20.hpp | 44 + .../include/boost/mpl/set/set20_c.hpp | 45 + .../include/boost/mpl/set/set30.hpp | 44 + .../include/boost/mpl/set/set30_c.hpp | 45 + .../include/boost/mpl/set/set40.hpp | 44 + .../include/boost/mpl/set/set40_c.hpp | 45 + .../include/boost/mpl/set/set50.hpp | 44 + .../include/boost/mpl/set/set50_c.hpp | 45 + .../boost-1.45.0/include/boost/mpl/set_c.hpp | 60 + .../include/boost/mpl/shift_left.hpp | 22 + .../include/boost/mpl/shift_right.hpp | 22 + .../include/boost/mpl/single_view.hpp | 38 + .../boost-1.45.0/include/boost/mpl/size.hpp | 42 + .../include/boost/mpl/size_fwd.hpp | 24 + .../boost-1.45.0/include/boost/mpl/size_t.hpp | 25 + .../include/boost/mpl/size_t_fwd.hpp | 28 + .../boost-1.45.0/include/boost/mpl/sizeof.hpp | 36 + .../boost-1.45.0/include/boost/mpl/sort.hpp | 27 + .../include/boost/mpl/stable_partition.hpp | 75 + .../boost-1.45.0/include/boost/mpl/string.hpp | 607 + .../boost-1.45.0/include/boost/mpl/switch.hpp | 49 + .../boost-1.45.0/include/boost/mpl/tag.hpp | 52 + .../boost-1.45.0/include/boost/mpl/times.hpp | 21 + .../include/boost/mpl/transform.hpp | 145 + .../include/boost/mpl/transform_view.hpp | 46 + .../boost-1.45.0/include/boost/mpl/unique.hpp | 85 + .../include/boost/mpl/unpack_args.hpp | 150 + .../include/boost/mpl/upper_bound.hpp | 141 + .../include/boost/mpl/value_type.hpp | 42 + .../include/boost/mpl/value_type_fwd.hpp | 25 + .../boost-1.45.0/include/boost/mpl/vector.hpp | 57 + .../include/boost/mpl/vector/aux_/O1_size.hpp | 56 + .../include/boost/mpl/vector/aux_/at.hpp | 116 + .../include/boost/mpl/vector/aux_/back.hpp | 59 + .../boost/mpl/vector/aux_/begin_end.hpp | 49 + .../include/boost/mpl/vector/aux_/clear.hpp | 55 + .../include/boost/mpl/vector/aux_/empty.hpp | 68 + .../include/boost/mpl/vector/aux_/front.hpp | 56 + .../mpl/vector/aux_/include_preprocessed.hpp | 55 + .../include/boost/mpl/vector/aux_/item.hpp | 103 + .../boost/mpl/vector/aux_/iterator.hpp | 130 + .../boost/mpl/vector/aux_/numbered.hpp | 218 + .../boost/mpl/vector/aux_/numbered_c.hpp | 77 + .../boost/mpl/vector/aux_/pop_back.hpp | 40 + .../boost/mpl/vector/aux_/pop_front.hpp | 40 + .../aux_/preprocessed/no_ctps/vector10.hpp | 1528 ++ .../aux_/preprocessed/no_ctps/vector10_c.hpp | 149 + .../aux_/preprocessed/no_ctps/vector20.hpp | 1804 ++ .../aux_/preprocessed/no_ctps/vector20_c.hpp | 195 + .../aux_/preprocessed/no_ctps/vector30.hpp | 2124 ++ .../aux_/preprocessed/no_ctps/vector30_c.hpp | 238 + .../aux_/preprocessed/no_ctps/vector40.hpp | 2444 ++ .../aux_/preprocessed/no_ctps/vector40_c.hpp | 281 + .../aux_/preprocessed/no_ctps/vector50.hpp | 2764 +++ .../aux_/preprocessed/no_ctps/vector50_c.hpp | 325 + .../aux_/preprocessed/plain/vector10.hpp | 829 + .../aux_/preprocessed/plain/vector10_c.hpp | 149 + .../aux_/preprocessed/plain/vector20.hpp | 1144 + .../aux_/preprocessed/plain/vector20_c.hpp | 195 + .../aux_/preprocessed/plain/vector30.hpp | 1464 ++ .../aux_/preprocessed/plain/vector30_c.hpp | 238 + .../aux_/preprocessed/plain/vector40.hpp | 1784 ++ .../aux_/preprocessed/plain/vector40_c.hpp | 281 + .../aux_/preprocessed/plain/vector50.hpp | 2104 ++ .../aux_/preprocessed/plain/vector50_c.hpp | 325 + .../preprocessed/typeof_based/vector10.hpp | 139 + .../preprocessed/typeof_based/vector10_c.hpp | 154 + .../preprocessed/typeof_based/vector20.hpp | 159 + .../preprocessed/typeof_based/vector20_c.hpp | 163 + .../preprocessed/typeof_based/vector30.hpp | 179 + .../preprocessed/typeof_based/vector30_c.hpp | 173 + .../preprocessed/typeof_based/vector40.hpp | 199 + .../preprocessed/typeof_based/vector40_c.hpp | 183 + .../preprocessed/typeof_based/vector50.hpp | 219 + .../preprocessed/typeof_based/vector50_c.hpp | 193 + .../boost/mpl/vector/aux_/push_back.hpp | 40 + .../boost/mpl/vector/aux_/push_front.hpp | 40 + .../include/boost/mpl/vector/aux_/size.hpp | 49 + .../include/boost/mpl/vector/aux_/tag.hpp | 32 + .../include/boost/mpl/vector/aux_/vector0.hpp | 52 + .../include/boost/mpl/vector/vector0.hpp | 34 + .../include/boost/mpl/vector/vector0_c.hpp | 31 + .../include/boost/mpl/vector/vector10.hpp | 45 + .../include/boost/mpl/vector/vector10_c.hpp | 46 + .../include/boost/mpl/vector/vector20.hpp | 45 + .../include/boost/mpl/vector/vector20_c.hpp | 46 + .../include/boost/mpl/vector/vector30.hpp | 45 + .../include/boost/mpl/vector/vector30_c.hpp | 47 + .../include/boost/mpl/vector/vector40.hpp | 45 + .../include/boost/mpl/vector/vector40_c.hpp | 46 + .../include/boost/mpl/vector/vector50.hpp | 45 + .../include/boost/mpl/vector/vector50_c.hpp | 46 + .../include/boost/mpl/vector_c.hpp | 61 + .../boost-1.45.0/include/boost/mpl/void.hpp | 76 + .../include/boost/mpl/void_fwd.hpp | 26 + .../include/boost/mpl/zip_view.hpp | 65 + .../include/boost/multi_array.hpp | 499 + .../include/boost/multi_array/algorithm.hpp | 103 + .../include/boost/multi_array/base.hpp | 512 + .../boost/multi_array/collection_concept.hpp | 26 + .../boost/multi_array/concept_checks.hpp | 224 + .../include/boost/multi_array/copy_array.hpp | 68 + .../include/boost/multi_array/extent_gen.hpp | 75 + .../boost/multi_array/extent_range.hpp | 49 + .../include/boost/multi_array/index_gen.hpp | 81 + .../include/boost/multi_array/index_range.hpp | 188 + .../include/boost/multi_array/iterator.hpp | 170 + .../boost/multi_array/multi_array_ref.hpp | 633 + .../include/boost/multi_array/range_list.hpp | 70 + .../boost/multi_array/storage_order.hpp | 125 + .../include/boost/multi_array/subarray.hpp | 399 + .../include/boost/multi_array/types.hpp | 38 + .../include/boost/multi_array/view.hpp | 472 + .../boost/multi_index/composite_key.hpp | 1324 ++ .../multi_index/detail/access_specifier.hpp | 55 + .../boost/multi_index/detail/adl_swap.hpp | 44 + .../detail/archive_constructed.hpp | 79 + .../boost/multi_index/detail/auto_space.hpp | 95 + .../boost/multi_index/detail/base_type.hpp | 87 + .../detail/bidir_node_iterator.hpp | 113 + .../boost/multi_index/detail/bucket_array.hpp | 211 + .../boost/multi_index/detail/converter.hpp | 52 + .../boost/multi_index/detail/copy_map.hpp | 140 + .../detail/duplicates_iterator.hpp | 120 + .../boost/multi_index/detail/has_tag.hpp | 42 + .../multi_index/detail/hash_index_args.hpp | 105 + .../detail/hash_index_iterator.hpp | 111 + .../multi_index/detail/hash_index_node.hpp | 165 + .../multi_index/detail/header_holder.hpp | 50 + .../boost/multi_index/detail/index_base.hpp | 185 + .../boost/multi_index/detail/index_loader.hpp | 138 + .../multi_index/detail/index_matcher.hpp | 248 + .../multi_index/detail/index_node_base.hpp | 135 + .../boost/multi_index/detail/index_saver.hpp | 135 + .../multi_index/detail/invariant_assert.hpp | 21 + .../multi_index/detail/is_index_list.hpp | 40 + .../boost/multi_index/detail/iter_adaptor.hpp | 325 + .../multi_index/detail/modify_key_adaptor.hpp | 49 + .../detail/msvc_index_specifier.hpp | 69 + .../multi_index/detail/no_duplicate_tags.hpp | 97 + .../boost/multi_index/detail/node_type.hpp | 79 + .../multi_index/detail/ord_index_args.hpp | 83 + .../multi_index/detail/ord_index_node.hpp | 650 + .../multi_index/detail/ord_index_ops.hpp | 147 + .../boost/multi_index/detail/prevent_eti.hpp | 60 + .../multi_index/detail/rnd_index_loader.hpp | 176 + .../multi_index/detail/rnd_index_node.hpp | 281 + .../multi_index/detail/rnd_index_ops.hpp | 208 + .../detail/rnd_index_ptr_array.hpp | 143 + .../multi_index/detail/rnd_node_iterator.hpp | 139 + .../multi_index/detail/safe_ctr_proxy.hpp | 105 + .../boost/multi_index/detail/safe_mode.hpp | 574 + .../boost/multi_index/detail/scope_guard.hpp | 277 + .../multi_index/detail/seq_index_node.hpp | 223 + .../multi_index/detail/seq_index_ops.hpp | 200 + .../detail/serialization_version.hpp | 75 + .../boost/multi_index/detail/uintptr_type.hpp | 76 + .../boost/multi_index/detail/unbounded.hpp | 83 + .../multi_index/detail/value_compare.hpp | 53 + .../include/boost/multi_index/global_fun.hpp | 188 + .../boost/multi_index/hashed_index.hpp | 1245 + .../boost/multi_index/hashed_index_fwd.hpp | 58 + .../include/boost/multi_index/identity.hpp | 147 + .../boost/multi_index/identity_fwd.hpp | 26 + .../include/boost/multi_index/indexed_by.hpp | 72 + .../boost/multi_index/key_extractors.hpp | 22 + .../include/boost/multi_index/mem_fun.hpp | 212 + .../include/boost/multi_index/member.hpp | 269 + .../boost/multi_index/ordered_index.hpp | 1390 ++ .../boost/multi_index/ordered_index_fwd.hpp | 124 + .../boost/multi_index/random_access_index.hpp | 1008 + .../multi_index/random_access_index_fwd.hpp | 91 + .../boost/multi_index/safe_mode_errors.hpp | 48 + .../boost/multi_index/sequenced_index.hpp | 922 + .../boost/multi_index/sequenced_index_fwd.hpp | 91 + .../include/boost/multi_index/tag.hpp | 92 + .../include/boost/multi_index_container.hpp | 1143 + .../boost/multi_index_container_fwd.hpp | 121 + .../boost-1.45.0/include/boost/next_prior.hpp | 51 + .../boost-1.45.0/include/boost/non_type.hpp | 27 + .../include/boost/noncopyable.hpp | 36 + .../include/boost/nondet_random.hpp | 142 + .../boost-1.45.0/include/boost/none.hpp | 28 + .../boost-1.45.0/include/boost/none_t.hpp | 24 + .../boost-1.45.0/include/boost/operators.hpp | 976 + .../boost-1.45.0/include/boost/optional.hpp | 18 + .../include/boost/optional/optional.hpp | 924 + .../include/boost/optional/optional_fwd.hpp | 22 + .../include/boost/optional/optional_io.hpp | 84 + .../boost-1.45.0/include/boost/parameter.hpp | 21 + .../include/boost/parameter/aux_/arg_list.hpp | 459 + .../include/boost/parameter/aux_/cast.hpp | 131 + .../include/boost/parameter/aux_/default.hpp | 69 + .../include/boost/parameter/aux_/is_maybe.hpp | 26 + .../include/boost/parameter/aux_/maybe.hpp | 120 + .../boost/parameter/aux_/overloads.hpp | 88 + .../parameter/aux_/parameter_requirements.hpp | 25 + .../parameter/aux_/parenthesized_type.hpp | 119 + .../parameter/aux_/preprocessor/flatten.hpp | 115 + .../parameter/aux_/preprocessor/for_each.hpp | 103 + .../boost/parameter/aux_/python/invoker.hpp | 132 + .../parameter/aux_/python/invoker_iterate.hpp | 93 + .../boost/parameter/aux_/result_of0.hpp | 36 + .../include/boost/parameter/aux_/set.hpp | 67 + .../include/boost/parameter/aux_/tag.hpp | 38 + .../boost/parameter/aux_/tagged_argument.hpp | 188 + .../boost/parameter/aux_/template_keyword.hpp | 47 + .../parameter/aux_/unwrap_cv_reference.hpp | 97 + .../include/boost/parameter/aux_/void.hpp | 29 + .../include/boost/parameter/aux_/yesno.hpp | 26 + .../include/boost/parameter/binding.hpp | 106 + .../include/boost/parameter/config.hpp | 14 + .../include/boost/parameter/keyword.hpp | 152 + .../include/boost/parameter/macros.hpp | 99 + .../include/boost/parameter/match.hpp | 55 + .../include/boost/parameter/name.hpp | 156 + .../include/boost/parameter/parameters.hpp | 931 + .../include/boost/parameter/preprocessor.hpp | 1175 + .../include/boost/parameter/python.hpp | 735 + .../include/boost/parameter/value_type.hpp | 108 + .../include/boost/pending/bucket_sorter.hpp | 134 + .../boost/pending/container_traits.hpp | 561 + .../include/boost/pending/cstddef.hpp | 16 + .../boost/pending/detail/disjoint_sets.hpp | 88 + .../boost/pending/detail/int_iterator.hpp | 74 + .../include/boost/pending/detail/property.hpp | 160 + .../include/boost/pending/disjoint_sets.hpp | 220 + .../boost/pending/fenced_priority_queue.hpp | 152 + .../include/boost/pending/fibonacci_heap.hpp | 271 + .../include/boost/pending/indirect_cmp.hpp | 86 + .../include/boost/pending/integer_log2.hpp | 112 + .../include/boost/pending/integer_range.hpp | 59 + .../include/boost/pending/is_heap.hpp | 62 + .../boost/pending/iterator_adaptors.hpp | 6 + .../include/boost/pending/iterator_tests.hpp | 268 + .../include/boost/pending/lowest_bit.hpp | 39 + .../include/boost/pending/mutable_heap.hpp | 64 + .../include/boost/pending/mutable_queue.hpp | 135 + .../include/boost/pending/property.hpp | 167 + .../boost/pending/property_serialize.hpp | 70 + .../include/boost/pending/queue.hpp | 118 + .../include/boost/pending/relaxed_heap.hpp | 644 + .../include/boost/pending/stringtok.hpp | 116 + .../boost-1.45.0/include/boost/pointee.hpp | 74 + .../include/boost/pointer_cast.hpp | 45 + .../include/boost/pointer_to_other.hpp | 55 + .../include/boost/preprocessor.hpp | 19 + .../include/boost/preprocessor/arithmetic.hpp | 25 + .../boost/preprocessor/arithmetic/add.hpp | 51 + .../boost/preprocessor/arithmetic/dec.hpp | 288 + .../arithmetic/detail/div_base.hpp | 61 + .../boost/preprocessor/arithmetic/div.hpp | 39 + .../boost/preprocessor/arithmetic/inc.hpp | 288 + .../boost/preprocessor/arithmetic/mod.hpp | 39 + .../boost/preprocessor/arithmetic/mul.hpp | 53 + .../boost/preprocessor/arithmetic/sub.hpp | 50 + .../include/boost/preprocessor/array.hpp | 27 + .../include/boost/preprocessor/array/data.hpp | 28 + .../include/boost/preprocessor/array/elem.hpp | 29 + .../boost/preprocessor/array/insert.hpp | 55 + .../boost/preprocessor/array/pop_back.hpp | 37 + .../boost/preprocessor/array/pop_front.hpp | 38 + .../boost/preprocessor/array/push_back.hpp | 33 + .../boost/preprocessor/array/push_front.hpp | 33 + .../boost/preprocessor/array/remove.hpp | 54 + .../boost/preprocessor/array/replace.hpp | 49 + .../boost/preprocessor/array/reverse.hpp | 29 + .../include/boost/preprocessor/array/size.hpp | 28 + .../include/boost/preprocessor/assert_msg.hpp | 17 + .../include/boost/preprocessor/cat.hpp | 35 + .../include/boost/preprocessor/comma.hpp | 17 + .../include/boost/preprocessor/comma_if.hpp | 17 + .../include/boost/preprocessor/comparison.hpp | 24 + .../boost/preprocessor/comparison/equal.hpp | 34 + .../boost/preprocessor/comparison/greater.hpp | 38 + .../preprocessor/comparison/greater_equal.hpp | 38 + .../boost/preprocessor/comparison/less.hpp | 46 + .../preprocessor/comparison/less_equal.hpp | 39 + .../preprocessor/comparison/not_equal.hpp | 814 + .../boost/preprocessor/config/config.hpp | 70 + .../boost/preprocessor/config/limits.hpp | 29 + .../include/boost/preprocessor/control.hpp | 22 + .../boost/preprocessor/control/deduce_d.hpp | 22 + .../preprocessor/control/detail/dmc/while.hpp | 536 + .../preprocessor/control/detail/edg/while.hpp | 534 + .../control/detail/msvc/while.hpp | 277 + .../preprocessor/control/detail/while.hpp | 536 + .../boost/preprocessor/control/expr_if.hpp | 30 + .../boost/preprocessor/control/expr_iif.hpp | 31 + .../include/boost/preprocessor/control/if.hpp | 30 + .../boost/preprocessor/control/iif.hpp | 34 + .../boost/preprocessor/control/while.hpp | 312 + .../include/boost/preprocessor/debug.hpp | 18 + .../boost/preprocessor/debug/assert.hpp | 44 + .../boost/preprocessor/debug/error.hpp | 33 + .../include/boost/preprocessor/debug/line.hpp | 35 + .../include/boost/preprocessor/dec.hpp | 17 + .../boost/preprocessor/detail/auto_rec.hpp | 293 + .../boost/preprocessor/detail/check.hpp | 48 + .../preprocessor/detail/dmc/auto_rec.hpp | 286 + .../boost/preprocessor/detail/is_binary.hpp | 30 + .../boost/preprocessor/detail/is_nullary.hpp | 30 + .../boost/preprocessor/detail/is_unary.hpp | 30 + .../boost/preprocessor/detail/null.hpp | 17 + .../boost/preprocessor/detail/split.hpp | 35 + .../include/boost/preprocessor/empty.hpp | 17 + .../include/boost/preprocessor/enum.hpp | 17 + .../boost/preprocessor/enum_params.hpp | 17 + .../enum_params_with_a_default.hpp | 17 + .../enum_params_with_defaults.hpp | 17 + .../boost/preprocessor/enum_shifted.hpp | 17 + .../preprocessor/enum_shifted_params.hpp | 17 + .../include/boost/preprocessor/expand.hpp | 17 + .../include/boost/preprocessor/expr_if.hpp | 17 + .../include/boost/preprocessor/facilities.hpp | 21 + .../boost/preprocessor/facilities/apply.hpp | 34 + .../boost/preprocessor/facilities/empty.hpp | 21 + .../boost/preprocessor/facilities/expand.hpp | 28 + .../preprocessor/facilities/identity.hpp | 23 + .../preprocessor/facilities/intercept.hpp | 277 + .../boost/preprocessor/facilities/is_1.hpp | 23 + .../preprocessor/facilities/is_empty.hpp | 43 + .../preprocessor/facilities/is_empty_or_1.hpp | 30 + .../include/boost/preprocessor/for.hpp | 17 + .../include/boost/preprocessor/identity.hpp | 17 + .../include/boost/preprocessor/if.hpp | 17 + .../include/boost/preprocessor/inc.hpp | 17 + .../include/boost/preprocessor/iterate.hpp | 17 + .../include/boost/preprocessor/iteration.hpp | 19 + .../iteration/detail/bounds/lower1.hpp | 99 + .../iteration/detail/bounds/lower2.hpp | 99 + .../iteration/detail/bounds/lower3.hpp | 99 + .../iteration/detail/bounds/lower4.hpp | 99 + .../iteration/detail/bounds/lower5.hpp | 99 + .../iteration/detail/bounds/upper1.hpp | 99 + .../iteration/detail/bounds/upper2.hpp | 99 + .../iteration/detail/bounds/upper3.hpp | 99 + .../iteration/detail/bounds/upper4.hpp | 99 + .../iteration/detail/bounds/upper5.hpp | 99 + .../preprocessor/iteration/detail/finish.hpp | 99 + .../iteration/detail/iter/forward1.hpp | 1342 ++ .../iteration/detail/iter/forward2.hpp | 1338 ++ .../iteration/detail/iter/forward3.hpp | 1338 ++ .../iteration/detail/iter/forward4.hpp | 1338 ++ .../iteration/detail/iter/forward5.hpp | 1338 ++ .../iteration/detail/iter/reverse1.hpp | 1296 ++ .../iteration/detail/iter/reverse2.hpp | 1296 ++ .../iteration/detail/iter/reverse3.hpp | 1296 ++ .../iteration/detail/iter/reverse4.hpp | 1296 ++ .../iteration/detail/iter/reverse5.hpp | 1296 ++ .../preprocessor/iteration/detail/local.hpp | 812 + .../preprocessor/iteration/detail/rlocal.hpp | 782 + .../preprocessor/iteration/detail/self.hpp | 21 + .../preprocessor/iteration/detail/start.hpp | 99 + .../boost/preprocessor/iteration/iterate.hpp | 82 + .../boost/preprocessor/iteration/local.hpp | 26 + .../boost/preprocessor/iteration/self.hpp | 19 + .../include/boost/preprocessor/library.hpp | 34 + .../include/boost/preprocessor/limits.hpp | 17 + .../include/boost/preprocessor/list.hpp | 35 + .../include/boost/preprocessor/list/adt.hpp | 73 + .../boost/preprocessor/list/append.hpp | 40 + .../include/boost/preprocessor/list/at.hpp | 39 + .../include/boost/preprocessor/list/cat.hpp | 42 + .../list/detail/dmc/fold_left.hpp | 279 + .../list/detail/edg/fold_left.hpp | 536 + .../list/detail/edg/fold_right.hpp | 794 + .../preprocessor/list/detail/fold_left.hpp | 279 + .../preprocessor/list/detail/fold_right.hpp | 277 + .../include/boost/preprocessor/list/enum.hpp | 41 + .../boost/preprocessor/list/filter.hpp | 54 + .../boost/preprocessor/list/first_n.hpp | 58 + .../boost/preprocessor/list/fold_left.hpp | 303 + .../boost/preprocessor/list/fold_right.hpp | 40 + .../boost/preprocessor/list/for_each.hpp | 49 + .../boost/preprocessor/list/for_each_i.hpp | 65 + .../preprocessor/list/for_each_product.hpp | 141 + .../boost/preprocessor/list/rest_n.hpp | 55 + .../boost/preprocessor/list/reverse.hpp | 40 + .../include/boost/preprocessor/list/size.hpp | 58 + .../boost/preprocessor/list/to_tuple.hpp | 38 + .../boost/preprocessor/list/transform.hpp | 49 + .../include/boost/preprocessor/logical.hpp | 29 + .../boost/preprocessor/logical/and.hpp | 30 + .../boost/preprocessor/logical/bitand.hpp | 38 + .../boost/preprocessor/logical/bitnor.hpp | 38 + .../boost/preprocessor/logical/bitor.hpp | 38 + .../boost/preprocessor/logical/bitxor.hpp | 38 + .../boost/preprocessor/logical/bool.hpp | 288 + .../boost/preprocessor/logical/compl.hpp | 36 + .../boost/preprocessor/logical/nor.hpp | 30 + .../boost/preprocessor/logical/not.hpp | 30 + .../include/boost/preprocessor/logical/or.hpp | 30 + .../boost/preprocessor/logical/xor.hpp | 30 + .../include/boost/preprocessor/max.hpp | 17 + .../include/boost/preprocessor/min.hpp | 17 + .../boost/preprocessor/punctuation.hpp | 20 + .../boost/preprocessor/punctuation/comma.hpp | 21 + .../preprocessor/punctuation/comma_if.hpp | 31 + .../boost/preprocessor/punctuation/paren.hpp | 23 + .../preprocessor/punctuation/paren_if.hpp | 38 + .../include/boost/preprocessor/repeat.hpp | 17 + .../include/boost/preprocessor/repeat_2nd.hpp | 17 + .../include/boost/preprocessor/repeat_3rd.hpp | 17 + .../boost/preprocessor/repeat_from_to.hpp | 17 + .../boost/preprocessor/repeat_from_to_2nd.hpp | 17 + .../boost/preprocessor/repeat_from_to_3rd.hpp | 17 + .../include/boost/preprocessor/repetition.hpp | 32 + .../preprocessor/repetition/deduce_r.hpp | 22 + .../preprocessor/repetition/deduce_z.hpp | 22 + .../repetition/detail/dmc/for.hpp | 536 + .../repetition/detail/edg/for.hpp | 534 + .../preprocessor/repetition/detail/for.hpp | 536 + .../repetition/detail/msvc/for.hpp | 277 + .../boost/preprocessor/repetition/enum.hpp | 66 + .../repetition/enum_binary_params.hpp | 54 + .../preprocessor/repetition/enum_params.hpp | 41 + .../repetition/enum_params_with_a_default.hpp | 25 + .../repetition/enum_params_with_defaults.hpp | 24 + .../preprocessor/repetition/enum_shifted.hpp | 68 + .../repetition/enum_shifted_binary_params.hpp | 51 + .../repetition/enum_shifted_params.hpp | 44 + .../preprocessor/repetition/enum_trailing.hpp | 63 + .../enum_trailing_binary_params.hpp | 53 + .../repetition/enum_trailing_params.hpp | 38 + .../boost/preprocessor/repetition/for.hpp | 306 + .../boost/preprocessor/repetition/repeat.hpp | 825 + .../repetition/repeat_from_to.hpp | 87 + .../include/boost/preprocessor/selection.hpp | 18 + .../boost/preprocessor/selection/max.hpp | 39 + .../boost/preprocessor/selection/min.hpp | 39 + .../include/boost/preprocessor/seq.hpp | 41 + .../include/boost/preprocessor/seq/cat.hpp | 48 + .../boost/preprocessor/seq/detail/split.hpp | 284 + .../include/boost/preprocessor/seq/elem.hpp | 304 + .../include/boost/preprocessor/seq/enum.hpp | 288 + .../include/boost/preprocessor/seq/filter.hpp | 54 + .../boost/preprocessor/seq/first_n.hpp | 30 + .../boost/preprocessor/seq/fold_left.hpp | 1070 + .../boost/preprocessor/seq/fold_right.hpp | 288 + .../boost/preprocessor/seq/for_each.hpp | 60 + .../boost/preprocessor/seq/for_each_i.hpp | 61 + .../preprocessor/seq/for_each_product.hpp | 126 + .../include/boost/preprocessor/seq/insert.hpp | 28 + .../boost/preprocessor/seq/pop_back.hpp | 29 + .../boost/preprocessor/seq/pop_front.hpp | 27 + .../boost/preprocessor/seq/push_back.hpp | 19 + .../boost/preprocessor/seq/push_front.hpp | 19 + .../include/boost/preprocessor/seq/remove.hpp | 29 + .../boost/preprocessor/seq/replace.hpp | 29 + .../include/boost/preprocessor/seq/rest_n.hpp | 30 + .../boost/preprocessor/seq/reverse.hpp | 39 + .../include/boost/preprocessor/seq/seq.hpp | 44 + .../include/boost/preprocessor/seq/size.hpp | 548 + .../include/boost/preprocessor/seq/subseq.hpp | 28 + .../boost/preprocessor/seq/to_array.hpp | 28 + .../boost/preprocessor/seq/to_tuple.hpp | 27 + .../boost/preprocessor/seq/transform.hpp | 48 + .../include/boost/preprocessor/slot.hpp | 17 + .../boost/preprocessor/slot/counter.hpp | 25 + .../preprocessor/slot/detail/counter.hpp | 269 + .../boost/preprocessor/slot/detail/def.hpp | 49 + .../boost/preprocessor/slot/detail/shared.hpp | 247 + .../boost/preprocessor/slot/detail/slot1.hpp | 267 + .../boost/preprocessor/slot/detail/slot2.hpp | 267 + .../boost/preprocessor/slot/detail/slot3.hpp | 267 + .../boost/preprocessor/slot/detail/slot4.hpp | 267 + .../boost/preprocessor/slot/detail/slot5.hpp | 267 + .../include/boost/preprocessor/slot/slot.hpp | 32 + .../include/boost/preprocessor/stringize.hpp | 33 + .../include/boost/preprocessor/tuple.hpp | 24 + .../include/boost/preprocessor/tuple/eat.hpp | 57 + .../include/boost/preprocessor/tuple/elem.hpp | 385 + .../include/boost/preprocessor/tuple/rem.hpp | 72 + .../boost/preprocessor/tuple/reverse.hpp | 62 + .../boost/preprocessor/tuple/to_list.hpp | 62 + .../boost/preprocessor/tuple/to_seq.hpp | 60 + .../include/boost/preprocessor/while.hpp | 17 + .../include/boost/preprocessor/wstringize.hpp | 29 + .../include/boost/program_options.hpp | 25 + .../boost-1.45.0/include/boost/progress.hpp | 143 + .../property_map/dynamic_property_map.hpp | 364 + .../parallel/caching_property_map.hpp | 96 + .../parallel/distributed_property_map.hpp | 709 + .../parallel/global_index_map.hpp | 74 + .../impl/distributed_property_map.ipp | 431 + .../parallel/local_property_map.hpp | 91 + .../boost/property_map/property_map.hpp | 847 + .../property_map/property_map_iterator.hpp | 113 + .../shared_array_property_map.hpp | 52 + .../property_map/vector_property_map.hpp | 185 + .../detail/exception_implementation.hpp | 83 + .../detail/file_parser_error.hpp | 88 + .../detail/info_parser_error.hpp | 32 + .../property_tree/detail/info_parser_read.hpp | 380 + .../detail/info_parser_utils.hpp | 32 + .../detail/info_parser_write.hpp | 147 + .../detail/info_parser_writer_settings.hpp | 40 + .../detail/json_parser_error.hpp | 33 + .../property_tree/detail/json_parser_read.hpp | 328 + .../detail/json_parser_write.hpp | 170 + .../detail/ptree_implementation.hpp | 905 + .../property_tree/detail/ptree_utils.hpp | 106 + .../boost/property_tree/detail/rapidxml.hpp | 2582 +++ .../property_tree/detail/xml_parser_error.hpp | 33 + .../property_tree/detail/xml_parser_flags.hpp | 31 + .../detail/xml_parser_read_rapidxml.hpp | 144 + .../property_tree/detail/xml_parser_utils.hpp | 136 + .../property_tree/detail/xml_parser_write.hpp | 194 + .../detail/xml_parser_writer_settings.hpp | 62 + .../boost/property_tree/exceptions.hpp | 84 + .../boost/property_tree/id_translator.hpp | 51 + .../boost/property_tree/info_parser.hpp | 151 + .../boost/property_tree/ini_parser.hpp | 309 + .../boost/property_tree/json_parser.hpp | 139 + .../include/boost/property_tree/ptree.hpp | 517 + .../include/boost/property_tree/ptree_fwd.hpp | 143 + .../property_tree/ptree_serialization.hpp | 102 + .../boost/property_tree/stream_translator.hpp | 221 + .../boost/property_tree/string_path.hpp | 273 + .../boost/property_tree/xml_parser.hpp | 153 + .../boost-1.45.0/include/boost/python.hpp | 73 + .../include/boost/python/arg_from_python.hpp | 76 + .../include/boost/python/args.hpp | 175 + .../include/boost/python/args_fwd.hpp | 52 + .../include/boost/python/back_reference.hpp | 102 + .../include/boost/python/base_type_traits.hpp | 43 + .../include/boost/python/bases.hpp | 68 + .../include/boost/python/borrowed.hpp | 21 + .../include/boost/python/call.hpp | 83 + .../include/boost/python/call_method.hpp | 83 + .../include/boost/python/cast.hpp | 106 + .../include/boost/python/class.hpp | 654 + .../include/boost/python/class_fwd.hpp | 24 + .../python/converter/arg_from_python.hpp | 336 + .../boost/python/converter/arg_to_python.hpp | 261 + .../python/converter/arg_to_python_base.hpp | 32 + .../converter/as_to_python_function.hpp | 49 + .../python/converter/builtin_converters.hpp | 190 + .../python/converter/constructor_function.hpp | 17 + .../converter/context_result_converter.hpp | 17 + .../python/converter/convertible_function.hpp | 14 + .../boost/python/converter/from_python.hpp | 41 + .../boost/python/converter/implicit.hpp | 46 + .../converter/obj_mgr_arg_from_python.hpp | 121 + .../boost/python/converter/object_manager.hpp | 230 + .../python/converter/pointer_type_id.hpp | 68 + .../python/converter/pyobject_traits.hpp | 46 + .../boost/python/converter/pyobject_type.hpp | 37 + .../python/converter/pytype_function.hpp | 132 + .../converter/pytype_object_mgr_traits.hpp | 42 + .../boost/python/converter/registered.hpp | 111 + .../python/converter/registered_pointee.hpp | 62 + .../boost/python/converter/registrations.hpp | 99 + .../boost/python/converter/registry.hpp | 55 + .../python/converter/return_from_python.hpp | 162 + .../converter/rvalue_from_python_data.hpp | 140 + .../python/converter/shared_ptr_deleter.hpp | 22 + .../converter/shared_ptr_from_python.hpp | 63 + .../python/converter/shared_ptr_to_python.hpp | 28 + .../converter/to_python_function_type.hpp | 19 + .../boost/python/copy_const_reference.hpp | 43 + .../boost/python/copy_non_const_reference.hpp | 43 + .../include/boost/python/data_members.hpp | 318 + .../boost-1.45.0/include/boost/python/def.hpp | 114 + .../include/boost/python/def_visitor.hpp | 86 + .../boost/python/default_call_policies.hpp | 91 + .../boost/python/detail/aix_init_module.hpp | 26 + .../boost/python/detail/api_placeholder.hpp | 15 + .../boost/python/detail/borrowed_ptr.hpp | 111 + .../include/boost/python/detail/caller.hpp | 259 + .../include/boost/python/detail/config.hpp | 141 + .../include/boost/python/detail/construct.hpp | 42 + .../boost/python/detail/convertible.hpp | 38 + .../python/detail/copy_ctor_mutates_rhs.hpp | 21 + .../boost/python/detail/cv_category.hpp | 36 + .../include/boost/python/detail/dealloc.hpp | 17 + .../boost/python/detail/decorated_type_id.hpp | 76 + .../boost/python/detail/decref_guard.hpp | 21 + .../boost/python/detail/def_helper.hpp | 212 + .../boost/python/detail/def_helper_fwd.hpp | 17 + .../boost/python/detail/defaults_def.hpp | 291 + .../boost/python/detail/defaults_gen.hpp | 388 + .../include/boost/python/detail/dependent.hpp | 27 + .../include/boost/python/detail/destroy.hpp | 106 + .../include/boost/python/detail/enable_if.hpp | 72 + .../boost/python/detail/exception_handler.hpp | 48 + .../boost/python/detail/force_instantiate.hpp | 32 + .../include/boost/python/detail/if_else.hpp | 116 + .../boost/python/detail/indirect_traits.hpp | 13 + .../include/boost/python/detail/invoke.hpp | 100 + .../boost/python/detail/is_auto_ptr.hpp | 30 + .../boost/python/detail/is_shared_ptr.hpp | 17 + .../boost/python/detail/is_wrapper.hpp | 29 + .../include/boost/python/detail/is_xxx.hpp | 13 + .../python/detail/make_keyword_range_fn.hpp | 72 + .../boost/python/detail/make_tuple.hpp | 32 + .../include/boost/python/detail/map_entry.hpp | 43 + .../boost/python/detail/mpl_lambda.hpp | 12 + .../boost/python/detail/msvc_typeinfo.hpp | 75 + .../include/boost/python/detail/none.hpp | 20 + .../boost/python/detail/not_specified.hpp | 14 + .../detail/nullary_function_adaptor.hpp | 46 + .../boost/python/detail/operator_id.hpp | 63 + .../boost/python/detail/overloads_fwd.hpp | 18 + .../include/boost/python/detail/pointee.hpp | 35 + .../include/boost/python/detail/prefix.hpp | 16 + .../boost/python/detail/preprocessor.hpp | 66 + .../boost/python/detail/python22_fixed.h | 152 + .../boost/python/detail/python_type.hpp | 37 + .../boost/python/detail/raw_pyobject.hpp | 32 + .../boost/python/detail/referent_storage.hpp | 76 + .../include/boost/python/detail/result.hpp | 135 + .../include/boost/python/detail/scope.hpp | 16 + .../include/boost/python/detail/sfinae.hpp | 13 + .../include/boost/python/detail/signature.hpp | 106 + .../boost/python/detail/string_literal.hpp | 88 + .../include/boost/python/detail/target.hpp | 86 + .../python/detail/translate_exception.hpp | 69 + .../include/boost/python/detail/type_list.hpp | 39 + .../boost/python/detail/type_list_impl.hpp | 57 + .../python/detail/type_list_impl_no_pts.hpp | 107 + .../boost/python/detail/unwind_type.hpp | 170 + .../boost/python/detail/unwrap_type_id.hpp | 31 + .../boost/python/detail/unwrap_wrapper.hpp | 34 + .../include/boost/python/detail/value_arg.hpp | 27 + .../python/detail/value_is_shared_ptr.hpp | 17 + .../boost/python/detail/value_is_xxx.hpp | 62 + .../include/boost/python/detail/void_ptr.hpp | 35 + .../boost/python/detail/void_return.hpp | 42 + .../boost/python/detail/wrap_python.hpp | 205 + .../boost/python/detail/wrapper_base.hpp | 90 + .../include/boost/python/dict.hpp | 152 + .../boost/python/docstring_options.hpp | 127 + .../include/boost/python/enum.hpp | 108 + .../include/boost/python/errors.hpp | 55 + .../boost/python/exception_translator.hpp | 27 + .../include/boost/python/exec.hpp | 47 + .../include/boost/python/extract.hpp | 261 + .../include/boost/python/handle.hpp | 264 + .../include/boost/python/handle_fwd.hpp | 16 + .../boost/python/has_back_reference.hpp | 24 + .../include/boost/python/implicit.hpp | 36 + .../include/boost/python/import.hpp | 22 + .../include/boost/python/init.hpp | 421 + .../include/boost/python/instance_holder.hpp | 63 + .../include/boost/python/iterator.hpp | 137 + .../include/boost/python/list.hpp | 148 + .../include/boost/python/long.hpp | 68 + .../boost/python/lvalue_from_pytype.hpp | 116 + .../include/boost/python/make_constructor.hpp | 290 + .../include/boost/python/make_function.hpp | 153 + .../boost/python/manage_new_object.hpp | 41 + .../include/boost/python/module.hpp | 13 + .../include/boost/python/module_init.hpp | 64 + .../include/boost/python/numeric.hpp | 242 + .../include/boost/python/object.hpp | 27 + .../boost/python/object/add_to_namespace.hpp | 23 + .../include/boost/python/object/class.hpp | 64 + .../boost/python/object/class_detail.hpp | 19 + .../boost/python/object/class_metadata.hpp | 297 + .../boost/python/object/class_wrapper.hpp | 51 + .../include/boost/python/object/enum_base.hpp | 36 + .../boost/python/object/find_instance.hpp | 21 + .../include/boost/python/object/forward.hpp | 194 + .../include/boost/python/object/function.hpp | 82 + .../python/object/function_doc_signature.hpp | 36 + .../boost/python/object/function_handle.hpp | 44 + .../boost/python/object/function_object.hpp | 40 + .../boost/python/object/inheritance.hpp | 132 + .../boost/python/object/inheritance_query.hpp | 17 + .../include/boost/python/object/instance.hpp | 51 + .../include/boost/python/object/iterator.hpp | 258 + .../boost/python/object/iterator_core.hpp | 17 + .../boost/python/object/life_support.hpp | 15 + .../boost/python/object/make_holder.hpp | 109 + .../boost/python/object/make_instance.hpp | 78 + .../boost/python/object/make_ptr_instance.hpp | 72 + .../boost/python/object/pickle_support.hpp | 124 + .../boost/python/object/pointer_holder.hpp | 224 + .../boost/python/object/py_function.hpp | 172 + .../boost/python/object/stl_iterator_core.hpp | 27 + .../boost/python/object/value_holder.hpp | 170 + .../boost/python/object/value_holder_fwd.hpp | 16 + .../boost/python/object_attributes.hpp | 116 + .../include/boost/python/object_call.hpp | 23 + .../include/boost/python/object_core.hpp | 583 + .../include/boost/python/object_fwd.hpp | 18 + .../include/boost/python/object_items.hpp | 89 + .../include/boost/python/object_operators.hpp | 136 + .../include/boost/python/object_protocol.hpp | 90 + .../boost/python/object_protocol_core.hpp | 53 + .../include/boost/python/object_slices.hpp | 148 + .../boost/python/opaque_pointer_converter.hpp | 199 + .../include/boost/python/operators.hpp | 374 + .../include/boost/python/other.hpp | 114 + .../include/boost/python/overloads.hpp | 13 + .../include/boost/python/override.hpp | 144 + .../include/boost/python/pointee.hpp | 43 + .../include/boost/python/proxy.hpp | 101 + .../boost-1.45.0/include/boost/python/ptr.hpp | 128 + .../include/boost/python/pure_virtual.hpp | 124 + .../include/boost/python/raw_function.hpp | 61 + .../include/boost/python/refcount.hpp | 41 + .../python/reference_existing_object.hpp | 46 + .../boost/python/register_ptr_to_python.hpp | 31 + .../include/boost/python/return_arg.hpp | 110 + .../include/boost/python/return_by_value.hpp | 31 + .../python/return_internal_reference.hpp | 43 + .../boost/python/return_opaque_pointer.hpp | 47 + .../boost/python/return_value_policy.hpp | 21 + .../include/boost/python/scope.hpp | 78 + .../include/boost/python/self.hpp | 33 + .../include/boost/python/signature.hpp | 252 + .../include/boost/python/slice.hpp | 266 + .../include/boost/python/slice_nil.hpp | 44 + .../include/boost/python/ssize_t.hpp | 29 + .../include/boost/python/stl_iterator.hpp | 61 + .../boost-1.45.0/include/boost/python/str.hpp | 422 + .../python/suite/indexing/container_utils.hpp | 57 + .../indexing/detail/indexing_suite_detail.hpp | 759 + .../python/suite/indexing/indexing_suite.hpp | 299 + .../suite/indexing/map_indexing_suite.hpp | 181 + .../suite/indexing/vector_indexing_suite.hpp | 242 + .../boost-1.45.0/include/boost/python/tag.hpp | 18 + .../boost/python/to_python_converter.hpp | 99 + .../boost/python/to_python_indirect.hpp | 113 + .../include/boost/python/to_python_value.hpp | 176 + .../include/boost/python/tuple.hpp | 70 + .../include/boost/python/type_id.hpp | 192 + .../boost/python/with_custodian_and_ward.hpp | 125 + .../include/boost/python/wrapper.hpp | 35 + .../boost-1.45.0/include/boost/random.hpp | 84 + .../include/boost/random/additive_combine.hpp | 234 + .../boost/random/bernoulli_distribution.hpp | 109 + .../boost/random/binomial_distribution.hpp | 111 + .../boost/random/cauchy_distribution.hpp | 121 + .../include/boost/random/detail/auto_link.hpp | 42 + .../include/boost/random/detail/config.hpp | 18 + .../include/boost/random/detail/const_mod.hpp | 363 + .../boost/random/detail/disable_warnings.hpp | 23 + .../boost/random/detail/enable_warnings.hpp | 18 + .../boost/random/detail/iterator_mixin.hpp | 45 + .../random/detail/pass_through_engine.hpp | 100 + .../boost/random/detail/ptr_helper.hpp | 94 + .../include/boost/random/detail/seed.hpp | 89 + .../random/detail/signed_unsigned_tools.hpp | 89 + .../boost/random/detail/uniform_int_float.hpp | 85 + .../include/boost/random/discard_block.hpp | 132 + .../boost/random/exponential_distribution.hpp | 86 + .../boost/random/gamma_distribution.hpp | 143 + .../boost/random/geometric_distribution.hpp | 118 + .../boost/random/inversive_congruential.hpp | 173 + .../include/boost/random/lagged_fibonacci.hpp | 605 + .../boost/random/linear_congruential.hpp | 403 + .../boost/random/linear_feedback_shift.hpp | 160 + .../boost/random/lognormal_distribution.hpp | 129 + .../include/boost/random/mersenne_twister.hpp | 367 + .../boost/random/normal_distribution.hpp | 131 + .../boost/random/poisson_distribution.hpp | 116 + .../boost/random/random_number_generator.hpp | 71 + .../include/boost/random/ranlux.hpp | 81 + .../include/boost/random/shuffle_output.hpp | 234 + .../boost/random/subtract_with_carry.hpp | 465 + .../boost/random/triangle_distribution.hpp | 118 + .../include/boost/random/uniform_01.hpp | 273 + .../include/boost/random/uniform_int.hpp | 300 + .../boost/random/uniform_on_sphere.hpp | 101 + .../include/boost/random/uniform_real.hpp | 108 + .../include/boost/random/uniform_smallint.hpp | 158 + .../boost/random/variate_generator.hpp | 220 + .../include/boost/random/xor_combine.hpp | 184 + .../boost-1.45.0/include/boost/range.hpp | 33 + .../boost/range/adaptor/adjacent_filtered.hpp | 242 + .../boost/range/adaptor/argument_fwd.hpp | 80 + .../include/boost/range/adaptor/copied.hpp | 58 + .../boost/range/adaptor/define_adaptor.hpp | 117 + .../include/boost/range/adaptor/filtered.hpp | 101 + .../include/boost/range/adaptor/indexed.hpp | 156 + .../boost/range/adaptor/indirected.hpp | 88 + .../include/boost/range/adaptor/map.hpp | 188 + .../include/boost/range/adaptor/replaced.hpp | 134 + .../boost/range/adaptor/replaced_if.hpp | 136 + .../include/boost/range/adaptor/reversed.hpp | 90 + .../include/boost/range/adaptor/sliced.hpp | 81 + .../include/boost/range/adaptor/strided.hpp | 149 + .../include/boost/range/adaptor/tokenized.hpp | 137 + .../boost/range/adaptor/transformed.hpp | 103 + .../include/boost/range/adaptor/uniqued.hpp | 90 + .../include/boost/range/adaptors.hpp | 30 + .../include/boost/range/algorithm.hpp | 104 + .../boost/range/algorithm/adjacent_find.hpp | 125 + .../boost/range/algorithm/binary_search.hpp | 49 + .../include/boost/range/algorithm/copy.hpp | 41 + .../boost/range/algorithm/copy_backward.hpp | 43 + .../include/boost/range/algorithm/count.hpp | 50 + .../boost/range/algorithm/count_if.hpp | 51 + .../include/boost/range/algorithm/equal.hpp | 188 + .../boost/range/algorithm/equal_range.hpp | 80 + .../include/boost/range/algorithm/fill.hpp | 49 + .../include/boost/range/algorithm/fill_n.hpp | 53 + .../include/boost/range/algorithm/find.hpp | 80 + .../boost/range/algorithm/find_end.hpp | 152 + .../boost/range/algorithm/find_first_of.hpp | 155 + .../include/boost/range/algorithm/find_if.hpp | 81 + .../boost/range/algorithm/for_each.hpp | 48 + .../boost/range/algorithm/generate.hpp | 49 + .../boost/range/algorithm/heap_algorithm.hpp | 194 + .../boost/range/algorithm/inplace_merge.hpp | 74 + .../algorithm/lexicographical_compare.hpp | 58 + .../boost/range/algorithm/lower_bound.hpp | 124 + .../boost/range/algorithm/max_element.hpp | 115 + .../include/boost/range/algorithm/merge.hpp | 61 + .../boost/range/algorithm/min_element.hpp | 115 + .../boost/range/algorithm/mismatch.hpp | 195 + .../boost/range/algorithm/nth_element.hpp | 74 + .../boost/range/algorithm/partial_sort.hpp | 76 + .../range/algorithm/partial_sort_copy.hpp | 82 + .../boost/range/algorithm/partition.hpp | 74 + .../boost/range/algorithm/permutation.hpp | 108 + .../boost/range/algorithm/random_shuffle.hpp | 68 + .../include/boost/range/algorithm/remove.hpp | 74 + .../boost/range/algorithm/remove_copy.hpp | 44 + .../boost/range/algorithm/remove_copy_if.hpp | 38 + .../boost/range/algorithm/remove_if.hpp | 75 + .../include/boost/range/algorithm/replace.hpp | 53 + .../boost/range/algorithm/replace_copy.hpp | 42 + .../boost/range/algorithm/replace_copy_if.hpp | 46 + .../boost/range/algorithm/replace_if.hpp | 54 + .../include/boost/range/algorithm/reverse.hpp | 50 + .../boost/range/algorithm/reverse_copy.hpp | 40 + .../include/boost/range/algorithm/rotate.hpp | 51 + .../boost/range/algorithm/rotate_copy.hpp | 44 + .../include/boost/range/algorithm/search.hpp | 134 + .../boost/range/algorithm/search_n.hpp | 145 + .../boost/range/algorithm/set_algorithm.hpp | 198 + .../include/boost/range/algorithm/sort.hpp | 68 + .../range/algorithm/stable_partition.hpp | 73 + .../boost/range/algorithm/stable_sort.hpp | 68 + .../boost/range/algorithm/swap_ranges.hpp | 132 + .../boost/range/algorithm/transform.hpp | 97 + .../include/boost/range/algorithm/unique.hpp | 107 + .../boost/range/algorithm/unique_copy.hpp | 51 + .../boost/range/algorithm/upper_bound.hpp | 127 + .../include/boost/range/algorithm_ext.hpp | 28 + .../boost/range/algorithm_ext/copy_n.hpp | 53 + .../boost/range/algorithm_ext/erase.hpp | 61 + .../boost/range/algorithm_ext/for_each.hpp | 86 + .../boost/range/algorithm_ext/insert.hpp | 42 + .../boost/range/algorithm_ext/iota.hpp | 54 + .../boost/range/algorithm_ext/is_sorted.hpp | 71 + .../boost/range/algorithm_ext/overwrite.hpp | 84 + .../boost/range/algorithm_ext/push_back.hpp | 40 + .../boost/range/algorithm_ext/push_front.hpp | 40 + .../include/boost/range/as_array.hpp | 45 + .../include/boost/range/as_literal.hpp | 127 + .../boost-1.45.0/include/boost/range/atl.hpp | 733 + .../include/boost/range/begin.hpp | 132 + .../include/boost/range/category.hpp | 29 + .../include/boost/range/combine.hpp | 296 + .../include/boost/range/concepts.hpp | 331 + .../include/boost/range/config.hpp | 54 + .../include/boost/range/const_iterator.hpp | 67 + .../boost/range/const_reverse_iterator.hpp | 32 + .../include/boost/range/counting_range.hpp | 69 + .../include/boost/range/detail/as_literal.hpp | 33 + .../include/boost/range/detail/begin.hpp | 92 + .../boost/range/detail/collection_traits.hpp | 266 + .../range/detail/collection_traits_detail.hpp | 621 + .../include/boost/range/detail/common.hpp | 117 + .../boost/range/detail/const_iterator.hpp | 71 + .../detail/demote_iterator_traversal_tag.hpp | 79 + .../include/boost/range/detail/detail_str.hpp | 376 + .../boost/range/detail/difference_type.hpp | 121 + .../include/boost/range/detail/empty.hpp | 120 + .../include/boost/range/detail/end.hpp | 98 + .../range/detail/extract_optional_type.hpp | 52 + .../range/detail/implementation_help.hpp | 103 + .../include/boost/range/detail/iterator.hpp | 78 + .../boost/range/detail/join_iterator.hpp | 316 + .../include/boost/range/detail/microsoft.hpp | 931 + .../boost/range/detail/misc_concept.hpp | 33 + .../boost/range/detail/range_return.hpp | 180 + .../boost/range/detail/remove_extent.hpp | 157 + .../include/boost/range/detail/sfinae.hpp | 77 + .../include/boost/range/detail/size.hpp | 159 + .../include/boost/range/detail/size_type.hpp | 70 + .../include/boost/range/detail/sizer.hpp | 35 + .../include/boost/range/detail/str_types.hpp | 38 + .../include/boost/range/detail/value_type.hpp | 72 + .../include/boost/range/detail/vc6/end.hpp | 170 + .../include/boost/range/detail/vc6/size.hpp | 166 + .../include/boost/range/difference_type.hpp | 29 + .../include/boost/range/distance.hpp | 34 + .../include/boost/range/empty.hpp | 34 + .../boost-1.45.0/include/boost/range/end.hpp | 131 + .../include/boost/range/functions.hpp | 27 + .../include/boost/range/irange.hpp | 230 + .../include/boost/range/istream_range.hpp | 39 + .../include/boost/range/iterator.hpp | 72 + .../include/boost/range/iterator_range.hpp | 16 + .../boost/range/iterator_range_core.hpp | 542 + .../include/boost/range/iterator_range_io.hpp | 93 + .../boost-1.45.0/include/boost/range/join.hpp | 83 + .../include/boost/range/metafunctions.hpp | 30 + .../boost-1.45.0/include/boost/range/mfc.hpp | 984 + .../include/boost/range/mutable_iterator.hpp | 67 + .../include/boost/range/numeric.hpp | 118 + .../include/boost/range/pointer.hpp | 29 + .../include/boost/range/rbegin.hpp | 65 + .../include/boost/range/reference.hpp | 29 + .../boost-1.45.0/include/boost/range/rend.hpp | 65 + .../include/boost/range/result_iterator.hpp | 33 + .../include/boost/range/reverse_iterator.hpp | 40 + .../boost/range/reverse_result_iterator.hpp | 32 + .../boost-1.45.0/include/boost/range/size.hpp | 36 + .../include/boost/range/size_type.hpp | 79 + .../include/boost/range/sub_range.hpp | 181 + .../include/boost/range/value_type.hpp | 34 + .../boost-1.45.0/include/boost/rational.hpp | 609 + .../boost-1.45.0/include/boost/ref.hpp | 189 + .../boost-1.45.0/include/boost/regex.h | 100 + .../boost-1.45.0/include/boost/regex.hpp | 37 + .../boost-1.45.0/include/boost/regex_fwd.hpp | 33 + .../boost-1.45.0/include/boost/scope_exit.hpp | 267 + .../include/boost/scoped_array.hpp | 16 + .../boost-1.45.0/include/boost/scoped_ptr.hpp | 16 + .../include/boost/serialization/access.hpp | 147 + .../include/boost/serialization/array.hpp | 153 + .../boost/serialization/assume_abstract.hpp | 59 + .../boost/serialization/base_object.hpp | 112 + .../boost/serialization/binary_object.hpp | 82 + .../include/boost/serialization/bitset.hpp | 75 + .../serialization/collection_size_type.hpp | 62 + .../boost/serialization/collection_traits.hpp | 79 + .../serialization/collections_load_imp.hpp | 166 + .../serialization/collections_save_imp.hpp | 72 + .../include/boost/serialization/complex.hpp | 81 + .../include/boost/serialization/config.hpp | 85 + .../include/boost/serialization/deque.hpp | 75 + .../boost/serialization/detail/get_data.hpp | 55 + .../serialization/detail/shared_count_132.hpp | 569 + .../serialization/detail/shared_ptr_132.hpp | 478 + .../detail/shared_ptr_nmt_132.hpp | 182 + .../detail/stack_constructor.hpp | 73 + .../include/boost/serialization/ephemeral.hpp | 80 + .../include/boost/serialization/export.hpp | 234 + .../serialization/extended_type_info.hpp | 108 + .../extended_type_info_no_rtti.hpp | 182 + .../extended_type_info_typeid.hpp | 165 + .../include/boost/serialization/factory.hpp | 101 + .../boost/serialization/force_include.hpp | 59 + .../hash_collections_load_imp.hpp | 77 + .../hash_collections_save_imp.hpp | 97 + .../include/boost/serialization/hash_map.hpp | 231 + .../include/boost/serialization/hash_set.hpp | 221 + .../serialization/is_bitwise_serializable.hpp | 46 + .../boost/serialization/item_version_type.hpp | 68 + .../include/boost/serialization/level.hpp | 125 + .../boost/serialization/level_enum.hpp | 55 + .../include/boost/serialization/list.hpp | 77 + .../include/boost/serialization/map.hpp | 118 + .../include/boost/serialization/nvp.hpp | 144 + .../include/boost/serialization/optional.hpp | 127 + .../include/boost/serialization/pfto.hpp | 78 + .../boost/serialization/scoped_ptr.hpp | 58 + .../boost/serialization/serialization.hpp | 167 + .../include/boost/serialization/set.hpp | 120 + .../boost/serialization/shared_ptr.hpp | 177 + .../boost/serialization/shared_ptr_132.hpp | 222 + .../include/boost/serialization/singleton.hpp | 158 + .../include/boost/serialization/slist.hpp | 103 + .../boost/serialization/smart_cast.hpp | 301 + .../boost/serialization/split_free.hpp | 93 + .../boost/serialization/split_member.hpp | 86 + .../boost/serialization/state_saver.hpp | 96 + .../boost/serialization/static_warning.hpp | 108 + .../include/boost/serialization/string.hpp | 91 + .../boost/serialization/strong_typedef.hpp | 66 + .../boost/serialization/throw_exception.hpp | 44 + .../include/boost/serialization/tracking.hpp | 118 + .../boost/serialization/tracking_enum.hpp | 41 + .../include/boost/serialization/traits.hpp | 65 + .../type_info_implementation.hpp | 86 + .../include/boost/serialization/utility.hpp | 56 + .../include/boost/serialization/valarray.hpp | 74 + .../include/boost/serialization/variant.hpp | 163 + .../include/boost/serialization/vector.hpp | 211 + .../boost/serialization/vector_135.hpp | 26 + .../include/boost/serialization/version.hpp | 102 + .../include/boost/serialization/void_cast.hpp | 298 + .../boost/serialization/void_cast_fwd.hpp | 37 + .../include/boost/serialization/weak_ptr.hpp | 58 + .../include/boost/serialization/wrapper.hpp | 60 + .../include/boost/shared_array.hpp | 19 + .../boost/shared_container_iterator.hpp | 62 + .../boost-1.45.0/include/boost/shared_ptr.hpp | 19 + .../boost-1.45.0/include/boost/signal.hpp | 358 + .../boost-1.45.0/include/boost/signals.hpp | 10 + .../boost-1.45.0/include/boost/signals2.hpp | 23 + .../boost-1.45.0/include/boost/smart_ptr.hpp | 25 + .../include/boost/smart_ptr/bad_weak_ptr.hpp | 59 + .../boost/smart_ptr/detail/atomic_count.hpp | 119 + .../smart_ptr/detail/atomic_count_gcc.hpp | 72 + .../smart_ptr/detail/atomic_count_gcc_x86.hpp | 77 + .../detail/atomic_count_pthreads.hpp | 96 + .../smart_ptr/detail/atomic_count_solaris.hpp | 59 + .../smart_ptr/detail/atomic_count_sync.hpp | 61 + .../smart_ptr/detail/atomic_count_win32.hpp | 63 + .../smart_ptr/detail/lightweight_mutex.hpp | 42 + .../boost/smart_ptr/detail/lwm_nop.hpp | 37 + .../boost/smart_ptr/detail/lwm_pthreads.hpp | 87 + .../boost/smart_ptr/detail/lwm_win32_cs.hpp | 108 + .../boost/smart_ptr/detail/operator_bool.hpp | 56 + .../smart_ptr/detail/quick_allocator.hpp | 199 + .../smart_ptr/detail/shared_array_nmt.hpp | 151 + .../boost/smart_ptr/detail/shared_count.hpp | 444 + .../boost/smart_ptr/detail/shared_ptr_nmt.hpp | 182 + .../boost/smart_ptr/detail/sp_convertible.hpp | 76 + .../smart_ptr/detail/sp_counted_base.hpp | 70 + .../detail/sp_counted_base_acc_ia64.hpp | 150 + .../detail/sp_counted_base_cw_ppc.hpp | 170 + .../detail/sp_counted_base_cw_x86.hpp | 158 + .../detail/sp_counted_base_gcc_ia64.hpp | 157 + .../detail/sp_counted_base_gcc_mips.hpp | 172 + .../detail/sp_counted_base_gcc_ppc.hpp | 181 + .../detail/sp_counted_base_gcc_sparc.hpp | 166 + .../detail/sp_counted_base_gcc_x86.hpp | 173 + .../smart_ptr/detail/sp_counted_base_nt.hpp | 107 + .../smart_ptr/detail/sp_counted_base_pt.hpp | 135 + .../detail/sp_counted_base_solaris.hpp | 113 + .../smart_ptr/detail/sp_counted_base_spin.hpp | 131 + .../smart_ptr/detail/sp_counted_base_sync.hpp | 155 + .../smart_ptr/detail/sp_counted_base_w32.hpp | 130 + .../smart_ptr/detail/sp_counted_impl.hpp | 231 + .../boost/smart_ptr/detail/sp_has_sync.hpp | 49 + .../boost/smart_ptr/detail/spinlock.hpp | 53 + .../smart_ptr/detail/spinlock_gcc_arm.hpp | 85 + .../boost/smart_ptr/detail/spinlock_nt.hpp | 89 + .../boost/smart_ptr/detail/spinlock_pool.hpp | 87 + .../boost/smart_ptr/detail/spinlock_pt.hpp | 79 + .../boost/smart_ptr/detail/spinlock_sync.hpp | 87 + .../boost/smart_ptr/detail/spinlock_w32.hpp | 113 + .../boost/smart_ptr/detail/yield_k.hpp | 149 + .../smart_ptr/enable_shared_from_this.hpp | 79 + .../smart_ptr/enable_shared_from_this2.hpp | 132 + .../include/boost/smart_ptr/intrusive_ptr.hpp | 299 + .../include/boost/smart_ptr/make_shared.hpp | 508 + .../include/boost/smart_ptr/scoped_array.hpp | 107 + .../include/boost/smart_ptr/scoped_ptr.hpp | 131 + .../include/boost/smart_ptr/shared_array.hpp | 147 + .../include/boost/smart_ptr/shared_ptr.hpp | 701 + .../include/boost/smart_ptr/weak_ptr.hpp | 230 + .../boost-1.45.0/include/boost/spirit.hpp | 27 + .../include/boost/spirit/actor.hpp | 27 + .../boost/spirit/actor/assign_actor.hpp | 27 + .../boost/spirit/actor/assign_key_actor.hpp | 27 + .../boost/spirit/actor/clear_actor.hpp | 27 + .../boost/spirit/actor/decrement_actor.hpp | 27 + .../boost/spirit/actor/erase_actor.hpp | 27 + .../boost/spirit/actor/increment_actor.hpp | 27 + .../boost/spirit/actor/insert_at_actor.hpp | 27 + .../boost/spirit/actor/insert_key_actor.hpp | 27 + .../boost/spirit/actor/push_back_actor.hpp | 27 + .../boost/spirit/actor/push_front_actor.hpp | 27 + .../include/boost/spirit/actor/ref_actor.hpp | 27 + .../spirit/actor/ref_const_ref_actor.hpp | 27 + .../actor/ref_const_ref_const_ref_a.hpp | 27 + .../actor/ref_const_ref_value_actor.hpp | 27 + .../boost/spirit/actor/ref_value_actor.hpp | 27 + .../include/boost/spirit/actor/swap_actor.hpp | 27 + .../include/boost/spirit/actor/typeof.hpp | 27 + .../include/boost/spirit/attribute.hpp | 27 + .../boost/spirit/attribute/closure.hpp | 27 + .../spirit/attribute/closure_context.hpp | 27 + .../boost/spirit/attribute/closure_fwd.hpp | 27 + .../boost/spirit/attribute/parametric.hpp | 27 + .../include/boost/spirit/attribute/typeof.hpp | 27 + .../include/boost/spirit/core.hpp | 27 + .../include/boost/spirit/core/assert.hpp | 27 + .../boost/spirit/core/composite/actions.hpp | 27 + .../spirit/core/composite/alternative.hpp | 27 + .../boost/spirit/core/composite/composite.hpp | 27 + .../spirit/core/composite/difference.hpp | 27 + .../spirit/core/composite/directives.hpp | 27 + .../boost/spirit/core/composite/epsilon.hpp | 27 + .../spirit/core/composite/exclusive_or.hpp | 27 + .../spirit/core/composite/intersection.hpp | 27 + .../spirit/core/composite/kleene_star.hpp | 27 + .../boost/spirit/core/composite/list.hpp | 27 + .../spirit/core/composite/no_actions.hpp | 27 + .../boost/spirit/core/composite/operators.hpp | 27 + .../boost/spirit/core/composite/optional.hpp | 27 + .../boost/spirit/core/composite/positive.hpp | 27 + .../boost/spirit/core/composite/sequence.hpp | 27 + .../spirit/core/composite/sequential_and.hpp | 27 + .../spirit/core/composite/sequential_or.hpp | 27 + .../include/boost/spirit/core/config.hpp | 27 + .../include/boost/spirit/core/match.hpp | 27 + .../include/boost/spirit/core/nil.hpp | 27 + .../spirit/core/non_terminal/grammar.hpp | 27 + .../core/non_terminal/parser_context.hpp | 27 + .../spirit/core/non_terminal/parser_id.hpp | 27 + .../boost/spirit/core/non_terminal/rule.hpp | 27 + .../spirit/core/non_terminal/subrule.hpp | 27 + .../spirit/core/non_terminal/subrule_fwd.hpp | 27 + .../include/boost/spirit/core/parser.hpp | 27 + .../boost/spirit/core/primitives/numerics.hpp | 27 + .../spirit/core/primitives/numerics_fwd.hpp | 27 + .../spirit/core/primitives/primitives.hpp | 27 + .../include/boost/spirit/core/safe_bool.hpp | 27 + .../boost/spirit/core/scanner/scanner.hpp | 27 + .../boost/spirit/core/scanner/scanner_fwd.hpp | 27 + .../boost/spirit/core/scanner/skipper.hpp | 27 + .../boost/spirit/core/scanner/skipper_fwd.hpp | 27 + .../include/boost/spirit/core/typeof.hpp | 27 + .../include/boost/spirit/debug.hpp | 27 + .../include/boost/spirit/debug/debug_node.hpp | 27 + .../include/boost/spirit/debug/minimal.hpp | 27 + .../boost/spirit/debug/parser_names.hpp | 27 + .../include/boost/spirit/debug/typeof.hpp | 27 + .../include/boost/spirit/dynamic.hpp | 27 + .../include/boost/spirit/dynamic/for.hpp | 27 + .../include/boost/spirit/dynamic/if.hpp | 27 + .../include/boost/spirit/dynamic/lazy.hpp | 27 + .../boost/spirit/dynamic/rule_alias.hpp | 27 + .../include/boost/spirit/dynamic/select.hpp | 27 + .../boost/spirit/dynamic/stored_rule.hpp | 27 + .../boost/spirit/dynamic/stored_rule_fwd.hpp | 27 + .../include/boost/spirit/dynamic/switch.hpp | 27 + .../include/boost/spirit/dynamic/typeof.hpp | 27 + .../include/boost/spirit/dynamic/while.hpp | 27 + .../include/boost/spirit/error_handling.hpp | 27 + .../spirit/error_handling/exceptions.hpp | 27 + .../spirit/error_handling/exceptions_fwd.hpp | 27 + .../boost/spirit/error_handling/typeof.hpp | 27 + .../include/boost/spirit/home/classic.hpp | 32 + .../boost/spirit/home/classic/actor.hpp | 113 + .../home/classic/actor/assign_actor.hpp | 100 + .../home/classic/actor/assign_key_actor.hpp | 96 + .../spirit/home/classic/actor/clear_actor.hpp | 61 + .../home/classic/actor/decrement_actor.hpp | 60 + .../spirit/home/classic/actor/erase_actor.hpp | 89 + .../home/classic/actor/increment_actor.hpp | 60 + .../home/classic/actor/insert_at_actor.hpp | 121 + .../home/classic/actor/insert_key_actor.hpp | 97 + .../home/classic/actor/push_back_actor.hpp | 101 + .../home/classic/actor/push_front_actor.hpp | 91 + .../spirit/home/classic/actor/ref_actor.hpp | 70 + .../classic/actor/ref_const_ref_actor.hpp | 78 + .../actor/ref_const_ref_const_ref_a.hpp | 87 + .../actor/ref_const_ref_value_actor.hpp | 78 + .../home/classic/actor/ref_value_actor.hpp | 79 + .../spirit/home/classic/actor/swap_actor.hpp | 85 + .../spirit/home/classic/actor/typeof.hpp | 74 + .../boost/spirit/home/classic/attribute.hpp | 37 + .../spirit/home/classic/attribute/closure.hpp | 1083 + .../classic/attribute/closure_context.hpp | 56 + .../home/classic/attribute/closure_fwd.hpp | 69 + .../home/classic/attribute/parametric.hpp | 144 + .../spirit/home/classic/attribute/typeof.hpp | 67 + .../boost/spirit/home/classic/core.hpp | 73 + .../boost/spirit/home/classic/core/assert.hpp | 38 + .../home/classic/core/composite/actions.hpp | 132 + .../classic/core/composite/alternative.hpp | 147 + .../home/classic/core/composite/composite.hpp | 147 + .../classic/core/composite/difference.hpp | 150 + .../classic/core/composite/directives.hpp | 607 + .../home/classic/core/composite/epsilon.hpp | 276 + .../classic/core/composite/exclusive_or.hpp | 142 + .../core/composite/impl/alternative.ipp | 90 + .../core/composite/impl/difference.ipp | 90 + .../core/composite/impl/directives.ipp | 374 + .../core/composite/impl/exclusive_or.ipp | 90 + .../core/composite/impl/intersection.ipp | 90 + .../core/composite/impl/kleene_star.ipp | 34 + .../home/classic/core/composite/impl/list.ipp | 93 + .../classic/core/composite/impl/optional.ipp | 34 + .../classic/core/composite/impl/positive.ipp | 34 + .../classic/core/composite/impl/sequence.ipp | 90 + .../core/composite/impl/sequential_and.ipp | 90 + .../core/composite/impl/sequential_or.ipp | 90 + .../classic/core/composite/intersection.hpp | 142 + .../classic/core/composite/kleene_star.hpp | 109 + .../home/classic/core/composite/list.hpp | 73 + .../classic/core/composite/no_actions.hpp | 165 + .../home/classic/core/composite/operators.hpp | 25 + .../home/classic/core/composite/optional.hpp | 94 + .../home/classic/core/composite/positive.hpp | 112 + .../home/classic/core/composite/sequence.hpp | 142 + .../classic/core/composite/sequential_and.hpp | 76 + .../classic/core/composite/sequential_or.hpp | 154 + .../boost/spirit/home/classic/core/config.hpp | 62 + .../spirit/home/classic/core/impl/match.ipp | 113 + .../classic/core/impl/match_attr_traits.ipp | 102 + .../spirit/home/classic/core/impl/parser.ipp | 55 + .../boost/spirit/home/classic/core/match.hpp | 185 + .../boost/spirit/home/classic/core/nil.hpp | 25 + .../classic/core/non_terminal/grammar.hpp | 85 + .../core/non_terminal/impl/grammar.ipp | 407 + .../core/non_terminal/impl/object_with_id.ipp | 191 + .../classic/core/non_terminal/impl/rule.ipp | 420 + .../classic/core/non_terminal/impl/static.hpp | 120 + .../core/non_terminal/impl/subrule.ipp | 211 + .../core/non_terminal/parser_context.hpp | 150 + .../classic/core/non_terminal/parser_id.hpp | 122 + .../home/classic/core/non_terminal/rule.hpp | 175 + .../classic/core/non_terminal/subrule.hpp | 300 + .../classic/core/non_terminal/subrule_fwd.hpp | 35 + .../boost/spirit/home/classic/core/parser.hpp | 223 + .../classic/core/primitives/impl/numerics.ipp | 478 + .../core/primitives/impl/primitives.ipp | 476 + .../home/classic/core/primitives/numerics.hpp | 289 + .../classic/core/primitives/numerics_fwd.hpp | 88 + .../classic/core/primitives/primitives.hpp | 654 + .../spirit/home/classic/core/safe_bool.hpp | 64 + .../classic/core/scanner/impl/skipper.ipp | 181 + .../home/classic/core/scanner/scanner.hpp | 329 + .../home/classic/core/scanner/scanner_fwd.hpp | 52 + .../home/classic/core/scanner/skipper.hpp | 197 + .../home/classic/core/scanner/skipper_fwd.hpp | 32 + .../boost/spirit/home/classic/core/typeof.hpp | 343 + .../boost/spirit/home/classic/debug.hpp | 154 + .../spirit/home/classic/debug/debug_node.hpp | 319 + .../home/classic/debug/impl/parser_names.ipp | 555 + .../spirit/home/classic/debug/minimal.hpp | 81 + .../home/classic/debug/parser_names.hpp | 254 + .../spirit/home/classic/debug/typeof.hpp | 37 + .../boost/spirit/home/classic/dynamic.hpp | 30 + .../boost/spirit/home/classic/dynamic/for.hpp | 187 + .../boost/spirit/home/classic/dynamic/if.hpp | 229 + .../home/classic/dynamic/impl/conditions.ipp | 104 + .../home/classic/dynamic/impl/select.ipp | 120 + .../home/classic/dynamic/impl/switch.ipp | 574 + .../spirit/home/classic/dynamic/lazy.hpp | 66 + .../home/classic/dynamic/rule_alias.hpp | 76 + .../spirit/home/classic/dynamic/select.hpp | 245 + .../home/classic/dynamic/stored_rule.hpp | 127 + .../home/classic/dynamic/stored_rule_fwd.hpp | 31 + .../spirit/home/classic/dynamic/switch.hpp | 259 + .../spirit/home/classic/dynamic/typeof.hpp | 89 + .../spirit/home/classic/dynamic/while.hpp | 189 + .../spirit/home/classic/error_handling.hpp | 21 + .../classic/error_handling/exceptions.hpp | 365 + .../classic/error_handling/exceptions_fwd.hpp | 41 + .../error_handling/impl/exceptions.ipp | 93 + .../home/classic/error_handling/typeof.hpp | 33 + .../boost/spirit/home/classic/iterator.hpp | 25 + .../home/classic/iterator/file_iterator.hpp | 229 + .../classic/iterator/file_iterator_fwd.hpp | 39 + .../classic/iterator/fixed_size_queue.hpp | 402 + .../classic/iterator/impl/file_iterator.ipp | 463 + .../iterator/impl/position_iterator.ipp | 138 + .../home/classic/iterator/multi_pass.hpp | 1307 ++ .../home/classic/iterator/multi_pass_fwd.hpp | 47 + .../classic/iterator/position_iterator.hpp | 436 + .../iterator/position_iterator_fwd.hpp | 60 + .../spirit/home/classic/iterator/typeof.hpp | 94 + .../boost/spirit/home/classic/meta.hpp | 26 + .../spirit/home/classic/meta/as_parser.hpp | 113 + .../spirit/home/classic/meta/fundamental.hpp | 56 + .../home/classic/meta/impl/fundamental.ipp | 309 + .../home/classic/meta/impl/parser_traits.ipp | 191 + .../home/classic/meta/impl/refactoring.ipp | 451 + .../home/classic/meta/impl/traverse.ipp | 393 + .../home/classic/meta/parser_traits.hpp | 320 + .../spirit/home/classic/meta/refactoring.hpp | 287 + .../spirit/home/classic/meta/traverse.hpp | 222 + .../boost/spirit/home/classic/namespace.hpp | 35 + .../boost/spirit/home/classic/phoenix.hpp | 25 + .../spirit/home/classic/phoenix/actor.hpp | 604 + .../spirit/home/classic/phoenix/binders.hpp | 4066 ++++ .../spirit/home/classic/phoenix/casts.hpp | 1470 ++ .../spirit/home/classic/phoenix/closures.hpp | 446 + .../spirit/home/classic/phoenix/composite.hpp | 1431 ++ .../spirit/home/classic/phoenix/functions.hpp | 760 + .../boost/spirit/home/classic/phoenix/new.hpp | 1315 ++ .../spirit/home/classic/phoenix/operators.hpp | 2203 ++ .../home/classic/phoenix/primitives.hpp | 256 + .../home/classic/phoenix/special_ops.hpp | 341 + .../home/classic/phoenix/statements.hpp | 443 + .../home/classic/phoenix/tuple_helpers.hpp | 1075 + .../spirit/home/classic/phoenix/tuples.hpp | 1338 ++ .../boost/spirit/home/classic/symbols.hpp | 21 + .../home/classic/symbols/impl/symbols.ipp | 118 + .../spirit/home/classic/symbols/impl/tst.ipp | 281 + .../spirit/home/classic/symbols/symbols.hpp | 229 + .../home/classic/symbols/symbols_fwd.hpp | 39 + .../spirit/home/classic/symbols/typeof.hpp | 25 + .../boost/spirit/home/classic/tree/ast.hpp | 387 + .../spirit/home/classic/tree/ast_fwd.hpp | 42 + .../boost/spirit/home/classic/tree/common.hpp | 1587 ++ .../spirit/home/classic/tree/common_fwd.hpp | 96 + .../classic/tree/impl/parse_tree_utils.ipp | 135 + .../home/classic/tree/impl/tree_to_xml.ipp | 526 + .../spirit/home/classic/tree/parse_tree.hpp | 296 + .../home/classic/tree/parse_tree_fwd.hpp | 39 + .../home/classic/tree/parse_tree_utils.hpp | 64 + .../spirit/home/classic/tree/parsetree.dtd | 21 + .../spirit/home/classic/tree/tree_to_xml.hpp | 116 + .../boost/spirit/home/classic/tree/typeof.hpp | 80 + .../boost/spirit/home/classic/utility.hpp | 40 + .../spirit/home/classic/utility/chset.hpp | 187 + .../home/classic/utility/chset_operators.hpp | 402 + .../spirit/home/classic/utility/confix.hpp | 405 + .../home/classic/utility/confix_fwd.hpp | 39 + .../spirit/home/classic/utility/distinct.hpp | 229 + .../home/classic/utility/distinct_fwd.hpp | 37 + .../home/classic/utility/escape_char.hpp | 184 + .../home/classic/utility/escape_char_fwd.hpp | 30 + .../home/classic/utility/flush_multi_pass.hpp | 77 + .../home/classic/utility/functor_parser.hpp | 71 + .../home/classic/utility/grammar_def.hpp | 307 + .../home/classic/utility/grammar_def_fwd.hpp | 52 + .../home/classic/utility/impl/chset.ipp | 366 + .../utility/impl/chset/basic_chset.hpp | 107 + .../utility/impl/chset/basic_chset.ipp | 246 + .../classic/utility/impl/chset/range_run.hpp | 127 + .../classic/utility/impl/chset/range_run.ipp | 218 + .../classic/utility/impl/chset_operators.ipp | 666 + .../home/classic/utility/impl/confix.ipp | 221 + .../home/classic/utility/impl/escape_char.ipp | 224 + .../home/classic/utility/impl/lists.ipp | 168 + .../home/classic/utility/impl/regex.ipp | 81 + .../spirit/home/classic/utility/lists.hpp | 340 + .../spirit/home/classic/utility/lists_fwd.hpp | 31 + .../spirit/home/classic/utility/loops.hpp | 317 + .../spirit/home/classic/utility/regex.hpp | 112 + .../home/classic/utility/rule_parser.hpp | 1142 + .../home/classic/utility/scoped_lock.hpp | 112 + .../spirit/home/classic/utility/typeof.hpp | 150 + .../boost/spirit/home/classic/version.hpp | 30 + .../include/boost/spirit/home/karma.hpp | 31 + .../boost/spirit/home/karma/action.hpp | 15 + .../boost/spirit/home/karma/action/action.hpp | 127 + .../include/boost/spirit/home/karma/auto.hpp | 16 + .../boost/spirit/home/karma/auto/auto.hpp | 186 + .../home/karma/auto/create_generator.hpp | 46 + .../spirit/home/karma/auto/meta_create.hpp | 338 + .../boost/spirit/home/karma/auxiliary.hpp | 18 + .../spirit/home/karma/auxiliary/attr_cast.hpp | 118 + .../boost/spirit/home/karma/auxiliary/eol.hpp | 79 + .../boost/spirit/home/karma/auxiliary/eps.hpp | 135 + .../spirit/home/karma/auxiliary/lazy.hpp | 232 + .../boost/spirit/home/karma/binary.hpp | 16 + .../boost/spirit/home/karma/binary/binary.hpp | 362 + .../spirit/home/karma/binary/padding.hpp | 113 + .../include/boost/spirit/home/karma/char.hpp | 16 + .../boost/spirit/home/karma/char/char.hpp | 509 + .../spirit/home/karma/char/char_class.hpp | 226 + .../spirit/home/karma/char/char_generator.hpp | 168 + .../boost/spirit/home/karma/delimit_flag.hpp | 27 + .../boost/spirit/home/karma/delimit_out.hpp | 45 + .../karma/detail/alternative_function.hpp | 248 + .../spirit/home/karma/detail/attributes.hpp | 108 + .../home/karma/detail/default_width.hpp | 75 + .../spirit/home/karma/detail/extract_from.hpp | 160 + .../home/karma/detail/fail_function.hpp | 60 + .../spirit/home/karma/detail/generate.hpp | 131 + .../home/karma/detail/generate_auto.hpp | 63 + .../spirit/home/karma/detail/generate_to.hpp | 67 + .../spirit/home/karma/detail/get_casetag.hpp | 29 + .../home/karma/detail/get_stricttag.hpp | 33 + .../home/karma/detail/output_iterator.hpp | 616 + .../home/karma/detail/pass_container.hpp | 175 + .../home/karma/detail/string_compare.hpp | 76 + .../home/karma/detail/string_generate.hpp | 155 + .../home/karma/detail/unused_delimiter.hpp | 51 + .../boost/spirit/home/karma/directive.hpp | 69 + .../spirit/home/karma/directive/buffer.hpp | 121 + .../home/karma/directive/center_alignment.hpp | 316 + .../spirit/home/karma/directive/columns.hpp | 273 + .../spirit/home/karma/directive/delimit.hpp | 183 + .../spirit/home/karma/directive/duplicate.hpp | 217 + .../spirit/home/karma/directive/encoding.hpp | 35 + .../home/karma/directive/left_alignment.hpp | 299 + .../spirit/home/karma/directive/maxwidth.hpp | 235 + .../home/karma/directive/no_delimit.hpp | 104 + .../spirit/home/karma/directive/omit.hpp | 123 + .../spirit/home/karma/directive/repeat.hpp | 361 + .../home/karma/directive/right_alignment.hpp | 309 + .../home/karma/directive/strict_relaxed.hpp | 76 + .../home/karma/directive/upper_lower_case.hpp | 86 + .../spirit/home/karma/directive/verbatim.hpp | 103 + .../boost/spirit/home/karma/domain.hpp | 57 + .../boost/spirit/home/karma/format.hpp | 16 + .../boost/spirit/home/karma/format_auto.hpp | 16 + .../boost/spirit/home/karma/generate.hpp | 213 + .../boost/spirit/home/karma/generate_attr.hpp | 212 + .../boost/spirit/home/karma/generator.hpp | 159 + .../boost/spirit/home/karma/meta_compiler.hpp | 177 + .../boost/spirit/home/karma/nonterminal.hpp | 18 + .../home/karma/nonterminal/debug_handler.hpp | 134 + .../karma/nonterminal/debug_handler_state.hpp | 23 + .../home/karma/nonterminal/detail/fcall.hpp | 53 + .../nonterminal/detail/generator_binder.hpp | 86 + .../nonterminal/detail/parameterized.hpp | 63 + .../spirit/home/karma/nonterminal/grammar.hpp | 121 + .../spirit/home/karma/nonterminal/rule.hpp | 396 + .../home/karma/nonterminal/simple_trace.hpp | 134 + .../boost/spirit/home/karma/numeric.hpp | 18 + .../boost/spirit/home/karma/numeric/bool.hpp | 383 + .../home/karma/numeric/bool_policies.hpp | 117 + .../home/karma/numeric/detail/bool_utils.hpp | 67 + .../karma/numeric/detail/numeric_utils.hpp | 659 + .../home/karma/numeric/detail/real_utils.hpp | 228 + .../boost/spirit/home/karma/numeric/int.hpp | 475 + .../boost/spirit/home/karma/numeric/real.hpp | 411 + .../home/karma/numeric/real_policies.hpp | 332 + .../boost/spirit/home/karma/numeric/uint.hpp | 531 + .../boost/spirit/home/karma/operator.hpp | 22 + .../home/karma/operator/alternative.hpp | 188 + .../home/karma/operator/and_predicate.hpp | 86 + .../spirit/home/karma/operator/kleene.hpp | 168 + .../boost/spirit/home/karma/operator/list.hpp | 201 + .../home/karma/operator/not_predicate.hpp | 87 + .../spirit/home/karma/operator/optional.hpp | 96 + .../boost/spirit/home/karma/operator/plus.hpp | 181 + .../spirit/home/karma/operator/sequence.hpp | 375 + .../spirit/home/karma/phoenix_attributes.hpp | 112 + .../boost/spirit/home/karma/reference.hpp | 78 + .../boost/spirit/home/karma/stream.hpp | 16 + .../home/karma/stream/detail/format_manip.hpp | 207 + .../karma/stream/detail/format_manip_auto.hpp | 56 + .../karma/stream/detail/iterator_sink.hpp | 55 + .../spirit/home/karma/stream/format_manip.hpp | 117 + .../home/karma/stream/format_manip_attr.hpp | 123 + .../home/karma/stream/ostream_iterator.hpp | 65 + .../boost/spirit/home/karma/stream/stream.hpp | 363 + .../boost/spirit/home/karma/string.hpp | 16 + .../boost/spirit/home/karma/string/lit.hpp | 277 + .../spirit/home/karma/string/symbols.hpp | 703 + .../include/boost/spirit/home/karma/what.hpp | 33 + .../include/boost/spirit/home/lex.hpp | 18 + .../boost/spirit/home/lex/argument.hpp | 380 + .../home/lex/detail/sequence_function.hpp | 61 + .../include/boost/spirit/home/lex/domain.hpp | 31 + .../include/boost/spirit/home/lex/lexer.hpp | 21 + .../boost/spirit/home/lex/lexer/action.hpp | 96 + .../spirit/home/lex/lexer/char_token_def.hpp | 170 + .../boost/spirit/home/lex/lexer/lexer.hpp | 370 + .../spirit/home/lex/lexer/lexertl/functor.hpp | 277 + .../home/lex/lexer/lexertl/functor_data.hpp | 390 + .../lex/lexer/lexertl/generate_static.hpp | 961 + .../home/lex/lexer/lexertl/iterator.hpp | 116 + .../lex/lexer/lexertl/iterator_tokenizer.hpp | 253 + .../spirit/home/lex/lexer/lexertl/lexer.hpp | 349 + .../lexer/lexertl/semantic_action_data.hpp | 121 + .../lex/lexer/lexertl/static_functor_data.hpp | 411 + .../home/lex/lexer/lexertl/static_lexer.hpp | 278 + .../home/lex/lexer/lexertl/static_version.hpp | 20 + .../spirit/home/lex/lexer/lexertl/token.hpp | 565 + .../home/lex/lexer/lexertl/wrap_action.hpp | 182 + .../spirit/home/lex/lexer/pass_flags.hpp | 28 + .../boost/spirit/home/lex/lexer/sequence.hpp | 69 + .../home/lex/lexer/string_token_def.hpp | 123 + .../home/lex/lexer/support_functions.hpp | 175 + .../boost/spirit/home/lex/lexer/terminals.hpp | 24 + .../boost/spirit/home/lex/lexer/token_def.hpp | 220 + .../boost/spirit/home/lex/lexer_lexertl.hpp | 18 + .../spirit/home/lex/lexer_static_lexertl.hpp | 18 + .../boost/spirit/home/lex/lexer_type.hpp | 98 + .../boost/spirit/home/lex/meta_compiler.hpp | 104 + .../boost/spirit/home/lex/primitives.hpp | 16 + .../include/boost/spirit/home/lex/qi.hpp | 17 + .../boost/spirit/home/lex/qi/in_state.hpp | 33 + .../boost/spirit/home/lex/qi/plain_token.hpp | 121 + .../spirit/home/lex/qi/state_switcher.hpp | 249 + .../boost/spirit/home/lex/reference.hpp | 72 + .../spirit/home/lex/tokenize_and_parse.hpp | 325 + .../home/lex/tokenize_and_parse_attr.hpp | 114 + .../include/boost/spirit/home/phoenix.hpp | 23 + .../boost/spirit/home/phoenix/algorithm.hpp | 14 + .../boost/spirit/home/phoenix/bind.hpp | 16 + .../home/phoenix/bind/bind_function.hpp | 58 + .../phoenix/bind/bind_function_object.hpp | 40 + .../phoenix/bind/bind_member_function.hpp | 77 + .../phoenix/bind/bind_member_variable.hpp | 105 + .../phoenix/bind/detail/bind_function.hpp | 53 + .../bind/detail/bind_function_object.hpp | 43 + .../bind/detail/bind_member_function.hpp | 132 + .../home/phoenix/bind/detail/function_ptr.hpp | 99 + .../bind/detail/member_function_ptr.hpp | 119 + .../boost/spirit/home/phoenix/container.hpp | 12 + .../boost/spirit/home/phoenix/core.hpp | 23 + .../boost/spirit/home/phoenix/core/actor.hpp | 177 + .../spirit/home/phoenix/core/argument.hpp | 89 + .../spirit/home/phoenix/core/as_actor.hpp | 62 + .../home/phoenix/core/basic_environment.hpp | 81 + .../spirit/home/phoenix/core/compose.hpp | 118 + .../spirit/home/phoenix/core/composite.hpp | 96 + .../spirit/home/phoenix/core/detail/actor.hpp | 65 + .../phoenix/core/detail/basic_environment.hpp | 38 + .../home/phoenix/core/detail/compose.hpp | 47 + .../home/phoenix/core/detail/composite.hpp | 36 + .../phoenix/core/detail/composite_eval.hpp | 106 + .../phoenix/core/detail/composite_info.hpp | 40 + .../phoenix/core/detail/function_eval.hpp | 142 + .../spirit/home/phoenix/core/is_actor.hpp | 29 + .../boost/spirit/home/phoenix/core/limits.hpp | 79 + .../spirit/home/phoenix/core/nothing.hpp | 42 + .../spirit/home/phoenix/core/reference.hpp | 80 + .../boost/spirit/home/phoenix/core/value.hpp | 155 + .../home/phoenix/detail/local_reference.hpp | 44 + .../home/phoenix/detail/type_deduction.hpp | 487 + .../boost/spirit/home/phoenix/function.hpp | 13 + .../phoenix/function/detail/function_call.hpp | 42 + .../spirit/home/phoenix/function/function.hpp | 48 + .../boost/spirit/home/phoenix/fusion.hpp | 12 + .../boost/spirit/home/phoenix/fusion/at.hpp | 49 + .../boost/spirit/home/phoenix/object.hpp | 19 + .../spirit/home/phoenix/object/const_cast.hpp | 42 + .../spirit/home/phoenix/object/construct.hpp | 80 + .../spirit/home/phoenix/object/delete.hpp | 41 + .../home/phoenix/object/detail/construct.hpp | 42 + .../phoenix/object/detail/construct_eval.hpp | 46 + .../spirit/home/phoenix/object/detail/new.hpp | 42 + .../home/phoenix/object/detail/new_eval.hpp | 47 + .../home/phoenix/object/dynamic_cast.hpp | 42 + .../boost/spirit/home/phoenix/object/new.hpp | 80 + .../home/phoenix/object/reinterpret_cast.hpp | 42 + .../home/phoenix/object/static_cast.hpp | 42 + .../boost/spirit/home/phoenix/operator.hpp | 20 + .../home/phoenix/operator/arithmetic.hpp | 115 + .../spirit/home/phoenix/operator/bitwise.hpp | 91 + .../home/phoenix/operator/comparison.hpp | 55 + .../operator/detail/binary_compose.hpp | 32 + .../phoenix/operator/detail/binary_eval.hpp | 44 + .../home/phoenix/operator/detail/io.hpp | 78 + .../operator/detail/mem_fun_ptr_eval.hpp | 76 + .../operator/detail/mem_fun_ptr_gen.hpp | 69 + .../operator/detail/mem_fun_ptr_return.hpp | 65 + .../phoenix/operator/detail/unary_compose.hpp | 18 + .../phoenix/operator/detail/unary_eval.hpp | 40 + .../spirit/home/phoenix/operator/if_else.hpp | 78 + .../boost/spirit/home/phoenix/operator/io.hpp | 86 + .../spirit/home/phoenix/operator/logical.hpp | 43 + .../spirit/home/phoenix/operator/member.hpp | 145 + .../spirit/home/phoenix/operator/self.hpp | 75 + .../boost/spirit/home/phoenix/scope.hpp | 16 + .../home/phoenix/scope/detail/local_gen.hpp | 57 + .../phoenix/scope/detail/local_variable.hpp | 198 + .../spirit/home/phoenix/scope/dynamic.hpp | 193 + .../spirit/home/phoenix/scope/lambda.hpp | 176 + .../boost/spirit/home/phoenix/scope/let.hpp | 145 + .../home/phoenix/scope/local_variable.hpp | 111 + .../home/phoenix/scope/scoped_environment.hpp | 47 + .../boost/spirit/home/phoenix/statement.hpp | 20 + .../statement/detail/catch_all_eval.hpp | 101 + .../statement/detail/catch_composite.hpp | 62 + .../phoenix/statement/detail/catch_eval.hpp | 79 + .../home/phoenix/statement/detail/switch.hpp | 172 + .../phoenix/statement/detail/switch_eval.hpp | 111 + .../phoenix/statement/detail/switch_eval.ipp | 74 + .../home/phoenix/statement/do_while.hpp | 62 + .../spirit/home/phoenix/statement/for.hpp | 64 + .../spirit/home/phoenix/statement/if.hpp | 130 + .../home/phoenix/statement/sequence.hpp | 55 + .../spirit/home/phoenix/statement/switch.hpp | 164 + .../spirit/home/phoenix/statement/throw.hpp | 66 + .../home/phoenix/statement/try_catch.hpp | 188 + .../spirit/home/phoenix/statement/while.hpp | 56 + .../include/boost/spirit/home/phoenix/stl.hpp | 15 + .../spirit/home/phoenix/stl/algorithm.hpp | 17 + .../phoenix/stl/algorithm/detail/begin.hpp | 28 + .../stl/algorithm/detail/decay_array.hpp | 30 + .../home/phoenix/stl/algorithm/detail/end.hpp | 28 + .../stl/algorithm/detail/has_equal_range.hpp | 51 + .../phoenix/stl/algorithm/detail/has_find.hpp | 51 + .../stl/algorithm/detail/has_lower_bound.hpp | 51 + .../stl/algorithm/detail/has_remove.hpp | 34 + .../stl/algorithm/detail/has_remove_if.hpp | 34 + .../stl/algorithm/detail/has_reverse.hpp | 34 + .../phoenix/stl/algorithm/detail/has_sort.hpp | 34 + .../stl/algorithm/detail/has_unique.hpp | 34 + .../stl/algorithm/detail/has_upper_bound.hpp | 51 + .../stl/algorithm/detail/is_std_hash_map.hpp | 87 + .../stl/algorithm/detail/is_std_hash_set.hpp | 83 + .../stl/algorithm/detail/is_std_list.hpp | 41 + .../stl/algorithm/detail/is_std_map.hpp | 58 + .../stl/algorithm/detail/is_std_set.hpp | 56 + .../stl/algorithm/detail/std_hash_map_fwd.hpp | 70 + .../stl/algorithm/detail/std_hash_set_fwd.hpp | 66 + .../home/phoenix/stl/algorithm/iteration.hpp | 69 + .../home/phoenix/stl/algorithm/querying.hpp | 502 + .../phoenix/stl/algorithm/transformation.hpp | 1071 + .../spirit/home/phoenix/stl/container.hpp | 13 + .../home/phoenix/stl/container/container.hpp | 706 + .../stl/container/detail/container.hpp | 173 + .../boost/spirit/home/phoenix/version.hpp | 18 + .../include/boost/spirit/home/qi.hpp | 31 + .../include/boost/spirit/home/qi/action.hpp | 16 + .../boost/spirit/home/qi/action/action.hpp | 135 + .../include/boost/spirit/home/qi/auto.hpp | 18 + .../boost/spirit/home/qi/auto/auto.hpp | 87 + .../spirit/home/qi/auto/create_parser.hpp | 45 + .../boost/spirit/home/qi/auto/meta_create.hpp | 273 + .../boost/spirit/home/qi/auxiliary.hpp | 22 + .../boost/spirit/home/qi/auxiliary/attr.hpp | 98 + .../spirit/home/qi/auxiliary/attr_cast.hpp | 145 + .../boost/spirit/home/qi/auxiliary/eoi.hpp | 78 + .../boost/spirit/home/qi/auxiliary/eol.hpp | 96 + .../boost/spirit/home/qi/auxiliary/eps.hpp | 130 + .../boost/spirit/home/qi/auxiliary/lazy.hpp | 223 + .../include/boost/spirit/home/qi/binary.hpp | 16 + .../boost/spirit/home/qi/binary/binary.hpp | 325 + .../include/boost/spirit/home/qi/char.hpp | 18 + .../boost/spirit/home/qi/char/char.hpp | 566 + .../boost/spirit/home/qi/char/char_class.hpp | 118 + .../boost/spirit/home/qi/char/char_parser.hpp | 157 + .../home/qi/detail/alternative_function.hpp | 108 + .../boost/spirit/home/qi/detail/assign_to.hpp | 175 + .../spirit/home/qi/detail/attributes.hpp | 175 + .../boost/spirit/home/qi/detail/construct.hpp | 182 + .../spirit/home/qi/detail/expect_function.hpp | 105 + .../spirit/home/qi/detail/fail_function.hpp | 59 + .../boost/spirit/home/qi/detail/parse.hpp | 97 + .../spirit/home/qi/detail/parse_auto.hpp | 191 + .../spirit/home/qi/detail/pass_container.hpp | 177 + .../spirit/home/qi/detail/pass_function.hpp | 70 + .../home/qi/detail/permute_function.hpp | 88 + .../spirit/home/qi/detail/string_parse.hpp | 89 + .../spirit/home/qi/detail/unused_skipper.hpp | 50 + .../boost/spirit/home/qi/directive.hpp | 25 + .../spirit/home/qi/directive/encoding.hpp | 32 + .../boost/spirit/home/qi/directive/hold.hpp | 98 + .../boost/spirit/home/qi/directive/lexeme.hpp | 95 + .../spirit/home/qi/directive/matches.hpp | 97 + .../spirit/home/qi/directive/no_case.hpp | 32 + .../spirit/home/qi/directive/no_skip.hpp | 96 + .../boost/spirit/home/qi/directive/omit.hpp | 96 + .../boost/spirit/home/qi/directive/raw.hpp | 100 + .../boost/spirit/home/qi/directive/repeat.hpp | 328 + .../boost/spirit/home/qi/directive/skip.hpp | 172 + .../include/boost/spirit/home/qi/domain.hpp | 56 + .../include/boost/spirit/home/qi/match.hpp | 16 + .../boost/spirit/home/qi/match_auto.hpp | 16 + .../boost/spirit/home/qi/meta_compiler.hpp | 177 + .../boost/spirit/home/qi/nonterminal.hpp | 20 + .../home/qi/nonterminal/debug_handler.hpp | 137 + .../qi/nonterminal/debug_handler_state.hpp | 24 + .../home/qi/nonterminal/detail/fcall.hpp | 53 + .../qi/nonterminal/detail/parameterized.hpp | 62 + .../qi/nonterminal/detail/parser_binder.hpp | 87 + .../home/qi/nonterminal/error_handler.hpp | 176 + .../spirit/home/qi/nonterminal/grammar.hpp | 119 + .../boost/spirit/home/qi/nonterminal/rule.hpp | 400 + .../home/qi/nonterminal/simple_trace.hpp | 135 + .../include/boost/spirit/home/qi/numeric.hpp | 19 + .../boost/spirit/home/qi/numeric/bool.hpp | 203 + .../spirit/home/qi/numeric/bool_policies.hpp | 81 + .../home/qi/numeric/detail/numeric_utils.hpp | 551 + .../home/qi/numeric/detail/real_impl.hpp | 271 + .../boost/spirit/home/qi/numeric/int.hpp | 162 + .../spirit/home/qi/numeric/numeric_utils.hpp | 148 + .../boost/spirit/home/qi/numeric/real.hpp | 133 + .../spirit/home/qi/numeric/real_policies.hpp | 186 + .../boost/spirit/home/qi/numeric/uint.hpp | 178 + .../include/boost/spirit/home/qi/operator.hpp | 27 + .../spirit/home/qi/operator/alternative.hpp | 107 + .../spirit/home/qi/operator/and_predicate.hpp | 82 + .../spirit/home/qi/operator/difference.hpp | 102 + .../boost/spirit/home/qi/operator/expect.hpp | 92 + .../boost/spirit/home/qi/operator/kleene.hpp | 116 + .../boost/spirit/home/qi/operator/list.hpp | 113 + .../spirit/home/qi/operator/not_predicate.hpp | 81 + .../spirit/home/qi/operator/optional.hpp | 99 + .../spirit/home/qi/operator/permutation.hpp | 134 + .../boost/spirit/home/qi/operator/plus.hpp | 110 + .../spirit/home/qi/operator/sequence.hpp | 87 + .../spirit/home/qi/operator/sequence_base.hpp | 134 + .../spirit/home/qi/operator/sequential_or.hpp | 116 + .../include/boost/spirit/home/qi/parse.hpp | 197 + .../boost/spirit/home/qi/parse_attr.hpp | 178 + .../include/boost/spirit/home/qi/parser.hpp | 140 + .../boost/spirit/home/qi/reference.hpp | 55 + .../boost/spirit/home/qi/skip_flag.hpp | 29 + .../boost/spirit/home/qi/skip_over.hpp | 44 + .../include/boost/spirit/home/qi/stream.hpp | 17 + .../home/qi/stream/detail/iterator_source.hpp | 61 + .../home/qi/stream/detail/match_manip.hpp | 230 + .../qi/stream/detail/match_manip_auto.hpp | 63 + .../spirit/home/qi/stream/match_manip.hpp | 123 + .../home/qi/stream/match_manip_attr.hpp | 133 + .../boost/spirit/home/qi/stream/stream.hpp | 101 + .../include/boost/spirit/home/qi/string.hpp | 17 + .../spirit/home/qi/string/detail/tst.hpp | 213 + .../boost/spirit/home/qi/string/lit.hpp | 242 + .../boost/spirit/home/qi/string/symbols.hpp | 387 + .../boost/spirit/home/qi/string/tst.hpp | 137 + .../boost/spirit/home/qi/string/tst_map.hpp | 216 + .../include/boost/spirit/home/qi/what.hpp | 33 + .../include/boost/spirit/home/support.hpp | 34 + .../spirit/home/support/action_dispatch.hpp | 83 + .../home/support/adapt_adt_attributes.hpp | 161 + .../spirit/home/support/algorithm/any.hpp | 76 + .../spirit/home/support/algorithm/any_if.hpp | 217 + .../home/support/algorithm/any_if_ns.hpp | 91 + .../spirit/home/support/algorithm/any_ns.hpp | 102 + .../boost/spirit/home/support/argument.hpp | 145 + .../boost/spirit/home/support/assert_msg.hpp | 31 + .../boost/spirit/home/support/attributes.hpp | 995 + .../spirit/home/support/attributes_fwd.hpp | 199 + .../spirit/home/support/auto/meta_create.hpp | 194 + .../home/support/auxiliary/attr_cast.hpp | 47 + .../boost/spirit/home/support/char_class.hpp | 795 + .../home/support/char_encoding/ascii.hpp | 313 + .../home/support/char_encoding/iso8859_1.hpp | 711 + .../home/support/char_encoding/standard.hpp | 137 + .../support/char_encoding/standard_wide.hpp | 182 + .../home/support/char_encoding/unicode.hpp | 339 + .../unicode/DerivedCoreProperties.txt | 9247 ++++++++ .../char_encoding/unicode/PropList.txt | 1303 ++ .../support/char_encoding/unicode/Scripts.txt | 1976 ++ .../char_encoding/unicode/UnicodeData.txt | 19336 ++++++++++++++++ .../char_encoding/unicode/category_table.hpp | 2216 ++ .../char_encoding/unicode/create_tables.cpp | 583 + .../char_encoding/unicode/lowercase_table.hpp | 620 + .../support/char_encoding/unicode/query.hpp | 305 + .../char_encoding/unicode/script_table.hpp | 2159 ++ .../char_encoding/unicode/uppercase_table.hpp | 639 + .../home/support/char_set/basic_chset.hpp | 249 + .../spirit/home/support/char_set/range.hpp | 32 + .../home/support/char_set/range_functions.hpp | 98 + .../home/support/char_set/range_run.hpp | 56 + .../home/support/char_set/range_run_impl.hpp | 189 + .../spirit/home/support/common_terminals.hpp | 385 + .../boost/spirit/home/support/container.hpp | 529 + .../boost/spirit/home/support/context.hpp | 209 + .../spirit/home/support/detail/as_variant.hpp | 104 + .../spirit/home/support/detail/endian.hpp | 27 + .../home/support/detail/get_encoding.hpp | 75 + .../spirit/home/support/detail/hold_any.hpp | 431 + .../detail/integer/cover_operators.hpp | 115 + .../home/support/detail/integer/endian.hpp | 426 + .../home/support/detail/lexer/char_traits.hpp | 54 + .../home/support/detail/lexer/consts.hpp | 39 + .../detail/lexer/containers/ptr_list.hpp | 71 + .../detail/lexer/containers/ptr_vector.hpp | 108 + .../lexer/conversion/char_state_machine.hpp | 77 + .../home/support/detail/lexer/debug.hpp | 285 + .../home/support/detail/lexer/file_input.hpp | 483 + .../support/detail/lexer/generate_cpp.hpp | 577 + .../support/detail/lexer/generate_re2c.hpp | 444 + .../home/support/detail/lexer/generator.hpp | 858 + .../home/support/detail/lexer/input.hpp | 537 + .../home/support/detail/lexer/internals.hpp | 60 + .../support/detail/lexer/parser/parser.hpp | 511 + .../lexer/parser/tokeniser/num_token.hpp | 146 + .../lexer/parser/tokeniser/re_tokeniser.hpp | 574 + .../parser/tokeniser/re_tokeniser_helper.hpp | 549 + .../parser/tokeniser/re_tokeniser_state.hpp | 98 + .../detail/lexer/parser/tree/end_node.hpp | 90 + .../lexer/parser/tree/iteration_node.hpp | 90 + .../detail/lexer/parser/tree/leaf_node.hpp | 107 + .../support/detail/lexer/parser/tree/node.hpp | 188 + .../lexer/parser/tree/selection_node.hpp | 94 + .../lexer/parser/tree/sequence_node.hpp | 112 + .../detail/lexer/partition/charset.hpp | 81 + .../detail/lexer/partition/equivset.hpp | 140 + .../home/support/detail/lexer/rules.hpp | 766 + .../support/detail/lexer/runtime_error.hpp | 26 + .../home/support/detail/lexer/serialise.hpp | 35 + .../home/support/detail/lexer/size_t.hpp | 21 + .../support/detail/lexer/state_machine.hpp | 439 + .../support/detail/lexer/string_token.hpp | 413 + .../spirit/home/support/detail/make_cons.hpp | 85 + .../home/support/detail/make_vector.hpp | 114 + .../support/detail/math/detail/fp_traits.hpp | 582 + .../home/support/detail/math/fpclassify.hpp | 235 + .../home/support/detail/math/signbit.hpp | 92 + .../spirit/home/support/detail/pow10.hpp | 96 + .../support/detail/scoped_enum_emulation.hpp | 28 + .../boost/spirit/home/support/detail/sign.hpp | 71 + .../home/support/detail/what_function.hpp | 47 + .../home/support/has_semantic_action.hpp | 48 + .../boost/spirit/home/support/info.hpp | 159 + .../iterators/detail/buf_id_check_policy.hpp | 90 + .../buffering_input_iterator_policy.hpp | 130 + .../iterators/detail/combine_policies.hpp | 502 + .../iterators/detail/first_owner_policy.hpp | 62 + .../iterators/detail/fixed_size_queue.hpp | 392 + .../detail/fixed_size_queue_policy.hpp | 128 + .../iterators/detail/functor_input_policy.hpp | 114 + .../detail/input_iterator_policy.hpp | 111 + .../iterators/detail/istream_policy.hpp | 122 + .../iterators/detail/lex_input_policy.hpp | 86 + .../support/iterators/detail/multi_pass.hpp | 132 + .../iterators/detail/no_check_policy.hpp | 31 + .../iterators/detail/ref_counted_policy.hpp | 79 + .../detail/split_functor_input_policy.hpp | 201 + .../detail/split_std_deque_policy.hpp | 170 + .../support/iterators/istream_iterator.hpp | 80 + .../home/support/iterators/look_ahead.hpp | 69 + .../home/support/iterators/multi_pass.hpp | 252 + .../home/support/iterators/multi_pass_fwd.hpp | 91 + .../support/iterators/ostream_iterator.hpp | 16 + .../boost/spirit/home/support/lazy.hpp | 37 + .../spirit/home/support/make_component.hpp | 364 + .../spirit/home/support/meta_compiler.hpp | 318 + .../boost/spirit/home/support/modify.hpp | 123 + .../boost/spirit/home/support/multi_pass.hpp | 39 + .../home/support/multi_pass_wrapper.hpp | 52 + .../home/support/nonterminal/expand_arg.hpp | 88 + .../support/nonterminal/extract_param.hpp | 123 + .../home/support/nonterminal/locals.hpp | 54 + .../spirit/home/support/sequence_base_id.hpp | 39 + .../spirit/home/support/string_traits.hpp | 218 + .../boost/spirit/home/support/terminal.hpp | 535 + .../boost/spirit/home/support/unused.hpp | 63 + .../boost/spirit/home/support/utf8.hpp | 72 + .../include/boost/spirit/include/classic.hpp | 12 + .../boost/spirit/include/classic_actions.hpp | 12 + .../boost/spirit/include/classic_actor.hpp | 12 + .../spirit/include/classic_alternative.hpp | 12 + .../spirit/include/classic_as_parser.hpp | 12 + .../boost/spirit/include/classic_assert.hpp | 12 + .../spirit/include/classic_assign_actor.hpp | 12 + .../include/classic_assign_key_actor.hpp | 12 + .../boost/spirit/include/classic_ast.hpp | 12 + .../boost/spirit/include/classic_ast_fwd.hpp | 12 + .../spirit/include/classic_attribute.hpp | 12 + .../spirit/include/classic_basic_chset.hpp | 12 + .../boost/spirit/include/classic_chset.hpp | 12 + .../include/classic_chset_operators.hpp | 12 + .../spirit/include/classic_clear_actor.hpp | 12 + .../boost/spirit/include/classic_closure.hpp | 12 + .../include/classic_closure_context.hpp | 12 + .../spirit/include/classic_closure_fwd.hpp | 12 + .../boost/spirit/include/classic_common.hpp | 12 + .../spirit/include/classic_common_fwd.hpp | 12 + .../spirit/include/classic_composite.hpp | 12 + .../boost/spirit/include/classic_config.hpp | 12 + .../boost/spirit/include/classic_confix.hpp | 12 + .../spirit/include/classic_confix_fwd.hpp | 12 + .../boost/spirit/include/classic_core.hpp | 12 + .../boost/spirit/include/classic_debug.hpp | 12 + .../spirit/include/classic_debug_node.hpp | 12 + .../include/classic_decrement_actor.hpp | 12 + .../spirit/include/classic_difference.hpp | 12 + .../spirit/include/classic_directives.hpp | 12 + .../boost/spirit/include/classic_distinct.hpp | 12 + .../spirit/include/classic_distinct_fwd.hpp | 12 + .../boost/spirit/include/classic_dynamic.hpp | 12 + .../boost/spirit/include/classic_epsilon.hpp | 12 + .../spirit/include/classic_erase_actor.hpp | 12 + .../spirit/include/classic_error_handling.hpp | 12 + .../spirit/include/classic_escape_char.hpp | 12 + .../include/classic_escape_char_fwd.hpp | 12 + .../spirit/include/classic_exceptions.hpp | 12 + .../spirit/include/classic_exceptions_fwd.hpp | 12 + .../spirit/include/classic_exclusive_or.hpp | 12 + .../spirit/include/classic_file_iterator.hpp | 12 + .../include/classic_file_iterator_fwd.hpp | 12 + .../include/classic_fixed_size_queue.hpp | 12 + .../include/classic_flush_multi_pass.hpp | 12 + .../boost/spirit/include/classic_for.hpp | 12 + .../spirit/include/classic_functor_parser.hpp | 12 + .../spirit/include/classic_fundamental.hpp | 12 + .../boost/spirit/include/classic_grammar.hpp | 12 + .../spirit/include/classic_grammar_def.hpp | 12 + .../include/classic_grammar_def_fwd.hpp | 12 + .../boost/spirit/include/classic_if.hpp | 12 + .../include/classic_increment_actor.hpp | 12 + .../include/classic_insert_at_actor.hpp | 12 + .../include/classic_insert_key_actor.hpp | 12 + .../spirit/include/classic_intersection.hpp | 12 + .../boost/spirit/include/classic_iterator.hpp | 12 + .../spirit/include/classic_kleene_star.hpp | 12 + .../boost/spirit/include/classic_lazy.hpp | 12 + .../boost/spirit/include/classic_list.hpp | 12 + .../boost/spirit/include/classic_lists.hpp | 12 + .../spirit/include/classic_lists_fwd.hpp | 12 + .../boost/spirit/include/classic_loops.hpp | 12 + .../boost/spirit/include/classic_match.hpp | 12 + .../boost/spirit/include/classic_meta.hpp | 12 + .../boost/spirit/include/classic_minimal.hpp | 12 + .../spirit/include/classic_multi_pass.hpp | 12 + .../spirit/include/classic_multi_pass_fwd.hpp | 12 + .../boost/spirit/include/classic_nil.hpp | 12 + .../spirit/include/classic_no_actions.hpp | 12 + .../boost/spirit/include/classic_numerics.hpp | 12 + .../spirit/include/classic_numerics_fwd.hpp | 12 + .../spirit/include/classic_operators.hpp | 12 + .../boost/spirit/include/classic_optional.hpp | 12 + .../spirit/include/classic_parametric.hpp | 12 + .../spirit/include/classic_parse_tree.hpp | 12 + .../spirit/include/classic_parse_tree_fwd.hpp | 12 + .../include/classic_parse_tree_utils.hpp | 12 + .../boost/spirit/include/classic_parser.hpp | 12 + .../spirit/include/classic_parser_context.hpp | 12 + .../spirit/include/classic_parser_id.hpp | 12 + .../spirit/include/classic_parser_names.hpp | 12 + .../spirit/include/classic_parser_traits.hpp | 12 + .../include/classic_position_iterator.hpp | 12 + .../include/classic_position_iterator_fwd.hpp | 12 + .../boost/spirit/include/classic_positive.hpp | 12 + .../spirit/include/classic_primitives.hpp | 12 + .../include/classic_push_back_actor.hpp | 12 + .../include/classic_push_front_actor.hpp | 12 + .../spirit/include/classic_range_run.hpp | 12 + .../spirit/include/classic_ref_actor.hpp | 12 + .../include/classic_ref_const_ref_actor.hpp | 12 + .../classic_ref_const_ref_const_ref_a.hpp | 12 + .../classic_ref_const_ref_value_actor.hpp | 12 + .../include/classic_ref_value_actor.hpp | 12 + .../spirit/include/classic_refactoring.hpp | 12 + .../boost/spirit/include/classic_regex.hpp | 12 + .../boost/spirit/include/classic_rule.hpp | 12 + .../spirit/include/classic_rule_alias.hpp | 12 + .../spirit/include/classic_rule_parser.hpp | 12 + .../spirit/include/classic_safe_bool.hpp | 12 + .../boost/spirit/include/classic_scanner.hpp | 12 + .../spirit/include/classic_scanner_fwd.hpp | 12 + .../spirit/include/classic_scoped_lock.hpp | 12 + .../boost/spirit/include/classic_select.hpp | 12 + .../boost/spirit/include/classic_sequence.hpp | 12 + .../spirit/include/classic_sequential_and.hpp | 12 + .../spirit/include/classic_sequential_or.hpp | 12 + .../boost/spirit/include/classic_skipper.hpp | 12 + .../spirit/include/classic_skipper_fwd.hpp | 12 + .../boost/spirit/include/classic_spirit.hpp | 13 + .../boost/spirit/include/classic_static.hpp | 12 + .../spirit/include/classic_stored_rule.hpp | 12 + .../include/classic_stored_rule_fwd.hpp | 12 + .../boost/spirit/include/classic_subrule.hpp | 12 + .../spirit/include/classic_subrule_fwd.hpp | 12 + .../spirit/include/classic_swap_actor.hpp | 12 + .../boost/spirit/include/classic_switch.hpp | 12 + .../boost/spirit/include/classic_symbols.hpp | 12 + .../spirit/include/classic_symbols_fwd.hpp | 12 + .../boost/spirit/include/classic_traverse.hpp | 12 + .../spirit/include/classic_tree_to_xml.hpp | 12 + .../boost/spirit/include/classic_typeof.hpp | 12 + .../boost/spirit/include/classic_utility.hpp | 12 + .../boost/spirit/include/classic_version.hpp | 12 + .../boost/spirit/include/classic_while.hpp | 12 + .../include/boost/spirit/include/karma.hpp | 18 + .../boost/spirit/include/karma_action.hpp | 18 + .../spirit/include/karma_alternative.hpp | 18 + .../spirit/include/karma_and_predicate.hpp | 18 + .../boost/spirit/include/karma_attr_cast.hpp | 18 + .../boost/spirit/include/karma_auto.hpp | 18 + .../boost/spirit/include/karma_auxiliary.hpp | 18 + .../boost/spirit/include/karma_binary.hpp | 18 + .../boost/spirit/include/karma_bool.hpp | 18 + .../boost/spirit/include/karma_buffer.hpp | 18 + .../spirit/include/karma_center_alignment.hpp | 18 + .../boost/spirit/include/karma_char.hpp | 18 + .../boost/spirit/include/karma_char_.hpp | 18 + .../boost/spirit/include/karma_char_class.hpp | 18 + .../boost/spirit/include/karma_columns.hpp | 18 + .../boost/spirit/include/karma_delimit.hpp | 18 + .../boost/spirit/include/karma_directive.hpp | 18 + .../boost/spirit/include/karma_domain.hpp | 18 + .../boost/spirit/include/karma_duplicate.hpp | 18 + .../boost/spirit/include/karma_eol.hpp | 18 + .../boost/spirit/include/karma_eps.hpp | 18 + .../boost/spirit/include/karma_format.hpp | 18 + .../spirit/include/karma_format_attr.hpp | 18 + .../spirit/include/karma_format_auto.hpp | 18 + .../boost/spirit/include/karma_generate.hpp | 18 + .../spirit/include/karma_generate_attr.hpp | 18 + .../spirit/include/karma_generate_auto.hpp | 19 + .../boost/spirit/include/karma_grammar.hpp | 18 + .../boost/spirit/include/karma_int.hpp | 18 + .../boost/spirit/include/karma_kleene.hpp | 18 + .../boost/spirit/include/karma_lazy.hpp | 18 + .../spirit/include/karma_left_alignment.hpp | 18 + .../boost/spirit/include/karma_list.hpp | 18 + .../boost/spirit/include/karma_maxwidth.hpp | 18 + .../boost/spirit/include/karma_no_delimit.hpp | 18 + .../spirit/include/karma_nonterminal.hpp | 18 + .../spirit/include/karma_not_predicate.hpp | 18 + .../boost/spirit/include/karma_numeric.hpp | 18 + .../boost/spirit/include/karma_omit.hpp | 18 + .../boost/spirit/include/karma_operator.hpp | 18 + .../boost/spirit/include/karma_optional.hpp | 18 + .../include/karma_phoenix_attributes.hpp | 18 + .../boost/spirit/include/karma_plus.hpp | 18 + .../boost/spirit/include/karma_real.hpp | 18 + .../boost/spirit/include/karma_repeat.hpp | 18 + .../spirit/include/karma_right_alignment.hpp | 18 + .../boost/spirit/include/karma_rule.hpp | 18 + .../boost/spirit/include/karma_sequence.hpp | 18 + .../boost/spirit/include/karma_stream.hpp | 18 + .../spirit/include/karma_strict_relaxed.hpp | 18 + .../boost/spirit/include/karma_string.hpp | 18 + .../boost/spirit/include/karma_symbols.hpp | 18 + .../boost/spirit/include/karma_uint.hpp | 18 + .../spirit/include/karma_upper_lower_case.hpp | 18 + .../boost/spirit/include/karma_verbatim.hpp | 18 + .../boost/spirit/include/karma_what.hpp | 18 + .../include/boost/spirit/include/lex.hpp | 18 + .../spirit/include/lex_char_token_def.hpp | 18 + .../boost/spirit/include/lex_domain.hpp | 18 + .../include/lex_generate_static_lexertl.hpp | 18 + .../boost/spirit/include/lex_lexer.hpp | 18 + .../boost/spirit/include/lex_lexertl.hpp | 18 + .../boost/spirit/include/lex_primitives.hpp | 18 + .../spirit/include/lex_static_lexertl.hpp | 18 + .../spirit/include/lex_tokenize_and_parse.hpp | 18 + .../include/lex_tokenize_and_parse_attr.hpp | 18 + .../include/boost/spirit/include/phoenix.hpp | 12 + .../include/boost/spirit/include/phoenix1.hpp | 12 + .../boost/spirit/include/phoenix1_actor.hpp | 12 + .../boost/spirit/include/phoenix1_binders.hpp | 12 + .../boost/spirit/include/phoenix1_casts.hpp | 12 + .../spirit/include/phoenix1_closures.hpp | 12 + .../spirit/include/phoenix1_composite.hpp | 12 + .../spirit/include/phoenix1_functions.hpp | 12 + .../boost/spirit/include/phoenix1_new.hpp | 12 + .../spirit/include/phoenix1_operators.hpp | 12 + .../spirit/include/phoenix1_primitives.hpp | 12 + .../spirit/include/phoenix1_special_ops.hpp | 12 + .../spirit/include/phoenix1_statements.hpp | 12 + .../spirit/include/phoenix1_tuple_helpers.hpp | 12 + .../boost/spirit/include/phoenix1_tuples.hpp | 12 + .../spirit/include/phoenix_algorithm.hpp | 12 + .../boost/spirit/include/phoenix_bind.hpp | 12 + .../spirit/include/phoenix_container.hpp | 12 + .../boost/spirit/include/phoenix_core.hpp | 12 + .../boost/spirit/include/phoenix_function.hpp | 12 + .../boost/spirit/include/phoenix_fusion.hpp | 12 + .../boost/spirit/include/phoenix_object.hpp | 12 + .../boost/spirit/include/phoenix_operator.hpp | 12 + .../boost/spirit/include/phoenix_scope.hpp | 12 + .../spirit/include/phoenix_statement.hpp | 12 + .../boost/spirit/include/phoenix_stl.hpp | 12 + .../boost/spirit/include/phoenix_version.hpp | 12 + .../include/boost/spirit/include/qi.hpp | 18 + .../boost/spirit/include/qi_action.hpp | 18 + .../boost/spirit/include/qi_alternative.hpp | 18 + .../boost/spirit/include/qi_and_predicate.hpp | 18 + .../include/boost/spirit/include/qi_attr.hpp | 18 + .../boost/spirit/include/qi_attr_cast.hpp | 18 + .../include/boost/spirit/include/qi_auto.hpp | 18 + .../boost/spirit/include/qi_auxiliary.hpp | 18 + .../boost/spirit/include/qi_binary.hpp | 18 + .../include/boost/spirit/include/qi_bool.hpp | 18 + .../include/boost/spirit/include/qi_char.hpp | 18 + .../include/boost/spirit/include/qi_char_.hpp | 18 + .../boost/spirit/include/qi_char_class.hpp | 18 + .../include/boost/spirit/include/qi_core.hpp | 27 + .../boost/spirit/include/qi_difference.hpp | 18 + .../boost/spirit/include/qi_directive.hpp | 18 + .../boost/spirit/include/qi_domain.hpp | 18 + .../include/boost/spirit/include/qi_eoi.hpp | 18 + .../include/boost/spirit/include/qi_eol.hpp | 18 + .../include/boost/spirit/include/qi_eps.hpp | 18 + .../boost/spirit/include/qi_expect.hpp | 18 + .../boost/spirit/include/qi_grammar.hpp | 18 + .../include/boost/spirit/include/qi_int.hpp | 18 + .../boost/spirit/include/qi_kleene.hpp | 18 + .../include/boost/spirit/include/qi_lazy.hpp | 18 + .../boost/spirit/include/qi_lexeme.hpp | 18 + .../include/boost/spirit/include/qi_list.hpp | 18 + .../include/boost/spirit/include/qi_lit.hpp | 18 + .../include/boost/spirit/include/qi_match.hpp | 18 + .../boost/spirit/include/qi_match_attr.hpp | 18 + .../boost/spirit/include/qi_match_auto.hpp | 18 + .../boost/spirit/include/qi_matches.hpp | 18 + .../boost/spirit/include/qi_no_case.hpp | 18 + .../boost/spirit/include/qi_no_skip.hpp | 18 + .../boost/spirit/include/qi_nonterminal.hpp | 18 + .../boost/spirit/include/qi_not_predicate.hpp | 18 + .../boost/spirit/include/qi_numeric.hpp | 18 + .../include/boost/spirit/include/qi_omit.hpp | 18 + .../boost/spirit/include/qi_operator.hpp | 18 + .../boost/spirit/include/qi_optional.hpp | 18 + .../include/boost/spirit/include/qi_parse.hpp | 18 + .../boost/spirit/include/qi_parse_attr.hpp | 12 + .../boost/spirit/include/qi_parse_auto.hpp | 19 + .../boost/spirit/include/qi_permutation.hpp | 18 + .../include/boost/spirit/include/qi_plus.hpp | 18 + .../include/boost/spirit/include/qi_raw.hpp | 18 + .../include/boost/spirit/include/qi_real.hpp | 18 + .../boost/spirit/include/qi_repeat.hpp | 18 + .../include/boost/spirit/include/qi_rule.hpp | 18 + .../boost/spirit/include/qi_sequence.hpp | 18 + .../boost/spirit/include/qi_sequential_or.hpp | 18 + .../include/boost/spirit/include/qi_skip.hpp | 18 + .../boost/spirit/include/qi_stream.hpp | 18 + .../boost/spirit/include/qi_string.hpp | 18 + .../boost/spirit/include/qi_symbols.hpp | 18 + .../include/boost/spirit/include/qi_uint.hpp | 18 + .../include/boost/spirit/include/qi_what.hpp | 18 + .../include/boost/spirit/include/support.hpp | 18 + .../include/support_adapt_adt_attributes.hpp | 18 + .../boost/spirit/include/support_any.hpp | 18 + .../boost/spirit/include/support_any_if.hpp | 18 + .../spirit/include/support_any_if_ns.hpp | 18 + .../boost/spirit/include/support_any_ns.hpp | 18 + .../boost/spirit/include/support_argument.hpp | 18 + .../boost/spirit/include/support_ascii.hpp | 18 + .../spirit/include/support_attributes.hpp | 18 + .../spirit/include/support_attributes_fwd.hpp | 18 + .../spirit/include/support_char_class.hpp | 18 + .../spirit/include/support_container.hpp | 18 + .../spirit/include/support_iso8859_1.hpp | 18 + .../include/support_istream_iterator.hpp | 18 + .../boost/spirit/include/support_locals.hpp | 18 + .../spirit/include/support_look_ahead.hpp | 18 + .../boost/spirit/include/support_modify.hpp | 18 + .../spirit/include/support_multi_pass.hpp | 18 + .../spirit/include/support_multi_pass_fwd.hpp | 18 + .../include/support_ostream_iterator.hpp | 18 + .../boost/spirit/include/support_standard.hpp | 18 + .../spirit/include/support_standard_wide.hpp | 18 + .../spirit/include/support_string_traits.hpp | 18 + .../boost/spirit/include/support_unused.hpp | 18 + .../include/boost/spirit/include/version.hpp | 20 + .../include/boost/spirit/iterator.hpp | 27 + .../boost/spirit/iterator/file_iterator.hpp | 27 + .../spirit/iterator/file_iterator_fwd.hpp | 27 + .../spirit/iterator/fixed_size_queue.hpp | 27 + .../boost/spirit/iterator/multi_pass.hpp | 27 + .../boost/spirit/iterator/multi_pass_fwd.hpp | 27 + .../spirit/iterator/position_iterator.hpp | 27 + .../spirit/iterator/position_iterator_fwd.hpp | 27 + .../include/boost/spirit/iterator/typeof.hpp | 27 + .../include/boost/spirit/meta.hpp | 27 + .../include/boost/spirit/meta/as_parser.hpp | 27 + .../include/boost/spirit/meta/fundamental.hpp | 27 + .../boost/spirit/meta/parser_traits.hpp | 27 + .../include/boost/spirit/meta/refactoring.hpp | 27 + .../include/boost/spirit/meta/traverse.hpp | 27 + .../include/boost/spirit/phoenix.hpp | 27 + .../include/boost/spirit/phoenix/actor.hpp | 24 + .../include/boost/spirit/phoenix/binders.hpp | 24 + .../include/boost/spirit/phoenix/casts.hpp | 24 + .../include/boost/spirit/phoenix/closures.hpp | 24 + .../boost/spirit/phoenix/composite.hpp | 24 + .../boost/spirit/phoenix/functions.hpp | 24 + .../include/boost/spirit/phoenix/new.hpp | 24 + .../boost/spirit/phoenix/operators.hpp | 24 + .../boost/spirit/phoenix/primitives.hpp | 24 + .../boost/spirit/phoenix/special_ops.hpp | 24 + .../boost/spirit/phoenix/statements.hpp | 24 + .../boost/spirit/phoenix/tuple_helpers.hpp | 24 + .../include/boost/spirit/phoenix/tuples.hpp | 24 + .../boost/spirit/repository/home/karma.hpp | 18 + .../repository/home/karma/directive.hpp | 17 + .../home/karma/directive/confix.hpp | 140 + .../repository/home/karma/nonterminal.hpp | 18 + .../home/karma/nonterminal/subrule.hpp | 560 + .../boost/spirit/repository/home/qi.hpp | 19 + .../spirit/repository/home/qi/directive.hpp | 18 + .../repository/home/qi/directive/confix.hpp | 150 + .../repository/home/qi/directive/distinct.hpp | 143 + .../spirit/repository/home/qi/nonterminal.hpp | 18 + .../home/qi/nonterminal/subrule.hpp | 586 + .../spirit/repository/home/qi/primitive.hpp | 18 + .../home/qi/primitive/flush_multi_pass.hpp | 92 + .../repository/home/qi/primitive/iter_pos.hpp | 83 + .../spirit/repository/home/support/confix.hpp | 22 + .../repository/home/support/distinct.hpp | 22 + .../home/support/flush_multi_pass.hpp | 22 + .../home/support/subrule_context.hpp | 57 + .../boost/spirit/repository/include/karma.hpp | 18 + .../repository/include/karma_confix.hpp | 18 + .../repository/include/karma_directive.hpp | 18 + .../repository/include/karma_nonterminal.hpp | 19 + .../repository/include/karma_subrule.hpp | 19 + .../boost/spirit/repository/include/qi.hpp | 18 + .../spirit/repository/include/qi_confix.hpp | 18 + .../repository/include/qi_directive.hpp | 18 + .../spirit/repository/include/qi_distinct.hpp | 18 + .../include/qi_flush_multi_pass.hpp | 18 + .../spirit/repository/include/qi_iter_pos.hpp | 18 + .../repository/include/qi_nonterminal.hpp | 19 + .../repository/include/qi_primitive.hpp | 18 + .../spirit/repository/include/qi_subrule.hpp | 19 + .../include/boost/spirit/symbols.hpp | 27 + .../include/boost/spirit/symbols/symbols.hpp | 27 + .../boost/spirit/symbols/symbols_fwd.hpp | 27 + .../include/boost/spirit/symbols/typeof.hpp | 27 + .../include/boost/spirit/tree/ast.hpp | 27 + .../include/boost/spirit/tree/ast_fwd.hpp | 27 + .../include/boost/spirit/tree/common.hpp | 27 + .../include/boost/spirit/tree/common_fwd.hpp | 27 + .../include/boost/spirit/tree/parse_tree.hpp | 27 + .../boost/spirit/tree/parse_tree_fwd.hpp | 27 + .../boost/spirit/tree/parse_tree_utils.hpp | 27 + .../include/boost/spirit/tree/parsetree.dtd | 21 + .../include/boost/spirit/tree/tree_to_xml.hpp | 27 + .../include/boost/spirit/tree/typeof.hpp | 27 + .../include/boost/spirit/utility.hpp | 27 + .../include/boost/spirit/utility/chset.hpp | 27 + .../boost/spirit/utility/chset_operators.hpp | 27 + .../include/boost/spirit/utility/confix.hpp | 27 + .../boost/spirit/utility/confix_fwd.hpp | 27 + .../include/boost/spirit/utility/distinct.hpp | 27 + .../boost/spirit/utility/distinct_fwd.hpp | 27 + .../boost/spirit/utility/escape_char.hpp | 27 + .../boost/spirit/utility/escape_char_fwd.hpp | 27 + .../boost/spirit/utility/flush_multi_pass.hpp | 27 + .../boost/spirit/utility/functor_parser.hpp | 27 + .../boost/spirit/utility/grammar_def.hpp | 27 + .../boost/spirit/utility/grammar_def_fwd.hpp | 27 + .../include/boost/spirit/utility/lists.hpp | 27 + .../boost/spirit/utility/lists_fwd.hpp | 27 + .../include/boost/spirit/utility/loops.hpp | 27 + .../include/boost/spirit/utility/regex.hpp | 27 + .../boost/spirit/utility/rule_parser.hpp | 27 + .../boost/spirit/utility/scoped_lock.hpp | 27 + .../include/boost/spirit/utility/typeof.hpp | 27 + .../include/boost/spirit/version.hpp | 14 + .../include/boost/static_assert.hpp | 132 + .../include/boost/strong_typedef.hpp | 66 + .../boost-1.45.0/include/boost/swap.hpp | 12 + .../boost-1.45.0/include/boost/thread.hpp | 26 + .../include/boost/thread/barrier.hpp | 64 + .../include/boost/thread/condition.hpp | 16 + .../boost/thread/condition_variable.hpp | 21 + .../include/boost/thread/detail/config.hpp | 100 + .../boost/thread/detail/force_cast.hpp | 39 + .../include/boost/thread/detail/move.hpp | 60 + .../include/boost/thread/detail/platform.hpp | 71 + .../include/boost/thread/detail/singleton.hpp | 59 + .../include/boost/thread/detail/thread.hpp | 532 + .../boost/thread/detail/thread_group.hpp | 108 + .../boost/thread/detail/thread_heap_alloc.hpp | 23 + .../thread/detail/thread_interruption.hpp | 35 + .../include/boost/thread/detail/tss_hooks.hpp | 65 + .../include/boost/thread/exceptions.hpp | 182 + .../include/boost/thread/future.hpp | 1383 ++ .../include/boost/thread/locks.hpp | 1585 ++ .../include/boost/thread/mutex.hpp | 21 + .../include/boost/thread/once.hpp | 33 + .../thread/pthread/condition_variable.hpp | 212 + .../thread/pthread/condition_variable_fwd.hpp | 107 + .../include/boost/thread/pthread/mutex.hpp | 222 + .../include/boost/thread/pthread/once.hpp | 95 + .../pthread/pthread_mutex_scoped_lock.hpp | 64 + .../boost/thread/pthread/recursive_mutex.hpp | 345 + .../boost/thread/pthread/shared_mutex.hpp | 303 + .../boost/thread/pthread/thread_data.hpp | 145 + .../thread/pthread/thread_heap_alloc.hpp | 242 + .../include/boost/thread/pthread/timespec.hpp | 36 + .../include/boost/thread/recursive_mutex.hpp | 21 + .../include/boost/thread/shared_mutex.hpp | 21 + .../include/boost/thread/thread.hpp | 27 + .../include/boost/thread/thread_time.hpp | 55 + .../boost-1.45.0/include/boost/thread/tss.hpp | 113 + .../thread/win32/basic_recursive_mutex.hpp | 120 + .../boost/thread/win32/basic_timed_mutex.hpp | 209 + .../boost/thread/win32/condition_variable.hpp | 418 + .../boost/thread/win32/interlocked_read.hpp | 80 + .../include/boost/thread/win32/mutex.hpp | 69 + .../include/boost/thread/win32/once.hpp | 205 + .../boost/thread/win32/recursive_mutex.hpp | 68 + .../boost/thread/win32/shared_mutex.hpp | 603 + .../boost/thread/win32/thread_data.hpp | 183 + .../boost/thread/win32/thread_heap_alloc.hpp | 398 + .../boost/thread/win32/thread_primitives.hpp | 407 + .../include/boost/thread/xtime.hpp | 92 + .../include/boost/throw_exception.hpp | 91 + .../boost-1.45.0/include/boost/timer.hpp | 72 + .../include/boost/token_functions.hpp | 641 + .../include/boost/token_iterator.hpp | 128 + .../boost-1.45.0/include/boost/tokenizer.hpp | 98 + .../boost-1.45.0/include/boost/tr1/array.hpp | 88 + .../boost-1.45.0/include/boost/tr1/cmath.hpp | 267 + .../include/boost/tr1/complex.hpp | 244 + .../include/boost/tr1/detail/config.hpp | 169 + .../include/boost/tr1/detail/config_all.hpp | 160 + .../boost/tr1/detail/functor2iterator.hpp | 34 + .../boost/tr1/detail/math_overloads.hpp | 58 + .../include/boost/tr1/functional.hpp | 140 + .../boost-1.45.0/include/boost/tr1/memory.hpp | 72 + .../boost-1.45.0/include/boost/tr1/random.hpp | 586 + .../boost-1.45.0/include/boost/tr1/regex.hpp | 147 + .../include/boost/tr1/tr1/algorithm | 27 + .../boost-1.45.0/include/boost/tr1/tr1/array | 34 + .../include/boost/tr1/tr1/bcc32/array.h | 13 + .../include/boost/tr1/tr1/bcc32/random.h | 13 + .../include/boost/tr1/tr1/bcc32/regex.h | 13 + .../include/boost/tr1/tr1/bcc32/tuple.h | 13 + .../include/boost/tr1/tr1/bcc32/type_tra.h | 13 + .../include/boost/tr1/tr1/bcc32/unordere.h | 15 + .../boost-1.45.0/include/boost/tr1/tr1/bitset | 27 + .../boost-1.45.0/include/boost/tr1/tr1/cmath | 41 + .../include/boost/tr1/tr1/complex | 31 + .../boost-1.45.0/include/boost/tr1/tr1/deque | 27 + .../include/boost/tr1/tr1/exception | 39 + .../include/boost/tr1/tr1/fstream | 27 + .../include/boost/tr1/tr1/functional | 30 + .../include/boost/tr1/tr1/iomanip | 27 + .../boost-1.45.0/include/boost/tr1/tr1/ios | 27 + .../include/boost/tr1/tr1/iostream | 27 + .../include/boost/tr1/tr1/istream | 27 + .../include/boost/tr1/tr1/iterator | 27 + .../boost-1.45.0/include/boost/tr1/tr1/limits | 27 + .../boost-1.45.0/include/boost/tr1/tr1/list | 27 + .../boost-1.45.0/include/boost/tr1/tr1/locale | 27 + .../boost-1.45.0/include/boost/tr1/tr1/map | 27 + .../boost-1.45.0/include/boost/tr1/tr1/memory | 31 + .../boost-1.45.0/include/boost/tr1/tr1/new | 35 + .../include/boost/tr1/tr1/numeric | 27 + .../include/boost/tr1/tr1/ostream | 27 + .../boost-1.45.0/include/boost/tr1/tr1/queue | 27 + .../boost-1.45.0/include/boost/tr1/tr1/random | 34 + .../boost-1.45.0/include/boost/tr1/tr1/regex | 22 + .../boost-1.45.0/include/boost/tr1/tr1/set | 27 + .../include/boost/tr1/tr1/sstream | 27 + .../boost-1.45.0/include/boost/tr1/tr1/stack | 27 + .../include/boost/tr1/tr1/stdexcept | 34 + .../include/boost/tr1/tr1/streambuf | 27 + .../boost-1.45.0/include/boost/tr1/tr1/string | 27 + .../include/boost/tr1/tr1/strstream | 29 + .../boost/tr1/tr1/sun/algorithm.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/array.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/bcc32.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/bitset.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/cmath.SUNWCCh | 7 + .../include/boost/tr1/tr1/sun/complex.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/deque.SUNWCCh | 6 + .../boost/tr1/tr1/sun/exception.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/fstream.SUNWCCh | 6 + .../boost/tr1/tr1/sun/functional.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/iomanip.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/ios.SUNWCCh | 6 + .../boost/tr1/tr1/sun/iostream.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/istream.SUNWCCh | 6 + .../boost/tr1/tr1/sun/iterator.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/limits.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/list.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/locale.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/map.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/memory.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/new.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/numeric.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/ostream.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/queue.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/random.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/regex.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/set.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/sstream.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/stack.SUNWCCh | 6 + .../boost/tr1/tr1/sun/stdexcept.SUNWCCh | 6 + .../boost/tr1/tr1/sun/streambuf.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/string.SUNWCCh | 6 + .../boost/tr1/tr1/sun/strstream.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/sun.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/tuple.SUNWCCh | 6 + .../boost/tr1/tr1/sun/type_traits.SUNWCCh | 6 + .../boost/tr1/tr1/sun/typeinfo.SUNWCCh | 6 + .../boost/tr1/tr1/sun/unordered_map.SUNWCCh | 7 + .../boost/tr1/tr1/sun/unordered_set.SUNWCCh | 7 + .../include/boost/tr1/tr1/sun/utility.SUNWCCh | 6 + .../boost/tr1/tr1/sun/valarray.SUNWCCh | 6 + .../include/boost/tr1/tr1/sun/vector.SUNWCCh | 6 + .../boost-1.45.0/include/boost/tr1/tr1/tuple | 34 + .../include/boost/tr1/tr1/type_traits | 43 + .../include/boost/tr1/tr1/typeinfo | 27 + .../include/boost/tr1/tr1/unordered_map | 34 + .../include/boost/tr1/tr1/unordered_set | 34 + .../include/boost/tr1/tr1/utility | 41 + .../include/boost/tr1/tr1/valarray | 27 + .../boost-1.45.0/include/boost/tr1/tr1/vector | 27 + .../boost-1.45.0/include/boost/tr1/tuple.hpp | 82 + .../include/boost/tr1/type_traits.hpp | 87 + .../include/boost/tr1/unordered_map.hpp | 33 + .../include/boost/tr1/unordered_set.hpp | 33 + .../include/boost/tr1/utility.hpp | 123 + .../boost/tuple/detail/tuple_basic.hpp | 953 + .../detail/tuple_basic_no_partial_spec.hpp | 841 + .../include/boost/tuple/tuple.hpp | 90 + .../include/boost/tuple/tuple_comparison.hpp | 175 + .../include/boost/tuple/tuple_io.hpp | 557 + .../boost-1.45.0/include/boost/type.hpp | 18 + .../include/boost/type_traits.hpp | 99 + .../include/boost/type_traits/add_const.hpp | 47 + .../include/boost/type_traits/add_cv.hpp | 48 + .../type_traits/add_lvalue_reference.hpp | 26 + .../include/boost/type_traits/add_pointer.hpp | 72 + .../boost/type_traits/add_reference.hpp | 107 + .../type_traits/add_rvalue_reference.hpp | 67 + .../boost/type_traits/add_volatile.hpp | 47 + .../boost/type_traits/aligned_storage.hpp | 13 + .../boost/type_traits/alignment_of.hpp | 128 + .../boost/type_traits/alignment_traits.hpp | 15 + .../boost/type_traits/arithmetic_traits.hpp | 20 + .../boost/type_traits/array_traits.hpp | 15 + .../type_traits/broken_compiler_spec.hpp | 117 + .../include/boost/type_traits/common_type.hpp | 153 + .../boost/type_traits/composite_traits.hpp | 29 + .../include/boost/type_traits/conditional.hpp | 25 + .../include/boost/type_traits/config.hpp | 76 + .../boost/type_traits/conversion_traits.hpp | 17 + .../include/boost/type_traits/cv_traits.hpp | 24 + .../include/boost/type_traits/decay.hpp | 44 + .../type_traits/detail/bool_trait_def.hpp | 173 + .../type_traits/detail/bool_trait_undef.hpp | 27 + .../type_traits/detail/common_type_imp.hpp | 302 + .../type_traits/detail/cv_traits_impl.hpp | 97 + .../boost/type_traits/detail/false_result.hpp | 28 + .../boost/type_traits/detail/ice_and.hpp | 35 + .../boost/type_traits/detail/ice_eq.hpp | 36 + .../boost/type_traits/detail/ice_not.hpp | 31 + .../boost/type_traits/detail/ice_or.hpp | 34 + .../detail/is_function_ptr_helper.hpp | 220 + .../detail/is_function_ptr_tester.hpp | 654 + .../detail/is_mem_fun_pointer_impl.hpp | 817 + .../detail/is_mem_fun_pointer_tester.hpp | 2759 +++ .../type_traits/detail/size_t_trait_def.hpp | 58 + .../type_traits/detail/size_t_trait_undef.hpp | 16 + .../detail/template_arity_spec.hpp | 31 + .../type_traits/detail/type_trait_def.hpp | 61 + .../type_traits/detail/type_trait_undef.hpp | 19 + .../include/boost/type_traits/detail/wrap.hpp | 18 + .../boost/type_traits/detail/yes_no_type.hpp | 26 + .../include/boost/type_traits/extent.hpp | 145 + .../type_traits/floating_point_promotion.hpp | 91 + .../boost/type_traits/function_traits.hpp | 236 + .../boost/type_traits/has_new_operator.hpp | 140 + .../boost/type_traits/has_nothrow_assign.hpp | 38 + .../type_traits/has_nothrow_constructor.hpp | 39 + .../boost/type_traits/has_nothrow_copy.hpp | 39 + .../type_traits/has_nothrow_destructor.hpp | 25 + .../boost/type_traits/has_trivial_assign.hpp | 50 + .../type_traits/has_trivial_constructor.hpp | 43 + .../boost/type_traits/has_trivial_copy.hpp | 49 + .../type_traits/has_trivial_destructor.hpp | 42 + .../type_traits/has_virtual_destructor.hpp | 25 + .../include/boost/type_traits/ice.hpp | 20 + .../boost/type_traits/integral_constant.hpp | 53 + .../boost/type_traits/integral_promotion.hpp | 195 + .../include/boost/type_traits/intrinsics.hpp | 267 + .../include/boost/type_traits/is_abstract.hpp | 153 + .../boost/type_traits/is_arithmetic.hpp | 51 + .../include/boost/type_traits/is_array.hpp | 91 + .../boost/type_traits/is_base_and_derived.hpp | 254 + .../include/boost/type_traits/is_base_of.hpp | 51 + .../boost/type_traits/is_base_of_tr1.hpp | 50 + .../include/boost/type_traits/is_class.hpp | 140 + .../include/boost/type_traits/is_complex.hpp | 34 + .../include/boost/type_traits/is_compound.hpp | 46 + .../include/boost/type_traits/is_const.hpp | 165 + .../boost/type_traits/is_convertible.hpp | 430 + .../include/boost/type_traits/is_empty.hpp | 221 + .../include/boost/type_traits/is_enum.hpp | 189 + .../include/boost/type_traits/is_float.hpp | 27 + .../boost/type_traits/is_floating_point.hpp | 27 + .../include/boost/type_traits/is_function.hpp | 106 + .../boost/type_traits/is_fundamental.hpp | 45 + .../include/boost/type_traits/is_integral.hpp | 78 + .../boost/type_traits/is_lvalue_reference.hpp | 118 + .../is_member_function_pointer.hpp | 136 + .../type_traits/is_member_object_pointer.hpp | 46 + .../boost/type_traits/is_member_pointer.hpp | 116 + .../include/boost/type_traits/is_object.hpp | 53 + .../include/boost/type_traits/is_pod.hpp | 135 + .../include/boost/type_traits/is_pointer.hpp | 162 + .../boost/type_traits/is_polymorphic.hpp | 114 + .../boost/type_traits/is_reference.hpp | 45 + .../boost/type_traits/is_rvalue_reference.hpp | 29 + .../include/boost/type_traits/is_same.hpp | 103 + .../include/boost/type_traits/is_scalar.hpp | 55 + .../include/boost/type_traits/is_signed.hpp | 140 + .../boost/type_traits/is_stateless.hpp | 48 + .../include/boost/type_traits/is_union.hpp | 49 + .../include/boost/type_traits/is_unsigned.hpp | 135 + .../boost/type_traits/is_virtual_base_of.hpp | 104 + .../include/boost/type_traits/is_void.hpp | 38 + .../include/boost/type_traits/is_volatile.hpp | 152 + .../include/boost/type_traits/make_signed.hpp | 137 + .../boost/type_traits/make_unsigned.hpp | 137 + .../type_traits/msvc/remove_all_extents.hpp | 47 + .../boost/type_traits/msvc/remove_bounds.hpp | 43 + .../boost/type_traits/msvc/remove_const.hpp | 143 + .../boost/type_traits/msvc/remove_cv.hpp | 190 + .../boost/type_traits/msvc/remove_extent.hpp | 43 + .../boost/type_traits/msvc/remove_pointer.hpp | 42 + .../type_traits/msvc/remove_reference.hpp | 42 + .../type_traits/msvc/remove_volatile.hpp | 143 + .../include/boost/type_traits/msvc/typeof.hpp | 50 + .../boost/type_traits/object_traits.hpp | 33 + .../include/boost/type_traits/promote.hpp | 40 + .../include/boost/type_traits/rank.hpp | 89 + .../boost/type_traits/reference_traits.hpp | 15 + .../boost/type_traits/remove_all_extents.hpp | 48 + .../boost/type_traits/remove_bounds.hpp | 48 + .../boost/type_traits/remove_const.hpp | 90 + .../include/boost/type_traits/remove_cv.hpp | 83 + .../boost/type_traits/remove_extent.hpp | 48 + .../boost/type_traits/remove_pointer.hpp | 43 + .../boost/type_traits/remove_reference.hpp | 70 + .../boost/type_traits/remove_volatile.hpp | 88 + .../include/boost/type_traits/same_traits.hpp | 15 + .../boost/type_traits/transform_traits.hpp | 21 + .../type_traits/transform_traits_spec.hpp | 14 + .../boost/type_traits/type_with_alignment.hpp | 393 + .../include/boost/typeof/dmc/typeof_impl.hpp | 100 + .../include/boost/typeof/encode_decode.hpp | 61 + .../boost/typeof/encode_decode_params.hpp | 34 + .../boost/typeof/incr_registration_group.hpp | 14 + .../include/boost/typeof/int_encoding.hpp | 118 + .../boost/typeof/integral_template_param.hpp | 80 + .../include/boost/typeof/message.hpp | 8 + .../include/boost/typeof/modifiers.hpp | 121 + .../include/boost/typeof/msvc/typeof_impl.hpp | 281 + .../include/boost/typeof/native.hpp | 60 + .../boost/typeof/pointers_data_members.hpp | 38 + .../boost/typeof/register_functions.hpp | 50 + .../typeof/register_functions_iterate.hpp | 135 + .../boost/typeof/register_fundamental.hpp | 62 + .../boost/typeof/register_mem_functions.hpp | 32 + .../include/boost/typeof/std/bitset.hpp | 15 + .../include/boost/typeof/std/complex.hpp | 15 + .../include/boost/typeof/std/deque.hpp | 17 + .../include/boost/typeof/std/fstream.hpp | 27 + .../include/boost/typeof/std/functional.hpp | 55 + .../include/boost/typeof/std/iostream.hpp | 18 + .../include/boost/typeof/std/istream.hpp | 21 + .../include/boost/typeof/std/iterator.hpp | 58 + .../include/boost/typeof/std/list.hpp | 17 + .../include/boost/typeof/std/locale.hpp | 40 + .../include/boost/typeof/std/map.hpp | 23 + .../include/boost/typeof/std/memory.hpp | 17 + .../include/boost/typeof/std/ostream.hpp | 18 + .../include/boost/typeof/std/queue.hpp | 17 + .../include/boost/typeof/std/set.hpp | 22 + .../include/boost/typeof/std/sstream.hpp | 32 + .../include/boost/typeof/std/stack.hpp | 17 + .../include/boost/typeof/std/streambuf.hpp | 17 + .../include/boost/typeof/std/string.hpp | 24 + .../include/boost/typeof/std/utility.hpp | 15 + .../include/boost/typeof/std/valarray.hpp | 21 + .../include/boost/typeof/std/vector.hpp | 17 + .../boost/typeof/template_encoding.hpp | 160 + .../boost/typeof/template_template_param.hpp | 149 + .../include/boost/typeof/type_encoding.hpp | 27 + .../boost/typeof/type_template_param.hpp | 37 + .../include/boost/typeof/typeof.hpp | 203 + .../include/boost/typeof/typeof_impl.hpp | 186 + .../include/boost/typeof/unsupported.hpp | 29 + .../include/boost/typeof/vector.hpp | 166 + .../include/boost/typeof/vector100.hpp | 321 + .../include/boost/typeof/vector150.hpp | 471 + .../include/boost/typeof/vector200.hpp | 621 + .../include/boost/typeof/vector50.hpp | 171 + .../include/boost/units/absolute.hpp | 153 + .../include/boost/units/base_dimension.hpp | 97 + .../include/boost/units/base_unit.hpp | 118 + .../units/base_units/angle/arcminute.hpp | 36 + .../units/base_units/angle/arcsecond.hpp | 37 + .../boost/units/base_units/angle/degree.hpp | 27 + .../boost/units/base_units/angle/gradian.hpp | 27 + .../boost/units/base_units/angle/radian.hpp | 48 + .../units/base_units/angle/revolution.hpp | 36 + .../units/base_units/angle/steradian.hpp | 48 + .../astronomical/astronomical_unit.hpp | 27 + .../base_units/astronomical/light_day.hpp | 39 + .../base_units/astronomical/light_hour.hpp | 39 + .../base_units/astronomical/light_minute.hpp | 39 + .../base_units/astronomical/light_second.hpp | 27 + .../base_units/astronomical/light_year.hpp | 39 + .../units/base_units/astronomical/parsec.hpp | 27 + .../boost/units/base_units/cgs/biot.hpp | 31 + .../boost/units/base_units/cgs/centimeter.hpp | 31 + .../boost/units/base_units/cgs/gram.hpp | 49 + .../units/base_units/imperial/conversions.hpp | 46 + .../units/base_units/imperial/drachm.hpp | 39 + .../units/base_units/imperial/fluid_ounce.hpp | 39 + .../boost/units/base_units/imperial/foot.hpp | 39 + .../units/base_units/imperial/furlong.hpp | 39 + .../units/base_units/imperial/gallon.hpp | 40 + .../boost/units/base_units/imperial/gill.hpp | 40 + .../boost/units/base_units/imperial/grain.hpp | 39 + .../base_units/imperial/hundredweight.hpp | 39 + .../boost/units/base_units/imperial/inch.hpp | 39 + .../units/base_units/imperial/league.hpp | 39 + .../boost/units/base_units/imperial/mile.hpp | 39 + .../boost/units/base_units/imperial/ounce.hpp | 39 + .../boost/units/base_units/imperial/pint.hpp | 29 + .../boost/units/base_units/imperial/pound.hpp | 34 + .../boost/units/base_units/imperial/quart.hpp | 40 + .../units/base_units/imperial/quarter.hpp | 39 + .../boost/units/base_units/imperial/stone.hpp | 39 + .../boost/units/base_units/imperial/thou.hpp | 39 + .../boost/units/base_units/imperial/ton.hpp | 40 + .../boost/units/base_units/imperial/yard.hpp | 32 + .../units/base_units/metric/angstrom.hpp | 37 + .../boost/units/base_units/metric/are.hpp | 19 + .../units/base_units/metric/atmosphere.hpp | 19 + .../boost/units/base_units/metric/bar.hpp | 19 + .../boost/units/base_units/metric/barn.hpp | 19 + .../boost/units/base_units/metric/day.hpp | 39 + .../boost/units/base_units/metric/fermi.hpp | 36 + .../boost/units/base_units/metric/hectare.hpp | 19 + .../boost/units/base_units/metric/hour.hpp | 37 + .../boost/units/base_units/metric/knot.hpp | 19 + .../boost/units/base_units/metric/liter.hpp | 19 + .../boost/units/base_units/metric/micron.hpp | 36 + .../boost/units/base_units/metric/minute.hpp | 37 + .../boost/units/base_units/metric/mmHg.hpp | 19 + .../units/base_units/metric/nautical_mile.hpp | 36 + .../boost/units/base_units/metric/ton.hpp | 39 + .../boost/units/base_units/metric/torr.hpp | 19 + .../boost/units/base_units/metric/year.hpp | 38 + .../boost/units/base_units/si/ampere.hpp | 48 + .../boost/units/base_units/si/candela.hpp | 48 + .../boost/units/base_units/si/kelvin.hpp | 48 + .../boost/units/base_units/si/kilogram.hpp | 31 + .../boost/units/base_units/si/meter.hpp | 50 + .../boost/units/base_units/si/mole.hpp | 48 + .../boost/units/base_units/si/second.hpp | 48 + .../units/base_units/temperature/celsius.hpp | 48 + .../base_units/temperature/conversions.hpp | 42 + .../base_units/temperature/fahrenheit.hpp | 48 + .../include/boost/units/base_units/us/cup.hpp | 39 + .../boost/units/base_units/us/dram.hpp | 39 + .../boost/units/base_units/us/fluid_dram.hpp | 39 + .../boost/units/base_units/us/fluid_ounce.hpp | 39 + .../boost/units/base_units/us/foot.hpp | 39 + .../boost/units/base_units/us/gallon.hpp | 39 + .../boost/units/base_units/us/gill.hpp | 39 + .../boost/units/base_units/us/grain.hpp | 39 + .../units/base_units/us/hundredweight.hpp | 40 + .../boost/units/base_units/us/inch.hpp | 39 + .../include/boost/units/base_units/us/mil.hpp | 39 + .../boost/units/base_units/us/mile.hpp | 39 + .../boost/units/base_units/us/minim.hpp | 39 + .../boost/units/base_units/us/ounce.hpp | 39 + .../boost/units/base_units/us/pint.hpp | 28 + .../boost/units/base_units/us/pound.hpp | 32 + .../boost/units/base_units/us/pound_force.hpp | 32 + .../boost/units/base_units/us/quart.hpp | 39 + .../boost/units/base_units/us/tablespoon.hpp | 39 + .../boost/units/base_units/us/teaspoon.hpp | 39 + .../include/boost/units/base_units/us/ton.hpp | 39 + .../boost/units/base_units/us/yard.hpp | 32 + .../include/boost/units/cmath.hpp | 676 + .../include/boost/units/config.hpp | 105 + .../include/boost/units/conversion.hpp | 183 + .../include/boost/units/derived_dimension.hpp | 208 + .../boost/units/detail/absolute_impl.hpp | 104 + .../include/boost/units/detail/cmath_impl.hpp | 154 + .../boost/units/detail/conversion_impl.hpp | 458 + .../include/boost/units/detail/dim_impl.hpp | 90 + .../boost/units/detail/dimension_impl.hpp | 347 + .../boost/units/detail/dimension_list.hpp | 133 + .../boost/units/detail/dimensionless_unit.hpp | 88 + .../units/detail/heterogeneous_conversion.hpp | 309 + .../boost/units/detail/linear_algebra.hpp | 1060 + .../include/boost/units/detail/one.hpp | 109 + .../include/boost/units/detail/ordinal.hpp | 49 + .../units/detail/prevent_redefinition.hpp | 54 + .../boost/units/detail/push_front_if.hpp | 48 + .../boost/units/detail/push_front_or_add.hpp | 84 + .../include/boost/units/detail/sort.hpp | 109 + .../units/detail/static_rational_power.hpp | 206 + .../include/boost/units/detail/unscale.hpp | 234 + .../include/boost/units/detail/utility.hpp | 104 + .../boost-1.45.0/include/boost/units/dim.hpp | 167 + .../include/boost/units/dimension.hpp | 150 + .../boost/units/dimensionless_quantity.hpp | 37 + .../boost/units/dimensionless_type.hpp | 55 + .../boost/units/dimensionless_unit.hpp | 37 + .../include/boost/units/get_dimension.hpp | 54 + .../include/boost/units/get_system.hpp | 51 + .../boost/units/heterogeneous_system.hpp | 428 + .../boost/units/homogeneous_system.hpp | 105 + .../boost-1.45.0/include/boost/units/io.hpp | 1014 + .../include/boost/units/is_dim.hpp | 42 + .../include/boost/units/is_dimension_list.hpp | 47 + .../include/boost/units/is_dimensionless.hpp | 47 + .../boost/units/is_dimensionless_quantity.hpp | 34 + .../boost/units/is_dimensionless_unit.hpp | 34 + .../include/boost/units/is_quantity.hpp | 42 + .../boost/units/is_quantity_of_dimension.hpp | 42 + .../boost/units/is_quantity_of_system.hpp | 42 + .../include/boost/units/is_unit.hpp | 41 + .../boost/units/is_unit_of_dimension.hpp | 46 + .../include/boost/units/is_unit_of_system.hpp | 46 + .../include/boost/units/lambda.hpp | 593 + .../include/boost/units/limits.hpp | 69 + .../include/boost/units/make_scaled_unit.hpp | 60 + .../include/boost/units/make_system.hpp | 145 + .../include/boost/units/operators.hpp | 164 + .../boost/units/physical_dimensions.hpp | 90 + .../physical_dimensions/absorbed_dose.hpp | 30 + .../physical_dimensions/acceleration.hpp | 30 + .../units/physical_dimensions/action.hpp | 32 + .../units/physical_dimensions/activity.hpp | 28 + .../units/physical_dimensions/amount.hpp | 49 + .../angular_acceleration.hpp | 30 + .../physical_dimensions/angular_momentum.hpp | 34 + .../physical_dimensions/angular_velocity.hpp | 30 + .../boost/units/physical_dimensions/area.hpp | 28 + .../units/physical_dimensions/capacitance.hpp | 34 + .../units/physical_dimensions/conductance.hpp | 34 + .../physical_dimensions/conductivity.hpp | 34 + .../units/physical_dimensions/current.hpp | 49 + .../physical_dimensions/dose_equivalent.hpp | 30 + .../physical_dimensions/dynamic_viscosity.hpp | 32 + .../physical_dimensions/electric_charge.hpp | 30 + .../electric_potential.hpp | 34 + .../units/physical_dimensions/energy.hpp | 32 + .../physical_dimensions/energy_density.hpp | 32 + .../boost/units/physical_dimensions/force.hpp | 32 + .../units/physical_dimensions/frequency.hpp | 28 + .../physical_dimensions/heat_capacity.hpp | 34 + .../units/physical_dimensions/illuminance.hpp | 32 + .../units/physical_dimensions/impedance.hpp | 34 + .../units/physical_dimensions/inductance.hpp | 34 + .../kinematic_viscosity.hpp | 30 + .../units/physical_dimensions/length.hpp | 49 + .../units/physical_dimensions/luminance.hpp | 30 + .../physical_dimensions/luminous_flux.hpp | 30 + .../luminous_intensity.hpp | 49 + .../magnetic_field_intensity.hpp | 30 + .../physical_dimensions/magnetic_flux.hpp | 34 + .../magnetic_flux_density.hpp | 32 + .../boost/units/physical_dimensions/mass.hpp | 49 + .../physical_dimensions/mass_density.hpp | 30 + .../physical_dimensions/molar_energy.hpp | 34 + .../molar_heat_capacity.hpp | 36 + .../physical_dimensions/moment_of_inertia.hpp | 32 + .../units/physical_dimensions/momentum.hpp | 32 + .../physical_dimensions/permeability.hpp | 34 + .../physical_dimensions/permittivity.hpp | 34 + .../units/physical_dimensions/plane_angle.hpp | 49 + .../boost/units/physical_dimensions/power.hpp | 32 + .../units/physical_dimensions/pressure.hpp | 32 + .../units/physical_dimensions/reluctance.hpp | 34 + .../units/physical_dimensions/resistance.hpp | 34 + .../units/physical_dimensions/resistivity.hpp | 34 + .../units/physical_dimensions/solid_angle.hpp | 49 + .../physical_dimensions/specific_energy.hpp | 30 + .../specific_heat_capacity.hpp | 32 + .../physical_dimensions/specific_volume.hpp | 30 + .../units/physical_dimensions/stress.hpp | 32 + .../physical_dimensions/surface_density.hpp | 30 + .../physical_dimensions/surface_tension.hpp | 31 + .../units/physical_dimensions/temperature.hpp | 49 + .../thermal_conductivity.hpp | 34 + .../boost/units/physical_dimensions/time.hpp | 49 + .../units/physical_dimensions/torque.hpp | 34 + .../units/physical_dimensions/velocity.hpp | 30 + .../units/physical_dimensions/volume.hpp | 28 + .../units/physical_dimensions/wavenumber.hpp | 28 + .../boost-1.45.0/include/boost/units/pow.hpp | 112 + .../include/boost/units/quantity.hpp | 1218 + .../include/boost/units/reduce_unit.hpp | 41 + .../include/boost/units/scale.hpp | 143 + .../include/boost/units/scaled_base_unit.hpp | 146 + .../include/boost/units/static_constant.hpp | 57 + .../include/boost/units/static_rational.hpp | 349 + .../include/boost/units/systems/abstract.hpp | 139 + .../boost/units/systems/angle/degrees.hpp | 43 + .../boost/units/systems/angle/gradians.hpp | 43 + .../boost/units/systems/angle/revolutions.hpp | 43 + .../include/boost/units/systems/cgs.hpp | 44 + .../boost/units/systems/cgs/acceleration.hpp | 34 + .../include/boost/units/systems/cgs/area.hpp | 36 + .../include/boost/units/systems/cgs/base.hpp | 46 + .../boost/units/systems/cgs/current.hpp | 33 + .../boost/units/systems/cgs/dimensionless.hpp | 30 + .../units/systems/cgs/dynamic_viscosity.hpp | 33 + .../boost/units/systems/cgs/energy.hpp | 34 + .../include/boost/units/systems/cgs/force.hpp | 34 + .../boost/units/systems/cgs/frequency.hpp | 31 + .../include/boost/units/systems/cgs/io.hpp | 50 + .../units/systems/cgs/kinematic_viscosity.hpp | 34 + .../boost/units/systems/cgs/length.hpp | 35 + .../include/boost/units/systems/cgs/mass.hpp | 36 + .../boost/units/systems/cgs/mass_density.hpp | 31 + .../boost/units/systems/cgs/momentum.hpp | 31 + .../include/boost/units/systems/cgs/power.hpp | 31 + .../boost/units/systems/cgs/pressure.hpp | 34 + .../include/boost/units/systems/cgs/time.hpp | 33 + .../boost/units/systems/cgs/velocity.hpp | 36 + .../boost/units/systems/cgs/volume.hpp | 36 + .../boost/units/systems/cgs/wavenumber.hpp | 38 + .../boost/units/systems/detail/constants.hpp | 201 + .../include/boost/units/systems/si.hpp | 77 + .../boost/units/systems/si/absorbed_dose.hpp | 34 + .../boost/units/systems/si/acceleration.hpp | 36 + .../include/boost/units/systems/si/action.hpp | 31 + .../boost/units/systems/si/activity.hpp | 34 + .../include/boost/units/systems/si/amount.hpp | 33 + .../units/systems/si/angular_acceleration.hpp | 31 + .../units/systems/si/angular_momentum.hpp | 31 + .../units/systems/si/angular_velocity.hpp | 34 + .../include/boost/units/systems/si/area.hpp | 39 + .../include/boost/units/systems/si/base.hpp | 56 + .../boost/units/systems/si/capacitance.hpp | 34 + .../units/systems/si/catalytic_activity.hpp | 37 + .../systems/si/codata/alpha_constants.hpp | 65 + .../si/codata/atomic-nuclear_constants.hpp | 56 + .../systems/si/codata/deuteron_constants.hpp | 81 + .../si/codata/electromagnetic_constants.hpp | 74 + .../systems/si/codata/electron_constants.hpp | 105 + .../systems/si/codata/helion_constants.hpp | 77 + .../systems/si/codata/muon_constants.hpp | 83 + .../systems/si/codata/neutron_constants.hpp | 83 + .../si/codata/physico-chemical_constants.hpp | 78 + .../systems/si/codata/proton_constants.hpp | 97 + .../units/systems/si/codata/tau_constants.hpp | 71 + .../systems/si/codata/triton_constants.hpp | 79 + .../units/systems/si/codata/typedefs.hpp | 79 + .../systems/si/codata/universal_constants.hpp | 80 + .../units/systems/si/codata_constants.hpp | 19 + .../boost/units/systems/si/conductance.hpp | 36 + .../boost/units/systems/si/conductivity.hpp | 31 + .../boost/units/systems/si/current.hpp | 33 + .../boost/units/systems/si/dimensionless.hpp | 30 + .../units/systems/si/dose_equivalent.hpp | 34 + .../units/systems/si/dynamic_viscosity.hpp | 31 + .../units/systems/si/electric_charge.hpp | 34 + .../units/systems/si/electric_potential.hpp | 34 + .../include/boost/units/systems/si/energy.hpp | 34 + .../include/boost/units/systems/si/force.hpp | 34 + .../boost/units/systems/si/frequency.hpp | 33 + .../boost/units/systems/si/illuminance.hpp | 33 + .../boost/units/systems/si/impedance.hpp | 31 + .../boost/units/systems/si/inductance.hpp | 34 + .../include/boost/units/systems/si/io.hpp | 88 + .../units/systems/si/kinematic_viscosity.hpp | 31 + .../include/boost/units/systems/si/length.hpp | 35 + .../boost/units/systems/si/luminous_flux.hpp | 34 + .../units/systems/si/luminous_intensity.hpp | 33 + .../systems/si/magnetic_field_intensity.hpp | 31 + .../boost/units/systems/si/magnetic_flux.hpp | 34 + .../systems/si/magnetic_flux_density.hpp | 34 + .../include/boost/units/systems/si/mass.hpp | 35 + .../boost/units/systems/si/mass_density.hpp | 36 + .../units/systems/si/moment_of_inertia.hpp | 31 + .../boost/units/systems/si/momentum.hpp | 31 + .../boost/units/systems/si/permeability.hpp | 31 + .../boost/units/systems/si/permittivity.hpp | 31 + .../boost/units/systems/si/plane_angle.hpp | 33 + .../include/boost/units/systems/si/power.hpp | 34 + .../boost/units/systems/si/prefixes.hpp | 77 + .../boost/units/systems/si/pressure.hpp | 49 + .../boost/units/systems/si/reluctance.hpp | 31 + .../boost/units/systems/si/resistance.hpp | 34 + .../boost/units/systems/si/resistivity.hpp | 31 + .../boost/units/systems/si/solid_angle.hpp | 33 + .../units/systems/si/surface_density.hpp | 36 + .../units/systems/si/surface_tension.hpp | 34 + .../boost/units/systems/si/temperature.hpp | 33 + .../include/boost/units/systems/si/time.hpp | 33 + .../include/boost/units/systems/si/torque.hpp | 34 + .../boost/units/systems/si/velocity.hpp | 36 + .../include/boost/units/systems/si/volume.hpp | 36 + .../boost/units/systems/si/wavenumber.hpp | 36 + .../units/systems/temperature/celsius.hpp | 40 + .../units/systems/temperature/fahrenheit.hpp | 41 + .../boost-1.45.0/include/boost/units/unit.hpp | 440 + .../include/boost/units/units_fwd.hpp | 73 + .../unordered/detail/allocator_helpers.hpp | 111 + .../boost/unordered/detail/buckets.hpp | 183 + .../boost/unordered/detail/equivalent.hpp | 304 + .../boost/unordered/detail/extract_key.hpp | 148 + .../include/boost/unordered/detail/fwd.hpp | 856 + .../include/boost/unordered/detail/move.hpp | 243 + .../include/boost/unordered/detail/node.hpp | 226 + .../include/boost/unordered/detail/table.hpp | 778 + .../include/boost/unordered/detail/unique.hpp | 513 + .../include/boost/unordered/detail/util.hpp | 331 + .../include/boost/unordered/unordered_map.hpp | 1118 + .../boost/unordered/unordered_map_fwd.hpp | 53 + .../include/boost/unordered/unordered_set.hpp | 1037 + .../boost/unordered/unordered_set_fwd.hpp | 51 + .../include/boost/unordered_map.hpp | 18 + .../include/boost/unordered_set.hpp | 18 + .../boost-1.45.0/include/boost/utility.hpp | 20 + .../include/boost/utility/addressof.hpp | 102 + .../boost/utility/base_from_member.hpp | 87 + .../include/boost/utility/binary.hpp | 708 + .../boost/utility/compare_pointees.hpp | 68 + .../include/boost/utility/declval.hpp | 44 + .../detail/in_place_factory_prefix.hpp | 36 + .../detail/in_place_factory_suffix.hpp | 23 + .../utility/detail/result_of_iterate.hpp | 148 + .../include/boost/utility/enable_if.hpp | 119 + .../boost/utility/in_place_factory.hpp | 88 + .../include/boost/utility/result_of.hpp | 100 + .../include/boost/utility/swap.hpp | 55 + .../boost/utility/typed_in_place_factory.hpp | 77 + .../include/boost/utility/value_init.hpp | 258 + .../boost-1.45.0/include/boost/variant.hpp | 27 + .../boost-1.45.0/include/boost/version.hpp | 35 + .../boost-1.45.0/include/boost/visit_each.hpp | 29 + .../boost-1.45.0/include/boost/wave.hpp | 23 + .../boost-1.45.0/include/boost/weak_ptr.hpp | 18 + .../libs/serialization/build/Jamfile.v2 | 115 + .../serialization/doc/acknowledgments.html | 92 + .../serialization/doc/archive_reference.html | 419 + .../libs/serialization/doc/archives.html | 432 + .../libs/serialization/doc/bibliography.html | 74 + .../libs/serialization/doc/class_diagram.html | 170 + .../libs/serialization/doc/codecvt.html | 171 + .../libs/serialization/doc/configuration.html | 17 + .../libs/serialization/doc/contents.html | 354 + .../libs/serialization/doc/dataflow.html | 212 + .../libs/serialization/doc/definitions.html | 17 + .../libs/serialization/doc/derivation.html | 158 + .../libs/serialization/doc/dot.gif | Bin 0 -> 838 bytes .../serialization/doc/exception_safety.html | 115 + .../libs/serialization/doc/exceptions.html | 276 + .../serialization/doc/extended_type_info.html | 418 + .../libs/serialization/doc/faq.html | 51 + .../libs/serialization/doc/headers.html | 447 + .../libs/serialization/doc/history.html | 141 + .../serialization/doc/implementation.html | 443 + .../libs/serialization/doc/index.html | 19 + .../libs/serialization/doc/minus.gif | Bin 0 -> 839 bytes .../serialization/doc/new_case_studies.html | 91 + .../libs/serialization/doc/overview.html | 146 + .../serialization/doc/performance_status.html | 30 + .../libs/serialization/doc/pimpl.html | 124 + .../libs/serialization/doc/plus.gif | Bin 0 -> 844 bytes .../libs/serialization/doc/profile1.txt | 149 + .../libs/serialization/doc/profile2.txt | 203 + .../libs/serialization/doc/profile3.txt | 153 + .../libs/serialization/doc/rationale.html | 125 + .../libs/serialization/doc/reference.html | 42 + .../libs/serialization/doc/release.html | 269 + .../libs/serialization/doc/serialization.html | 930 + .../libs/serialization/doc/shared_ptr.html | 233 + .../libs/serialization/doc/shared_ptr2.html | 103 + .../libs/serialization/doc/simple_log.html | 95 + .../libs/serialization/doc/singleton.html | 256 + .../libs/serialization/doc/smart_cast.html | 155 + .../libs/serialization/doc/special.html | 591 + .../libs/serialization/doc/state_saver.html | 82 + .../serialization/doc/static_warning.html | 53 + .../serialization/doc/strong_typedef.html | 91 + .../libs/serialization/doc/style.css | 15 + .../libs/serialization/doc/todo.html | 113 + .../libs/serialization/doc/traits.html | 807 + .../libs/serialization/doc/tutorial.html | 584 + .../libs/serialization/doc/void_cast.html | 104 + .../libs/serialization/doc/wrappers.html | 213 + .../libs/serialization/example/Jamfile.v2 | 57 + .../libs/serialization/example/demo.cpp | 377 + .../serialization/example/demo_auto_ptr.cpp | 135 + .../libs/serialization/example/demo_dll.cpp | 50 + .../libs/serialization/example/demo_dll_a.hpp | 321 + .../libs/serialization/example/demo_dll_a.ipp | 321 + .../libs/serialization/example/demo_dll_b.hpp | 112 + .../libs/serialization/example/demo_dll_b.ipp | 112 + .../serialization/example/demo_exception.cpp | 258 + .../example/demo_fast_archive.cpp | 181 + .../libs/serialization/example/demo_gps.hpp | 284 + .../libs/serialization/example/demo_log.cpp | 76 + .../serialization/example/demo_output.txt | 51 + .../libs/serialization/example/demo_pimpl.cpp | 34 + .../serialization/example/demo_pimpl_A.cpp | 45 + .../serialization/example/demo_pimpl_A.hpp | 24 + .../example/demo_polymorphic.cpp | 65 + .../example/demo_polymorphic_A.cpp | 26 + .../example/demo_polymorphic_A.hpp | 39 + .../example/demo_portable_archive.cpp | 104 + .../libs/serialization/example/demo_save.xml | 129 + .../serialization/example/demo_shared_ptr.cpp | 164 + .../serialization/example/demo_simple_log.cpp | 75 + .../example/demo_trivial_archive.cpp | 94 + .../libs/serialization/example/demo_xml.cpp | 127 + .../libs/serialization/example/demo_xml.hpp | 284 + .../serialization/example/demo_xml_load.cpp | 45 + .../serialization/example/demo_xml_save.cpp | 91 + .../libs/serialization/example/demofile.txt | 13 + .../libs/serialization/example/fix_six.cpp | 37 + .../serialization/example/log_archive.cpp | 32 + .../serialization/example/log_archive.hpp | 76 + .../polymorphic_portable_binary_iarchive.cpp | 34 + .../polymorphic_portable_binary_iarchive.hpp | 35 + .../polymorphic_portable_binary_oarchive.cpp | 35 + .../polymorphic_portable_binary_oarchive.hpp | 34 + .../example/portable_binary_archive.hpp | 47 + .../example/portable_binary_iarchive.cpp | 131 + .../example/portable_binary_iarchive.hpp | 212 + .../example/portable_binary_oarchive.cpp | 98 + .../example/portable_binary_oarchive.hpp | 192 + .../example/simple_log_archive.hpp | 167 + .../libs/serialization/index.html | 15 + .../libs/serialization/performance/Jamfile.v2 | 48 + .../performance/binary_archive.hpp | 22 + .../performance/binary_warchive.hpp | 14 + .../performance/peformance_array.cpp | 118 + .../performance/performance_binary.cpp | 96 + .../performance/performance_codecvt_null.cpp | 136 + .../performance/performance_iterators.cpp | 213 + .../performance_iterators_base64.cpp | 100 + .../performance/performance_no_rtti.cpp | 222 + .../performance/performance_polymorphic.cpp | 104 + .../performance/performance_simple_class.cpp | 55 + .../performance/performance_utf8_codecvt.cpp | 248 + .../performance/performance_vector.cpp | 70 + .../polymorphic_array_binary_archive.hpp | 13 + .../polymorphic_binary_archive.hpp | 13 + .../performance/polymorphic_text_archive.hpp | 13 + .../performance/polymorphic_text_warchive.hpp | 18 + .../performance/polymorphic_xml_archive.hpp | 13 + .../performance/polymorphic_xml_warchive.hpp | 13 + .../performance/portable_binary_archive.hpp | 22 + .../libs/serialization/performance/profile.sh | 39 + .../performance/text_archive.hpp | 14 + .../performance/text_warchive.hpp | 19 + .../serialization/performance/xml/Jamfile.v2 | 35 + .../serialization/performance/xml/harness.hpp | 188 + .../performance/xml/high_resolution_timer.hpp | 489 + .../performance/xml/int16_results.xml | 1291 ++ .../performance/xml/int16_test.cpp | 20 + .../performance/xml/int256_results.xml | 1291 ++ .../performance/xml/int256_test.cpp | 20 + .../performance/xml/int4_results.xml | 1291 ++ .../performance/xml/int4_test.cpp | 20 + .../performance/xml/int64_results.xml | 1291 ++ .../performance/xml/int64_test.cpp | 20 + .../serialization/performance/xml/macro.hpp | 229 + .../serialization/performance/xml/node.hpp | 63 + .../performance/xml/string16_results.xml | 1291 ++ .../performance/xml/string16_test.cpp | 24 + .../performance/xml/string256_results.xml | 1291 ++ .../performance/xml/string256_test.cpp | 24 + .../performance/xml/string4_results.xml | 1291 ++ .../performance/xml/string4_test.cpp | 24 + .../performance/xml/string64_results.xml | 1291 ++ .../performance/xml/string64_test.cpp | 24 + .../serialization/performance/xml_archive.hpp | 16 + .../performance/xml_warchive.hpp | 16 + .../serialization/src/archive_exception.cpp | 114 + .../libs/serialization/src/basic_archive.cpp | 80 + .../libs/serialization/src/basic_iarchive.cpp | 576 + .../serialization/src/basic_iserializer.cpp | 33 + .../libs/serialization/src/basic_oarchive.cpp | 459 + .../serialization/src/basic_oserializer.cpp | 33 + .../src/basic_pointer_iserializer.cpp | 30 + .../src/basic_pointer_oserializer.cpp | 30 + .../src/basic_serializer_map.cpp | 111 + .../src/basic_text_iprimitive.cpp | 28 + .../src/basic_text_oprimitive.cpp | 28 + .../src/basic_text_wiprimitive.cpp | 35 + .../src/basic_text_woprimitive.cpp | 35 + .../serialization/src/basic_xml_archive.cpp | 51 + .../serialization/src/basic_xml_grammar.ipp | 468 + .../serialization/src/binary_iarchive.cpp | 53 + .../serialization/src/binary_oarchive.cpp | 39 + .../serialization/src/binary_wiarchive.cpp | 60 + .../serialization/src/binary_woarchive.cpp | 44 + .../libs/serialization/src/codecvt_null.cpp | 83 + .../serialization/src/extended_type_info.cpp | 188 + .../src/extended_type_info_no_rtti.cpp | 85 + .../src/extended_type_info_typeid.cpp | 161 + .../src/polymorphic_iarchive.cpp | 29 + .../src/polymorphic_oarchive.cpp | 29 + .../serialization/src/shared_ptr_helper.cpp | 138 + .../libs/serialization/src/stl_port.cpp | 43 + .../libs/serialization/src/text_iarchive.cpp | 36 + .../libs/serialization/src/text_oarchive.cpp | 33 + .../libs/serialization/src/text_wiarchive.cpp | 41 + .../libs/serialization/src/text_woarchive.cpp | 35 + .../serialization/src/utf8_codecvt_facet.cpp | 21 + .../libs/serialization/src/void_cast.cpp | 361 + .../src/xml_archive_exception.cpp | 56 + .../libs/serialization/src/xml_grammar.cpp | 73 + .../libs/serialization/src/xml_iarchive.cpp | 46 + .../libs/serialization/src/xml_oarchive.cpp | 32 + .../libs/serialization/src/xml_wgrammar.cpp | 157 + .../libs/serialization/src/xml_wiarchive.cpp | 53 + .../libs/serialization/src/xml_woarchive.cpp | 35 + .../libs/serialization/test/A.cpp | 222 + .../libs/serialization/test/A.hpp | 159 + .../libs/serialization/test/A.ipp | 64 + .../libs/serialization/test/B.hpp | 113 + .../libs/serialization/test/C.hpp | 68 + .../libs/serialization/test/D.hpp | 88 + .../libs/serialization/test/J.hpp | 51 + .../libs/serialization/test/Jamfile.v2 | 161 + .../libs/serialization/test/base.hpp | 46 + .../serialization/test/binary_archive.hpp | 24 + .../serialization/test/binary_warchive.hpp | 14 + .../libs/serialization/test/derived2.hpp | 50 + .../libs/serialization/test/dll_a.cpp | 48 + .../libs/serialization/test/dll_base.cpp | 55 + .../libs/serialization/test/dll_derived2.cpp | 54 + .../test/polymorphic_array_binary_archive.hpp | 13 + .../serialization/test/polymorphic_base.cpp | 21 + .../serialization/test/polymorphic_base.hpp | 51 + .../test/polymorphic_binary_archive.hpp | 13 + .../test/polymorphic_derived1.cpp | 23 + .../test/polymorphic_derived1.hpp | 45 + .../test/polymorphic_derived2.cpp | 65 + .../test/polymorphic_derived2.hpp | 69 + .../test/polymorphic_text_archive.hpp | 12 + .../test/polymorphic_text_warchive.hpp | 17 + .../test/polymorphic_xml_archive.hpp | 12 + .../test/polymorphic_xml_warchive.hpp | 12 + .../test/portable_binary_archive.hpp | 31 + .../libs/serialization/test/test_array.cpp | 124 + .../libs/serialization/test/test_binary.cpp | 157 + .../libs/serialization/test/test_bitset.cpp | 64 + .../libs/serialization/test/test_check.cpp | 142 + .../test/test_class_info_load.cpp | 92 + .../test/test_class_info_save.cpp | 100 + .../serialization/test/test_codecvt_null.cpp | 136 + .../libs/serialization/test/test_complex.cpp | 70 + .../test/test_const_load_fail1.cpp | 23 + .../test/test_const_load_fail1_nvp.cpp | 24 + .../test/test_const_load_fail2.cpp | 23 + .../test/test_const_load_fail2_nvp.cpp | 25 + .../test/test_const_load_fail3.cpp | 22 + .../test/test_const_load_fail3_nvp.cpp | 24 + .../serialization/test/test_const_pass.cpp | 54 + .../test/test_const_save_warn1.cpp | 25 + .../test/test_const_save_warn1_nvp.cpp | 26 + .../test/test_const_save_warn2.cpp | 24 + .../test/test_const_save_warn2_nvp.cpp | 25 + .../test/test_const_save_warn3.cpp | 24 + .../test/test_const_save_warn3_nvp.cpp | 25 + .../test/test_const_save_warn4.cpp | 37 + .../test/test_const_save_warn4_nvp.cpp | 39 + .../test/test_contained_class.cpp | 69 + .../serialization/test/test_cyclic_ptrs.cpp | 153 + .../libs/serialization/test/test_decl.hpp | 74 + .../test/test_delete_pointer.cpp | 129 + .../libs/serialization/test/test_deque.cpp | 53 + .../libs/serialization/test/test_derived.cpp | 148 + .../serialization/test/test_derived_class.cpp | 49 + .../test/test_derived_class_ptr.cpp | 51 + .../libs/serialization/test/test_diamond.cpp | 204 + .../test/test_diamond_complex.cpp | 480 + .../serialization/test/test_dll_exported.cpp | 148 + .../serialization/test/test_dll_plugin.cpp | 210 + .../serialization/test/test_dll_simple.cpp | 247 + .../libs/serialization/test/test_exported.cpp | 143 + .../serialization/test/test_inclusion.cpp | 42 + .../serialization/test/test_iterators.cpp | 213 + .../test/test_iterators_base64.cpp | 100 + .../libs/serialization/test/test_list.cpp | 77 + .../serialization/test/test_list_ptrs.cpp | 130 + .../libs/serialization/test/test_map.cpp | 229 + .../libs/serialization/test/test_mi.cpp | 135 + .../test/test_mult_archive_types.cpp | 122 + .../test/test_multiple_inheritance.cpp | 125 + .../serialization/test/test_multiple_ptrs.cpp | 50 + .../serialization/test/test_new_operator.cpp | 95 + .../libs/serialization/test/test_no_rtti.cpp | 183 + .../test/test_non_default_ctor.cpp | 198 + .../test/test_non_default_ctor2.cpp | 144 + .../serialization/test/test_non_intrusive.cpp | 174 + .../test/test_not_serializable.cpp | 47 + .../libs/serialization/test/test_null_ptr.cpp | 89 + .../libs/serialization/test/test_nvp.cpp | 68 + .../libs/serialization/test/test_object.cpp | 70 + .../libs/serialization/test/test_optional.cpp | 62 + .../libs/serialization/test/test_pimpl.cpp | 48 + .../serialization/test/test_polymorphic.cpp | 94 + .../serialization/test/test_polymorphic2.cpp | 40 + .../serialization/test/test_polymorphic2.hpp | 43 + .../test/test_polymorphic2imp.cpp | 44 + .../serialization/test/test_polymorphic_A.cpp | 58 + .../serialization/test/test_polymorphic_A.hpp | 30 + .../serialization/test/test_primitive.cpp | 64 + .../serialization/test/test_private_base.cpp | 99 + .../serialization/test/test_private_ctor.cpp | 51 + .../serialization/test/test_recursion.cpp | 51 + .../serialization/test/test_registered.cpp | 239 + .../test/test_reset_object_address.cpp | 412 + .../libs/serialization/test/test_set.cpp | 176 + .../serialization/test/test_shared_ptr.cpp | 301 + .../test/test_shared_ptr_132.cpp | 234 + .../test/test_shared_ptr_multi_base.cpp | 271 + .../serialization/test/test_simple_class.cpp | 93 + .../test/test_simple_class_ptr.cpp | 52 + .../serialization/test/test_singleton.cpp | 35 + .../serialization/test/test_smart_cast.cpp | 244 + .../libs/serialization/test/test_split.cpp | 165 + .../test/test_static_warning.cpp | 63 + .../libs/serialization/test/test_tools.hpp | 235 + .../libs/serialization/test/test_tracking.cpp | 130 + .../serialization/test/test_traits_fail.cpp | 40 + .../serialization/test/test_traits_pass.cpp | 30 + .../serialization/test/test_unregistered.cpp | 245 + .../serialization/test/test_utf8_codecvt.cpp | 260 + .../libs/serialization/test/test_valarray.cpp | 56 + .../libs/serialization/test/test_variant.cpp | 169 + .../libs/serialization/test/test_vector.cpp | 67 + .../serialization/test/test_void_cast.cpp | 165 + .../libs/serialization/test/text_archive.hpp | 13 + .../libs/serialization/test/text_warchive.hpp | 13 + .../libs/serialization/test/xml_archive.hpp | 13 + .../libs/serialization/test/xml_warchive.hpp | 13 + .../libs/serialization/util/test.jam | 188 + .../vc7ide/BoostSerializationLibrary.sln | 1696 ++ .../libs/serialization/vc7ide/Library.vcproj | 839 + .../libs/serialization/vc7ide/LibraryW.vcproj | 574 + .../libs/serialization/vc7ide/Manual.vcproj | 260 + .../libs/serialization/vc7ide/demo.vcproj | 193 + .../serialization/vc7ide/demo_auto_ptr.vcproj | 193 + .../libs/serialization/vc7ide/demo_dll.vcproj | 213 + .../vc7ide/demo_exception.vcproj | 193 + .../vc7ide/demo_fast_archive.vcproj | 193 + .../libs/serialization/vc7ide/demo_log.vcproj | 201 + .../serialization/vc7ide/demo_pimpl.vcproj | 199 + .../vc7ide/demo_polymorphic.vcproj | 199 + .../vc7ide/demo_portable_archive.vcproj | 215 + .../vc7ide/demo_shared_ptr.vcproj | 193 + .../vc7ide/demo_simple_log.vcproj | 199 + .../vc7ide/demo_trivial_archive.vcproj | 196 + .../libs/serialization/vc7ide/demo_xml.vcproj | 197 + .../serialization/vc7ide/demo_xml_load.vcproj | 196 + .../serialization/vc7ide/demo_xml_save.vcproj | 196 + .../libs/serialization/vc7ide/dll_a.vcproj | 215 + .../libs/serialization/vc7ide/dll_base.vcproj | 306 + .../serialization/vc7ide/dll_derived2.vcproj | 266 + .../libs/serialization/vc7ide/fix_six.vcproj | 194 + .../vc7ide/polymorphic_derived2.vcproj | 267 + .../libs/serialization/vc7ide/readme.txt | 29 + .../serialization/vc7ide/test_array.vcproj | 1829 ++ .../serialization/vc7ide/test_binary.vcproj | 193 + .../serialization/vc7ide/test_bitset.vcproj | 193 + .../serialization/vc7ide/test_check.vcproj | 192 + .../vc7ide/test_class_info_load.vcproj | 193 + .../vc7ide/test_class_info_save.vcproj | 193 + .../vc7ide/test_codecvt_null.vcproj | 196 + .../serialization/vc7ide/test_complex.vcproj | 196 + .../serialization/vc7ide/test_const.vcproj | 192 + .../vc7ide/test_const_fail.vcproj | 225 + .../vc7ide/test_const_pass.vcproj | 192 + .../vc7ide/test_contained_class.vcproj | 201 + .../vc7ide/test_cyclic_ptrs.vcproj | 202 + .../vc7ide/test_delete_pointer.vcproj | 193 + .../serialization/vc7ide/test_deque.vcproj | 202 + .../serialization/vc7ide/test_derived.vcproj | 193 + .../vc7ide/test_derived_class.vcproj | 199 + .../vc7ide/test_derived_class_ptr.vcproj | 199 + .../serialization/vc7ide/test_diamond.vcproj | 193 + .../vc7ide/test_diamond_complex.vcproj | 193 + .../vc7ide/test_dll_exported.vcproj | 203 + .../vc7ide/test_dll_plugin.vcproj | 199 + .../vc7ide/test_dll_simple.vcproj | 202 + .../serialization/vc7ide/test_exported.vcproj | 202 + .../vc7ide/test_inclusion.vcproj | 192 + .../vc7ide/test_iterators.vcproj | 193 + .../vc7ide/test_iterators_base64.vcproj | 193 + .../serialization/vc7ide/test_list.vcproj | 202 + .../vc7ide/test_list_ptrs.vcproj | 202 + .../libs/serialization/vc7ide/test_map.vcproj | 202 + .../libs/serialization/vc7ide/test_mi.vcproj | 193 + .../vc7ide/test_mult_archive_types.vcproj | 193 + .../vc7ide/test_multiple_inheritance.vcproj | 192 + .../vc7ide/test_multiple_ptrs.vcproj | 204 + .../vc7ide/test_new_operator.vcproj | 202 + .../serialization/vc7ide/test_no_rtti.vcproj | 205 + .../vc7ide/test_non_default_ctor.vcproj | 193 + .../vc7ide/test_non_default_ctor2.vcproj | 193 + .../vc7ide/test_non_intrusive.vcproj | 193 + .../vc7ide/test_not_serializable.vcproj | 192 + .../serialization/vc7ide/test_null_ptr.vcproj | 193 + .../libs/serialization/vc7ide/test_nvp.vcproj | 196 + .../serialization/vc7ide/test_object.vcproj | 193 + .../serialization/vc7ide/test_optional.vcproj | 199 + .../vc7ide/test_polymorphic.vcproj | 208 + .../vc7ide/test_polymorphic2.vcproj | 202 + .../vc7ide/test_primitive.vcproj | 193 + .../vc7ide/test_private_base.vcproj | 199 + .../vc7ide/test_private_ctor.vcproj | 193 + .../vc7ide/test_recursion.vcproj | 193 + .../serialization/vc7ide/test_recusion.vcproj | 193 + .../vc7ide/test_registered.vcproj | 193 + .../vc7ide/test_reset_object_addr.vcproj | 199 + .../libs/serialization/vc7ide/test_set.vcproj | 199 + .../vc7ide/test_shared_ptr.vcproj | 200 + .../vc7ide/test_shared_ptr_132.vcproj | 212 + .../vc7ide/test_shared_ptr_multi_base.vcproj | 196 + .../vc7ide/test_simple_class.vcproj | 202 + .../vc7ide/test_simple_class_ptr.vcproj | 208 + .../vc7ide/test_singleton.vcproj | 196 + .../vc7ide/test_smart_cast.vcproj | 196 + .../serialization/vc7ide/test_split.vcproj | 193 + .../vc7ide/test_static_warning.vcproj | 193 + .../vc7ide/test_strong_typedef.vcproj | 196 + .../serialization/vc7ide/test_tracking.vcproj | 193 + .../vc7ide/test_traits_fail.vcproj | 192 + .../vc7ide/test_traits_pass.vcproj | 138 + .../vc7ide/test_unregistered.vcproj | 193 + .../vc7ide/test_utf8_codecvt.vcproj | 202 + .../serialization/vc7ide/test_valarray.vcproj | 196 + .../serialization/vc7ide/test_variant.vcproj | 196 + .../serialization/vc7ide/test_vector.vcproj | 202 + .../vc7ide/test_void_cast.vcproj | 196 + .../boost-1.45.0/libs/thread/build/Jamfile.v2 | 207 + .../boost-1.45.0/libs/thread/doc/Jamfile.v2 | 31 + .../libs/thread/doc/acknowledgements.qbk | 23 + .../boost-1.45.0/libs/thread/doc/barrier.qbk | 72 + .../boost-1.45.0/libs/thread/doc/changes.qbk | 87 + .../libs/thread/doc/condition_variables.qbk | 513 + .../libs/thread/doc/future_ref.qbk | 968 + .../boost-1.45.0/libs/thread/doc/futures.qbk | 187 + .../boost-1.45.0/libs/thread/doc/index.html | 12 + .../libs/thread/doc/mutex_concepts.qbk | 1119 + .../boost-1.45.0/libs/thread/doc/mutexes.qbk | 224 + .../boost-1.45.0/libs/thread/doc/once.qbk | 65 + .../boost-1.45.0/libs/thread/doc/overview.qbk | 30 + .../libs/thread/doc/shared_mutex_ref.qbk | 44 + .../boost-1.45.0/libs/thread/doc/thread.qbk | 168 + .../libs/thread/doc/thread_ref.qbk | 1129 + .../boost-1.45.0/libs/thread/doc/time.qbk | 75 + .../boost-1.45.0/libs/thread/doc/tss.qbk | 184 + .../libs/thread/example/Jamfile.v2 | 23 + .../libs/thread/example/condition.cpp | 89 + .../libs/thread/example/monitor.cpp | 112 + .../libs/thread/example/mutex.cpp | 47 + .../boost-1.45.0/libs/thread/example/once.cpp | 31 + .../libs/thread/example/recursive_mutex.cpp | 49 + .../libs/thread/example/starvephil.cpp | 185 + .../libs/thread/example/tennis.cpp | 135 + .../libs/thread/example/thread.cpp | 35 + .../libs/thread/example/thread_group.cpp | 25 + .../boost-1.45.0/libs/thread/example/tss.cpp | 36 + .../libs/thread/example/xtime.cpp | 16 + .../boost-1.45.0/libs/thread/index.html | 13 + .../libs/thread/src/pthread/once.cpp | 51 + .../libs/thread/src/pthread/thread.cpp | 602 + .../libs/thread/src/pthread/timeconv.inl | 133 + .../boost-1.45.0/libs/thread/src/tss_null.cpp | 38 + .../libs/thread/src/win32/thread.cpp | 624 + .../libs/thread/src/win32/timeconv.inl | 130 + .../libs/thread/src/win32/tss_dll.cpp | 76 + .../libs/thread/src/win32/tss_pe.cpp | 283 + .../boost-1.45.0/libs/thread/test/Carbon.r | 18 + .../boost-1.45.0/libs/thread/test/Jamfile.v2 | 65 + .../thread/test/condition_test_common.hpp | 97 + .../no_implicit_assign_from_lvalue_thread.cpp | 15 + .../no_implicit_move_from_lvalue_thread.cpp | 14 + .../test/shared_mutex_locking_thread.hpp | 132 + .../boost-1.45.0/libs/thread/test/test.mcp | Bin 0 -> 3675 bytes .../libs/thread/test/test_barrier.cpp | 66 + .../libs/thread/test/test_condition.cpp | 190 + .../thread/test/test_condition_notify_all.cpp | 222 + .../thread/test/test_condition_notify_one.cpp | 155 + .../test_condition_timed_wait_times_out.cpp | 173 + .../libs/thread/test/test_futures.cpp | 1220 + .../libs/thread/test/test_generic_locks.cpp | 594 + .../thread/test/test_hardware_concurrency.cpp | 21 + .../libs/thread/test/test_lock_concept.cpp | 571 + .../libs/thread/test/test_move_function.cpp | 124 + .../libs/thread/test/test_mutex.cpp | 347 + .../libs/thread/test/test_once.cpp | 191 + .../libs/thread/test/test_shared_mutex.cpp | 285 + .../thread/test/test_shared_mutex_part_2.cpp | 299 + .../test/test_shared_mutex_timed_locks.cpp | 268 + .../libs/thread/test/test_thread.cpp | 234 + .../libs/thread/test/test_thread_exit.cpp | 73 + .../libs/thread/test/test_thread_id.cpp | 149 + .../thread/test/test_thread_launching.cpp | 226 + .../libs/thread/test/test_thread_mf.cpp | 134 + .../libs/thread/test/test_thread_move.cpp | 56 + .../thread/test/test_thread_move_return.cpp | 35 + .../thread/test/test_thread_return_local.cpp | 35 + .../libs/thread/test/test_tss.cpp | 359 + .../libs/thread/test/test_xtime.cpp | 109 + .../boost-1.45.0/libs/thread/test/util.inl | 183 + .../libs/thread/tutorial/bounded_buffer.cpp | 69 + .../libs/thread/tutorial/counter.cpp | 28 + .../libs/thread/tutorial/factorial.cpp | 32 + .../libs/thread/tutorial/factorial2.cpp | 32 + .../libs/thread/tutorial/factorial3.cpp | 36 + .../libs/thread/tutorial/helloworld.cpp | 19 + .../libs/thread/tutorial/helloworld2.cpp | 24 + .../libs/thread/tutorial/helloworld3.cpp | 20 + .../libs/thread/tutorial/helloworld4.cpp | 20 + .../libs/thread/tutorial/once.cpp | 31 + .../boost-1.45.0/libs/thread/tutorial/tss.cpp | 36 + 6350 files changed, 987352 insertions(+) create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/minmax.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/minmax_element.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/case_conv.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/classification.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/compare.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/concept.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/case_conv.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/classification.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format_all.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format_store.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/finder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/finder_regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/formatter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/formatter_regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/replace_storage.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/trim.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/util.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/erase.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find_format.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/finder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/formatter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/iter_find.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/join.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/predicate_facade.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/regex_find_format.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/replace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/sequence_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/split.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/list_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/rope_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/slist_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/string_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std_containers_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/trim.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/yes_no_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/algorithm/string_regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/aligned_storage.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/any.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/add_facet.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/archive_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_iprimitive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_oprimitive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_streambuf_locale_saver.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_iprimitive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_oprimitive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/binary_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/binary_iarchive_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/binary_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/binary_oarchive_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/binary_wiarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/binary_woarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/codecvt_null.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/abi_prefix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/abi_suffix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/archive_serializer_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/auto_link_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/auto_link_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_archive_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_iserializer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_oserializer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_pointer_iserializer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_pointer_oserializer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_serializer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_serializer_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/check.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/common_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/common_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/decl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/interface_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/interface_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/iserializer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/oserializer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/polymorphic_iarchive_route.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/polymorphic_oarchive_route.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/register_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/detail/utf8_codecvt_facet.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/dinkumware.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/archive_serializer_map.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_iarchive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_iprimitive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_oarchive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_oprimitive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_iarchive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_iprimitive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_oarchive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_oprimitive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_grammar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_iarchive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_oarchive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_iarchive_impl.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_oarchive_impl.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_wiarchive_impl.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_woarchive_impl.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_iarchive_impl.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_oarchive_impl.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_wiarchive_impl.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_woarchive_impl.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/base64_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/base64_from_binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/binary_from_base64.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/dataflow.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/dataflow_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/escape.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/head_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/insert_linebreaks.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/istream_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/mb_from_wchar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/ostream_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/remove_whitespace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/transform_width.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/unescape.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/wchar_from_mb.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_escape.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_unescape.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_unescape_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_binary_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_binary_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_wiarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_woarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_wiarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_woarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/shared_ptr_helper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/text_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/text_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/text_wiarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/text_woarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/tmpdir.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/wcslen.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/xml_archive_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/xml_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/xml_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/xml_wiarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/archive/xml_woarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/asio.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/assign.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bimap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/bind_cc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/bind_mf2_cc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/bind_mf_cc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/bind_template.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/make_adaptable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_cc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_template.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_vw.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/protect.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/bind/storage.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/blank.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/blank_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/call_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/cerrno.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/checked_delete.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/circular_buffer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/circular_buffer_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cassert create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cctype create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cerrno create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cfloat create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/climits create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/clocale create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cmath create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/csetjmp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/csignal create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdarg create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstddef create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdio create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdlib create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstring create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/ctime create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cwchar create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cwctype create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/compressed_pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/detail/backward_compatibility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/detail/borland.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/detail/concept_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/detail/concept_undef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/detail/general.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/detail/has_constraints.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/detail/msvc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/requires.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept/usage.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept_archetype.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept_check.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept_check/borland.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept_check/general.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept_check/has_constraints.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/concept_check/msvc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/abi/borland_prefix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/abi/borland_suffix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/abi/msvc_prefix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/abi/msvc_suffix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/abi_prefix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/abi_suffix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/auto_link.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/borland.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/clang.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/codegear.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/comeau.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/common_edg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/compaq_cxx.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/digitalmars.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/gcc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/gcc_xml.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/greenhills.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/hp_acc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/intel.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/kai.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/metrowerks.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/mpw.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/nvcc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/pgi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/sgi_mipspro.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/sunpro_cc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/vacpp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/compiler/visualc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/cmath.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/complex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/functional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/memory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/aix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/amigaos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/beos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/bsd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/cygwin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/hpux.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/irix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/linux.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/macos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/qnxnto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/solaris.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/symbian.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/vms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/vxworks.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/platform/win32.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/posix_features.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/requires_threads.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/select_compiler_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/select_platform_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/select_stdlib_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/dinkumware.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/libcomo.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/libstdcpp3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/modena.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/msl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/roguewave.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/sgi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/stlport.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/vacpp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/suffix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/user.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/config/warning_disable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/crc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/cregex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/cstdint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/cstdlib.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/current_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/adjust_functors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/c_local_time_adjustor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/c_time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/compiler_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/constrained_value.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_clock_device.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_defs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_duration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_duration_types.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_facet.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_format_simple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting_limited.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting_locales.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generator_formatter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generator_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_names_put.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/date_parsing.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/dst_rules.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/dst_transition_generators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/filetime_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/format_date_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/conversion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/formatters.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/formatters_limited.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_calendar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_date.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_day.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_day_of_year.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_duration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_duration_types.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_facet.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_month.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_serialize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_weekday.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_year.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_ymd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian_io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian_types.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/parsers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian_calendar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian_calendar.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/int_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/iso_format.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/conversion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/custom_time_zone.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/date_duration_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/dst_transition_day_rules.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_date_time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time_io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time_types.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/posix_time_zone.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/tz_database.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time_adjustor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/local_timezone_defs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/locale_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/microsec_time_clock.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/parse_format_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/period.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/period_formatter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/period_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/conversion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/date_duration_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_duration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_legacy_io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_system.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_types.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/ptime.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_formatters.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_formatters_limited.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_parsers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_period.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_serialize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/special_defs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/special_values_formatter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/special_values_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/string_convert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/string_parse_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/strings_from_facet.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_clock.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_defs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_duration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_facet.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_formatting_streams.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_parsing.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_resolution_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_system_counted.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_system_split.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_zone_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/time_zone_names.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/tz_db_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/wrapping_int.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/date_time/year_month_day.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/allocator_utilities.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/atomic_count.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/binary_search.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/call_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/catch_exceptions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/compressed_pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/container_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/dynamic_bitset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/endian.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/has_default_constructor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/identifier.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/indirect_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/interlocked.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/is_function_ref_tester.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/is_incrementable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/is_xxx.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/lcast_precision.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_test.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_thread.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/named_template_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/no_exceptions_support.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/none_t.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/numeric_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/ob_call_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/ob_compressed_pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/quick_allocator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/reference_content.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/scoped_enum_emulation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/select_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/sp_typeinfo.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/templated_streams.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/utf8_codecvt_facet.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/detail/workaround.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/dynamic_bitset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/dynamic_bitset_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/enable_shared_from_this.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/all.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/current_exception_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/detail/attribute_noreturn.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/detail/error_info_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/detail/exception_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/detail/is_output_streamable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/detail/object_hex_dump.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/detail/type_info.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/diagnostic_information.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/enable_current_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/enable_error_info.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_api_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_at_line.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_errno.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_handle.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_name.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_open_mode.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_nested_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_type_info_name.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/error_info.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/get_error_info.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/info.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/info_tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/to_string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception/to_string_stub.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/exception_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/filesystem.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/flyweight.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/foreach.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/alt_sstream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/alt_sstream_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/detail/compat_workarounds.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/detail/config_macros.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/detail/msvc_disambiguater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/detail/unset_macros.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/detail/workarounds_gcc-2_95.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/detail/workarounds_stlport.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/exceptions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/feed_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/format_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/format_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/format_implementation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/free_funcs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/group.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/internals.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/internals_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/format/parsing.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/detail/function_iterate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/detail/gen_maybe_include.pl create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/detail/maybe_include.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/detail/prologue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function6.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function7.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function8.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function9.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function_template.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/function_typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function/gen_function_N.pl create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_output_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/config/cc_names.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/config/compiler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/config/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/class_transform.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity10_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity10_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity20_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity20_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity30_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity30_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity40_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity40_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity50_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity50_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/master.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_as_mpl_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity10_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity10_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity20_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity20_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity30_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity30_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity40_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity40_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity50_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity50_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/master.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/cv_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/aliases_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/aliases_undef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/undef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_arity_loop.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_cc_loop/master.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_loop.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_retag_default_cc/master.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/cc_tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/master.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_variate_loop/master.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/retag_default_cc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity10_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity10_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity20_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity20_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity30_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity30_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity40_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity40_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity50_0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity50_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/master.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/to_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/function_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/function_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/function_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/function_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/is_callable_builtin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_function_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_object_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/is_nonmember_callable_builtin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/member_function_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/member_object_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/parameter_types.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/property_tags.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/function_types/result_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/detail/container_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/factory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/forward_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/float_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float_generic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float_x86.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash/extensions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash/hash.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash/hash_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/hash_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/lightweight_forward_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/functional/value_factory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_adt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_adt_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/detail/adapt_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/detail/extension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/category_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/is_sequence_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/is_view_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/tag_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/array_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/category_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/is_sequence_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/is_view_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/tag_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/category_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/is_sequence_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/is_view_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/tag_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/category_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/empty_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/has_key_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/is_sequence_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/is_view_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/mpl_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/std_pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_struct_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/define_assoc_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/define_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/adapt_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/category_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/define_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/deref_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/extension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/is_view_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/key_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/namespace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/proxy_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/accumulate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/detail/fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/detail/for_each.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/ext_/for_each_s.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/for_each.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/iter_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/reverse_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/all.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/any.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/count.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/count_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/all.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/any.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/count.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/count_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/find_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/ext_/find_if_s.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/find.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/find_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/none.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/clear.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/detail/replace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/detail/replace_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/erase.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/erase_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/filter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/filter_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/insert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/insert_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/join.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/pop_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/pop_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/push_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/remove.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/remove_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/replace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/replace_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/reverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/transform.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/zip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/back_extended_deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/convert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/as_deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/convert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_initial_size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/keyed_element.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/front_extended_deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/ext_/tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/cons_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/deque_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/ignore.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/list_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_cons.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/map_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/pair_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/vector_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/cons.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/cons_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/convert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/build_cons.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/convert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/empty_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/equal_to_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_forward_ctor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_to_cons.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_to_cons_call.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/list_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/convert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/as_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/convert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/deref_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/key_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/map_forward_ctor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/value_of_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/map_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/convert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/as_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/convert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/deref_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/key_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/set_forward_ctor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/value_of_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/set_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/convert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/advance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/as_vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/convert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/distance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/equal_to_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/prior_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_n.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_n_chooser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/detail/access.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused_function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused_procedure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/limits.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/unfused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/unfused_typed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/detail/gen_make_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused_function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused_procedure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_unfused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/detail/that_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke_function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke_procedure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/accumulate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt_named.cpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_adt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_adt_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_class_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_struct_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_struct_named.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapted.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/advance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/all.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/any.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/boost_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/boost_tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/category_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/clear.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/comparison.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/cons.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/cons_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/convert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/count.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/count_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deduce.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deduce_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/define_assoc_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/define_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deref.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deref_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/distance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/erase.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/erase_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/find.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/find_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/for_each.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/functional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused_function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused_procedure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/generation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/has_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/ignore.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/in.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/insert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/insert_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/intrinsic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invocation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke_function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke_procedure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iter_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iteration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_facade.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/join.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/joint_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/key_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_cons.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused_function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused_procedure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_generic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_lvalue_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_rvalue_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/mpl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/next.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/none.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/nview.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/out.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pair_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pop_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pop_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/prior.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/proxy_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/push_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/query.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/remove.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/remove_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/repetetive_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/replace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/replace_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_iter_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence_facade.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/set_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/single_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/std_pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/support.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/swap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tag_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tag_of_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transform.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transform_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transformation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_generic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_lvalue_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_rvalue_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_typed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_at_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_of_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/void.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/zip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/include/zip_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/advance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/basic_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/deref.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/deref_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/adapt_deref_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/adapt_value_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/advance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/distance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/distance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/iterator_facade.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/key_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl/convert_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl/fusion_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/next.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/prior.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/value_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/value_of_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/clear.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/detail/clear.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/erase.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/erase_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/has_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/insert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/insert_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/pop_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/pop_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/push_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/enable_comparison.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/convert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/ext_/segments.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/ext_/size_s.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/has_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/swap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/value_at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/value_at_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/in.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/manip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/out.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/in.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/out.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/sequence_facade.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/category_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/deduce.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/deduce_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/access.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/as_fusion_element.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/category_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/is_mpl_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/is_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/mpl_iterator_category.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/unknown_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/ext_/is_segmented.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/iterator_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/sequence_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/tag_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/tag_of_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/unused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/support/void.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/detail/tuple_expand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/make_tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple_tie.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/detail/strictest_traversal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/multiple_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/segmented_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/segmented_iterator_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/equal_to_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/filter_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/filter_view_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/iterator_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/joint_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/joint_view_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/advance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/distance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/equal_to_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/nview_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/prior_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/nview.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/nview_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/reverse_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/single_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/single_view_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/advance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/apply_transform_result.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/distance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/equal_to_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/prior_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/advance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/begin_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/deref_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/distance_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/equal_to_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/next_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/prior_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/generator_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/get_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/accounting.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/adj_list_serialize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_list_io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_matrix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/astar_search.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/bandwidth.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/bc_clustering.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/bellman_ford_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/betweenness_centrality.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/biconnected_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/bipartite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/boyer_myrvold_planar_test.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/boykov_kolmogorov_max_flow.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/breadth_first_search.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/bron_kerbosch_all_cliques.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/buffer_concepts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/chrobak_payne_drawing.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/circle_layout.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/closeness_centrality.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/clustering_coefficient.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/compressed_sparse_row_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/connected_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/copy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/core_numbers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/create_condensation_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/cuthill_mckee_ordering.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/dag_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/degree_centrality.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/depth_first_search.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/adj_list_edge_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/adjacency_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/array_binary_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/compressed_sparse_row_struct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/connected_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/d_ary_heap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/edge.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/geodesic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/histogram_sort.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/incidence_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/incremental_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/index.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/indexed_properties.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/is_same.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/labeled_graph_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/list_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/permutation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/read_graphviz_new.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/read_graphviz_spirit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/self_avoiding_walk.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/set_adaptor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/shadow_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/detail/sparse_ordering.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/dijkstra_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/dijkstra_shortest_paths_no_color_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/dimacs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/directed_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjacency_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/handlers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/initialize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/redistribute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/serialization.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/betweenness_centrality.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/boman_et_al_graph_coloring.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/breadth_first_search.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/compressed_sparse_row_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/concepts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/connected_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/connected_components_parallel_search.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/dehne_gotz_min_spanning_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/delta_stepping_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/depth_first_search.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/dijkstra_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/filtered_queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/mpi_process_group.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/queue.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/remote_update_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/tag_allocator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/dijkstra_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/distributed_graph_utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/filtered_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/fruchterman_reingold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/graphviz.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/hohberg_biconnected_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/local_subgraph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/mpi_process_group.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/named_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/one_bit_color_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/page_rank.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/reverse_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/rmat_graph_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/selector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/shuffled_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/st_connected.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/strong_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/two_bit_color_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/unsafe_serialize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/vertex_list_adaptor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/dll_import_export.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/dominator_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/eccentricity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/edge_connectivity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/edge_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/edmonds_karp_max_flow.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/edmunds_karp_max_flow.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/erdos_renyi_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/exterior_property.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/filtered_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/floyd_warshall_shortest.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/fruchterman_reingold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/geodesic_distance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_archetypes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_as_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_concepts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_mutability_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_selectors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_stats.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_test.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graph_utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graphml.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/graphviz.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/grid_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/gursoy_atun_layout.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/howard_cycle_ratio.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/incremental_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/is_kuratowski_subgraph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/is_straight_line_drawing.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/isomorphism.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/iteration_macros.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/iteration_macros_undef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/johnson_all_pairs_shortest.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/kamada_kawai_spring_layout.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/king_ordering.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/kolmogorov_max_flow.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/kruskal_min_spanning_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/labeled_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/leda_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/lookup_edge.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/loop_erased_random_walk.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/make_biconnected_planar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/make_connected.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/make_maximal_planar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/matrix_as_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/max_cardinality_matching.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/mcgregor_common_subgraphs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/mesh_graph_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/metis.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/metric_tsp_approx.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/minimum_degree_ordering.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/named_function_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/named_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/neighbor_bfs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/numeric_values.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/one_bit_color_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/overloading.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/page_rank.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/basic_reduce.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/container_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/inplace_all_to_all.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/property_holders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/untracked_pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/process_group.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/properties.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/simple_trigger.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/planar_canonical_ordering.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/add_edge_visitors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/boyer_myrvold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/bucket_sort.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/face_handles.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/face_iterators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/planar_face_traversal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/plod_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/point_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/prim_minimum_spanning_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/profile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/properties.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/property_iter_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/constant_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/container_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/matrix_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/null_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/push_relabel_max_flow.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/r_c_shortest_paths.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/random.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/random_layout.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/random_spanning_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/read_dimacs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/relax.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/reverse_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/rmat_graph_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/sequential_vertex_coloring.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/simple_point.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/sloan_ordering.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/small_world_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/smallest_last_ordering.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/ssca_graph_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/st_connected.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/stanford_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/stoer_wagner_min_cut.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/strong_components.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/subgraph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/tiernan_all_cycles.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/topological_sort.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/topology.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/transitive_closure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/transitive_reduction.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/transpose_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/tree_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/two_bit_color_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/undirected_dfs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/undirected_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/use_mpi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/vector_as_graph.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/vertex_and_edge_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/visitors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/wavefront.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/graph/write_dimacs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/implicit_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/indirect_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/integer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/integer/integer_mask.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/integer/static_log2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/integer/static_min_max.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/integer_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/integer_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/any_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/avl_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/avl_set_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/avltree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/avltree_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/bs_set_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/circular_list_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/circular_slist_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/derivation_value_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/any_node_and_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/avltree_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/clear_on_destructor_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/common_slist_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/config_begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/config_end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/ebo_functor_holder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/function_detector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/generic_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/hashtable_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/is_stateful_value_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/list_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/mpl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/parent_from_member.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/pointer_to_other.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/rbtree_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/slist_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/transform_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/tree_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/tree_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/utilities.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/workaround.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/hashtable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/intrusive_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/linear_slist_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/link_mode.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/list_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/member_value_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/options.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/parent_from_member.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/pointer_plus_bits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/priority_compare.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/rbtree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/rbtree_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/set_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/sg_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/sgtree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/sgtree_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/slist.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/slist_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/splay_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/splay_set_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/splaytree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/splaytree_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap_algorithms.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/trivial_value_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/unordered_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive/unordered_set_hook.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/intrusive_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/io/detail/quoted_manip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/io/ios_state.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/io_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/categories.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/chain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/char_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/checked_operations.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/close.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/code_converter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/combine.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/compose.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/concepts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/copy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/absolute_path.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/access_control.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/concept_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/device_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/direct_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/filter_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/mode_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/non_blocking_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/output_iterator_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/range_adapter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/add_facet.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/bool_trait_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/buffer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/call_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/char_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/codecvt_helper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/codecvt_holder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/auto_link.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/bzip2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/codecvt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/disable_warnings.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/dyn_link.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/enable_warnings.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/fpos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/gcc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/overload_resolution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/rtl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/unreachable_return.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/wide_streams.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/windows_posix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/zlib.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/counted_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/current_directory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/default_arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/dispatch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/double_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/enable_if_stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/error.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/execute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/file_handle.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/fstream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/functional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/ios.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/iostream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/is_dereferenceable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/is_iterator_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/newline.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/param_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/path.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/push.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/push_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/resolve.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/restrict_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/select.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/select_by_size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/chainbuf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/linked_streambuf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/system_failure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/template_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/translate_int_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/close.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/read.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/write.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/wrap_unwrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/back_inserter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/file.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/file_descriptor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/mapped_file.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/null.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/aggregate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/bzip2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/counter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/grep.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/gzip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/line.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/newline.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/stdio.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/symmetric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/test.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/zlib.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filtering_stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/filtering_streambuf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/flush.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/get.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/imbue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/input_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/invert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/operations.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/operations_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/optimal_buffer_size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/output_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/pipeline.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/positioning.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/put.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/putback.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/read.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/restrict.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/seek.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/skip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/slice.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/stream_buffer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/tee.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/traits_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iostreams/write.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/is_placeholder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/counting_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/any_conversion_eater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/config_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/config_undef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/enable_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/facade_iterator_category.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/minimum_category.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/filter_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/indirect_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/interoperable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/is_lvalue_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/is_readable_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_adaptor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_archetypes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_categories.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_concepts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_facade.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/new_iterator_tests.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/permutation_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/reverse_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/transform_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator/zip_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/iterator_adaptors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/casts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/closures.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/construct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/control_structures.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/actions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/arity_code.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/bind_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/control_constructs_common.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/function_adaptors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/is_instance_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/lambda_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/lambda_functor_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/lambda_functors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/lambda_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/lambda_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/member_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/operator_actions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/operator_lambda_func_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/operator_return_type_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/ret.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/return_type_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/select_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/detail/suppress_unused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/exceptions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/loops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/numeric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lambda/switch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/last_value.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/lexical_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/make_shared.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/bindings/detail/big_digamma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/bindings/detail/big_lanczos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/bindings/mpfr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/bindings/rr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/common_factor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/common_factor_ct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/common_factor_rt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex/acos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex/acosh.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex/asin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex/asinh.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex/atan.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex/atanh.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex/details.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/complex/fabs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/concepts/distributions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/concepts/real_concept.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/concepts/real_type_concept.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/concepts/std_real_concept.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/constants/constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/bernoulli.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/beta.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/binomial.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/cauchy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/chi_squared.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/complement.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/detail/common_error_handling.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/detail/derived_accessors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/detail/generic_mode.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/detail/generic_quantile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/detail/hypergeometric_cdf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/detail/hypergeometric_pdf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/detail/hypergeometric_quantile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/detail/inv_discrete_quantile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/exponential.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/extreme_value.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/find_location.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/find_scale.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/fisher_f.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/gamma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/hypergeometric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/inverse_chi_squared.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/inverse_gamma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/laplace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/logistic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/lognormal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/negative_binomial.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/non_central_beta.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/non_central_chi_squared.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/non_central_f.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/non_central_t.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/normal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/pareto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/poisson.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/rayleigh.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/students_t.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/triangular.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/uniform.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/distributions/weibull.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/octonion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/policies/error_handling.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/policies/policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/quaternion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/acosh.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/asinh.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/atanh.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/bessel.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/beta.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/binomial.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/cbrt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/cos_pi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_i0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_i1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_ik.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_j0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_j1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_jn.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_jy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_jy_asym.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_k0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_k1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_kn.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_y0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_y1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/bessel_yn.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/erf_inv.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/fp_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/gamma_inva.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/ibeta_inverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/iconv.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/igamma_inverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/igamma_large.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/lanczos_sse2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/lgamma_small.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/round_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/t_distribution_inv.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/detail/unchecked_factorial.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/digamma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/ellint_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/ellint_2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/ellint_3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/ellint_rc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/ellint_rd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/ellint_rf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/ellint_rj.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/erf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/expint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/expm1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/factorials.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/fpclassify.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/gamma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/hermite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/hypot.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/laguerre.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/lanczos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/legendre.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/log1p.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/math_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/modf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/next.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/pow.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/powm1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/prime.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/round.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/sign.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/sin_pi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/sinc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/sinhc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/spherical_harmonic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/sqrt1pm1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/trunc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/special_functions/zeta.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_11.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_12.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_13.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_14.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_15.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_16.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_17.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_18.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_19.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_6.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_7.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_8.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner1_9.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_11.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_12.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_13.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_14.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_15.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_16.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_17.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_18.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_19.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_6.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_7.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_8.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner2_9.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_11.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_12.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_13.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_14.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_15.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_16.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_17.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_18.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_19.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_6.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_7.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_8.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/polynomial_horner3_9.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_11.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_12.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_13.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_14.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_15.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_16.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_17.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_18.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_19.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_6.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_7.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_8.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner1_9.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_11.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_12.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_13.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_14.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_15.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_16.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_17.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_18.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_19.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_6.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_7.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_8.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner2_9.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_11.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_12.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_13.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_14.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_15.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_16.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_17.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_18.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_19.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_6.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_7.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_8.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/detail/rational_horner3_9.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/fraction.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/minima.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/polynomial.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/precision.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/promotion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/rational.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/real_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/remez.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/roots.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/series.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/solve.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/stats.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/test.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/test_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/toms748_solve.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/user.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tools/workaround.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math/tr1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/math_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mem_fn.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/memory_order.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/O1_size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/O1_size_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/accumulate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/advance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/advance_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/alias.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/always.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/arg_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/arithmetic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/as_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/at_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/O1_size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/adl_barrier.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/apply_1st.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/arg_typedef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/arithmetic_op.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/arity_spec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/back_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/begin_end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/clear_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/common_name_wknd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/comparison_op.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/adl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/arrays.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/bcc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/compiler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/dependent_nttp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/dtp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/eti.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/forwarding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/gcc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/has_apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/has_xxx.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/integral.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/intel.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/msvc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/msvc_typename.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/nttp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/overload_resolution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/pp_counter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/preprocessor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/static_constant.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/ttp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/use_preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/config/workaround.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/contains_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/count_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/count_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/empty_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/erase_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/erase_key_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/filter_iter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/find_if_pred.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/fold_impl_body.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/fold_op.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/fold_pred.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/front_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/has_apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/has_begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/has_key_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/has_rebind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/has_size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/has_tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/has_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/include_preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/insert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/insert_range_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/inserter_algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/integral_wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/is_msvc_eti_arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/iter_apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/iter_push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/joint_iter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/lambda_arity_param.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/lambda_spec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/lambda_support.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/largest_int.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/logical_op.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/msvc_dtw.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/msvc_eti_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/msvc_is_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/msvc_never_true.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/msvc_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/na.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/na_assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/na_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/na_spec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/nested_type_wknd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/nttp_decl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/numeric_cast_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/numeric_op.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/order_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/overload_names.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/partition_op.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/pop_back_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/pop_front_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/add.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/default_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/ext_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/filter_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/is_seq.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/partial_spec_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/repeat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/sub.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/token_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/preprocessor/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/ptr_to_ref.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/push_back_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/push_front_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/range_c/O1_size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/range_c/back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/range_c/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/range_c/front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/range_c/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/range_c/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/range_c/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/reverse_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/reverse_fold_impl_body.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/reverse_iter_fold_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/sequence_wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/shift_op.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/single_element_iter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/sort_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/static_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/template_arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/template_arity_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/test.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/test/assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/test/data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/test/test_case.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/traits_lambda_spec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/transform_iter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/type_wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/unwrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/value_wknd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/aux_/yes_no.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/back_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/back_inserter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/begin_end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/begin_end_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/bind_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/bitwise.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/bool_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/char_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/clear.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/clear_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/comparison.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/contains.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/contains_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/copy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/copy_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/count.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/count_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/count_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/deref.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/distance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/distance_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/divides.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/empty_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/empty_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/empty_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/erase.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/erase_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/erase_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/erase_key_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/eval_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/filter_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/find.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/find_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/for_each.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/front_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/front_inserter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/has_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/has_key_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/has_xxx.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/identity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/index_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/index_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/inherit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/inherit_linearly.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/insert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/insert_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/insert_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/insert_range_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/inserter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/int.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/int_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/integral_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/integral_c_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/integral_c_tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/is_placeholder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/is_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/iter_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/iter_fold_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/iterator_category.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/iterator_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/iterator_tags.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/joint_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/key_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/key_type_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/lambda_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/limits/arity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/limits/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/limits/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/limits/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/limits/string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/limits/unrolling.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/limits/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/O1_size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/begin_end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/clear.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/include_preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/item.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/numbered.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/numbered_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/pop_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/push_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/aux_/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list0_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list10_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list20_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list30_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list40_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list/list50_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/list_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/logical.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/long.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/long_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/lower_bound.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/begin_end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/clear_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/contains_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/empty_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/erase_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/erase_key_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/has_key_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/include_preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/insert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/item.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/key_type_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/map0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/numbered.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/no_ctps/map10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/no_ctps/map20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/no_ctps/map30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/no_ctps/map40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/no_ctps/map50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/plain/map10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/plain/map20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/plain/map30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/plain/map40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/plain/map50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/typeof_based/map10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/typeof_based/map20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/typeof_based/map30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/typeof_based/map40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/preprocessed/typeof_based/map50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/aux_/value_type_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/map0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/map10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/map20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/map30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/map40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/map/map50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/math/fixed_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/math/is_even.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/math/rational_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/max.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/max_element.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/min.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/min_element.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/min_max.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/minus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/modulus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/multiplies.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/multiset/aux_/count_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/multiset/aux_/insert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/multiset/aux_/item.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/multiset/aux_/multiset0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/multiset/aux_/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/multiset/multiset0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/negate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/next.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/next_prior.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/not.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/not_equal_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/numeric_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/order.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/order_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/pair.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/pair_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/partition.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/placeholders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/pop_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/pop_back_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/pop_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/pop_front_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/print.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/prior.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/protect.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/push_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/push_back_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/push_front_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/quote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/range_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/remove.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/remove_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/replace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/replace_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/reverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/reverse_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/reverse_iter_fold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/same_as.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/sequence_tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/sequence_tag_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/at_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/begin_end_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/clear_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/empty_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/erase_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/erase_key_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/has_key_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/include_preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/insert_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/item.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/key_type_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/numbered.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/numbered_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set10_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set20_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set30_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set40_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/preprocessed/plain/set50_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/set0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/size_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/aux_/value_type_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set0_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set10_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set20_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set30_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set40_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set/set50_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/set_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/shift_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/shift_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/single_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/size_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/size_t.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/size_t_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/sizeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/sort.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/stable_partition.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/switch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/times.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/transform.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/transform_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/unique.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/unpack_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/upper_bound.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/value_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/value_type_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/O1_size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/begin_end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/clear.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/include_preprocessed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/item.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/numbered.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/numbered_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/pop_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/pop_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/push_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/aux_/vector0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector0_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector10_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector20.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector20_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector30.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector30_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector40.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector40_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector/vector50_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/vector_c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/void.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/void_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/mpl/zip_view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/collection_concept.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/concept_checks.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/copy_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/extent_gen.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/extent_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/index_gen.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/index_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/multi_array_ref.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/range_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/storage_order.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/subarray.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/types.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_array/view.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/composite_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/access_specifier.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/adl_swap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/archive_constructed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/auto_space.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/base_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/bidir_node_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/bucket_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/converter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/copy_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/duplicates_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/has_tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/hash_index_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/hash_index_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/hash_index_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/header_holder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/index_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/index_loader.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/index_matcher.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/index_node_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/index_saver.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/invariant_assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/is_index_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/iter_adaptor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/modify_key_adaptor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/msvc_index_specifier.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/no_duplicate_tags.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/node_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/ord_index_args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/ord_index_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/ord_index_ops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/prevent_eti.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/rnd_index_loader.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/rnd_index_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/rnd_index_ops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/rnd_index_ptr_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/rnd_node_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/safe_ctr_proxy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/safe_mode.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/scope_guard.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/seq_index_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/seq_index_ops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/serialization_version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/uintptr_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/unbounded.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/detail/value_compare.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/global_fun.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/hashed_index.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/hashed_index_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/identity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/identity_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/indexed_by.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/key_extractors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/mem_fun.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/member.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/ordered_index.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/ordered_index_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/random_access_index.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/random_access_index_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/safe_mode_errors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/sequenced_index.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/sequenced_index_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index_container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/multi_index_container_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/next_prior.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/non_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/noncopyable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/nondet_random.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/none.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/none_t.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/optional/optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/optional/optional_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/optional/optional_io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/arg_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/default.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/is_maybe.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/maybe.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/overloads.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/parameter_requirements.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/parenthesized_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/preprocessor/flatten.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/preprocessor/for_each.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/python/invoker.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/python/invoker_iterate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/result_of0.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/tagged_argument.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/template_keyword.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/unwrap_cv_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/void.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/aux_/yesno.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/binding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/keyword.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/macros.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/match.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/name.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/parameters.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/preprocessor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/parameter/value_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/bucket_sorter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/container_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/cstddef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/detail/disjoint_sets.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/detail/int_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/detail/property.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/disjoint_sets.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/fenced_priority_queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/fibonacci_heap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/indirect_cmp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/integer_log2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/integer_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/is_heap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/iterator_adaptors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/iterator_tests.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/lowest_bit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/mutable_heap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/mutable_queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/property.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/property_serialize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/relaxed_heap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pending/stringtok.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pointee.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pointer_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/pointer_to_other.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic/add.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic/dec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic/detail/div_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic/div.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic/inc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic/mod.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic/mul.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/arithmetic/sub.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/elem.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/insert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/pop_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/pop_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/push_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/remove.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/replace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/reverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/array/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/assert_msg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/cat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comma_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comparison.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comparison/equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comparison/greater.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comparison/greater_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comparison/less.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comparison/less_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/comparison/not_equal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/config/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/config/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/deduce_d.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/detail/dmc/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/detail/edg/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/detail/msvc/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/detail/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/expr_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/expr_iif.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/iif.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/control/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/debug.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/debug/assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/debug/error.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/debug/line.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/dec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/detail/auto_rec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/detail/check.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/detail/dmc/auto_rec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/detail/is_binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/detail/is_nullary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/detail/is_unary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/detail/null.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/detail/split.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/enum_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/enum_params_with_a_default.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/enum_params_with_defaults.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/enum_shifted.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/enum_shifted_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/expand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/expr_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities/apply.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities/expand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities/identity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities/intercept.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities/is_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities/is_empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/facilities/is_empty_or_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/identity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/inc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iterate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/lower2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/lower3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/lower4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/lower5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/upper2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/upper3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/upper4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/bounds/upper5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/finish.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/forward1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/forward2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/forward3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/forward4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/forward5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/reverse1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/reverse2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/reverse3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/reverse4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/iter/reverse5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/local.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/rlocal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/self.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/detail/start.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/iterate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/local.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/iteration/self.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/library.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/adt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/append.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/cat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/detail/dmc/fold_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/detail/edg/fold_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/detail/edg/fold_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/detail/fold_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/detail/fold_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/filter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/first_n.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/fold_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/fold_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/for_each.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/for_each_i.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/for_each_product.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/rest_n.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/reverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/to_tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/list/transform.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/bitand.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/bitnor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/bitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/bitxor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/compl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/nor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/not.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/logical/xor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/max.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/min.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/punctuation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/punctuation/comma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/punctuation/comma_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/punctuation/paren.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/punctuation/paren_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repeat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repeat_2nd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repeat_3rd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repeat_from_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repeat_from_to_2nd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repeat_from_to_3rd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/deduce_r.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/deduce_z.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/detail/dmc/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/detail/edg/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/detail/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/detail/msvc/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_binary_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_params_with_a_default.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_params_with_defaults.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_shifted.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_shifted_binary_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_shifted_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_trailing.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_trailing_binary_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/enum_trailing_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/repeat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/repetition/repeat_from_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/selection.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/selection/max.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/selection/min.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/cat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/detail/split.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/elem.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/filter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/first_n.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/fold_left.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/fold_right.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/for_each.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/for_each_i.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/for_each_product.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/insert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/pop_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/pop_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/push_back.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/remove.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/replace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/rest_n.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/reverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/seq.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/subseq.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/to_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/to_tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/seq/transform.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/counter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/detail/counter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/detail/def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/detail/shared.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/detail/slot1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/detail/slot2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/detail/slot3.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/detail/slot4.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/detail/slot5.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/slot/slot.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/stringize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/tuple/eat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/tuple/elem.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/tuple/rem.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/tuple/reverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/tuple/to_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/tuple/to_seq.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/preprocessor/wstringize.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/program_options.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/progress.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/dynamic_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/parallel/caching_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/parallel/distributed_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/parallel/global_index_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/parallel/impl/distributed_property_map.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/parallel/local_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/property_map_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/shared_array_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_map/vector_property_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/exception_implementation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/file_parser_error.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/info_parser_error.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/info_parser_read.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/info_parser_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/info_parser_write.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/info_parser_writer_settings.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/json_parser_error.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/json_parser_read.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/json_parser_write.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/ptree_implementation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/ptree_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/rapidxml.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/xml_parser_error.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/xml_parser_flags.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/xml_parser_read_rapidxml.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/xml_parser_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/xml_parser_write.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/detail/xml_parser_writer_settings.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/exceptions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/id_translator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/info_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/ini_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/json_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/ptree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/ptree_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/ptree_serialization.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/stream_translator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/string_path.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/property_tree/xml_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/arg_from_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/args.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/args_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/back_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/base_type_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/bases.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/borrowed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/call.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/call_method.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/class_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/arg_from_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/arg_to_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/arg_to_python_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/as_to_python_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/builtin_converters.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/constructor_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/context_result_converter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/convertible_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/from_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/implicit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/obj_mgr_arg_from_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/object_manager.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/pointer_type_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/pyobject_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/pyobject_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/pytype_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/pytype_object_mgr_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/registered.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/registered_pointee.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/registrations.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/registry.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/return_from_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/rvalue_from_python_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/shared_ptr_deleter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/shared_ptr_from_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/shared_ptr_to_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/converter/to_python_function_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/copy_const_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/copy_non_const_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/data_members.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/def_visitor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/default_call_policies.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/aix_init_module.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/api_placeholder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/borrowed_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/caller.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/construct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/convertible.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/copy_ctor_mutates_rhs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/cv_category.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/dealloc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/decorated_type_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/decref_guard.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/def_helper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/def_helper_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/defaults_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/defaults_gen.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/dependent.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/destroy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/enable_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/exception_handler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/force_instantiate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/if_else.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/indirect_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/invoke.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/is_auto_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/is_shared_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/is_wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/is_xxx.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/make_keyword_range_fn.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/make_tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/map_entry.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/mpl_lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/msvc_typeinfo.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/none.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/not_specified.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/nullary_function_adaptor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/operator_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/overloads_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/pointee.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/prefix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/preprocessor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/python22_fixed.h create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/python_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/raw_pyobject.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/referent_storage.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/result.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/scope.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/sfinae.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/signature.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/string_literal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/target.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/translate_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/type_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/type_list_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/type_list_impl_no_pts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/unwind_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/unwrap_type_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/unwrap_wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/value_arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/value_is_shared_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/value_is_xxx.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/void_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/void_return.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/wrap_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/detail/wrapper_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/dict.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/docstring_options.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/errors.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/exception_translator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/exec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/extract.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/handle.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/handle_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/has_back_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/implicit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/import.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/init.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/instance_holder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/long.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/lvalue_from_pytype.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/make_constructor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/make_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/manage_new_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/module.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/module_init.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/numeric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/add_to_namespace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/class_detail.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/class_metadata.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/class_wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/enum_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/find_instance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/forward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/function_doc_signature.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/function_handle.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/inheritance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/inheritance_query.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/instance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/iterator_core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/life_support.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/make_holder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/make_instance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/make_ptr_instance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/pickle_support.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/pointer_holder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/py_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/stl_iterator_core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/value_holder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object/value_holder_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_call.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_items.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_protocol.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_protocol_core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/object_slices.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/opaque_pointer_converter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/other.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/overloads.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/override.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/pointee.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/proxy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/pure_virtual.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/raw_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/refcount.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/reference_existing_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/register_ptr_to_python.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/return_arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/return_by_value.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/return_internal_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/return_opaque_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/return_value_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/scope.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/self.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/signature.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/slice.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/slice_nil.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/ssize_t.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/stl_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/str.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/suite/indexing/container_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/suite/indexing/indexing_suite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/suite/indexing/map_indexing_suite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/suite/indexing/vector_indexing_suite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/to_python_converter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/to_python_indirect.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/to_python_value.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/type_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/with_custodian_and_ward.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/python/wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/additive_combine.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/bernoulli_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/binomial_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/cauchy_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/auto_link.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/const_mod.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/disable_warnings.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/enable_warnings.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/iterator_mixin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/pass_through_engine.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/ptr_helper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/seed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/signed_unsigned_tools.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/detail/uniform_int_float.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/discard_block.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/exponential_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/gamma_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/geometric_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/inversive_congruential.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/lagged_fibonacci.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/linear_congruential.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/linear_feedback_shift.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/lognormal_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/mersenne_twister.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/normal_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/poisson_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/random_number_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/ranlux.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/shuffle_output.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/subtract_with_carry.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/triangle_distribution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/uniform_01.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/uniform_int.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/uniform_on_sphere.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/uniform_real.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/uniform_smallint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/variate_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/random/xor_combine.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/adjacent_filtered.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/argument_fwd.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/copied.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/define_adaptor.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/filtered.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/indexed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/indirected.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/replaced.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/replaced_if.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/reversed.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/sliced.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/strided.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/tokenized.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/transformed.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptor/uniqued.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/adaptors.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/adjacent_find.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/binary_search.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/copy.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/copy_backward.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/count.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/count_if.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/equal.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/equal_range.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/fill.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/fill_n.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/find.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/find_end.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/find_first_of.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/find_if.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/for_each.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/generate.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/heap_algorithm.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/inplace_merge.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/lexicographical_compare.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/lower_bound.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/max_element.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/merge.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/min_element.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/mismatch.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/nth_element.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/partial_sort.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/partial_sort_copy.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/partition.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/permutation.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/random_shuffle.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/remove.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/remove_copy.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/remove_copy_if.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/remove_if.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/replace.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/replace_copy.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/replace_copy_if.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/replace_if.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/reverse.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/reverse_copy.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/rotate.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/rotate_copy.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/search.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/search_n.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/set_algorithm.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/sort.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/stable_partition.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/stable_sort.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/swap_ranges.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/transform.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/unique.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/unique_copy.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm/upper_bound.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/copy_n.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/erase.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/for_each.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/insert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/iota.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/is_sorted.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/overwrite.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/push_back.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/algorithm_ext/push_front.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/as_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/as_literal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/atl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/category.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/combine.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/concepts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/const_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/const_reverse_iterator.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/counting_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/as_literal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/collection_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/collection_traits_detail.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/common.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/const_iterator.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/detail/demote_iterator_traversal_tag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/detail_str.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/difference_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/end.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/detail/extract_optional_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/implementation_help.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/join_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/microsoft.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/detail/misc_concept.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/detail/range_return.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/remove_extent.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/sfinae.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/size_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/sizer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/str_types.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/value_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/vc6/end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/detail/vc6/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/difference_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/distance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/irange.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/istream_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/iterator_range.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/iterator_range_core.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/iterator_range_io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/join.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/metafunctions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/mfc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/mutable_iterator.hpp create mode 100755 deal.II/contrib/boost-1.45.0/include/boost/range/numeric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/rbegin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/rend.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/result_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/reverse_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/reverse_result_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/size.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/size_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/sub_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/range/value_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/rational.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/ref.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/regex.h create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/regex_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/scope_exit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/scoped_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/scoped_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/access.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/assume_abstract.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/base_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/binary_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/bitset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/collection_size_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/collection_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/collections_load_imp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/collections_save_imp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/complex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/detail/get_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/detail/shared_count_132.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/detail/shared_ptr_132.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/detail/shared_ptr_nmt_132.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/detail/stack_constructor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/ephemeral.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/export.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/extended_type_info.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/extended_type_info_no_rtti.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/extended_type_info_typeid.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/factory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/force_include.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/hash_collections_load_imp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/hash_collections_save_imp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/hash_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/hash_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/is_bitwise_serializable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/item_version_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/level.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/level_enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/nvp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/pfto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/scoped_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/serialization.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/shared_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/shared_ptr_132.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/singleton.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/slist.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/smart_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/split_free.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/split_member.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/state_saver.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/static_warning.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/strong_typedef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/throw_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/tracking.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/tracking_enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/type_info_implementation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/valarray.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/variant.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/vector_135.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/void_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/void_cast_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/weak_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/serialization/wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/shared_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/shared_container_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/shared_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/signal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/signals.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/signals2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/bad_weak_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/atomic_count.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/atomic_count_gcc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/atomic_count_pthreads.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/atomic_count_solaris.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/atomic_count_sync.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/atomic_count_win32.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/lightweight_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/lwm_nop.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/lwm_pthreads.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/lwm_win32_cs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/operator_bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/quick_allocator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/shared_array_nmt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/shared_count.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/shared_ptr_nmt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_convertible.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_nt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_pt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_solaris.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_spin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_base_w32.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_counted_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/sp_has_sync.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/spinlock.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/spinlock_gcc_arm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/spinlock_nt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/spinlock_pool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/spinlock_pt.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/spinlock_sync.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/spinlock_w32.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/detail/yield_k.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/enable_shared_from_this.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/enable_shared_from_this2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/intrusive_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/make_shared.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/scoped_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/scoped_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/shared_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/shared_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/smart_ptr/weak_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/assign_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/assign_key_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/clear_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/decrement_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/erase_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/increment_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/insert_at_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/insert_key_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/push_back_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/push_front_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/ref_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/ref_const_ref_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/ref_const_ref_const_ref_a.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/ref_const_ref_value_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/ref_value_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/swap_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/actor/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/attribute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/attribute/closure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/attribute/closure_context.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/attribute/closure_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/attribute/parametric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/attribute/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/actions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/alternative.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/difference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/directives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/epsilon.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/exclusive_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/intersection.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/kleene_star.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/no_actions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/positive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/sequential_and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/composite/sequential_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/match.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/nil.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/non_terminal/grammar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/non_terminal/parser_context.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/non_terminal/parser_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/non_terminal/rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/non_terminal/subrule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/non_terminal/subrule_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/primitives/numerics.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/primitives/numerics_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/primitives/primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/safe_bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/scanner/scanner.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/scanner/scanner_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/scanner/skipper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/scanner/skipper_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/core/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/debug.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/debug/debug_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/debug/minimal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/debug/parser_names.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/debug/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/lazy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/rule_alias.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/select.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/stored_rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/stored_rule_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/switch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/dynamic/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/error_handling.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/error_handling/exceptions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/error_handling/exceptions_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/error_handling/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/assign_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/assign_key_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/clear_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/decrement_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/erase_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/increment_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/insert_at_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/insert_key_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/push_back_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/push_front_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/ref_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/ref_const_ref_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/ref_const_ref_const_ref_a.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/ref_const_ref_value_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/ref_value_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/swap_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/actor/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/attribute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/attribute/closure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/attribute/closure_context.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/attribute/closure_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/attribute/parametric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/attribute/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/actions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/alternative.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/difference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/directives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/epsilon.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/exclusive_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/alternative.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/difference.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/directives.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/intersection.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/list.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/optional.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/positive.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/sequence.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/intersection.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/kleene_star.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/no_actions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/positive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/sequential_and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/composite/sequential_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/impl/match.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/impl/match_attr_traits.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/impl/parser.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/match.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/nil.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/grammar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/impl/static.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/impl/subrule.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/parser_context.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/parser_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/subrule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/non_terminal/subrule_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/primitives/impl/numerics.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/primitives/impl/primitives.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/primitives/numerics.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/primitives/primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/safe_bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/scanner/impl/skipper.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/scanner/scanner.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/scanner/skipper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/core/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/debug.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/debug/debug_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/debug/impl/parser_names.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/debug/minimal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/debug/parser_names.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/debug/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/impl/conditions.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/impl/select.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/impl/switch.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/lazy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/rule_alias.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/select.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/stored_rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/stored_rule_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/switch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/dynamic/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/error_handling.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/error_handling/exceptions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/error_handling/exceptions_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/error_handling/impl/exceptions.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/error_handling/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/file_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/file_iterator_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/fixed_size_queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/impl/file_iterator.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/impl/position_iterator.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/multi_pass_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/position_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/position_iterator_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/iterator/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/as_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/fundamental.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/impl/fundamental.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/impl/parser_traits.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/impl/refactoring.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/impl/traverse.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/parser_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/refactoring.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/meta/traverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/namespace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/binders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/casts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/closures.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/new.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/special_ops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/statements.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/tuple_helpers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/phoenix/tuples.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/symbols/impl/symbols.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/symbols/impl/tst.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/symbols/symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/symbols/symbols_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/symbols/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/ast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/ast_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/common.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/common_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/impl/parse_tree_utils.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/impl/tree_to_xml.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/parse_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/parse_tree_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/parse_tree_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/parsetree.dtd create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/tree_to_xml.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/tree/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/chset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/chset_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/confix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/confix_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/distinct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/distinct_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/escape_char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/escape_char_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/flush_multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/functor_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/grammar_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/grammar_def_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/chset.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/chset/range_run.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/chset/range_run.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/chset_operators.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/confix.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/escape_char.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/lists.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/impl/regex.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/lists.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/lists_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/loops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/rule_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/scoped_lock.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/utility/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/classic/version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/action/action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auto/auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auto/create_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auto/meta_create.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auxiliary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auxiliary/attr_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auxiliary/eol.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auxiliary/eps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/auxiliary/lazy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/binary/binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/binary/padding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/char/char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/char/char_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/char/char_generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/delimit_flag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/delimit_out.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/alternative_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/default_width.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/extract_from.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/fail_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/generate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/generate_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/generate_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/get_casetag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/get_stricttag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/output_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/pass_container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/string_compare.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/string_generate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/detail/unused_delimiter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/buffer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/center_alignment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/columns.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/delimit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/duplicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/encoding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/left_alignment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/maxwidth.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/no_delimit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/omit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/repeat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/right_alignment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/strict_relaxed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/upper_lower_case.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/directive/verbatim.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/domain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/format.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/format_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/generate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/generate_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/meta_compiler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal/debug_handler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal/debug_handler_state.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal/detail/fcall.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal/detail/generator_binder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal/detail/parameterized.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal/grammar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal/rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/nonterminal/simple_trace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/bool_policies.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/detail/bool_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/detail/real_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/int.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/real.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/real_policies.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/numeric/uint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator/alternative.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator/and_predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator/kleene.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator/not_predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator/optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/operator/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/phoenix_attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/stream/detail/format_manip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/stream/detail/iterator_sink.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/stream/format_manip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/stream/format_manip_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/stream/ostream_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/stream/stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/string/lit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/string/symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/karma/what.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/argument.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/detail/sequence_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/domain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/char_token_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/functor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/lexer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/static_version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/token.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/pass_flags.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/string_token_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/support_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/terminals.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer/token_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer_lexertl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer_static_lexertl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/lexer_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/meta_compiler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/qi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/qi/in_state.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/qi/plain_token.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/qi/state_switcher.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/tokenize_and_parse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/lex/tokenize_and_parse_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/bind_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/bind_function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/bind_member_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/bind_member_variable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/detail/bind_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/argument.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/as_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/basic_environment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/compose.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/detail/actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/detail/basic_environment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/detail/compose.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/detail/composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/detail/composite_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/detail/composite_info.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/detail/function_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/is_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/nothing.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/core/value.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/detail/local_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/detail/type_deduction.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/function/detail/function_call.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/function/function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/fusion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/fusion/at.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/const_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/construct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/delete.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/detail/construct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/detail/construct_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/detail/new.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/detail/new_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/dynamic_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/new.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/reinterpret_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/object/static_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/arithmetic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/bitwise.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/comparison.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/detail/io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/if_else.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/logical.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/member.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/operator/self.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/scope.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/scope/detail/local_gen.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/scope/detail/local_variable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/scope/dynamic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/scope/lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/scope/let.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/scope/local_variable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/scope/scoped_environment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/detail/catch_all_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/detail/catch_composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/detail/catch_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/detail/switch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/detail/switch_eval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/detail/switch_eval.ipp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/do_while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/switch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/throw.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/try_catch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/statement/while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/begin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/decay_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/end.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_equal_range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_find.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_lower_bound.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_remove.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_remove_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_reverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_sort.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_unique.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_upper_bound.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_hash_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_hash_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/std_hash_map_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/detail/std_hash_set_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/iteration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/querying.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/algorithm/transformation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/container/container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/stl/container/detail/container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/phoenix/version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/action/action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auto/auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auto/create_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auto/meta_create.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auxiliary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auxiliary/attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auxiliary/attr_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auxiliary/eoi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auxiliary/eol.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auxiliary/eps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/auxiliary/lazy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/binary/binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/char/char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/char/char_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/char/char_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/alternative_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/assign_to.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/construct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/expect_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/fail_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/parse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/parse_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/pass_container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/pass_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/permute_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/string_parse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/detail/unused_skipper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/encoding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/hold.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/lexeme.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/matches.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/no_case.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/no_skip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/omit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/raw.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/repeat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/directive/skip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/domain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/match.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/match_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/meta_compiler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/debug_handler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/debug_handler_state.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/detail/fcall.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/error_handler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/grammar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/nonterminal/simple_trace.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/bool_policies.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/int.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/numeric_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/real.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/real_policies.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/numeric/uint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/alternative.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/and_predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/difference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/expect.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/kleene.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/not_predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/permutation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/sequence_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/operator/sequential_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/parse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/parse_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/skip_flag.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/skip_over.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/stream/detail/iterator_source.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/stream/detail/match_manip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/stream/match_manip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/stream/match_manip_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/stream/stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/string/detail/tst.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/string/lit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/string/symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/string/tst.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/string/tst_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/qi/what.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/action_dispatch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/adapt_adt_attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/algorithm/any.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/algorithm/any_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/algorithm/any_if_ns.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/algorithm/any_ns.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/argument.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/assert_msg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/attributes_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/auto/meta_create.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/auxiliary/attr_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/ascii.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/iso8859_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/standard.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/standard_wide.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/DerivedCoreProperties.txt create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/PropList.txt create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/Scripts.txt create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/UnicodeData.txt create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/category_table.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/create_tables.cpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/lowercase_table.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/query.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/script_table.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_encoding/unicode/uppercase_table.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_set/basic_chset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_set/range.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_set/range_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_set/range_run.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/char_set/range_run_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/common_terminals.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/context.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/as_variant.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/endian.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/get_encoding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/hold_any.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/integer/cover_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/integer/endian.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/char_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/consts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/containers/ptr_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/containers/ptr_vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/conversion/char_state_machine.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/debug.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/file_input.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/generate_cpp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/generate_re2c.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/generator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/input.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/internals.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tokeniser/num_token.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_state.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tree/end_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/partition/charset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/partition/equivset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/rules.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/runtime_error.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/serialise.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/size_t.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/state_machine.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/lexer/string_token.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/make_cons.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/make_vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/math/detail/fp_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/math/fpclassify.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/math/signbit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/pow10.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/scoped_enum_emulation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/sign.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/detail/what_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/has_semantic_action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/info.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/buffering_input_iterator_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/combine_policies.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/first_owner_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/fixed_size_queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/istream_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/no_check_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/istream_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/look_ahead.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/multi_pass_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/iterators/ostream_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/lazy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/make_component.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/meta_compiler.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/modify.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/multi_pass_wrapper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/nonterminal/expand_arg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/nonterminal/extract_param.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/nonterminal/locals.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/sequence_base_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/string_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/terminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/unused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/home/support/utf8.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_actions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_alternative.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_as_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_assign_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_assign_key_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_ast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_ast_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_attribute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_basic_chset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_chset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_chset_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_clear_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_closure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_closure_context.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_closure_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_common.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_common_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_confix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_confix_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_debug.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_debug_node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_decrement_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_difference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_directives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_distinct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_distinct_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_dynamic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_epsilon.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_erase_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_error_handling.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_escape_char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_escape_char_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_exceptions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_exceptions_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_exclusive_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_file_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_file_iterator_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_fixed_size_queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_flush_multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_for.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_functor_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_fundamental.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_grammar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_grammar_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_grammar_def_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_increment_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_insert_at_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_insert_key_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_intersection.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_kleene_star.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_lazy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_lists.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_lists_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_loops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_match.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_meta.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_minimal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_multi_pass_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_nil.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_no_actions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_numerics.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_numerics_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parametric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parse_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parse_tree_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parse_tree_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parser_context.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parser_id.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parser_names.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_parser_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_position_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_position_iterator_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_positive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_push_back_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_push_front_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_range_run.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_ref_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_ref_const_ref_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_ref_const_ref_const_ref_a.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_ref_const_ref_value_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_ref_value_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_refactoring.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_rule_alias.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_rule_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_safe_bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_scanner.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_scanner_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_scoped_lock.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_select.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_sequential_and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_sequential_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_skipper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_skipper_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_spirit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_static.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_stored_rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_stored_rule_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_subrule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_subrule_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_swap_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_switch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_symbols_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_traverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_tree_to_xml.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/classic_while.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_alternative.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_and_predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_attr_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_auxiliary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_buffer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_center_alignment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_char_.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_char_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_columns.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_delimit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_directive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_domain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_duplicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_eol.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_eps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_format.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_format_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_format_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_generate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_generate_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_generate_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_grammar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_int.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_kleene.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_lazy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_left_alignment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_maxwidth.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_no_delimit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_nonterminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_not_predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_numeric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_omit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_operator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_phoenix_attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_real.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_repeat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_right_alignment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_strict_relaxed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_uint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_upper_lower_case.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_verbatim.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/karma_what.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_char_token_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_domain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_generate_static_lexertl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_lexer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_lexertl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_static_lexertl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_tokenize_and_parse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/lex_tokenize_and_parse_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_binders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_casts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_closures.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_new.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_special_ops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_statements.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_tuple_helpers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix1_tuples.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_algorithm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_bind.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_fusion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_operator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_scope.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_statement.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_stl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/phoenix_version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_alternative.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_and_predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_attr_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_auxiliary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_bool.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_char_.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_char_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_core.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_difference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_directive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_domain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_eoi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_eol.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_eps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_expect.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_grammar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_int.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_kleene.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_lazy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_lexeme.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_lit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_match.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_match_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_match_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_matches.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_no_case.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_no_skip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_nonterminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_not_predicate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_numeric.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_omit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_operator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_optional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_parse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_parse_attr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_parse_auto.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_permutation.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_plus.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_raw.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_real.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_repeat.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_rule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_sequence.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_sequential_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_skip.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_stream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_uint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/qi_what.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_adapt_adt_attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_any.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_any_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_any_if_ns.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_any_ns.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_argument.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_ascii.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_attributes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_attributes_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_char_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_container.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_iso8859_1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_istream_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_locals.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_look_ahead.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_modify.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_multi_pass_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_ostream_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_standard.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_standard_wide.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_string_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/support_unused.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/include/version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator/file_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator/file_iterator_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator/fixed_size_queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator/multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator/multi_pass_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator/position_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator/position_iterator_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/iterator/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/meta.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/meta/as_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/meta/fundamental.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/meta/parser_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/meta/refactoring.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/meta/traverse.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/actor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/binders.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/casts.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/closures.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/composite.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/new.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/special_ops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/statements.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/tuple_helpers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/phoenix/tuples.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/karma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/karma/directive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/karma/directive/confix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/karma/nonterminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/karma/nonterminal/subrule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi/directive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi/directive/confix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi/directive/distinct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi/nonterminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi/nonterminal/subrule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi/primitive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/qi/primitive/iter_pos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/support/confix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/support/distinct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/support/flush_multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/home/support/subrule_context.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/karma.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/karma_confix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/karma_directive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/karma_nonterminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/karma_subrule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi_confix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi_directive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi_distinct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi_flush_multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi_iter_pos.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi_nonterminal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi_primitive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/repository/include/qi_subrule.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/symbols/symbols.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/symbols/symbols_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/symbols/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/ast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/ast_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/common.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/common_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/parse_tree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/parse_tree_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/parse_tree_utils.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/parsetree.dtd create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/tree_to_xml.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/tree/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/chset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/chset_operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/confix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/confix_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/distinct.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/distinct_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/escape_char.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/escape_char_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/flush_multi_pass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/functor_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/grammar_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/grammar_def_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/lists.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/lists_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/loops.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/rule_parser.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/scoped_lock.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/utility/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/spirit/version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/static_assert.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/strong_typedef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/swap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/barrier.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/condition.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/condition_variable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/force_cast.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/move.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/platform.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/singleton.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/thread.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/thread_group.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/thread_heap_alloc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/thread_interruption.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/detail/tss_hooks.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/exceptions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/future.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/locks.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/once.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/condition_variable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/condition_variable_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/once.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/recursive_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/shared_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/thread_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/thread_heap_alloc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/pthread/timespec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/recursive_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/shared_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/thread.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/thread_time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/tss.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/basic_recursive_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/basic_timed_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/condition_variable.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/interlocked_read.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/once.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/recursive_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/shared_mutex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/thread_data.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/thread_heap_alloc.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/win32/thread_primitives.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/thread/xtime.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/throw_exception.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/timer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/token_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/token_iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tokenizer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/cmath.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/complex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/detail/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/detail/config_all.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/detail/functor2iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/detail/math_overloads.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/functional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/memory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/random.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/regex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/algorithm create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/array create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/bcc32/array.h create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/bcc32/random.h create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/bcc32/regex.h create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/bcc32/tuple.h create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/bcc32/type_tra.h create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/bcc32/unordere.h create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/bitset create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/cmath create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/complex create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/deque create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/exception create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/fstream create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/functional create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/iomanip create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/ios create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/iostream create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/istream create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/iterator create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/limits create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/list create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/locale create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/map create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/memory create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/new create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/numeric create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/ostream create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/queue create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/random create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/regex create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/set create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sstream create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/stack create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/stdexcept create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/streambuf create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/string create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/strstream create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/algorithm.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/array.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/bcc32.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/bitset.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/cmath.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/complex.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/deque.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/exception.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/fstream.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/functional.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/iomanip.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/ios.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/iostream.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/istream.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/iterator.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/limits.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/list.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/locale.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/map.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/memory.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/new.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/numeric.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/ostream.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/queue.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/random.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/regex.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/set.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/sstream.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/stack.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/stdexcept.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/streambuf.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/string.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/strstream.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/sun.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/tuple.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/type_traits.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/typeinfo.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/unordered_map.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/unordered_set.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/utility.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/valarray.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/sun/vector.SUNWCCh create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/tuple create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/type_traits create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/typeinfo create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/unordered_map create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/unordered_set create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/utility create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/valarray create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tr1/vector create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/type_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/unordered_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/unordered_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tr1/utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tuple/detail/tuple_basic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tuple/detail/tuple_basic_no_partial_spec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tuple/tuple.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tuple/tuple_comparison.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/tuple/tuple_io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/add_const.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/add_cv.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/add_lvalue_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/add_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/add_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/add_rvalue_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/add_volatile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/aligned_storage.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/alignment_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/alignment_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/arithmetic_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/array_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/broken_compiler_spec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/common_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/composite_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/conditional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/conversion_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/cv_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/decay.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/bool_trait_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/bool_trait_undef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/common_type_imp.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/cv_traits_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/false_result.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/ice_and.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/ice_eq.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/ice_not.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/ice_or.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/is_function_ptr_helper.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/is_function_ptr_tester.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/size_t_trait_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/size_t_trait_undef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/template_arity_spec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/type_trait_def.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/type_trait_undef.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/wrap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/detail/yes_no_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/extent.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/floating_point_promotion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/function_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_new_operator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_nothrow_assign.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_nothrow_constructor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_nothrow_copy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_nothrow_destructor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_trivial_assign.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_trivial_constructor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_trivial_copy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_trivial_destructor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/has_virtual_destructor.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/ice.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/integral_constant.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/integral_promotion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/intrinsics.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_abstract.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_arithmetic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_array.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_base_and_derived.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_base_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_base_of_tr1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_class.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_complex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_compound.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_const.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_convertible.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_empty.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_enum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_float.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_floating_point.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_function.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_fundamental.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_integral.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_lvalue_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_member_function_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_member_object_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_member_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_object.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_pod.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_polymorphic.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_rvalue_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_same.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_scalar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_signed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_stateless.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_union.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_unsigned.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_virtual_base_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_void.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/is_volatile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/make_signed.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/make_unsigned.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/remove_all_extents.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/remove_bounds.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/remove_const.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/remove_cv.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/remove_extent.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/remove_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/remove_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/remove_volatile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/msvc/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/object_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/promote.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/rank.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/reference_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/remove_all_extents.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/remove_bounds.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/remove_const.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/remove_cv.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/remove_extent.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/remove_pointer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/remove_reference.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/remove_volatile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/same_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/transform_traits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/transform_traits_spec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/type_traits/type_with_alignment.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/dmc/typeof_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/encode_decode.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/encode_decode_params.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/incr_registration_group.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/int_encoding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/integral_template_param.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/message.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/modifiers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/msvc/typeof_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/native.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/pointers_data_members.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/register_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/register_functions_iterate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/register_fundamental.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/register_mem_functions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/bitset.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/complex.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/deque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/fstream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/functional.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/iostream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/istream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/iterator.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/locale.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/memory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/ostream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/queue.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/sstream.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/stack.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/streambuf.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/string.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/valarray.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/std/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/template_encoding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/template_template_param.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/type_encoding.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/type_template_param.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/typeof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/typeof_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/unsupported.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/vector.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/vector100.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/vector150.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/vector200.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/typeof/vector50.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/absolute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_dimension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/angle/arcminute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/angle/arcsecond.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/angle/degree.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/angle/gradian.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/angle/radian.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/angle/revolution.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/angle/steradian.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/astronomical/astronomical_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/astronomical/light_day.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/astronomical/light_hour.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/astronomical/light_minute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/astronomical/light_second.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/astronomical/light_year.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/astronomical/parsec.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/cgs/biot.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/cgs/centimeter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/cgs/gram.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/conversions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/drachm.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/fluid_ounce.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/foot.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/furlong.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/gallon.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/gill.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/grain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/hundredweight.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/inch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/league.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/mile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/ounce.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/pint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/pound.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/quart.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/quarter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/stone.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/thou.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/ton.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/imperial/yard.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/angstrom.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/are.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/atmosphere.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/bar.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/barn.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/day.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/fermi.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/hectare.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/hour.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/knot.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/liter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/micron.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/minute.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/mmHg.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/nautical_mile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/ton.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/torr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/metric/year.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/si/ampere.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/si/candela.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/si/kelvin.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/si/kilogram.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/si/meter.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/si/mole.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/si/second.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/temperature/celsius.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/temperature/conversions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/temperature/fahrenheit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/cup.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/dram.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/fluid_dram.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/fluid_ounce.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/foot.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/gallon.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/gill.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/grain.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/hundredweight.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/inch.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/mil.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/mile.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/minim.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/ounce.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/pint.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/pound.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/pound_force.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/quart.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/tablespoon.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/teaspoon.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/ton.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/base_units/us/yard.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/cmath.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/config.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/conversion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/derived_dimension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/absolute_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/cmath_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/conversion_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/dim_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/dimension_impl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/dimension_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/dimensionless_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/heterogeneous_conversion.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/linear_algebra.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/one.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/ordinal.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/prevent_redefinition.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/push_front_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/push_front_or_add.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/sort.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/static_rational_power.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/unscale.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/detail/utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/dim.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/dimension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/dimensionless_quantity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/dimensionless_type.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/dimensionless_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/get_dimension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/get_system.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/heterogeneous_system.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/homogeneous_system.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_dim.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_dimension_list.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_dimensionless.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_dimensionless_quantity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_dimensionless_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_quantity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_quantity_of_dimension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_quantity_of_system.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_unit_of_dimension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/is_unit_of_system.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/lambda.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/limits.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/make_scaled_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/make_system.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/operators.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/absorbed_dose.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/acceleration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/activity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/amount.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/angular_acceleration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/angular_momentum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/angular_velocity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/area.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/capacitance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/conductance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/conductivity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/current.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/dose_equivalent.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/dynamic_viscosity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/electric_charge.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/electric_potential.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/energy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/energy_density.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/force.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/frequency.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/heat_capacity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/illuminance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/impedance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/inductance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/kinematic_viscosity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/length.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/luminance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/luminous_flux.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/luminous_intensity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/magnetic_field_intensity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/magnetic_flux.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/magnetic_flux_density.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/mass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/mass_density.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/molar_energy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/molar_heat_capacity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/moment_of_inertia.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/momentum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/permeability.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/permittivity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/plane_angle.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/power.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/pressure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/reluctance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/resistance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/resistivity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/solid_angle.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/specific_energy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/specific_heat_capacity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/specific_volume.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/stress.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/surface_density.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/surface_tension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/temperature.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/thermal_conductivity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/torque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/velocity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/volume.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/physical_dimensions/wavenumber.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/pow.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/quantity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/reduce_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/scale.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/scaled_base_unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/static_constant.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/static_rational.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/abstract.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/angle/degrees.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/angle/gradians.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/angle/revolutions.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/acceleration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/area.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/current.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/dimensionless.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/dynamic_viscosity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/energy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/force.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/frequency.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/kinematic_viscosity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/length.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/mass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/mass_density.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/momentum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/power.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/pressure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/velocity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/volume.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/cgs/wavenumber.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/detail/constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/absorbed_dose.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/acceleration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/action.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/activity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/amount.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/angular_acceleration.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/angular_momentum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/angular_velocity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/area.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/capacitance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/catalytic_activity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/alpha_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/atomic-nuclear_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/deuteron_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/electromagnetic_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/electron_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/helion_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/muon_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/neutron_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/physico-chemical_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/proton_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/tau_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/triton_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/typedefs.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata/universal_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/codata_constants.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/conductance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/conductivity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/current.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/dimensionless.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/dose_equivalent.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/dynamic_viscosity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/electric_charge.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/electric_potential.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/energy.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/force.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/frequency.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/illuminance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/impedance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/inductance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/io.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/kinematic_viscosity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/length.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/luminous_flux.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/luminous_intensity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/magnetic_field_intensity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/magnetic_flux.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/magnetic_flux_density.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/mass.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/mass_density.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/moment_of_inertia.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/momentum.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/permeability.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/permittivity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/plane_angle.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/power.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/prefixes.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/pressure.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/reluctance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/resistance.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/resistivity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/solid_angle.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/surface_density.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/surface_tension.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/temperature.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/time.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/torque.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/velocity.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/volume.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/si/wavenumber.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/temperature/celsius.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/systems/temperature/fahrenheit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/unit.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/units/units_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/allocator_helpers.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/buckets.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/equivalent.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/extract_key.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/move.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/table.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/unique.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/detail/util.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/unordered_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/unordered_map_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/unordered_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered/unordered_set_fwd.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered_map.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/unordered_set.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/addressof.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/base_from_member.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/binary.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/compare_pointees.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/declval.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/detail/in_place_factory_prefix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/detail/in_place_factory_suffix.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/detail/result_of_iterate.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/enable_if.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/in_place_factory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/result_of.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/swap.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/typed_in_place_factory.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/utility/value_init.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/variant.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/version.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/visit_each.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/wave.hpp create mode 100644 deal.II/contrib/boost-1.45.0/include/boost/weak_ptr.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/build/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/acknowledgments.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/archive_reference.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/archives.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/bibliography.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/class_diagram.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/codecvt.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/configuration.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/contents.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/dataflow.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/definitions.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/derivation.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/dot.gif create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/exception_safety.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/exceptions.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/extended_type_info.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/faq.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/headers.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/history.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/implementation.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/index.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/minus.gif create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/new_case_studies.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/overview.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/performance_status.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/pimpl.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/plus.gif create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/profile1.txt create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/profile2.txt create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/profile3.txt create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/rationale.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/reference.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/release.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/serialization.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/shared_ptr.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/shared_ptr2.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/simple_log.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/singleton.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/smart_cast.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/special.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/state_saver.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/static_warning.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/strong_typedef.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/style.css create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/todo.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/traits.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/tutorial.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/void_cast.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/doc/wrappers.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_auto_ptr.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_dll.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_dll_a.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_dll_a.ipp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_dll_b.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_dll_b.ipp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_exception.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_fast_archive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_gps.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_log.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_output.txt create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_pimpl.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_pimpl_A.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_pimpl_A.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_polymorphic.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_polymorphic_A.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_polymorphic_A.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_portable_archive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_save.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_shared_ptr.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_simple_log.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_trivial_archive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_xml.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_xml.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_xml_load.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demo_xml_save.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/demofile.txt create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/fix_six.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/log_archive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/log_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/portable_binary_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/portable_binary_iarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/portable_binary_iarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/portable_binary_oarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/portable_binary_oarchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/example/simple_log_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/index.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/binary_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/binary_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/peformance_array.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_binary.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_codecvt_null.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_iterators.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_iterators_base64.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_no_rtti.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_polymorphic.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_simple_class.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_utf8_codecvt.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/performance_vector.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/polymorphic_array_binary_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/polymorphic_binary_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/polymorphic_text_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/polymorphic_text_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/polymorphic_xml_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/polymorphic_xml_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/portable_binary_archive.hpp create mode 100755 deal.II/contrib/boost-1.45.0/libs/serialization/performance/profile.sh create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/text_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/text_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/harness.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/high_resolution_timer.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/int16_results.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/int16_test.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/int256_results.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/int256_test.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/int4_results.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/int4_test.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/int64_results.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/int64_test.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/macro.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/node.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/string16_results.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/string16_test.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/string256_results.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/string256_test.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/string4_results.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/string4_test.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/string64_results.xml create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml/string64_test.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/performance/xml_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/archive_exception.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_archive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_iarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_iserializer.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_oarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_oserializer.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_pointer_iserializer.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_pointer_oserializer.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_serializer_map.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_text_iprimitive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_text_oprimitive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_text_wiprimitive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_text_woprimitive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_xml_archive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/basic_xml_grammar.ipp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/binary_iarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/binary_oarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/binary_wiarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/binary_woarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/codecvt_null.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/extended_type_info.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/extended_type_info_no_rtti.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/extended_type_info_typeid.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/polymorphic_iarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/polymorphic_oarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/shared_ptr_helper.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/stl_port.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/text_iarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/text_oarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/text_wiarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/text_woarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/utf8_codecvt_facet.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/void_cast.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/xml_archive_exception.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/xml_grammar.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/xml_iarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/xml_oarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/xml_wgrammar.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/xml_wiarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/src/xml_woarchive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/A.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/A.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/A.ipp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/B.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/C.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/D.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/J.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/binary_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/binary_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/derived2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/dll_a.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/dll_base.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/dll_derived2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_array_binary_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_base.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_base.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_binary_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_derived1.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_derived1.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_derived2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_derived2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_text_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_text_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_xml_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/polymorphic_xml_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/portable_binary_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_array.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_binary.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_bitset.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_check.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_class_info_load.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_class_info_save.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_codecvt_null.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_complex.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_load_fail1.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_load_fail1_nvp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_load_fail2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_load_fail2_nvp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_load_fail3.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_load_fail3_nvp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_pass.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_save_warn1.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_save_warn1_nvp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_save_warn2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_save_warn2_nvp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_save_warn3.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_save_warn3_nvp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_save_warn4.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_const_save_warn4_nvp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_contained_class.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_cyclic_ptrs.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_decl.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_delete_pointer.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_deque.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_derived.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_derived_class.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_derived_class_ptr.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_diamond.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_diamond_complex.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_dll_exported.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_dll_plugin.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_dll_simple.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_exported.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_inclusion.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_iterators.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_iterators_base64.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_list.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_list_ptrs.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_map.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_mi.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_mult_archive_types.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_multiple_inheritance.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_multiple_ptrs.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_new_operator.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_no_rtti.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_non_default_ctor.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_non_default_ctor2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_non_intrusive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_not_serializable.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_null_ptr.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_nvp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_object.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_optional.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_pimpl.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_polymorphic.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_polymorphic2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_polymorphic2.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_polymorphic2imp.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_polymorphic_A.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_polymorphic_A.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_primitive.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_private_base.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_private_ctor.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_recursion.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_registered.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_reset_object_address.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_set.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_shared_ptr.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_shared_ptr_132.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_shared_ptr_multi_base.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_simple_class.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_simple_class_ptr.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_singleton.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_smart_cast.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_split.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_static_warning.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_tools.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_tracking.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_traits_fail.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_traits_pass.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_unregistered.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_utf8_codecvt.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_valarray.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_variant.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_vector.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/test_void_cast.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/text_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/text_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/xml_archive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/test/xml_warchive.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/util/test.jam create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/BoostSerializationLibrary.sln create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/Library.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/LibraryW.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/Manual.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_auto_ptr.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_dll.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_exception.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_fast_archive.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_log.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_pimpl.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_polymorphic.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_portable_archive.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_shared_ptr.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_simple_log.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_trivial_archive.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_xml.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_xml_load.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/demo_xml_save.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/dll_a.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/dll_base.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/dll_derived2.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/fix_six.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/polymorphic_derived2.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/readme.txt create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_array.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_binary.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_bitset.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_check.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_class_info_load.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_class_info_save.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_codecvt_null.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_complex.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_const.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_const_fail.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_const_pass.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_contained_class.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_cyclic_ptrs.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_delete_pointer.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_deque.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_derived.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_derived_class.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_derived_class_ptr.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_diamond.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_diamond_complex.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_dll_exported.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_dll_plugin.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_dll_simple.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_exported.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_inclusion.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_iterators.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_iterators_base64.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_list.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_list_ptrs.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_map.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_mi.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_mult_archive_types.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_multiple_inheritance.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_multiple_ptrs.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_new_operator.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_no_rtti.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_non_default_ctor.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_non_default_ctor2.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_non_intrusive.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_not_serializable.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_null_ptr.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_nvp.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_object.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_optional.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_polymorphic.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_polymorphic2.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_primitive.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_private_base.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_private_ctor.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_recursion.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_recusion.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_registered.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_reset_object_addr.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_set.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_shared_ptr.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_shared_ptr_132.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_shared_ptr_multi_base.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_simple_class.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_simple_class_ptr.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_singleton.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_smart_cast.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_split.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_static_warning.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_strong_typedef.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_tracking.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_traits_fail.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_traits_pass.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_unregistered.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_utf8_codecvt.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_valarray.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_variant.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_vector.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/serialization/vc7ide/test_void_cast.vcproj create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/build/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/acknowledgements.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/barrier.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/changes.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/condition_variables.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/future_ref.qbk create mode 100755 deal.II/contrib/boost-1.45.0/libs/thread/doc/futures.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/index.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/mutex_concepts.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/mutexes.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/once.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/overview.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/shared_mutex_ref.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/thread.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/thread_ref.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/time.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/doc/tss.qbk create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/condition.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/monitor.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/mutex.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/once.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/recursive_mutex.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/starvephil.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/tennis.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/thread.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/thread_group.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/tss.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/example/xtime.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/index.html create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/src/pthread/once.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/src/pthread/thread.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/src/pthread/timeconv.inl create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/src/tss_null.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/src/win32/thread.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/src/win32/timeconv.inl create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/src/win32/tss_dll.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/src/win32/tss_pe.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/Carbon.r create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/Jamfile.v2 create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/condition_test_common.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/no_implicit_assign_from_lvalue_thread.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/no_implicit_move_from_lvalue_thread.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/shared_mutex_locking_thread.hpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test.mcp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_barrier.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_condition.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_condition_notify_all.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_condition_notify_one.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_condition_timed_wait_times_out.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_futures.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_generic_locks.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_hardware_concurrency.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_lock_concept.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_move_function.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_mutex.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_once.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_shared_mutex.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_shared_mutex_part_2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_shared_mutex_timed_locks.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_thread.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_thread_exit.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_thread_id.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_thread_launching.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_thread_mf.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_thread_move.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_thread_move_return.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_thread_return_local.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_tss.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/test_xtime.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/test/util.inl create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/bounded_buffer.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/counter.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/factorial.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/factorial2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/factorial3.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/helloworld.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/helloworld2.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/helloworld3.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/helloworld4.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/once.cpp create mode 100644 deal.II/contrib/boost-1.45.0/libs/thread/tutorial/tss.cpp diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/minmax.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/minmax.hpp new file mode 100644 index 0000000000..053a7d60ae --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/minmax.hpp @@ -0,0 +1,47 @@ +// (C) Copyright Herve Bronnimann 2004. +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +/* + Revision history: + 1 July 2004 + Split the code into two headers to lessen dependence on + Boost.tuple. (Herve) + 26 June 2004 + Added the code for the boost minmax library. (Herve) +*/ + +#ifndef BOOST_ALGORITHM_MINMAX_HPP +#define BOOST_ALGORITHM_MINMAX_HPP + +/* PROPOSED STANDARD EXTENSIONS: + * + * minmax(a, b) + * Effect: (b // for using pairs with boost::cref +#include + +namespace boost { + + template + tuple< T const&, T const& > + minmax(T const& a, T const& b) { + return (b + tuple< T const&, T const& > + minmax(T const& a, T const& b, BinaryPredicate comp) { + return comp(b,a) ? make_tuple(cref(b),cref(a)) : make_tuple(cref(a),cref(b)); + } + +} // namespace boost + +#endif // BOOST_ALGORITHM_MINMAX_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/minmax_element.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/minmax_element.hpp new file mode 100644 index 0000000000..0d2efd8cd8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/minmax_element.hpp @@ -0,0 +1,551 @@ +// (C) Copyright Herve Bronnimann 2004. +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +/* + Revision history: + 1 July 2004 + Split the code into two headers to lessen dependence on + Boost.tuple. (Herve) + 26 June 2004 + Added the code for the boost minmax library. (Herve) +*/ + +#ifndef BOOST_ALGORITHM_MINMAX_ELEMENT_HPP +#define BOOST_ALGORITHM_MINMAX_ELEMENT_HPP + +/* PROPOSED STANDARD EXTENSIONS: + * + * minmax_element(first, last) + * Effect: std::make_pair( std::min_element(first, last), + * std::max_element(first, last) ); + * + * minmax_element(first, last, comp) + * Effect: std::make_pair( std::min_element(first, last, comp), + * std::max_element(first, last, comp) ); + */ + +#include // for std::pair and std::make_pair + +namespace boost { + + namespace detail { // for obtaining a uniform version of minmax_element + // that compiles with VC++ 6.0 -- avoid the iterator_traits by + // having comparison object over iterator, not over dereferenced value + + template + struct less_over_iter { + bool operator()(Iterator const& it1, + Iterator const& it2) const { return *it1 < *it2; } + }; + + template + struct binary_pred_over_iter { + explicit binary_pred_over_iter(BinaryPredicate const& p ) : m_p( p ) {} + bool operator()(Iterator const& it1, + Iterator const& it2) const { return m_p(*it1, *it2); } + private: + BinaryPredicate m_p; + }; + + // common base for the two minmax_element overloads + + template + std::pair + basic_minmax_element(ForwardIter first, ForwardIter last, Compare comp) + { + if (first == last) + return std::make_pair(last,last); + + ForwardIter min_result = first; + ForwardIter max_result = first; + + // if only one element + ForwardIter second = first; ++second; + if (second == last) + return std::make_pair(min_result, max_result); + + // treat first pair separately (only one comparison for first two elements) + ForwardIter potential_min_result = last; + if (comp(first, second)) + max_result = second; + else { + min_result = second; + potential_min_result = first; + } + + // then each element by pairs, with at most 3 comparisons per pair + first = ++second; if (first != last) ++second; + while (second != last) { + if (comp(first, second)) { + if (comp(first, min_result)) { + min_result = first; + potential_min_result = last; + } + if (comp(max_result, second)) + max_result = second; + } else { + if (comp(second, min_result)) { + min_result = second; + potential_min_result = first; + } + if (comp(max_result, first)) + max_result = first; + } + first = ++second; + if (first != last) ++second; + } + + // if odd number of elements, treat last element + if (first != last) { // odd number of elements + if (comp(first, min_result)) + min_result = first, potential_min_result = last; + else if (comp(max_result, first)) + max_result = first; + } + + // resolve min_result being incorrect with one extra comparison + // (in which case potential_min_result is necessarily the correct result) + if (potential_min_result != last + && !comp(min_result, potential_min_result)) + min_result = potential_min_result; + + return std::make_pair(min_result,max_result); + } + + } // namespace detail + + template + std::pair + minmax_element(ForwardIter first, ForwardIter last) + { + return detail::basic_minmax_element(first, last, + detail::less_over_iter() ); + } + + template + std::pair + minmax_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) + { + return detail::basic_minmax_element(first, last, + detail::binary_pred_over_iter(comp) ); + } + +} + +/* PROPOSED BOOST EXTENSIONS + * In the description below, [rfirst,rlast) denotes the reversed range + * of [first,last). Even though the iterator type of first and last may + * be only a Forward Iterator, it is possible to explain the semantics + * by assuming that it is a Bidirectional Iterator. In the sequel, + * reverse(ForwardIterator&) returns the reverse_iterator adaptor. + * This is not how the functions would be implemented! + * + * first_min_element(first, last) + * Effect: std::min_element(first, last); + * + * first_min_element(first, last, comp) + * Effect: std::min_element(first, last, comp); + * + * last_min_element(first, last) + * Effect: reverse( std::min_element(reverse(last), reverse(first)) ); + * + * last_min_element(first, last, comp) + * Effect: reverse( std::min_element(reverse(last), reverse(first), comp) ); + * + * first_max_element(first, last) + * Effect: std::max_element(first, last); + * + * first_max_element(first, last, comp) + * Effect: max_element(first, last); + * + * last_max_element(first, last) + * Effect: reverse( std::max_element(reverse(last), reverse(first)) ); + * + * last_max_element(first, last, comp) + * Effect: reverse( std::max_element(reverse(last), reverse(first), comp) ); + * + * first_min_first_max_element(first, last) + * Effect: std::make_pair( first_min_element(first, last), + * first_max_element(first, last) ); + * + * first_min_first_max_element(first, last, comp) + * Effect: std::make_pair( first_min_element(first, last, comp), + * first_max_element(first, last, comp) ); + * + * first_min_last_max_element(first, last) + * Effect: std::make_pair( first_min_element(first, last), + * last_max_element(first, last) ); + * + * first_min_last_max_element(first, last, comp) + * Effect: std::make_pair( first_min_element(first, last, comp), + * last_max_element(first, last, comp) ); + * + * last_min_first_max_element(first, last) + * Effect: std::make_pair( last_min_element(first, last), + * first_max_element(first, last) ); + * + * last_min_first_max_element(first, last, comp) + * Effect: std::make_pair( last_min_element(first, last, comp), + * first_max_element(first, last, comp) ); + * + * last_min_last_max_element(first, last) + * Effect: std::make_pair( last_min_element(first, last), + * last_max_element(first, last) ); + * + * last_min_last_max_element(first, last, comp) + * Effect: std::make_pair( last_min_element(first, last, comp), + * last_max_element(first, last, comp) ); + */ + +namespace boost { + + // Min_element and max_element variants + + namespace detail { // common base for the overloads + + template + ForwardIter + basic_first_min_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + if (first == last) return last; + ForwardIter min_result = first; + while (++first != last) + if (comp(first, min_result)) + min_result = first; + return min_result; + } + + template + ForwardIter + basic_last_min_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + if (first == last) return last; + ForwardIter min_result = first; + while (++first != last) + if (!comp(min_result, first)) + min_result = first; + return min_result; + } + + template + ForwardIter + basic_first_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + if (first == last) return last; + ForwardIter max_result = first; + while (++first != last) + if (comp(max_result, first)) + max_result = first; + return max_result; + } + + template + ForwardIter + basic_last_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + if (first == last) return last; + ForwardIter max_result = first; + while (++first != last) + if (!comp(first, max_result)) + max_result = first; + return max_result; + } + + } // namespace detail + + template + ForwardIter + first_min_element(ForwardIter first, ForwardIter last) + { + return detail::basic_first_min_element(first, last, + detail::less_over_iter() ); + } + + template + ForwardIter + first_min_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) + { + return detail::basic_first_min_element(first, last, + detail::binary_pred_over_iter(comp) ); + } + + template + ForwardIter + last_min_element(ForwardIter first, ForwardIter last) + { + return detail::basic_last_min_element(first, last, + detail::less_over_iter() ); + } + + template + ForwardIter + last_min_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) + { + return detail::basic_last_min_element(first, last, + detail::binary_pred_over_iter(comp) ); + } + + template + ForwardIter + first_max_element(ForwardIter first, ForwardIter last) + { + return detail::basic_first_max_element(first, last, + detail::less_over_iter() ); + } + + template + ForwardIter + first_max_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) + { + return detail::basic_first_max_element(first, last, + detail::binary_pred_over_iter(comp) ); + } + + template + ForwardIter + last_max_element(ForwardIter first, ForwardIter last) + { + return detail::basic_last_max_element(first, last, + detail::less_over_iter() ); + } + + template + ForwardIter + last_max_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) + { + return detail::basic_last_max_element(first, last, + detail::binary_pred_over_iter(comp) ); + } + + + // Minmax_element variants -- comments removed + + namespace detail { + + template + std::pair + basic_first_min_last_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + if (first == last) + return std::make_pair(last,last); + + ForwardIter min_result = first; + ForwardIter max_result = first; + + ForwardIter second = ++first; + if (second == last) + return std::make_pair(min_result, max_result); + + if (comp(second, min_result)) + min_result = second; + else + max_result = second; + + first = ++second; if (first != last) ++second; + while (second != last) { + if (!comp(second, first)) { + if (comp(first, min_result)) + min_result = first; + if (!comp(second, max_result)) + max_result = second; + } else { + if (comp(second, min_result)) + min_result = second; + if (!comp(first, max_result)) + max_result = first; + } + first = ++second; if (first != last) ++second; + } + + if (first != last) { + if (comp(first, min_result)) + min_result = first; + else if (!comp(first, max_result)) + max_result = first; + } + + return std::make_pair(min_result, max_result); + } + + template + std::pair + basic_last_min_first_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + if (first == last) return std::make_pair(last,last); + + ForwardIter min_result = first; + ForwardIter max_result = first; + + ForwardIter second = ++first; + if (second == last) + return std::make_pair(min_result, max_result); + + if (comp(max_result, second)) + max_result = second; + else + min_result = second; + + first = ++second; if (first != last) ++second; + while (second != last) { + if (comp(first, second)) { + if (!comp(min_result, first)) + min_result = first; + if (comp(max_result, second)) + max_result = second; + } else { + if (!comp(min_result, second)) + min_result = second; + if (comp(max_result, first)) + max_result = first; + } + first = ++second; if (first != last) ++second; + } + + if (first != last) { + if (!comp(min_result, first)) + min_result = first; + else if (comp(max_result, first)) + max_result = first; + } + + return std::make_pair(min_result, max_result); + } + + template + std::pair + basic_last_min_last_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + if (first == last) return std::make_pair(last,last); + + ForwardIter min_result = first; + ForwardIter max_result = first; + + ForwardIter second = first; ++second; + if (second == last) + return std::make_pair(min_result,max_result); + + ForwardIter potential_max_result = last; + if (comp(first, second)) + max_result = second; + else { + min_result = second; + potential_max_result = second; + } + + first = ++second; if (first != last) ++second; + while (second != last) { + if (comp(first, second)) { + if (!comp(min_result, first)) + min_result = first; + if (!comp(second, max_result)) { + max_result = second; + potential_max_result = last; + } + } else { + if (!comp(min_result, second)) + min_result = second; + if (!comp(first, max_result)) { + max_result = first; + potential_max_result = second; + } + } + first = ++second; + if (first != last) ++second; + } + + if (first != last) { + if (!comp(min_result, first)) + min_result = first; + if (!comp(first, max_result)) { + max_result = first; + potential_max_result = last; + } + } + + if (potential_max_result != last + && !comp(potential_max_result, max_result)) + max_result = potential_max_result; + + return std::make_pair(min_result,max_result); + } + + } // namespace detail + + template + inline std::pair + first_min_first_max_element(ForwardIter first, ForwardIter last) + { + return minmax_element(first, last); + } + + template + inline std::pair + first_min_first_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + return minmax_element(first, last, comp); + } + + template + std::pair + first_min_last_max_element(ForwardIter first, ForwardIter last) + { + return detail::basic_first_min_last_max_element(first, last, + detail::less_over_iter() ); + } + + template + inline std::pair + first_min_last_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + return detail::basic_first_min_last_max_element(first, last, + detail::binary_pred_over_iter(comp) ); + } + + template + std::pair + last_min_first_max_element(ForwardIter first, ForwardIter last) + { + return detail::basic_last_min_first_max_element(first, last, + detail::less_over_iter() ); + } + + template + inline std::pair + last_min_first_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + return detail::basic_last_min_first_max_element(first, last, + detail::binary_pred_over_iter(comp) ); + } + + template + std::pair + last_min_last_max_element(ForwardIter first, ForwardIter last) + { + return detail::basic_last_min_last_max_element(first, last, + detail::less_over_iter() ); + } + + template + inline std::pair + last_min_last_max_element(ForwardIter first, ForwardIter last, + BinaryPredicate comp) + { + return detail::basic_last_min_last_max_element(first, last, + detail::binary_pred_over_iter(comp) ); + } + +} // namespace boost + +#endif // BOOST_ALGORITHM_MINMAX_ELEMENT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string.hpp new file mode 100644 index 0000000000..0771517396 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string.hpp @@ -0,0 +1,31 @@ +// Boost string_algo library string_algo.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2004. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_ALGO_HPP +#define BOOST_STRING_ALGO_HPP + +/*! \file + Cumulative include for string_algo library +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#endif // BOOST_STRING_ALGO_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/case_conv.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/case_conv.hpp new file mode 100644 index 0000000000..683340b8ec --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/case_conv.hpp @@ -0,0 +1,176 @@ +// Boost string_algo library case_conv.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CASE_CONV_HPP +#define BOOST_STRING_CASE_CONV_HPP + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/*! \file + Defines sequence case-conversion algorithms. + Algorithms convert each element in the input sequence to the + desired case using provided locales. +*/ + +namespace boost { + namespace algorithm { + +// to_lower -----------------------------------------------// + + //! Convert to lower case + /*! + Each element of the input sequence is converted to lower + case. The result is a copy of the input converted to lower case. + It is returned as a sequence or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param Loc A locale used for conversion + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + + */ + template + inline OutputIteratorT + to_lower_copy( + OutputIteratorT Output, + const RangeT& Input, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::detail::transform_range_copy( + Output, + ::boost::as_literal(Input), + ::boost::algorithm::detail::to_lowerF< + typename range_value::type >(Loc)); + } + + //! Convert to lower case + /*! + \overload + */ + template + inline SequenceT to_lower_copy( + const SequenceT& Input, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::detail::transform_range_copy( + Input, + ::boost::algorithm::detail::to_lowerF< + typename range_value::type >(Loc)); + } + + //! Convert to lower case + /*! + Each element of the input sequence is converted to lower + case. The input sequence is modified in-place. + + \param Input A range + \param Loc a locale used for conversion + */ + template + inline void to_lower( + WritableRangeT& Input, + const std::locale& Loc=std::locale()) + { + ::boost::algorithm::detail::transform_range( + ::boost::as_literal(Input), + ::boost::algorithm::detail::to_lowerF< + typename range_value::type >(Loc)); + } + +// to_upper -----------------------------------------------// + + //! Convert to upper case + /*! + Each element of the input sequence is converted to upper + case. The result is a copy of the input converted to upper case. + It is returned as a sequence or copied to the output iterator + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param Loc A locale used for conversion + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT + to_upper_copy( + OutputIteratorT Output, + const RangeT& Input, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::detail::transform_range_copy( + Output, + ::boost::as_literal(Input), + ::boost::algorithm::detail::to_upperF< + typename range_value::type >(Loc)); + } + + //! Convert to upper case + /*! + \overload + */ + template + inline SequenceT to_upper_copy( + const SequenceT& Input, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::detail::transform_range_copy( + Input, + ::boost::algorithm::detail::to_upperF< + typename range_value::type >(Loc)); + } + + //! Convert to upper case + /*! + Each element of the input sequence is converted to upper + case. The input sequence is modified in-place. + + \param Input An input range + \param Loc a locale used for conversion + */ + template + inline void to_upper( + WritableRangeT& Input, + const std::locale& Loc=std::locale()) + { + ::boost::algorithm::detail::transform_range( + ::boost::as_literal(Input), + ::boost::algorithm::detail::to_upperF< + typename range_value::type >(Loc)); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::to_lower; + using algorithm::to_lower_copy; + using algorithm::to_upper; + using algorithm::to_upper_copy; + +} // namespace boost + +#endif // BOOST_STRING_CASE_CONV_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/classification.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/classification.hpp new file mode 100644 index 0000000000..ca43602d47 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/classification.hpp @@ -0,0 +1,312 @@ +// Boost string_algo library classification.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CLASSIFICATION_HPP +#define BOOST_STRING_CLASSIFICATION_HPP + +#include +#include +#include +#include +#include +#include + + +/*! \file + Classification predicates are included in the library to give + some more convenience when using algorithms like \c trim() and \c all(). + They wrap functionality of STL classification functions ( e.g. \c std::isspace() ) + into generic functors. +*/ + +namespace boost { + namespace algorithm { + +// classification functor generator -------------------------------------// + + //! is_classified predicate + /*! + Construct the \c is_classified predicate. This predicate holds if the input is + of specified \c std::ctype category. + + \param Type A \c std::ctype category + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_classified(std::ctype_base::mask Type, const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(Type, Loc); + } + + //! is_space predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::space category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_space(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::space, Loc); + } + + //! is_alnum predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::alnum category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_alnum(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::alnum, Loc); + } + + //! is_alpha predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::alpha category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_alpha(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::alpha, Loc); + } + + //! is_cntrl predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::cntrl category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_cntrl(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::cntrl, Loc); + } + + //! is_digit predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::digit category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_digit(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::digit, Loc); + } + + //! is_graph predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::graph category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_graph(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::graph, Loc); + } + + //! is_lower predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::lower category. + + \param Loc A locale used for classification + \return An instance of \c is_classified predicate + */ + inline detail::is_classifiedF + is_lower(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::lower, Loc); + } + + //! is_print predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::print category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_print(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::print, Loc); + } + + //! is_punct predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::punct category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_punct(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::punct, Loc); + } + + //! is_upper predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::upper category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_upper(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::upper, Loc); + } + + //! is_xdigit predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::xdigit category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + */ + inline detail::is_classifiedF + is_xdigit(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::xdigit, Loc); + } + + //! is_any_of predicate + /*! + Construct the \c is_any_of predicate. The predicate holds if the input + is included in the specified set of characters. + + \param Set A set of characters to be recognized + \return An instance of the \c is_any_of predicate + */ + template + inline detail::is_any_ofF< + BOOST_STRING_TYPENAME range_value::type> + is_any_of( const RangeT& Set ) + { + iterator_range::type> lit_set(boost::as_literal(Set)); + return detail::is_any_ofF::type>(lit_set); + } + + //! is_from_range predicate + /*! + Construct the \c is_from_range predicate. The predicate holds if the input + is included in the specified range. (i.e. From <= Ch <= To ) + + \param From The start of the range + \param To The end of the range + \return An instance of the \c is_from_range predicate + */ + template + inline detail::is_from_rangeF is_from_range(CharT From, CharT To) + { + return detail::is_from_rangeF(From,To); + } + + // predicate combinators ---------------------------------------------------// + + //! predicate 'and' composition predicate + /*! + Construct the \c class_and predicate. This predicate can be used + to logically combine two classification predicates. \c class_and holds, + if both predicates return true. + + \param Pred1 The first predicate + \param Pred2 The second predicate + \return An instance of the \c class_and predicate + */ + template + inline detail::pred_andF + operator&&( + const predicate_facade& Pred1, + const predicate_facade& Pred2 ) + { + // Doing the static_cast with the pointer instead of the reference + // is a workaround for some compilers which have problems with + // static_cast's of template references, i.e. CW8. /grafik/ + return detail::pred_andF( + *static_cast(&Pred1), + *static_cast(&Pred2) ); + } + + //! predicate 'or' composition predicate + /*! + Construct the \c class_or predicate. This predicate can be used + to logically combine two classification predicates. \c class_or holds, + if one of the predicates return true. + + \param Pred1 The first predicate + \param Pred2 The second predicate + \return An instance of the \c class_or predicate + */ + template + inline detail::pred_orF + operator||( + const predicate_facade& Pred1, + const predicate_facade& Pred2 ) + { + // Doing the static_cast with the pointer instead of the reference + // is a workaround for some compilers which have problems with + // static_cast's of template references, i.e. CW8. /grafik/ + return detail::pred_orF( + *static_cast(&Pred1), + *static_cast(&Pred2)); + } + + //! predicate negation operator + /*! + Construct the \c class_not predicate. This predicate represents a negation. + \c class_or holds if of the predicates return false. + + \param Pred The predicate to be negated + \return An instance of the \c class_not predicate + */ + template + inline detail::pred_notF + operator!( const predicate_facade& Pred ) + { + // Doing the static_cast with the pointer instead of the reference + // is a workaround for some compilers which have problems with + // static_cast's of template references, i.e. CW8. /grafik/ + return detail::pred_notF(*static_cast(&Pred)); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::is_classified; + using algorithm::is_space; + using algorithm::is_alnum; + using algorithm::is_alpha; + using algorithm::is_cntrl; + using algorithm::is_digit; + using algorithm::is_graph; + using algorithm::is_lower; + using algorithm::is_upper; + using algorithm::is_print; + using algorithm::is_punct; + using algorithm::is_xdigit; + using algorithm::is_any_of; + using algorithm::is_from_range; + +} // namespace boost + +#endif // BOOST_STRING_PREDICATE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/compare.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/compare.hpp new file mode 100644 index 0000000000..734303a9a9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/compare.hpp @@ -0,0 +1,199 @@ +// Boost string_algo library compare.hpp header file -------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_COMPARE_HPP +#define BOOST_STRING_COMPARE_HPP + +#include +#include + +/*! \file + Defines element comparison predicates. Many algorithms in this library can + take an additional argument with a predicate used to compare elements. + This makes it possible, for instance, to have case insensitive versions + of the algorithms. +*/ + +namespace boost { + namespace algorithm { + + // is_equal functor -----------------------------------------------// + + //! is_equal functor + /*! + Standard STL equal_to only handle comparison between arguments + of the same type. This is a less restrictive version which wraps operator ==. + */ + struct is_equal + { + //! Function operator + /*! + Compare two operands for equality + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + return Arg1==Arg2; + } + }; + + //! case insensitive version of is_equal + /*! + Case insensitive comparison predicate. Comparison is done using + specified locales. + */ + struct is_iequal + { + //! Constructor + /*! + \param Loc locales used for comparison + */ + is_iequal( const std::locale& Loc=std::locale() ) : + m_Loc( Loc ) {} + + //! Function operator + /*! + Compare two operands. Case is ignored. + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper(Arg1)==std::toupper(Arg2); + #else + return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc); + #endif + } + + private: + std::locale m_Loc; + }; + + // is_less functor -----------------------------------------------// + + //! is_less functor + /*! + Convenient version of standard std::less. Operation is templated, therefore it is + not required to specify the exact types upon the construction + */ + struct is_less + { + //! Functor operation + /*! + Compare two operands using > operator + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + return Arg1 + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper(Arg1)(Arg1,m_Loc)(Arg2,m_Loc); + #endif + } + + private: + std::locale m_Loc; + }; + + // is_not_greater functor -----------------------------------------------// + + //! is_not_greater functor + /*! + Convenient version of standard std::not_greater_to. Operation is templated, therefore it is + not required to specify the exact types upon the construction + */ + struct is_not_greater + { + //! Functor operation + /*! + Compare two operands using > operator + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + return Arg1<=Arg2; + } + }; + + + //! case insensitive version of is_not_greater + /*! + Case insensitive comparison predicate. Comparison is done using + specified locales. + */ + struct is_not_igreater + { + //! Constructor + /*! + \param Loc locales used for comparison + */ + is_not_igreater( const std::locale& Loc=std::locale() ) : + m_Loc( Loc ) {} + + //! Function operator + /*! + Compare two operands. Case is ignored. + */ + template< typename T1, typename T2 > + bool operator()( const T1& Arg1, const T2& Arg2 ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper(Arg1)<=std::toupper(Arg2); + #else + return std::toupper(Arg1,m_Loc)<=std::toupper(Arg2,m_Loc); + #endif + } + + private: + std::locale m_Loc; + }; + + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::is_equal; + using algorithm::is_iequal; + using algorithm::is_less; + using algorithm::is_iless; + using algorithm::is_not_greater; + using algorithm::is_not_igreater; + +} // namespace boost + + +#endif // BOOST_STRING_COMPARE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/concept.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/concept.hpp new file mode 100644 index 0000000000..9876e98d50 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/concept.hpp @@ -0,0 +1,83 @@ +// Boost string_algo library concept.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CONCEPT_HPP +#define BOOST_STRING_CONCEPT_HPP + +#include +#include +#include +#include + +/*! \file + Defines concepts used in string_algo library +*/ + +namespace boost { + namespace algorithm { + + //! Finder concept + /*! + Defines the Finder concept. Finder is a functor which selects + an arbitrary part of a string. Search is performed on + the range specified by starting and ending iterators. + + Result of the find operation must be convertible to iterator_range. + */ + template + struct FinderConcept + { + private: + typedef iterator_range range; + public: + void constraints() + { + // Operation + r=(*pF)(i,i); + } + private: + range r; + IteratorT i; + FinderT* pF; + }; // Finder_concept + + + //! Formatter concept + /*! + Defines the Formatter concept. Formatter is a functor, which + takes a result from a finder operation and transforms it + in a specific way. + + Result must be a container supported by container_traits, + or a reference to it. + */ + template + struct FormatterConcept + { + public: + void constraints() + { + // Operation + ::boost::begin((*pFo)( (*pF)(i,i) )); + ::boost::end((*pFo)( (*pF)(i,i) )); + } + private: + IteratorT i; + FinderT* pF; + FormatterT *pFo; + }; // FormatterConcept; + + } // namespace algorithm +} // namespace boost + + + + +#endif // BOOST_STRING_CONCEPT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/config.hpp new file mode 100644 index 0000000000..559750ac8a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/config.hpp @@ -0,0 +1,28 @@ +// Boost string_algo library config.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CONFIG_HPP +#define BOOST_STRING_CONFIG_HPP + +#include +#include + +#ifdef BOOST_STRING_DEDUCED_TYPENAME +# error "macro already defined!" +#endif + +#define BOOST_STRING_TYPENAME BOOST_DEDUCED_TYPENAME + +// Metrowerks workaround +#if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x +#pragma parse_func_templ off +#endif + +#endif // BOOST_STRING_CONFIG_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/constants.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/constants.hpp new file mode 100644 index 0000000000..6ed70effca --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/constants.hpp @@ -0,0 +1,36 @@ +// Boost string_algo library constants.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CONSTANTS_HPP +#define BOOST_STRING_CONSTANTS_HPP + +namespace boost { + namespace algorithm { + + //! Token compression mode + /*! + Specifies token compression mode for the token_finder. + */ + enum token_compress_mode_type + { + token_compress_on, //!< Compress adjacent tokens + token_compress_off //!< Do not compress adjacent tokens + }; + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::token_compress_on; + using algorithm::token_compress_off; + +} // namespace boost + +#endif // BOOST_STRING_CONSTANTS_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/case_conv.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/case_conv.hpp new file mode 100644 index 0000000000..5b0064fd13 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/case_conv.hpp @@ -0,0 +1,121 @@ +// Boost string_algo library string_funct.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CASE_CONV_DETAIL_HPP +#define BOOST_STRING_CASE_CONV_DETAIL_HPP + +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// case conversion functors -----------------------------------------------// + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(push) +#pragma warning(disable:4512) //assignment operator could not be generated +#endif + + // a tolower functor + template + struct to_lowerF : public std::unary_function + { + // Constructor + to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {} + + // Operation + CharT operator ()( CharT Ch ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::tolower( Ch); + #else + return std::tolower( Ch, *m_Loc ); + #endif + } + private: + const std::locale* m_Loc; + }; + + // a toupper functor + template + struct to_upperF : public std::unary_function + { + // Constructor + to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {} + + // Operation + CharT operator ()( CharT Ch ) const + { + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper( Ch); + #else + return std::toupper( Ch, *m_Loc ); + #endif + } + private: + const std::locale* m_Loc; + }; + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(pop) +#endif + +// algorithm implementation ------------------------------------------------------------------------- + + // Transform a range + template + OutputIteratorT transform_range_copy( + OutputIteratorT Output, + const RangeT& Input, + FunctorT Functor) + { + return std::transform( + ::boost::begin(Input), + ::boost::end(Input), + Output, + Functor); + } + + // Transform a range (in-place) + template + void transform_range( + const RangeT& Input, + FunctorT Functor) + { + std::transform( + ::boost::begin(Input), + ::boost::end(Input), + ::boost::begin(Input), + Functor); + } + + template + inline SequenceT transform_range_copy( + const RangeT& Input, + FunctorT Functor) + { + return SequenceT( + ::boost::make_transform_iterator( + ::boost::begin(Input), + Functor), + ::boost::make_transform_iterator( + ::boost::end(Input), + Functor)); + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_CASE_CONV_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/classification.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/classification.hpp new file mode 100644 index 0000000000..fb4395573e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/classification.hpp @@ -0,0 +1,353 @@ +// Boost string_algo library classification.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_CLASSIFICATION_DETAIL_HPP +#define BOOST_STRING_CLASSIFICATION_DETAIL_HPP + +#include +#include +#include +#include + +#include +#include + +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// classification functors -----------------------------------------------// + + // is_classified functor + struct is_classifiedF : + public predicate_facade + { + // Boost.ResultOf support + typedef bool result_type; + + // Constructor from a locale + is_classifiedF(std::ctype_base::mask Type, std::locale const & Loc = std::locale()) : + m_Type(Type), m_Locale(Loc) {} + // Operation + template + bool operator()( CharT Ch ) const + { + return std::use_facet< std::ctype >(m_Locale).is( m_Type, Ch ); + } + + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x582) && !defined(_USE_OLD_RW_STL) + template<> + bool operator()( char const Ch ) const + { + return std::use_facet< std::ctype >(m_Locale).is( m_Type, Ch ); + } + #endif + + private: + std::ctype_base::mask m_Type; + std::locale m_Locale; + }; + + + // is_any_of functor + /* + returns true if the value is from the specified set + */ + template + struct is_any_ofF : + public predicate_facade > + { + private: + // set cannot operate on const value-type + typedef typename ::boost::remove_const::type set_value_type; + + public: + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + template + is_any_ofF( const RangeT& Range ) : m_Size(0) + { + // Prepare storage + m_Storage.m_dynSet=0; + + std::size_t Size=::boost::distance(Range); + m_Size=Size; + set_value_type* Storage=0; + + if(use_fixed_storage(m_Size)) + { + // Use fixed storage + Storage=&m_Storage.m_fixSet[0]; + } + else + { + // Use dynamic storage + m_Storage.m_dynSet=new set_value_type[m_Size]; + Storage=m_Storage.m_dynSet; + } + + // Use fixed storage + ::std::copy(::boost::begin(Range), ::boost::end(Range), Storage); + ::std::sort(Storage, Storage+m_Size); + } + + // Copy constructor + is_any_ofF(const is_any_ofF& Other) : m_Size(Other.m_Size) + { + // Prepare storage + m_Storage.m_dynSet=0; + const set_value_type* SrcStorage=0; + set_value_type* DestStorage=0; + + if(use_fixed_storage(m_Size)) + { + // Use fixed storage + DestStorage=&m_Storage.m_fixSet[0]; + SrcStorage=&Other.m_Storage.m_fixSet[0]; + } + else + { + // Use dynamic storage + m_Storage.m_dynSet=new set_value_type[m_Size]; + DestStorage=m_Storage.m_dynSet; + SrcStorage=Other.m_Storage.m_dynSet; + } + + // Use fixed storage + ::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size); + } + + // Destructor + ~is_any_ofF() + { + if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0) + { + delete [] m_Storage.m_dynSet; + } + } + + // Assignment + is_any_ofF& operator=(const is_any_ofF& Other) + { + // Handle self assignment + if(this==&Other) return *this; + + // Prepare storage + const set_value_type* SrcStorage; + set_value_type* DestStorage; + + if(use_fixed_storage(Other.m_Size)) + { + // Use fixed storage + DestStorage=&m_Storage.m_fixSet[0]; + SrcStorage=&Other.m_Storage.m_fixSet[0]; + + // Delete old storage if was present + if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0) + { + delete [] m_Storage.m_dynSet; + } + + // Set new size + m_Size=Other.m_Size; + } + else + { + // Other uses dynamic storage + SrcStorage=Other.m_Storage.m_dynSet; + + // Check what kind of storage are we using right now + if(use_fixed_storage(m_Size)) + { + // Using fixed storage, allocate new + set_value_type* pTemp=new set_value_type[Other.m_Size]; + DestStorage=pTemp; + m_Storage.m_dynSet=pTemp; + m_Size=Other.m_Size; + } + else + { + // Using dynamic storage, check if can reuse + if(m_Storage.m_dynSet!=0 && m_Size>=Other.m_Size && m_Size + bool operator()( Char2T Ch ) const + { + const set_value_type* Storage= + (use_fixed_storage(m_Size)) + ? &m_Storage.m_fixSet[0] + : m_Storage.m_dynSet; + + return ::std::binary_search(Storage, Storage+m_Size, Ch); + } + private: + // check if the size is eligible for fixed storage + static bool use_fixed_storage(std::size_t size) + { + return size<=sizeof(set_value_type*)*2; + } + + + private: + // storage + // The actual used storage is selected on the type + union + { + set_value_type* m_dynSet; + set_value_type m_fixSet[sizeof(set_value_type*)*2]; + } + m_Storage; + + // storage size + ::std::size_t m_Size; + }; + + // is_from_range functor + /* + returns true if the value is from the specified range. + (i.e. x>=From && x>=To) + */ + template + struct is_from_rangeF : + public predicate_facade< is_from_rangeF > + { + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + is_from_rangeF( CharT From, CharT To ) : m_From(From), m_To(To) {} + + // Operation + template + bool operator()( Char2T Ch ) const + { + return ( m_From <= Ch ) && ( Ch <= m_To ); + } + + private: + CharT m_From; + CharT m_To; + }; + + // class_and composition predicate + template + struct pred_andF : + public predicate_facade< pred_andF > + { + public: + + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + pred_andF( Pred1T Pred1, Pred2T Pred2 ) : + m_Pred1(Pred1), m_Pred2(Pred2) {} + + // Operation + template + bool operator()( CharT Ch ) const + { + return m_Pred1(Ch) && m_Pred2(Ch); + } + + private: + Pred1T m_Pred1; + Pred2T m_Pred2; + }; + + // class_or composition predicate + template + struct pred_orF : + public predicate_facade< pred_orF > + { + public: + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + pred_orF( Pred1T Pred1, Pred2T Pred2 ) : + m_Pred1(Pred1), m_Pred2(Pred2) {} + + // Operation + template + bool operator()( CharT Ch ) const + { + return m_Pred1(Ch) || m_Pred2(Ch); + } + + private: + Pred1T m_Pred1; + Pred2T m_Pred2; + }; + + // class_not composition predicate + template< typename PredT > + struct pred_notF : + public predicate_facade< pred_notF > + { + public: + // Boost.ResultOf support + typedef bool result_type; + + // Constructor + pred_notF( PredT Pred ) : m_Pred(Pred) {} + + // Operation + template + bool operator()( CharT Ch ) const + { + return !m_Pred(Ch); + } + + private: + PredT m_Pred; + }; + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_CLASSIFICATION_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format.hpp new file mode 100644 index 0000000000..7f5f780b63 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format.hpp @@ -0,0 +1,204 @@ +// Boost string_algo library find_format.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_FORMAT_DETAIL_HPP +#define BOOST_STRING_FIND_FORMAT_DETAIL_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// find_format_copy (iterator variant) implementation -------------------------------// + + template< + typename OutputIteratorT, + typename InputT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline OutputIteratorT find_format_copy_impl2( + OutputIteratorT Output, + const InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult ) + { + typedef find_format_store< + BOOST_STRING_TYPENAME + range_const_iterator::type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + if ( !M ) + { + // Match not found - return original sequence + Output = std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + return Output; + } + + // Copy the beginning of the sequence + Output = std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); + // Format find result + // Copy formated result + Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); + // Copy the rest of the sequence + Output = std::copy( M.end(), ::boost::end(Input), Output ); + + return Output; + } + + template< + typename OutputIteratorT, + typename InputT, + typename FormatterT, + typename FindResultT > + inline OutputIteratorT find_format_copy_impl( + OutputIteratorT Output, + const InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult ) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + return ::boost::algorithm::detail::find_format_copy_impl2( + Output, + Input, + Formatter, + FindResult, + Formatter(FindResult) ); + } else { + return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + } + } + + +// find_format_copy implementation --------------------------------------------------// + + template< + typename InputT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline InputT find_format_copy_impl2( + const InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult) + { + typedef find_format_store< + BOOST_STRING_TYPENAME + range_const_iterator::type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + if ( !M ) + { + // Match not found - return original sequence + return InputT( Input ); + } + + InputT Output; + // Copy the beginning of the sequence + insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() ); + // Copy formated result + insert( Output, ::boost::end(Output), M.format_result() ); + // Copy the rest of the sequence + insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) ); + + return Output; + } + + template< + typename InputT, + typename FormatterT, + typename FindResultT > + inline InputT find_format_copy_impl( + const InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + return ::boost::algorithm::detail::find_format_copy_impl2( + Input, + Formatter, + FindResult, + Formatter(FindResult) ); + } else { + return Input; + } + } + + // replace implementation ----------------------------------------------------// + + template< + typename InputT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline void find_format_impl2( + InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult) + { + typedef find_format_store< + BOOST_STRING_TYPENAME + range_iterator::type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + if ( !M ) + { + // Search not found - return original sequence + return; + } + + // Replace match + ::boost::algorithm::detail::replace( Input, M.begin(), M.end(), M.format_result() ); + } + + template< + typename InputT, + typename FormatterT, + typename FindResultT > + inline void find_format_impl( + InputT& Input, + FormatterT Formatter, + const FindResultT& FindResult) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + ::boost::algorithm::detail::find_format_impl2( + Input, + Formatter, + FindResult, + Formatter(FindResult) ); + } + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FIND_FORMAT_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format_all.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format_all.hpp new file mode 100644 index 0000000000..0f184a3186 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format_all.hpp @@ -0,0 +1,273 @@ +// Boost string_algo library find_format_all.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP +#define BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// find_format_all_copy (iterator variant) implementation ---------------------------// + + template< + typename OutputIteratorT, + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline OutputIteratorT find_format_all_copy_impl2( + OutputIteratorT Output, + const InputT& Input, + FinderT Finder, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult ) + { + typedef BOOST_STRING_TYPENAME + range_const_iterator::type input_iterator_type; + + typedef find_format_store< + input_iterator_type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + // Initialize last match + input_iterator_type LastMatch=::boost::begin(Input); + + // Iterate through all matches + while( M ) + { + // Copy the beginning of the sequence + Output = std::copy( LastMatch, M.begin(), Output ); + // Copy formated result + Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); + + // Proceed to the next match + LastMatch=M.end(); + M=Finder( LastMatch, ::boost::end(Input) ); + } + + // Copy the rest of the sequence + Output = std::copy( LastMatch, ::boost::end(Input), Output ); + + return Output; + } + + template< + typename OutputIteratorT, + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT > + inline OutputIteratorT find_format_all_copy_impl( + OutputIteratorT Output, + const InputT& Input, + FinderT Finder, + FormatterT Formatter, + const FindResultT& FindResult ) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + return ::boost::algorithm::detail::find_format_all_copy_impl2( + Output, + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); + } else { + return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); + } + } + + // find_format_all_copy implementation ----------------------------------------------// + + template< + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline InputT find_format_all_copy_impl2( + const InputT& Input, + FinderT Finder, + FormatterT Formatter, + const FindResultT& FindResult, + const FormatResultT& FormatResult) + { + typedef BOOST_STRING_TYPENAME + range_const_iterator::type input_iterator_type; + + typedef find_format_store< + input_iterator_type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + // Initialize last match + input_iterator_type LastMatch=::boost::begin(Input); + + // Output temporary + InputT Output; + + // Iterate through all matches + while( M ) + { + // Copy the beginning of the sequence + insert( Output, ::boost::end(Output), LastMatch, M.begin() ); + // Copy formated result + insert( Output, ::boost::end(Output), M.format_result() ); + + // Proceed to the next match + LastMatch=M.end(); + M=Finder( LastMatch, ::boost::end(Input) ); + } + + // Copy the rest of the sequence + ::boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, ::boost::end(Input) ); + + return Output; + } + + template< + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT > + inline InputT find_format_all_copy_impl( + const InputT& Input, + FinderT Finder, + FormatterT Formatter, + const FindResultT& FindResult) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + return ::boost::algorithm::detail::find_format_all_copy_impl2( + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); + } else { + return Input; + } + } + + // find_format_all implementation ------------------------------------------------// + + template< + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT, + typename FormatResultT > + inline void find_format_all_impl2( + InputT& Input, + FinderT Finder, + FormatterT Formatter, + FindResultT FindResult, + FormatResultT FormatResult) + { + typedef BOOST_STRING_TYPENAME + range_iterator::type input_iterator_type; + typedef find_format_store< + input_iterator_type, + FormatterT, + FormatResultT > store_type; + + // Create store for the find result + store_type M( FindResult, FormatResult, Formatter ); + + // Instantiate replacement storage + std::deque< + BOOST_STRING_TYPENAME range_value::type> Storage; + + // Initialize replacement iterators + input_iterator_type InsertIt=::boost::begin(Input); + input_iterator_type SearchIt=::boost::begin(Input); + + while( M ) + { + // process the segment + InsertIt=process_segment( + Storage, + Input, + InsertIt, + SearchIt, + M.begin() ); + + // Adjust search iterator + SearchIt=M.end(); + + // Copy formated replace to the storage + ::boost::algorithm::detail::copy_to_storage( Storage, M.format_result() ); + + // Find range for a next match + M=Finder( SearchIt, ::boost::end(Input) ); + } + + // process the last segment + InsertIt=::boost::algorithm::detail::process_segment( + Storage, + Input, + InsertIt, + SearchIt, + ::boost::end(Input) ); + + if ( Storage.empty() ) + { + // Truncate input + ::boost::algorithm::detail::erase( Input, InsertIt, ::boost::end(Input) ); + } + else + { + // Copy remaining data to the end of input + ::boost::algorithm::detail::insert( Input, ::boost::end(Input), Storage.begin(), Storage.end() ); + } + } + + template< + typename InputT, + typename FinderT, + typename FormatterT, + typename FindResultT > + inline void find_format_all_impl( + InputT& Input, + FinderT Finder, + FormatterT Formatter, + FindResultT FindResult) + { + if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { + ::boost::algorithm::detail::find_format_all_impl2( + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); + } + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format_store.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format_store.hpp new file mode 100644 index 0000000000..4872c5a998 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_format_store.hpp @@ -0,0 +1,89 @@ +// Boost string_algo library find_format_store.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP +#define BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP + +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// temporary format and find result storage --------------------------------// + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(push) +#pragma warning(disable:4512) //assignment operator could not be generated +#endif + template< + typename ForwardIteratorT, + typename FormatterT, + typename FormatResultT > + class find_format_store : + public iterator_range + { + public: + // typedefs + typedef iterator_range base_type; + typedef FormatterT formatter_type; + typedef FormatResultT format_result_type; + + public: + // Construction + find_format_store( + const base_type& FindResult, + const format_result_type& FormatResult, + const formatter_type& Formatter ) : + base_type(FindResult), + m_FormatResult(FormatResult), + m_Formatter(Formatter) {} + + // Assignment + template< typename FindResultT > + find_format_store& operator=( FindResultT FindResult ) + { + iterator_range::operator=(FindResult); + if( !this->empty() ) { + m_FormatResult=m_Formatter(FindResult); + } + + return *this; + } + + // Retrieve format result + const format_result_type& format_result() + { + return m_FormatResult; + } + + private: + format_result_type m_FormatResult; + const formatter_type& m_Formatter; + }; + + template + bool check_find_result(InputT&, FindResultT& FindResult) + { + typedef BOOST_STRING_TYPENAME + range_const_iterator::type input_iterator_type; + iterator_range ResultRange(FindResult); + return !ResultRange.empty(); + } + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(pop) +#endif + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_iterator.hpp new file mode 100644 index 0000000000..c76993a114 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/find_iterator.hpp @@ -0,0 +1,87 @@ +// Boost string_algo library find_iterator.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_ITERATOR_DETAIL_HPP +#define BOOST_STRING_FIND_ITERATOR_DETAIL_HPP + +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// find_iterator base -----------------------------------------------// + + // Find iterator base + template + class find_iterator_base + { + protected: + // typedefs + typedef IteratorT input_iterator_type; + typedef iterator_range match_type; + typedef function2< + match_type, + input_iterator_type, + input_iterator_type> finder_type; + + protected: + // Protected construction/destruction + + // Default constructor + find_iterator_base() {}; + // Copy construction + find_iterator_base( const find_iterator_base& Other ) : + m_Finder(Other.m_Finder) {} + + // Constructor + template + find_iterator_base( FinderT Finder, int ) : + m_Finder(Finder) {} + + // Destructor + ~find_iterator_base() {} + + // Find operation + match_type do_find( + input_iterator_type Begin, + input_iterator_type End ) const + { + if (!m_Finder.empty()) + { + return m_Finder(Begin,End); + } + else + { + return match_type(End,End); + } + } + + // Check + bool is_null() const + { + return m_Finder.empty(); + } + + private: + // Finder + finder_type m_Finder; + }; + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_FIND_ITERATOR_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/finder.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/finder.hpp new file mode 100644 index 0000000000..45bcb7d3d6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/finder.hpp @@ -0,0 +1,646 @@ +// Boost string_algo library finder.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FINDER_DETAIL_HPP +#define BOOST_STRING_FINDER_DETAIL_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + + +// find first functor -----------------------------------------------// + + // find a subsequence in the sequence ( functor ) + /* + Returns a pair marking the subsequence in the sequence. + If the find fails, functor returns + */ + template + struct first_finderF + { + typedef SearchIteratorT search_iterator_type; + + // Construction + template< typename SearchT > + first_finderF( const SearchT& Search, PredicateT Comp ) : + m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} + first_finderF( + search_iterator_type SearchBegin, + search_iterator_type SearchEnd, + PredicateT Comp ) : + m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + typedef iterator_range result_type; + typedef ForwardIteratorT input_iterator_type; + + // Outer loop + for(input_iterator_type OuterIt=Begin; + OuterIt!=End; + ++OuterIt) + { + // Sanity check + if( boost::empty(m_Search) ) + return result_type( End, End ); + + input_iterator_type InnerIt=OuterIt; + search_iterator_type SubstrIt=m_Search.begin(); + for(; + InnerIt!=End && SubstrIt!=m_Search.end(); + ++InnerIt,++SubstrIt) + { + if( !( m_Comp(*InnerIt,*SubstrIt) ) ) + break; + } + + // Substring matching succeeded + if ( SubstrIt==m_Search.end() ) + return result_type( OuterIt, InnerIt ); + } + + return result_type( End, End ); + } + + private: + iterator_range m_Search; + PredicateT m_Comp; + }; + +// find last functor -----------------------------------------------// + + // find the last match a subseqeunce in the sequence ( functor ) + /* + Returns a pair marking the subsequence in the sequence. + If the find fails, returns + */ + template + struct last_finderF + { + typedef SearchIteratorT search_iterator_type; + typedef first_finderF< + search_iterator_type, + PredicateT> first_finder_type; + + // Construction + template< typename SearchT > + last_finderF( const SearchT& Search, PredicateT Comp ) : + m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} + last_finderF( + search_iterator_type SearchBegin, + search_iterator_type SearchEnd, + PredicateT Comp ) : + m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + typedef iterator_range result_type; + + if( boost::empty(m_Search) ) + return result_type( End, End ); + + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return findit( Begin, End, category() ); + } + + private: + // forward iterator + template< typename ForwardIteratorT > + iterator_range + findit( + ForwardIteratorT Begin, + ForwardIteratorT End, + std::forward_iterator_tag ) const + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + first_finder_type first_finder( + m_Search.begin(), m_Search.end(), m_Comp ); + + result_type M=first_finder( Begin, End ); + result_type Last=M; + + while( M ) + { + Last=M; + M=first_finder( ::boost::end(M), End ); + } + + return Last; + } + + // bidirectional iterator + template< typename ForwardIteratorT > + iterator_range + findit( + ForwardIteratorT Begin, + ForwardIteratorT End, + std::bidirectional_iterator_tag ) const + { + typedef iterator_range result_type; + typedef ForwardIteratorT input_iterator_type; + + // Outer loop + for(input_iterator_type OuterIt=End; + OuterIt!=Begin; ) + { + input_iterator_type OuterIt2=--OuterIt; + + input_iterator_type InnerIt=OuterIt2; + search_iterator_type SubstrIt=m_Search.begin(); + for(; + InnerIt!=End && SubstrIt!=m_Search.end(); + ++InnerIt,++SubstrIt) + { + if( !( m_Comp(*InnerIt,*SubstrIt) ) ) + break; + } + + // Substring matching succeeded + if( SubstrIt==m_Search.end() ) + return result_type( OuterIt2, InnerIt ); + } + + return result_type( End, End ); + } + + private: + iterator_range m_Search; + PredicateT m_Comp; + }; + +// find n-th functor -----------------------------------------------// + + // find the n-th match of a subsequence in the sequence ( functor ) + /* + Returns a pair marking the subsequence in the sequence. + If the find fails, returns + */ + template + struct nth_finderF + { + typedef SearchIteratorT search_iterator_type; + typedef first_finderF< + search_iterator_type, + PredicateT> first_finder_type; + typedef last_finderF< + search_iterator_type, + PredicateT> last_finder_type; + + // Construction + template< typename SearchT > + nth_finderF( + const SearchT& Search, + int Nth, + PredicateT Comp) : + m_Search(::boost::begin(Search), ::boost::end(Search)), + m_Nth(Nth), + m_Comp(Comp) {} + nth_finderF( + search_iterator_type SearchBegin, + search_iterator_type SearchEnd, + int Nth, + PredicateT Comp) : + m_Search(SearchBegin, SearchEnd), + m_Nth(Nth), + m_Comp(Comp) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + if(m_Nth>=0) + { + return find_forward(Begin, End, m_Nth); + } + else + { + return find_backward(Begin, End, -m_Nth); + } + + } + + private: + // Implementation helpers + template< typename ForwardIteratorT > + iterator_range + find_forward( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N) const + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + // Sanity check + if( boost::empty(m_Search) ) + return result_type( End, End ); + + // Instantiate find functor + first_finder_type first_finder( + m_Search.begin(), m_Search.end(), m_Comp ); + + result_type M( Begin, Begin ); + + for( unsigned int n=0; n<=N; ++n ) + { + // find next match + M=first_finder( ::boost::end(M), End ); + + if ( !M ) + { + // Subsequence not found, return + return M; + } + } + + return M; + } + + template< typename ForwardIteratorT > + iterator_range + find_backward( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N) const + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + // Sanity check + if( boost::empty(m_Search) ) + return result_type( End, End ); + + // Instantiate find functor + last_finder_type last_finder( + m_Search.begin(), m_Search.end(), m_Comp ); + + result_type M( End, End ); + + for( unsigned int n=1; n<=N; ++n ) + { + // find next match + M=last_finder( Begin, ::boost::begin(M) ); + + if ( !M ) + { + // Subsequence not found, return + return M; + } + } + + return M; + } + + + private: + iterator_range m_Search; + int m_Nth; + PredicateT m_Comp; + }; + +// find head/tail implementation helpers ---------------------------// + + template + iterator_range + find_head_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::forward_iterator_tag ) + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + input_iterator_type It=Begin; + for( + unsigned int Index=0; + Index + iterator_range + find_head_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::random_access_iterator_tag ) + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + if ( (End<=Begin) || ( static_cast(End-Begin) < N ) ) + return result_type( Begin, End ); + + return result_type(Begin,Begin+N); + } + + // Find head implementation + template + iterator_range + find_head_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N ) + { + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() ); + } + + template< typename ForwardIteratorT > + iterator_range + find_tail_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::forward_iterator_tag ) + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + unsigned int Index=0; + input_iterator_type It=Begin; + input_iterator_type It2=Begin; + + // Advance It2 by N increments + for( Index=0; Index + iterator_range + find_tail_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::bidirectional_iterator_tag ) + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + input_iterator_type It=End; + for( + unsigned int Index=0; + Index + iterator_range + find_tail_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N, + std::random_access_iterator_tag ) + { + typedef ForwardIteratorT input_iterator_type; + typedef iterator_range result_type; + + if ( (End<=Begin) || ( static_cast(End-Begin) < N ) ) + return result_type( Begin, End ); + + return result_type( End-N, End ); + } + + // Operation + template< typename ForwardIteratorT > + iterator_range + find_tail_impl( + ForwardIteratorT Begin, + ForwardIteratorT End, + unsigned int N ) + { + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() ); + } + + + +// find head functor -----------------------------------------------// + + + // find a head in the sequence ( functor ) + /* + This functor find a head of the specified range. For + a specified N, the head is a subsequence of N starting + elements of the range. + */ + struct head_finderF + { + // Construction + head_finderF( int N ) : m_N(N) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + if(m_N>=0) + { + return ::boost::algorithm::detail::find_head_impl( Begin, End, m_N ); + } + else + { + iterator_range Res= + ::boost::algorithm::detail::find_tail_impl( Begin, End, -m_N ); + + return ::boost::make_iterator_range(Begin, Res.begin()); + } + } + + private: + int m_N; + }; + +// find tail functor -----------------------------------------------// + + + // find a tail in the sequence ( functor ) + /* + This functor find a tail of the specified range. For + a specified N, the head is a subsequence of N starting + elements of the range. + */ + struct tail_finderF + { + // Construction + tail_finderF( int N ) : m_N(N) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + if(m_N>=0) + { + return ::boost::algorithm::detail::find_tail_impl( Begin, End, m_N ); + } + else + { + iterator_range Res= + ::boost::algorithm::detail::find_head_impl( Begin, End, -m_N ); + + return ::boost::make_iterator_range(Res.end(), End); + } + } + + private: + int m_N; + }; + +// find token functor -----------------------------------------------// + + // find a token in a sequence ( functor ) + /* + This find functor finds a token specified be a predicate + in a sequence. It is equivalent of std::find algorithm, + with an exception that it return range instead of a single + iterator. + + If bCompress is set to true, adjacent matching tokens are + concatenated into one match. + */ + template< typename PredicateT > + struct token_finderF + { + // Construction + token_finderF( + PredicateT Pred, + token_compress_mode_type eCompress=token_compress_off ) : + m_Pred(Pred), m_eCompress(eCompress) {} + + // Operation + template< typename ForwardIteratorT > + iterator_range + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + typedef iterator_range result_type; + + ForwardIteratorT It=std::find_if( Begin, End, m_Pred ); + + if( It==End ) + { + return result_type( End, End ); + } + else + { + ForwardIteratorT It2=It; + + if( m_eCompress==token_compress_on ) + { + // Find first non-matching character + while( It2!=End && m_Pred(*It2) ) ++It2; + } + else + { + // Advance by one position + ++It2; + } + + return result_type( It, It2 ); + } + } + + private: + PredicateT m_Pred; + token_compress_mode_type m_eCompress; + }; + +// find range functor -----------------------------------------------// + + // find a range in the sequence ( functor ) + /* + This functor actually does not perform any find operation. + It always returns given iterator range as a result. + */ + template + struct range_finderF + { + typedef ForwardIterator1T input_iterator_type; + typedef iterator_range result_type; + + // Construction + range_finderF( + input_iterator_type Begin, + input_iterator_type End ) : m_Range(Begin, End) {} + + range_finderF(const iterator_range& Range) : + m_Range(Range) {} + + // Operation + template< typename ForwardIterator2T > + iterator_range + operator()( + ForwardIterator2T, + ForwardIterator2T ) const + { +#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) + return iterator_range(this->m_Range); +#elif BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + return iterator_range(m_Range.begin(), m_Range.end()); +#else + return m_Range; +#endif + } + + private: + iterator_range m_Range; + }; + + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FINDER_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/finder_regex.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/finder_regex.hpp new file mode 100644 index 0000000000..673d93a538 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/finder_regex.hpp @@ -0,0 +1,122 @@ +// Boost string_algo library find_regex.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FINDER_REGEX_DETAIL_HPP +#define BOOST_STRING_FINDER_REGEX_DETAIL_HPP + +#include +#include + +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// regex find functor -----------------------------------------------// + + // regex search result + template + struct regex_search_result : + public iterator_range + { + typedef regex_search_result type; + typedef iterator_range base_type; + typedef BOOST_STRING_TYPENAME base_type::value_type value_type; + typedef BOOST_STRING_TYPENAME base_type::difference_type difference_type; + typedef BOOST_STRING_TYPENAME base_type::const_iterator const_iterator; + typedef BOOST_STRING_TYPENAME base_type::iterator iterator; + typedef boost::match_results match_results_type; + + // Construction + + // Construction from the match result + regex_search_result( const match_results_type& MatchResults ) : + base_type( MatchResults[0].first, MatchResults[0].second ), + m_MatchResults( MatchResults ) {} + + // Construction of empty match. End iterator has to be specified + regex_search_result( IteratorT End ) : + base_type( End, End ) {} + + regex_search_result( const regex_search_result& Other ) : + base_type( Other.begin(), Other.end() ), + m_MatchResults( Other.m_MatchResults ) {} + + // Assignment + regex_search_result& operator=( const regex_search_result& Other ) + { + base_type::operator=( Other ); + m_MatchResults=Other.m_MatchResults; + return *this; + } + + // Match result retrival + const match_results_type& match_results() const + { + return m_MatchResults; + } + + private: + // Saved matchresult + match_results_type m_MatchResults; + }; + + // find_regex + /* + Regex based search functor + */ + template + struct find_regexF + { + typedef RegExT regex_type; + typedef const RegExT& regex_reference_type; + + // Construction + find_regexF( regex_reference_type Rx, match_flag_type MatchFlags = match_default ) : + m_Rx(Rx), m_MatchFlags(MatchFlags) {} + + // Operation + template< typename ForwardIteratorT > + regex_search_result + operator()( + ForwardIteratorT Begin, + ForwardIteratorT End ) const + { + typedef ForwardIteratorT input_iterator_type; + typedef regex_search_result result_type; + + // instantiate match result + match_results result; + // search for a match + if ( ::boost::regex_search( Begin, End, result, m_Rx, m_MatchFlags ) ) + { + // construct a result + return result_type( result ); + } + else + { + // empty result + return result_type( End ); + } + } + + private: + regex_reference_type m_Rx; // Regexp + match_flag_type m_MatchFlags; // match flags + }; + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FIND_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/formatter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/formatter.hpp new file mode 100644 index 0000000000..bd6a780297 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/formatter.hpp @@ -0,0 +1,94 @@ +// Boost string_algo library formatter.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FORMATTER_DETAIL_HPP +#define BOOST_STRING_FORMATTER_DETAIL_HPP + + +#include +#include +#include +#include + +#include + +// generic replace functors -----------------------------------------------// + +namespace boost { + namespace algorithm { + namespace detail { + +// const format functor ----------------------------------------------------// + + // constant format functor + template + struct const_formatF + { + private: + typedef BOOST_STRING_TYPENAME + range_const_iterator::type format_iterator; + typedef iterator_range result_type; + + public: + // Construction + const_formatF(const RangeT& Format) : + m_Format(::boost::begin(Format), ::boost::end(Format)) {} + + // Operation +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + template + result_type& operator()(const Range2T&) + { + return m_Format; + } +#endif + + template + const result_type& operator()(const Range2T&) const + { + return m_Format; + } + + private: + result_type m_Format; + }; + +// identity format functor ----------------------------------------------------// + + // identity format functor + template + struct identity_formatF + { + // Operation + template< typename Range2T > + const RangeT& operator()(const Range2T& Replace) const + { + return RangeT(::boost::begin(Replace), ::boost::end(Replace)); + } + }; + +// empty format functor ( used by erase ) ------------------------------------// + + // empty format functor + template< typename CharT > + struct empty_formatF + { + template< typename ReplaceT > + empty_container operator()(const ReplaceT&) const + { + return empty_container(); + } + }; + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FORMATTER_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/formatter_regex.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/formatter_regex.hpp new file mode 100644 index 0000000000..5f26407bed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/formatter_regex.hpp @@ -0,0 +1,61 @@ +// Boost string_algo library formatter_regex.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FORMATTER_REGEX_DETAIL_HPP +#define BOOST_STRING_FORMATTER_REGEX_DETAIL_HPP + +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// regex format functor -----------------------------------------// + + // regex format functor + template + struct regex_formatF + { + private: + typedef StringT result_type; + typedef BOOST_STRING_TYPENAME StringT::value_type char_type; + + public: + // Construction + regex_formatF( const StringT& Fmt, match_flag_type Flags=format_default ) : + m_Fmt(Fmt), m_Flags( Flags ) {} + + template + result_type operator()( + const regex_search_result& Replace ) const + { + if ( Replace.empty() ) + { + return result_type(); + } + else + { + return Replace.match_results().format( m_Fmt, m_Flags ); + } + } + private: + const StringT& m_Fmt; + match_flag_type m_Flags; + }; + + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_FORMATTER_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/predicate.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/predicate.hpp new file mode 100644 index 0000000000..5acf3cc663 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/predicate.hpp @@ -0,0 +1,77 @@ +// Boost string_algo library predicate.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_PREDICATE_DETAIL_HPP +#define BOOST_STRING_PREDICATE_DETAIL_HPP + +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// ends_with predicate implementation ----------------------------------// + + template< + typename ForwardIterator1T, + typename ForwardIterator2T, + typename PredicateT> + inline bool ends_with_iter_select( + ForwardIterator1T Begin, + ForwardIterator1T End, + ForwardIterator2T SubBegin, + ForwardIterator2T SubEnd, + PredicateT Comp, + std::bidirectional_iterator_tag) + { + ForwardIterator1T it=End; + ForwardIterator2T pit=SubEnd; + for(;it!=Begin && pit!=SubBegin;) + { + if( !(Comp(*(--it),*(--pit))) ) + return false; + } + + return pit==SubBegin; + } + + template< + typename ForwardIterator1T, + typename ForwardIterator2T, + typename PredicateT> + inline bool ends_with_iter_select( + ForwardIterator1T Begin, + ForwardIterator1T End, + ForwardIterator2T SubBegin, + ForwardIterator2T SubEnd, + PredicateT Comp, + std::forward_iterator_tag) + { + if ( SubBegin==SubEnd ) + { + // empty subsequence check + return true; + } + + iterator_range Result + =last_finder( + ::boost::make_iterator_range(SubBegin, SubEnd), + Comp)(Begin, End); + + return !Result.empty() && Result.end()==End; + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_PREDICATE_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/replace_storage.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/replace_storage.hpp new file mode 100644 index 0000000000..db35e4c53b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/replace_storage.hpp @@ -0,0 +1,159 @@ +// Boost string_algo library replace_storage.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP +#define BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP + +#include +#include +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// storage handling routines -----------------------------------------------// + + template< typename StorageT, typename OutputIteratorT > + inline OutputIteratorT move_from_storage( + StorageT& Storage, + OutputIteratorT DestBegin, + OutputIteratorT DestEnd ) + { + OutputIteratorT OutputIt=DestBegin; + + while( !Storage.empty() && OutputIt!=DestEnd ) + { + *OutputIt=Storage.front(); + Storage.pop_front(); + ++OutputIt; + } + + return OutputIt; + } + + template< typename StorageT, typename WhatT > + inline void copy_to_storage( + StorageT& Storage, + const WhatT& What ) + { + Storage.insert( Storage.end(), ::boost::begin(What), ::boost::end(What) ); + } + + +// process segment routine -----------------------------------------------// + + template< bool HasStableIterators > + struct process_segment_helper + { + // Optimized version of process_segment for generic sequence + template< + typename StorageT, + typename InputT, + typename ForwardIteratorT > + ForwardIteratorT operator()( + StorageT& Storage, + InputT& /*Input*/, + ForwardIteratorT InsertIt, + ForwardIteratorT SegmentBegin, + ForwardIteratorT SegmentEnd ) + { + // Copy data from the storage until the beginning of the segment + ForwardIteratorT It=::boost::algorithm::detail::move_from_storage( Storage, InsertIt, SegmentBegin ); + + // 3 cases are possible : + // a) Storage is empty, It==SegmentBegin + // b) Storage is empty, It!=SegmentBegin + // c) Storage is not empty + + if( Storage.empty() ) + { + if( It==SegmentBegin ) + { + // Case a) everything is grand, just return end of segment + return SegmentEnd; + } + else + { + // Case b) move the segment backwards + return std::copy( SegmentBegin, SegmentEnd, It ); + } + } + else + { + // Case c) -> shift the segment to the left and keep the overlap in the storage + while( It!=SegmentEnd ) + { + // Store value into storage + Storage.push_back( *It ); + // Get the top from the storage and put it here + *It=Storage.front(); + Storage.pop_front(); + + // Advance + ++It; + } + + return It; + } + } + }; + + template<> + struct process_segment_helper< true > + { + // Optimized version of process_segment for list-like sequence + template< + typename StorageT, + typename InputT, + typename ForwardIteratorT > + ForwardIteratorT operator()( + StorageT& Storage, + InputT& Input, + ForwardIteratorT InsertIt, + ForwardIteratorT SegmentBegin, + ForwardIteratorT SegmentEnd ) + + { + // Call replace to do the job + ::boost::algorithm::detail::replace( Input, InsertIt, SegmentBegin, Storage ); + // Empty the storage + Storage.clear(); + // Iterators were not changed, simply return the end of segment + return SegmentEnd; + } + }; + + // Process one segment in the replace_all algorithm + template< + typename StorageT, + typename InputT, + typename ForwardIteratorT > + inline ForwardIteratorT process_segment( + StorageT& Storage, + InputT& Input, + ForwardIteratorT InsertIt, + ForwardIteratorT SegmentBegin, + ForwardIteratorT SegmentEnd ) + { + return + process_segment_helper< + has_stable_iterators::value>()( + Storage, Input, InsertIt, SegmentBegin, SegmentEnd ); + } + + + } // namespace detail + } // namespace algorithm +} // namespace boost + +#endif // BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/sequence.hpp new file mode 100644 index 0000000000..dc47409115 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/sequence.hpp @@ -0,0 +1,200 @@ +// Boost string_algo library sequence.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_DETAIL_SEQUENCE_HPP +#define BOOST_STRING_DETAIL_SEQUENCE_HPP + +#include +#include +#include +#include +#include + +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// insert helpers -------------------------------------------------// + + template< typename InputT, typename ForwardIteratorT > + inline void insert( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator At, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + Input.insert( At, Begin, End ); + } + + template< typename InputT, typename InsertT > + inline void insert( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator At, + const InsertT& Insert ) + { + ::boost::algorithm::detail::insert( Input, At, ::boost::begin(Insert), ::boost::end(Insert) ); + } + +// erase helper ---------------------------------------------------// + + // Erase a range in the sequence + /* + Returns the iterator pointing just after the erase subrange + */ + template< typename InputT > + inline typename InputT::iterator erase( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To ) + { + return Input.erase( From, To ); + } + +// replace helper implementation ----------------------------------// + + // Optimized version of replace for generic sequence containers + // Assumption: insert and erase are expensive + template< bool HasConstTimeOperations > + struct replace_const_time_helper + { + template< typename InputT, typename ForwardIteratorT > + void operator()( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + // Copy data to the container ( as much as possible ) + ForwardIteratorT InsertIt=Begin; + BOOST_STRING_TYPENAME InputT::iterator InputIt=From; + for(; InsertIt!=End && InputIt!=To; InsertIt++, InputIt++ ) + { + *InputIt=*InsertIt; + } + + if ( InsertIt!=End ) + { + // Replace sequence is longer, insert it + Input.insert( InputIt, InsertIt, End ); + } + else + { + if ( InputIt!=To ) + { + // Replace sequence is shorter, erase the rest + Input.erase( InputIt, To ); + } + } + } + }; + + template<> + struct replace_const_time_helper< true > + { + // Const-time erase and insert methods -> use them + template< typename InputT, typename ForwardIteratorT > + void operator()( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + BOOST_STRING_TYPENAME InputT::iterator At=Input.erase( From, To ); + if ( Begin!=End ) + { + if(!Input.empty()) + { + Input.insert( At, Begin, End ); + } + else + { + Input.insert( Input.begin(), Begin, End ); + } + } + } + }; + + // No native replace method + template< bool HasNative > + struct replace_native_helper + { + template< typename InputT, typename ForwardIteratorT > + void operator()( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + replace_const_time_helper< + boost::mpl::and_< + has_const_time_insert, + has_const_time_erase >::value >()( + Input, From, To, Begin, End ); + } + }; + + // Container has native replace method + template<> + struct replace_native_helper< true > + { + template< typename InputT, typename ForwardIteratorT > + void operator()( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + Input.replace( From, To, Begin, End ); + } + }; + +// replace helper -------------------------------------------------// + + template< typename InputT, typename ForwardIteratorT > + inline void replace( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + replace_native_helper< has_native_replace::value >()( + Input, From, To, Begin, End ); + } + + template< typename InputT, typename InsertT > + inline void replace( + InputT& Input, + BOOST_STRING_TYPENAME InputT::iterator From, + BOOST_STRING_TYPENAME InputT::iterator To, + const InsertT& Insert ) + { + if(From!=To) + { + ::boost::algorithm::detail::replace( Input, From, To, ::boost::begin(Insert), ::boost::end(Insert) ); + } + else + { + ::boost::algorithm::detail::insert( Input, From, ::boost::begin(Insert), ::boost::end(Insert) ); + } + } + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_DETAIL_SEQUENCE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/trim.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/trim.hpp new file mode 100644 index 0000000000..1233e49d30 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/trim.hpp @@ -0,0 +1,95 @@ +// Boost string_algo library trim.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_TRIM_DETAIL_HPP +#define BOOST_STRING_TRIM_DETAIL_HPP + +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// trim iterator helper -----------------------------------------------// + + template< typename ForwardIteratorT, typename PredicateT > + inline ForwardIteratorT trim_end_iter_select( + ForwardIteratorT InBegin, + ForwardIteratorT InEnd, + PredicateT IsSpace, + std::forward_iterator_tag ) + { + ForwardIteratorT TrimIt=InBegin; + + for( ForwardIteratorT It=InBegin; It!=InEnd; ++It ) + { + if ( !IsSpace(*It) ) + { + TrimIt=It; + ++TrimIt; + } + } + + return TrimIt; + } + + template< typename ForwardIteratorT, typename PredicateT > + inline ForwardIteratorT trim_end_iter_select( + ForwardIteratorT InBegin, + ForwardIteratorT InEnd, + PredicateT IsSpace, + std::bidirectional_iterator_tag ) + { + for( ForwardIteratorT It=InEnd; It!=InBegin; ) + { + if ( !IsSpace(*(--It)) ) + return ++It; + } + + return InBegin; + } + // Search for first non matching character from the beginning of the sequence + template< typename ForwardIteratorT, typename PredicateT > + inline ForwardIteratorT trim_begin( + ForwardIteratorT InBegin, + ForwardIteratorT InEnd, + PredicateT IsSpace ) + { + ForwardIteratorT It=InBegin; + for(; It!=InEnd; ++It ) + { + if (!IsSpace(*It)) + return It; + } + + return It; + } + + // Search for first non matching character from the end of the sequence + template< typename ForwardIteratorT, typename PredicateT > + inline ForwardIteratorT trim_end( + ForwardIteratorT InBegin, + ForwardIteratorT InEnd, + PredicateT IsSpace ) + { + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return ::boost::algorithm::detail::trim_end_iter_select( InBegin, InEnd, IsSpace, category() ); + } + + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_TRIM_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/util.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/util.hpp new file mode 100644 index 0000000000..7e8471f711 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/detail/util.hpp @@ -0,0 +1,106 @@ +// Boost string_algo library util.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_UTIL_DETAIL_HPP +#define BOOST_STRING_UTIL_DETAIL_HPP + +#include +#include +#include + +namespace boost { + namespace algorithm { + namespace detail { + +// empty container -----------------------------------------------// + + // empty_container + /* + This class represents always empty container, + containing elements of type CharT. + + It is supposed to be used in a const version only + */ + template< typename CharT > + struct empty_container + { + typedef empty_container type; + typedef CharT value_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef const value_type& reference; + typedef const value_type& const_reference; + typedef const value_type* iterator; + typedef const value_type* const_iterator; + + + // Operations + const_iterator begin() const + { + return reinterpret_cast(0); + } + + const_iterator end() const + { + return reinterpret_cast(0); + } + + bool empty() const + { + return false; + } + + size_type size() const + { + return 0; + } + }; + +// bounded copy algorithm -----------------------------------------------// + + // Bounded version of the std::copy algorithm + template + inline OutputIteratorT bounded_copy( + InputIteratorT First, + InputIteratorT Last, + OutputIteratorT DestFirst, + OutputIteratorT DestLast ) + { + InputIteratorT InputIt=First; + OutputIteratorT OutputIt=DestFirst; + for(; InputIt!=Last && OutputIt!=DestLast; InputIt++, OutputIt++ ) + { + *OutputIt=*InputIt; + } + + return OutputIt; + } + +// iterator range utilities -----------------------------------------// + + // copy range functor + template< + typename SeqT, + typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator > + struct copy_iterator_rangeF : + public std::unary_function< iterator_range, SeqT > + { + SeqT operator()( const iterator_range& Range ) const + { + return copy_range(Range); + } + }; + + } // namespace detail + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_UTIL_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/erase.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/erase.hpp new file mode 100644 index 0000000000..e738b86fa2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/erase.hpp @@ -0,0 +1,844 @@ +// Boost string_algo library erase.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_ERASE_HPP +#define BOOST_STRING_ERASE_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines various erase algorithms. Each algorithm removes + part(s) of the input according to a searching criteria. +*/ + +namespace boost { + namespace algorithm { + +// erase_range -------------------------------------------------------// + + //! Erase range algorithm + /*! + Remove the given range from the input. The result is a modified copy of + the input. It is returned as a sequence or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input sequence + \param SearchRange A range in the input to be removed + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT erase_range_copy( + OutputIteratorT Output, + const RangeT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_const_iterator::type>& SearchRange ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase range algorithm + /*! + \overload + */ + template + inline SequenceT erase_range_copy( + const SequenceT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_const_iterator::type>& SearchRange ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase range algorithm + /*! + Remove the given range from the input. + The input sequence is modified in-place. + + \param Input An input sequence + \param SearchRange A range in the input to be removed + */ + template + inline void erase_range( + SequenceT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_iterator::type>& SearchRange ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_first --------------------------------------------------------// + + //! Erase first algorithm + /*! + Remove the first occurrence of the substring from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT erase_first_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase first algorithm + /*! + \overload + */ + template + inline SequenceT erase_first_copy( + const SequenceT& Input, + const RangeT& Search ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase first algorithm + /*! + Remove the first occurrence of the substring from the input. + The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for. + */ + template + inline void erase_first( + SequenceT& Input, + const RangeT& Search ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_first ( case insensitive ) ------------------------------------// + + //! Erase first algorithm ( case insensitive ) + /*! + Remove the first occurrence of the substring from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT ierase_first_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase first algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ierase_first_copy( + const SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase first algorithm ( case insensitive ) + /*! + Remove the first occurrence of the substring from the input. + The input sequence is modified in-place. Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + */ + template + inline void ierase_first( + SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_last --------------------------------------------------------// + + //! Erase last algorithm + /*! + Remove the last occurrence of the substring from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT erase_last_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase last algorithm + /*! + \overload + */ + template + inline SequenceT erase_last_copy( + const SequenceT& Input, + const RangeT& Search ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase last algorithm + /*! + Remove the last occurrence of the substring from the input. + The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + */ + template + inline void erase_last( + SequenceT& Input, + const RangeT& Search ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_last ( case insensitive ) ------------------------------------// + + //! Erase last algorithm ( case insensitive ) + /*! + Remove the last occurrence of the substring from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT ierase_last_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase last algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ierase_last_copy( + const SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase last algorithm ( case insensitive ) + /*! + Remove the last occurrence of the substring from the input. + The input sequence is modified in-place. Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + */ + template + inline void ierase_last( + SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_nth --------------------------------------------------------------------// + + //! Erase nth algorithm + /*! + Remove the Nth occurrence of the substring in the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT erase_nth_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + int Nth ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase nth algorithm + /*! + \overload + */ + template + inline SequenceT erase_nth_copy( + const SequenceT& Input, + const RangeT& Search, + int Nth ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase nth algorithm + /*! + Remove the Nth occurrence of the substring in the input. + The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for. + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + */ + template + inline void erase_nth( + SequenceT& Input, + const RangeT& Search, + int Nth ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_nth ( case insensitive ) ---------------------------------------------// + + //! Erase nth algorithm ( case insensitive ) + /*! + Remove the Nth occurrence of the substring in the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for. + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT ierase_nth_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + int Nth, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase nth algorithm + /*! + \overload + */ + template + inline SequenceT ierase_nth_copy( + const SequenceT& Input, + const RangeT& Search, + int Nth, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + empty_formatter(Input) ); + } + + //! Erase nth algorithm + /*! + Remove the Nth occurrence of the substring in the input. + The input sequence is modified in-place. Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for. + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Loc A locale used for case insensitive comparison + */ + template + inline void ierase_nth( + SequenceT& Input, + const RangeT& Search, + int Nth, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + +// erase_all --------------------------------------------------------// + + //! Erase all algorithm + /*! + Remove all the occurrences of the string from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + + \param Output An output iterator to which the result will be copied + \param Input An input sequence + \param Search A substring to be searched for. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT erase_all_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase all algorithm + /*! + \overload + */ + template + inline SequenceT erase_all_copy( + const SequenceT& Input, + const RangeT& Search ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase all algorithm + /*! + Remove all the occurrences of the string from the input. + The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for. + */ + template + inline void erase_all( + SequenceT& Input, + const RangeT& Search ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_all ( case insensitive ) ------------------------------------// + + //! Erase all algorithm ( case insensitive ) + /*! + Remove all the occurrences of the string from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT ierase_all_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase all algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ierase_all_copy( + const SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + + //! Erase all algorithm ( case insensitive ) + /*! + Remove all the occurrences of the string from the input. + The input sequence is modified in-place. Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for. + \param Loc A locale used for case insensitive comparison + */ + template + inline void ierase_all( + SequenceT& Input, + const RangeT& Search, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::empty_formatter(Input) ); + } + +// erase_head --------------------------------------------------------------------// + + //! Erase head algorithm + /*! + Remove the head from the input. The head is a prefix of a sequence of given size. + If the sequence is shorter then required, the whole string is + considered to be the head. The result is a modified copy of the input. + It is returned as a sequence or copied to the output iterator. + + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param N Length of the head. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT> + inline OutputIteratorT erase_head_copy( + OutputIteratorT Output, + const RangeT& Input, + int N ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase head algorithm + /*! + \overload + */ + template + inline SequenceT erase_head_copy( + const SequenceT& Input, + int N ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase head algorithm + /*! + Remove the head from the input. The head is a prefix of a sequence of given size. + If the sequence is shorter then required, the whole string is + considered to be the head. The input sequence is modified in-place. + + \param Input An input string + \param N Length of the head + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + */ + template + inline void erase_head( + SequenceT& Input, + int N ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + +// erase_tail --------------------------------------------------------------------// + + //! Erase tail algorithm + /*! + Remove the tail from the input. The tail is a suffix of a sequence of given size. + If the sequence is shorter then required, the whole string is + considered to be the tail. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param N Length of the tail. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT> + inline OutputIteratorT erase_tail_copy( + OutputIteratorT Output, + const RangeT& Input, + int N ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase tail algorithm + /*! + \overload + */ + template + inline SequenceT erase_tail_copy( + const SequenceT& Input, + int N ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase tail algorithm + /*! + Remove the tail from the input. The tail is a suffix of a sequence of given size. + If the sequence is shorter then required, the whole string is + considered to be the tail. The input sequence is modified in-place. + + \param Input An input string + \param N Length of the tail + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + */ + template + inline void erase_tail( + SequenceT& Input, + int N ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::empty_formatter( Input ) ); + } + + } // namespace algorithm + + // pull names into the boost namespace + using algorithm::erase_range_copy; + using algorithm::erase_range; + using algorithm::erase_first_copy; + using algorithm::erase_first; + using algorithm::ierase_first_copy; + using algorithm::ierase_first; + using algorithm::erase_last_copy; + using algorithm::erase_last; + using algorithm::ierase_last_copy; + using algorithm::ierase_last; + using algorithm::erase_nth_copy; + using algorithm::erase_nth; + using algorithm::ierase_nth_copy; + using algorithm::ierase_nth; + using algorithm::erase_all_copy; + using algorithm::erase_all; + using algorithm::ierase_all_copy; + using algorithm::ierase_all; + using algorithm::erase_head_copy; + using algorithm::erase_head; + using algorithm::erase_tail_copy; + using algorithm::erase_tail; + +} // namespace boost + + +#endif // BOOST_ERASE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find.hpp new file mode 100644 index 0000000000..304646d090 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find.hpp @@ -0,0 +1,334 @@ +// Boost string_algo library find.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_HPP +#define BOOST_STRING_FIND_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines a set of find algorithms. The algorithms are searching + for a substring of the input. The result is given as an \c iterator_range + delimiting the substring. +*/ + +namespace boost { + namespace algorithm { + +// Generic find -----------------------------------------------// + + //! Generic find algorithm + /*! + Search the input using the given finder. + + \param Input A string which will be searched. + \param Finder Finder object used for searching. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find( + RangeT& Input, + const FinderT& Finder) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + + return Finder(::boost::begin(lit_input),::boost::end(lit_input)); + } + +// find_first -----------------------------------------------// + + //! Find first algorithm + /*! + Search for the first occurrence of the substring in the input. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_first( + Range1T& Input, + const Range2T& Search) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::first_finder(Search)); + } + + //! Find first algorithm ( case insensitive ) + /*! + Search for the first occurence of the substring in the input. + Searching is case insensitive. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \param Loc A locale used for case insensitive comparison + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + ifind_first( + Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::first_finder(Search,is_iequal(Loc))); + } + +// find_last -----------------------------------------------// + + //! Find last algorithm + /*! + Search for the last occurrence of the substring in the input. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_last( + Range1T& Input, + const Range2T& Search) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::last_finder(Search)); + } + + //! Find last algorithm ( case insensitive ) + /*! + Search for the last match a string in the input. + Searching is case insensitive. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \param Loc A locale used for case insensitive comparison + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + ifind_last( + Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc))); + } + +// find_nth ----------------------------------------------------------------------// + + //! Find n-th algorithm + /*! + Search for the n-th (zero-indexed) occurrence of the substring in the + input. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \param Nth An index (zero-indexed) of the match to be found. + For negative N, the matches are counted from the end of string. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_nth( + Range1T& Input, + const Range2T& Search, + int Nth) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::nth_finder(Search,Nth)); + } + + //! Find n-th algorithm ( case insensitive ). + /*! + Search for the n-th (zero-indexed) occurrence of the substring in the + input. Searching is case insensitive. + + \param Input A string which will be searched. + \param Search A substring to be searched for. + \param Nth An index (zero-indexed) of the match to be found. + For negative N, the matches are counted from the end of string. + \param Loc A locale used for case insensitive comparison + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + ifind_nth( + Range1T& Input, + const Range2T& Search, + int Nth, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::nth_finder(Search,Nth,is_iequal(Loc))); + } + +// find_head ----------------------------------------------------------------------// + + //! Find head algorithm + /*! + Get the head of the input. Head is a prefix of the string of the + given size. If the input is shorter then required, whole input if considered + to be the head. + + \param Input An input string + \param N Length of the head + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c Range1T::iterator or + \c Range1T::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_head( + RangeT& Input, + int N) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::head_finder(N)); + } + +// find_tail ----------------------------------------------------------------------// + + //! Find tail algorithm + /*! + Get the tail of the input. Tail is a suffix of the string of the + given size. If the input is shorter then required, whole input if considered + to be the tail. + + \param Input An input string + \param N Length of the tail. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_tail( + RangeT& Input, + int N) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::tail_finder(N)); + } + +// find_token --------------------------------------------------------------------// + + //! Find token algorithm + /*! + Look for a given token in the string. Token is a character that matches the + given predicate. + If the "token compress mode" is enabled, adjacent tokens are considered to be one match. + + \param Input A input string. + \param Pred An unary predicate to identify a token + \param eCompress Enable/Disable compressing of adjacent tokens + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type> + find_token( + RangeT& Input, + PredicateT Pred, + token_compress_mode_type eCompress=token_compress_off) + { + return ::boost::algorithm::find(Input, ::boost::algorithm::token_finder(Pred, eCompress)); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::find; + using algorithm::find_first; + using algorithm::ifind_first; + using algorithm::find_last; + using algorithm::ifind_last; + using algorithm::find_nth; + using algorithm::ifind_nth; + using algorithm::find_head; + using algorithm::find_tail; + using algorithm::find_token; + +} // namespace boost + + +#endif // BOOST_STRING_FIND_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find_format.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find_format.hpp new file mode 100644 index 0000000000..ef0373912a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find_format.hpp @@ -0,0 +1,287 @@ +// Boost string_algo library find_format.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_FORMAT_HPP +#define BOOST_STRING_FIND_FORMAT_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines generic replace algorithms. Each algorithm replaces + part(s) of the input. The part to be replaced is looked up using a Finder object. + Result of finding is then used by a Formatter object to generate the replacement. +*/ + +namespace boost { + namespace algorithm { + +// generic replace -----------------------------------------------------------------// + + //! Generic replace algorithm + /*! + Use the Finder to search for a substring. Use the Formatter to format + this substring and replace it in the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input sequence + \param Finder A Finder object used to search for a match to be replaced + \param Formatter A Formatter object used to format a match + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT, + typename FinderT, + typename FormatterT> + inline OutputIteratorT find_format_copy( + OutputIteratorT Output, + const RangeT& Input, + FinderT Finder, + FormatterT Formatter ) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + iterator_range::type> lit_input(::boost::as_literal(Input)); + + return detail::find_format_copy_impl( + Output, + lit_input, + Formatter, + Finder( ::boost::begin(lit_input), ::boost::end(lit_input) ) ); + } + + //! Generic replace algorithm + /*! + \overload + */ + template< + typename SequenceT, + typename FinderT, + typename FormatterT> + inline SequenceT find_format_copy( + const SequenceT& Input, + FinderT Finder, + FormatterT Formatter ) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + return detail::find_format_copy_impl( + Input, + Formatter, + Finder(::boost::begin(Input), ::boost::end(Input))); + } + + //! Generic replace algorithm + /*! + Use the Finder to search for a substring. Use the Formatter to format + this substring and replace it in the input. The input is modified in-place. + + \param Input An input sequence + \param Finder A Finder object used to search for a match to be replaced + \param Formatter A Formatter object used to format a match + */ + template< + typename SequenceT, + typename FinderT, + typename FormatterT> + inline void find_format( + SequenceT& Input, + FinderT Finder, + FormatterT Formatter) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + detail::find_format_impl( + Input, + Formatter, + Finder(::boost::begin(Input), ::boost::end(Input))); + } + + +// find_format_all generic ----------------------------------------------------------------// + + //! Generic replace all algorithm + /*! + Use the Finder to search for a substring. Use the Formatter to format + this substring and replace it in the input. Repeat this for all matching + substrings. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input sequence + \param Finder A Finder object used to search for a match to be replaced + \param Formatter A Formatter object used to format a match + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT, + typename FinderT, + typename FormatterT> + inline OutputIteratorT find_format_all_copy( + OutputIteratorT Output, + const RangeT& Input, + FinderT Finder, + FormatterT Formatter) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + iterator_range::type> lit_input(::boost::as_literal(Input)); + + return detail::find_format_all_copy_impl( + Output, + lit_input, + Finder, + Formatter, + Finder(::boost::begin(lit_input), ::boost::end(lit_input))); + } + + //! Generic replace all algorithm + /*! + \overload + */ + template< + typename SequenceT, + typename FinderT, + typename FormatterT > + inline SequenceT find_format_all_copy( + const SequenceT& Input, + FinderT Finder, + FormatterT Formatter ) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + return detail::find_format_all_copy_impl( + Input, + Finder, + Formatter, + Finder( ::boost::begin(Input), ::boost::end(Input) ) ); + } + + //! Generic replace all algorithm + /*! + Use the Finder to search for a substring. Use the Formatter to format + this substring and replace it in the input. Repeat this for all matching + substrings.The input is modified in-place. + + \param Input An input sequence + \param Finder A Finder object used to search for a match to be replaced + \param Formatter A Formatter object used to format a match + */ + template< + typename SequenceT, + typename FinderT, + typename FormatterT > + inline void find_format_all( + SequenceT& Input, + FinderT Finder, + FormatterT Formatter ) + { + // Concept check + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_const_iterator::type> + )); + BOOST_CONCEPT_ASSERT(( + FormatterConcept< + FormatterT, + FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> + )); + + detail::find_format_all_impl( + Input, + Finder, + Formatter, + Finder(::boost::begin(Input), ::boost::end(Input))); + + } + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::find_format_copy; + using algorithm::find_format; + using algorithm::find_format_all_copy; + using algorithm::find_format_all; + +} // namespace boost + + +#endif // BOOST_STRING_FIND_FORMAT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find_iterator.hpp new file mode 100644 index 0000000000..72696c7484 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/find_iterator.hpp @@ -0,0 +1,375 @@ +// Boost string_algo library find_iterator.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2004. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FIND_ITERATOR_HPP +#define BOOST_STRING_FIND_ITERATOR_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +/*! \file + Defines find iterator classes. Find iterator repeatedly applies a Finder + to the specified input string to search for matches. Dereferencing + the iterator yields the current match or a range between the last and the current + match depending on the iterator used. +*/ + +namespace boost { + namespace algorithm { + +// find_iterator -----------------------------------------------// + + //! find_iterator + /*! + Find iterator encapsulates a Finder and allows + for incremental searching in a string. + Each increment moves the iterator to the next match. + + Find iterator is a readable forward traversal iterator. + + Dereferencing the iterator yields an iterator_range delimiting + the current match. + */ + template + class find_iterator : + public iterator_facade< + find_iterator, + const iterator_range, + forward_traversal_tag >, + private detail::find_iterator_base + { + private: + // facade support + friend class ::boost::iterator_core_access; + + private: + // typedefs + + typedef detail::find_iterator_base base_type; + typedef BOOST_STRING_TYPENAME + base_type::input_iterator_type input_iterator_type; + typedef BOOST_STRING_TYPENAME + base_type::match_type match_type; + + public: + //! Default constructor + /*! + Construct null iterator. All null iterators are equal. + + \post eof()==true + */ + find_iterator() {} + + //! Copy constructor + /*! + Construct a copy of the find_iterator + */ + find_iterator( const find_iterator& Other ) : + base_type(Other), + m_Match(Other.m_Match), + m_End(Other.m_End) {} + + //! Constructor + /*! + Construct new find_iterator for a given finder + and a range. + */ + template + find_iterator( + IteratorT Begin, + IteratorT End, + FinderT Finder ) : + detail::find_iterator_base(Finder,0), + m_Match(Begin,Begin), + m_End(End) + { + increment(); + } + + //! Constructor + /*! + Construct new find_iterator for a given finder + and a range. + */ + template + find_iterator( + RangeT& Col, + FinderT Finder ) : + detail::find_iterator_base(Finder,0) + { + iterator_range::type> lit_col(::boost::as_literal(Col)); + m_Match=::boost::make_iterator_range(::boost::begin(lit_col), ::boost::begin(lit_col)); + m_End=::boost::end(lit_col); + + increment(); + } + + private: + // iterator operations + + // dereference + const match_type& dereference() const + { + return m_Match; + } + + // increment + void increment() + { + m_Match=this->do_find(m_Match.end(),m_End); + } + + // comparison + bool equal( const find_iterator& Other ) const + { + bool bEof=eof(); + bool bOtherEof=Other.eof(); + + return bEof || bOtherEof ? bEof==bOtherEof : + ( + m_Match==Other.m_Match && + m_End==Other.m_End + ); + } + + public: + // operations + + //! Eof check + /*! + Check the eof condition. Eof condition means that + there is nothing more to be searched i.e. find_iterator + is after the last match. + */ + bool eof() const + { + return + this->is_null() || + ( + m_Match.begin() == m_End && + m_Match.end() == m_End + ); + } + + private: + // Attributes + match_type m_Match; + input_iterator_type m_End; + }; + + //! find iterator construction helper + /*! + * Construct a find iterator to iterate through the specified string + */ + template + inline find_iterator< + BOOST_STRING_TYPENAME range_iterator::type> + make_find_iterator( + RangeT& Collection, + FinderT Finder) + { + return find_iterator::type>( + Collection, Finder); + } + +// split iterator -----------------------------------------------// + + //! split_iterator + /*! + Split iterator encapsulates a Finder and allows + for incremental searching in a string. + Unlike the find iterator, split iterator iterates + through gaps between matches. + + Find iterator is a readable forward traversal iterator. + + Dereferencing the iterator yields an iterator_range delimiting + the current match. + */ + template + class split_iterator : + public iterator_facade< + split_iterator, + const iterator_range, + forward_traversal_tag >, + private detail::find_iterator_base + { + private: + // facade support + friend class ::boost::iterator_core_access; + + private: + // typedefs + + typedef detail::find_iterator_base base_type; + typedef BOOST_STRING_TYPENAME + base_type::input_iterator_type input_iterator_type; + typedef BOOST_STRING_TYPENAME + base_type::match_type match_type; + + public: + //! Default constructor + /*! + Construct null iterator. All null iterators are equal. + + \post eof()==true + */ + split_iterator() {} + //! Copy constructor + /*! + Construct a copy of the split_iterator + */ + split_iterator( const split_iterator& Other ) : + base_type(Other), + m_Match(Other.m_Match), + m_Next(Other.m_Next), + m_End(Other.m_End), + m_bEof(Other.m_bEof) + {} + + //! Constructor + /*! + Construct new split_iterator for a given finder + and a range. + */ + template + split_iterator( + IteratorT Begin, + IteratorT End, + FinderT Finder ) : + detail::find_iterator_base(Finder,0), + m_Match(Begin,Begin), + m_Next(Begin), + m_End(End), + m_bEof(false) + { + increment(); + } + //! Constructor + /*! + Construct new split_iterator for a given finder + and a collection. + */ + template + split_iterator( + RangeT& Col, + FinderT Finder ) : + detail::find_iterator_base(Finder,0), + m_bEof(false) + { + iterator_range::type> lit_col(::boost::as_literal(Col)); + m_Match=make_iterator_range(::boost::begin(lit_col), ::boost::begin(lit_col)); + m_Next=::boost::begin(lit_col); + m_End=::boost::end(lit_col); + + increment(); + } + + + private: + // iterator operations + + // dereference + const match_type& dereference() const + { + return m_Match; + } + + // increment + void increment() + { + match_type FindMatch=this->do_find( m_Next, m_End ); + + if(FindMatch.begin()==m_End && FindMatch.end()==m_End) + { + if(m_Match.end()==m_End) + { + // Mark iterator as eof + m_bEof=true; + } + } + + m_Match=match_type( m_Next, FindMatch.begin() ); + m_Next=FindMatch.end(); + } + + // comparison + bool equal( const split_iterator& Other ) const + { + bool bEof=eof(); + bool bOtherEof=Other.eof(); + + return bEof || bOtherEof ? bEof==bOtherEof : + ( + m_Match==Other.m_Match && + m_Next==Other.m_Next && + m_End==Other.m_End + ); + } + + public: + // operations + + //! Eof check + /*! + Check the eof condition. Eof condition means that + there is nothing more to be searched i.e. find_iterator + is after the last match. + */ + bool eof() const + { + return this->is_null() || m_bEof; + } + + private: + // Attributes + match_type m_Match; + input_iterator_type m_Next; + input_iterator_type m_End; + bool m_bEof; + }; + + //! split iterator construction helper + /*! + * Construct a split iterator to iterate through the specified collection + */ + template + inline split_iterator< + BOOST_STRING_TYPENAME range_iterator::type> + make_split_iterator( + RangeT& Collection, + FinderT Finder) + { + return split_iterator::type>( + Collection, Finder); + } + + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::find_iterator; + using algorithm::make_find_iterator; + using algorithm::split_iterator; + using algorithm::make_split_iterator; + +} // namespace boost + + +#endif // BOOST_STRING_FIND_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/finder.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/finder.hpp new file mode 100644 index 0000000000..4c7ac38b04 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/finder.hpp @@ -0,0 +1,270 @@ +// Boost string_algo library finder.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FINDER_HPP +#define BOOST_STRING_FINDER_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines Finder generators. Finder object is a functor which is able to + find a substring matching a specific criteria in the input. + Finders are used as a pluggable components for replace, find + and split facilities. This header contains generator functions + for finders provided in this library. +*/ + +namespace boost { + namespace algorithm { + +// Finder generators ------------------------------------------// + + //! "First" finder + /*! + Construct the \c first_finder. The finder searches for the first + occurrence of the string in a given input. + The result is given as an \c iterator_range delimiting the match. + + \param Search A substring to be searched for. + \param Comp An element comparison predicate + \return An instance of the \c first_finder object + */ + template + inline detail::first_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + is_equal> + first_finder( const RangeT& Search ) + { + return + detail::first_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + is_equal>( ::boost::as_literal(Search), is_equal() ) ; + } + + //! "First" finder + /*! + \overload + */ + template + inline detail::first_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + PredicateT> + first_finder( + const RangeT& Search, PredicateT Comp ) + { + return + detail::first_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + PredicateT>( ::boost::as_literal(Search), Comp ); + } + + //! "Last" finder + /*! + Construct the \c last_finder. The finder searches for the last + occurrence of the string in a given input. + The result is given as an \c iterator_range delimiting the match. + + \param Search A substring to be searched for. + \param Comp An element comparison predicate + \return An instance of the \c last_finder object + */ + template + inline detail::last_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + is_equal> + last_finder( const RangeT& Search ) + { + return + detail::last_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + is_equal>( ::boost::as_literal(Search), is_equal() ); + } + //! "Last" finder + /*! + \overload + */ + template + inline detail::last_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + PredicateT> + last_finder( const RangeT& Search, PredicateT Comp ) + { + return + detail::last_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + PredicateT>( ::boost::as_literal(Search), Comp ) ; + } + + //! "Nth" finder + /*! + Construct the \c nth_finder. The finder searches for the n-th (zero-indexed) + occurrence of the string in a given input. + The result is given as an \c iterator_range delimiting the match. + + \param Search A substring to be searched for. + \param Nth An index of the match to be find + \param Comp An element comparison predicate + \return An instance of the \c nth_finder object + */ + template + inline detail::nth_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + is_equal> + nth_finder( + const RangeT& Search, + int Nth) + { + return + detail::nth_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + is_equal>( ::boost::as_literal(Search), Nth, is_equal() ) ; + } + //! "Nth" finder + /*! + \overload + */ + template + inline detail::nth_finderF< + BOOST_STRING_TYPENAME range_const_iterator::type, + PredicateT> + nth_finder( + const RangeT& Search, + int Nth, + PredicateT Comp ) + { + return + detail::nth_finderF< + BOOST_STRING_TYPENAME + range_const_iterator::type, + PredicateT>( ::boost::as_literal(Search), Nth, Comp ); + } + + //! "Head" finder + /*! + Construct the \c head_finder. The finder returns a head of a given + input. The head is a prefix of a string up to n elements in + size. If an input has less then n elements, whole input is + considered a head. + The result is given as an \c iterator_range delimiting the match. + + \param N The size of the head + \return An instance of the \c head_finder object + */ + inline detail::head_finderF + head_finder( int N ) + { + return detail::head_finderF(N); + } + + //! "Tail" finder + /*! + Construct the \c tail_finder. The finder returns a tail of a given + input. The tail is a suffix of a string up to n elements in + size. If an input has less then n elements, whole input is + considered a head. + The result is given as an \c iterator_range delimiting the match. + + \param N The size of the head + \return An instance of the \c tail_finder object + */ + inline detail::tail_finderF + tail_finder( int N ) + { + return detail::tail_finderF(N); + } + + //! "Token" finder + /*! + Construct the \c token_finder. The finder searches for a token + specified by a predicate. It is similar to std::find_if + algorithm, with an exception that it return a range of + instead of a single iterator. + + If "compress token mode" is enabled, adjacent matching tokens are + concatenated into one match. Thus the finder can be used to + search for continuous segments of characters satisfying the + given predicate. + + The result is given as an \c iterator_range delimiting the match. + + \param Pred An element selection predicate + \param eCompress Compress flag + \return An instance of the \c token_finder object + */ + template< typename PredicateT > + inline detail::token_finderF + token_finder( + PredicateT Pred, + token_compress_mode_type eCompress=token_compress_off ) + { + return detail::token_finderF( Pred, eCompress ); + } + + //! "Range" finder + /*! + Construct the \c range_finder. The finder does not perform + any operation. It simply returns the given range for + any input. + + \param Begin Beginning of the range + \param End End of the range + \param Range The range. + \return An instance of the \c range_finger object + */ + template< typename ForwardIteratorT > + inline detail::range_finderF + range_finder( + ForwardIteratorT Begin, + ForwardIteratorT End ) + { + return detail::range_finderF( Begin, End ); + } + + //! "Range" finder + /*! + \overload + */ + template< typename ForwardIteratorT > + inline detail::range_finderF + range_finder( iterator_range Range ) + { + return detail::range_finderF( Range ); + } + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::first_finder; + using algorithm::last_finder; + using algorithm::nth_finder; + using algorithm::head_finder; + using algorithm::tail_finder; + using algorithm::token_finder; + using algorithm::range_finder; + +} // namespace boost + + +#endif // BOOST_STRING_FINDER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/formatter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/formatter.hpp new file mode 100644 index 0000000000..50006df102 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/formatter.hpp @@ -0,0 +1,103 @@ +// Boost string_algo library formatter.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_FORMATTER_HPP +#define BOOST_STRING_FORMATTER_HPP + +#include +#include +#include +#include + +#include + +/*! \file + Defines Formatter generators. Formatter is a functor which formats + a string according to given parameters. A Formatter works + in conjunction with a Finder. A Finder can provide additional information + for a specific Formatter. An example of such a cooperation is regex_finder + and regex_formatter. + + Formatters are used as pluggable components for replace facilities. + This header contains generator functions for the Formatters provided in this library. +*/ + +namespace boost { + namespace algorithm { + +// generic formatters ---------------------------------------------------------------// + + //! Constant formatter + /*! + Construct the \c const_formatter. Const formatter always returns + the same value, regardless of the parameter. + + \param Format A predefined value used as a result for formating + \return An instance of the \c const_formatter object. + */ + template + inline detail::const_formatF< + iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> > + const_formatter(const RangeT& Format) + { + return detail::const_formatF< + iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> >(::boost::as_literal(Format)); + } + + //! Identity formatter + /*! + Construct the \c identity_formatter. Identity formatter always returns + the parameter. + + \return An instance of the \c identity_formatter object. + */ + template + inline detail::identity_formatF< + iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> > + identity_formatter() + { + return detail::identity_formatF< + iterator_range< + BOOST_STRING_TYPENAME range_const_iterator::type> >(); + } + + //! Empty formatter + /*! + Construct the \c empty_formatter. Empty formatter always returns an empty + sequence. + + \param Input container used to select a correct value_type for the + resulting empty_container<>. + \return An instance of the \c empty_formatter object. + */ + template + inline detail::empty_formatF< + BOOST_STRING_TYPENAME range_value::type> + empty_formatter(const RangeT&) + { + return detail::empty_formatF< + BOOST_STRING_TYPENAME range_value::type>(); + } + + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::const_formatter; + using algorithm::identity_formatter; + using algorithm::empty_formatter; + +} // namespace boost + + +#endif // BOOST_FORMATTER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/iter_find.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/iter_find.hpp new file mode 100644 index 0000000000..9e0245f1a7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/iter_find.hpp @@ -0,0 +1,193 @@ +// Boost string_algo library iter_find.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_ITER_FIND_HPP +#define BOOST_STRING_ITER_FIND_HPP + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines generic split algorithms. Split algorithms can be + used to divide a sequence into several part according + to a given criteria. Result is given as a 'container + of containers' where elements are copies or references + to extracted parts. + + There are two algorithms provided. One iterates over matching + substrings, the other one over the gaps between these matches. +*/ + +namespace boost { + namespace algorithm { + +// iterate find ---------------------------------------------------// + + //! Iter find algorithm + /*! + This algorithm executes a given finder in iteration on the input, + until the end of input is reached, or no match is found. + Iteration is done using built-in find_iterator, so the real + searching is performed only when needed. + In each iteration new match is found and added to the result. + + \param Result A 'container container' to contain the result of search. + Both outer and inner container must have constructor taking a pair + of iterators as an argument. + Typical type of the result is + \c std::vector> + (each element of such a vector will container a range delimiting + a match). + \param Input A container which will be searched. + \param Finder A Finder object used for searching + \return A reference the result + + \note Prior content of the result will be overwritten. + */ + template< + typename SequenceSequenceT, + typename RangeT, + typename FinderT > + inline SequenceSequenceT& + iter_find( + SequenceSequenceT& Result, + RangeT& Input, + FinderT Finder ) + { + BOOST_CONCEPT_ASSERT(( + FinderConcept< + FinderT, + BOOST_STRING_TYPENAME range_iterator::type> + )); + + iterator_range::type> lit_input(::boost::as_literal(Input)); + + typedef BOOST_STRING_TYPENAME + range_iterator::type input_iterator_type; + typedef find_iterator find_iterator_type; + typedef detail::copy_iterator_rangeF< + BOOST_STRING_TYPENAME + range_value::type, + input_iterator_type> copy_range_type; + + input_iterator_type InputEnd=::boost::end(lit_input); + + typedef transform_iterator + transform_iter_type; + + transform_iter_type itBegin= + ::boost::make_transform_iterator( + find_iterator_type( ::boost::begin(lit_input), InputEnd, Finder ), + copy_range_type()); + + transform_iter_type itEnd= + ::boost::make_transform_iterator( + find_iterator_type(), + copy_range_type()); + + SequenceSequenceT Tmp(itBegin, itEnd); + + Result.swap(Tmp); + return Result; + } + +// iterate split ---------------------------------------------------// + + //! Split find algorithm + /*! + This algorithm executes a given finder in iteration on the input, + until the end of input is reached, or no match is found. + Iteration is done using built-in find_iterator, so the real + searching is performed only when needed. + Each match is used as a separator of segments. These segments are then + returned in the result. + + \param Result A 'container container' to container the result of search. + Both outer and inner container must have constructor taking a pair + of iterators as an argument. + Typical type of the result is + \c std::vector> + (each element of such a vector will container a range delimiting + a match). + \param Input A container which will be searched. + \param Finder A finder object used for searching + \return A reference the result + + \note Prior content of the result will be overwritten. + */ + template< + typename SequenceSequenceT, + typename RangeT, + typename FinderT > + inline SequenceSequenceT& + iter_split( + SequenceSequenceT& Result, + RangeT& Input, + FinderT Finder ) + { + BOOST_CONCEPT_ASSERT(( + FinderConcept::type> + )); + + iterator_range::type> lit_input(::boost::as_literal(Input)); + + typedef BOOST_STRING_TYPENAME + range_iterator::type input_iterator_type; + typedef split_iterator find_iterator_type; + typedef detail::copy_iterator_rangeF< + BOOST_STRING_TYPENAME + range_value::type, + input_iterator_type> copy_range_type; + + input_iterator_type InputEnd=::boost::end(lit_input); + + typedef transform_iterator + transform_iter_type; + + transform_iter_type itBegin= + ::boost::make_transform_iterator( + find_iterator_type( ::boost::begin(lit_input), InputEnd, Finder ), + copy_range_type() ); + + transform_iter_type itEnd= + ::boost::make_transform_iterator( + find_iterator_type(), + copy_range_type() ); + + SequenceSequenceT Tmp(itBegin, itEnd); + + Result.swap(Tmp); + return Result; + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::iter_find; + using algorithm::iter_split; + +} // namespace boost + + +#endif // BOOST_STRING_ITER_FIND_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/join.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/join.hpp new file mode 100644 index 0000000000..b871eb44f6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/join.hpp @@ -0,0 +1,145 @@ +// Boost string_algo library join.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_JOIN_HPP +#define BOOST_STRING_JOIN_HPP + +#include +#include +#include +#include + +/*! \file + Defines join algorithm. + + Join algorithm is a counterpart to split algorithms. + It joins strings from a 'list' by adding user defined separator. + Additionally there is a version that allows simple filtering + by providing a predicate. +*/ + +namespace boost { + namespace algorithm { + +// join --------------------------------------------------------------// + + //! Join algorithm + /*! + This algorithm joins all strings in a 'list' into one long string. + Segments are concatenated by given separator. + + \param Input A container that holds the input strings. It must be a container-of-containers. + \param Separator A string that will separate the joined segments. + \return Concatenated string. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename Range1T> + inline typename range_value::type + join( + const SequenceSequenceT& Input, + const Range1T& Separator) + { + // Define working types + typedef typename range_value::type ResultT; + typedef typename range_const_iterator::type InputIteratorT; + + // Parse input + InputIteratorT itBegin=::boost::begin(Input); + InputIteratorT itEnd=::boost::end(Input); + + // Construct container to hold the result + ResultT Result; + + // Append first element + if(itBegin!=itEnd) + { + detail::insert(Result, ::boost::end(Result), *itBegin); + ++itBegin; + } + + for(;itBegin!=itEnd; ++itBegin) + { + // Add separator + detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); + // Add element + detail::insert(Result, ::boost::end(Result), *itBegin); + } + + return Result; + } + +// join_if ----------------------------------------------------------// + + //! Conditional join algorithm + /*! + This algorithm joins all strings in a 'list' into one long string. + Segments are concatenated by given separator. Only segments that + satisfy the predicate will be added to the result. + + \param Input A container that holds the input strings. It must be a container-of-containers. + \param Separator A string that will separate the joined segments. + \param Pred A segment selection predicate + \return Concatenated string. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename Range1T, typename PredicateT> + inline typename range_value::type + join_if( + const SequenceSequenceT& Input, + const Range1T& Separator, + PredicateT Pred) + { + // Define working types + typedef typename range_value::type ResultT; + typedef typename range_const_iterator::type InputIteratorT; + + // Parse input + InputIteratorT itBegin=::boost::begin(Input); + InputIteratorT itEnd=::boost::end(Input); + + // Construct container to hold the result + ResultT Result; + + // Roll to the first element that will be added + while(itBegin!=itEnd && !Pred(*itBegin)) ++itBegin; + // Add this element + if(itBegin!=itEnd) + { + detail::insert(Result, ::boost::end(Result), *itBegin); + ++itBegin; + } + + for(;itBegin!=itEnd; ++itBegin) + { + if(Pred(*itBegin)) + { + // Add separator + detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); + // Add element + detail::insert(Result, ::boost::end(Result), *itBegin); + } + } + + return Result; + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::join; + using algorithm::join_if; + +} // namespace boost + + +#endif // BOOST_STRING_JOIN_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/predicate.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/predicate.hpp new file mode 100644 index 0000000000..6642f427d1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/predicate.hpp @@ -0,0 +1,475 @@ +// Boost string_algo library predicate.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_PREDICATE_HPP +#define BOOST_STRING_PREDICATE_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file boost/algorithm/string/predicate.hpp + Defines string-related predicates. + The predicates determine whether a substring is contained in the input string + under various conditions: a string starts with the substring, ends with the + substring, simply contains the substring or if both strings are equal. + Additionaly the algorithm \c all() checks all elements of a container to satisfy a + condition. + + All predicates provide the strong exception guarantee. +*/ + +namespace boost { + namespace algorithm { + +// starts_with predicate -----------------------------------------------// + + //! 'Starts with' predicate + /*! + This predicate holds when the test string is a prefix of the Input. + In other words, if the input starts with the test. + When the optional predicate is specified, it is used for character-wise + comparison. + + \param Input An input sequence + \param Test A test sequence + \param Comp An element comparison predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool starts_with( + const Range1T& Input, + const Range2T& Test, + PredicateT Comp) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + iterator_range::type> lit_test(::boost::as_literal(Test)); + + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator1T; + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator2T; + + Iterator1T InputEnd=::boost::end(lit_input); + Iterator2T TestEnd=::boost::end(lit_test); + + Iterator1T it=::boost::begin(lit_input); + Iterator2T pit=::boost::begin(lit_test); + for(; + it!=InputEnd && pit!=TestEnd; + ++it,++pit) + { + if( !(Comp(*it,*pit)) ) + return false; + } + + return pit==TestEnd; + } + + //! 'Starts with' predicate + /*! + \overload + */ + template + inline bool starts_with( + const Range1T& Input, + const Range2T& Test) + { + return ::boost::algorithm::starts_with(Input, Test, is_equal()); + } + + //! 'Starts with' predicate ( case insensitive ) + /*! + This predicate holds when the test string is a prefix of the Input. + In other words, if the input starts with the test. + Elements are compared case insensitively. + + \param Input An input sequence + \param Test A test sequence + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool istarts_with( + const Range1T& Input, + const Range2T& Test, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::starts_with(Input, Test, is_iequal(Loc)); + } + + +// ends_with predicate -----------------------------------------------// + + //! 'Ends with' predicate + /*! + This predicate holds when the test string is a suffix of the Input. + In other words, if the input ends with the test. + When the optional predicate is specified, it is used for character-wise + comparison. + + + \param Input An input sequence + \param Test A test sequence + \param Comp An element comparison predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool ends_with( + const Range1T& Input, + const Range2T& Test, + PredicateT Comp) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + iterator_range::type> lit_test(::boost::as_literal(Test)); + + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator1T; + typedef BOOST_STRING_TYPENAME boost::detail:: + iterator_traits::iterator_category category; + + return detail:: + ends_with_iter_select( + ::boost::begin(lit_input), + ::boost::end(lit_input), + ::boost::begin(lit_test), + ::boost::end(lit_test), + Comp, + category()); + } + + + //! 'Ends with' predicate + /*! + \overload + */ + template + inline bool ends_with( + const Range1T& Input, + const Range2T& Test) + { + return ::boost::algorithm::ends_with(Input, Test, is_equal()); + } + + //! 'Ends with' predicate ( case insensitive ) + /*! + This predicate holds when the test container is a suffix of the Input. + In other words, if the input ends with the test. + Elements are compared case insensitively. + + \param Input An input sequence + \param Test A test sequence + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool iends_with( + const Range1T& Input, + const Range2T& Test, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::ends_with(Input, Test, is_iequal(Loc)); + } + +// contains predicate -----------------------------------------------// + + //! 'Contains' predicate + /*! + This predicate holds when the test container is contained in the Input. + When the optional predicate is specified, it is used for character-wise + comparison. + + \param Input An input sequence + \param Test A test sequence + \param Comp An element comparison predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool contains( + const Range1T& Input, + const Range2T& Test, + PredicateT Comp) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + iterator_range::type> lit_test(::boost::as_literal(Test)); + + if (::boost::empty(lit_test)) + { + // Empty range is contained always + return true; + } + + // Use the temporary variable to make VACPP happy + bool bResult=(::boost::algorithm::first_finder(lit_test,Comp)(::boost::begin(lit_input), ::boost::end(lit_input))); + return bResult; + } + + //! 'Contains' predicate + /*! + \overload + */ + template + inline bool contains( + const Range1T& Input, + const Range2T& Test) + { + return ::boost::algorithm::contains(Input, Test, is_equal()); + } + + //! 'Contains' predicate ( case insensitive ) + /*! + This predicate holds when the test container is contained in the Input. + Elements are compared case insensitively. + + \param Input An input sequence + \param Test A test sequence + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool icontains( + const Range1T& Input, + const Range2T& Test, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::contains(Input, Test, is_iequal(Loc)); + } + +// equals predicate -----------------------------------------------// + + //! 'Equals' predicate + /*! + This predicate holds when the test container is equal to the + input container i.e. all elements in both containers are same. + When the optional predicate is specified, it is used for character-wise + comparison. + + \param Input An input sequence + \param Test A test sequence + \param Comp An element comparison predicate + \return The result of the test + + \note This is a two-way version of \c std::equal algorithm + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool equals( + const Range1T& Input, + const Range2T& Test, + PredicateT Comp) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + iterator_range::type> lit_test(::boost::as_literal(Test)); + + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator1T; + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator2T; + + Iterator1T InputEnd=::boost::end(lit_input); + Iterator2T TestEnd=::boost::end(lit_test); + + Iterator1T it=::boost::begin(lit_input); + Iterator2T pit=::boost::begin(lit_test); + for(; + it!=InputEnd && pit!=TestEnd; + ++it,++pit) + { + if( !(Comp(*it,*pit)) ) + return false; + } + + return (pit==TestEnd) && (it==InputEnd); + } + + //! 'Equals' predicate + /*! + \overload + */ + template + inline bool equals( + const Range1T& Input, + const Range2T& Test) + { + return ::boost::algorithm::equals(Input, Test, is_equal()); + } + + //! 'Equals' predicate ( case insensitive ) + /*! + This predicate holds when the test container is equal to the + input container i.e. all elements in both containers are same. + Elements are compared case insensitively. + + \param Input An input sequence + \param Test A test sequence + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This is a two-way version of \c std::equal algorithm + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool iequals( + const Range1T& Input, + const Range2T& Test, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::equals(Input, Test, is_iequal(Loc)); + } + +// lexicographical_compare predicate -----------------------------// + + //! Lexicographical compare predicate + /*! + This predicate is an overload of std::lexicographical_compare + for range arguments + + It check whether the first argument is lexicographically less + then the second one. + + If the optional predicate is specified, it is used for character-wise + comparison + + \param Arg1 First argument + \param Arg2 Second argument + \param Pred Comparison predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool lexicographical_compare( + const Range1T& Arg1, + const Range2T& Arg2, + PredicateT Pred) + { + iterator_range::type> lit_arg1(::boost::as_literal(Arg1)); + iterator_range::type> lit_arg2(::boost::as_literal(Arg2)); + + return std::lexicographical_compare( + ::boost::begin(lit_arg1), + ::boost::end(lit_arg1), + ::boost::begin(lit_arg2), + ::boost::end(lit_arg2), + Pred); + } + + //! Lexicographical compare predicate + /*! + \overload + */ + template + inline bool lexicographical_compare( + const Range1T& Arg1, + const Range2T& Arg2) + { + return ::boost::algorithm::lexicographical_compare(Arg1, Arg2, is_less()); + } + + //! Lexicographical compare predicate (case-insensitive) + /*! + This predicate is an overload of std::lexicographical_compare + for range arguments. + It check whether the first argument is lexicographically less + then the second one. + Elements are compared case insensitively + + + \param Arg1 First argument + \param Arg2 Second argument + \param Loc A locale used for case insensitive comparison + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool ilexicographical_compare( + const Range1T& Arg1, + const Range2T& Arg2, + const std::locale& Loc=std::locale()) + { + return ::boost::algorithm::lexicographical_compare(Arg1, Arg2, is_iless(Loc)); + } + + +// all predicate -----------------------------------------------// + + //! 'All' predicate + /*! + This predicate holds it all its elements satisfy a given + condition, represented by the predicate. + + \param Input An input sequence + \param Pred A predicate + \return The result of the test + + \note This function provides the strong exception-safety guarantee + */ + template + inline bool all( + const RangeT& Input, + PredicateT Pred) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + + typedef BOOST_STRING_TYPENAME + range_const_iterator::type Iterator1T; + + Iterator1T InputEnd=::boost::end(lit_input); + for( Iterator1T It=::boost::begin(lit_input); It!=InputEnd; ++It) + { + if (!Pred(*It)) + return false; + } + + return true; + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::starts_with; + using algorithm::istarts_with; + using algorithm::ends_with; + using algorithm::iends_with; + using algorithm::contains; + using algorithm::icontains; + using algorithm::equals; + using algorithm::iequals; + using algorithm::all; + using algorithm::lexicographical_compare; + using algorithm::ilexicographical_compare; + +} // namespace boost + + +#endif // BOOST_STRING_PREDICATE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/predicate_facade.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/predicate_facade.hpp new file mode 100644 index 0000000000..c8319f7ee8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/predicate_facade.hpp @@ -0,0 +1,42 @@ +// Boost string_algo library predicate_facade.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_PREDICATE_FACADE_HPP +#define BOOST_STRING_PREDICATE_FACADE_HPP + +#include + +/* + \file boost/algorith/string/predicate_facade.hpp + This file containes predicate_facade definition. This template class is used + to identify classification predicates, so they can be combined using + composition operators. +*/ + +namespace boost { + namespace algorithm { + +// predicate facade ------------------------------------------------------// + + //! Predicate facade + /*! + This class allows to recognize classification + predicates, so that they can be combined using + composition operators. + Every classification predicate must be derived from this class. + */ + template + struct predicate_facade {}; + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_CLASSIFICATION_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/regex.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/regex.hpp new file mode 100644 index 0000000000..0a4c38bd77 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/regex.hpp @@ -0,0 +1,646 @@ +// Boost string_algo library regex.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_REGEX_HPP +#define BOOST_STRING_REGEX_HPP + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +/*! \file + Defines regex variants of the algorithms. +*/ + +namespace boost { + namespace algorithm { + +// find_regex -----------------------------------------------// + + //! Find regex algorithm + /*! + Search for a substring matching the given regex in the input. + + \param Input A container which will be searched. + \param Rx A regular expression + \param Flags Regex options + \return + An \c iterator_range delimiting the match. + Returned iterator is either \c RangeT::iterator or + \c RangeT::const_iterator, depending on the constness of + the input parameter. + + \note This function provides the strong exception-safety guarantee + */ + template< + typename RangeT, + typename CharT, + typename RegexTraitsT> + inline iterator_range< + BOOST_STRING_TYPENAME range_iterator::type > + find_regex( + RangeT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + iterator_range::type> lit_input(::boost::as_literal(Input)); + + return ::boost::algorithm::regex_finder(Rx,Flags)( + ::boost::begin(lit_input), ::boost::end(lit_input) ); + } + +// replace_regex --------------------------------------------------------------------// + + //! Replace regex algorithm + /*! + Search for a substring matching given regex and format it with + the specified format. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Rx A regular expression + \param Format Regex format definition + \param Flags Regex options + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT, + typename CharT, + typename RegexTraitsT, + typename FormatStringTraitsT, typename FormatStringAllocatorT > + inline OutputIteratorT replace_regex_copy( + OutputIteratorT Output, + const RangeT& Input, + const basic_regex& Rx, + const std::basic_string& Format, + match_flag_type Flags=match_default | format_default ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::regex_formatter( Format, Flags ) ); + } + + //! Replace regex algorithm + /*! + \overload + */ + template< + typename SequenceT, + typename CharT, + typename RegexTraitsT, + typename FormatStringTraitsT, typename FormatStringAllocatorT > + inline SequenceT replace_regex_copy( + const SequenceT& Input, + const basic_regex& Rx, + const std::basic_string& Format, + match_flag_type Flags=match_default | format_default ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::regex_formatter( Format, Flags ) ); + } + + //! Replace regex algorithm + /*! + Search for a substring matching given regex and format it with + the specified format. The input string is modified in-place. + + \param Input An input string + \param Rx A regular expression + \param Format Regex format definition + \param Flags Regex options + */ + template< + typename SequenceT, + typename CharT, + typename RegexTraitsT, + typename FormatStringTraitsT, typename FormatStringAllocatorT > + inline void replace_regex( + SequenceT& Input, + const basic_regex& Rx, + const std::basic_string& Format, + match_flag_type Flags=match_default | format_default ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::regex_formatter( Format, Flags ) ); + } + +// replace_all_regex --------------------------------------------------------------------// + + //! Replace all regex algorithm + /*! + Format all substrings, matching given regex, with the specified format. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Rx A regular expression + \param Format Regex format definition + \param Flags Regex options + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT, + typename CharT, + typename RegexTraitsT, + typename FormatStringTraitsT, typename FormatStringAllocatorT > + inline OutputIteratorT replace_all_regex_copy( + OutputIteratorT Output, + const RangeT& Input, + const basic_regex& Rx, + const std::basic_string& Format, + match_flag_type Flags=match_default | format_default ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::regex_formatter( Format, Flags ) ); + } + + //! Replace all regex algorithm + /*! + \overload + */ + template< + typename SequenceT, + typename CharT, + typename RegexTraitsT, + typename FormatStringTraitsT, typename FormatStringAllocatorT > + inline SequenceT replace_all_regex_copy( + const SequenceT& Input, + const basic_regex& Rx, + const std::basic_string& Format, + match_flag_type Flags=match_default | format_default ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::regex_formatter( Format, Flags ) ); + } + + //! Replace all regex algorithm + /*! + Format all substrings, matching given regex, with the specified format. + The input string is modified in-place. + + \param Input An input string + \param Rx A regular expression + \param Format Regex format definition + \param Flags Regex options + */ + template< + typename SequenceT, + typename CharT, + typename RegexTraitsT, + typename FormatStringTraitsT, typename FormatStringAllocatorT > + inline void replace_all_regex( + SequenceT& Input, + const basic_regex& Rx, + const std::basic_string& Format, + match_flag_type Flags=match_default | format_default ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::regex_formatter( Format, Flags ) ); + } + +// erase_regex --------------------------------------------------------------------// + + //! Erase regex algorithm + /*! + Remove a substring matching given regex from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Rx A regular expression + \param Flags Regex options + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT, + typename CharT, + typename RegexTraitsT > + inline OutputIteratorT erase_regex_copy( + OutputIteratorT Output, + const RangeT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase regex algorithm + /*! + \overload + */ + template< + typename SequenceT, + typename CharT, + typename RegexTraitsT > + inline SequenceT erase_regex_copy( + const SequenceT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase regex algorithm + /*! + Remove a substring matching given regex from the input. + The input string is modified in-place. + + \param Input An input string + \param Rx A regular expression + \param Flags Regex options + */ + template< + typename SequenceT, + typename CharT, + typename RegexTraitsT > + inline void erase_regex( + SequenceT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::empty_formatter( Input ) ); + } + +// erase_all_regex --------------------------------------------------------------------// + + //! Erase all regex algorithm + /*! + Erase all substrings, matching given regex, from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Rx A regular expression + \param Flags Regex options + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename RangeT, + typename CharT, + typename RegexTraitsT > + inline OutputIteratorT erase_all_regex_copy( + OutputIteratorT Output, + const RangeT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase all regex algorithm + /*! + \overload + */ + template< + typename SequenceT, + typename CharT, + typename RegexTraitsT > + inline SequenceT erase_all_regex_copy( + const SequenceT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::empty_formatter( Input ) ); + } + + //! Erase all regex algorithm + /*! + Erase all substrings, matching given regex, from the input. + The input string is modified in-place. + + \param Input An input string + \param Rx A regular expression + \param Flags Regex options + */ + template< + typename SequenceT, + typename CharT, + typename RegexTraitsT> + inline void erase_all_regex( + SequenceT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::regex_finder( Rx, Flags ), + ::boost::algorithm::empty_formatter( Input ) ); + } + +// find_all_regex ------------------------------------------------------------------// + + //! Find all regex algorithm + /*! + This algorithm finds all substrings matching the give regex + in the input. + + Each part is copied and added as a new element to the output container. + Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> + + \param Result A container that can hold copies of references to the substrings. + \param Input A container which will be searched. + \param Rx A regular expression + \param Flags Regex options + \return A reference to the result + + \note Prior content of the result will be overwritten. + + \note This function provides the strong exception-safety guarantee + */ + template< + typename SequenceSequenceT, + typename RangeT, + typename CharT, + typename RegexTraitsT > + inline SequenceSequenceT& find_all_regex( + SequenceSequenceT& Result, + const RangeT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + return ::boost::algorithm::iter_find( + Result, + Input, + ::boost::algorithm::regex_finder(Rx,Flags) ); + } + +// split_regex ------------------------------------------------------------------// + + //! Split regex algorithm + /*! + Tokenize expression. This function is equivalent to C strtok. Input + sequence is split into tokens, separated by separators. Separator + is an every match of the given regex. + Each part is copied and added as a new element to the output container. + Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> + + \param Result A container that can hold copies of references to the substrings. + \param Input A container which will be searched. + \param Rx A regular expression + \param Flags Regex options + \return A reference to the result + + \note Prior content of the result will be overwritten. + + \note This function provides the strong exception-safety guarantee + */ + template< + typename SequenceSequenceT, + typename RangeT, + typename CharT, + typename RegexTraitsT > + inline SequenceSequenceT& split_regex( + SequenceSequenceT& Result, + const RangeT& Input, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + return ::boost::algorithm::iter_split( + Result, + Input, + ::boost::algorithm::regex_finder(Rx,Flags) ); + } + +// join_if ------------------------------------------------------------------// + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + //! Conditional join algorithm + /*! + This algorithm joins all strings in a 'list' into one long string. + Segments are concatenated by given separator. Only segments that + match the given regular expression will be added to the result + + This is a specialization of join_if algorithm. + + \param Input A container that holds the input strings. It must be a container-of-containers. + \param Separator A string that will separate the joined segments. + \param Rx A regular expression + \param Flags Regex options + \return Concatenated string. + + \note This function provides the strong exception-safety guarantee + */ + template< + typename SequenceSequenceT, + typename Range1T, + typename CharT, + typename RegexTraitsT > + inline typename range_value::type + join_if( + const SequenceSequenceT& Input, + const Range1T& Separator, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + // Define working types + typedef typename range_value::type ResultT; + typedef typename range_const_iterator::type InputIteratorT; + + // Parse input + InputIteratorT itBegin=::boost::begin(Input); + InputIteratorT itEnd=::boost::end(Input); + + // Construct container to hold the result + ResultT Result; + + + // Roll to the first element that will be added + while( + itBegin!=itEnd && + !::boost::regex_match(::boost::begin(*itBegin), ::boost::end(*itBegin), Rx, Flags)) ++itBegin; + + // Add this element + if(itBegin!=itEnd) + { + detail::insert(Result, ::boost::end(Result), *itBegin); + ++itBegin; + } + + for(;itBegin!=itEnd; ++itBegin) + { + if(::boost::regex_match(::boost::begin(*itBegin), ::boost::end(*itBegin), Rx, Flags)) + { + // Add separator + detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); + // Add element + detail::insert(Result, ::boost::end(Result), *itBegin); + } + } + + return Result; + } + +#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + //! Conditional join algorithm + /*! + This algorithm joins all strings in a 'list' into one long string. + Segments are concatenated by given separator. Only segments that + match the given regular expression will be added to the result + + This is a specialization of join_if algorithm. + + \param Input A container that holds the input strings. It must be a container-of-containers. + \param Separator A string that will separate the joined segments. + \param Rx A regular expression + \param Flags Regex options + \return Concatenated string. + + \note This function provides the strong exception-safety guarantee + */ + template< + typename SequenceSequenceT, + typename Range1T, + typename CharT, + typename RegexTraitsT > + inline typename range_value::type + join_if_regex( + const SequenceSequenceT& Input, + const Range1T& Separator, + const basic_regex& Rx, + match_flag_type Flags=match_default ) + { + // Define working types + typedef typename range_value::type ResultT; + typedef typename range_const_iterator::type InputIteratorT; + + // Parse input + InputIteratorT itBegin=::boost::begin(Input); + InputIteratorT itEnd=::boost::end(Input); + + // Construct container to hold the result + ResultT Result; + + + // Roll to the first element that will be added + while( + itBegin!=itEnd && + !::boost::regex_match(::boost::begin(*itBegin), ::boost::end(*itBegin), Rx, Flags)) ++itBegin; + + // Add this element + if(itBegin!=itEnd) + { + detail::insert(Result, ::boost::end(Result), *itBegin); + ++itBegin; + } + + for(;itBegin!=itEnd; ++itBegin) + { + if(::boost::regex_match(::boost::begin(*itBegin), ::boost::end(*itBegin), Rx, Flags)) + { + // Add separator + detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); + // Add element + detail::insert(Result, ::boost::end(Result), *itBegin); + } + } + + return Result; + } + + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + } // namespace algorithm + + // pull names into the boost namespace + using algorithm::find_regex; + using algorithm::replace_regex; + using algorithm::replace_regex_copy; + using algorithm::replace_all_regex; + using algorithm::replace_all_regex_copy; + using algorithm::erase_regex; + using algorithm::erase_regex_copy; + using algorithm::erase_all_regex; + using algorithm::erase_all_regex_copy; + using algorithm::find_all_regex; + using algorithm::split_regex; + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + using algorithm::join_if; +#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + using algorithm::join_if_regex; +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +} // namespace boost + + +#endif // BOOST_STRING_REGEX_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/regex_find_format.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/regex_find_format.hpp new file mode 100644 index 0000000000..f698004a3a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/regex_find_format.hpp @@ -0,0 +1,90 @@ +// Boost string_algo library regex_find_format.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_REGEX_FIND_FORMAT_HPP +#define BOOST_STRING_REGEX_FIND_FORMAT_HPP + +#include +#include +#include +#include + +/*! \file + Defines the \c regex_finder and \c regex_formatter generators. These two functors + are designed to work together. \c regex_formatter uses additional information + about a match contained in the regex_finder search result. +*/ + +namespace boost { + namespace algorithm { + +// regex_finder -----------------------------------------------// + + //! "Regex" finder + /*! + Construct the \c regex_finder. Finder uses the regex engine to search + for a match. + Result is given in \c regex_search_result. This is an extension + of the iterator_range. In addition it containes match results + from the \c regex_search algorithm. + + \param Rx A regular expression + \param MatchFlags Regex search options + \return An instance of the \c regex_finder object + */ + template< + typename CharT, + typename RegexTraitsT> + inline detail::find_regexF< basic_regex > + regex_finder( + const basic_regex& Rx, + match_flag_type MatchFlags=match_default ) + { + return detail:: + find_regexF< + basic_regex >( Rx, MatchFlags ); + } + +// regex_formater ---------------------------------------------// + + //! Regex formatter + /*! + Construct the \c regex_formatter. Regex formatter uses the regex engine to + format a match found by the \c regex_finder. + This formatted it designed to closely cooperate with \c regex_finder. + + \param Format Regex format definition + \param Flags Format flags + \return An instance of the \c regex_formatter functor + */ + template< + typename CharT, + typename TraitsT, typename AllocT > + inline detail::regex_formatF< std::basic_string< CharT, TraitsT, AllocT > > + regex_formatter( + const std::basic_string& Format, + match_flag_type Flags=format_default ) + { + return + detail::regex_formatF< std::basic_string >( + Format, + Flags ); + } + + } // namespace algorithm + + // pull the names to the boost namespace + using algorithm::regex_finder; + using algorithm::regex_formatter; + +} // namespace boost + + +#endif // BOOST_STRING_REGEX_FIND_FORMAT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/replace.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/replace.hpp new file mode 100644 index 0000000000..f2d201f97f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/replace.hpp @@ -0,0 +1,928 @@ +// Boost string_algo library replace.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_REPLACE_HPP +#define BOOST_STRING_REPLACE_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +/*! \file + Defines various replace algorithms. Each algorithm replaces + part(s) of the input according to set of searching and replace criteria. +*/ + +namespace boost { + namespace algorithm { + +// replace_range --------------------------------------------------------------------// + + //! Replace range algorithm + /*! + Replace the given range in the input string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param SearchRange A range in the input to be substituted + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT replace_range_copy( + OutputIteratorT Output, + const Range1T& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_const_iterator::type>& SearchRange, + const Range2T& Format) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::const_formatter(Format)); + } + + //! Replace range algorithm + /*! + \overload + */ + template + inline SequenceT replace_range_copy( + const SequenceT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_const_iterator::type>& SearchRange, + const RangeT& Format) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::const_formatter(Format)); + } + + //! Replace range algorithm + /*! + Replace the given range in the input string. + The input sequence is modified in-place. + + \param Input An input string + \param SearchRange A range in the input to be substituted + \param Format A substitute string + */ + template + inline void replace_range( + SequenceT& Input, + const iterator_range< + BOOST_STRING_TYPENAME + range_iterator::type>& SearchRange, + const RangeT& Format) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::range_finder(SearchRange), + ::boost::algorithm::const_formatter(Format)); + } + +// replace_first --------------------------------------------------------------------// + + //! Replace first algorithm + /*! + Replace the first match of the search substring in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT replace_first_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace first algorithm + /*! + \overload + */ + template + inline SequenceT replace_first_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace first algorithm + /*! + replace the first match of the search substring in the input + with the format string. The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + */ + template + inline void replace_first( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_first ( case insensitive ) ---------------------------------------------// + + //! Replace first algorithm ( case insensitive ) + /*! + Replace the first match of the search substring in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT ireplace_first_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace first algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ireplace_first_copy( + const SequenceT& Input, + const Range2T& Search, + const Range1T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace first algorithm ( case insensitive ) + /*! + Replace the first match of the search substring in the input + with the format string. Input sequence is modified in-place. + Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + */ + template + inline void ireplace_first( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_last --------------------------------------------------------------------// + + //! Replace last algorithm + /*! + Replace the last match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT replace_last_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace last algorithm + /*! + \overload + */ + template + inline SequenceT replace_last_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace last algorithm + /*! + Replace the last match of the search string in the input + with the format string. Input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + */ + template + inline void replace_last( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::last_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_last ( case insensitive ) -----------------------------------------------// + + //! Replace last algorithm ( case insensitive ) + /*! + Replace the last match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT ireplace_last_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace last algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ireplace_last_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace last algorithm ( case insensitive ) + /*! + Replace the last match of the search string in the input + with the format string.The input sequence is modified in-place. + Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return A reference to the modified input + */ + template + inline void ireplace_last( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::last_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_nth --------------------------------------------------------------------// + + //! Replace nth algorithm + /*! + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT replace_nth_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + int Nth, + const Range3T& Format ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace nth algorithm + /*! + \overload + */ + template + inline SequenceT replace_nth_copy( + const SequenceT& Input, + const Range1T& Search, + int Nth, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace nth algorithm + /*! + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. Input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Format A substitute string + */ + template + inline void replace_nth( + SequenceT& Input, + const Range1T& Search, + int Nth, + const Range2T& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::nth_finder(Search, Nth), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_nth ( case insensitive ) -----------------------------------------------// + + //! Replace nth algorithm ( case insensitive ) + /*! + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT ireplace_nth_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + int Nth, + const Range3T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc) ), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace nth algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ireplace_nth_copy( + const SequenceT& Input, + const Range1T& Search, + int Nth, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace nth algorithm ( case insensitive ) + /*! + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. Input sequence is modified in-place. + Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Nth An index of the match to be replaced. The index is 0-based. + For negative N, matches are counted from the end of string. + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + */ + template + inline void ireplace_nth( + SequenceT& Input, + const Range1T& Search, + int Nth, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_all --------------------------------------------------------------------// + + //! Replace all algorithm + /*! + Replace all occurrences of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT replace_all_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace all algorithm + /*! + \overload + */ + template + inline SequenceT replace_all_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace all algorithm + /*! + Replace all occurrences of the search string in the input + with the format string. The input sequence is modified in-place. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \return A reference to the modified input + */ + template + inline void replace_all( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::first_finder(Search), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_all ( case insensitive ) -----------------------------------------------// + + //! Replace all algorithm ( case insensitive ) + /*! + Replace all occurrences of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + Searching is case insensitive. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T, + typename Range3T> + inline OutputIteratorT ireplace_all_copy( + OutputIteratorT Output, + const Range1T& Input, + const Range2T& Search, + const Range3T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_all_copy( + Output, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace all algorithm ( case insensitive ) + /*! + \overload + */ + template + inline SequenceT ireplace_all_copy( + const SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::find_format_all_copy( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace all algorithm ( case insensitive ) + /*! + Replace all occurrences of the search string in the input + with the format string.The input sequence is modified in-place. + Searching is case insensitive. + + \param Input An input string + \param Search A substring to be searched for + \param Format A substitute string + \param Loc A locale used for case insensitive comparison + */ + template + inline void ireplace_all( + SequenceT& Input, + const Range1T& Search, + const Range2T& Format, + const std::locale& Loc=std::locale() ) + { + ::boost::algorithm::find_format_all( + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc)), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_head --------------------------------------------------------------------// + + //! Replace head algorithm + /*! + Replace the head of the input with the given format string. + The head is a prefix of a string of given size. + If the sequence is shorter then required, whole string if + considered to be the head. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param N Length of the head. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT replace_head_copy( + OutputIteratorT Output, + const Range1T& Input, + int N, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace head algorithm + /*! + \overload + */ + template + inline SequenceT replace_head_copy( + const SequenceT& Input, + int N, + const RangeT& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace head algorithm + /*! + Replace the head of the input with the given format string. + The head is a prefix of a string of given size. + If the sequence is shorter then required, the whole string is + considered to be the head. The input sequence is modified in-place. + + \param Input An input string + \param N Length of the head. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \param Format A substitute string + */ + template + inline void replace_head( + SequenceT& Input, + int N, + const RangeT& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::head_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + +// replace_tail --------------------------------------------------------------------// + + //! Replace tail algorithm + /*! + Replace the tail of the input with the given format string. + The tail is a suffix of a string of given size. + If the sequence is shorter then required, whole string is + considered to be the tail. + The result is a modified copy of the input. It is returned as a sequence + or copied to the output iterator. + + \param Output An output iterator to which the result will be copied + \param Input An input string + \param N Length of the tail. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \param Format A substitute string + \return An output iterator pointing just after the last inserted character or + a modified copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template< + typename OutputIteratorT, + typename Range1T, + typename Range2T> + inline OutputIteratorT replace_tail_copy( + OutputIteratorT Output, + const Range1T& Input, + int N, + const Range2T& Format ) + { + return ::boost::algorithm::find_format_copy( + Output, + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace tail algorithm + /*! + \overload + */ + template + inline SequenceT replace_tail_copy( + const SequenceT& Input, + int N, + const RangeT& Format ) + { + return ::boost::algorithm::find_format_copy( + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + //! Replace tail algorithm + /*! + Replace the tail of the input with the given format sequence. + The tail is a suffix of a string of given size. + If the sequence is shorter then required, the whole string is + considered to be the tail. The input sequence is modified in-place. + + \param Input An input string + \param N Length of the tail. + For N>=0, at most N characters are extracted. + For N<0, size(Input)-|N| characters are extracted. + \param Format A substitute string + */ + template + inline void replace_tail( + SequenceT& Input, + int N, + const RangeT& Format ) + { + ::boost::algorithm::find_format( + Input, + ::boost::algorithm::tail_finder(N), + ::boost::algorithm::const_formatter(Format) ); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::replace_range_copy; + using algorithm::replace_range; + using algorithm::replace_first_copy; + using algorithm::replace_first; + using algorithm::ireplace_first_copy; + using algorithm::ireplace_first; + using algorithm::replace_last_copy; + using algorithm::replace_last; + using algorithm::ireplace_last_copy; + using algorithm::ireplace_last; + using algorithm::replace_nth_copy; + using algorithm::replace_nth; + using algorithm::ireplace_nth_copy; + using algorithm::ireplace_nth; + using algorithm::replace_all_copy; + using algorithm::replace_all; + using algorithm::ireplace_all_copy; + using algorithm::ireplace_all; + using algorithm::replace_head_copy; + using algorithm::replace_head; + using algorithm::replace_tail_copy; + using algorithm::replace_tail; + +} // namespace boost + +#endif // BOOST_REPLACE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/sequence_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/sequence_traits.hpp new file mode 100644 index 0000000000..b1ac67e9b3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/sequence_traits.hpp @@ -0,0 +1,193 @@ +// Boost string_algo library sequence_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_SEQUENCE_TRAITS_HPP +#define BOOST_STRING_SEQUENCE_TRAITS_HPP + +#include +#include +#include + +/*! \file + Traits defined in this header are used by various algorithms to achieve + better performance for specific containers. + Traits provide fail-safe defaults. If a container supports some of these + features, it is possible to specialize the specific trait for this container. + For lacking compilers, it is possible of define an override for a specific tester + function. + + Due to a language restriction, it is not currently possible to define specializations for + stl containers without including the corresponding header. To decrease the overhead + needed by this inclusion, user can selectively include a specialization + header for a specific container. They are located in boost/algorithm/string/stl + directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp + header which contains specializations for all stl containers. +*/ + +namespace boost { + namespace algorithm { + +// sequence traits -----------------------------------------------// + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + //! Native replace tester + /*! + Declare an override of this tester function with return + type boost::string_algo::yes_type for a sequence with this property. + + \return yes_type if the container has basic_string like native replace + method. + */ + no_type has_native_replace_tester(...); + + //! Stable iterators tester + /*! + Declare an override of this tester function with return + type boost::string_algo::yes_type for a sequence with this property. + + \return yes_type if the sequence's insert/replace/erase methods do not invalidate + existing iterators. + */ + no_type has_stable_iterators_tester(...); + + //! const time insert tester + /*! + Declare an override of this tester function with return + type boost::string_algo::yes_type for a sequence with this property. + + \return yes_type if the sequence's insert method is working in constant time + */ + no_type has_const_time_insert_tester(...); + + //! const time erase tester + /*! + Declare an override of this tester function with return + type boost::string_algo::yes_type for a sequence with this property. + + \return yes_type if the sequence's erase method is working in constant time + */ + no_type has_const_time_erase_tester(...); + +#endif //BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + //! Native replace trait + /*! + This trait specifies that the sequence has \c std::string like replace method + */ + template< typename T > + class has_native_replace + { + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + private: + static T* t; + public: + BOOST_STATIC_CONSTANT(bool, value=( + sizeof(has_native_replace_tester(t))==sizeof(yes_type) ) ); +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else + BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + + typedef mpl::bool_::value> type; + }; + + + //! Stable iterators trait + /*! + This trait specifies that the sequence has stable iterators. It means + that operations like insert/erase/replace do not invalidate iterators. + */ + template< typename T > + class has_stable_iterators + { +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + private: + static T* t; + public: + BOOST_STATIC_CONSTANT(bool, value=( + sizeof(has_stable_iterators_tester(t))==sizeof(yes_type) ) ); +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else + BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + typedef mpl::bool_::value> type; + }; + + + //! Const time insert trait + /*! + This trait specifies that the sequence's insert method has + constant time complexity. + */ + template< typename T > + class has_const_time_insert + { +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + private: + static T* t; + public: + BOOST_STATIC_CONSTANT(bool, value=( + sizeof(has_const_time_insert_tester(t))==sizeof(yes_type) ) ); +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else + BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + typedef mpl::bool_::value> type; + }; + + + //! Const time erase trait + /*! + This trait specifies that the sequence's erase method has + constant time complexity. + */ + template< typename T > + class has_const_time_erase + { +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + private: + static T* t; + public: + BOOST_STATIC_CONSTANT(bool, value=( + sizeof(has_const_time_erase_tester(t))==sizeof(yes_type) ) ); +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else + BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + typedef mpl::bool_::value> type; + }; + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_SEQUENCE_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/split.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/split.hpp new file mode 100644 index 0000000000..cae712c07f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/split.hpp @@ -0,0 +1,163 @@ +// Boost string_algo library split.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2006. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_SPLIT_HPP +#define BOOST_STRING_SPLIT_HPP + +#include + +#include +#include +#include + +/*! \file + Defines basic split algorithms. + Split algorithms can be used to divide a string + into several parts according to given criteria. + + Each part is copied and added as a new element to the + output container. + Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> +*/ + +namespace boost { + namespace algorithm { + +// find_all ------------------------------------------------------------// + + //! Find all algorithm + /*! + This algorithm finds all occurrences of the search string + in the input. + + Each part is copied and added as a new element to the + output container. + Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> + + \param Result A container that can hold copies of references to the substrings + \param Input A container which will be searched. + \param Search A substring to be searched for. + \return A reference the result + + \note Prior content of the result will be overwritten. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename Range1T, typename Range2T > + inline SequenceSequenceT& find_all( + SequenceSequenceT& Result, + Range1T& Input, + const Range2T& Search) + { + return ::boost::algorithm::iter_find( + Result, + Input, + ::boost::algorithm::first_finder(Search) ); + } + + //! Find all algorithm ( case insensitive ) + /*! + This algorithm finds all occurrences of the search string + in the input. + Each part is copied and added as a new element to the + output container. Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> + + Searching is case insensitive. + + \param Result A container that can hold copies of references to the substrings + \param Input A container which will be searched. + \param Search A substring to be searched for. + \param Loc A locale used for case insensitive comparison + \return A reference the result + + \note Prior content of the result will be overwritten. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename Range1T, typename Range2T > + inline SequenceSequenceT& ifind_all( + SequenceSequenceT& Result, + Range1T& Input, + const Range2T& Search, + const std::locale& Loc=std::locale() ) + { + return ::boost::algorithm::iter_find( + Result, + Input, + ::boost::algorithm::first_finder(Search, is_iequal(Loc) ) ); + } + + +// tokenize -------------------------------------------------------------// + + //! Split algorithm + /*! + Tokenize expression. This function is equivalent to C strtok. Input + sequence is split into tokens, separated by separators. Separators + are given by means of the predicate. + + Each part is copied and added as a new element to the + output container. + Thus the result container must be able to hold copies + of the matches (in a compatible structure like std::string) or + a reference to it (e.g. using the iterator range class). + Examples of such a container are \c std::vector + or \c std::list> + + \param Result A container that can hold copies of references to the substrings + \param Input A container which will be searched. + \param Pred A predicate to identify separators. This predicate is + supposed to return true if a given element is a separator. + \param eCompress If eCompress argument is set to token_compress_on, adjacent + separators are merged together. Otherwise, every two separators + delimit a token. + \return A reference the result + + \note Prior content of the result will be overwritten. + + \note This function provides the strong exception-safety guarantee + */ + template< typename SequenceSequenceT, typename RangeT, typename PredicateT > + inline SequenceSequenceT& split( + SequenceSequenceT& Result, + RangeT& Input, + PredicateT Pred, + token_compress_mode_type eCompress=token_compress_off ) + { + return ::boost::algorithm::iter_split( + Result, + Input, + ::boost::algorithm::token_finder( Pred, eCompress ) ); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::find_all; + using algorithm::ifind_all; + using algorithm::split; + +} // namespace boost + + +#endif // BOOST_STRING_SPLIT_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/list_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/list_traits.hpp new file mode 100644 index 0000000000..ce2379d83b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/list_traits.hpp @@ -0,0 +1,85 @@ +// Boost string_algo library list_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_LIST_TRAITS_HPP +#define BOOST_STRING_STD_LIST_TRAITS_HPP + +#include +#include +#include + +namespace boost { + namespace algorithm { + +// std::list<> traits -----------------------------------------------// + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // stable iterators tester + template + yes_type has_stable_iterators_tester( const ::std::list* ); + + // const time insert tester + template + yes_type has_const_time_insert_tester( const ::std::list* ); + + // const time erase tester + template + yes_type has_const_time_erase_tester( const ::std::list* ); + + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // stable iterators trait + template + class has_stable_iterators< ::std::list > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + // const time insert trait + template + class has_const_time_insert< ::std::list > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + // const time erase trait + template + class has_const_time_erase< ::std::list > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; +#endif + + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_STD_LIST_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/rope_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/rope_traits.hpp new file mode 100644 index 0000000000..c2cd549ceb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/rope_traits.hpp @@ -0,0 +1,101 @@ +// Boost string_algo library string_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_ROPE_TRAITS_HPP +#define BOOST_STRING_STD_ROPE_TRAITS_HPP + +#include +#include +#include + +namespace boost { + namespace algorithm { + +// SGI's std::rope<> traits -----------------------------------------------// + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // native replace tester + template + yes_type has_native_replace_tester( const std::rope* ); + + // stable iterators tester + template + yes_type has_stable_iterators_tester( const std::rope* ); + + // const time insert tester + template + yes_type has_const_time_insert_tester( const std::rope* ); + + // const time erase tester + template + yes_type has_const_time_erase_tester( const std::rope* ); + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // native replace trait + template + class has_native_replace< std::rope > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_ type; + }; + + // stable iterators trait + template + class has_stable_iterators< std::rope > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_ type; + }; + + // const time insert trait + template + class has_const_time_insert< std::rope > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_ type; + }; + + // const time erase trait + template + class has_const_time_erase< std::rope > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_ type; + }; +#endif + + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_ROPE_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/slist_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/slist_traits.hpp new file mode 100644 index 0000000000..7b915a3d4a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/slist_traits.hpp @@ -0,0 +1,85 @@ +// Boost string_algo library slist_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_SLIST_TRAITS_HPP +#define BOOST_STRING_STD_SLIST_TRAITS_HPP + +#include +#include +#include BOOST_SLIST_HEADER +#include + +namespace boost { + namespace algorithm { + +// SGI's std::slist<> traits -----------------------------------------------// + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // stable iterators tester + template + yes_type has_stable_iterators_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist* ); + + // const time insert tester + template + yes_type has_const_time_insert_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist* ); + + // const time erase tester + template + yes_type has_const_time_erase_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist* ); + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // stable iterators trait + template + class has_stable_iterators< BOOST_STD_EXTENSION_NAMESPACE::slist > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + // const time insert trait + template + class has_const_time_insert< BOOST_STD_EXTENSION_NAMESPACE::slist > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; + + // const time erase trait + template + class has_const_time_erase< BOOST_STD_EXTENSION_NAMESPACE::slist > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + typedef mpl::bool_::value> type; + }; +#endif + + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_STD_LIST_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/string_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/string_traits.hpp new file mode 100644 index 0000000000..c466d26b19 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std/string_traits.hpp @@ -0,0 +1,52 @@ +// Boost string_algo library string_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_STRING_TRAITS_HPP +#define BOOST_STRING_STD_STRING_TRAITS_HPP + +#include +#include +#include + +namespace boost { + namespace algorithm { + +// std::basic_string<> traits -----------------------------------------------// + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // native replace tester + template + yes_type has_native_replace_tester( const std::basic_string* ); + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // native replace trait + template + class has_native_replace< std::basic_string > + { + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true } ; +#else + BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + + typedef mpl::bool_::value> type; + }; + + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_LIST_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std_containers_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std_containers_traits.hpp new file mode 100644 index 0000000000..3f02246fda --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/std_containers_traits.hpp @@ -0,0 +1,26 @@ +// Boost string_algo library std_containers_traits.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_STD_CONTAINERS_TRAITS_HPP +#define BOOST_STRING_STD_CONTAINERS_TRAITS_HPP + +/*!\file + This file includes sequence traits for stl containers. +*/ + +#include +#include +#include + +#ifdef BOOST_HAS_SLIST +# include +#endif + +#endif // BOOST_STRING_STD_CONTAINERS_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/trim.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/trim.hpp new file mode 100644 index 0000000000..eb408a35e6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/trim.hpp @@ -0,0 +1,398 @@ +// Boost string_algo library trim.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_TRIM_HPP +#define BOOST_STRING_TRIM_HPP + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +/*! \file + Defines trim algorithms. + Trim algorithms are used to remove trailing and leading spaces from a + sequence (string). Space is recognized using given locales. + + Parametric (\c _if) variants use a predicate (functor) to select which characters + are to be trimmed.. + Functions take a selection predicate as a parameter, which is used to determine + whether a character is a space. Common predicates are provided in classification.hpp header. + +*/ + +namespace boost { + namespace algorithm { + + // left trim -----------------------------------------------// + + + //! Left trim - parametric + /*! + Remove all leading spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The result is a trimmed copy of the input. It is returned as a sequence + or copied to the output iterator + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param IsSpace An unary predicate identifying spaces + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT trim_left_copy_if( + OutputIteratorT Output, + const RangeT& Input, + PredicateT IsSpace) + { + iterator_range::type> lit_range(::boost::as_literal(Input)); + + std::copy( + ::boost::algorithm::detail::trim_begin( + ::boost::begin(lit_range), + ::boost::end(lit_range), + IsSpace ), + ::boost::end(lit_range), + Output); + + return Output; + } + + //! Left trim - parametric + /*! + \overload + */ + template + inline SequenceT trim_left_copy_if(const SequenceT& Input, PredicateT IsSpace) + { + return SequenceT( + ::boost::algorithm::detail::trim_begin( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace ), + ::boost::end(Input)); + } + + //! Left trim - parametric + /*! + Remove all leading spaces from the input. + The result is a trimmed copy of the input. + + \param Input An input sequence + \param Loc a locale used for 'space' classification + \return A trimmed copy of the input + + \note This function provides the strong exception-safety guarantee + */ + template + inline SequenceT trim_left_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) + { + return + ::boost::algorithm::trim_left_copy_if( + Input, + is_space(Loc)); + } + + //! Left trim + /*! + Remove all leading spaces from the input. The supplied predicate is + used to determine which characters are considered spaces. + The input sequence is modified in-place. + + \param Input An input sequence + \param IsSpace An unary predicate identifying spaces + */ + template + inline void trim_left_if(SequenceT& Input, PredicateT IsSpace) + { + Input.erase( + ::boost::begin(Input), + ::boost::algorithm::detail::trim_begin( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace)); + } + + //! Left trim + /*! + Remove all leading spaces from the input. + The Input sequence is modified in-place. + + \param Input An input sequence + \param Loc A locale used for 'space' classification + */ + template + inline void trim_left(SequenceT& Input, const std::locale& Loc=std::locale()) + { + ::boost::algorithm::trim_left_if( + Input, + is_space(Loc)); + } + + // right trim -----------------------------------------------// + + //! Right trim - parametric + /*! + Remove all trailing spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The result is a trimmed copy of the input. It is returned as a sequence + or copied to the output iterator + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param IsSpace An unary predicate identifying spaces + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT trim_right_copy_if( + OutputIteratorT Output, + const RangeT& Input, + PredicateT IsSpace ) + { + iterator_range::type> lit_range(::boost::as_literal(Input)); + + std::copy( + ::boost::begin(lit_range), + ::boost::algorithm::detail::trim_end( + ::boost::begin(lit_range), + ::boost::end(lit_range), + IsSpace ), + Output ); + + return Output; + } + + //! Right trim - parametric + /*! + \overload + */ + template + inline SequenceT trim_right_copy_if(const SequenceT& Input, PredicateT IsSpace) + { + return SequenceT( + ::boost::begin(Input), + ::boost::algorithm::detail::trim_end( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace) + ); + } + + //! Right trim + /*! + Remove all trailing spaces from the input. + The result is a trimmed copy of the input + + \param Input An input sequence + \param Loc A locale used for 'space' classification + \return A trimmed copy of the input + + \note This function provides the strong exception-safety guarantee + */ + template + inline SequenceT trim_right_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) + { + return + ::boost::algorithm::trim_right_copy_if( + Input, + is_space(Loc)); + } + + + //! Right trim - parametric + /*! + Remove all trailing spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The input sequence is modified in-place. + + \param Input An input sequence + \param IsSpace An unary predicate identifying spaces + */ + template + inline void trim_right_if(SequenceT& Input, PredicateT IsSpace) + { + Input.erase( + ::boost::algorithm::detail::trim_end( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace ), + ::boost::end(Input) + ); + } + + + //! Right trim + /*! + Remove all trailing spaces from the input. + The input sequence is modified in-place. + + \param Input An input sequence + \param Loc A locale used for 'space' classification + */ + template + inline void trim_right(SequenceT& Input, const std::locale& Loc=std::locale()) + { + ::boost::algorithm::trim_right_if( + Input, + is_space(Loc) ); + } + + // both side trim -----------------------------------------------// + + //! Trim - parametric + /*! + Remove all trailing and leading spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The result is a trimmed copy of the input. It is returned as a sequence + or copied to the output iterator + + \param Output An output iterator to which the result will be copied + \param Input An input range + \param IsSpace An unary predicate identifying spaces + \return + An output iterator pointing just after the last inserted character or + a copy of the input + + \note The second variant of this function provides the strong exception-safety guarantee + */ + template + inline OutputIteratorT trim_copy_if( + OutputIteratorT Output, + const RangeT& Input, + PredicateT IsSpace) + { + iterator_range::type> lit_range(::boost::as_literal(Input)); + + BOOST_STRING_TYPENAME + range_const_iterator::type TrimEnd= + ::boost::algorithm::detail::trim_end( + ::boost::begin(lit_range), + ::boost::end(lit_range), + IsSpace); + + std::copy( + detail::trim_begin( + ::boost::begin(lit_range), TrimEnd, IsSpace), + TrimEnd, + Output + ); + + return Output; + } + + //! Trim - parametric + /*! + \overload + */ + template + inline SequenceT trim_copy_if(const SequenceT& Input, PredicateT IsSpace) + { + BOOST_STRING_TYPENAME + range_const_iterator::type TrimEnd= + ::boost::algorithm::detail::trim_end( + ::boost::begin(Input), + ::boost::end(Input), + IsSpace); + + return SequenceT( + detail::trim_begin( + ::boost::begin(Input), + TrimEnd, + IsSpace), + TrimEnd + ); + } + + //! Trim + /*! + Remove all leading and trailing spaces from the input. + The result is a trimmed copy of the input + + \param Input An input sequence + \param Loc A locale used for 'space' classification + \return A trimmed copy of the input + + \note This function provides the strong exception-safety guarantee + */ + template + inline SequenceT trim_copy( const SequenceT& Input, const std::locale& Loc=std::locale() ) + { + return + ::boost::algorithm::trim_copy_if( + Input, + is_space(Loc) ); + } + + //! Trim + /*! + Remove all leading and trailing spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. + The input sequence is modified in-place. + + \param Input An input sequence + \param IsSpace An unary predicate identifying spaces + */ + template + inline void trim_if(SequenceT& Input, PredicateT IsSpace) + { + ::boost::algorithm::trim_right_if( Input, IsSpace ); + ::boost::algorithm::trim_left_if( Input, IsSpace ); + } + + //! Trim + /*! + Remove all leading and trailing spaces from the input. + The input sequence is modified in-place. + + \param Input An input sequence + \param Loc A locale used for 'space' classification + */ + template + inline void trim(SequenceT& Input, const std::locale& Loc=std::locale()) + { + ::boost::algorithm::trim_if( + Input, + is_space( Loc ) ); + } + + } // namespace algorithm + + // pull names to the boost namespace + using algorithm::trim_left; + using algorithm::trim_left_if; + using algorithm::trim_left_copy; + using algorithm::trim_left_copy_if; + using algorithm::trim_right; + using algorithm::trim_right_if; + using algorithm::trim_right_copy; + using algorithm::trim_right_copy_if; + using algorithm::trim; + using algorithm::trim_if; + using algorithm::trim_copy; + using algorithm::trim_copy_if; + +} // namespace boost + +#endif // BOOST_STRING_TRIM_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/yes_no_type.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/yes_no_type.hpp new file mode 100644 index 0000000000..b76cc6c155 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string/yes_no_type.hpp @@ -0,0 +1,33 @@ +// Boost string_algo library yes_no_type.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_YES_NO_TYPE_DETAIL_HPP +#define BOOST_STRING_YES_NO_TYPE_DETAIL_HPP + +namespace boost { + namespace algorithm { + + // taken from boost mailing-list + // when yes_no_type will become officially + // a part of boost distribution, this header + // will be deprecated + template struct size_descriptor + { + typedef char (& type)[I]; + }; + + typedef size_descriptor<1>::type yes_type; + typedef size_descriptor<2>::type no_type; + + } // namespace algorithm +} // namespace boost + + +#endif // BOOST_STRING_YES_NO_TYPE_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string_regex.hpp b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string_regex.hpp new file mode 100644 index 0000000000..6fd8ad9fa1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/algorithm/string_regex.hpp @@ -0,0 +1,23 @@ +// Boost string_algo library string_regex.hpp header file ---------------------------// + +// Copyright Pavol Droba 2002-2004. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for updates, documentation, and revision history. + +#ifndef BOOST_STRING_ALGO_REGEX_HPP +#define BOOST_STRING_ALGO_REGEX_HPP + +/*! \file + Cumulative include for string_algo library. + In addtion to string.hpp contains also regex-related stuff. +*/ + +#include +#include +#include + +#endif // BOOST_STRING_ALGO_REGEX_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/aligned_storage.hpp b/deal.II/contrib/boost-1.45.0/include/boost/aligned_storage.hpp new file mode 100644 index 0000000000..ce277ab702 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/aligned_storage.hpp @@ -0,0 +1,181 @@ +//----------------------------------------------------------------------------- +// boost aligned_storage.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2002-2003 +// Eric Friedman, Itay Maman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ALIGNED_STORAGE_HPP +#define BOOST_ALIGNED_STORAGE_HPP + +#include // for std::size_t + +#include "boost/config.hpp" +#include "boost/detail/workaround.hpp" +#include "boost/type_traits/alignment_of.hpp" +#include "boost/type_traits/type_with_alignment.hpp" +#include "boost/type_traits/is_pod.hpp" + +#include "boost/mpl/eval_if.hpp" +#include "boost/mpl/identity.hpp" + +#include "boost/type_traits/detail/bool_trait_def.hpp" + +namespace boost { + +namespace detail { namespace aligned_storage { + +BOOST_STATIC_CONSTANT( + std::size_t + , alignment_of_max_align = ::boost::alignment_of::value + ); + +// +// To be TR1 conforming this must be a POD type: +// +template < + std::size_t size_ + , std::size_t alignment_ +> +struct aligned_storage_imp +{ + union data_t + { + char buf[size_]; + + typename mpl::eval_if_c< + alignment_ == std::size_t(-1) + , mpl::identity + , type_with_alignment + >::type align_; + } data_; + void* address() const { return const_cast(this); } +}; + +template< std::size_t alignment_ > +struct aligned_storage_imp<0u,alignment_> +{ + /* intentionally empty */ + void* address() const { return 0; } +}; + +}} // namespace detail::aligned_storage + +template < + std::size_t size_ + , std::size_t alignment_ = std::size_t(-1) +> +class aligned_storage : +#ifndef __BORLANDC__ + private +#else + public +#endif + detail::aligned_storage::aligned_storage_imp +{ + +public: // constants + + typedef detail::aligned_storage::aligned_storage_imp type; + + BOOST_STATIC_CONSTANT( + std::size_t + , size = size_ + ); + BOOST_STATIC_CONSTANT( + std::size_t + , alignment = ( + alignment_ == std::size_t(-1) + ? ::boost::detail::aligned_storage::alignment_of_max_align + : alignment_ + ) + ); + +#if defined(__GNUC__) &&\ + (__GNUC__ > 3) ||\ + (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 ||\ + (__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >=3))) + +private: // noncopyable + + aligned_storage(const aligned_storage&); + aligned_storage& operator=(const aligned_storage&); + +#else // gcc less than 3.2.3 + +public: // _should_ be noncopyable, but GCC compiler emits error + + aligned_storage(const aligned_storage&); + aligned_storage& operator=(const aligned_storage&); + +#endif // gcc < 3.2.3 workaround + +public: // structors + + aligned_storage() + { + } + + ~aligned_storage() + { + } + +public: // accessors + + void* address() + { + return static_cast(this)->address(); + } + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + + const void* address() const + { + return static_cast(this)->address(); + } + +#else // MSVC6 + + const void* address() const; + +#endif // MSVC6 workaround + +}; + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +// MSVC6 seems not to like inline functions with const void* returns, so we +// declare the following here: + +template +const void* aligned_storage::address() const +{ + return const_cast< aligned_storage* >(this)->address(); +} + +#endif // MSVC6 workaround + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +// +// Make sure that is_pod recognises aligned_storage<>::type +// as a POD (Note that aligned_storage<> itself is not a POD): +// +template +struct is_pod > + BOOST_TT_AUX_BOOL_C_BASE(true) +{ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) +}; +#endif + + +} // namespace boost + +#include "boost/type_traits/detail/bool_trait_undef.hpp" + +#endif // BOOST_ALIGNED_STORAGE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/any.hpp b/deal.II/contrib/boost-1.45.0/include/boost/any.hpp new file mode 100644 index 0000000000..a8c654c373 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/any.hpp @@ -0,0 +1,253 @@ +// See http://www.boost.org/libs/any for Documentation. + +#ifndef BOOST_ANY_INCLUDED +#define BOOST_ANY_INCLUDED + +// what: variant type boost::any +// who: contributed by Kevlin Henney, +// with features contributed and bugs found by +// Ed Brey, Mark Rodgers, Peter Dimov, and James Curran +// when: July 2001 +// where: tested with BCC 5.5, MSVC 6.0, and g++ 2.95 + +#include +#include + +#include "boost/config.hpp" +#include +#include +#include +#include + +// See boost/python/type_id.hpp +// TODO: add BOOST_TYPEID_COMPARE_BY_NAME to config.hpp +# if (defined(__GNUC__) && __GNUC__ >= 3) \ + || defined(_AIX) \ + || ( defined(__sgi) && defined(__host_mips)) \ + || (defined(__hpux) && defined(__HP_aCC)) \ + || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) +# define BOOST_AUX_ANY_TYPE_ID_NAME +#include +# endif + +namespace boost +{ + class any + { + public: // structors + + any() + : content(0) + { + } + + template + any(const ValueType & value) + : content(new holder(value)) + { + } + + any(const any & other) + : content(other.content ? other.content->clone() : 0) + { + } + + ~any() + { + delete content; + } + + public: // modifiers + + any & swap(any & rhs) + { + std::swap(content, rhs.content); + return *this; + } + + template + any & operator=(const ValueType & rhs) + { + any(rhs).swap(*this); + return *this; + } + + any & operator=(any rhs) + { + rhs.swap(*this); + return *this; + } + + public: // queries + + bool empty() const + { + return !content; + } + + const std::type_info & type() const + { + return content ? content->type() : typeid(void); + } + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + private: // types +#else + public: // types (public so any_cast can be non-friend) +#endif + + class placeholder + { + public: // structors + + virtual ~placeholder() + { + } + + public: // queries + + virtual const std::type_info & type() const = 0; + + virtual placeholder * clone() const = 0; + + }; + + template + class holder : public placeholder + { + public: // structors + + holder(const ValueType & value) + : held(value) + { + } + + public: // queries + + virtual const std::type_info & type() const + { + return typeid(ValueType); + } + + virtual placeholder * clone() const + { + return new holder(held); + } + + public: // representation + + ValueType held; + + private: // intentionally left unimplemented + holder & operator=(const holder &); + }; + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + + private: // representation + + template + friend ValueType * any_cast(any *); + + template + friend ValueType * unsafe_any_cast(any *); + +#else + + public: // representation (public so any_cast can be non-friend) + +#endif + + placeholder * content; + + }; + + class bad_any_cast : public std::bad_cast + { + public: + virtual const char * what() const throw() + { + return "boost::bad_any_cast: " + "failed conversion using boost::any_cast"; + } + }; + + template + ValueType * any_cast(any * operand) + { + return operand && +#ifdef BOOST_AUX_ANY_TYPE_ID_NAME + std::strcmp(operand->type().name(), typeid(ValueType).name()) == 0 +#else + operand->type() == typeid(ValueType) +#endif + ? &static_cast *>(operand->content)->held + : 0; + } + + template + inline const ValueType * any_cast(const any * operand) + { + return any_cast(const_cast(operand)); + } + + template + ValueType any_cast(any & operand) + { + typedef BOOST_DEDUCED_TYPENAME remove_reference::type nonref; + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // If 'nonref' is still reference type, it means the user has not + // specialized 'remove_reference'. + + // Please use BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro + // to generate specialization of remove_reference for your class + // See type traits library documentation for details + BOOST_STATIC_ASSERT(!is_reference::value); +#endif + + nonref * result = any_cast(&operand); + if(!result) + boost::throw_exception(bad_any_cast()); + return *result; + } + + template + inline ValueType any_cast(const any & operand) + { + typedef BOOST_DEDUCED_TYPENAME remove_reference::type nonref; + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // The comment in the above version of 'any_cast' explains when this + // assert is fired and what to do. + BOOST_STATIC_ASSERT(!is_reference::value); +#endif + + return any_cast(const_cast(operand)); + } + + // Note: The "unsafe" versions of any_cast are not part of the + // public interface and may be removed at any time. They are + // required where we know what type is stored in the any and can't + // use typeid() comparison, e.g., when our types may travel across + // different shared libraries. + template + inline ValueType * unsafe_any_cast(any * operand) + { + return &static_cast *>(operand->content)->held; + } + + template + inline const ValueType * unsafe_any_cast(const any * operand) + { + return unsafe_any_cast(const_cast(operand)); + } +} + +// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/add_facet.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/add_facet.hpp new file mode 100644 index 0000000000..6bafe9bdb2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/add_facet.hpp @@ -0,0 +1,55 @@ +#ifndef BOOST_ARCHIVE_ADD_FACET_HPP +#define BOOST_ARCHIVE_ADD_FACET_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// add_facet.hpp + +// (C) Copyright 2003 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +// does STLport uses native STL for locales? +#if (defined(__SGI_STL_PORT)&& defined(_STLP_NO_OWN_IOSTREAMS)) +// and this native STL lib is old Dinkumware (has not defined _CPPLIB_VER) +# if (defined(_YVALS) && !defined(__IBMCPP__)) || !defined(_CPPLIB_VER) +# define BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT +# endif +#endif + +namespace boost { +namespace archive { + +template +inline std::locale * +add_facet(const std::locale &l, Facet * f){ + return + #if defined BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT + // std namespace used for native locale + new std::locale(std::_Addfac(l, f)); + #elif BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // old Dinkumwar + // std namespace used for native locale + new std::locale(std::_Addfac(l, f)); + #else + // standard compatible + new std::locale(l, f); + #endif +} + +} // namespace archive +} // namespace boost + +#undef BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT + +#endif // BOOST_ARCHIVE_ADD_FACET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/archive_exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/archive_exception.hpp new file mode 100644 index 0000000000..242f752882 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/archive_exception.hpp @@ -0,0 +1,97 @@ +#ifndef BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP +#define BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// archive/archive_exception.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#include +#include +#include + +// note: the only reason this is in here is that windows header +// includes #define exception_code _exception_code (arrrgghhhh!). +// the most expedient way to address this is be sure that this +// header is always included whenever this header file is included. +#if defined(BOOST_WINDOWS) +#include +#endif + +#include // must be the last header + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// exceptions thrown by archives +// +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) archive_exception : + public virtual std::exception +{ +public: + typedef enum { + no_exception, // initialized without code + other_exception, // any excepton not listed below + unregistered_class, // attempt to serialize a pointer of an + // an unregistered class + invalid_signature, // first line of archive does not contain + // expected string + unsupported_version,// archive created with library version + // subsequent to this one + pointer_conflict, // an attempt has been made to directly + // serialize an object which has + // already been serialzed through a pointer. + // Were this permited, the archive load would result + // in the creation of an extra copy of the obect. + incompatible_native_format, // attempt to read native binary format + // on incompatible platform + array_size_too_short,// array being loaded doesn't fit in array allocated + input_stream_error, // error on input stream + invalid_class_name, // class name greater than the maximum permitted. + // most likely a corrupted archive or an attempt + // to insert virus via buffer overrun method. + unregistered_cast, // base - derived relationship not registered with + // void_cast_register + unsupported_class_version, // type saved with a version # greater than the + // one used by the program. This indicates that the proggram + // needs to be rebuilt. + multiple_code_instantiation, // code for implementing serialization for some + // type has been instantiated in more than one module. + output_stream_error // error on input stream + } exception_code; +protected: + std::string m_msg; +public: + exception_code code; + archive_exception( + exception_code c, + const char * e1 = NULL, + const char * e2 = NULL + ); + ~archive_exception() throw (); + virtual const char *what( ) const throw(); +protected: + archive_exception(); +}; + +}// namespace archive +}// namespace boost + +#include // pops abi_suffix.hpp pragmas + +#endif //BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_archive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_archive.hpp new file mode 100644 index 0000000000..b6769dddbb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_archive.hpp @@ -0,0 +1,300 @@ +#ifndef BOOST_ARCHIVE_BASIC_ARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_ARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_archive.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include // size_t +#include +#include + +#include +#include // must be the last header + +namespace boost { +namespace archive { + +#if defined(_MSC_VER) +#pragma warning( push ) +#pragma warning( disable : 4244 4267 ) +#endif + +/* NOTE : Warning : Warning : Warning : Warning : Warning + * Don't ever changes this. If you do, they previously created + * binary archives won't be readable !!! + */ +class library_version_type { +private: + typedef uint_least16_t base_type; + base_type t; +public: + library_version_type(): t(0) {}; + explicit library_version_type(const unsigned int & t_) : t(t_){ + assert(t_ <= boost::integer_traits::const_max); + } + library_version_type(const library_version_type & t_) : + t(t_.t) + {} + library_version_type & operator=(const library_version_type & rhs){ + t = rhs.t; + return *this; + } + // used for text output + operator base_type () const { + return t; + } + // used for text input + operator base_type & (){ + return t; + } + bool operator==(const library_version_type & rhs) const { + return t == rhs.t; + } + bool operator<(const library_version_type & rhs) const { + return t < rhs.t; + } +}; + +BOOST_ARCHIVE_DECL(library_version_type) +BOOST_ARCHIVE_VERSION(); + +class version_type { +private: + typedef uint_least32_t base_type; + base_type t; +public: + // should be private - but MPI fails if it's not!!! + version_type(): t(0) {}; + explicit version_type(const unsigned int & t_) : t(t_){ + assert(t_ <= boost::integer_traits::const_max); + } + version_type(const version_type & t_) : + t(t_.t) + {} + version_type & operator=(const version_type & rhs){ + t = rhs.t; + return *this; + } + // used for text output + operator base_type () const { + return t; + } + // used for text intput + operator base_type & (){ + return t; + } + bool operator==(const version_type & rhs) const { + return t == rhs.t; + } + bool operator<(const version_type & rhs) const { + return t < rhs.t; + } +}; + +class class_id_type { +private: + typedef int_least16_t base_type; + base_type t; +public: + // should be private - but then can't use BOOST_STRONG_TYPE below + class_id_type() : t(0) {}; + explicit class_id_type(const int t_) : t(t_){ + assert(t_ <= boost::integer_traits::const_max); + } + explicit class_id_type(const std::size_t t_) : t(t_){ + // assert(t_ <= boost::integer_traits::const_max); + } + class_id_type(const class_id_type & t_) : + t(t_.t) + {} + class_id_type & operator=(const class_id_type & rhs){ + t = rhs.t; + return *this; + } + + // used for text output + operator int () const { + return t; + } + // used for text input + operator int_least16_t &() { + return t; + } + bool operator==(const class_id_type & rhs) const { + return t == rhs.t; + } + bool operator<(const class_id_type & rhs) const { + return t < rhs.t; + } +}; + +#define NULL_POINTER_TAG boost::archive::class_id_type(-1) + +class object_id_type { +private: + typedef uint_least32_t base_type; + base_type t; +public: + object_id_type(): t(0) {}; + explicit object_id_type(const unsigned int & t_) : t(t_){ + assert(t_ <= boost::integer_traits::const_max); + } + object_id_type(const object_id_type & t_) : + t(t_.t) + {} + object_id_type & operator=(const object_id_type & rhs){ + t = rhs.t; + return *this; + } + // used for text output + operator uint_least32_t () const { + return t; + } + // used for text input + operator uint_least32_t & () { + return t; + } + bool operator==(const object_id_type & rhs) const { + return t == rhs.t; + } + bool operator<(const object_id_type & rhs) const { + return t < rhs.t; + } +}; + +#if defined(_MSC_VER) +#pragma warning( pop ) +#endif + +struct tracking_type { + bool t; + explicit tracking_type(const bool t_ = false) + : t(t_) + {}; + tracking_type(const tracking_type & t_) + : t(t_.t) + {} + operator bool () const { + return t; + }; + operator bool & () { + return t; + }; + tracking_type & operator=(const bool t_){ + t = t_; + return *this; + } + bool operator==(const tracking_type & rhs) const { + return t == rhs.t; + } + bool operator==(const bool & rhs) const { + return t == rhs; + } + tracking_type & operator=(const tracking_type & rhs){ + t = rhs.t; + return *this; + } +}; + +struct class_name_type : + private boost::noncopyable +{ + char *t; + operator const char * & () const { + return const_cast(t); + } + operator char * () { + return t; + } + explicit class_name_type(const char *key_) + : t(const_cast(key_)){} + explicit class_name_type(char *key_) + : t(key_){} + class_name_type & operator=(const class_name_type & rhs){ + t = rhs.t; + return *this; + } +}; + +enum archive_flags { + no_header = 1, // suppress archive header info + no_codecvt = 2, // suppress alteration of codecvt facet + no_xml_tag_checking = 4, // suppress checking of xml tags + no_tracking = 8, // suppress ALL tracking + flags_last = 8 +}; + +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_SIGNATURE(); + +/* NOTE : Warning : Warning : Warning : Warning : Warning + * If any of these are changed to different sized types, + * binary_iarchive won't be able to read older archives + * unless you rev the library version and include conditional + * code based on the library version. There is nothing + * inherently wrong in doing this - but you have to be super + * careful because it's easy to get wrong and start breaking + * old archives !!! + */ + +#define BOOST_ARCHIVE_STRONG_TYPEDEF(T, D) \ + class D : public T { \ + public: \ + explicit D(const T t) : T(t){} \ + }; \ +/**/ + +BOOST_ARCHIVE_STRONG_TYPEDEF(class_id_type, class_id_reference_type) +BOOST_ARCHIVE_STRONG_TYPEDEF(class_id_type, class_id_optional_type) +BOOST_ARCHIVE_STRONG_TYPEDEF(object_id_type, object_reference_type) + +}// namespace archive +}// namespace boost + +#include // pops abi_suffix.hpp pragmas + +#include + +// set implementation level to primitive for all types +// used internally by the serialization library + +BOOST_CLASS_IMPLEMENTATION(boost::archive::library_version_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::archive::version_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_reference_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_optional_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::archive::class_name_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::archive::object_id_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::archive::object_reference_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type) + +#include + +// set types used internally by the serialization library +// to be bitwise serializable + +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::library_version_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::version_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_reference_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_optional_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_name_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::object_id_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::object_reference_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::tracking_type) + +#endif //BOOST_ARCHIVE_BASIC_ARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_iarchive.hpp new file mode 100644 index 0000000000..9567395559 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_iarchive.hpp @@ -0,0 +1,196 @@ +#ifndef BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_binary_iarchive.hpp +// +// archives stored as native binary - this should be the fastest way +// to archive the state of a group of obects. It makes no attempt to +// convert to any canonical form. + +// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE +// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +#include // must be the last header + +namespace boost { +namespace archive { + +///////////////////////////////////////////////////////////////////////// +// class basic_binary_iarchive - read serialized objects from a input binary stream +template +class basic_binary_iarchive : + public detail::common_iarchive +{ +protected: +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +public: +#elif defined(BOOST_MSVC) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive; +#else + friend class detail::interface_iarchive; +#endif + // intermediate level to support override of operators + // fot templates in the absence of partial function + // template ordering. If we get here pass to base class + // note extra nonsense to sneak it pass the borland compiers + typedef detail::common_iarchive detail_common_iarchive; + template + void load_override(T & t, BOOST_PFTO int version){ + this->detail_common_iarchive::load_override(t, static_cast(version)); + } + + // include these to trap a change in binary format which + // isn't specifically handled + BOOST_STATIC_ASSERT(sizeof(tracking_type) == sizeof(bool)); + // upto 32K classes + BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t)); + BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t)); + // upto 2G objects + BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t)); + BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); + + // binary files don't include the optional information + void load_override(class_id_optional_type & /* t */, int){} + + void load_override(class_id_type & t, int version){ + library_version_type lvt = this->get_library_version(); + if(boost::archive::library_version_type(7) < lvt){ + this->detail_common_iarchive::load_override(t, version); + } + else + if(boost::archive::library_version_type(6) < lvt){ + int_least16_t x=0; + * this->This() >> x; + t = boost::archive::class_id_type(x); + } + else{ + int x=0; + * this->This() >> x; + t = boost::archive::class_id_type(x); + } + } + void load_override(class_id_reference_type & t, int version){ + load_override(static_cast(t), version); + } +#if 0 + void load_override(class_id_reference_type & t, int version){ + library_version_type lvt = this->get_library_version(); + if(boost::archive::library_version_type(7) < lvt){ + this->detail_common_iarchive::load_override(t, version); + } + else + if(boost::archive::library_version_type(6) < lvt){ + int_least16_t x=0; + * this->This() >> x; + t = boost::archive::class_id_reference_type( + boost::archive::class_id_type(x) + ); + } + else{ + int x=0; + * this->This() >> x; + t = boost::archive::class_id_reference_type( + boost::archive::class_id_type(x) + ); + } + } +#endif + + void load_override(version_type & t, int version){ + library_version_type lvt = this->get_library_version(); + if(boost::archive::library_version_type(7) < lvt){ + this->detail_common_iarchive::load_override(t, version); + } + else + if(boost::archive::library_version_type(6) < lvt){ + uint_least16_t x=0; + * this->This() >> x; + t = boost::archive::version_type(x); + } + else{ + unsigned int x=0; + * this->This() >> x; + t = boost::archive::version_type(x); + } + } + + void load_override(boost::serialization::item_version_type & t, int version){ + library_version_type lvt = this->get_library_version(); + if(boost::archive::library_version_type(7) < lvt){ + this->detail_common_iarchive::load_override(t, version); + } + else + if(boost::archive::library_version_type(6) < lvt){ + uint_least16_t x=0; + * this->This() >> x; + t = boost::serialization::item_version_type(x); + } + else{ + unsigned int x=0; + * this->This() >> x; + t = boost::serialization::item_version_type(x); + } + } + + void load_override(serialization::collection_size_type & t, int version){ + if(boost::archive::library_version_type(5) < this->get_library_version()){ + this->detail_common_iarchive::load_override(t, version); + } + else{ + unsigned int x=0; + * this->This() >> x; + t = serialization::collection_size_type(x); + } + } + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_override(class_name_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + init(); + + basic_binary_iarchive(unsigned int flags) : + detail::common_iarchive(flags) + {} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_iprimitive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_iprimitive.hpp new file mode 100644 index 0000000000..a5b6bd4aa1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_iprimitive.hpp @@ -0,0 +1,190 @@ +#ifndef BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP +#define BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#if defined(_MSC_VER) +#pragma warning( disable : 4800 ) +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_binary_iprimitive.hpp +// +// archives stored as native binary - this should be the fastest way +// to archive the state of a group of obects. It makes no attempt to +// convert to any canonical form. + +// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE +// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include // std::memcpy +#include // std::size_t +#include // basic_streambuf +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::memcpy; + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include // must be the last header + +namespace boost { +namespace archive { + +///////////////////////////////////////////////////////////////////////////// +// class binary_iarchive - read serialized objects from a input binary stream +template +class basic_binary_iprimitive +{ +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + friend class load_access; +protected: +#else +public: +#endif + std::basic_streambuf & m_sb; + // return a pointer to the most derived class + Archive * This(){ + return static_cast(this); + } + + #ifndef BOOST_NO_STD_LOCALE + boost::scoped_ptr archive_locale; + basic_streambuf_locale_saver locale_saver; + #endif + + // main template for serilization of primitive types + template + void load(T & t){ + load_binary(& t, sizeof(T)); + } + + ///////////////////////////////////////////////////////// + // fundamental types that need special treatment + + // trap usage of invalid uninitialized boolean + void load(bool & t){ + load_binary(& t, sizeof(t)); + int i = t; + assert(0 == i || 1 == i); + (void)i; // warning suppression for release builds. + } + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load(std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load(std::wstring &ws); + #endif + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load(char * t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load(wchar_t * t); + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + init(); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + basic_binary_iprimitive( + std::basic_streambuf & sb, + bool no_codecvt + ); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + ~basic_binary_iprimitive(); +public: + // we provide an optimized load for all fundamental types + // typedef serialization::is_bitwise_serializable + // use_array_optimization; + struct use_array_optimization { + template + #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) + struct apply { + typedef BOOST_DEDUCED_TYPENAME boost::serialization::is_bitwise_serializable< T >::type type; + }; + #else + struct apply : public boost::serialization::is_bitwise_serializable< T > {}; + #endif + }; + + // the optimized load_array dispatches to load_binary + template + void load_array(serialization::array& a, unsigned int) + { + load_binary(a.address(),a.count()*sizeof(ValueType)); + } + + void + load_binary(void *address, std::size_t count); +}; + +template +inline void +basic_binary_iprimitive::load_binary( + void *address, + std::size_t count +){ + // note: an optimizer should eliminate the following for char files + assert( + static_cast(count / sizeof(Elem)) + <= boost::integer_traits::const_max + ); + std::streamsize s = static_cast(count / sizeof(Elem)); + std::streamsize scount = m_sb.sgetn( + static_cast(address), + s + ); + if(scount != s) + boost::serialization::throw_exception( + archive_exception(archive_exception::input_stream_error) + ); + // note: an optimizer should eliminate the following for char files + assert(count % sizeof(Elem) <= boost::integer_traits::const_max); + s = static_cast(count % sizeof(Elem)); + if(0 < s){ +// if(is.fail()) +// boost::serialization::throw_exception( +// archive_exception(archive_exception::stream_error) +// ); + Elem t; + scount = m_sb.sgetn(& t, 1); + if(scount != 1) + boost::serialization::throw_exception( + archive_exception(archive_exception::input_stream_error) + ); + std::memcpy(static_cast(address) + (count - s), &t, s); + } +} + +} // namespace archive +} // namespace boost + +#include // pop pragmas + +#endif // BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_oarchive.hpp new file mode 100644 index 0000000000..5321bf0b63 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_oarchive.hpp @@ -0,0 +1,180 @@ +#ifndef BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_binary_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as native binary - this should be the fastest way +// to archive the state of a group of obects. It makes no attempt to +// convert to any canonical form. + +// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE +// ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// class basic_binary_oarchive - write serialized objects to a binary output stream +// note: this archive has no pretensions to portability. Archive format +// may vary across machine architectures and compilers. About the only +// guarentee is that an archive created with this code will be readable +// by a program built with the same tools for the same machne. This class +// does have the virtue of buiding the smalles archive in the minimum amount +// of time. So under some circumstances it may be he right choice. +template +class basic_binary_oarchive : + public archive::detail::common_oarchive +{ +protected: +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +public: +#elif defined(BOOST_MSVC) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive; +#else + friend class detail::interface_oarchive; +#endif + // any datatype not specifed below will be handled by base class + typedef detail::common_oarchive detail_common_oarchive; + template + void save_override(const T & t, BOOST_PFTO int version){ + this->detail_common_oarchive::save_override(t, static_cast(version)); + } + + // include these to trap a change in binary format which + // isn't specifically handled + BOOST_STATIC_ASSERT(sizeof(tracking_type) == sizeof(bool)); + // upto 32K classes + BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t)); + BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t)); + // upto 2G objects + BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t)); + BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); + + // binary files don't include the optional information + void save_override(const class_id_optional_type & /* t */, int){} + + // enable this if we decide to support generation of previous versions + #if 0 + void save_override(const boost::archive::version_type & t, int version){ + library_version_type lvt = this->get_library_version(); + if(boost::archive::library_version_type(7) < lvt){ + this->detail_common_oarchive::save_override(t, version); + } + else + if(boost::archive::library_version_type(6) < lvt){ + const boost::uint_least16_t x = t; + * this->This() << x; + } + else{ + const unsigned int x = t; + * this->This() << x; + } + } + void save_override(const boost::serialization::item_version_type & t, int version){ + library_version_type lvt = this->get_library_version(); + if(boost::archive::library_version_type(7) < lvt){ + this->detail_common_oarchive::save_override(t, version); + } + else + if(boost::archive::library_version_type(6) < lvt){ + const boost::uint_least16_t x = t; + * this->This() << x; + } + else{ + const unsigned int x = t; + * this->This() << x; + } + } + + void save_override(class_id_type & t, int version){ + library_version_type lvt = this->get_library_version(); + if(boost::archive::library_version_type(7) < lvt){ + this->detail_common_oarchive::save_override(t, version); + } + else + if(boost::archive::library_version_type(6) < lvt){ + const boost::int_least16_t x = t; + * this->This() << x; + } + else{ + const int x = t; + * this->This() << x; + } + } + void save_override(class_id_reference_type & t, int version){ + save_override(static_cast(t), version); + } + + #endif + + // explicitly convert to char * to avoid compile ambiguities + void save_override(const class_name_type & t, int){ + const std::string s(t); + * this->This() << s; + } + + #if 0 + void save_override(const serialization::collection_size_type & t, int){ + if (get_library_version() < boost::archive::library_version_type(6)){ + unsigned int x=0; + * this->This() >> x; + t = serialization::collection_size_type(x); + } + else{ + * this->This() >> t; + } + } + #endif + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + init(); + + basic_binary_oarchive(unsigned int flags) : + detail::common_oarchive(flags) + {} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_oprimitive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_oprimitive.hpp new file mode 100644 index 0000000000..fb0485881b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_binary_oprimitive.hpp @@ -0,0 +1,184 @@ +#ifndef BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP +#define BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_binary_oprimitive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as native binary - this should be the fastest way +// to archive the state of a group of obects. It makes no attempt to +// convert to any canonical form. + +// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE +// ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON + +#include +#include +#include +#include // basic_streambuf +#include +#include // size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include // must be the last header + +namespace boost { +namespace archive { + +///////////////////////////////////////////////////////////////////////// +// class basic_binary_oprimitive - binary output of prmitives + +template +class basic_binary_oprimitive +{ +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + friend class save_access; +protected: +#else +public: +#endif + std::basic_streambuf & m_sb; + // return a pointer to the most derived class + Archive * This(){ + return static_cast(this); + } + #ifndef BOOST_NO_STD_LOCALE + boost::scoped_ptr archive_locale; + basic_streambuf_locale_saver locale_saver; + #endif + // default saving of primitives. + template + void save(const T & t) + { + save_binary(& t, sizeof(T)); + } + + ///////////////////////////////////////////////////////// + // fundamental types that need special treatment + + // trap usage of invalid uninitialized boolean which would + // otherwise crash on load. + void save(const bool t){ + assert(0 == static_cast(t) || 1 == static_cast(t)); + save_binary(& t, sizeof(t)); + } + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save(const std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save(const std::wstring &ws); + #endif + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save(const char * t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save(const wchar_t * t); + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + init(); + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + basic_binary_oprimitive( + std::basic_streambuf & sb, + bool no_codecvt + ); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + ~basic_binary_oprimitive(); +public: + + // we provide an optimized save for all fundamental types + // typedef serialization::is_bitwise_serializable + // use_array_optimization; + // workaround without using mpl lambdas + struct use_array_optimization { + template + #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) + struct apply { + typedef BOOST_DEDUCED_TYPENAME boost::serialization::is_bitwise_serializable< T >::type type; + }; + #else + struct apply : public boost::serialization::is_bitwise_serializable< T > {}; + #endif + }; + + + // the optimized save_array dispatches to save_binary + template + void save_array(boost::serialization::array const& a, unsigned int) + { + save_binary(a.address(),a.count()*sizeof(ValueType)); + } + + void save_binary(const void *address, std::size_t count); +}; + +template +inline void +basic_binary_oprimitive::save_binary( + const void *address, + std::size_t count +){ + //assert( + // static_cast((std::numeric_limits::max)()) >= count + //); + // note: if the following assertions fail + // a likely cause is that the output stream is set to "text" + // mode where by cr characters recieve special treatment. + // be sure that the output stream is opened with ios::binary + //if(os.fail()) + // boost::serialization::throw_exception( + // archive_exception(archive_exception::output_stream_error) + // ); + // figure number of elements to output - round up + count = ( count + sizeof(Elem) - 1) + / sizeof(Elem); + assert(count <= std::size_t(boost::integer_traits::const_max)); + std::streamsize scount = m_sb.sputn( + static_cast(address), + static_cast(count) + ); + if(count != static_cast(scount)) + boost::serialization::throw_exception( + archive_exception(archive_exception::output_stream_error) + ); + //os.write( + // static_cast(address), + // count + //); + //assert(os.good()); +} + +} //namespace boost +} //namespace archive + +#include // pop pragmas + +#endif // BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_streambuf_locale_saver.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_streambuf_locale_saver.hpp new file mode 100644 index 0000000000..ca764e1048 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_streambuf_locale_saver.hpp @@ -0,0 +1,73 @@ +#ifndef BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP +#define BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_streambuf_local_saver.hpp + +// (C) Copyright 2005 Robert Ramey - http://www.rrsd.com + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// note derived from boost/io/ios_state.hpp +// Copyright 2002, 2005 Daryle Walker. Use, modification, and distribution +// are subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_NO_STD_LOCALE + +#include // for std::locale +#include // for std::basic_streambuf + +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost{ +namespace archive{ + +template < typename Ch, class Tr > +class basic_streambuf_locale_saver : + private boost::noncopyable +{ +public: + typedef ::std::basic_streambuf state_type; + typedef ::std::locale aspect_type; + explicit basic_streambuf_locale_saver( state_type &s ) + : s_save_( s ), a_save_( s.getloc() ) + {} + basic_streambuf_locale_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.pubimbue(a) ) + {} + ~basic_streambuf_locale_saver() + { this->restore(); } + void restore() + { s_save_.pubimbue( a_save_ ); } +private: + state_type & s_save_; + aspect_type const a_save_; +}; + +} // archive +} // boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_NO_STD_LOCALE +#endif // BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_iarchive.hpp new file mode 100644 index 0000000000..729d51aadf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_iarchive.hpp @@ -0,0 +1,91 @@ +#ifndef BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as text - note these ar templated on the basic +// stream templates to accommodate wide (and other?) kind of characters +// +// note the fact that on libraries without wide characters, ostream is +// is not a specialization of basic_ostream which in fact is not defined +// in such cases. So we can't use basic_ostream but rather +// use two template parameters + +#include +#include +#include + +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +///////////////////////////////////////////////////////////////////////// +// class basic_text_iarchive - read serialized objects from a input text stream +template +class basic_text_iarchive : + public detail::common_iarchive +{ +protected: +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +public: +#elif defined(BOOST_MSVC) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive; +#else + friend class detail::interface_iarchive; +#endif + // intermediate level to support override of operators + // fot templates in the absence of partial function + // template ordering + typedef detail::common_iarchive detail_common_iarchive; + template + void load_override(T & t, BOOST_PFTO int){ + this->detail_common_iarchive::load_override(t, 0); + } + // text file don't include the optional information + void load_override(class_id_optional_type & /*t*/, int){} + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_override(class_name_type & t, int); + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + init(void); + + basic_text_iarchive(unsigned int flags) : + detail::common_iarchive(flags) + {} + ~basic_text_iarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_iprimitive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_iprimitive.hpp new file mode 100644 index 0000000000..67ba7db3ed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_iprimitive.hpp @@ -0,0 +1,144 @@ +#ifndef BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP +#define BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_iprimitive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as text - note these are templated on the basic +// stream templates to accommodate wide (and other?) kind of characters +// +// Note the fact that on libraries without wide characters, ostream is +// not a specialization of basic_ostream which in fact is not defined +// in such cases. So we can't use basic_ostream but rather +// use two template parameters + +#include +#include +#include // size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; + #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) + using ::locale; + #endif +} // namespace std +#endif + +#include +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include // must be the last header + +namespace boost { +namespace archive { + +///////////////////////////////////////////////////////////////////////// +// class basic_text_iarchive - load serialized objects from a input text stream +#if defined(_MSC_VER) +#pragma warning( push ) +#pragma warning( disable : 4244 4267 ) +#endif + +template +class basic_text_iprimitive +{ +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +protected: +#else +public: +#endif + IStream &is; + io::ios_flags_saver flags_saver; + io::ios_precision_saver precision_saver; + + #ifndef BOOST_NO_STD_LOCALE + boost::scoped_ptr archive_locale; + basic_streambuf_locale_saver< + BOOST_DEDUCED_TYPENAME IStream::char_type, + BOOST_DEDUCED_TYPENAME IStream::traits_type + > locale_saver; + #endif + + template + void load(T & t) + { + if(! is.fail()){ + is >> t; + return; + } + boost::serialization::throw_exception( + archive_exception(archive_exception::input_stream_error) + ); + } + + void load(char & t) + { + short int i; + load(i); + t = i; + } + void load(signed char & t) + { + short int i; + load(i); + t = i; + } + void load(unsigned char & t) + { + unsigned short int i; + load(i); + t = i; + } + + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + void load(wchar_t & t) + { + BOOST_STATIC_ASSERT(sizeof(wchar_t) <= sizeof(int)); + int i; + load(i); + t = i; + } + #endif + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + basic_text_iprimitive(IStream &is, bool no_codecvt); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + ~basic_text_iprimitive(); +public: + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_binary(void *address, std::size_t count); +}; + +#if defined(_MSC_VER) +#pragma warning( pop ) +#endif + +} // namespace archive +} // namespace boost + +#include // pop pragmas + +#endif // BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_oarchive.hpp new file mode 100644 index 0000000000..f6ec53420e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_oarchive.hpp @@ -0,0 +1,116 @@ +#ifndef BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as text - note these ar templated on the basic +// stream templates to accommodate wide (and other?) kind of characters +// +// note the fact that on libraries without wide characters, ostream is +// is not a specialization of basic_ostream which in fact is not defined +// in such cases. So we can't use basic_ostream but rather +// use two template parameters + +#include +#include +#include +#include + +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +///////////////////////////////////////////////////////////////////////// +// class basic_text_oarchive +template +class basic_text_oarchive : + public detail::common_oarchive +{ +protected: +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ +|| BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x560)) +public: +#elif defined(BOOST_MSVC) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive; +#else + friend class detail::interface_oarchive; +#endif + enum { + none, + eol, + space + } delimiter; + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + newtoken(); + + void newline(){ + delimiter = eol; + } + + // default processing - kick back to base class. Note the + // extra stuff to get it passed borland compilers + typedef detail::common_oarchive detail_common_oarchive; + template + void save_override(T & t, BOOST_PFTO int){ + this->detail_common_oarchive::save_override(t, 0); + } + + // start new objects on a new line + void save_override(const object_id_type & t, int){ + this->This()->newline(); + this->detail_common_oarchive::save_override(t, 0); + } + + // text file don't include the optional information + void save_override(const class_id_optional_type & /* t */, int){} + + void save_override(const class_name_type & t, int){ + const std::string s(t); + * this->This() << s; + } + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + init(); + + basic_text_oarchive(unsigned int flags) : + detail::common_oarchive(flags), + delimiter(none) + {} + ~basic_text_oarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_oprimitive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_oprimitive.hpp new file mode 100644 index 0000000000..c0e884aa01 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_text_oprimitive.hpp @@ -0,0 +1,173 @@ +#ifndef BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP +#define BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_oprimitive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as text - note these ar templated on the basic +// stream templates to accommodate wide (and other?) kind of characters +// +// note the fact that on libraries without wide characters, ostream is +// is not a specialization of basic_ostream which in fact is not defined +// in such cases. So we can't use basic_ostream but rather +// use two template parameters + +#include +#include +#include // isnan +#include +#include // size_t + +#include +#include +#include +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; + #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) + using ::locale; + #endif +} // namespace std +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // must be the last header + +namespace boost { +namespace archive { + +class save_access; + +///////////////////////////////////////////////////////////////////////// +// class basic_text_oprimitive - output of prmitives to stream +template +class basic_text_oprimitive +{ +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +protected: +#else +public: +#endif + OStream &os; + io::ios_flags_saver flags_saver; + io::ios_precision_saver precision_saver; + + #ifndef BOOST_NO_STD_LOCALE + boost::scoped_ptr archive_locale; + basic_streambuf_locale_saver< + BOOST_DEDUCED_TYPENAME OStream::char_type, + BOOST_DEDUCED_TYPENAME OStream::traits_type + > locale_saver; + #endif + + // default saving of primitives. + template + void save(const T &t){ + if(os.fail()) + boost::serialization::throw_exception( + archive_exception(archive_exception::output_stream_error) + ); + os << t; + } + + ///////////////////////////////////////////////////////// + // fundamental types that need special treatment + void save(const bool t){ + // trap usage of invalid uninitialized boolean which would + // otherwise crash on load. + assert(0 == static_cast(t) || 1 == static_cast(t)); + if(os.fail()) + boost::serialization::throw_exception( + archive_exception(archive_exception::output_stream_error) + ); + os << t; + } + void save(const signed char t) + { + save(static_cast(t)); + } + void save(const unsigned char t) + { + save(static_cast(t)); + } + void save(const char t) + { + save(static_cast(t)); + } + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + void save(const wchar_t t) + { + BOOST_STATIC_ASSERT(sizeof(wchar_t) <= sizeof(int)); + save(static_cast(t)); + } + #endif + void save(const float t) + { + // must be a user mistake - can't serialize un-initialized data + if(os.fail()) + boost::serialization::throw_exception( + archive_exception(archive_exception::output_stream_error) + ); + os << std::setprecision(std::numeric_limits::digits10 + 2); + os << t; + } + void save(const double t) + { + // must be a user mistake - can't serialize un-initialized data + if(os.fail()) + boost::serialization::throw_exception( + archive_exception(archive_exception::output_stream_error) + ); + os << std::setprecision(std::numeric_limits::digits10 + 2); + os << t; + } + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + basic_text_oprimitive(OStream & os, bool no_codecvt); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + ~basic_text_oprimitive(); +public: + // unformatted append of one character + void put(BOOST_DEDUCED_TYPENAME OStream::char_type c){ + if(os.fail()) + boost::serialization::throw_exception( + archive_exception(archive_exception::output_stream_error) + ); + os.put(c); + } + // unformatted append of null terminated string + void put(const char * s){ + while('\0' != *s) + os.put(*s++); + } + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_binary(const void *address, std::size_t count); +}; + +} //namespace boost +} //namespace archive + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_archive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_archive.hpp new file mode 100644 index 0000000000..c99d94fa65 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_archive.hpp @@ -0,0 +1,67 @@ +#ifndef BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_xml_archive.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include // must be the last header + +namespace boost { +namespace archive { + +// constant strings used in xml i/o + +extern +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_XML_OBJECT_ID(); + +extern +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_XML_OBJECT_REFERENCE(); + +extern +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_XML_CLASS_ID(); + +extern +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(); + +extern +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_XML_CLASS_NAME(); + +extern +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_XML_TRACKING(); + +extern +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_XML_VERSION(); + +extern +BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_XML_SIGNATURE(); + +}// namespace archive +}// namespace boost + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_iarchive.hpp new file mode 100644 index 0000000000..d7b8bfd0ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_iarchive.hpp @@ -0,0 +1,127 @@ +#ifndef BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_xml_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#include + +#include +#include + +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +///////////////////////////////////////////////////////////////////////// +// class xml_iarchive - read serialized objects from a input text stream +template +class basic_xml_iarchive : + public detail::common_iarchive +{ +protected: +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +public: +#elif defined(BOOST_MSVC) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive; +#else + friend class detail::interface_oarchive; +#endif + unsigned int depth; + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_start(const char *name); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_end(const char *name); + + // Anything not an attribute and not a name-value pair is an + // should be trapped here. + template + void load_override(T & t, BOOST_PFTO int) + { + // If your program fails to compile here, its most likely due to + // not specifying an nvp wrapper around the variable to + // be serialized. + BOOST_MPL_ASSERT((serialization::is_wrapper< T >)); + this->detail_common_iarchive::load_override(t, 0); + } + + // Anything not an attribute - see below - should be a name value + // pair and be processed here + typedef detail::common_iarchive detail_common_iarchive; + template + void load_override( + #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + const + #endif + boost::serialization::nvp< T > & t, + int + ){ + this->This()->load_start(t.name()); + this->detail_common_iarchive::load_override(t.value(), 0); + this->This()->load_end(t.name()); + } + + // specific overrides for attributes - handle as + // primitives. These are not name-value pairs + // so they have to be intercepted here and passed on to load. + // although the class_id is included in the xml text file in order + // to make the file self describing, it isn't used when loading + // an xml archive. So we can skip it here. Note: we MUST override + // it otherwise it will be loaded as a normal primitive w/o tag and + // leaving the archive in an undetermined state + void load_override(class_id_optional_type & /* t */, int){} + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_override(object_id_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_override(version_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_override(class_id_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + load_override(tracking_type & t, int); + // class_name_type can't be handled here as it depends upon the + // char type used by the stream. So require the derived implementation + // handle this. + // void load_override(class_name_type & t, int); + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + basic_xml_iarchive(unsigned int flags); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + ~basic_xml_iarchive(); +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_oarchive.hpp new file mode 100644 index 0000000000..b571372ca7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/basic_xml_oarchive.hpp @@ -0,0 +1,145 @@ +#ifndef BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_xml_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include + +#include +#include +#include + +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// class basic_xml_oarchive - write serialized objects to a xml output stream +template +class basic_xml_oarchive : + public detail::common_oarchive +{ +protected: +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +public: +#elif defined(BOOST_MSVC) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive; + friend class save_access; +#else + friend class detail::interface_oarchive; + friend class save_access; +#endif + // special stuff for xml output + unsigned int depth; + bool indent_next; + bool pending_preamble; + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + indent(); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + init(); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + write_attribute( + const char *attribute_name, + int t, + const char *conjunction = "=\"" + ); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + write_attribute( + const char *attribute_name, + const char *key + ); + // helpers used below + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_start(const char *name); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_end(const char *name); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + end_preamble(); + + // Anything not an attribute and not a name-value pair is an + // error and should be trapped here. + template + void save_override(T & t, BOOST_PFTO int) + { + // If your program fails to compile here, its most likely due to + // not specifying an nvp wrapper around the variable to + // be serialized. + BOOST_MPL_ASSERT((serialization::is_wrapper< T >)); + this->detail_common_oarchive::save_override(t, 0); + } + + // special treatment for name-value pairs. + typedef detail::common_oarchive detail_common_oarchive; + template + void save_override( + #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + const + #endif + ::boost::serialization::nvp< T > & t, + int + ){ + this->This()->save_start(t.name()); + this->detail_common_oarchive::save_override(t.const_value(), 0); + this->This()->save_end(t.name()); + } + + // specific overrides for attributes - not name value pairs so we + // want to trap them before the above "fall through" + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_override(const object_id_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_override(const object_reference_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_override(const version_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_override(const class_id_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_override(const class_id_optional_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_override(const class_id_reference_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_override(const class_name_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + save_override(const tracking_type & t, int); + + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + basic_xml_oarchive(unsigned int flags); + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + ~basic_xml_oarchive(); +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_iarchive.hpp new file mode 100644 index 0000000000..638d996729 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_iarchive.hpp @@ -0,0 +1,103 @@ +#ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_HPP +#define BOOST_ARCHIVE_BINARY_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +// do not derive from the classes below. If you want to extend this functionality +// via inhertance, derived from text_iarchive_impl instead. This will +// preserve correct static polymorphism. + +// same as binary_iarchive below - without the shared_ptr_helper +class naked_binary_iarchive : + public binary_iarchive_impl< + boost::archive::naked_binary_iarchive, + std::istream::char_type, + std::istream::traits_type + > +{ +public: + naked_binary_iarchive(std::istream & is, unsigned int flags = 0) : + binary_iarchive_impl< + naked_binary_iarchive, std::istream::char_type, std::istream::traits_type + >(is, flags) + {} + naked_binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) : + binary_iarchive_impl< + naked_binary_iarchive, std::istream::char_type, std::istream::traits_type + >(bsb, flags) + {} +}; + +} // namespace archive +} // namespace boost + +// note special treatment of shared_ptr. This type needs a special +// structure associated with every archive. We created a "mix-in" +// class to provide this functionality. Since shared_ptr holds a +// special esteem in the boost library - we included it here by default. +#include + +namespace boost { +namespace archive { + +// do not derive from this class. If you want to extend this functionality +// via inhertance, derived from binary_iarchive_impl instead. This will +// preserve correct static polymorphism. +class binary_iarchive : + public binary_iarchive_impl< + boost::archive::binary_iarchive, + std::istream::char_type, + std::istream::traits_type + >, + public detail::shared_ptr_helper +{ +public: + binary_iarchive(std::istream & is, unsigned int flags = 0) : + binary_iarchive_impl< + binary_iarchive, std::istream::char_type, std::istream::traits_type + >(is, flags) + {} + binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) : + binary_iarchive_impl< + binary_iarchive, std::istream::char_type, std::istream::traits_type + >(bsb, flags) + {} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_iarchive) +BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(boost::archive::binary_iarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_BINARY_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_iarchive_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_iarchive_impl.hpp new file mode 100644 index 0000000000..32c476d645 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_iarchive_impl.hpp @@ -0,0 +1,96 @@ +#ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP +#define BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_iarchive_impl.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class binary_iarchive_impl : + public basic_binary_iprimitive, + public basic_binary_iarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_iarchive; + friend class basic_binary_iarchive; + friend class load_access; +protected: +#endif + // note: the following should not needed - but one compiler (vc 7.1) + // fails to compile one test (test_shared_ptr) without it !!! + // make this protected so it can be called from a derived archive + template + void load_override(T & t, BOOST_PFTO int){ + this->basic_binary_iarchive::load_override(t, 0L); + } + void init(unsigned int flags){ + if(0 != (flags & no_header)) + return; + #if ! defined(__MWERKS__) + this->basic_binary_iarchive::init(); + this->basic_binary_iprimitive::init(); + #else + basic_binary_iarchive::init(); + basic_binary_iprimitive::init(); + #endif + } + binary_iarchive_impl( + std::basic_streambuf & bsb, + unsigned int flags + ) : + basic_binary_iprimitive( + bsb, + 0 != (flags & no_codecvt) + ), + basic_binary_iarchive(flags) + { + init(flags); + } + binary_iarchive_impl( + std::basic_istream & is, + unsigned int flags + ) : + basic_binary_iprimitive( + * is.rdbuf(), + 0 != (flags & no_codecvt) + ), + basic_binary_iarchive(flags) + { + init(flags); + } +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_oarchive.hpp new file mode 100644 index 0000000000..2aac14f908 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_oarchive.hpp @@ -0,0 +1,66 @@ +#ifndef BOOST_ARCHIVE_BINARY_OARCHIVE_HPP +#define BOOST_ARCHIVE_BINARY_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +// do not derive from this class. If you want to extend this functionality +// via inhertance, derived from binary_oarchive_impl instead. This will +// preserve correct static polymorphism. +class binary_oarchive : + public binary_oarchive_impl< + binary_oarchive, std::ostream::char_type, std::ostream::traits_type + > +{ +public: + binary_oarchive(std::ostream & os, unsigned int flags = 0) : + binary_oarchive_impl< + binary_oarchive, std::ostream::char_type, std::ostream::traits_type + >(os, flags) + {} + binary_oarchive(std::streambuf & bsb, unsigned int flags = 0) : + binary_oarchive_impl< + binary_oarchive, std::ostream::char_type, std::ostream::traits_type + >(bsb, flags) + {} +}; + +typedef binary_oarchive naked_binary_oarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_oarchive) +BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(boost::archive::binary_oarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_BINARY_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_oarchive_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_oarchive_impl.hpp new file mode 100644 index 0000000000..7ca773b601 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_oarchive_impl.hpp @@ -0,0 +1,97 @@ +#ifndef BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP +#define BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_oarchive_impl.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class binary_oarchive_impl : + public basic_binary_oprimitive, + public basic_binary_oarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_oarchive; + friend class basic_binary_oarchive; + friend class save_access; +protected: +#endif + // note: the following should not needed - but one compiler (vc 7.1) + // fails to compile one test (test_shared_ptr) without it !!! + // make this protected so it can be called from a derived archive + template + void save_override(T & t, BOOST_PFTO int){ + this->basic_binary_oarchive::save_override(t, 0L); + } + void init(unsigned int flags) { + if(0 != (flags & no_header)) + return; + #if ! defined(__MWERKS__) + this->basic_binary_oarchive::init(); + this->basic_binary_oprimitive::init(); + #else + basic_binary_oarchive::init(); + basic_binary_oprimitive::init(); + #endif + } + binary_oarchive_impl( + std::basic_streambuf & bsb, + unsigned int flags + ) : + basic_binary_oprimitive( + bsb, + 0 != (flags & no_codecvt) + ), + basic_binary_oarchive(flags) + { + init(flags); + } + binary_oarchive_impl( + std::basic_ostream & os, + unsigned int flags + ) : + basic_binary_oprimitive( + * os.rdbuf(), + 0 != (flags & no_codecvt) + ), + basic_binary_oarchive(flags) + { + init(flags); + } +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_wiarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_wiarchive.hpp new file mode 100644 index 0000000000..b5f6a7106b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_wiarchive.hpp @@ -0,0 +1,93 @@ +#ifndef BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP +#define BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_wiarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include // wistream +#include +#include + +namespace boost { +namespace archive { + +// same as binary_wiarchive below - without the shared_ptr_helper +class naked_binary_wiarchive : + public binary_iarchive_impl< + boost::archive::naked_binary_wiarchive, + std::wistream::char_type, + std::wistream::traits_type + > +{ +public: + naked_binary_wiarchive(std::wistream & is, unsigned int flags = 0) : + binary_iarchive_impl< + naked_binary_wiarchive, + std::wistream::char_type, + std::wistream::traits_type + >(is, flags) + {} + naked_binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) : + binary_iarchive_impl< + naked_binary_wiarchive, + std::wistream::char_type, + std::wistream::traits_type + >(bsb, flags) + {} +}; + +} // namespace archive +} // namespace boost + +// note special treatment of shared_ptr. This type needs a special +// structure associated with every archive. We created a "mix-in" +// class to provide this functionality. Since shared_ptr holds a +// special esteem in the boost library - we included it here by default. +#include + +namespace boost { +namespace archive { + +class binary_wiarchive : + public binary_iarchive_impl< + binary_wiarchive, std::wistream::char_type, std::wistream::traits_type + > +{ +public: + binary_wiarchive(std::wistream & is, unsigned int flags = 0) : + binary_iarchive_impl< + binary_wiarchive, std::wistream::char_type, std::wistream::traits_type + >(is, flags) + {} + binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) : + binary_iarchive_impl< + binary_wiarchive, std::wistream::char_type, std::wistream::traits_type + >(bsb, flags) + {} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_wiarchive) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_woarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_woarchive.hpp new file mode 100644 index 0000000000..2075dac8bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/binary_woarchive.hpp @@ -0,0 +1,61 @@ +#ifndef BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP +#define BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_woarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include +#include +#include + +namespace boost { +namespace archive { + +// do not derive from this class. If you want to extend this functionality +// via inhertance, derived from binary_oarchive_impl instead. This will +// preserve correct static polymorphism. +class binary_woarchive : + public binary_oarchive_impl< + binary_woarchive, std::wostream::char_type, std::wostream::traits_type + > +{ +public: + binary_woarchive(std::wostream & os, unsigned int flags = 0) : + binary_oarchive_impl< + binary_woarchive, std::wostream::char_type, std::wostream::traits_type + >(os, flags) + {} + binary_woarchive(std::wstreambuf & bsb, unsigned int flags = 0) : + binary_oarchive_impl< + binary_woarchive, std::wostream::char_type, std::wostream::traits_type + >(bsb, flags) + {} +}; + +typedef binary_woarchive naked_binary_woarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_woarchive) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/codecvt_null.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/codecvt_null.hpp new file mode 100644 index 0000000000..910b26156a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/codecvt_null.hpp @@ -0,0 +1,100 @@ +#ifndef BOOST_ARCHIVE_CODECVT_NULL_HPP +#define BOOST_ARCHIVE_CODECVT_NULL_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// codecvt_null.hpp: + +// (C) Copyright 2004 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // NULL, size_t +#include // for mbstate_t +#include +#include +#include // must be the last header + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std { +// For STLport on WinCE, BOOST_NO_STDC_NAMESPACE can get defined if STLport is putting symbols in its own namespace. +// In the case of codecvt, however, this does not mean that codecvt is in the global namespace (it will be in STLport's namespace) +# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + using ::codecvt; +# endif + using ::mbstate_t; + using ::size_t; +} // namespace +#endif + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class codecvt_null; + +template<> +class codecvt_null : public std::codecvt +{ + virtual bool do_always_noconv() const throw() { + return true; + } +public: + explicit codecvt_null(std::size_t no_locale_manage = 0) : + std::codecvt(no_locale_manage) + {} +}; + +template<> +class codecvt_null : public std::codecvt +{ + virtual BOOST_WARCHIVE_DECL(std::codecvt_base::result) + do_out( + std::mbstate_t & state, + const wchar_t * first1, + const wchar_t * last1, + const wchar_t * & next1, + char * first2, + char * last2, + char * & next2 + ) const; + virtual BOOST_WARCHIVE_DECL(std::codecvt_base::result) + do_in( + std::mbstate_t & state, + const char * first1, + const char * last1, + const char * & next1, + wchar_t * first2, + wchar_t * last2, + wchar_t * & next2 + ) const; + virtual int do_encoding( ) const throw( ){ + return sizeof(wchar_t) / sizeof(char); + } + virtual int do_max_length( ) const throw( ){ + return do_encoding(); + } +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif +#include // pop pragmas + +#endif //BOOST_ARCHIVE_CODECVT_NULL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/abi_prefix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/abi_prefix.hpp new file mode 100644 index 0000000000..e39ef11f18 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/abi_prefix.hpp @@ -0,0 +1,20 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// abi_prefix.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // must be the last header +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4251 4231 4660 4275) +#endif + +#if defined( __BORLANDC__ ) +#pragma nopushoptwarn +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/abi_suffix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/abi_suffix.hpp new file mode 100644 index 0000000000..a283b36cf3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/abi_suffix.hpp @@ -0,0 +1,19 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// abi_suffix.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +#include // pops abi_suffix.hpp pragmas + +#if defined( __BORLANDC__ ) +#pragma nopushoptwarn +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/archive_serializer_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/archive_serializer_map.hpp new file mode 100644 index 0000000000..6d2eec4a85 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/archive_serializer_map.hpp @@ -0,0 +1,55 @@ +#ifndef BOOST_ARCHIVE_SERIALIZER_MAP_HPP +#define BOOST_ARCHIVE_SERIALIZER_MAP_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// archive_serializer_map.hpp: extenstion of type_info required for +// serialization. + +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// note: this is nothing more than the thinest of wrappers around +// basic_serializer_map so we can have a one map / archive type. + +#include +#include +#include // must be the last header + +namespace boost { + +namespace serialization { + class extended_type_info; +} // namespace serialization + +namespace archive { +namespace detail { + +class basic_serializer; + +template +class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +archive_serializer_map { +public: + static bool insert(const basic_serializer * bs); + static void erase(const basic_serializer * bs); + static const basic_serializer * find( + const boost::serialization::extended_type_info & type_ + ); +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#include // must be the last header + +#endif //BOOST_ARCHIVE_SERIALIZER_MAP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/auto_link_archive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/auto_link_archive.hpp new file mode 100644 index 0000000000..05956f0e8f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/auto_link_archive.hpp @@ -0,0 +1,48 @@ +#ifndef BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP +#define BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// auto_link_archive.hpp +// +// (c) Copyright Robert Ramey 2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/serialization + +//----------------------------------------------------------------------------// + +// This header implements separate compilation features as described in +// http://www.boost.org/more/separate_compilation.html + +// enable automatic library variant selection ------------------------------// + +#include + +#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB) \ +&& !defined(BOOST_ARCHIVE_SOURCE) && !defined(BOOST_WARCHIVE_SOURCE) \ +&& !defined(BOOST_SERIALIZATION_SOURCE) + + // Set the name of our library, this will get undef'ed by auto_link.hpp + // once it's done with it: + // + #define BOOST_LIB_NAME boost_serialization + // + // If we're importing code from a dll, then tell auto_link.hpp about it: + // + #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK) + # define BOOST_DYN_LINK + #endif + // + // And include the header that does the work: + // + #include +#endif // auto-linking disabled + +#endif // BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/auto_link_warchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/auto_link_warchive.hpp new file mode 100644 index 0000000000..4d4efcd44f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/auto_link_warchive.hpp @@ -0,0 +1,47 @@ +#ifndef BOOST_ARCHIVE_DETAIL_AUTO_LINK_WARCHIVE_HPP +#define BOOST_ARCHIVE_DETAIL_AUTO_LINK_WARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// auto_link_warchive.hpp +// +// (c) Copyright Robert Ramey 2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/serialization + +//----------------------------------------------------------------------------// + +// This header implements separate compilation features as described in +// http://www.boost.org/more/separate_compilation.html + +// enable automatic library variant selection ------------------------------// + +#include + +#if !defined(BOOST_WARCHIVE_SOURCE) \ +&& !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB) + +// Set the name of our library, this will get undef'ed by auto_link.hpp +// once it's done with it: +// +#define BOOST_LIB_NAME boost_wserialization +// +// If we're importing code from a dll, then tell auto_link.hpp about it: +// +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK) +# define BOOST_DYN_LINK +#endif +// +// And include the header that does the work: +// +#include +#endif // auto-linking disabled + +#endif // ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_archive_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_archive_impl.hpp new file mode 100644 index 0000000000..589368ddc1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_archive_impl.hpp @@ -0,0 +1,48 @@ +#ifndef BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP +#define BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_archive_impl.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// can't use this - much as I'd like to as borland doesn't support it +// #include + +#include + +#include // must be the last header + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization + +namespace archive { +namespace detail { + +////////////////////////////////////////////////////////////////////// +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_archive_impl +{ +}; + +} // namespace detail +} // namespace serialization +} // namespace boost + +#include // pops abi_suffix.hpp pragmas + +#endif //BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_config.hpp new file mode 100644 index 0000000000..5e37cae40b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_config.hpp @@ -0,0 +1,45 @@ +#ifndef BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP +#define BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// basic_config.hpp ---------------------------------------------// + +// (c) Copyright Robert Ramey 2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/serialization + +//----------------------------------------------------------------------------// + +// This header implements separate compilation features as described in +// http://www.boost.org/more/separate_compilation.html + +#include + +#ifdef BOOST_HAS_DECLSPEC // defined in config system +// we need to import/export our code only if the user has specifically +// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost +// libraries to be dynamically linked, or BOOST_ARCHIVE_DYN_LINK +// if they want just this one to be dynamically linked: +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ARCHIVE_DYN_LINK) +// export if this is our own source, otherwise import: +#ifdef BOOST_ARCHIVE_SOURCE +# define BOOST_ARCHIVE_DECL __declspec(dllexport) +#else +# define BOOST_ARCHIVE_DECL __declspec(dllimport) +#endif // BOOST_ARCHIVE_SOURCE +#endif // DYN_LINK +#endif // BOOST_HAS_DECLSPEC +// +// if BOOST_ARCHIVE_DECL isn't defined yet define it now: +#ifndef BOOST_ARCHIVE_DECL +#define BOOST_ARCHIVE_DECL +#endif + +#endif // BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_iarchive.hpp new file mode 100644 index 0000000000..f62987ecee --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_iarchive.hpp @@ -0,0 +1,110 @@ +#ifndef BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP +#define BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_iarchive.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// can't use this - much as I'd like to as borland doesn't support it +// #include + +#include +#include + +#include +#include +#include +#include +#include // must be the last header + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization + +namespace archive { +namespace detail { + +class basic_iarchive_impl; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; +////////////////////////////////////////////////////////////////////// +// class basic_iarchive - read serialized objects from a input stream +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive : + private boost::noncopyable +{ + friend class basic_iarchive_impl; + // hide implementation of this class to minimize header conclusion + // in client code. I couldn't used scoped pointer with borland + // boost::scoped_ptr pimpl; + basic_iarchive_impl * pimpl; + + virtual void vload(version_type &t) = 0; + virtual void vload(object_id_type &t) = 0; + virtual void vload(class_id_type &t) = 0; + virtual void vload(class_id_optional_type &t) = 0; + virtual void vload(class_name_type &t) = 0; + virtual void vload(tracking_type &t) = 0; +protected: + basic_iarchive(unsigned int flags); + // account for bogus gcc warning + #if defined(__GNUC__) + virtual + #endif + ~basic_iarchive(); +public: + // note: NOT part of the public API. + void next_object_pointer(void *t); + void register_basic_serializer( + const basic_iserializer & bis + ); + void load_object( + void *t, + const basic_iserializer & bis + ); + const basic_pointer_iserializer * + load_pointer( + void * & t, + const basic_pointer_iserializer * bpis_ptr, + const basic_pointer_iserializer * (*finder)( + const boost::serialization::extended_type_info & eti + ) + + ); + // real public API starts here + void + set_library_version(library_version_type archive_library_version); + library_version_type + get_library_version() const; + unsigned int + get_flags() const; + void + reset_object_address(const void * new_address, const void * old_address); + void + delete_created_pointers(); +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +// required by smart_cast for compilers not implementing +// partial template specialization +BOOST_TT_BROKEN_COMPILER_SPEC( + boost::archive::detail::basic_iarchive +) + +#include // pops abi_suffix.hpp pragmas + +#endif //BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_iserializer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_iserializer.hpp new file mode 100644 index 0000000000..2f4f6d811f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_iserializer.hpp @@ -0,0 +1,95 @@ +#ifndef BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP +#define BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_iserializer.hpp: extenstion of type_info required for serialization. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL +#include + +#include +#include +#include +#include +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization + +// forward declarations +namespace archive { +namespace detail { + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer : + public basic_serializer +{ +private: + basic_pointer_iserializer *m_bpis; +protected: + explicit basic_iserializer( + const boost::serialization::extended_type_info & type + ); + // account for bogus gcc warning + #if defined(__GNUC__) + virtual + #endif + ~basic_iserializer(); +public: + bool serialized_as_pointer() const { + return m_bpis != NULL; + } + void set_bpis(basic_pointer_iserializer *bpis){ + m_bpis = bpis; + } + const basic_pointer_iserializer * get_bpis_ptr() const { + return m_bpis; + } + virtual void load_object_data( + basic_iarchive & ar, + void *x, + const unsigned int file_version + ) const = 0; + // returns true if class_info should be saved + virtual bool class_info() const = 0 ; + // returns true if objects should be tracked + virtual bool tracking(const unsigned int) const = 0 ; + // returns class version + virtual version_type version() const = 0 ; + // returns true if this class is polymorphic + virtual bool is_polymorphic() const = 0; + virtual void destroy(/*const*/ void *address) const = 0 ; +}; + +} // namespae detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_oarchive.hpp new file mode 100644 index 0000000000..402e569a61 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_oarchive.hpp @@ -0,0 +1,106 @@ +#ifndef BOOST_ARCHIVE_BASIC_OARCHIVE_HPP +#define BOOST_ARCHIVE_BASIC_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_oarchive.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL +#include +#include + +#include + +// can't use this - much as I'd like to as borland doesn't support it +// #include + +#include +#include + +#include // must be the last header + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization + +namespace archive { +namespace detail { + +class basic_oarchive_impl; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; +////////////////////////////////////////////////////////////////////// +// class basic_oarchive - write serialized objects to an output stream +class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive : + private boost::noncopyable +{ + friend class basic_oarchive_impl; + // hide implementation of this class to minimize header conclusion + // in client code. note: borland can't use scoped_ptr + //boost::scoped_ptr pimpl; + basic_oarchive_impl * pimpl; + + // overload these to bracket object attributes. Used to implement + // xml archives + virtual void vsave(const version_type t) = 0; + virtual void vsave(const object_id_type t) = 0; + virtual void vsave(const object_reference_type t) = 0; + virtual void vsave(const class_id_type t) = 0; + virtual void vsave(const class_id_optional_type t) = 0; + virtual void vsave(const class_id_reference_type t) = 0; + virtual void vsave(const class_name_type & t) = 0; + virtual void vsave(const tracking_type t) = 0; +protected: + basic_oarchive(unsigned int flags = 0); + // account for bogus gcc warning + #if defined(__GNUC__) + virtual + #endif + ~basic_oarchive(); +public: + // note: NOT part of the public interface + void register_basic_serializer( + const basic_oserializer & bos + ); + void save_object( + const void *x, + const basic_oserializer & bos + ); + void save_pointer( + const void * t, + const basic_pointer_oserializer * bpos_ptr + ); + void save_null_pointer(){ + vsave(NULL_POINTER_TAG); + } + // real public interface starts here + void end_preamble(); // default implementation does nothing + library_version_type get_library_version() const; + unsigned int get_flags() const; +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +// required by smart_cast for compilers not implementing +// partial template specialization +BOOST_TT_BROKEN_COMPILER_SPEC( + boost::archive::detail::basic_oarchive +) + +#include // pops abi_suffix.hpp pragmas + +#endif //BOOST_ARCHIVE_BASIC_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_oserializer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_oserializer.hpp new file mode 100644 index 0000000000..74af7e6577 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_oserializer.hpp @@ -0,0 +1,93 @@ +#ifndef BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP +#define BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_oserializer.hpp: extenstion of type_info required for serialization. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL +#include +#include + +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization + +// forward declarations +namespace archive { +namespace detail { + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer : + public basic_serializer +{ +private: + basic_pointer_oserializer *m_bpos; +protected: + explicit basic_oserializer( + const boost::serialization::extended_type_info & type_ + ); + // account for bogus gcc warning + #if defined(__GNUC__) + virtual + #endif + ~basic_oserializer(); +public: + bool serialized_as_pointer() const { + return m_bpos != NULL; + } + void set_bpos(basic_pointer_oserializer *bpos){ + m_bpos = bpos; + } + const basic_pointer_oserializer * get_bpos() const { + return m_bpos; + } + virtual void save_object_data( + basic_oarchive & ar, const void * x + ) const = 0; + // returns true if class_info should be saved + virtual bool class_info() const = 0; + // returns true if objects should be tracked + virtual bool tracking(const unsigned int flags) const = 0; + // returns class version + virtual version_type version() const = 0; + // returns true if this class is polymorphic + virtual bool is_polymorphic() const = 0; +}; + +} // namespace detail +} // namespace serialization +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_pointer_iserializer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_pointer_iserializer.hpp new file mode 100644 index 0000000000..d957b83e64 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_pointer_iserializer.hpp @@ -0,0 +1,73 @@ +#ifndef BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP +#define BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_pointer_oserializer.hpp: extenstion of type_info required for +// serialization. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization + +// forward declarations +namespace archive { +namespace detail { + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer + : public basic_serializer { +protected: + explicit basic_pointer_iserializer( + const boost::serialization::extended_type_info & type_ + ); + // account for bogus gcc warning + #if defined(__GNUC__) + virtual + #endif + ~basic_pointer_iserializer(); +public: + virtual const basic_iserializer & get_basic_serializer() const = 0; + virtual void load_object_ptr( + basic_iarchive & ar, + void * & x, + const unsigned int file_version + ) const = 0; +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_pointer_oserializer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_pointer_oserializer.hpp new file mode 100644 index 0000000000..b0d3fb9597 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_pointer_oserializer.hpp @@ -0,0 +1,72 @@ +#ifndef BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP +#define BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_pointer_oserializer.hpp: extenstion of type_info required for +// serialization. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization + +namespace archive { +namespace detail { + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer : + public basic_serializer +{ +protected: + explicit basic_pointer_oserializer( + const boost::serialization::extended_type_info & type_ + ); +public: + // account for bogus gcc warning + #if defined(__GNUC__) + virtual + #endif + ~basic_pointer_oserializer(); + virtual const basic_oserializer & get_basic_serializer() const = 0; + virtual void save_object_ptr( + basic_oarchive & ar, + const void * x + ) const = 0; +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_serializer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_serializer.hpp new file mode 100644 index 0000000000..ab2ffe9d08 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_serializer.hpp @@ -0,0 +1,79 @@ +#ifndef BOOST_ARCHIVE_BASIC_SERIALIZER_HPP +#define BOOST_ARCHIVE_BASIC_SERIALIZER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_serializer.hpp: extenstion of type_info required for serialization. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // NULL + +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { +namespace detail { + +class basic_serializer : + private boost::noncopyable +{ + const boost::serialization::extended_type_info * m_eti; +protected: + explicit basic_serializer( + const boost::serialization::extended_type_info & eti + ) : + m_eti(& eti) + { + assert(NULL != & eti); + } +public: + inline bool + operator<(const basic_serializer & rhs) const { + // can't compare address since there can be multiple eti records + // for the same type in different execution modules (that is, DLLS) + // leave this here as a reminder not to do this! + // return & lhs.get_eti() < & rhs.get_eti(); + return get_eti() < rhs.get_eti(); + } + const char * get_debug_info() const { + return m_eti->get_debug_info(); + } + const boost::serialization::extended_type_info & get_eti() const { + return * m_eti; + } +}; + +class basic_serializer_arg : public basic_serializer { +public: + basic_serializer_arg(const serialization::extended_type_info & eti) : + basic_serializer(eti) + {} +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_BASIC_SERIALIZER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_serializer_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_serializer_map.hpp new file mode 100644 index 0000000000..19defcb5be --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/basic_serializer_map.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_SERIALIZER_MAP_HPP +#define BOOST_SERIALIZER_MAP_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_serializer_map.hpp: extenstion of type_info required for serialization. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include +#include + +#include // must be the last header + +namespace boost { +namespace serialization { + class extended_type_info; +} + +namespace archive { +namespace detail { + +class basic_serializer; + +class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_serializer_map : public + boost::noncopyable +{ + struct type_info_pointer_compare + { + bool operator()( + const basic_serializer * lhs, const basic_serializer * rhs + ) const ; + }; + typedef std::set< + const basic_serializer *, + type_info_pointer_compare + > map_type; + map_type m_map; +public: + bool insert(const basic_serializer * bs); + void erase(const basic_serializer * bs); + const basic_serializer * find( + const boost::serialization::extended_type_info & type_ + ) const; +private: + // cw 8.3 requires this + basic_serializer_map& operator=(basic_serializer_map const&); +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#include // must be the last header + +#endif // BOOST_SERIALIZER_MAP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/check.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/check.hpp new file mode 100644 index 0000000000..c9cba519f8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/check.hpp @@ -0,0 +1,169 @@ +#ifndef BOOST_ARCHIVE_DETAIL_CHECK_HPP +#define BOOST_ARCHIVE_DETAIL_CHECK_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#pragma inline_depth(511) +#pragma inline_recursion(on) +#endif + +#if defined(__MWERKS__) +#pragma inline_depth(511) +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// check.hpp: interface for serialization system. + +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace boost { +namespace archive { +namespace detail { + +// checks for objects + +template +inline void check_object_level(){ + typedef + BOOST_DEDUCED_TYPENAME mpl::greater_equal< + serialization::implementation_level< T >, + mpl::int_ + >::type typex; + + // trap attempts to serialize objects marked + // not_serializable + BOOST_STATIC_ASSERT(typex::value); +} + +template +inline void check_object_versioning(){ + typedef + BOOST_DEDUCED_TYPENAME mpl::or_< + BOOST_DEDUCED_TYPENAME mpl::greater< + serialization::implementation_level< T >, + mpl::int_ + >, + BOOST_DEDUCED_TYPENAME mpl::equal_to< + serialization::version< T >, + mpl::int_<0> + > + > typex; + // trap attempts to serialize with objects that don't + // save class information in the archive with versioning. + BOOST_STATIC_ASSERT(typex::value); +} + +template +inline void check_object_tracking(){ + // presume it has already been determined that + // T is not a const + BOOST_STATIC_ASSERT(! boost::is_const< T >::value); + typedef BOOST_DEDUCED_TYPENAME mpl::equal_to< + serialization::tracking_level< T >, + mpl::int_ + >::type typex; + // saving an non-const object of a type not marked "track_never) + + // may be an indicator of an error usage of the + // serialization library and should be double checked. + // See documentation on object tracking. Also, see the + // "rationale" section of the documenation + // for motivation for this checking. + + BOOST_STATIC_WARNING(typex::value); +} + +// checks for pointers + +template +inline void check_pointer_level(){ + // we should only invoke this once we KNOW that T + // has been used as a pointer!! + typedef + BOOST_DEDUCED_TYPENAME mpl::or_< + BOOST_DEDUCED_TYPENAME mpl::greater< + serialization::implementation_level< T >, + mpl::int_ + >, + BOOST_DEDUCED_TYPENAME mpl::not_< + BOOST_DEDUCED_TYPENAME mpl::equal_to< + serialization::tracking_level< T >, + mpl::int_ + > + > + > typex; + // Address the following when serializing to a pointer: + + // a) This type doesn't save class information in the + // archive. That is, the serialization trait implementation + // level <= object_serializable. + // b) Tracking for this type is set to "track selectively" + + // in this case, indication that an object is tracked is + // not stored in the archive itself - see level == object_serializable + // but rather the existence of the operation ar >> T * is used to + // infer that an object of this type should be tracked. So, if + // you save via a pointer but don't load via a pointer the operation + // will fail on load without given any valid reason for the failure. + + // So if your program traps here, consider changing the + // tracking or implementation level traits - or not + // serializing via a pointer. + BOOST_STATIC_WARNING(typex::value); +} + +template +void inline check_pointer_tracking(){ + typedef BOOST_DEDUCED_TYPENAME mpl::greater< + serialization::tracking_level< T >, + mpl::int_ + >::type typex; + // serializing an object of a type marked "track_never" through a pointer + // could result in creating more objects than were saved! + BOOST_STATIC_WARNING(typex::value); +} + +template +inline void check_const_loading(){ + typedef + BOOST_DEDUCED_TYPENAME mpl::or_< + BOOST_DEDUCED_TYPENAME boost::serialization::is_wrapper< T >, + BOOST_DEDUCED_TYPENAME mpl::not_< + BOOST_DEDUCED_TYPENAME boost::is_const< T > + > + >::type typex; + // cannot load data into a "const" object unless it's a + // wrapper around some other non-const object. + BOOST_STATIC_ASSERT(typex::value); +} + +} // detail +} // archive +} // boost + +#endif // BOOST_ARCHIVE_DETAIL_CHECK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/common_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/common_iarchive.hpp new file mode 100644 index 0000000000..54c07c39c4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/common_iarchive.hpp @@ -0,0 +1,88 @@ +#ifndef BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP +#define BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// common_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { +namespace detail { + +class extended_type_info; + +// note: referred to as Curiously Recurring Template Patter (CRTP) +template +class common_iarchive : + public basic_iarchive, + public interface_iarchive +{ + friend class interface_iarchive; +private: + virtual void vload(version_type & t){ + * this->This() >> t; + } + virtual void vload(object_id_type & t){ + * this->This() >> t; + } + virtual void vload(class_id_type & t){ + * this->This() >> t; + } + virtual void vload(class_id_optional_type & t){ + * this->This() >> t; + } + virtual void vload(tracking_type & t){ + * this->This() >> t; + } + virtual void vload(class_name_type &s){ + * this->This() >> s; + } +protected: + // default processing - invoke serialization library + template + void load_override(T & t, BOOST_PFTO int){ + archive::load(* this->This(), t); + } + // default implementations of functions which emit start/end tags for + // archive types that require them. + void load_start(const char * /*name*/){} + void load_end(const char * /*name*/){} + // default archive initialization + common_iarchive(unsigned int flags = 0) : + basic_iarchive(flags), + interface_iarchive() + {} +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/common_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/common_oarchive.hpp new file mode 100644 index 0000000000..7962063a58 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/common_oarchive.hpp @@ -0,0 +1,87 @@ +#ifndef BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP +#define BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// common_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { +namespace detail { + +// note: referred to as Curiously Recurring Template Patter (CRTP) +template +class common_oarchive : + public basic_oarchive, + public interface_oarchive +{ + friend class interface_oarchive; +private: + virtual void vsave(const version_type t){ + * this->This() << t; + } + virtual void vsave(const object_id_type t){ + * this->This() << t; + } + virtual void vsave(const object_reference_type t){ + * this->This() << t; + } + virtual void vsave(const class_id_type t){ + * this->This() << t; + } + virtual void vsave(const class_id_reference_type t){ + * this->This() << t; + } + virtual void vsave(const class_id_optional_type t){ + * this->This() << t; + } + virtual void vsave(const class_name_type & t){ + * this->This() << t; + } + virtual void vsave(const tracking_type t){ + * this->This() << t; + } +protected: + // default processing - invoke serialization library + template + void save_override(T & t, BOOST_PFTO int){ + archive::save(* this->This(), t); + } + void save_start(const char * /*name*/){} + void save_end(const char * /*name*/){} + common_oarchive(unsigned int flags = 0) : + basic_oarchive(flags), + interface_oarchive() + {} +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/decl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/decl.hpp new file mode 100644 index 0000000000..9695001abe --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/decl.hpp @@ -0,0 +1,79 @@ +#ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP +#define BOOST_ARCHIVE_DETAIL_DECL_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8 +// decl.hpp +// +// (c) Copyright Robert Ramey 2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/serialization + +//----------------------------------------------------------------------------// + +// This header implements separate compilation features as described in +// http://www.boost.org/more/separate_compilation.html + +#include +#include + +#if defined(BOOST_HAS_DECLSPEC) + #if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)) + #if defined(BOOST_ARCHIVE_SOURCE) + #if defined(__BORLANDC__) + #define BOOST_ARCHIVE_DECL(T) T __export + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export + #else + #define BOOST_ARCHIVE_DECL(T) __declspec(dllexport) T + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T + #endif + #else + #if defined(__BORLANDC__) + #define BOOST_ARCHIVE_DECL(T) T __import + #else + #define BOOST_ARCHIVE_DECL(T) __declspec(dllimport) T + #endif + #endif + #if defined(BOOST_WARCHIVE_SOURCE) + #if defined(__BORLANDC__) + #define BOOST_WARCHIVE_DECL(T) T __export + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export + #else + #define BOOST_WARCHIVE_DECL(T) __declspec(dllexport) T + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T + #endif + #else + #if defined(__BORLANDC__) + #define BOOST_WARCHIVE_DECL(T) T __import + #else + #define BOOST_WARCHIVE_DECL(T) __declspec(dllimport) T + #endif + #endif + #if !defined(BOOST_WARCHIVE_SOURCE) && !defined(BOOST_ARCHIVE_SOURCE) + #if defined(__BORLANDC__) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __import + #else + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllimport) T + #endif + #endif + #endif +#endif // BOOST_HAS_DECLSPEC + +#if ! defined(BOOST_ARCHIVE_DECL) + #define BOOST_ARCHIVE_DECL(T) T +#endif +#if ! defined(BOOST_WARCHIVE_DECL) + #define BOOST_WARCHIVE_DECL(T) T +#endif +#if ! defined(BOOST_ARCHIVE_OR_WARCHIVE_DECL) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T +#endif + +#endif // BOOST_ARCHIVE_DETAIL_DECL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/interface_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/interface_iarchive.hpp new file mode 100644 index 0000000000..06487521fa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/interface_iarchive.hpp @@ -0,0 +1,77 @@ +#ifndef BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP +#define BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// interface_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include // NULL +#include +#include +#include +#include +#include +#include // must be the last header + +namespace boost { +namespace archive { +namespace detail { + +class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; + +template +class interface_iarchive +{ +protected: + interface_iarchive(){}; +public: + ///////////////////////////////////////////////////////// + // archive public interface + typedef mpl::bool_ is_loading; + typedef mpl::bool_ is_saving; + + // return a pointer to the most derived class + Archive * This(){ + return static_cast(this); + } + + template + const basic_pointer_iserializer * + register_type(T * = NULL){ + const basic_pointer_iserializer & bpis = + boost::serialization::singleton< + pointer_iserializer + >::get_const_instance(); + this->This()->register_basic_serializer(bpis.get_basic_serializer()); + return & bpis; + } + template + Archive & operator>>(T & t){ + this->This()->load_override(t, 0); + return * this->This(); + } + + // the & operator + template + Archive & operator&(T & t){ + return *(this->This()) >> t; + } +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/interface_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/interface_oarchive.hpp new file mode 100644 index 0000000000..e8db7a2bc8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/interface_oarchive.hpp @@ -0,0 +1,84 @@ +#ifndef BOOST_ARCHIVE_DETAIL_INTERFACE_OARCHIVE_HPP +#define BOOST_ARCHIVE_DETAIL_INTERFACE_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// interface_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include // NULL +#include +#include + +#include +#include +#include // must be the last header + +#include + +namespace boost { +namespace archive { +namespace detail { + +class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; + +template +class interface_oarchive +{ +protected: + interface_oarchive(){}; +public: + ///////////////////////////////////////////////////////// + // archive public interface + typedef mpl::bool_ is_loading; + typedef mpl::bool_ is_saving; + + // return a pointer to the most derived class + Archive * This(){ + return static_cast(this); + } + + template + const basic_pointer_oserializer * + register_type(const T * = NULL){ + const basic_pointer_oserializer & bpos = + boost::serialization::singleton< + pointer_oserializer + >::get_const_instance(); + this->This()->register_basic_serializer(bpos.get_basic_serializer()); + return & bpos; + } + + template + Archive & operator<<(T & t){ + this->This()->save_override(t, 0); + return * this->This(); + } + + // the & operator + template + Archive & operator&(T & t){ + #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + return * this->This() << const_cast(t); + #else + return * this->This() << t; + #endif + } +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/iserializer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/iserializer.hpp new file mode 100644 index 0000000000..46033fddf2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/iserializer.hpp @@ -0,0 +1,632 @@ +#ifndef BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP +#define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#pragma inline_depth(511) +#pragma inline_recursion(on) +#endif + +#if defined(__MWERKS__) +#pragma inline_depth(511) +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// iserializer.hpp: interface for serialization system. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // for placement new +#include // for auto_ptr +#include // size_t, NULL + +#include +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include + +#include +#include +#include +#include +#include +#include + +#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO + #include +#endif +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#define DONT_USE_HAS_NEW_OPERATOR ( \ + defined(__BORLANDC__) \ + || defined(__IBMCPP__) \ + || defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) \ + || defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) \ +) + +#if ! DONT_USE_HAS_NEW_OPERATOR +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// the following is need only for dynamic cast of polymorphic pointers +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace serialization { + class extended_type_info; +} // namespace serialization + +namespace archive { + +// an accessor to permit friend access to archives. Needed because +// some compilers don't handle friend templates completely +class load_access { +public: + template + static void load_primitive(Archive &ar, T &t){ + ar.load(t); + } +}; + +namespace detail { + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template +class iserializer : public basic_iserializer +{ +private: + virtual void destroy(/*const*/ void *address) const { + boost::serialization::access::destroy(static_cast(address)); + } +protected: + // protected constructor since it's always created by singleton + explicit iserializer() : + basic_iserializer( + boost::serialization::singleton< + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type + >::get_const_instance() + ) + {} +public: + virtual BOOST_DLLEXPORT void load_object_data( + basic_iarchive & ar, + void *x, + const unsigned int file_version + ) const BOOST_USED; + virtual bool class_info() const { + return boost::serialization::implementation_level< T >::value + >= boost::serialization::object_class_info; + } + virtual bool tracking(const unsigned int /* flags */) const { + return boost::serialization::tracking_level< T >::value + == boost::serialization::track_always + || ( boost::serialization::tracking_level< T >::value + == boost::serialization::track_selectively + && serialized_as_pointer()); + } + virtual version_type version() const { + return version_type(::boost::serialization::version< T >::value); + } + virtual bool is_polymorphic() const { + return boost::is_polymorphic< T >::value; + } + virtual ~iserializer(){}; +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +template +BOOST_DLLEXPORT void iserializer::load_object_data( + basic_iarchive & ar, + void *x, + const unsigned int file_version +) const { + // note: we now comment this out. Before we permited archive + // version # to be very large. Now we don't. To permit + // readers of these old archives, we have to suppress this + // code. Perhaps in the future we might re-enable it but + // permit its suppression with a runtime switch. + #if 0 + // trap case where the program cannot handle the current version + if(file_version > static_cast(version())) + boost::serialization::throw_exception( + archive::archive_exception( + boost::archive::archive_exception::unsupported_class_version, + get_debug_info() + ) + ); + #endif + // make sure call is routed through the higest interface that might + // be specialized by the user. + boost::serialization::serialize_adl( + boost::serialization::smart_cast_reference(ar), + * static_cast(x), + file_version + ); +} + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template +class pointer_iserializer : + public basic_pointer_iserializer +{ +private: + virtual const basic_iserializer & get_basic_serializer() const { + return boost::serialization::singleton< + iserializer + >::get_const_instance(); + } + BOOST_DLLEXPORT virtual void load_object_ptr( + basic_iarchive & ar, + void * & x, + const unsigned int file_version + ) const BOOST_USED; +protected: + // this should alway be a singleton so make the constructor protected + pointer_iserializer(); + ~pointer_iserializer(); +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +// note trick to be sure that operator new is using class specific +// version if such exists. Due to Peter Dimov. +// note: the following fails if T has no default constructor. +// otherwise it would have been ideal +//struct heap_allocator : public T +//{ +// T * invoke(){ +// return ::new(sizeof(T)); +// } +//} + +template +struct heap_allocator +{ + // boost::has_new_operator< T > doesn't work on these compilers + #if DONT_USE_HAS_NEW_OPERATOR + // This doesn't handle operator new overload for class T + static T * invoke(){ + return static_cast(operator new(sizeof(T))); + } + #else + struct has_new_operator { + static T* invoke() { + return static_cast((T::operator new)(sizeof(T))); + } + }; + struct doesnt_have_new_operator { + static T* invoke() { + return static_cast(operator new(sizeof(T))); + } + }; + static T * invoke() { + typedef BOOST_DEDUCED_TYPENAME + mpl::eval_if< + boost::has_new_operator< T >, + mpl::identity, + mpl::identity + >::type typex; + return typex::invoke(); + } + #endif +}; + +// due to Martin Ecker +template +class auto_ptr_with_deleter +{ +public: + explicit auto_ptr_with_deleter(T* p) : + m_p(p) + {} + ~auto_ptr_with_deleter(){ + if (m_p) + boost::serialization::access::destroy(m_p); + } + T* get() const { + return m_p; + } + + T* release() { + T* p = m_p; + m_p = NULL; + return p; + } +private: + T* m_p; +}; + +// note: BOOST_DLLEXPORT is so that code for polymorphic class +// serialized only through base class won't get optimized out +template +BOOST_DLLEXPORT void pointer_iserializer::load_object_ptr( + basic_iarchive & ar, + void * & x, + const unsigned int file_version +) const +{ + Archive & ar_impl = + boost::serialization::smart_cast_reference(ar); + + auto_ptr_with_deleter< T > ap(heap_allocator< T >::invoke()); + if(NULL == ap.get()) + boost::serialization::throw_exception(std::bad_alloc()) ; + + T * t = ap.get(); + x = t; + + // catch exception during load_construct_data so that we don't + // automatically delete the t which is most likely not fully + // constructed + BOOST_TRY { + // this addresses an obscure situtation that occurs when + // load_constructor de-serializes something through a pointer. + ar.next_object_pointer(t); + boost::serialization::load_construct_data_adl( + ar_impl, + t, + file_version + ); + } + BOOST_CATCH(...){ + ap.release(); + BOOST_RETHROW; + } + BOOST_CATCH_END + + ar_impl >> boost::serialization::make_nvp(NULL, * t); + ap.release(); +} + +template +pointer_iserializer::pointer_iserializer() : + basic_pointer_iserializer( + boost::serialization::singleton< + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type + >::get_const_instance() + ) +{ + boost::serialization::singleton< + iserializer + >::get_mutable_instance().set_bpis(this); + archive_serializer_map::insert(this); +} + +template +pointer_iserializer::~pointer_iserializer(){ + archive_serializer_map::erase(this); +} + +template +struct load_non_pointer_type { + // note this bounces the call right back to the archive + // with no runtime overhead + struct load_primitive { + template + static void invoke(Archive & ar, T & t){ + load_access::load_primitive(ar, t); + } + }; + // note this bounces the call right back to the archive + // with no runtime overhead + struct load_only { + template + static void invoke(Archive & ar, const T & t){ + // short cut to user's serializer + // make sure call is routed through the higest interface that might + // be specialized by the user. + boost::serialization::serialize_adl( + ar, + const_cast(t), + boost::serialization::version< T >::value + ); + } + }; + + // note this save class information including version + // and serialization level to the archive + struct load_standard { + template + static void invoke(Archive &ar, const T & t){ + void * x = & const_cast(t); + ar.load_object( + x, + boost::serialization::singleton< + iserializer + >::get_const_instance() + ); + } + }; + + struct load_conditional { + template + static void invoke(Archive &ar, T &t){ + //if(0 == (ar.get_flags() & no_tracking)) + load_standard::invoke(ar, t); + //else + // load_only::invoke(ar, t); + } + }; + + template + static void invoke(Archive & ar, T &t){ + typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + // if its primitive + mpl::equal_to< + boost::serialization::implementation_level< T >, + mpl::int_ + >, + mpl::identity, + // else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + // class info / version + mpl::greater_equal< + boost::serialization::implementation_level< T >, + mpl::int_ + >, + // do standard load + mpl::identity, + // else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + // no tracking + mpl::equal_to< + boost::serialization::tracking_level< T >, + mpl::int_ + >, + // do a fast load + mpl::identity, + // else + // do a fast load only tracking is turned off + mpl::identity + > > >::type typex; + check_object_versioning< T >(); + check_object_level< T >(); + typex::invoke(ar, t); + } +}; + +template +struct load_pointer_type { + struct abstract + { + template + static const basic_pointer_iserializer * register_type(Archive & /* ar */){ + // it has? to be polymorphic + BOOST_STATIC_ASSERT(boost::is_polymorphic< T >::value); + return static_cast(NULL); + } + }; + + struct non_abstract + { + template + static const basic_pointer_iserializer * register_type(Archive & ar){ + return ar.register_type(static_cast(NULL)); + } + }; + + template + static const basic_pointer_iserializer * register_type(Archive &ar, const T & /*t*/){ + // there should never be any need to load an abstract polymorphic + // class pointer. Inhibiting code generation for this + // permits abstract base classes to be used - note: exception + // virtual serialize functions used for plug-ins + typedef BOOST_DEDUCED_TYPENAME + mpl::eval_if< + boost::serialization::is_abstract, + boost::mpl::identity, + boost::mpl::identity + >::type typex; + return typex::template register_type< T >(ar); + } + + template + static T * pointer_tweak( + const boost::serialization::extended_type_info & eti, + void const * const t, + const T & + ) { + // tweak the pointer back to the base class + return static_cast( + const_cast( + boost::serialization::void_upcast( + eti, + boost::serialization::singleton< + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type + >::get_const_instance(), + t + ) + ) + ); + } + + template + static void check_load(T & /* t */){ + check_pointer_level< T >(); + check_pointer_tracking< T >(); + } + + static const basic_pointer_iserializer * + find(const boost::serialization::extended_type_info & type){ + return static_cast( + archive_serializer_map::find(type) + ); + } + + template + static void invoke(Archive & ar, Tptr & t){ + check_load(*t); + const basic_pointer_iserializer * bpis_ptr = register_type(ar, *t); + const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer( + // note major hack here !!! + // I tried every way to convert Tptr &t (where Tptr might + // include const) to void * &. This is the only way + // I could make it work. RR + (void * & )t, + bpis_ptr, + find + ); + // if the pointer isn't that of the base class + if(newbpis_ptr != bpis_ptr){ + t = pointer_tweak(newbpis_ptr->get_eti(), t, *t); + } + } +}; + +template +struct load_enum_type { + template + static void invoke(Archive &ar, T &t){ + // convert integers to correct enum to load + int i; + ar >> boost::serialization::make_nvp(NULL, i); + t = static_cast< T >(i); + } +}; + +template +struct load_array_type { + template + static void invoke(Archive &ar, T &t){ + typedef BOOST_DEDUCED_TYPENAME remove_extent< T >::type value_type; + + // convert integers to correct enum to load + // determine number of elements in the array. Consider the + // fact that some machines will align elements on boundries + // other than characters. + std::size_t current_count = sizeof(t) / ( + static_cast(static_cast(&t[1])) + - static_cast(static_cast(&t[0])) + ); + boost::serialization::collection_size_type count; + ar >> BOOST_SERIALIZATION_NVP(count); + if(static_cast(count) > current_count) + boost::serialization::throw_exception( + archive::archive_exception( + boost::archive::archive_exception::array_size_too_short + ) + ); + ar >> serialization::make_array(static_cast(&t[0]),count); + } +}; + +} // detail + +template +inline void load(Archive & ar, T &t){ + // if this assertion trips. It means we're trying to load a + // const object with a compiler that doesn't have correct + // funtion template ordering. On other compilers, this is + // handled below. + detail::check_const_loading< T >(); + typedef + BOOST_DEDUCED_TYPENAME mpl::eval_if, + mpl::identity > + ,//else + BOOST_DEDUCED_TYPENAME mpl::eval_if, + mpl::identity > + ,//else + BOOST_DEDUCED_TYPENAME mpl::eval_if, + mpl::identity > + ,//else + mpl::identity > + > + > + >::type typex; + typex::invoke(ar, t); +} + +#if 0 + +// BORLAND +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) +// borland has a couple of problems +// a) if function is partially specialized - see below +// const paramters are transformed to non-const ones +// b) implementation of base_object can't be made to work +// correctly which results in all base_object s being const. +// So, strip off the const for borland. This breaks the trap +// for loading const objects - but I see no alternative +template +inline void load(Archive &ar, const T & t){ + load(ar, const_cast(t)); +} +#endif + +// let wrappers through. +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline void load_wrapper(Archive &ar, const T&t, mpl::true_){ + boost::archive::load(ar, const_cast(t)); +} + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) +template +inline void load(Archive &ar, const T&t){ + load_wrapper(ar,t,serialization::is_wrapper< T >()); +} +#endif +#endif + +#endif + +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/oserializer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/oserializer.hpp new file mode 100644 index 0000000000..e676f6365d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/oserializer.hpp @@ -0,0 +1,531 @@ +#ifndef BOOST_ARCHIVE_OSERIALIZER_HPP +#define BOOST_ARCHIVE_OSERIALIZER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#pragma inline_depth(511) +#pragma inline_recursion(on) +#endif + +#if defined(__MWERKS__) +#pragma inline_depth(511) +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// oserializer.hpp: interface for serialization system. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // NULL + +#include +#include +#include + +#include +#include +#include +#include + +#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO + #include +#endif +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace serialization { + class extended_type_info; +} // namespace serialization + +namespace archive { + +// an accessor to permit friend access to archives. Needed because +// some compilers don't handle friend templates completely +class save_access { +public: + template + static void end_preamble(Archive & ar){ + ar.end_preamble(); + } + template + static void save_primitive(Archive & ar, const T & t){ + ar.end_preamble(); + ar.save(t); + } +}; + +namespace detail { + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template +class oserializer : public basic_oserializer +{ +private: + // private constructor to inhibit any existence other than the + // static one +public: + explicit BOOST_DLLEXPORT oserializer() : + basic_oserializer( + boost::serialization::singleton< + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type + >::get_const_instance() + ) + {} + virtual BOOST_DLLEXPORT void save_object_data( + basic_oarchive & ar, + const void *x + ) const BOOST_USED; + virtual bool class_info() const { + return boost::serialization::implementation_level< T >::value + >= boost::serialization::object_class_info; + } + virtual bool tracking(const unsigned int /* flags */) const { + return boost::serialization::tracking_level< T >::value == boost::serialization::track_always + || (boost::serialization::tracking_level< T >::value == boost::serialization::track_selectively + && serialized_as_pointer()); + } + virtual version_type version() const { + return version_type(::boost::serialization::version< T >::value); + } + virtual bool is_polymorphic() const { + return boost::is_polymorphic< T >::value; + } + virtual ~oserializer(){} +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +template +BOOST_DLLEXPORT void oserializer::save_object_data( + basic_oarchive & ar, + const void *x +) const { + // make sure call is routed through the highest interface that might + // be specialized by the user. + BOOST_STATIC_ASSERT(boost::is_const< T >::value == false); + boost::serialization::serialize_adl( + boost::serialization::smart_cast_reference(ar), + * static_cast(const_cast(x)), + version() + ); +} + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template +class pointer_oserializer : + public basic_pointer_oserializer +{ +private: + const basic_oserializer & + get_basic_serializer() const { + return boost::serialization::singleton< + oserializer + >::get_const_instance(); + } + virtual BOOST_DLLEXPORT void save_object_ptr( + basic_oarchive & ar, + const void * x + ) const BOOST_USED; +public: + pointer_oserializer(); + ~pointer_oserializer(); +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +template +BOOST_DLLEXPORT void pointer_oserializer::save_object_ptr( + basic_oarchive & ar, + const void * x +) const { + assert(NULL != x); + // make sure call is routed through the highest interface that might + // be specialized by the user. + T * t = static_cast(const_cast(x)); + const unsigned int file_version = boost::serialization::version< T >::value; + Archive & ar_impl + = boost::serialization::smart_cast_reference(ar); + boost::serialization::save_construct_data_adl( + ar_impl, + t, + file_version + ); + ar_impl << boost::serialization::make_nvp(NULL, * t); +} + +template +pointer_oserializer::pointer_oserializer() : + basic_pointer_oserializer( + boost::serialization::singleton< + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type + >::get_const_instance() + ) +{ + // make sure appropriate member function is instantiated + boost::serialization::singleton< + oserializer + >::get_mutable_instance().set_bpos(this); + archive_serializer_map::insert(this); +} + +template +pointer_oserializer::~pointer_oserializer(){ + archive_serializer_map::erase(this); +} + +template +struct save_non_pointer_type { + // note this bounces the call right back to the archive + // with no runtime overhead + struct save_primitive { + template + static void invoke(Archive & ar, const T & t){ + save_access::save_primitive(ar, t); + } + }; + // same as above but passes through serialization + struct save_only { + template + static void invoke(Archive & ar, const T & t){ + // make sure call is routed through the highest interface that might + // be specialized by the user. + boost::serialization::serialize_adl( + ar, + const_cast(t), + ::boost::serialization::version< T >::value + ); + } + }; + // adds class information to the archive. This includes + // serialization level and class version + struct save_standard { + template + static void invoke(Archive &ar, const T & t){ + ar.save_object( + & t, + boost::serialization::singleton< + oserializer + >::get_const_instance() + ); + } + }; + + // adds class information to the archive. This includes + // serialization level and class version + struct save_conditional { + template + static void invoke(Archive &ar, const T &t){ + //if(0 == (ar.get_flags() & no_tracking)) + save_standard::invoke(ar, t); + //else + // save_only::invoke(ar, t); + } + }; + + + template + static void invoke(Archive & ar, const T & t){ + typedef + BOOST_DEDUCED_TYPENAME mpl::eval_if< + // if its primitive + mpl::equal_to< + boost::serialization::implementation_level< T >, + mpl::int_ + >, + mpl::identity, + // else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + // class info / version + mpl::greater_equal< + boost::serialization::implementation_level< T >, + mpl::int_ + >, + // do standard save + mpl::identity, + // else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + // no tracking + mpl::equal_to< + boost::serialization::tracking_level< T >, + mpl::int_ + >, + // do a fast save + mpl::identity, + // else + // do a fast save only tracking is turned off + mpl::identity + > > >::type typex; + check_object_versioning< T >(); + typex::invoke(ar, t); + } + template + static void invoke(Archive & ar, T & t){ + check_object_level< T >(); + check_object_tracking< T >(); + invoke(ar, const_cast(t)); + } +}; + +template +struct save_pointer_type { + struct abstract + { + template + static const basic_pointer_oserializer * register_type(Archive & /* ar */){ + // it has? to be polymorphic + BOOST_STATIC_ASSERT(boost::is_polymorphic< T >::value); + return NULL; + } + }; + + struct non_abstract + { + template + static const basic_pointer_oserializer * register_type(Archive & ar){ + return ar.register_type(static_cast(NULL)); + } + }; + + template + static const basic_pointer_oserializer * register_type(Archive &ar, T & /*t*/){ + // there should never be any need to save an abstract polymorphic + // class pointer. Inhibiting code generation for this + // permits abstract base classes to be used - note: exception + // virtual serialize functions used for plug-ins + typedef + BOOST_DEDUCED_TYPENAME mpl::eval_if< + boost::serialization::is_abstract< T >, + mpl::identity, + mpl::identity + >::type typex; + return typex::template register_type< T >(ar); + } + + struct non_polymorphic + { + template + static void save( + Archive &ar, + T & t + ){ + const basic_pointer_oserializer & bpos = + boost::serialization::singleton< + pointer_oserializer + >::get_const_instance(); + // save the requested pointer type + ar.save_pointer(& t, & bpos); + } + }; + + struct polymorphic + { + template + static void save( + Archive &ar, + T & t + ){ + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type const + & i = boost::serialization::singleton< + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type + >::get_const_instance(); + + boost::serialization::extended_type_info const * const this_type = & i; + + // retrieve the true type of the object pointed to + // if this assertion fails its an error in this library + assert(NULL != this_type); + + const boost::serialization::extended_type_info * true_type = + i.get_derived_extended_type_info(t); + + // note:if this exception is thrown, be sure that derived pointer + // is either registered or exported. + if(NULL == true_type){ + boost::serialization::throw_exception( + archive_exception( + archive_exception::unregistered_class, + "derived class not registered or exported" + ) + ); + } + + // if its not a pointer to a more derived type + const void *vp = static_cast(&t); + if(*this_type == *true_type){ + const basic_pointer_oserializer * bpos = register_type(ar, t); + ar.save_pointer(vp, bpos); + return; + } + // convert pointer to more derived type. if this is thrown + // it means that the base/derived relationship hasn't be registered + vp = serialization::void_downcast( + *true_type, + *this_type, + static_cast(&t) + ); + if(NULL == vp){ + boost::serialization::throw_exception( + archive_exception( + archive_exception::unregistered_cast, + true_type->get_debug_info(), + this_type->get_debug_info() + ) + ); + } + + // since true_type is valid, and this only gets made if the + // pointer oserializer object has been created, this should never + // fail + const basic_pointer_oserializer * bpos + = static_cast( + boost::serialization::singleton< + archive_serializer_map + >::get_const_instance().find(*true_type) + ); + assert(NULL != bpos); + if(NULL == bpos) + boost::serialization::throw_exception( + archive_exception( + archive_exception::unregistered_class, + bpos->get_debug_info() + ) + ); + ar.save_pointer(vp, bpos); + } + }; + + template + static void save( + Archive & ar, + const T & t + ){ + check_pointer_level< T >(); + check_pointer_tracking< T >(); + typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_polymorphic< T >, + mpl::identity, + mpl::identity + >::type type; + type::save(ar, const_cast(t)); + } + + template + static void invoke(Archive &ar, const TPtr t){ + register_type(ar, * t); + if(NULL == t){ + basic_oarchive & boa + = boost::serialization::smart_cast_reference(ar); + boa.save_null_pointer(); + save_access::end_preamble(ar); + return; + } + save(ar, * t); + } +}; + +template +struct save_enum_type +{ + template + static void invoke(Archive &ar, const T &t){ + // convert enum to integers on save + const int i = static_cast(t); + ar << boost::serialization::make_nvp(NULL, i); + } +}; + +template +struct save_array_type +{ + template + static void invoke(Archive &ar, const T &t){ + typedef BOOST_DEDUCED_TYPENAME boost::remove_extent< T >::type value_type; + + save_access::end_preamble(ar); + // consider alignment + std::size_t c = sizeof(t) / ( + static_cast(static_cast(&t[1])) + - static_cast(static_cast(&t[0])) + ); + boost::serialization::collection_size_type count(c); + ar << BOOST_SERIALIZATION_NVP(count); + ar << serialization::make_array(static_cast(&t[0]),count); + } +}; + +} // detail + +template +inline void save(Archive & ar, /*const*/ T &t){ + typedef + BOOST_DEDUCED_TYPENAME mpl::eval_if, + mpl::identity >, + //else + BOOST_DEDUCED_TYPENAME mpl::eval_if, + mpl::identity >, + //else + BOOST_DEDUCED_TYPENAME mpl::eval_if, + mpl::identity >, + //else + mpl::identity > + > + > + >::type typex; + typex::invoke(ar, t); +} + +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_OSERIALIZER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/polymorphic_iarchive_route.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/polymorphic_iarchive_route.hpp new file mode 100644 index 0000000000..d93bb79cb1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/polymorphic_iarchive_route.hpp @@ -0,0 +1,215 @@ +#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP +#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_iarchive_route.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include // must be the last header + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization +namespace archive { +namespace detail{ + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template +class polymorphic_iarchive_route : + public polymorphic_iarchive, + // note: gcc dynamic cross cast fails if the the derivation below is + // not public. I think this is a mistake. + public /*protected*/ ArchiveImplementation +{ +private: + // these are used by the serialization library. + virtual void load_object( + void *t, + const basic_iserializer & bis + ){ + ArchiveImplementation::load_object(t, bis); + } + virtual const basic_pointer_iserializer * load_pointer( + void * & t, + const basic_pointer_iserializer * bpis_ptr, + const basic_pointer_iserializer * (*finder)( + const boost::serialization::extended_type_info & type + ) + ){ + return ArchiveImplementation::load_pointer(t, bpis_ptr, finder); + } + virtual void set_library_version(library_version_type archive_library_version){ + ArchiveImplementation::set_library_version(archive_library_version); + } + virtual library_version_type get_library_version() const{ + return ArchiveImplementation::get_library_version(); + } + virtual unsigned int get_flags() const { + return ArchiveImplementation::get_flags(); + } + virtual void delete_created_pointers(){ + ArchiveImplementation::delete_created_pointers(); + } + virtual void reset_object_address( + const void * new_address, + const void * old_address + ){ + ArchiveImplementation::reset_object_address(new_address, old_address); + } + virtual void load_binary(void * t, std::size_t size){ + ArchiveImplementation::load_binary(t, size); + } + // primitive types the only ones permitted by polymorphic archives + virtual void load(bool & t){ + ArchiveImplementation::load(t); + } + virtual void load(char & t){ + ArchiveImplementation::load(t); + } + virtual void load(signed char & t){ + ArchiveImplementation::load(t); + } + virtual void load(unsigned char & t){ + ArchiveImplementation::load(t); + } + #ifndef BOOST_NO_CWCHAR + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + virtual void load(wchar_t & t){ + ArchiveImplementation::load(t); + } + #endif + #endif + virtual void load(short & t){ + ArchiveImplementation::load(t); + } + virtual void load(unsigned short & t){ + ArchiveImplementation::load(t); + } + virtual void load(int & t){ + ArchiveImplementation::load(t); + } + virtual void load(unsigned int & t){ + ArchiveImplementation::load(t); + } + virtual void load(long & t){ + ArchiveImplementation::load(t); + } + virtual void load(unsigned long & t){ + ArchiveImplementation::load(t); + } + #if defined(BOOST_HAS_LONG_LONG) + virtual void load(boost::long_long_type & t){ + ArchiveImplementation::load(t); + } + virtual void load(boost::ulong_long_type & t){ + ArchiveImplementation::load(t); + } + #elif defined(BOOST_HAS_MS_INT64) + virtual void load(__int64 & t){ + ArchiveImplementation::load(t); + } + virtual void load(unsigned __int64 & t){ + ArchiveImplementation::load(t); + } + #endif + virtual void load(float & t){ + ArchiveImplementation::load(t); + } + virtual void load(double & t){ + ArchiveImplementation::load(t); + } + virtual void load(std::string & t){ + ArchiveImplementation::load(t); + } + #ifndef BOOST_NO_STD_WSTRING + virtual void load(std::wstring & t){ + ArchiveImplementation::load(t); + } + #endif + // used for xml and other tagged formats default does nothing + virtual void load_start(const char * name){ + ArchiveImplementation::load_start(name); + } + virtual void load_end(const char * name){ + ArchiveImplementation::load_end(name); + } + + virtual void register_basic_serializer(const basic_iserializer & bis){ + ArchiveImplementation::register_basic_serializer(bis); + } +public: + // this can't be inheriteded because they appear in mulitple + // parents + typedef mpl::bool_ is_loading; + typedef mpl::bool_ is_saving; + // the >> operator + template + polymorphic_iarchive & operator>>(T & t){ + return polymorphic_iarchive::operator>>(t); + } + // the & operator + template + polymorphic_iarchive & operator&(T & t){ + return polymorphic_iarchive::operator&(t); + } + // register type function + template + const basic_pointer_iserializer * + register_type(T * t = NULL){ + return ArchiveImplementation::register_type(t); + } + // all current archives take a stream as constructor argument + template + polymorphic_iarchive_route( + std::basic_istream<_Elem, _Tr> & is, + unsigned int flags = 0 + ) : + ArchiveImplementation(is, flags) + {} + virtual ~polymorphic_iarchive_route(){}; +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_DISPATCH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/polymorphic_oarchive_route.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/polymorphic_oarchive_route.hpp new file mode 100644 index 0000000000..f1b20f8bf1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/polymorphic_oarchive_route.hpp @@ -0,0 +1,205 @@ +#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP +#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_oarchive_route.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include // size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include // must be the last header + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization +namespace archive { +namespace detail{ + +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template +class polymorphic_oarchive_route : + public polymorphic_oarchive, + // note: gcc dynamic cross cast fails if the the derivation below is + // not public. I think this is a mistake. + public /*protected*/ ArchiveImplementation +{ +private: + // these are used by the serialization library. + virtual void save_object( + const void *x, + const detail::basic_oserializer & bos + ){ + ArchiveImplementation::save_object(x, bos); + } + virtual void save_pointer( + const void * t, + const detail::basic_pointer_oserializer * bpos_ptr + ){ + ArchiveImplementation::save_pointer(t, bpos_ptr); + } + virtual void save_null_pointer(){ + ArchiveImplementation::save_null_pointer(); + } + // primitive types the only ones permitted by polymorphic archives + virtual void save(const bool t){ + ArchiveImplementation::save(t); + } + virtual void save(const char t){ + ArchiveImplementation::save(t); + } + virtual void save(const signed char t){ + ArchiveImplementation::save(t); + } + virtual void save(const unsigned char t){ + ArchiveImplementation::save(t); + } + #ifndef BOOST_NO_CWCHAR + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + virtual void save(const wchar_t t){ + ArchiveImplementation::save(t); + } + #endif + #endif + virtual void save(const short t){ + ArchiveImplementation::save(t); + } + virtual void save(const unsigned short t){ + ArchiveImplementation::save(t); + } + virtual void save(const int t){ + ArchiveImplementation::save(t); + } + virtual void save(const unsigned int t){ + ArchiveImplementation::save(t); + } + virtual void save(const long t){ + ArchiveImplementation::save(t); + } + virtual void save(const unsigned long t){ + ArchiveImplementation::save(t); + } + #if defined(BOOST_HAS_LONG_LONG) + virtual void save(const boost::long_long_type t){ + ArchiveImplementation::save(t); + } + virtual void save(const boost::ulong_long_type t){ + ArchiveImplementation::save(t); + } + #elif defined(BOOST_HAS_MS_INT64) + virtual void save(const boost::int64_t t){ + ArchiveImplementation::save(t); + } + virtual void save(const boost::uint64_t t){ + ArchiveImplementation::save(t); + } + #endif + virtual void save(const float t){ + ArchiveImplementation::save(t); + } + virtual void save(const double t){ + ArchiveImplementation::save(t); + } + virtual void save(const std::string & t){ + ArchiveImplementation::save(t); + } + #ifndef BOOST_NO_STD_WSTRING + virtual void save(const std::wstring & t){ + ArchiveImplementation::save(t); + } + #endif + virtual library_version_type get_library_version() const{ + return ArchiveImplementation::get_library_version(); + } + virtual unsigned int get_flags() const { + return ArchiveImplementation::get_flags(); + } + virtual void save_binary(const void * t, std::size_t size){ + ArchiveImplementation::save_binary(t, size); + } + // used for xml and other tagged formats default does nothing + virtual void save_start(const char * name){ + ArchiveImplementation::save_start(name); + } + virtual void save_end(const char * name){ + ArchiveImplementation::save_end(name); + } + virtual void end_preamble(){ + ArchiveImplementation::end_preamble(); + } + virtual void register_basic_serializer(const detail::basic_oserializer & bos){ + ArchiveImplementation::register_basic_serializer(bos); + } +public: + // this can't be inheriteded because they appear in mulitple + // parents + typedef mpl::bool_ is_loading; + typedef mpl::bool_ is_saving; + // the << operator + template + polymorphic_oarchive & operator<<(T & t){ + return polymorphic_oarchive::operator<<(t); + } + // the & operator + template + polymorphic_oarchive & operator&(T & t){ + return polymorphic_oarchive::operator&(t); + } + // register type function + template + const basic_pointer_oserializer * + register_type(T * t = NULL){ + return ArchiveImplementation::register_type(t); + } + // all current archives take a stream as constructor argument + template + polymorphic_oarchive_route( + std::basic_ostream<_Elem, _Tr> & os, + unsigned int flags = 0 + ) : + ArchiveImplementation(os, flags) + {} + virtual ~polymorphic_oarchive_route(){}; +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_DISPATCH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/register_archive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/register_archive.hpp new file mode 100644 index 0000000000..e31ae46c05 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/register_archive.hpp @@ -0,0 +1,91 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP +# define BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP + +namespace boost { namespace archive { namespace detail { + +// No instantiate_ptr_serialization overloads generated by +// BOOST_SERIALIZATION_REGISTER_ARCHIVE that lexically follow the call +// will be seen *unless* they are in an associated namespace of one of +// the arguments, so we pass one of these along to make sure this +// namespace is considered. See temp.dep.candidate (14.6.4.2) in the +// standard. +struct adl_tag {}; + +template +struct ptr_serialization_support; + +// We could've just used ptr_serialization_support, above, but using +// it with only a forward declaration causes vc6/7 to complain about a +// missing instantiate member, even if it has one. This is just a +// friendly layer of indirection. +template +struct _ptr_serialization_support + : ptr_serialization_support +{ + typedef int type; +}; + +#ifdef __SUNPRO_CC + +template +struct counter : counter {}; +template<> +struct counter<0> {}; + +template +void instantiate_ptr_serialization(Serializable* s, int, adl_tag) { + instantiate_ptr_serialization(s, counter<20>()); +} + +template +struct get_counter { + static const int value = sizeof(adjust_counter(counter<20>())); + typedef counter type; + typedef counter prior; + typedef char (&next)[value+1]; +}; + +char adjust_counter(counter<0>); +template +void instantiate_ptr_serialization(Serializable*, counter<0>) {} + +#define BOOST_SERIALIZATION_REGISTER_ARCHIVE(Archive) \ +namespace boost { namespace archive { namespace detail { \ + get_counter::next adjust_counter(get_counter::type);\ + template \ + void instantiate_ptr_serialization(Serializable* s, \ + get_counter::type) { \ + ptr_serialization_support x; \ + instantiate_ptr_serialization(s, get_counter::prior()); \ + }\ +}}} + + +#else + +// This function gets called, but its only purpose is to participate +// in overload resolution with the functions declared by +// BOOST_SERIALIZATION_REGISTER_ARCHIVE, below. +template +void instantiate_ptr_serialization(Serializable*, int, adl_tag ) {} + +// The function declaration generated by this macro never actually +// gets called, but its return type gets instantiated, and that's +// enough to cause registration of serialization functions between +// Archive and any exported Serializable type. See also: +// boost/serialization/export.hpp +# define BOOST_SERIALIZATION_REGISTER_ARCHIVE(Archive) \ +namespace boost { namespace archive { namespace detail { \ + \ +template \ +BOOST_DEDUCED_TYPENAME _ptr_serialization_support::type \ +instantiate_ptr_serialization( Serializable*, Archive*, adl_tag ); \ + \ +}}} +#endif +}}} // namespace boost::archive::detail + +#endif // BOOST_ARCHIVE_DETAIL_INSTANTIATE_SERIALIZE_DWA2006521_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/utf8_codecvt_facet.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/utf8_codecvt_facet.hpp new file mode 100644 index 0000000000..bd859ffebd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/detail/utf8_codecvt_facet.hpp @@ -0,0 +1,21 @@ +// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP +#define BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP + +#define BOOST_UTF8_BEGIN_NAMESPACE \ + namespace boost { namespace archive { namespace detail { +#define BOOST_UTF8_DECL +#define BOOST_UTF8_END_NAMESPACE }}} + +#include + +#undef BOOST_UTF8_END_NAMESPACE +#undef BOOST_UTF8_DECL +#undef BOOST_UTF8_BEGIN_NAMESPACE + +#endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/dinkumware.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/dinkumware.hpp new file mode 100644 index 0000000000..bfa828d53d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/dinkumware.hpp @@ -0,0 +1,224 @@ +#ifndef BOOST_ARCHIVE_DINKUMWARE_HPP +#define BOOST_ARCHIVE_DINKUMWARE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// dinkumware.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// this file adds a couple of things that are missing from the dinkumware +// implementation of the standard library. + +#include +#include + +#include +#include + +namespace std { + +// define i/o operators for 64 bit integers +template +basic_ostream & +operator<<(basic_ostream & os, boost::uint64_t t){ + // octal rendering of 64 bit number would be 22 octets + eos + CharType d[23]; + unsigned int radix; + + if(os.flags() & (int)std::ios_base::hex) + radix = 16; + else + if(os.flags() & (int)std::ios_base::oct) + radix = 8; + else + //if(s.flags() & (int)std::ios_base::dec) + radix = 10; + unsigned int i = 0; + do{ + unsigned int j = t % radix; + d[i++] = j + ((j < 10) ? '0' : ('a' - 10)); + t /= radix; + } + while(t > 0); + d[i--] = '\0'; + + // reverse digits + unsigned int j = 0; + while(j < i){ + CharType k = d[i]; + d[i] = d[j]; + d[j] = k; + --i;++j; + } + os << d; + return os; + +} + +template +basic_ostream & +operator<<(basic_ostream &os, boost::int64_t t){ + if(0 <= t){ + os << static_cast(t); + } + else{ + os.put('-'); + os << -t; + } + return os; +} + +template +basic_istream & +operator>>(basic_istream &is, boost::int64_t & t){ + CharType d; + do{ + d = is.get(); + } + while(::isspace(d)); + bool negative = (d == '-'); + if(negative) + d = is.get(); + unsigned int radix; + if(is.flags() & (int)std::ios_base::hex) + radix = 16; + else + if(is.flags() & (int)std::ios_base::oct) + radix = 8; + else + //if(s.flags() & (int)std::ios_base::dec) + radix = 10; + t = 0; + do{ + if('0' <= d && d <= '9') + t = t * radix + (d - '0'); + else + if('a' <= d && d <= 'f') + t = t * radix + (d - 'a' + 10); + else + break; + d = is.get(); + } + while(!is.fail()); + // restore the delimiter + is.putback(d); + is.clear(); + if(negative) + t = -t; + return is; +} + +template +basic_istream & +operator>>(basic_istream &is, boost::uint64_t & t){ + boost::int64_t it; + is >> it; + t = it; + return is; +} + +//#endif + +template<> +class back_insert_iterator > : public + iterator +{ +public: + typedef basic_string container_type; + typedef container_type::reference reference; + + explicit back_insert_iterator(container_type & s) + : container(& s) + {} // construct with container + + back_insert_iterator & operator=( + container_type::const_reference Val_ + ){ // push value into container + //container->push_back(Val_); + *container += Val_; + return (*this); + } + + back_insert_iterator & operator*(){ + return (*this); + } + + back_insert_iterator & operator++(){ + // pretend to preincrement + return (*this); + } + + back_insert_iterator operator++(int){ + // pretend to postincrement + return (*this); + } + +protected: + container_type *container; // pointer to container +}; + +template +inline back_insert_iterator > back_inserter( + basic_string & s +){ + return (std::back_insert_iterator >(s)); +} + +template<> +class back_insert_iterator > : public + iterator +{ +public: + typedef basic_string container_type; + typedef container_type::reference reference; + + explicit back_insert_iterator(container_type & s) + : container(& s) + {} // construct with container + + back_insert_iterator & operator=( + container_type::const_reference Val_ + ){ // push value into container + //container->push_back(Val_); + *container += Val_; + return (*this); + } + + back_insert_iterator & operator*(){ + return (*this); + } + + back_insert_iterator & operator++(){ + // pretend to preincrement + return (*this); + } + + back_insert_iterator operator++(int){ + // pretend to postincrement + return (*this); + } + +protected: + container_type *container; // pointer to container +}; + +template +inline back_insert_iterator > back_inserter( + basic_string & s +){ + return (std::back_insert_iterator >(s)); +} + +} // namespace std + +#endif //BOOST_ARCHIVE_DINKUMWARE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/archive_serializer_map.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/archive_serializer_map.ipp new file mode 100644 index 0000000000..c8ad96b3d7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/archive_serializer_map.ipp @@ -0,0 +1,71 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// archive_serializer_map.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +////////////////////////////////////////////////////////////////////// +// implementation of basic_text_iprimitive overrides for the combination +// of template parameters used to implement a text_iprimitive + +#include +#include +#include +#include + +namespace boost { +namespace archive { +namespace detail { + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace extra_detail { // anon + template + class map : public basic_serializer_map + {}; +} + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(bool) +archive_serializer_map::insert(const basic_serializer * bs){ + return boost::serialization::singleton< + extra_detail::map + >::get_mutable_instance().insert(bs); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +archive_serializer_map::erase(const basic_serializer * bs){ + if(boost::serialization::singleton< + extra_detail::map + >::is_destroyed()) + return; + boost::serialization::singleton< + extra_detail::map + >::get_mutable_instance().erase(bs); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_serializer *) +archive_serializer_map::find( + const boost::serialization::extended_type_info & eti +) { + return boost::serialization::singleton< + extra_detail::map + >::get_const_instance().find(eti); +} + +} // namespace detail +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_iarchive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_iarchive.ipp new file mode 100644 index 0000000000..a9757b30d4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_iarchive.ipp @@ -0,0 +1,129 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_binary_iarchive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +#include +#include +#include + +#include // for BOOST_DEDUCED_TYPENAME +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::memcpy; + using ::strlen; + using ::size_t; +} +#endif + +#include +#include + +#include + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implementation of binary_binary_archive +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_iarchive::load_override(class_name_type & t, int){ + std::string cn; + cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); + load_override(cn, 0); + if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) + boost::serialization::throw_exception( + archive_exception(archive_exception::invalid_class_name) + ); + std::memcpy(t, cn.data(), cn.size()); + // borland tweak + t.t[cn.size()] = '\0'; +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_iarchive::init(){ + // read signature in an archive version independent manner + std::string file_signature; + try { + std::size_t l; + this->This()->load(l); + if(l == std::strlen(BOOST_ARCHIVE_SIGNATURE())) { + // borland de-allocator fixup + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != file_signature.data()) + #endif + file_signature.resize(l); + // note breaking a rule here - could be a problem on some platform + if(0 < l) + this->This()->load_binary(&(*file_signature.begin()), l); + } + } + catch(archive_exception const &) { // catch stream_error archive exceptions + // will cause invalid_signature archive exception to be thrown below + file_signature = ""; + } + if(file_signature != BOOST_ARCHIVE_SIGNATURE()) + boost::serialization::throw_exception( + archive_exception(archive_exception::invalid_signature) + ); + + // make sure the version of the reading archive library can + // support the format of the archive being read + library_version_type input_library_version; + //* this->This() >> input_library_version; + { + int v = 0; + v = this->This()->m_sb.sbumpc(); + #if defined(BOOST_LITTLE_ENDIAN) + if(v < 6){ + ; + } + else + if(v < 7){ + // version 6 - next byte should be zero + this->This()->m_sb.sbumpc(); + } + else + if(v < 8){ + int x1; + // version 7 = might be followed by zero or some other byte + x1 = this->This()->m_sb.sgetc(); + // it's =a zero, push it back + if(0 == x1) + this->This()->m_sb.sbumpc(); + } + else{ + // version 8+ followed by a zero + this->This()->m_sb.sbumpc(); + } + #elif defined(BOOST_BIG_ENDIAN) + if(v == 0) + v = this->This()->m_sb.sbumpc(); + #endif + input_library_version = static_cast(v); + } + + #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) + this->set_library_version(input_library_version); + #else + #if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200) + detail:: + #endif + basic_iarchive::set_library_version(input_library_version); + #endif + + if(BOOST_ARCHIVE_VERSION() < input_library_version) + boost::serialization::throw_exception( + archive_exception(archive_exception::unsupported_version) + ); +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_iprimitive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_iprimitive.ipp new file mode 100644 index 0000000000..f609571326 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_iprimitive.ipp @@ -0,0 +1,209 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_binary_iprimitive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // size_t, NULL +#include // memcpy + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; + using ::memcpy; +} // namespace std +#endif + +#include // fixup for RogueWave + +#include +#include + +#include +#include +#include + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// implementation of basic_binary_iprimitive + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_iprimitive::init() +{ + // Detect attempts to pass native binary archives across + // incompatible platforms. This is not fool proof but its + // better than nothing. + unsigned char size; + this->This()->load(size); + if(sizeof(int) != size) + boost::serialization::throw_exception( + archive_exception( + archive_exception::incompatible_native_format, + "size of int" + ) + ); + this->This()->load(size); + if(sizeof(long) != size) + boost::serialization::throw_exception( + archive_exception( + archive_exception::incompatible_native_format, + "size of long" + ) + ); + this->This()->load(size); + if(sizeof(float) != size) + boost::serialization::throw_exception( + archive_exception( + archive_exception::incompatible_native_format, + "size of float" + ) + ); + this->This()->load(size); + if(sizeof(double) != size) + boost::serialization::throw_exception( + archive_exception( + archive_exception::incompatible_native_format, + "size of double" + ) + ); + + // for checking endian + int i; + this->This()->load(i); + if(1 != i) + boost::serialization::throw_exception( + archive_exception( + archive_exception::incompatible_native_format, + "endian setting" + ) + ); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_iprimitive::load(wchar_t * ws) +{ + std::size_t l; // number of wchar_t !!! + this->This()->load(l); + load_binary(ws, l * sizeof(wchar_t) / sizeof(char)); + ws[l] = L'\0'; +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_iprimitive::load(std::string & s) +{ + std::size_t l; + this->This()->load(l); + // borland de-allocator fixup + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != s.data()) + #endif + s.resize(l); + // note breaking a rule here - could be a problem on some platform + if(0 < l) + load_binary(&(*s.begin()), l); +} + +#ifndef BOOST_NO_CWCHAR +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_iprimitive::load(char * s) +{ + std::size_t l; + this->This()->load(l); + load_binary(s, l); + s[l] = '\0'; +} +#endif + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_iprimitive::load(std::wstring & ws) +{ + std::size_t l; + this->This()->load(l); + // borland de-allocator fixup + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != ws.data()) + #endif + ws.resize(l); + // note breaking a rule here - is could be a problem on some platform + load_binary(const_cast(ws.data()), l * sizeof(wchar_t) / sizeof(char)); +} +#endif + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_binary_iprimitive::basic_binary_iprimitive( + std::basic_streambuf & sb, + bool no_codecvt +) : +#ifndef BOOST_NO_STD_LOCALE + m_sb(sb), + archive_locale(NULL), + locale_saver(m_sb) +{ + if(! no_codecvt){ + archive_locale.reset( + boost::archive::add_facet( + std::locale::classic(), + new codecvt_null + ) + ); + m_sb.pubimbue(* archive_locale); + } +} +#else + m_sb(sb) +{} +#endif + +// some libraries including stl and libcomo fail if the +// buffer isn't flushed before the code_cvt facet is changed. +// I think this is a bug. We explicity invoke sync to when +// we're done with the streambuf to work around this problem. +// Note that sync is a protected member of stream buff so we +// have to invoke it through a contrived derived class. +namespace detail { +// note: use "using" to get past msvc bug +using namespace std; +template +class input_streambuf_access : public std::basic_streambuf { + public: + virtual int sync(){ +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) + return this->basic_streambuf::sync(); +#else + return this->basic_streambuf::sync(); +#endif + } +}; +} // detail + +// scoped_ptr requires that archive_locale be a complete type at time of +// destruction so define destructor here rather than in the header +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_binary_iprimitive::~basic_binary_iprimitive(){ + // push back unread characters + //destructor can't throw ! + try{ + static_cast &>(m_sb).sync(); + } + catch(...){ + } +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_oarchive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_oarchive.ipp new file mode 100644 index 0000000000..cd12c4c6a7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_oarchive.ipp @@ -0,0 +1,46 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_binary_oarchive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +#include +#include +#include + +#include // for BOOST_DEDUCED_TYPENAME +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::memcpy; +} +#endif + +#include + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implementation of binary_binary_oarchive + +template +#if !defined(__BORLANDC__) +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +#else +void +#endif +basic_binary_oarchive::init(){ + // write signature in an archive version independent manner + const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); + * this->This() << file_signature; + // write library version + const library_version_type v(BOOST_ARCHIVE_VERSION()); + * this->This() << v; +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_oprimitive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_oprimitive.ipp new file mode 100644 index 0000000000..02b5ffab9e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_binary_oprimitive.ipp @@ -0,0 +1,160 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_binary_oprimitive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // NULL +#include + +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) && ! defined(__LIBCOMO__) +namespace std{ + using ::strlen; +} // namespace std +#endif + +#ifndef BOOST_NO_CWCHAR +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ using ::wcslen; } +#endif +#endif + +#include + +#include +#include + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// implementation of basic_binary_oprimitive + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_oprimitive::init() +{ + // record native sizes of fundamental types + // this is to permit detection of attempts to pass + // native binary archives accross incompatible machines. + // This is not foolproof but its better than nothing. + this->This()->save(static_cast(sizeof(int))); + this->This()->save(static_cast(sizeof(long))); + this->This()->save(static_cast(sizeof(float))); + this->This()->save(static_cast(sizeof(double))); + // for checking endianness + this->This()->save(int(1)); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_oprimitive::save(const char * s) +{ + std::size_t l = std::strlen(s); + this->This()->save(l); + save_binary(s, l); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_oprimitive::save(const std::string &s) +{ + std::size_t l = static_cast(s.size()); + this->This()->save(l); + save_binary(s.data(), l); +} + +#ifndef BOOST_NO_CWCHAR +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_oprimitive::save(const wchar_t * ws) +{ + std::size_t l = std::wcslen(ws); + this->This()->save(l); + save_binary(ws, l * sizeof(wchar_t) / sizeof(char)); +} +#endif + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_oprimitive::save(const std::wstring &ws) +{ + std::size_t l = ws.size(); + this->This()->save(l); + save_binary(ws.data(), l * sizeof(wchar_t) / sizeof(char)); +} +#endif + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_binary_oprimitive::basic_binary_oprimitive( + std::basic_streambuf & sb, + bool no_codecvt +) : +#ifndef BOOST_NO_STD_LOCALE + m_sb(sb), + archive_locale(NULL), + locale_saver(m_sb) +{ + if(! no_codecvt){ + archive_locale.reset( + add_facet( + std::locale::classic(), + new codecvt_null + ) + ); + m_sb.pubimbue(* archive_locale); + } +} +#else + m_sb(sb) +{} +#endif + +// some libraries including stl and libcomo fail if the +// buffer isn't flushed before the code_cvt facet is changed. +// I think this is a bug. We explicity invoke sync to when +// we're done with the streambuf to work around this problem. +// Note that sync is a protected member of stream buff so we +// have to invoke it through a contrived derived class. +namespace detail { +// note: use "using" to get past msvc bug +using namespace std; +template +class output_streambuf_access : public std::basic_streambuf { + public: + virtual int sync(){ +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) + return this->basic_streambuf::sync(); +#else + return this->basic_streambuf::sync(); +#endif + } +}; +} // detail + +// scoped_ptr requires that g be a complete type at time of +// destruction so define destructor here rather than in the header +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_binary_oprimitive::~basic_binary_oprimitive(){ + // flush buffer + //destructor can't throw + try{ + static_cast &>(m_sb).sync(); + } + catch(...){ + } +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_iarchive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_iarchive.ipp new file mode 100644 index 0000000000..0a246b76c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_iarchive.ipp @@ -0,0 +1,79 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_iarchive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +#include +#include + +#include // for BOOST_DEDUCED_TYPENAME +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::memcpy; +} +#endif + +#include +#include +#include + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implementation of text_text_archive + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_text_iarchive::load_override(class_name_type & t, int){ + std::string cn; + cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); + load_override(cn, 0); + if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) + boost::serialization::throw_exception( + archive_exception(archive_exception::invalid_class_name) + ); + std::memcpy(t, cn.data(), cn.size()); + // borland tweak + t.t[cn.size()] = '\0'; +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_text_iarchive::init(void){ + // read signature in an archive version independent manner + std::string file_signature; + * this->This() >> file_signature; + if(file_signature != BOOST_ARCHIVE_SIGNATURE()) + boost::serialization::throw_exception( + archive_exception(archive_exception::invalid_signature) + ); + + // make sure the version of the reading archive library can + // support the format of the archive being read + library_version_type input_library_version; + * this->This() >> input_library_version; + + #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) + this->set_library_version(input_library_version); + #else + #if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200) + detail:: + #endif + basic_iarchive::set_library_version(input_library_version); + #endif + + // extra little .t is to get around borland quirk + if(BOOST_ARCHIVE_VERSION() < input_library_version) + boost::serialization::throw_exception( + archive_exception(archive_exception::unsupported_version) + ); +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_iprimitive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_iprimitive.ipp new file mode 100644 index 0000000000..581dbfb333 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_iprimitive.ipp @@ -0,0 +1,154 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_iprimitive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // size_t +#include // NULL + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +namespace boost { +namespace archive { + +namespace { + template + bool is_whitespace(CharType c); + + template<> + bool is_whitespace(char t){ + return 0 != std::isspace(t); + } + + #ifndef BOOST_NO_CWCHAR + template<> + bool is_whitespace(wchar_t t){ + return 0 != std::iswspace(t); + } + #endif +} + +// translate base64 text into binary and copy into buffer +// until buffer is full. +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_text_iprimitive::load_binary( + void *address, + std::size_t count +){ + typedef BOOST_DEDUCED_TYPENAME IStream::char_type CharType; + + if(0 == count) + return; + + assert( + static_cast((std::numeric_limits::max)()) + > (count + sizeof(CharType) - 1)/sizeof(CharType) + ); + + if(is.fail()) + boost::serialization::throw_exception( + archive_exception(archive_exception::input_stream_error) + ); + // convert from base64 to binary + typedef BOOST_DEDUCED_TYPENAME + iterators::transform_width< + iterators::binary_from_base64< + iterators::remove_whitespace< + iterators::istream_iterator + > + ,CharType + > + ,8 + ,6 + ,CharType + > + binary; + + binary ti_begin = binary( + BOOST_MAKE_PFTO_WRAPPER( + iterators::istream_iterator(is) + ) + ); + + char * caddr = static_cast(address); + + // take care that we don't increment anymore than necessary + while(--count > 0){ + *caddr++ = static_cast(*ti_begin); + ++ti_begin; + } + *caddr++ = static_cast(*ti_begin); + + iterators::istream_iterator i; + for(;;){ + BOOST_DEDUCED_TYPENAME IStream::int_type r; + r = is.get(); + if(is.eof()) + break; + if(is_whitespace(static_cast(r))) + break; + } +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_text_iprimitive::basic_text_iprimitive( + IStream &is_, + bool no_codecvt +) : +#ifndef BOOST_NO_STD_LOCALE + is(is_), + flags_saver(is_), + precision_saver(is_), + archive_locale(NULL), + locale_saver(* is_.rdbuf()) +{ + if(! no_codecvt){ + archive_locale.reset( + add_facet( + std::locale::classic(), + new codecvt_null + ) + ); + is.imbue(* archive_locale); + } + is >> std::noboolalpha; +} +#else + is(is_), + flags_saver(is_), + precision_saver(is_) +{} +#endif + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_text_iprimitive::~basic_text_iprimitive(){ + is.sync(); +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_oarchive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_oarchive.ipp new file mode 100644 index 0000000000..fb8d18e4ac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_oarchive.ipp @@ -0,0 +1,62 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_oarchive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +#include +#include + +#include // for BOOST_DEDUCED_TYPENAME +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::memcpy; +} +#endif + +#include + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implementation of basic_text_oarchive + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_text_oarchive::newtoken() +{ + switch(delimiter){ + default: + assert(false); + break; + case eol: + this->This()->put('\n'); + delimiter = space; + break; + case space: + this->This()->put(' '); + break; + case none: + delimiter = space; + break; + } +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_text_oarchive::init(){ + // write signature in an archive version independent manner + const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); + * this->This() << file_signature; + // write library version + const library_version_type v(BOOST_ARCHIVE_VERSION()); + * this->This() << v; +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_oprimitive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_oprimitive.ipp new file mode 100644 index 0000000000..cacab617c2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_text_oprimitive.ipp @@ -0,0 +1,114 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_oprimitive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL +#include + +#include +#include +#include + +#include +#include +#include +#include + +namespace boost { +namespace archive { + +// translate to base64 and copy in to buffer. +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_text_oprimitive::save_binary( + const void *address, + std::size_t count +){ + typedef BOOST_DEDUCED_TYPENAME OStream::char_type CharType; + + if(0 == count) + return; + + if(os.fail()) + boost::serialization::throw_exception( + archive_exception(archive_exception::output_stream_error) + ); + + os.put('\n'); + + typedef + boost::archive::iterators::insert_linebreaks< + boost::archive::iterators::base64_from_binary< + boost::archive::iterators::transform_width< + const char *, + 6, + 8 + > + > + ,72 + ,const char // cwpro8 needs this + > + base64_text; + + boost::archive::iterators::ostream_iterator oi(os); + std::copy( + base64_text(BOOST_MAKE_PFTO_WRAPPER(static_cast(address))), + base64_text( + BOOST_MAKE_PFTO_WRAPPER(static_cast(address) + count) + ), + oi + ); + + std::size_t tail = count % 3; + if(tail > 0){ + *oi++ = '='; + if(tail < 2) + *oi = '='; + } +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_text_oprimitive::basic_text_oprimitive( + OStream & os_, + bool no_codecvt +) : +#ifndef BOOST_NO_STD_LOCALE + os(os_), + flags_saver(os_), + precision_saver(os_), + archive_locale(NULL), + locale_saver(* os_.rdbuf()) +{ + if(! no_codecvt){ + archive_locale.reset( + add_facet( + std::locale::classic(), + new codecvt_null + ) + ); + os.imbue(* archive_locale); + } + os << std::noboolalpha; +} +#else + os(os_), + flags_saver(os_), + precision_saver(os_) +{} +#endif + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_text_oprimitive::~basic_text_oprimitive(){ + os << std::endl; +} + +} //namespace boost +} //namespace archive diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_grammar.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_grammar.hpp new file mode 100644 index 0000000000..ca6182e5da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_grammar.hpp @@ -0,0 +1,196 @@ +#ifndef BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP +#define BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_xml_grammar.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// this module is derived from simplexml.cpp - an example shipped as part of +// the spirit parser. This example contains the following notice: +/*============================================================================= + simplexml.cpp + + Spirit V1.3 + URL: http://spirit.sourceforge.net/ + + Copyright (c) 2001, Daniel C. Nuffer + + This software is provided 'as-is', without any express or implied + warranty. In no event will the copyright holder be held liable for + any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product documentation + would be appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +=============================================================================*/ +#include + +#include +#include + +// supress noise +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +//#define BOOST_SPIRIT_DEBUG +#include + +// the following hack is to evade a bogus error generated by using the +// word "arg" when bind.hpp has been included +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +#define arg xarg +#endif + +// spirit stuff +#if (defined __BORLANDC__) && (__BORLANDC__ < 0x593) \ + || (defined _MSC_VER) && (_MSC_VER <= 1300) +#include +#else +#include +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +#undef arg +#endif + +#include +#include +#include + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// XML grammar parsing + +template +class basic_xml_grammar { +public: + // The following is not necessary according to DR45, but at least + // one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise. + struct return_values; + friend struct return_values; + +private: + typedef BOOST_DEDUCED_TYPENAME std::basic_istream IStream; + typedef BOOST_DEDUCED_TYPENAME std::basic_string StringType; + typedef BOOST_DEDUCED_TYPENAME boost::spirit::chset chset_t; + typedef BOOST_DEDUCED_TYPENAME boost::spirit::chlit chlit_t; + typedef BOOST_DEDUCED_TYPENAME boost::spirit::scanner< + BOOST_DEDUCED_TYPENAME std::basic_string::iterator + > scanner_t; + typedef BOOST_DEDUCED_TYPENAME boost::spirit::rule rule_t; + // Start grammar definition + rule_t + Reference, + Eq, + STag, + ETag, + LetterOrUnderscoreOrColon, + AttValue, + CharRef1, + CharRef2, + CharRef, + AmpRef, + LTRef, + GTRef, + AposRef, + QuoteRef, + CharData, + CharDataChars, + content, + AmpName, + LTName, + GTName, + ClassNameChar, + ClassName, + Name, + XMLDecl, + XMLDeclChars, + DocTypeDecl, + DocTypeDeclChars, + ClassIDAttribute, + ObjectIDAttribute, + ClassNameAttribute, + TrackingAttribute, + VersionAttribute, + UnusedAttribute, + Attribute, + SignatureAttribute, + SerializationWrapper, + NameHead, + NameTail, + AttributeList, + S; + + // XML Character classes + chset_t + BaseChar, + Ideographic, + Char, + Letter, + Digit, + CombiningChar, + Extender, + Sch, + NameChar; + + void init_chset(); + + bool my_parse( + IStream & is, + const rule_t &rule_, + const CharType delimiter = L'>' + ) const ; +public: + struct return_values { + StringType object_name; + StringType contents; + //class_id_type class_id; + int_least16_t class_id; + //object_id_type object_id; + uint_least32_t object_id; + //version_type version; + unsigned int version; + tracking_type tracking_level; + StringType class_name; + return_values() : + version(0), + tracking_level(false) + {} + } rv; + bool parse_start_tag(IStream & is) /*const*/; + bool parse_end_tag(IStream & is) const; + bool parse_string(IStream & is, StringType & s) /*const*/; + void init(IStream & is); + void windup(IStream & is); + basic_xml_grammar(); +}; + +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_iarchive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_iarchive.ipp new file mode 100644 index 0000000000..9528c4ad6a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_iarchive.ipp @@ -0,0 +1,114 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_xml_iarchive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // NULL +#include + +#include +#include +#include +#include + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implementation of xml_text_archive + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_iarchive::load_start(const char *name){ + // if there's no name + if(NULL == name) + return; + bool result = this->This()->gimpl->parse_start_tag(this->This()->get_is()); + if(true != result){ + boost::serialization::throw_exception( + archive_exception(archive_exception::input_stream_error) + ); + } + // don't check start tag at highest level + ++depth; + return; +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_iarchive::load_end(const char *name){ + // if there's no name + if(NULL == name) + return; + bool result = this->This()->gimpl->parse_end_tag(this->This()->get_is()); + if(true != result){ + boost::serialization::throw_exception( + archive_exception(archive_exception::input_stream_error) + ); + } + + // don't check start tag at highest level + if(0 == --depth) + return; + + if(0 == (this->get_flags() & no_xml_tag_checking)){ + // double check that the tag matches what is expected - useful for debug + if(0 != name[this->This()->gimpl->rv.object_name.size()] + || ! std::equal( + this->This()->gimpl->rv.object_name.begin(), + this->This()->gimpl->rv.object_name.end(), + name + ) + ){ + boost::serialization::throw_exception( + xml_archive_exception( + xml_archive_exception::xml_archive_tag_mismatch, + name + ) + ); + } + } +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_iarchive::load_override(object_id_type & t, int){ + t = object_id_type(this->This()->gimpl->rv.object_id); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_iarchive::load_override(version_type & t, int){ + t = version_type(this->This()->gimpl->rv.version); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_iarchive::load_override(class_id_type & t, int){ + t = class_id_type(this->This()->gimpl->rv.class_id); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_iarchive::load_override(tracking_type & t, int){ + t = this->This()->gimpl->rv.tracking_level; +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_xml_iarchive::basic_xml_iarchive(unsigned int flags) : + detail::common_iarchive(flags), + depth(0) +{} +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_xml_iarchive::~basic_xml_iarchive(){} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_oarchive.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_oarchive.ipp new file mode 100644 index 0000000000..e2cc8d4d5e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/basic_xml_oarchive.ipp @@ -0,0 +1,275 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_xml_oarchive.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // NULL +#include +#if defined(BOOST_NO_STDC_NAMESPACE) && ! defined(__LIBCOMO__) +namespace std{ + using ::strlen; +} // namespace std +#endif + +#include +#include +#include +#include + +namespace boost { +namespace archive { + +namespace detail { +template +struct XML_name { + void operator()(CharType t) const{ + const unsigned char lookup_table[] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0, // -. + 1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, // 0-9 + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // A- + 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, // -Z _ + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // a- + 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, // -z + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }; + if((unsigned)t > 127) + return; + if(0 == lookup_table[(unsigned)t]) + boost::serialization::throw_exception( + xml_archive_exception( + xml_archive_exception::xml_archive_tag_name_error + ) + ); + } +}; + +} // namespace detail + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implemenations of functions common to both types of xml output + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::write_attribute( + const char *attribute_name, + int t, + const char *conjunction +){ + this->This()->put(' '); + this->This()->put(attribute_name); + this->This()->put(conjunction); + this->This()->save(t); + this->This()->put('"'); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::write_attribute( + const char *attribute_name, + const char *key +){ + this->This()->put(' '); + this->This()->put(attribute_name); + this->This()->put("=\""); + this->This()->save(key); + this->This()->put('"'); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::indent(){ + int i; + for(i = depth; i-- > 0;) + this->This()->put('\t'); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_start(const char *name) +{ + if(NULL == name) + return; + + // be sure name has no invalid characters + std::for_each(name, name + std::strlen(name), detail::XML_name()); + + end_preamble(); + if(depth > 0){ + this->This()->put('\n'); + indent(); + } + ++depth; + this->This()->put('<'); + this->This()->save(name); + pending_preamble = true; + indent_next = false; +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_end(const char *name) +{ + if(NULL == name) + return; + + // be sure name has no invalid characters + std::for_each(name, name + std::strlen(name), detail::XML_name()); + + end_preamble(); + --depth; + if(indent_next){ + this->This()->put('\n'); + indent(); + } + indent_next = true; + this->This()->put("This()->save(name); + this->This()->put('>'); + if(0 == depth) + this->This()->put('\n'); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::end_preamble(){ + if(pending_preamble){ + this->This()->put('>'); + pending_preamble = false; + } +} +#if 0 +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override(const object_id_type & t, int) +{ + int i = t.t; // extra .t is for borland + write_attribute(BOOST_ARCHIVE_XML_OBJECT_ID(), i, "=\"_"); +} +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override( + const object_reference_type & t, + int +){ + int i = t.t; // extra .t is for borland + write_attribute(BOOST_ARCHIVE_XML_OBJECT_REFERENCE(), i, "=\"_"); +} +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override(const version_type & t, int) +{ + int i = t.t; // extra .t is for borland + write_attribute(BOOST_ARCHIVE_XML_VERSION(), i); +} +#endif + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override(const object_id_type & t, int) +{ + // borland doesn't do conversion of STRONG_TYPEDEFs very well + const unsigned int i = t; + write_attribute(BOOST_ARCHIVE_XML_OBJECT_ID(), i, "=\"_"); +} +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override( + const object_reference_type & t, + int +){ + const unsigned int i = t; + write_attribute(BOOST_ARCHIVE_XML_OBJECT_REFERENCE(), i, "=\"_"); +} +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override(const version_type & t, int) +{ + const unsigned int i = t; + write_attribute(BOOST_ARCHIVE_XML_VERSION(), i); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override(const class_id_type & t, int) +{ + write_attribute(BOOST_ARCHIVE_XML_CLASS_ID(), t); +} +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override( + const class_id_reference_type & t, + int +){ + write_attribute(BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(), t); +} +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override( + const class_id_optional_type & t, + int +){ + write_attribute(BOOST_ARCHIVE_XML_CLASS_ID(), t); +} +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override(const class_name_type & t, int) +{ + const char * key = t; + if(NULL == key) + return; + write_attribute(BOOST_ARCHIVE_XML_CLASS_NAME(), key); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::save_override(const tracking_type & t, int) +{ + write_attribute(BOOST_ARCHIVE_XML_TRACKING(), t.t); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_xml_oarchive::init(){ + // xml header + this->This()->put("\n"); + this->This()->put("\n"); + // xml document wrapper - outer root + this->This()->put("This()->put(">\n"); +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_xml_oarchive::basic_xml_oarchive(unsigned int flags) : + detail::common_oarchive(flags), + depth(0), + indent_next(false), + pending_preamble(false) +{ +} + +template +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +basic_xml_oarchive::~basic_xml_oarchive(){ + if(0 == (this->get_flags() & no_header)){ + BOOST_TRY{ + this->This()->put("\n"); + } + BOOST_CATCH(...){} + BOOST_CATCH_END + } +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_iarchive_impl.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_iarchive_impl.ipp new file mode 100644 index 0000000000..f14c0d8e2a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_iarchive_impl.ipp @@ -0,0 +1,128 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_iarchive_impl.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +////////////////////////////////////////////////////////////////////// +// implementation of basic_text_iprimitive overrides for the combination +// of template parameters used to implement a text_iprimitive + +#include // size_t, NULL +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include // RogueWave + +#include + +namespace boost { +namespace archive { + +template +BOOST_ARCHIVE_DECL(void) +text_iarchive_impl::load(char *s) +{ + std::size_t size; + * this->This() >> size; + // skip separating space + is.get(); + // Works on all tested platforms + is.read(s, size); + s[size] = '\0'; +} + +template +BOOST_ARCHIVE_DECL(void) +text_iarchive_impl::load(std::string &s) +{ + std::size_t size; + * this->This() >> size; + // skip separating space + is.get(); + // borland de-allocator fixup + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != s.data()) + #endif + s.resize(size); + if(0 < size) + is.read(&(*s.begin()), size); +} + +#ifndef BOOST_NO_CWCHAR +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template +BOOST_ARCHIVE_DECL(void) +text_iarchive_impl::load(wchar_t *ws) +{ + std::size_t size; + * this->This() >> size; + // skip separating space + is.get(); + is.read((char *)ws, size * sizeof(wchar_t)/sizeof(char)); + ws[size] = L'\0'; +} +#endif // BOOST_NO_INTRINSIC_WCHAR_T + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_ARCHIVE_DECL(void) +text_iarchive_impl::load(std::wstring &ws) +{ + std::size_t size; + * this->This() >> size; + // borland de-allocator fixup + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != ws.data()) + #endif + ws.resize(size); + // skip separating space + is.get(); + is.read((char *)ws.data(), size * sizeof(wchar_t)/sizeof(char)); +} + +#endif // BOOST_NO_STD_WSTRING +#endif // BOOST_NO_CWCHAR + +template +BOOST_ARCHIVE_DECL(void) +text_iarchive_impl::load_override(class_name_type & t, int){ + basic_text_iarchive::load_override(t, 0); +} + +template +BOOST_ARCHIVE_DECL(void) +text_iarchive_impl::init(){ + basic_text_iarchive::init(); +} + +template +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +text_iarchive_impl::text_iarchive_impl( + std::istream & is, + unsigned int flags +) : + basic_text_iprimitive( + is, + 0 != (flags & no_codecvt) + ), + basic_text_iarchive(flags) +{ + if(0 == (flags & no_header)) + #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) + this->init(); + #else + this->basic_text_iarchive::init(); + #endif +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_oarchive_impl.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_oarchive_impl.ipp new file mode 100644 index 0000000000..2df0b46019 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_oarchive_impl.ipp @@ -0,0 +1,124 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_oarchive_impl.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include // size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#ifndef BOOST_NO_CWCHAR +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ using ::wcslen; } +#endif +#endif + +#include +#include + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// implementation of basic_text_oprimitive overrides for the combination +// of template parameters used to create a text_oprimitive + +template +BOOST_ARCHIVE_DECL(void) +text_oarchive_impl::save(const char * s) +{ + const std::size_t len = std::ostream::traits_type::length(s); + *this->This() << len; + this->This()->newtoken(); + os << s; +} + +template +BOOST_ARCHIVE_DECL(void) +text_oarchive_impl::save(const std::string &s) +{ + const std::size_t size = s.size(); + *this->This() << size; + this->This()->newtoken(); + os << s; +} + +#ifndef BOOST_NO_CWCHAR +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template +BOOST_ARCHIVE_DECL(void) +text_oarchive_impl::save(const wchar_t * ws) +{ + const std::size_t l = std::wcslen(ws); + * this->This() << l; + this->This()->newtoken(); + os.write((const char *)ws, l * sizeof(wchar_t)/sizeof(char)); +} +#endif + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_ARCHIVE_DECL(void) +text_oarchive_impl::save(const std::wstring &ws) +{ + const std::size_t l = ws.size(); + * this->This() << l; + this->This()->newtoken(); + os.write((const char *)(ws.data()), l * sizeof(wchar_t)/sizeof(char)); +} +#endif +#endif // BOOST_NO_CWCHAR + +template +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +text_oarchive_impl::text_oarchive_impl( + std::ostream & os, + unsigned int flags +) : + basic_text_oprimitive( + os, + 0 != (flags & no_codecvt) + ), + basic_text_oarchive(flags) +{ + if(0 == (flags & no_header)) + #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) + this->init(); + #else + this->basic_text_oarchive::init(); + #endif +} + +template +BOOST_ARCHIVE_DECL(void) +text_oarchive_impl::save_binary(const void *address, std::size_t count){ + put('\n'); + this->end_preamble(); + #if ! defined(__MWERKS__) + this->basic_text_oprimitive::save_binary( + #else + this->basic_text_oprimitive::save_binary( + #endif + address, + count + ); + this->delimiter = this->eol; +} + +} // namespace archive +} // namespace boost + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_wiarchive_impl.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_wiarchive_impl.ipp new file mode 100644 index 0000000000..6938c22659 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_wiarchive_impl.ipp @@ -0,0 +1,118 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_text_wiarchive_impl.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // size_t, NULL + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include // fixup for RogueWave + +#ifndef BOOST_NO_STD_WSTREAMBUF +#include + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// implementation of wiprimtives functions +// +template +BOOST_WARCHIVE_DECL(void) +text_wiarchive_impl::load(char *s) +{ + std::size_t size; + * this->This() >> size; + // skip separating space + is.get(); + while(size-- > 0){ + *s++ = is.narrow(is.get(), '\0'); + } + *s = '\0'; +} + +template +BOOST_WARCHIVE_DECL(void) +text_wiarchive_impl::load(std::string &s) +{ + std::size_t size; + * this->This() >> size; + // skip separating space + is.get(); + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != s.data()) + #endif + s.resize(0); + s.reserve(size); + while(size-- > 0){ + int x = is.narrow(is.get(), '\0'); + s += x; + } +} + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template +BOOST_WARCHIVE_DECL(void) +text_wiarchive_impl::load(wchar_t *s) +{ + std::size_t size; + * this->This() >> size; + // skip separating space + is.get(); + // Works on all tested platforms + is.read(s, size); + s[size] = L'\0'; +} +#endif + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_WARCHIVE_DECL(void) +text_wiarchive_impl::load(std::wstring &ws) +{ + std::size_t size; + * this->This() >> size; + // skip separating space + is.get(); + // borland complains about resize + // borland de-allocator fixup + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != ws.data()) + #endif + ws.resize(size); + // note breaking a rule here - is this a problem on some platform + is.read(const_cast(ws.data()), size); +} +#endif + +template +BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +text_wiarchive_impl::text_wiarchive_impl( + std::wistream & is, + unsigned int flags +) : + basic_text_iprimitive( + is, + 0 != (flags & no_codecvt) + ), + basic_text_iarchive(flags) +{ + if(0 == (flags & no_header)) + basic_text_iarchive::init(); +} + +} // archive +} // boost + +#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_woarchive_impl.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_woarchive_impl.ipp new file mode 100644 index 0000000000..6683f528c0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/text_woarchive_impl.ipp @@ -0,0 +1,85 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_woarchive_impl.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifndef BOOST_NO_STD_WSTREAMBUF + +#include +#include // size_t +#if defined(BOOST_NO_STDC_NAMESPACE) && ! defined(__LIBCOMO__) +namespace std{ + using ::strlen; + using ::size_t; +} // namespace std +#endif + +#include + +#include + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// implementation of woarchive functions +// +template +BOOST_WARCHIVE_DECL(void) +text_woarchive_impl::save(const char *s) +{ + // note: superfluous local variable fixes borland warning + const std::size_t size = std::strlen(s); + * this->This() << size; + this->This()->newtoken(); + while(*s != '\0') + os.put(os.widen(*s++)); +} + +template +BOOST_WARCHIVE_DECL(void) +text_woarchive_impl::save(const std::string &s) +{ + const std::size_t size = s.size(); + * this->This() << size; + this->This()->newtoken(); + const char * cptr = s.data(); + for(std::size_t i = size; i-- > 0;) + os.put(os.widen(*cptr++)); +} + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template +BOOST_WARCHIVE_DECL(void) +text_woarchive_impl::save(const wchar_t *ws) +{ + const std::size_t size = std::wostream::traits_type::length(ws); + * this->This() << size; + this->This()->newtoken(); + os.write(ws, size); +} +#endif + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_WARCHIVE_DECL(void) +text_woarchive_impl::save(const std::wstring &ws) +{ + const std::size_t size = ws.length(); + * this->This() << size; + this->This()->newtoken(); + os.write(ws.data(), size); +} +#endif + +} // namespace archive +} // namespace boost + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_iarchive_impl.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_iarchive_impl.ipp new file mode 100644 index 0000000000..c7cbc7fcdc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_iarchive_impl.ipp @@ -0,0 +1,204 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_iarchive_impl.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // memcpy +#include // NULL +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::memcpy; +} // namespace std +#endif + +#ifndef BOOST_NO_CWCHAR +#include // mbtowc +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::mbtowc; + } // namespace std +#endif +#endif // BOOST_NO_CWCHAR + +#include // RogueWave and Dinkumware +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#include + +#include +#include +#include +#include + +#include "basic_xml_grammar.hpp" + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implemenations of functions specific to char archives + +// wide char stuff used by char archives + +#ifndef BOOST_NO_CWCHAR +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_ARCHIVE_DECL(void) +xml_iarchive_impl::load(std::wstring &ws){ + std::string s; + bool result = gimpl->parse_string(is, s); + if(! result) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != ws.data()) + #endif + ws.resize(0); + const char * start = s.data(); + const char * end = start + s.size(); + while(start < end){ + wchar_t wc; + int resultx = std::mbtowc(&wc, start, end - start); + if(0 < resultx){ + start += resultx; + ws += wc; + continue; + } + boost::serialization::throw_exception( + iterators::dataflow_exception( + iterators::dataflow_exception::invalid_conversion + ) + ); + } +} +#endif // BOOST_NO_STD_WSTRING + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template +BOOST_ARCHIVE_DECL(void) +xml_iarchive_impl::load(wchar_t * ws){ + std::string s; + bool result = gimpl->parse_string(is, s); + if(! result) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + + const char * start = s.data(); + const char * end = start + s.size(); + while(start < end){ + wchar_t wc; + int result = std::mbtowc(&wc, start, end - start); + if(0 < result){ + start += result; + *ws++ = wc; + continue; + } + boost::serialization::throw_exception( + iterators::dataflow_exception( + iterators::dataflow_exception::invalid_conversion + ) + ); + } + *ws = L'\0'; +} +#endif // BOOST_NO_INTRINSIC_WCHAR_T + +#endif // BOOST_NO_CWCHAR + +template +BOOST_ARCHIVE_DECL(void) +xml_iarchive_impl::load(std::string &s){ + bool result = gimpl->parse_string(is, s); + if(! result) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); +} + +template +BOOST_ARCHIVE_DECL(void) +xml_iarchive_impl::load(char * s){ + std::string tstring; + bool result = gimpl->parse_string(is, tstring); + if(! result) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + std::memcpy(s, tstring.data(), tstring.size()); + s[tstring.size()] = 0; +} + +template +BOOST_ARCHIVE_DECL(void) +xml_iarchive_impl::load_override(class_name_type & t, int){ + const std::string & s = gimpl->rv.class_name; + if(s.size() > BOOST_SERIALIZATION_MAX_KEY_SIZE - 1) + boost::serialization::throw_exception( + archive_exception(archive_exception::invalid_class_name) + ); + char * tptr = t; + std::memcpy(tptr, s.data(), s.size()); + tptr[s.size()] = '\0'; +} + +template +BOOST_ARCHIVE_DECL(void) +xml_iarchive_impl::init(){ + gimpl->init(is); + this->set_library_version( + library_version_type(gimpl->rv.version) + ); +} + +template +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +xml_iarchive_impl::xml_iarchive_impl( + std::istream &is_, + unsigned int flags +) : + basic_text_iprimitive( + is_, + 0 != (flags & no_codecvt) + ), + basic_xml_iarchive(flags), + gimpl(new xml_grammar()) +{ + if(0 == (flags & no_header)){ + BOOST_TRY{ + init(); + } + BOOST_CATCH(...){ + delete gimpl; + #ifndef BOOST_NO_EXCEPTIONS + throw; // re-throw + #endif + } + BOOST_CATCH_END + } +} + +template +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +xml_iarchive_impl::~xml_iarchive_impl(){ + if(0 == (this->get_flags() & no_header)){ + BOOST_TRY{ + gimpl->windup(is); + } + BOOST_CATCH(...){} + BOOST_CATCH_END + } + delete gimpl; +} +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_oarchive_impl.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_oarchive_impl.ipp new file mode 100644 index 0000000000..8ab954f4a3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_oarchive_impl.ipp @@ -0,0 +1,117 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_oarchive_impl.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include + +#include // strlen +#include // msvc 6.0 needs this to suppress warnings +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::strlen; +} // namespace std +#endif + +#include +#include + +#ifndef BOOST_NO_CWCHAR +#include +#include +#endif + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implemenations of functions specific to char archives + +// wide char stuff used by char archives +#ifndef BOOST_NO_CWCHAR +// copy chars to output escaping to xml and translating wide chars to mb chars +template +void save_iterator(std::ostream &os, InputIterator begin, InputIterator end){ + typedef boost::archive::iterators::mb_from_wchar< + boost::archive::iterators::xml_escape + > translator; + std::copy( + translator(BOOST_MAKE_PFTO_WRAPPER(begin)), + translator(BOOST_MAKE_PFTO_WRAPPER(end)), + boost::archive::iterators::ostream_iterator(os) + ); +} + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_ARCHIVE_DECL(void) +xml_oarchive_impl::save(const std::wstring & ws){ +// at least one library doesn't typedef value_type for strings +// so rather than using string directly make a pointer iterator out of it +// save_iterator(os, ws.data(), ws.data() + std::wcslen(ws.data())); + save_iterator(os, ws.data(), ws.data() + ws.size()); +} +#endif + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template +BOOST_ARCHIVE_DECL(void) +xml_oarchive_impl::save(const wchar_t * ws){ + save_iterator(os, ws, ws + std::wcslen(ws)); +} +#endif + +#endif // BOOST_NO_CWCHAR + +template +BOOST_ARCHIVE_DECL(void) +xml_oarchive_impl::save(const std::string & s){ +// at least one library doesn't typedef value_type for strings +// so rather than using string directly make a pointer iterator out of it + typedef boost::archive::iterators::xml_escape< + const char * + > xml_escape_translator; + std::copy( + xml_escape_translator(BOOST_MAKE_PFTO_WRAPPER(s.data())), + xml_escape_translator(BOOST_MAKE_PFTO_WRAPPER(s.data()+ s.size())), + boost::archive::iterators::ostream_iterator(os) + ); +} + +template +BOOST_ARCHIVE_DECL(void) +xml_oarchive_impl::save(const char * s){ + typedef boost::archive::iterators::xml_escape< + const char * + > xml_escape_translator; + std::copy( + xml_escape_translator(BOOST_MAKE_PFTO_WRAPPER(s)), + xml_escape_translator(BOOST_MAKE_PFTO_WRAPPER(s + std::strlen(s))), + boost::archive::iterators::ostream_iterator(os) + ); +} + +template +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +xml_oarchive_impl::xml_oarchive_impl( + std::ostream & os_, + unsigned int flags +) : + basic_text_oprimitive( + os_, + 0 != (flags & no_codecvt) + ), + basic_xml_oarchive(flags) +{ + if(0 == (flags & no_header)) + this->init(); +} + +} // namespace archive +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_wiarchive_impl.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_wiarchive_impl.ipp new file mode 100644 index 0000000000..58498dbe12 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_wiarchive_impl.ipp @@ -0,0 +1,206 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_wiprimitive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // for BOOST_DEDUCED_TYPENAME + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::memcpy; +} //std +#endif + +#include // msvc 6.0 needs this to suppress warnings +#ifndef BOOST_NO_STD_WSTREAMBUF + +#include +#include + +#include // Dinkumware and RogueWave +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include + +#include "basic_xml_grammar.hpp" + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implemenations of functions specific to wide char archives + +namespace { // anonymous + +void copy_to_ptr(char * s, const std::wstring & ws){ + std::copy( + iterators::mb_from_wchar( + BOOST_MAKE_PFTO_WRAPPER(ws.begin()) + ), + iterators::mb_from_wchar( + BOOST_MAKE_PFTO_WRAPPER(ws.end()) + ), + s + ); + s[ws.size()] = 0; +} + +} // anonymous + +template +BOOST_WARCHIVE_DECL(void) +xml_wiarchive_impl::load(std::string & s){ + std::wstring ws; + bool result = gimpl->parse_string(is, ws); + if(! result) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) + if(NULL != s.data()) + #endif + s.resize(0); + s.reserve(ws.size()); + std::copy( + iterators::mb_from_wchar( + BOOST_MAKE_PFTO_WRAPPER(ws.begin()) + ), + iterators::mb_from_wchar( + BOOST_MAKE_PFTO_WRAPPER(ws.end()) + ), + std::back_inserter(s) + ); +} + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_WARCHIVE_DECL(void) +xml_wiarchive_impl::load(std::wstring & ws){ + bool result = gimpl->parse_string(is, ws); + if(! result) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); +} +#endif + +template +BOOST_WARCHIVE_DECL(void) +xml_wiarchive_impl::load(char * s){ + std::wstring ws; + bool result = gimpl->parse_string(is, ws); + if(! result) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + copy_to_ptr(s, ws); +} + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template +BOOST_WARCHIVE_DECL(void) +xml_wiarchive_impl::load(wchar_t * ws){ + std::wstring twstring; + bool result = gimpl->parse_string(is, twstring); + if(! result) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + std::memcpy(ws, twstring.c_str(), twstring.size()); + ws[twstring.size()] = L'\0'; +} +#endif + +template +BOOST_WARCHIVE_DECL(void) +xml_wiarchive_impl::load_override(class_name_type & t, int){ + const std::wstring & ws = gimpl->rv.class_name; + if(ws.size() > BOOST_SERIALIZATION_MAX_KEY_SIZE - 1) + boost::serialization::throw_exception( + archive_exception(archive_exception::invalid_class_name) + ); + copy_to_ptr(t, ws); +} + +template +BOOST_WARCHIVE_DECL(void) +xml_wiarchive_impl::init(){ + gimpl->init(is); + this->set_library_version( + library_version_type(gimpl->rv.version) + ); +} + +template +BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +xml_wiarchive_impl::xml_wiarchive_impl( + std::wistream &is_, + unsigned int flags +) : + basic_text_iprimitive( + is_, + true // don't change the codecvt - use the one below + ), + basic_xml_iarchive(flags), + gimpl(new xml_wgrammar()) +{ + if(0 == (flags & no_codecvt)){ + archive_locale.reset( + add_facet( + std::locale::classic(), + new boost::archive::detail::utf8_codecvt_facet + ) + ); + is.imbue(* archive_locale); + } + if(0 == (flags & no_header)){ + BOOST_TRY{ + this->init(); + } + BOOST_CATCH(...){ + delete gimpl; + #ifndef BOOST_NO_EXCEPTIONS + throw; // re-throw + #endif + } + BOOST_CATCH_END + } +} + +template +BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +xml_wiarchive_impl::~xml_wiarchive_impl(){ + if(0 == (this->get_flags() & no_header)){ + BOOST_TRY{ + gimpl->windup(is); + } + BOOST_CATCH(...){} + BOOST_CATCH_END + } + delete gimpl; +} + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_woarchive_impl.ipp b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_woarchive_impl.ipp new file mode 100644 index 0000000000..3bf42bdace --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/impl/xml_woarchive_impl.ipp @@ -0,0 +1,160 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_woarchive_impl.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#ifndef BOOST_NO_STD_WSTREAMBUF + +#include +#include +#include +#include + +#include // msvc 6.0 needs this to suppress warnings + // for BOOST_DEDUCED_TYPENAME +#include // strlen +#include // mbtowc +#include // wcslen + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::strlen; + #if ! defined(BOOST_NO_INTRINSIC_WCHAR_T) + using ::mbtowc; + using ::wcslen; + #endif +} // namespace std +#endif + +#include +#include + +#include +#include +#include +#include + +#include +#include + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implemenations of functions specific to wide char archives + +// copy chars to output escaping to xml and widening characters as we go +template +void save_iterator(std::wostream &os, InputIterator begin, InputIterator end){ + typedef iterators::wchar_from_mb< + iterators::xml_escape + > xmbtows; + std::copy( + xmbtows(BOOST_MAKE_PFTO_WRAPPER(begin)), + xmbtows(BOOST_MAKE_PFTO_WRAPPER(end)), + boost::archive::iterators::ostream_iterator(os) + ); +} + +template +BOOST_WARCHIVE_DECL(void) +xml_woarchive_impl::save(const std::string & s){ + // note: we don't use s.begin() and s.end() because dinkumware + // doesn't have string::value_type defined. So use a wrapper + // around these values to implement the definitions. + const char * begin = s.data(); + const char * end = begin + s.size(); + save_iterator(os, begin, end); +} + +#ifndef BOOST_NO_STD_WSTRING +template +BOOST_WARCHIVE_DECL(void) +xml_woarchive_impl::save(const std::wstring & ws){ +#if 0 + typedef iterators::xml_escape xmbtows; + std::copy( + xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws.begin())), + xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws.end())), + boost::archive::iterators::ostream_iterator(os) + ); +#endif + typedef iterators::xml_escape xmbtows; + std::copy( + xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws.data())), + xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws.data() + ws.size())), + boost::archive::iterators::ostream_iterator(os) + ); +} +#endif //BOOST_NO_STD_WSTRING + +template +BOOST_WARCHIVE_DECL(void) +xml_woarchive_impl::save(const char * s){ + save_iterator(os, s, s + std::strlen(s)); +} + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template +BOOST_WARCHIVE_DECL(void) +xml_woarchive_impl::save(const wchar_t * ws){ + os << ws; + typedef iterators::xml_escape xmbtows; + std::copy( + xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws)), + xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws + std::wcslen(ws))), + boost::archive::iterators::ostream_iterator(os) + ); +} +#endif + +template +BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +xml_woarchive_impl::xml_woarchive_impl( + std::wostream & os_, + unsigned int flags +) : + basic_text_oprimitive( + os_, + true // don't change the codecvt - use the one below + ), + basic_xml_oarchive(flags) +{ + // Standard behavior is that imbue can be called + // a) before output is invoked or + // b) after flush has been called. This prevents one-to-many + // transforms (such as one to many transforms from getting + // mixed up. Unfortunately, STLPort doesn't respect b) above + // so the restoration of the original archive locale done by + // the locale_saver doesn't get processed, + // before the current one is destroyed. + // so the codecvt doesn't get replaced with the orginal + // so closing the stream invokes codecvt::do_unshift + // so it crashes because the corresponding locale that contained + // the codecvt isn't around any more. + // we can hack around this by using a static codecvt that never + // gets destroyed. + if(0 == (flags & no_codecvt)){ + boost::archive::detail::utf8_codecvt_facet *pfacet; + #if defined(__SGI_STL_PORT) + static boost::archive::detail::utf8_codecvt_facet + facet(static_cast(1)); + pfacet = & facet; + #else + pfacet = new boost::archive::detail::utf8_codecvt_facet; + #endif + archive_locale.reset(add_facet(std::locale::classic(), pfacet)); + os.imbue(* archive_locale); + } + if(0 == (flags & no_header)) + this->init(); +} + +} // namespace archive +} // namespace boost + +#endif //BOOST_NO_STD_WSTREAMBUF diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/base64_exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/base64_exception.hpp new file mode 100644 index 0000000000..eb2d2e1ba0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/base64_exception.hpp @@ -0,0 +1,68 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_BASE64_EXCEPTION_HPP +#define BOOST_ARCHIVE_ITERATORS_BASE64_EXCEPTION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// base64_exception.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifndef BOOST_NO_EXCEPTIONS +#include + +#include + +namespace boost { +namespace archive { +namespace iterators { + +////////////////////////////////////////////////////////////////////// +// exceptions thrown by base64s +// +class base64_exception : public std::exception +{ +public: + typedef enum { + invalid_code, // attempt to encode a value > 6 bits + invalid_character, // decode a value not in base64 char set + other_exception + } exception_code; + exception_code code; + + base64_exception(exception_code c = other_exception) : code(c) + {} + + virtual const char *what( ) const throw( ) + { + const char *msg = "unknown exception code"; + switch(code){ + case invalid_code: + msg = "attempt to encode a value > 6 bits"; + break; + case invalid_character: + msg = "attempt to decode a value not in base64 char set"; + break; + default: + assert(false); + break; + } + return msg; + } +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif //BOOST_NO_EXCEPTIONS +#endif //BOOST_ARCHIVE_ITERATORS_ARCHIVE_EXCEPTION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/base64_from_binary.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/base64_from_binary.hpp new file mode 100644 index 0000000000..4e6023a8f0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/base64_from_binary.hpp @@ -0,0 +1,112 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_BASE64_FROM_BINARY_HPP +#define BOOST_ARCHIVE_ITERATORS_BASE64_FROM_BINARY_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// base64_from_binary.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // size_t +#include // for BOOST_DEDUCED_TYPENAME +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// convert binary integers to base64 characters + +namespace detail { + +template +struct from_6_bit { + typedef CharType result_type; + CharType operator()(CharType t) const{ + const char * lookup_table = + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789" + "+/"; + assert(t < 64); + return lookup_table[static_cast(t)]; + } +}; + +} // namespace detail + +// note: what we would like to do is +// template +// typedef transform_iterator< +// from_6_bit, +// transform_width +// > base64_from_binary; +// but C++ won't accept this. Rather than using a "type generator" and +// using a different syntax, make a derivation which should be equivalent. +// +// Another issue addressed here is that the transform_iterator doesn't have +// a templated constructor. This makes it incompatible with the dataflow +// ideal. This is also addressed here. + +//template +template< + class Base, + class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value::type +> +class base64_from_binary : + public transform_iterator< + detail::from_6_bit, + Base + > +{ + friend class boost::iterator_core_access; + typedef transform_iterator< + BOOST_DEDUCED_TYPENAME detail::from_6_bit, + Base + > super_t; + +public: + // make composible buy using templated constructor + template + base64_from_binary(BOOST_PFTO_WRAPPER(T) start) : + super_t( + Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start))), + detail::from_6_bit() + ) + {} + // intel 7.1 doesn't like default copy constructor + base64_from_binary(const base64_from_binary & rhs) : + super_t( + Base(rhs.base_reference()), + detail::from_6_bit() + ) + {} +// base64_from_binary(){}; +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_BASE64_FROM_BINARY_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/binary_from_base64.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/binary_from_base64.hpp new file mode 100644 index 0000000000..d14439f1cd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/binary_from_base64.hpp @@ -0,0 +1,120 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE64_HPP +#define BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE64_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_from_base64.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // for BOOST_DEDUCED_TYPENAME +#include +#include +#include + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// convert base64 characters to binary data + +namespace detail { + +template +struct to_6_bit { + typedef CharType result_type; + CharType operator()(CharType t) const{ + const char lookup_table[] = { + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, + 52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1, + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, + 15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1, + -1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, + 41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1 + }; + // metrowerks trips this assertion - how come? + #if ! defined(__MWERKS__) + BOOST_STATIC_ASSERT(128 == sizeof(lookup_table)); + #endif + signed char value = -1; + if((unsigned)t <= 127) + value = lookup_table[(unsigned)t]; + if(-1 == value) + boost::serialization::throw_exception( + dataflow_exception(dataflow_exception::invalid_base64_character) + ); + return value; + } +}; + +} // namespace detail + +// note: what we would like to do is +// template +// typedef transform_iterator< +// from_6_bit, +// transform_width +// > base64_from_binary; +// but C++ won't accept this. Rather than using a "type generator" and +// using a different syntax, make a derivation which should be equivalent. +// +// Another issue addressed here is that the transform_iterator doesn't have +// a templated constructor. This makes it incompatible with the dataflow +// ideal. This is also addressed here. + +template< + class Base, + class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value::type +> +class binary_from_base64 : public + transform_iterator< + detail::to_6_bit, + Base + > +{ + friend class boost::iterator_core_access; + typedef transform_iterator< + detail::to_6_bit, + Base + > super_t; +public: + // make composible buy using templated constructor + template + binary_from_base64(BOOST_PFTO_WRAPPER(T) start) : + super_t( + Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start))), + detail::to_6_bit() + ) + {} + // intel 7.1 doesn't like default copy constructor + binary_from_base64(const binary_from_base64 & rhs) : + super_t( + Base(rhs.base_reference()), + detail::to_6_bit() + ) + {} +// binary_from_base64(){}; +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE64_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/dataflow.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/dataflow.hpp new file mode 100644 index 0000000000..7958482401 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/dataflow.hpp @@ -0,0 +1,105 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_DATAFLOW_HPP +#define BOOST_ARCHIVE_ITERATORS_DATAFLOW_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// dataflow.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // for BOOST_DEDUCED_TYPENAME + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +// poor man's tri-state +struct tri_state { + enum state_enum { + is_false = false, + is_true = true, + is_indeterminant + } m_state; + // convert to bool + operator bool (){ + assert(is_indeterminant != m_state); + return is_true == m_state ? true : false; + } + // assign from bool + tri_state & operator=(bool rhs) { + m_state = rhs ? is_true : is_false; + return *this; + } + tri_state(bool rhs) : + m_state(rhs ? is_true : is_false) + {} + tri_state(state_enum state) : + m_state(state) + {} + bool operator==(const tri_state & rhs) const { + return m_state == rhs.m_state; + } + bool operator!=(const tri_state & rhs) const { + return m_state != rhs.m_state; + } +}; + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// implement functions common to dataflow iterators +template +class dataflow { + bool m_eoi; +protected: + // test for iterator equality + tri_state equal(const Derived & rhs) const { + if(m_eoi && rhs.m_eoi) + return true; + if(m_eoi || rhs.m_eoi) + return false; + return tri_state(tri_state::is_indeterminant); + } + void eoi(bool tf){ + m_eoi = tf; + } + bool eoi() const { + return m_eoi; + } +public: + dataflow(bool tf) : + m_eoi(tf) + {} + dataflow() : // used for iterator end + m_eoi(true) + {} +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_DATAFLOW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/dataflow_exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/dataflow_exception.hpp new file mode 100644 index 0000000000..765661e470 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/dataflow_exception.hpp @@ -0,0 +1,80 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP +#define BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// dataflow_exception.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifndef BOOST_NO_EXCEPTIONS +#include +#endif //BOOST_NO_EXCEPTIONS + +#include + +namespace boost { +namespace archive { +namespace iterators { + +////////////////////////////////////////////////////////////////////// +// exceptions thrown by dataflows +// +class dataflow_exception : public std::exception +{ +public: + typedef enum { + invalid_6_bitcode, + invalid_base64_character, + invalid_xml_escape_sequence, + comparison_not_permitted, + invalid_conversion, + other_exception + } exception_code; + exception_code code; + + dataflow_exception(exception_code c = other_exception) : code(c) + {} + + virtual const char *what( ) const throw( ) + { + const char *msg = "unknown exception code"; + switch(code){ + case invalid_6_bitcode: + msg = "attempt to encode a value > 6 bits"; + break; + case invalid_base64_character: + msg = "attempt to decode a value not in base64 char set"; + break; + case invalid_xml_escape_sequence: + msg = "invalid xml escape_sequence"; + break; + case comparison_not_permitted: + msg = "cannot invoke iterator comparison now"; + break; + case invalid_conversion: + msg = "invalid multbyte/wide char conversion"; + break; + default: + assert(false); + break; + } + return msg; + } +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif //BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/escape.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/escape.hpp new file mode 100644 index 0000000000..b11d1a6722 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/escape.hpp @@ -0,0 +1,115 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP +#define BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// escape.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // NULL + +#include // for BOOST_DEDUCED_TYPENAME +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// insert escapes into text + +template +class escape : + public boost::iterator_adaptor< + Derived, + Base, + BOOST_DEDUCED_TYPENAME boost::iterator_value::type, + single_pass_traversal_tag, + BOOST_DEDUCED_TYPENAME boost::iterator_value::type + > +{ + typedef BOOST_DEDUCED_TYPENAME boost::iterator_value::type base_value_type; + typedef BOOST_DEDUCED_TYPENAME boost::iterator_reference::type reference_type; + friend class boost::iterator_core_access; + + typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + Derived, + Base, + base_value_type, + single_pass_traversal_tag, + base_value_type + > super_t; + + typedef escape this_t; + + void dereference_impl() { + m_current_value = static_cast(this)->fill(m_bnext, m_bend); + m_full = true; + } + + //Access the value referred to + reference_type dereference() const { + if(!m_full) + const_cast(this)->dereference_impl(); + return m_current_value; + } + + bool equal(const this_t & rhs) const { + if(m_full){ + if(! rhs.m_full) + const_cast(& rhs)->dereference_impl(); + } + else{ + if(rhs.m_full) + const_cast(this)->dereference_impl(); + } + if(m_bnext != rhs.m_bnext) + return false; + if(this->base_reference() != rhs.base_reference()) + return false; + return true; + } + + void increment(){ + if(++m_bnext < m_bend){ + m_current_value = *m_bnext; + return; + } + ++(this->base_reference()); + m_bnext = NULL; + m_bend = NULL; + m_full = false; + } + + // buffer to handle pending characters + const base_value_type *m_bnext; + const base_value_type *m_bend; + bool m_full; + base_value_type m_current_value; +public: + escape(Base base) : + super_t(base), + m_bnext(NULL), + m_bend(NULL), + m_full(false) + { + } +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/head_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/head_iterator.hpp new file mode 100644 index 0000000000..7d39a35da0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/head_iterator.hpp @@ -0,0 +1,80 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_HEAD_ITERATOR_HPP +#define BOOST_ARCHIVE_ITERATORS_HEAD_ITERATOR_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// head_iterator.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +template +class head_iterator + : public boost::iterator_adaptor< + head_iterator, + Base, + use_default, + single_pass_traversal_tag + > +{ +private: + friend class iterator_core_access; + typedef boost::iterator_adaptor< + head_iterator, + Base, + use_default, + single_pass_traversal_tag + > super_t; + + typedef head_iterator this_t; + typedef BOOST_DEDUCED_TYPENAME super_t::value_type value_type; + typedef BOOST_DEDUCED_TYPENAME super_t::reference reference_type; + + reference_type dereference_impl(){ + if(! m_end){ + while(! m_predicate(* this->base_reference())) + ++ this->base_reference(); + m_end = true; + } + return * this->base_reference(); + } + + reference_type dereference() const { + return const_cast(this)->dereference_impl(); + } + + void increment(){ + ++base_reference(); + } + Predicate m_predicate; + bool m_end; +public: + template + head_iterator(Predicate f, T start) : + super_t(Base(start)), + m_predicate(f), + m_end(false) + {} + +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_HEAD_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/insert_linebreaks.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/insert_linebreaks.hpp new file mode 100644 index 0000000000..09b13e5b41 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/insert_linebreaks.hpp @@ -0,0 +1,101 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_INSERT_LINEBREAKS_HPP +#define BOOST_ARCHIVE_ITERATORS_INSERT_LINEBREAKS_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// insert_linebreaks.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // for BOOST_DEDUCED_TYPENAME +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ using ::memcpy; } +#endif + +#include + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// insert line break every N characters +template< + class Base, + int N, + class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value::type +> +class insert_linebreaks : + public iterator_adaptor< + insert_linebreaks, + Base, + CharType, + single_pass_traversal_tag, + CharType + > +{ +private: + friend class boost::iterator_core_access; + typedef iterator_adaptor< + insert_linebreaks, + Base, + CharType, + single_pass_traversal_tag, + CharType + > super_t; + + bool equal(const insert_linebreaks & rhs) const { + return +// m_count == rhs.m_count +// && base_reference() == rhs.base_reference() + this->base_reference() == rhs.base_reference() + ; + } + + void increment() { + if(m_count == N){ + m_count = 0; + return; + } + ++m_count; + ++(this->base_reference()); + } + CharType dereference() const { + if(m_count == N) + return '\n'; + return * (this->base_reference()); + } + unsigned int m_count; +public: + // make composible buy using templated constructor + template + insert_linebreaks(BOOST_PFTO_WRAPPER(T) start) : + super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), + m_count(0) + {} + // intel 7.1 doesn't like default copy constructor + insert_linebreaks(const insert_linebreaks & rhs) : + super_t(rhs.base_reference()), + m_count(rhs.m_count) + {} +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_INSERT_LINEBREAKS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/istream_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/istream_iterator.hpp new file mode 100644 index 0000000000..1df612dc8d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/istream_iterator.hpp @@ -0,0 +1,95 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_ISTREAM_ITERATOR_HPP +#define BOOST_ARCHIVE_ITERATORS_ISTREAM_ITERATOR_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// istream_iterator.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// note: this is a custom version of the standard istream_iterator. +// This is necessary as the standard version doesn't work as expected +// for wchar_t based streams on systems for which wchar_t not a true +// type but rather a synonym for some integer type. + +#include // NULL +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +// given a type, make an input iterator based on a pointer to that type +template +class istream_iterator : + public boost::iterator_facade< + istream_iterator, + Elem, + std::input_iterator_tag, + Elem + > +{ + friend class boost::iterator_core_access; + typedef istream_iterator this_t ; + typedef BOOST_DEDUCED_TYPENAME boost::iterator_facade< + istream_iterator, + Elem, + std::input_iterator_tag, + Elem + > super_t; + typedef BOOST_DEDUCED_TYPENAME std::basic_istream istream_type; + + //Access the value referred to + Elem dereference() const { + return m_current_value; + } + + bool equal(const this_t & rhs) const { + // note: only works for comparison against end of stream + return m_istream == rhs.m_istream; + } + + void increment(){ + if(NULL != m_istream){ + m_current_value = static_cast(m_istream->get()); + if(! m_istream->good()){ + const_cast(this)->m_istream = NULL; + } + } + } + + istream_type *m_istream; + Elem m_current_value; +public: + istream_iterator(istream_type & is) : + m_istream(& is) + { + increment(); + } + + istream_iterator() : + m_istream(NULL) + {} + + istream_iterator(const istream_iterator & rhs) : + m_istream(rhs.m_istream), + m_current_value(rhs.m_current_value) + {} + +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_ISTREAM_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/mb_from_wchar.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/mb_from_wchar.hpp new file mode 100644 index 0000000000..4b34c0fa07 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/mb_from_wchar.hpp @@ -0,0 +1,136 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_MB_FROM_WCHAR_HPP +#define BOOST_ARCHIVE_ITERATORS_MB_FROM_WCHAR_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// mb_from_wchar.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // size_t +#include // for wctomb() + +#include // for BOOST_DEDUCED_TYPENAME +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; + using ::wctomb; +} // namespace std +#endif + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// class used by text archives to translate wide strings and to char +// strings of the currently selected locale +template // the input iterator +class mb_from_wchar + : public boost::iterator_adaptor< + mb_from_wchar, + Base, + wchar_t, + single_pass_traversal_tag, + char + > +{ + friend class boost::iterator_core_access; + + typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + mb_from_wchar, + Base, + wchar_t, + single_pass_traversal_tag, + char + > super_t; + + typedef mb_from_wchar this_t; + + char dereference_impl() { + if(! m_full){ + fill(); + m_full = true; + } + return m_buffer[m_bnext]; + } + char dereference() const { + return (const_cast(this))->dereference_impl(); + } + + // test for iterator equality + bool equal(const mb_from_wchar & rhs) const { + // once the value is filled, the base_reference has been incremented + // so don't permit comparison anymore. + return + 0 == m_bend + && 0 == m_bnext + && this->base_reference() == rhs.base_reference() + ; + } + + void fill(){ + wchar_t value = * this->base_reference(); + #if (defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 3) \ + || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION >= 8)))) + m_bend = std::wcrtomb(m_buffer, value, 0); + #else + m_bend = std::wctomb(m_buffer, value); + #endif + assert(-1 != m_bend); + assert((std::size_t)m_bend <= sizeof(m_buffer)); + assert(m_bend > 0); + m_bnext = 0; + } + + void increment(){ + if(++m_bnext < m_bend) + return; + m_bend = + m_bnext = 0; + ++(this->base_reference()); + m_full = false; + } + + // buffer to handle pending characters + int m_bend; + int m_bnext; + char m_buffer[9]; + bool m_full; + +public: + // make composible buy using templated constructor + template + mb_from_wchar(BOOST_PFTO_WRAPPER(T) start) : + super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), + m_bend(0), + m_bnext(0), + m_full(false) + {} + // intel 7.1 doesn't like default copy constructor + mb_from_wchar(const mb_from_wchar & rhs) : + super_t(rhs.base_reference()), + m_bend(rhs.m_bend), + m_bnext(rhs.m_bnext), + m_full(rhs.m_full) + {} +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_MB_FROM_WCHAR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/ostream_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/ostream_iterator.hpp new file mode 100644 index 0000000000..7c3203f125 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/ostream_iterator.hpp @@ -0,0 +1,83 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP +#define BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// ostream_iterator.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// note: this is a custom version of the standard ostream_iterator. +// This is necessary as the standard version doesn't work as expected +// for wchar_t based streams on systems for which wchar_t not a true +// type but rather a synonym for some integer type. + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +// given a type, make an input iterator based on a pointer to that type +template +class ostream_iterator : + public boost::iterator_facade< + ostream_iterator, + Elem, + std::output_iterator_tag, + ostream_iterator & + > +{ + friend class boost::iterator_core_access; + typedef ostream_iterator this_t ; + typedef Elem char_type; + typedef std::basic_ostream ostream_type; + + //emulate the behavior of std::ostream + ostream_iterator & dereference() const { + return const_cast(*this); + } + bool equal(const this_t & rhs) const { + return m_ostream == rhs.m_ostream; + } + void increment(){} +protected: + ostream_type *m_ostream; + void put_val(char_type e){ + if(NULL != m_ostream){ + m_ostream->put(e); + if(! m_ostream->good()) + m_ostream = NULL; + } + } +public: + this_t & operator=(char_type c){ + put_val(c); + return *this; + } + ostream_iterator(ostream_type & os) : + m_ostream (& os) + {} + ostream_iterator() : + m_ostream (NULL) + {} + ostream_iterator(const ostream_iterator & rhs) : + m_ostream (rhs.m_ostream) + {} +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/remove_whitespace.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/remove_whitespace.hpp new file mode 100644 index 0000000000..2ccc373080 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/remove_whitespace.hpp @@ -0,0 +1,169 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP +#define BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// remove_whitespace.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // for BOOST_DEDUCED_TYPENAME + +#include + +#include +#include + +//#include +//#if ! BOOST_WORKAROUND(BOOST_MSVC, <=1300) + +// here is the default standard implementation of the functor used +// by the filter iterator to remove spaces. Unfortunately usage +// of this implementation in combination with spirit trips a bug +// VC 6.5. The only way I can find to work around it is to +// implement a special non-standard version for this platform + +#ifndef BOOST_NO_CWCTYPE +#include // iswspace +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ using ::iswspace; } +#endif +#endif + +#include // isspace +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ using ::isspace; } +#endif + +#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +// this is required for the RW STL on Linux and Tru64. +#undef isspace +#undef iswspace +#endif + +//#endif // BOOST_WORKAROUND + +namespace { // anonymous + +template +struct remove_whitespace_predicate; + +template<> +struct remove_whitespace_predicate +{ + bool operator()(unsigned char t){ + return ! std::isspace(t); + } +}; + +#ifndef BOOST_NO_CWCHAR +template<> +struct remove_whitespace_predicate +{ + bool operator()(wchar_t t){ + return ! std::iswspace(t); + } +}; +#endif + +} // namespace anonymous + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// convert base64 file data (including whitespace and padding) to binary + +namespace boost { +namespace archive { +namespace iterators { + +// custom version of filter iterator which doesn't look ahead further than +// necessary + +template +class filter_iterator + : public boost::iterator_adaptor< + filter_iterator, + Base, + use_default, + single_pass_traversal_tag + > +{ + friend class boost::iterator_core_access; + typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + filter_iterator, + Base, + use_default, + single_pass_traversal_tag + > super_t; + typedef filter_iterator this_t; + typedef BOOST_DEDUCED_TYPENAME super_t::reference reference_type; + + reference_type dereference_impl(){ + if(! m_full){ + while(! m_predicate(* this->base_reference())) + ++(this->base_reference()); + m_full = true; + } + return * this->base_reference(); + } + + reference_type dereference() const { + return const_cast(this)->dereference_impl(); + } + + Predicate m_predicate; + bool m_full; +public: + // note: this function is public only because comeau compiler complained + // I don't know if this is because the compiler is wrong or what + void increment(){ + m_full = false; + ++(this->base_reference()); + } + filter_iterator(Base start) : + super_t(start), + m_full(false) + {} + filter_iterator(){} +}; + +template +class remove_whitespace : + public filter_iterator< + remove_whitespace_predicate, + Base + > +{ + friend class boost::iterator_core_access; + typedef filter_iterator< + remove_whitespace_predicate, + Base + > super_t; +public: +// remove_whitespace(){} // why is this needed? + // make composible buy using templated constructor + template + remove_whitespace(BOOST_PFTO_WRAPPER(T) start) : + super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))) + {} + // intel 7.1 doesn't like default copy constructor + remove_whitespace(const remove_whitespace & rhs) : + super_t(rhs.base_reference()) + {} +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/transform_width.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/transform_width.hpp new file mode 100644 index 0000000000..7ffc06d130 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/transform_width.hpp @@ -0,0 +1,168 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_TRANSFORM_WIDTH_HPP +#define BOOST_ARCHIVE_ITERATORS_TRANSFORM_WIDTH_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// transform_width.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// iterator which takes elements of x bits and returns elements of y bits. +// used to change streams of 8 bit characters into streams of 6 bit characters. +// and vice-versa for implementing base64 encodeing/decoding. Be very careful +// when using and end iterator. end is only reliable detected when the input +// stream length is some common multiple of x and y. E.G. Base64 6 bit +// character and 8 bit bytes. Lowest common multiple is 24 => 4 6 bit characters +// or 3 8 bit characters + +#include // for BOOST_DEDUCED_TYPENAME & PTFO +#include + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// class used by text archives to translate char strings to wchar_t +// strings of the currently selected locale +template< + class Base, + int BitsOut, + int BitsIn, + class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value::type // output character +> +class transform_width : + public boost::iterator_adaptor< + transform_width, + Base, + CharType, + single_pass_traversal_tag, + CharType + > +{ + friend class boost::iterator_core_access; + typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + transform_width, + Base, + CharType, + single_pass_traversal_tag, + CharType + > super_t; + + typedef transform_width this_t; + typedef BOOST_DEDUCED_TYPENAME iterator_value::type base_value_type; + + CharType fill(); + + CharType dereference_impl(){ + if(! m_full){ + m_current_value = fill(); + m_full = true; + } + return m_current_value; + } + + CharType dereference() const { + return const_cast(this)->dereference_impl(); + } + + // test for iterator equality + bool equal(const this_t & rhs) const { + return + this->base_reference() == rhs.base_reference(); + ; + } + + void increment(){ + m_displacement += BitsOut; + + while(m_displacement >= BitsIn){ + m_displacement -= BitsIn; + if(0 == m_displacement) + m_bufferfull = false; + if(! m_bufferfull){ + // note: suspect that this is not invoked for borland + ++(this->base_reference()); + } + } + m_full = false; + } + + CharType m_current_value; + // number of bits left in current input character buffer + unsigned int m_displacement; + base_value_type m_buffer; + // flag to current output character is ready - just used to save time + bool m_full; + // flag to indicate that m_buffer has data + bool m_bufferfull; + +public: + // make composible buy using templated constructor + template + transform_width(BOOST_PFTO_WRAPPER(T) start) : + super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), + m_displacement(0), + m_full(false), + m_bufferfull(false) + {} + // intel 7.1 doesn't like default copy constructor + transform_width(const transform_width & rhs) : + super_t(rhs.base_reference()), + m_current_value(rhs.m_current_value), + m_displacement(rhs.m_displacement), + m_buffer(rhs.m_buffer), + m_full(rhs.m_full), + m_bufferfull(rhs.m_bufferfull) + {} +}; + +template +CharType transform_width::fill(){ + CharType retval = 0; + unsigned int missing_bits = BitsOut; + for(;;){ + unsigned int bcount; + if(! m_bufferfull){ + m_buffer = * this->base_reference(); + m_bufferfull = true; + bcount = BitsIn; + } + else + bcount = BitsIn - m_displacement; + unsigned int i = (std::min)(bcount, missing_bits); + // shift interesting bits to least significant position + unsigned int j = m_buffer >> (bcount - i); + // strip off uninteresting bits + // (note presumption of two's complement arithmetic) + j &= ~(-(1 << i)); + // append then interesting bits to the output value + retval <<= i; + retval |= j; + missing_bits -= i; + if(0 == missing_bits) + break; + // note: suspect that this is not invoked for borland 5.51 + ++(this->base_reference()); + m_bufferfull = false; + } + return retval; +} + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_TRANSFORM_WIDTH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/unescape.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/unescape.hpp new file mode 100644 index 0000000000..f437c388e7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/unescape.hpp @@ -0,0 +1,91 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_UNESCAPE_HPP +#define BOOST_ARCHIVE_ITERATORS_UNESCAPE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// unescape.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // for BOOST_DEDUCED_TYPENAME +#include +//#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// class used by text archives to translate char strings to wchar_t +// strings of the currently selected locale +template +class unescape + : public boost::iterator_adaptor< + unescape, + Base, + BOOST_DEDUCED_TYPENAME pointee::type, + single_pass_traversal_tag, + BOOST_DEDUCED_TYPENAME pointee::type + > +{ + friend class boost::iterator_core_access; + typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + unescape, + Base, + BOOST_DEDUCED_TYPENAME pointee::type, + single_pass_traversal_tag, + BOOST_DEDUCED_TYPENAME pointee::type + > super_t; + + typedef unescape this_t; +public: + typedef BOOST_DEDUCED_TYPENAME this_t::value_type value_type; + typedef BOOST_DEDUCED_TYPENAME this_t::reference reference; +private: + value_type dereference_impl() { + if(! m_full){ + m_current_value = static_cast(this)->drain(); + m_full = true; + } + return m_current_value; + } + + reference dereference() const { + return const_cast(this)->dereference_impl(); + } + + value_type m_current_value; + bool m_full; + + void increment(){ + ++(this->base_reference()); + dereference_impl(); + m_full = false; + }; + +public: + + unescape(Base base) : + super_t(base), + m_full(false) + {} + +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_UNESCAPE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/wchar_from_mb.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/wchar_from_mb.hpp new file mode 100644 index 0000000000..12e7d57e77 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/wchar_from_mb.hpp @@ -0,0 +1,129 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_WCHAR_FROM_MB_HPP +#define BOOST_ARCHIVE_ITERATORS_WCHAR_FROM_MB_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// wchar_from_mb.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include // size_t +#include // mblen + +#include // for BOOST_DEDUCED_TYPENAME +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::mblen; + using ::mbtowc; +} // namespace std +#endif + +#include +#include + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// class used by text archives to translate char strings to wchar_t +// strings of the currently selected locale +template +class wchar_from_mb + : public boost::iterator_adaptor< + wchar_from_mb, + Base, + wchar_t, + single_pass_traversal_tag, + wchar_t + > +{ + friend class boost::iterator_core_access; + typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + wchar_from_mb, + Base, + wchar_t, + single_pass_traversal_tag, + wchar_t + > super_t; + + typedef wchar_from_mb this_t; + + wchar_t drain(); + + wchar_t dereference_impl() { + if(! m_full){ + m_current_value = drain(); + m_full = true; + } + return m_current_value; + } + + wchar_t dereference() const { + return const_cast(this)->dereference_impl(); + } + + void increment(){ + dereference_impl(); + m_full = false; + ++(this->base_reference()); + }; + + wchar_t m_current_value; + bool m_full; + +public: + // make composible buy using templated constructor + template + wchar_from_mb(BOOST_PFTO_WRAPPER(T) start) : + super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), + m_full(false) + {} + // intel 7.1 doesn't like default copy constructor + wchar_from_mb(const wchar_from_mb & rhs) : + super_t(rhs.base_reference()), + m_full(rhs.m_full) + {} +}; + +template +wchar_t wchar_from_mb::drain(){ + char buffer[9]; + char * bptr = buffer; + char val; + for(std::size_t i = 0; i++ < (unsigned)MB_CUR_MAX;){ + val = * this->base_reference(); + *bptr++ = val; + int result = std::mblen(buffer, i); + if(-1 != result) + break; + ++(this->base_reference()); + } + wchar_t retval; + int result = std::mbtowc(& retval, buffer, MB_CUR_MAX); + if(0 >= result) + boost::serialization::throw_exception(iterators::dataflow_exception( + iterators::dataflow_exception::invalid_conversion + )); + return retval; +} + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_WCHAR_FROM_MB_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_escape.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_escape.hpp new file mode 100644 index 0000000000..fd40c020fd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_escape.hpp @@ -0,0 +1,125 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP +#define BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_escape.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // for BOOST_DEDUCED_TYPENAME +#include + +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// insert escapes into xml text + +template +class xml_escape + : public escape, Base> +{ + friend class boost::iterator_core_access; + + typedef escape, Base> super_t; + +public: + char fill(const char * & bstart, const char * & bend); + wchar_t fill(const wchar_t * & bstart, const wchar_t * & bend); + + template + xml_escape(BOOST_PFTO_WRAPPER(T) start) : + super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))) + {} + // intel 7.1 doesn't like default copy constructor + xml_escape(const xml_escape & rhs) : + super_t(rhs.base_reference()) + {} +}; + +template +char xml_escape::fill( + const char * & bstart, + const char * & bend +){ + char current_value = * this->base_reference(); + switch(current_value){ + case '<': + bstart = "<"; + bend = bstart + 4; + break; + case '>': + bstart = ">"; + bend = bstart + 4; + break; + case '&': + bstart = "&"; + bend = bstart + 5; + break; + case '"': + bstart = """; + bend = bstart + 6; + break; + case '\'': + bstart = "'"; + bend = bstart + 6; + break; + default: + return current_value; + } + return *bstart; +} + +template +wchar_t xml_escape::fill( + const wchar_t * & bstart, + const wchar_t * & bend +){ + wchar_t current_value = * this->base_reference(); + switch(current_value){ + case '<': + bstart = L"<"; + bend = bstart + 4; + break; + case '>': + bstart = L">"; + bend = bstart + 4; + break; + case '&': + bstart = L"&"; + bend = bstart + 5; + break; + case '"': + bstart = L"""; + bend = bstart + 6; + break; + case '\'': + bstart = L"'"; + bend = bstart + 6; + break; + default: + return current_value; + } + return *bstart; +} + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_unescape.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_unescape.hpp new file mode 100644 index 0000000000..375e7d29fa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_unescape.hpp @@ -0,0 +1,128 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_HPP +#define BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_unescape.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // for BOOST_DEDUCED_TYPENAME + +#include +#include + +#include +#include + +namespace boost { +namespace archive { +namespace iterators { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// replace &??? xml escape sequences with the corresponding characters +template +class xml_unescape + : public unescape, Base> +{ + friend class boost::iterator_core_access; + typedef xml_unescape this_t; + typedef unescape super_t; + typedef BOOST_DEDUCED_TYPENAME boost::iterator_reference reference_type; + + reference_type dereference() const { + return unescape, Base>::dereference(); + } +public: + // workaround msvc 7.1 ICU crash + #if defined(BOOST_MSVC) + typedef int value_type; + #else + typedef BOOST_DEDUCED_TYPENAME this_t::value_type value_type; + #endif + + void drain_residue(const char *literal); + value_type drain(); + + template + xml_unescape(BOOST_PFTO_WRAPPER(T) start) : + super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))) + {} + // intel 7.1 doesn't like default copy constructor + xml_unescape(const xml_unescape & rhs) : + super_t(rhs.base_reference()) + {} +}; + +template +void xml_unescape::drain_residue(const char * literal){ + do{ + if(* literal != * ++(this->base_reference())) + boost::serialization::throw_exception( + dataflow_exception( + dataflow_exception::invalid_xml_escape_sequence + ) + ); + } + while('\0' != * ++literal); +} + +// note key constraint on this function is that can't "look ahead" any +// more than necessary into base iterator. Doing so would alter the base +// iterator refenence which would make subsequent iterator comparisons +// incorrect and thereby break the composiblity of iterators. +template +BOOST_DEDUCED_TYPENAME xml_unescape::value_type +//int +xml_unescape::drain(){ + value_type retval = * this->base_reference(); + if('&' != retval){ + return retval; + } + retval = * ++(this->base_reference()); + switch(retval){ + case 'l': // < + drain_residue("t;"); + retval = '<'; + break; + case 'g': // > + drain_residue("t;"); + retval = '>'; + break; + case 'a': + retval = * ++(this->base_reference()); + switch(retval){ + case 'p': // ' + drain_residue("os;"); + retval = '\''; + break; + case 'm': // & + drain_residue("p;"); + retval = '&'; + break; + } + break; + case 'q': + drain_residue("uot;"); + retval = '"'; + break; + } + return retval; +} + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif // BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_unescape_exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_unescape_exception.hpp new file mode 100644 index 0000000000..a141737347 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/iterators/xml_unescape_exception.hpp @@ -0,0 +1,49 @@ +#ifndef BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP +#define BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_unescape_exception.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifndef BOOST_NO_EXCEPTIONS +#include + +#include + +namespace boost { +namespace archive { +namespace iterators { + +////////////////////////////////////////////////////////////////////// +// exceptions thrown by xml_unescapes +// +class xml_unescape_exception : public std::exception +{ +public: + xml_unescape_exception() + {} + + virtual const char *what( ) const throw( ) + { + return "xml contained un-recognized escape code"; + } +}; + +} // namespace iterators +} // namespace archive +} // namespace boost + +#endif //BOOST_NO_EXCEPTIONS +#endif //BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_binary_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_binary_iarchive.hpp new file mode 100644 index 0000000000..ce7e3b0609 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_binary_iarchive.hpp @@ -0,0 +1,54 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_binary_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class polymorphic_binary_iarchive : + public detail::polymorphic_iarchive_route +{ +public: + polymorphic_binary_iarchive(std::istream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route(is, flags) + {} + ~polymorphic_binary_iarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_binary_iarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_binary_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_binary_oarchive.hpp new file mode 100644 index 0000000000..a66ebddca6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_binary_oarchive.hpp @@ -0,0 +1,43 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_binary_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +namespace boost { +namespace archive { + +typedef detail::polymorphic_oarchive_route< + binary_oarchive_impl< + naked_binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type + > + > polymorphic_binary_oarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_binary_oarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_iarchive.hpp new file mode 100644 index 0000000000..2f76cf267a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_iarchive.hpp @@ -0,0 +1,181 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_IARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // std::size_t +#include // ULONG_MAX +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include + +#include +#include +#include +#include +#include + +#include +#include // must be the last header + +namespace boost { +template +class shared_ptr; +namespace serialization { + class extended_type_info; +} // namespace serialization +namespace archive { +namespace detail { + class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; + class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; +} + +class polymorphic_iarchive; + +class polymorphic_iarchive_impl : + public detail::interface_iarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_iarchive; + friend class load_access; +#endif + // primitive types the only ones permitted by polymorphic archives + virtual void load(bool & t) = 0; + + virtual void load(char & t) = 0; + virtual void load(signed char & t) = 0; + virtual void load(unsigned char & t) = 0; + #ifndef BOOST_NO_CWCHAR + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + virtual void load(wchar_t & t) = 0; + #endif + #endif + virtual void load(short & t) = 0; + virtual void load(unsigned short & t) = 0; + virtual void load(int & t) = 0; + virtual void load(unsigned int & t) = 0; + virtual void load(long & t) = 0; + virtual void load(unsigned long & t) = 0; + + #if defined(BOOST_HAS_LONG_LONG) + virtual void load(boost::long_long_type & t) = 0; + virtual void load(boost::ulong_long_type & t) = 0; + #elif defined(BOOST_HAS_MS_INT64) + virtual void load(__int64 & t) = 0; + virtual void load(unsigned __int64 & t) = 0; + #endif + + virtual void load(float & t) = 0; + virtual void load(double & t) = 0; + + // string types are treated as primitives + virtual void load(std::string & t) = 0; + #ifndef BOOST_NO_STD_WSTRING + virtual void load(std::wstring & t) = 0; + #endif + + // used for xml and other tagged formats + virtual void load_start(const char * name) = 0; + virtual void load_end(const char * name) = 0; + virtual void register_basic_serializer(const detail::basic_iserializer & bis) = 0; + + // msvc and borland won't automatically pass these to the base class so + // make it explicit here + template + void load_override(T & t, BOOST_PFTO int) + { + archive::load(* this->This(), t); + } + // special treatment for name-value pairs. + template + void load_override( + #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + const + #endif + boost::serialization::nvp< T > & t, + int + ){ + load_start(t.name()); + archive::load(* this->This(), t.value()); + load_end(t.name()); + } +protected: + virtual ~polymorphic_iarchive_impl(){}; +public: + // utility function implemented by all legal archives + virtual void set_library_version(library_version_type archive_library_version) = 0; + virtual library_version_type get_library_version() const = 0; + virtual unsigned int get_flags() const = 0; + virtual void delete_created_pointers() = 0; + virtual void reset_object_address( + const void * new_address, + const void * old_address + ) = 0; + + virtual void load_binary(void * t, std::size_t size) = 0; + + // these are used by the serialization library implementation. + virtual void load_object( + void *t, + const detail::basic_iserializer & bis + ) = 0; + virtual const detail::basic_pointer_iserializer * load_pointer( + void * & t, + const detail::basic_pointer_iserializer * bpis_ptr, + const detail::basic_pointer_iserializer * (*finder)( + const boost::serialization::extended_type_info & type + ) + ) = 0; +}; + +} // namespace archive +} // namespace boost + +#include // pops abi_suffix.hpp pragmas + +// note special treatment of shared_ptr. This type needs a special +// structure associated with every archive. We created a "mix-in" +// class to provide this functionality. Since shared_ptr holds a +// special esteem in the boost library - we included it here by default. +#include + +namespace boost { +namespace archive { + +class polymorphic_iarchive : + public polymorphic_iarchive_impl, + public detail::shared_ptr_helper +{ +public: + virtual ~polymorphic_iarchive(){}; +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::polymorphic_iarchive) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_oarchive.hpp new file mode 100644 index 0000000000..420029b5b6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_oarchive.hpp @@ -0,0 +1,159 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_OARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // size_t +#include // ULONG_MAX +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include // must be the last header + +namespace boost { +template +class shared_ptr; +namespace serialization { + class extended_type_info; +} // namespace serialization +namespace archive { +namespace detail { + class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; + class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; +} + +class polymorphic_oarchive; + +class polymorphic_oarchive_impl : + public detail::interface_oarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_oarchive; + friend class save_access; +#endif + // primitive types the only ones permitted by polymorphic archives + virtual void save(const bool t) = 0; + + virtual void save(const char t) = 0; + virtual void save(const signed char t) = 0; + virtual void save(const unsigned char t) = 0; + #ifndef BOOST_NO_CWCHAR + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + virtual void save(const wchar_t t) = 0; + #endif + #endif + virtual void save(const short t) = 0; + virtual void save(const unsigned short t) = 0; + virtual void save(const int t) = 0; + virtual void save(const unsigned int t) = 0; + virtual void save(const long t) = 0; + virtual void save(const unsigned long t) = 0; + + #if defined(BOOST_HAS_LONG_LONG) + virtual void save(const boost::long_long_type t) = 0; + virtual void save(const boost::ulong_long_type t) = 0; + #elif defined(BOOST_HAS_MS_INT64) + virtual void save(const __int64 t) = 0; + virtual void save(const unsigned __int64 t) = 0; + #endif + + virtual void save(const float t) = 0; + virtual void save(const double t) = 0; + + // string types are treated as primitives + virtual void save(const std::string & t) = 0; + #ifndef BOOST_NO_STD_WSTRING + virtual void save(const std::wstring & t) = 0; + #endif + + virtual void save_null_pointer() = 0; + // used for xml and other tagged formats + virtual void save_start(const char * name) = 0; + virtual void save_end(const char * name) = 0; + virtual void register_basic_serializer(const detail::basic_oserializer & bos) = 0; + + virtual void end_preamble() = 0; + + // msvc and borland won't automatically pass these to the base class so + // make it explicit here + template + void save_override(T & t, BOOST_PFTO int) + { + archive::save(* this->This(), t); + } + // special treatment for name-value pairs. + template + void save_override( + #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + const + #endif + ::boost::serialization::nvp< T > & t, int + ){ + save_start(t.name()); + archive::save(* this->This(), t.const_value()); + save_end(t.name()); + } +protected: + virtual ~polymorphic_oarchive_impl(){}; +public: + // utility functions implemented by all legal archives + virtual unsigned int get_flags() const = 0; + virtual library_version_type get_library_version() const = 0; + virtual void save_binary(const void * t, std::size_t size) = 0; + + virtual void save_object( + const void *x, + const detail::basic_oserializer & bos + ) = 0; + virtual void save_pointer( + const void * t, + const detail::basic_pointer_oserializer * bpos_ptr + ) = 0; +}; + +// note: preserve naming symmetry +class polymorphic_oarchive : + public polymorphic_oarchive_impl +{ +public: + virtual ~polymorphic_oarchive(){}; +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::polymorphic_oarchive) + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_POLYMORPHIC_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_iarchive.hpp new file mode 100644 index 0000000000..931a9287c7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_iarchive.hpp @@ -0,0 +1,54 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class polymorphic_text_iarchive : + public detail::polymorphic_iarchive_route +{ +public: + polymorphic_text_iarchive(std::istream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route(is, flags) + {} + ~polymorphic_text_iarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_text_iarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_oarchive.hpp new file mode 100644 index 0000000000..82b48924f9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_oarchive.hpp @@ -0,0 +1,39 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +namespace boost { +namespace archive { + +typedef detail::polymorphic_oarchive_route< + text_oarchive_impl +> polymorphic_text_oarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_text_oarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_wiarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_wiarchive.hpp new file mode 100644 index 0000000000..4df3d47351 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_wiarchive.hpp @@ -0,0 +1,59 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_wiarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class polymorphic_text_wiarchive : + public detail::polymorphic_iarchive_route +{ +public: + polymorphic_text_wiarchive(std::wistream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route(is, flags) + {} + ~polymorphic_text_wiarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_text_wiarchive +) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_woarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_woarchive.hpp new file mode 100644 index 0000000000..bc44947416 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_text_woarchive.hpp @@ -0,0 +1,44 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include +#include + +namespace boost { +namespace archive { + +typedef detail::polymorphic_oarchive_route< + text_woarchive_impl +> polymorphic_text_woarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_text_woarchive +) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_iarchive.hpp new file mode 100644 index 0000000000..feb0b99bc2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_iarchive.hpp @@ -0,0 +1,54 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class polymorphic_xml_iarchive : + public detail::polymorphic_iarchive_route +{ +public: + polymorphic_xml_iarchive(std::istream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route(is, flags) + {} + ~polymorphic_xml_iarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_xml_iarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_oarchive.hpp new file mode 100644 index 0000000000..8576694288 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_oarchive.hpp @@ -0,0 +1,39 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +namespace boost { +namespace archive { + +typedef detail::polymorphic_oarchive_route< + xml_oarchive_impl +> polymorphic_xml_oarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_xml_oarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_wiarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_wiarchive.hpp new file mode 100644 index 0000000000..b3f7db2582 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_wiarchive.hpp @@ -0,0 +1,50 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_wiarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include +#include + +namespace boost { +namespace archive { + +class polymorphic_xml_wiarchive : + public detail::polymorphic_iarchive_route +{ +public: + polymorphic_xml_wiarchive(std::wistream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route(is, flags) + {} + ~polymorphic_xml_wiarchive(){} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_xml_wiarchive +) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_woarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_woarchive.hpp new file mode 100644 index 0000000000..8884b43c75 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/polymorphic_xml_woarchive.hpp @@ -0,0 +1,44 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include +#include + +namespace boost { +namespace archive { + +typedef detail::polymorphic_oarchive_route< + xml_woarchive_impl +> polymorphic_xml_woarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_xml_woarchive +) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/shared_ptr_helper.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/shared_ptr_helper.hpp new file mode 100644 index 0000000000..0e5f4f26bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/shared_ptr_helper.hpp @@ -0,0 +1,219 @@ +#ifndef BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP +#define BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// shared_ptr_helper.hpp: serialization for boost shared pointern + +// (C) Copyright 2004-2009 Robert Ramey, Martin Ecker and Takatoshi Kondo +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include // NULL + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include // must be the last headern + +namespace boost_132 { + template class shared_ptr; +} +namespace boost { + template class shared_ptr; + namespace serialization { + class extended_type_info; + template + inline void load( + Archive & ar, + boost::shared_ptr< T > &t, + const unsigned int file_version + ); + } +namespace archive{ +namespace detail { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// a common class for holding various types of shared pointers + +class shared_ptr_helper { + struct collection_type_compare { + bool operator()( + const shared_ptr &lhs, + const shared_ptr &rhs + )const{ + return lhs.get() < rhs.get(); + } + }; + typedef std::set< + boost::shared_ptr, + collection_type_compare + > collection_type; + typedef collection_type::const_iterator iterator_type; + // list of shared_pointers create accessable by raw pointer. This + // is used to "match up" shared pointers loaded at different + // points in the archive. Note, we delay construction until + // it is actually used since this is by default included as + // a "mix-in" even if shared_ptr isn't used. + collection_type * m_pointers; + + struct null_deleter { + void operator()(void const *) const {} + }; + + struct void_deleter { + const boost::serialization::extended_type_info * m_eti; + void_deleter(const boost::serialization::extended_type_info *eti) : + m_eti(eti) + {} + void operator()(void *vp) const { + m_eti->destroy(vp); + } + }; + +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + template + friend inline void boost::serialization::load( + Archive & ar, + boost::shared_ptr< T > &t, + const unsigned int file_version + ); +#endif + +// #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP + // list of loaded pointers. This is used to be sure that the pointers + // stay around long enough to be "matched" with other pointers loaded + // by the same archive. These are created with a "null_deleter" so that + // when this list is destroyed - the underlaying raw pointers are not + // destroyed. This has to be done because the pointers are also held by + // new system which is disjoint from this set. This is implemented + // by a change in load_construct_data below. It makes this file suitable + // only for loading pointers into a 1.33 or later boost system. + std::list > * m_pointers_132; +// #endif + + // returns pointer to object and an indicator whether this is a + // new entry (true) or a previous one (false) + BOOST_ARCHIVE_DECL(shared_ptr) + get_od( + const void * od, + const boost::serialization::extended_type_info * true_type, + const boost::serialization::extended_type_info * this_type + ); + + BOOST_ARCHIVE_DECL(void) + append(const boost::shared_ptr &); + + template + struct non_polymorphic { + static const boost::serialization::extended_type_info * + get_object_identifier(T & t){ + return & boost::serialization::singleton< + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type + >::get_const_instance(); + } + }; + template + struct polymorphic { + static const boost::serialization::extended_type_info * + get_object_identifier(T & t){ + return boost::serialization::singleton< + BOOST_DEDUCED_TYPENAME + boost::serialization::type_info_implementation< T >::type + >::get_const_instance().get_derived_extended_type_info(t); + } + }; +public: + template + void reset(shared_ptr< T > & s, T * t){ + if(NULL == t){ + s.reset(); + return; + } + const boost::serialization::extended_type_info * this_type + = & boost::serialization::type_info_implementation< T >::type + ::get_const_instance(); + + // get pointer to the most derived object. This is effectively + // the object identifern + typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_polymorphic< T >, + mpl::identity >, + mpl::identity > + >::type type; + + const boost::serialization::extended_type_info * true_type + = type::get_object_identifier(*t); + + // note:if this exception is thrown, be sure that derived pointern + // is either registered or exported. + if(NULL == true_type) + boost::serialization::throw_exception( + archive_exception( + archive_exception::unregistered_class, + this_type->get_debug_info() + ) + ); + shared_ptr r = + get_od( + static_cast(t), + true_type, + this_type + ); + if(!r){ + s.reset(t); + const void * od = void_downcast( + *true_type, + *this_type, + static_cast(t) + ); + shared_ptr sp(s, od); + append(sp); + } + else{ + s = shared_ptr< T >( + r, + static_cast(r.get()) + ); + } + } + +// #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP + BOOST_ARCHIVE_DECL(void) + append(const boost_132::shared_ptr & t); +// #endif +public: + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + shared_ptr_helper(); + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + ~shared_ptr_helper(); +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/text_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/text_iarchive.hpp new file mode 100644 index 0000000000..6e601058b9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/text_iarchive.hpp @@ -0,0 +1,155 @@ +#ifndef BOOST_ARCHIVE_TEXT_IARCHIVE_HPP +#define BOOST_ARCHIVE_TEXT_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class text_iarchive_impl : + public basic_text_iprimitive, + public basic_text_iarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_iarchive; + friend class basic_text_iarchive; + friend class load_access; +protected: +#endif + template + void load(T & t){ + basic_text_iprimitive::load(t); + } + void load(version_type & t){ + unsigned int v; + load(v); + t = version_type(v); + } + void load(boost::serialization::item_version_type & t){ + unsigned int v; + load(v); + t = boost::serialization::item_version_type(v); + } + BOOST_ARCHIVE_DECL(void) + load(char * t); + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + BOOST_ARCHIVE_DECL(void) + load(wchar_t * t); + #endif + BOOST_ARCHIVE_DECL(void) + load(std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_ARCHIVE_DECL(void) + load(std::wstring &ws); + #endif + // note: the following should not needed - but one compiler (vc 7.1) + // fails to compile one test (test_shared_ptr) without it !!! + // make this protected so it can be called from a derived archive + template + void load_override(T & t, BOOST_PFTO int){ + basic_text_iarchive::load_override(t, 0); + } + BOOST_ARCHIVE_DECL(void) + load_override(class_name_type & t, int); + BOOST_ARCHIVE_DECL(void) + init(); + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + text_iarchive_impl(std::istream & is, unsigned int flags); + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + ~text_iarchive_impl(){}; +}; + +// do not derive from the classes below. If you want to extend this functionality +// via inhertance, derived from text_iarchive_impl instead. This will +// preserve correct static polymorphism. + +// same as text_iarchive below - without the shared_ptr_helper +class naked_text_iarchive : + public text_iarchive_impl +{ +public: + naked_text_iarchive(std::istream & is_, unsigned int flags = 0) : + // note: added _ to suppress useless gcc warning + text_iarchive_impl(is_, flags) + {} + ~naked_text_iarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +// note special treatment of shared_ptr. This type needs a special +// structure associated with every archive. We created a "mix-in" +// class to provide this functionality. Since shared_ptr holds a +// special esteem in the boost library - we included it here by default. +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class text_iarchive : + public text_iarchive_impl, + public detail::shared_ptr_helper +{ +public: + text_iarchive(std::istream & is_, unsigned int flags = 0) : + // note: added _ to suppress useless gcc warning + text_iarchive_impl(is_, flags) + {} + ~text_iarchive(){} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_iarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_TEXT_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/text_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/text_oarchive.hpp new file mode 100644 index 0000000000..183a767370 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/text_oarchive.hpp @@ -0,0 +1,118 @@ +#ifndef BOOST_ARCHIVE_TEXT_OARCHIVE_HPP +#define BOOST_ARCHIVE_TEXT_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // std::size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class text_oarchive_impl : + /* protected ? */ public basic_text_oprimitive, + public basic_text_oarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_oarchive; + friend class basic_text_oarchive; + friend class save_access; +protected: +#endif + template + void save(const T & t){ + this->newtoken(); + basic_text_oprimitive::save(t); + } + void save(const version_type & t){ + save(static_cast(t)); + } + void save(const boost::serialization::item_version_type & t){ + save(static_cast(t)); + } + BOOST_ARCHIVE_DECL(void) + save(const char * t); + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + BOOST_ARCHIVE_DECL(void) + save(const wchar_t * t); + #endif + BOOST_ARCHIVE_DECL(void) + save(const std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_ARCHIVE_DECL(void) + save(const std::wstring &ws); + #endif + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + text_oarchive_impl(std::ostream & os, unsigned int flags); + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + ~text_oarchive_impl(){}; +public: + BOOST_ARCHIVE_DECL(void) + save_binary(const void *address, std::size_t count); +}; + +// do not derive from this class. If you want to extend this functionality +// via inhertance, derived from text_oarchive_impl instead. This will +// preserve correct static polymorphism. +class text_oarchive : + public text_oarchive_impl +{ +public: + text_oarchive(std::ostream & os_, unsigned int flags = 0) : + // note: added _ to suppress useless gcc warning + text_oarchive_impl(os_, flags) + {} + ~text_oarchive(){} +}; + +typedef text_oarchive naked_text_oarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_oarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_TEXT_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/text_wiarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/text_wiarchive.hpp new file mode 100644 index 0000000000..7451f3a620 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/text_wiarchive.hpp @@ -0,0 +1,152 @@ +#ifndef BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP +#define BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_wiarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include + +#include +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class text_wiarchive_impl : + public basic_text_iprimitive, + public basic_text_iarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_iarchive; + friend class basic_text_iarchive; + friend class load_access; +protected: +#endif + template + void load(T & t){ + basic_text_iprimitive::load(t); + } + void load(version_type & t){ + unsigned int v; + load(v); + t = version_type(v); + } + void load(boost::serialization::item_version_type & t){ + unsigned int v; + load(v); + t = boost::serialization::item_version_type(v); + } + BOOST_WARCHIVE_DECL(void) + load(char * t); + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + BOOST_WARCHIVE_DECL(void) + load(wchar_t * t); + #endif + BOOST_WARCHIVE_DECL(void) + load(std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_WARCHIVE_DECL(void) + load(std::wstring &ws); + #endif + // note: the following should not needed - but one compiler (vc 7.1) + // fails to compile one test (test_shared_ptr) without it !!! + template + void load_override(T & t, BOOST_PFTO int){ + basic_text_iarchive::load_override(t, 0); + } + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + text_wiarchive_impl(std::wistream & is, unsigned int flags); + ~text_wiarchive_impl(){}; +}; + +// do not derive from the classes below. If you want to extend this functionality +// via inhertance, derived from text_iarchive_impl instead. This will +// preserve correct static polymorphism. + +// same as text_wiarchive below - without the shared_ptr_helper +class naked_text_wiarchive : + public text_wiarchive_impl +{ +public: + naked_text_wiarchive(std::wistream & is, unsigned int flags = 0) : + text_wiarchive_impl(is, flags) + {} + ~naked_text_wiarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +// note special treatment of shared_ptr. This type needs a special +// structure associated with every archive. We created a "mix-in" +// class to provide this functionality. Since shared_ptr holds a +// special esteem in the boost library - we included it here by default. +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class text_wiarchive : + public text_wiarchive_impl, + public detail::shared_ptr_helper +{ +public: + text_wiarchive(std::wistream & is, unsigned int flags = 0) : + text_wiarchive_impl(is, flags) + {} + ~text_wiarchive(){} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_wiarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/text_woarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/text_woarchive.hpp new file mode 100644 index 0000000000..7ed0c820b8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/text_woarchive.hpp @@ -0,0 +1,145 @@ +#ifndef BOOST_ARCHIVE_TEXT_WOARCHIVE_HPP +#define BOOST_ARCHIVE_TEXT_WOARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_woarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include +#include // size_t + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class text_woarchive_impl : + public basic_text_oprimitive, + public basic_text_oarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_oarchive; + friend class basic_text_oarchive; + friend class save_access; +protected: +#endif + template + void save(const T & t){ + this->newtoken(); + basic_text_oprimitive::save(t); + } + void save(const version_type & t){ + save(static_cast(t)); + } + void save(const boost::serialization::item_version_type & t){ + save(static_cast(t)); + } + BOOST_WARCHIVE_DECL(void) + save(const char * t); + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + BOOST_WARCHIVE_DECL(void) + save(const wchar_t * t); + #endif + BOOST_WARCHIVE_DECL(void) + save(const std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_WARCHIVE_DECL(void) + save(const std::wstring &ws); + #endif + text_woarchive_impl(std::wostream & os, unsigned int flags) : + basic_text_oprimitive( + os, + 0 != (flags & no_codecvt) + ), + basic_text_oarchive(flags) + { + if(0 == (flags & no_header)) + basic_text_oarchive::init(); + } +public: + void save_binary(const void *address, std::size_t count){ + put(static_cast('\n')); + this->end_preamble(); + #if ! defined(__MWERKS__) + this->basic_text_oprimitive::save_binary( + #else + this->basic_text_oprimitive::save_binary( + #endif + address, + count + ); + put(static_cast('\n')); + this->delimiter = this->none; + } + +}; + +// we use the following because we can't use +// typedef text_oarchive_impl > text_oarchive; + +// do not derive from this class. If you want to extend this functionality +// via inhertance, derived from text_oarchive_impl instead. This will +// preserve correct static polymorphism. +class text_woarchive : + public text_woarchive_impl +{ +public: + text_woarchive(std::wostream & os, unsigned int flags = 0) : + text_woarchive_impl(os, flags) + {} + ~text_woarchive(){} +}; + +typedef text_woarchive naked_text_woarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_woarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_TEXT_WOARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/tmpdir.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/tmpdir.hpp new file mode 100644 index 0000000000..f962e1160b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/tmpdir.hpp @@ -0,0 +1,50 @@ +#ifndef BOOST_ARCHIVE_TMPDIR_HPP +#define BOOST_ARCHIVE_TMPDIR_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// tmpdir.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // getenv +#include // NULL +//#include + +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { + using ::getenv; +} +#endif + +namespace boost { +namespace archive { + +inline const char * tmpdir(){ + const char *dirname; + dirname = std::getenv("TMP"); + if(NULL == dirname) + dirname = std::getenv("TMPDIR"); + if(NULL == dirname) + dirname = std::getenv("TEMP"); + if(NULL == dirname){ + //assert(false); // no temp directory found + dirname = "."; + } + return dirname; +} + +} // archive +} // boost + +#endif // BOOST_ARCHIVE_TMPDIR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/wcslen.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/wcslen.hpp new file mode 100644 index 0000000000..5c14acfff3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/wcslen.hpp @@ -0,0 +1,56 @@ +#ifndef BOOST_ARCHIVE_WCSLEN_HPP +#define BOOST_ARCHIVE_WCSLEN_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// wcslen.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // size_t +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#ifndef BOOST_NO_CWCHAR + +// a couple of libraries which include wchar_t don't include +// wcslen + +#if defined(BOOST_DINKUMWARE_STDLIB) && BOOST_DINKUMWARE_STDLIB < 306 \ +|| defined(__LIBCOMO__) + +namespace std { +inline std::size_t wcslen(const wchar_t * ws) +{ + const wchar_t * eows = ws; + while(* eows != 0) + ++eows; + return eows - ws; +} +} // namespace std + +#else + +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ using ::wcslen; } +#endif + +#endif // wcslen + +#endif //BOOST_NO_CWCHAR + +#endif //BOOST_ARCHIVE_WCSLEN_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_archive_exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_archive_exception.hpp new file mode 100644 index 0000000000..c8d65e0112 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_archive_exception.hpp @@ -0,0 +1,56 @@ +#ifndef BOOST_ARCHIVE_XML_ARCHIVE_EXCEPTION_HPP +#define BOOST_ARCHIVE_XML_ARCHIVE_EXCEPTION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_archive_exception.hpp: + +// (C) Copyright 2007 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include + +#include +#include +#include +#include + +#include // must be the last header + +namespace boost { +namespace archive { + +////////////////////////////////////////////////////////////////////// +// exceptions thrown by xml archives +// +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_archive_exception : + public virtual boost::archive::archive_exception +{ +public: + typedef enum { + xml_archive_parsing_error, // see save_register + xml_archive_tag_mismatch, + xml_archive_tag_name_error + } exception_code; + xml_archive_exception( + exception_code c, + const char * e1 = NULL, + const char * e2 = NULL + ); +}; + +}// namespace archive +}// namespace boost + +#include // pops abi_suffix.hpp pragmas + +#endif //BOOST_XML_ARCHIVE_ARCHIVE_EXCEPTION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_iarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_iarchive.hpp new file mode 100644 index 0000000000..be6cfe494e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_iarchive.hpp @@ -0,0 +1,164 @@ +#ifndef BOOST_ARCHIVE_XML_IARCHIVE_HPP +#define BOOST_ARCHIVE_XML_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +//#include +#include +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class basic_xml_grammar; +typedef basic_xml_grammar xml_grammar; + +template +class xml_iarchive_impl : + public basic_text_iprimitive, + public basic_xml_iarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_iarchive; + friend class basic_xml_iarchive; + friend class load_access; +protected: +#endif + // instances of micro xml parser to parse start preambles + // scoped_ptr doesn't play nice with borland - so use a naked pointer + // scoped_ptr gimpl; + xml_grammar *gimpl; + + std::istream & get_is(){ + return is; + } + template + void load(T & t){ + basic_text_iprimitive::load(t); + } + void + load(version_type & t){ + unsigned int v; + load(v); + t = version_type(v); + } + void + load(boost::serialization::item_version_type & t){ + unsigned int v; + load(v); + t = boost::serialization::item_version_type(v); + } + BOOST_ARCHIVE_DECL(void) + load(char * t); + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + BOOST_ARCHIVE_DECL(void) + load(wchar_t * t); + #endif + BOOST_ARCHIVE_DECL(void) + load(std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_ARCHIVE_DECL(void) + load(std::wstring &ws); + #endif + template + void load_override(T & t, BOOST_PFTO int){ + basic_xml_iarchive::load_override(t, 0); + } + BOOST_ARCHIVE_DECL(void) + load_override(class_name_type & t, int); + BOOST_ARCHIVE_DECL(void) + init(); + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + xml_iarchive_impl(std::istream & is, unsigned int flags); + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + ~xml_iarchive_impl(); +}; + +// do not derive from the classes below. If you want to extend this functionality +// via inhertance, derived from text_iarchive_impl instead. This will +// preserve correct static polymorphism. + +// same as xml_iarchive below - without the shared_ptr_helper +class naked_xml_iarchive : + public xml_iarchive_impl +{ +public: + naked_xml_iarchive(std::istream & is, unsigned int flags = 0) : + xml_iarchive_impl(is, flags) + {} + ~naked_xml_iarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +// note special treatment of shared_ptr. This type needs a special +// structure associated with every archive. We created a "mix-in" +// class to provide this functionality. Since shared_ptr holds a +// special esteem in the boost library - we included it here by default. +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class xml_iarchive : + public xml_iarchive_impl, + public detail::shared_ptr_helper +{ +public: + xml_iarchive(std::istream & is, unsigned int flags = 0) : + xml_iarchive_impl(is, flags) + {} + ~xml_iarchive(){}; +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_iarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_ARCHIVE_XML_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_oarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_oarchive.hpp new file mode 100644 index 0000000000..167ba09370 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_oarchive.hpp @@ -0,0 +1,133 @@ +#ifndef BOOST_ARCHIVE_XML_OARCHIVE_HPP +#define BOOST_ARCHIVE_XML_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include // size_t +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class xml_oarchive_impl : + public basic_text_oprimitive, + public basic_xml_oarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_oarchive; + friend class basic_xml_oarchive; + friend class save_access; +protected: +#endif + //void end_preamble(){ + // basic_xml_oarchive::end_preamble(); + //} + template + void save(const T & t){ + basic_text_oprimitive::save(t); + } + void + save(const version_type & t){ + save(static_cast(t)); + } + void + save(const boost::serialization::item_version_type & t){ + save(static_cast(t)); + } + BOOST_ARCHIVE_DECL(void) + save(const char * t); + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + BOOST_ARCHIVE_DECL(void) + save(const wchar_t * t); + #endif + BOOST_ARCHIVE_DECL(void) + save(const std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_ARCHIVE_DECL(void) + save(const std::wstring &ws); + #endif + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + xml_oarchive_impl(std::ostream & os, unsigned int flags); + ~xml_oarchive_impl(){} +public: + void save_binary(const void *address, std::size_t count){ + this->end_preamble(); + #if ! defined(__MWERKS__) + this->basic_text_oprimitive::save_binary( + #else + this->basic_text_oprimitive::save_binary( + #endif + address, + count + ); + this->indent_next = true; + } +}; + +// we use the following because we can't use +// typedef xml_oarchive_impl > xml_oarchive; + +// do not derive from this class. If you want to extend this functionality +// via inhertance, derived from xml_oarchive_impl instead. This will +// preserve correct static polymorphism. +class xml_oarchive : + public xml_oarchive_impl +{ +public: + xml_oarchive(std::ostream & os, unsigned int flags = 0) : + xml_oarchive_impl(os, flags) + {} + ~xml_oarchive(){} +}; + +typedef xml_oarchive naked_xml_oarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_oarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_XML_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_wiarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_wiarchive.hpp new file mode 100644 index 0000000000..09552cef76 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_wiarchive.hpp @@ -0,0 +1,171 @@ +#ifndef BOOST_ARCHIVE_XML_WIARCHIVE_HPP +#define BOOST_ARCHIVE_XML_WIARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_wiarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include + +//#include +#include +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class basic_xml_grammar; +typedef basic_xml_grammar xml_wgrammar; + +template +class xml_wiarchive_impl : + public basic_text_iprimitive, + public basic_xml_iarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_iarchive; + friend class basic_xml_iarchive; + friend class load_access; +protected: +#endif + // instances of micro xml parser to parse start preambles + // scoped_ptr doesn't play nice with borland - so use a naked pointer + // scoped_ptr gimpl; + xml_wgrammar *gimpl; + std::wistream & get_is(){ + return is; + } + template + void + load(T & t){ + basic_text_iprimitive::load(t); + } + void + load(version_type & t){ + unsigned int v; + load(v); + t = version_type(v); + } + void + load(boost::serialization::item_version_type & t){ + unsigned int v; + load(v); + t = boost::serialization::item_version_type(v); + } + BOOST_WARCHIVE_DECL(void) + load(char * t); + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + BOOST_WARCHIVE_DECL(void) + load(wchar_t * t); + #endif + BOOST_WARCHIVE_DECL(void) + load(std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_WARCHIVE_DECL(void) + load(std::wstring &ws); + #endif + template + void load_override(T & t, BOOST_PFTO int){ + basic_xml_iarchive::load_override(t, 0); + } + BOOST_WARCHIVE_DECL(void) + load_override(class_name_type & t, int); + BOOST_WARCHIVE_DECL(void) + init(); + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + ~xml_wiarchive_impl(); +}; + +// do not derive from the classes below. If you want to extend this functionality +// via inhertance, derived from xml_wiarchive_impl instead. This will +// preserve correct static polymorphism. + +// same as xml_wiarchive below - without the shared_ptr_helper +class naked_xml_wiarchive : + public xml_wiarchive_impl +{ +public: + naked_xml_wiarchive(std::wistream & is, unsigned int flags = 0) : + xml_wiarchive_impl(is, flags) + {} + ~naked_xml_wiarchive(){} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +#include // pops abi_suffix.hpp pragmas + +// note special treatment of shared_ptr. This type needs a special +// structure associated with every archive. We created a "mix-in" +// class to provide this functionality. Since shared_ptr holds a +// special esteem in the boost library - we included it here by default. +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class xml_wiarchive : + public xml_wiarchive_impl, + public detail::shared_ptr_helper +{ +public: + xml_wiarchive(std::wistream & is, unsigned int flags = 0) : + xml_wiarchive_impl(is, flags) + {} + ~xml_wiarchive(){} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_wiarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_XML_WIARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_woarchive.hpp b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_woarchive.hpp new file mode 100644 index 0000000000..08c0fdc6a4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/archive/xml_woarchive.hpp @@ -0,0 +1,140 @@ +#ifndef BOOST_ARCHIVE_XML_WOARCHIVE_HPP +#define BOOST_ARCHIVE_XML_WOARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_woarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include // size_t +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include + +#include +#include +#include +#include +#include + +#include // must be the last header + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +template +class xml_woarchive_impl : + public basic_text_oprimitive, + public basic_xml_oarchive +{ +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class detail::interface_oarchive; + friend class basic_xml_oarchive; + friend class save_access; +protected: +#endif + //void end_preamble(){ + // basic_xml_oarchive::end_preamble(); + //} + template + void + save(const T & t){ + basic_text_oprimitive::save(t); + } + void + save(const version_type & t){ + save(static_cast(t)); + } + void + save(const boost::serialization::item_version_type & t){ + save(static_cast(t)); + } + BOOST_WARCHIVE_DECL(void) + save(const char * t); + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + BOOST_WARCHIVE_DECL(void) + save(const wchar_t * t); + #endif + BOOST_WARCHIVE_DECL(void) + save(const std::string &s); + #ifndef BOOST_NO_STD_WSTRING + BOOST_WARCHIVE_DECL(void) + save(const std::wstring &ws); + #endif + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + xml_woarchive_impl(std::wostream & os, unsigned int flags); + ~xml_woarchive_impl(){} +public: + void + save_binary(const void *address, std::size_t count){ + this->end_preamble(); + #if ! defined(__MWERKS__) + this->basic_text_oprimitive::save_binary( + #else + this->basic_text_oprimitive::save_binary( + #endif + address, + count + ); + this->indent_next = true; + } +}; + +// we use the following because we can't use +// typedef xml_woarchive_impl > xml_woarchive; + +// do not derive from this class. If you want to extend this functionality +// via inhertance, derived from xml_woarchive_impl instead. This will +// preserve correct static polymorphism. +class xml_woarchive : + public xml_woarchive_impl +{ +public: + xml_woarchive(std::wostream & os, unsigned int flags = 0) : + xml_woarchive_impl(os, flags) + {} + ~xml_woarchive(){} +}; + +typedef xml_woarchive naked_xml_woarchive; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_woarchive) + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include // pops abi_suffix.hpp pragmas + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_XML_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/array.hpp b/deal.II/contrib/boost-1.45.0/include/boost/array.hpp new file mode 100644 index 0000000000..7df2771475 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/array.hpp @@ -0,0 +1,388 @@ +/* The following code declares class array, + * an STL container (as wrapper) for arrays of constant size. + * + * See + * http://www.boost.org/libs/array/ + * for documentation. + * + * The original author site is at: http://www.josuttis.com/ + * + * (C) Copyright Nicolai M. Josuttis 2001. + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. + * See or Trac issue #3168 + * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow) + * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow) + * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis) + * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries. + * 05 Aug 2001 - minor update (Nico Josuttis) + * 20 Jan 2001 - STLport fix (Beman Dawes) + * 29 Sep 2000 - Initial Revision (Nico Josuttis) + * + * Jan 29, 2004 + */ +#ifndef BOOST_ARRAY_HPP +#define BOOST_ARRAY_HPP + +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(push) +# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe +# pragma warning(disable:4510) // boost::array' : default constructor could not be generated +# pragma warning(disable:4610) // warning C4610: class 'boost::array' can never be instantiated - user defined constructor required +#endif + +#include +#include +#include +#include + +// Handles broken standard libraries better than +#include +#include +#include + +// FIXES for broken compilers +#include + + +namespace boost { + + template + class array { + public: + T elems[N]; // fixed-size array of elements of type T + + public: + // type definitions + typedef T value_type; + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // iterator support + iterator begin() { return elems; } + const_iterator begin() const { return elems; } + iterator end() { return elems+N; } + const_iterator end() const { return elems+N; } + + // reverse iterator support +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) + // workaround for broken reverse_iterator in VC7 + typedef std::reverse_iterator > reverse_iterator; + typedef std::reverse_iterator > const_reverse_iterator; +#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#else + // workaround for broken reverse_iterator implementations + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + + // operator[] + reference operator[](size_type i) + { + BOOST_ASSERT( i < N && "out of range" ); + return elems[i]; + } + + const_reference operator[](size_type i) const + { + BOOST_ASSERT( i < N && "out of range" ); + return elems[i]; + } + + // at() with range check + reference at(size_type i) { rangecheck(i); return elems[i]; } + const_reference at(size_type i) const { rangecheck(i); return elems[i]; } + + // front() and back() + reference front() + { + return elems[0]; + } + + const_reference front() const + { + return elems[0]; + } + + reference back() + { + return elems[N-1]; + } + + const_reference back() const + { + return elems[N-1]; + } + + // size is constant + static size_type size() { return N; } + static bool empty() { return false; } + static size_type max_size() { return N; } + enum { static_size = N }; + + // swap (note: linear complexity) + void swap (array& y) { + for (size_type i = 0; i < N; ++i) + boost::swap(elems[i],y.elems[i]); + } + + // direct access to data (read-only) + const T* data() const { return elems; } + T* data() { return elems; } + + // use array as C array (direct read/write access to data) + T* c_array() { return elems; } + + // assignment with type conversion + template + array& operator= (const array& rhs) { + std::copy(rhs.begin(),rhs.end(), begin()); + return *this; + } + + // assign one value to all elements + void assign (const T& value) { fill ( value ); } // A synonym for fill + void fill (const T& value) + { + std::fill_n(begin(),size(),value); + } + + // check range (may be private because it is static) + static void rangecheck (size_type i) { + if (i >= size()) { + std::out_of_range e("array<>: index out of range"); + boost::throw_exception(e); + } + } + + }; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + template< class T > + class array< T, 0 > { + + public: + // type definitions + typedef T value_type; + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // iterator support + iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } + const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } + iterator end() { return begin(); } + const_iterator end() const { return begin(); } + + // reverse iterator support +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) + // workaround for broken reverse_iterator in VC7 + typedef std::reverse_iterator > reverse_iterator; + typedef std::reverse_iterator > const_reverse_iterator; +#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#else + // workaround for broken reverse_iterator implementations + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + + // operator[] + reference operator[](size_type /*i*/) + { + return failed_rangecheck(); + } + + const_reference operator[](size_type /*i*/) const + { + return failed_rangecheck(); + } + + // at() with range check + reference at(size_type /*i*/) { return failed_rangecheck(); } + const_reference at(size_type /*i*/) const { return failed_rangecheck(); } + + // front() and back() + reference front() + { + return failed_rangecheck(); + } + + const_reference front() const + { + return failed_rangecheck(); + } + + reference back() + { + return failed_rangecheck(); + } + + const_reference back() const + { + return failed_rangecheck(); + } + + // size is constant + static size_type size() { return 0; } + static bool empty() { return true; } + static size_type max_size() { return 0; } + enum { static_size = 0 }; + + void swap (array& /*y*/) { + } + + // direct access to data (read-only) + const T* data() const { return 0; } + T* data() { return 0; } + + // use array as C array (direct read/write access to data) + T* c_array() { return 0; } + + // assignment with type conversion + template + array& operator= (const array& ) { + return *this; + } + + // assign one value to all elements + void assign (const T& value) { fill ( value ); } + void fill (const T& ) {} + + // check range (may be private because it is static) + static reference failed_rangecheck () { + std::out_of_range e("attempt to access element of an empty array"); + boost::throw_exception(e); +#if defined(BOOST_NO_EXCEPTIONS) || !defined(BOOST_MSVC) + // + // We need to return something here to keep + // some compilers happy: however we will never + // actually get here.... + // + static T placeholder; + return placeholder; +#endif + } + }; +#endif + + // comparisons + template + bool operator== (const array& x, const array& y) { + return std::equal(x.begin(), x.end(), y.begin()); + } + template + bool operator< (const array& x, const array& y) { + return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()); + } + template + bool operator!= (const array& x, const array& y) { + return !(x==y); + } + template + bool operator> (const array& x, const array& y) { + return y + bool operator<= (const array& x, const array& y) { + return !(y + bool operator>= (const array& x, const array& y) { + return !(x + inline void swap (array& x, array& y) { + x.swap(y); + } + + // Specific for boost::array: simply returns its elems data member. + template + T(&get_c_array(boost::array& arg))[N] + { + return arg.elems; + } + + // Const version. + template + const T(&get_c_array(const boost::array& arg))[N] + { + return arg.elems; + } + +#if 0 + // Overload for std::array, assuming that std::array will have + // explicit conversion functions as discussed at the WG21 meeting + // in Summit, March 2009. + template + T(&get_c_array(std::array& arg))[N] + { + return static_cast(arg); + } + + // Const version. + template + const T(&get_c_array(const std::array& arg))[N] + { + return static_cast(arg); + } +#endif + +} /* namespace boost */ + + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(pop) +#endif + +#endif /*BOOST_ARRAY_HPP*/ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/asio.hpp b/deal.II/contrib/boost-1.45.0/include/boost/asio.hpp new file mode 100644 index 0000000000..f94e0d657b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/asio.hpp @@ -0,0 +1,100 @@ +// +// asio.hpp +// ~~~~~~~~ +// +// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See www.boost.org/libs/asio for documentation. +// + +#ifndef BOOST_ASIO_HPP +#define BOOST_ASIO_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_ASIO_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/assert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/assert.hpp new file mode 100644 index 0000000000..c227f17b9e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/assert.hpp @@ -0,0 +1,50 @@ +// +// boost/assert.hpp - BOOST_ASSERT(expr) +// +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2007 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Note: There are no include guards. This is intentional. +// +// See http://www.boost.org/libs/utility/assert.html for documentation. +// + +#undef BOOST_ASSERT + +#if defined(BOOST_DISABLE_ASSERTS) + +# define BOOST_ASSERT(expr) ((void)0) + +#elif defined(BOOST_ENABLE_ASSERT_HANDLER) + +#include + +namespace boost +{ + +void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined + +} // namespace boost + +#define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) + +#else +# include // .h to support old libraries w/o - effect is the same +# define BOOST_ASSERT(expr) assert(expr) +#endif + +#undef BOOST_VERIFY + +#if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) + +# define BOOST_VERIFY(expr) ((void)(expr)) + +#else + +# define BOOST_VERIFY(expr) BOOST_ASSERT(expr) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/assign.hpp b/deal.II/contrib/boost-1.45.0/include/boost/assign.hpp new file mode 100644 index 0000000000..d74a56601c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/assign.hpp @@ -0,0 +1,24 @@ +// Boost.Assign library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/assign/ +// + + +#ifndef BOOST_ASSIGN_HPP +#define BOOST_ASSIGN_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bimap.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bimap.hpp new file mode 100644 index 0000000000..51d726dd32 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bimap.hpp @@ -0,0 +1,19 @@ +// Boost.Bimap +// +// Copyright (c) 2006-2007 Matias Capeletto +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/bimap for documentation. + +// Convenience header + +#include + +namespace boost +{ + using ::boost::bimaps::bimap; +} + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind.hpp new file mode 100644 index 0000000000..fd3421ea5a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind.hpp @@ -0,0 +1,24 @@ +#ifndef BOOST_BIND_HPP_INCLUDED +#define BOOST_BIND_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind.hpp - binds function objects to arguments +// +// Copyright (c) 2009 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include + +#endif // #ifndef BOOST_BIND_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/apply.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/apply.hpp new file mode 100644 index 0000000000..6a43a89ac8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/apply.hpp @@ -0,0 +1,74 @@ +#ifndef BOOST_BIND_APPLY_HPP_INCLUDED +#define BOOST_BIND_APPLY_HPP_INCLUDED + +// +// apply.hpp +// +// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +namespace boost +{ + +template struct apply +{ + typedef R result_type; + + template result_type operator()(F & f) const + { + return f(); + } + + template result_type operator()(F & f, A1 & a1) const + { + return f(a1); + } + + template result_type operator()(F & f, A1 & a1, A2 & a2) const + { + return f(a1, a2); + } + + template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3) const + { + return f(a1, a2, a3); + } + + template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4) const + { + return f(a1, a2, a3, a4); + } + + template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const + { + return f(a1, a2, a3, a4, a5); + } + + template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const + { + return f(a1, a2, a3, a4, a5, a6); + } + + template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const + { + return f(a1, a2, a3, a4, a5, a6, a7); + } + + template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const + { + return f(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const + { + return f(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } +}; + +} // namespace boost + +#endif // #ifndef BOOST_BIND_APPLY_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/arg.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/arg.hpp new file mode 100644 index 0000000000..0d5cd03a74 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/arg.hpp @@ -0,0 +1,62 @@ +#ifndef BOOST_BIND_ARG_HPP_INCLUDED +#define BOOST_BIND_ARG_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind/arg.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include +#include + +namespace boost +{ + +template< int I > struct arg +{ + arg() + { + } + + template< class T > arg( T const & /* t */ ) + { + // static assert I == is_placeholder::value + typedef char T_must_be_placeholder[ I == is_placeholder::value? 1: -1 ]; + } +}; + +template< int I > bool operator==( arg const &, arg const & ) +{ + return true; +} + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< int I > struct is_placeholder< arg > +{ + enum _vt { value = I }; +}; + +template< int I > struct is_placeholder< arg (*) () > +{ + enum _vt { value = I }; +}; + +#endif + +} // namespace boost + +#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/bind.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind.hpp new file mode 100644 index 0000000000..a63d2a026b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind.hpp @@ -0,0 +1,1751 @@ +#ifndef BOOST_BIND_BIND_HPP_INCLUDED +#define BOOST_BIND_BIND_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind.hpp - binds function objects to arguments +// +// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2001 David Abrahams +// Copyright (c) 2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include +#include +#include +#include +#include +#include +#include +#include + +// Borland-specific bug, visit_each() silently fails to produce code + +#if defined(__BORLANDC__) +# define BOOST_BIND_VISIT_EACH boost::visit_each +#else +# define BOOST_BIND_VISIT_EACH visit_each +#endif + +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated +#endif + +namespace boost +{ + +template class weak_ptr; + +namespace _bi // implementation details +{ + +// result_traits + +template struct result_traits +{ + typedef R type; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + +struct unspecified {}; + +template struct result_traits +{ + typedef typename F::result_type type; +}; + +template struct result_traits< unspecified, reference_wrapper > +{ + typedef typename F::result_type type; +}; + +#endif + +// ref_compare + +template bool ref_compare( T const & a, T const & b, long ) +{ + return a == b; +} + +template bool ref_compare( arg const &, arg const &, int ) +{ + return true; +} + +template bool ref_compare( arg (*) (), arg (*) (), int ) +{ + return true; +} + +template bool ref_compare( reference_wrapper const & a, reference_wrapper const & b, int ) +{ + return a.get_pointer() == b.get_pointer(); +} + +// bind_t forward declaration for listN + +template class bind_t; + +template bool ref_compare( bind_t const & a, bind_t const & b, int ) +{ + return a.compare( b ); +} + +// value + +template class value +{ +public: + + value(T const & t): t_(t) {} + + T & get() { return t_; } + T const & get() const { return t_; } + + bool operator==(value const & rhs) const + { + return t_ == rhs.t_; + } + +private: + + T t_; +}; + +// ref_compare for weak_ptr + +template bool ref_compare( value< weak_ptr > const & a, value< weak_ptr > const & b, int ) +{ + return !(a.get() < b.get()) && !(b.get() < a.get()); +} + +// type + +template class type {}; + +// unwrap + +template struct unwrapper +{ + static inline F & unwrap( F & f, long ) + { + return f; + } + + template static inline F2 & unwrap( reference_wrapper rf, int ) + { + return rf.get(); + } + + template static inline _mfi::dm unwrap( R T::* pm, int ) + { + return _mfi::dm( pm ); + } +}; + +// listN + +class list0 +{ +public: + + list0() {} + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A &, long) + { + return unwrapper::unwrap(f, 0)(); + } + + template R operator()(type, F const & f, A &, long) const + { + return unwrapper::unwrap(f, 0)(); + } + + template void operator()(type, F & f, A &, int) + { + unwrapper::unwrap(f, 0)(); + } + + template void operator()(type, F const & f, A &, int) const + { + unwrapper::unwrap(f, 0)(); + } + + template void accept(V &) const + { + } + + bool operator==(list0 const &) const + { + return true; + } +}; + +#ifdef BOOST_MSVC +// MSVC is bright enough to realise that the parameter rhs +// in operator==may be unused for some template argument types: +#pragma warning(push) +#pragma warning(disable:4100) +#endif + +template< class A1 > class list1: private storage1< A1 > +{ +private: + + typedef storage1< A1 > base_type; + +public: + + explicit list1( A1 a1 ): base_type( a1 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + + template T & operator[] ( _bi::value & v ) const { return v.get(); } + + template T const & operator[] ( _bi::value const & v ) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list1 const & rhs) const + { + return ref_compare(base_type::a1_, rhs.a1_, 0); + } +}; + +struct logical_and; +struct logical_or; + +template< class A1, class A2 > class list2: private storage2< A1, A2 > +{ +private: + + typedef storage2< A1, A2 > base_type; + +public: + + list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template bool operator()( type, logical_and & /*f*/, A & a, int ) + { + return a[ base_type::a1_ ] && a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_and const & /*f*/, A & a, int ) const + { + return a[ base_type::a1_ ] && a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_or & /*f*/, A & a, int ) + { + return a[ base_type::a1_ ] || a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_or const & /*f*/, A & a, int ) const + { + return a[ base_type::a1_ ] || a[ base_type::a2_ ]; + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list2 const & rhs) const + { + return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); + } +}; + +template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > +{ +private: + + typedef storage3< A1, A2, A3 > base_type; + +public: + + list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list3 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > +{ +private: + + typedef storage4< A1, A2, A3, A4 > base_type; + +public: + + list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list4 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > +{ +private: + + typedef storage5< A1, A2, A3, A4, A5 > base_type; + +public: + + list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list5 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ); + } +}; + +template class list6: private storage6< A1, A2, A3, A4, A5, A6 > +{ +private: + + typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; + +public: + + list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list6 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ); + } +}; + +template class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > +{ +private: + + typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; + +public: + + list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list7 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ +private: + + typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; + +public: + + list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A8 operator[] (boost::arg<8>) const { return base_type::a8_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list8 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ) && + ref_compare( base_type::a8_, rhs.a8_, 0 ); + } +}; + +template class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > +{ +private: + + typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; + +public: + + list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A8 operator[] (boost::arg<8>) const { return base_type::a8_; } + A9 operator[] (boost::arg<9>) const { return base_type::a9_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } + A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list9 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ) && + ref_compare( base_type::a8_, rhs.a8_, 0 ) && + ref_compare( base_type::a9_, rhs.a9_, 0 ); + } +}; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// bind_t + +#ifndef BOOST_NO_VOID_RETURNS + +template class bind_t +{ +public: + + typedef bind_t this_type; + + bind_t(F f, L const & l): f_(f), l_(l) {} + +#define BOOST_BIND_RETURN return +#include +#undef BOOST_BIND_RETURN + +}; + +#else + +template struct bind_t_generator +{ + +template class implementation +{ +public: + + typedef implementation this_type; + + implementation(F f, L const & l): f_(f), l_(l) {} + +#define BOOST_BIND_RETURN return +#include +#undef BOOST_BIND_RETURN + +}; + +}; + +template<> struct bind_t_generator +{ + +template class implementation +{ +private: + + typedef void R; + +public: + + typedef implementation this_type; + + implementation(F f, L const & l): f_(f), l_(l) {} + +#define BOOST_BIND_RETURN +#include +#undef BOOST_BIND_RETURN + +}; + +}; + +template class bind_t: public bind_t_generator::BOOST_NESTED_TEMPLATE implementation +{ +public: + + bind_t(F f, L const & l): bind_t_generator::BOOST_NESTED_TEMPLATE implementation(f, l) {} + +}; + +#endif + +// function_equal + +#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP + +// put overloads in _bi, rely on ADL + +# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template bool function_equal( bind_t const & a, bind_t const & b ) +{ + return a.compare(b); +} + +# else + +template bool function_equal_impl( bind_t const & a, bind_t const & b, int ) +{ + return a.compare(b); +} + +# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +#else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP + +// put overloads in boost + +} // namespace _bi + +# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template bool function_equal( _bi::bind_t const & a, _bi::bind_t const & b ) +{ + return a.compare(b); +} + +# else + +template bool function_equal_impl( _bi::bind_t const & a, _bi::bind_t const & b, int ) +{ + return a.compare(b); +} + +# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +namespace _bi +{ + +#endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP + +// add_value + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530) + +#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x582) ) + +template struct add_value +{ + typedef _bi::value type; +}; + +#else + +template< class T, int I > struct add_value_2 +{ + typedef boost::arg type; +}; + +template< class T > struct add_value_2< T, 0 > +{ + typedef _bi::value< T > type; +}; + +template struct add_value +{ + typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; +}; + +#endif + +template struct add_value< value > +{ + typedef _bi::value type; +}; + +template struct add_value< reference_wrapper > +{ + typedef reference_wrapper type; +}; + +template struct add_value< arg > +{ + typedef boost::arg type; +}; + +template struct add_value< arg (*) () > +{ + typedef boost::arg (*type) (); +}; + +template struct add_value< bind_t > +{ + typedef bind_t type; +}; + +#else + +template struct _avt_0; + +template<> struct _avt_0<1> +{ + template struct inner + { + typedef T type; + }; +}; + +template<> struct _avt_0<2> +{ + template struct inner + { + typedef value type; + }; +}; + +typedef char (&_avt_r1) [1]; +typedef char (&_avt_r2) [2]; + +template _avt_r1 _avt_f(value); +template _avt_r1 _avt_f(reference_wrapper); +template _avt_r1 _avt_f(arg); +template _avt_r1 _avt_f(arg (*) ()); +template _avt_r1 _avt_f(bind_t); + +_avt_r2 _avt_f(...); + +template struct add_value +{ + static T t(); + typedef typename _avt_0::template inner::type type; +}; + +#endif + +// list_av_N + +template struct list_av_1 +{ + typedef typename add_value::type B1; + typedef list1 type; +}; + +template struct list_av_2 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef list2 type; +}; + +template struct list_av_3 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef list3 type; +}; + +template struct list_av_4 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef list4 type; +}; + +template struct list_av_5 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef list5 type; +}; + +template struct list_av_6 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef list6 type; +}; + +template struct list_av_7 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef list7 type; +}; + +template struct list_av_8 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef typename add_value::type B8; + typedef list8 type; +}; + +template struct list_av_9 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef typename add_value::type B8; + typedef typename add_value::type B9; + typedef list9 type; +}; + +// operator! + +struct logical_not +{ + template bool operator()(V const & v) const { return !v; } +}; + +template + bind_t< bool, logical_not, list1< bind_t > > + operator! (bind_t const & f) +{ + typedef list1< bind_t > list_type; + return bind_t ( logical_not(), list_type(f) ); +} + +// relational operators + +#define BOOST_BIND_OPERATOR( op, name ) \ +\ +struct name \ +{ \ + template bool operator()(V const & v, W const & w) const { return v op w; } \ +}; \ + \ +template \ + bind_t< bool, name, list2< bind_t, typename add_value::type > > \ + operator op (bind_t const & f, A2 a2) \ +{ \ + typedef typename add_value::type B2; \ + typedef list2< bind_t, B2> list_type; \ + return bind_t ( name(), list_type(f, a2) ); \ +} + +BOOST_BIND_OPERATOR( ==, equal ) +BOOST_BIND_OPERATOR( !=, not_equal ) + +BOOST_BIND_OPERATOR( <, less ) +BOOST_BIND_OPERATOR( <=, less_equal ) + +BOOST_BIND_OPERATOR( >, greater ) +BOOST_BIND_OPERATOR( >=, greater_equal ) + +BOOST_BIND_OPERATOR( &&, logical_and ) +BOOST_BIND_OPERATOR( ||, logical_or ) + +#undef BOOST_BIND_OPERATOR + +#if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) + +// resolve ambiguity with rel_ops + +#define BOOST_BIND_OPERATOR( op, name ) \ +\ +template \ + bind_t< bool, name, list2< bind_t, bind_t > > \ + operator op (bind_t const & f, bind_t const & g) \ +{ \ + typedef list2< bind_t, bind_t > list_type; \ + return bind_t ( name(), list_type(f, g) ); \ +} + +BOOST_BIND_OPERATOR( !=, not_equal ) +BOOST_BIND_OPERATOR( <=, less_equal ) +BOOST_BIND_OPERATOR( >, greater ) +BOOST_BIND_OPERATOR( >=, greater_equal ) + +#endif + +// visit_each, ADL + +#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \ + && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) + +template void visit_each( V & v, value const & t, int ) +{ + using boost::visit_each; + BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); +} + +template void visit_each( V & v, bind_t const & t, int ) +{ + t.accept( v ); +} + +#endif + +} // namespace _bi + +// visit_each, no ADL + +#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \ + || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) + +template void visit_each( V & v, _bi::value const & t, int ) +{ + BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); +} + +template void visit_each( V & v, _bi::bind_t const & t, int ) +{ + t.accept( v ); +} + +#endif + +// is_bind_expression + +template< class T > struct is_bind_expression +{ + enum _vt { value = 0 }; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > +{ + enum _vt { value = 1 }; +}; + +#endif + +// bind + +#ifndef BOOST_BIND +#define BOOST_BIND bind +#endif + +// generic function objects + +template + _bi::bind_t + BOOST_BIND(F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +// generic function objects, alternative syntax + +template + _bi::bind_t + BOOST_BIND(boost::type, F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + +// adaptable function objects + +template + _bi::bind_t<_bi::unspecified, F, _bi::list0> + BOOST_BIND(F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> + BOOST_BIND(F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> + BOOST_BIND(F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> + BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + +// function pointers + +#define BOOST_BIND_CC +#define BOOST_BIND_ST + +#include + +#undef BOOST_BIND_CC +#undef BOOST_BIND_ST + +#ifdef BOOST_BIND_ENABLE_STDCALL + +#define BOOST_BIND_CC __stdcall +#define BOOST_BIND_ST + +#include + +#undef BOOST_BIND_CC +#undef BOOST_BIND_ST + +#endif + +#ifdef BOOST_BIND_ENABLE_FASTCALL + +#define BOOST_BIND_CC __fastcall +#define BOOST_BIND_ST + +#include + +#undef BOOST_BIND_CC +#undef BOOST_BIND_ST + +#endif + +#ifdef BOOST_BIND_ENABLE_PASCAL + +#define BOOST_BIND_ST pascal +#define BOOST_BIND_CC + +#include + +#undef BOOST_BIND_ST +#undef BOOST_BIND_CC + +#endif + +// member function pointers + +#define BOOST_BIND_MF_NAME(X) X +#define BOOST_BIND_MF_CC + +#include +#include + +#undef BOOST_BIND_MF_NAME +#undef BOOST_BIND_MF_CC + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_BIND_MF_NAME(X) X##_cdecl +#define BOOST_BIND_MF_CC __cdecl + +#include +#include + +#undef BOOST_BIND_MF_NAME +#undef BOOST_BIND_MF_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_BIND_MF_NAME(X) X##_stdcall +#define BOOST_BIND_MF_CC __stdcall + +#include +#include + +#undef BOOST_BIND_MF_NAME +#undef BOOST_BIND_MF_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_BIND_MF_NAME(X) X##_fastcall +#define BOOST_BIND_MF_CC __fastcall + +#include +#include + +#undef BOOST_BIND_MF_NAME +#undef BOOST_BIND_MF_CC + +#endif + +// data member pointers + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x620 ) ) ) + +template +_bi::bind_t< R, _mfi::dm, typename _bi::list_av_1::type > + BOOST_BIND(R T::*f, A1 a1) +{ + typedef _mfi::dm F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t( F(f), list_type(a1) ); +} + +#else + +namespace _bi +{ + +template< class Pm, int I > struct add_cref; + +template< class M, class T > struct add_cref< M T::*, 0 > +{ + typedef M type; +}; + +template< class M, class T > struct add_cref< M T::*, 1 > +{ +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4180) +#endif + typedef M const & type; +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +}; + +template< class R, class T > struct add_cref< R (T::*) (), 1 > +{ + typedef void type; +}; + +#if !( defined(__IBMCPP__) && BOOST_WORKAROUND( __IBMCPP__, BOOST_TESTED_AT(600) ) ) + +template< class R, class T > struct add_cref< R (T::*) () const, 1 > +{ + typedef void type; +}; + +#endif // __IBMCPP__ + +template struct isref +{ + enum value_type { value = 0 }; +}; + +template struct isref< R& > +{ + enum value_type { value = 1 }; +}; + +template struct isref< R* > +{ + enum value_type { value = 1 }; +}; + +template struct dm_result +{ + typedef typename add_cref< Pm, 1 >::type type; +}; + +template struct dm_result< Pm, bind_t > +{ + typedef typename bind_t::result_type result_type; + typedef typename add_cref< Pm, isref< result_type >::value >::type type; +}; + +} // namespace _bi + +template< class A1, class M, class T > + +_bi::bind_t< + typename _bi::dm_result< M T::*, A1 >::type, + _mfi::dm, + typename _bi::list_av_1::type +> + +BOOST_BIND( M T::*f, A1 a1 ) +{ + typedef typename _bi::dm_result< M T::*, A1 >::type result_type; + typedef _mfi::dm F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); +} + +#endif + +} // namespace boost + +#ifndef BOOST_BIND_NO_PLACEHOLDERS + +# include + +#endif + +#ifdef BOOST_MSVC +# pragma warning(default: 4512) // assignment operator could not be generated +# pragma warning(pop) +#endif + +#endif // #ifndef BOOST_BIND_BIND_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_cc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_cc.hpp new file mode 100644 index 0000000000..35f8eceb9e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_cc.hpp @@ -0,0 +1,117 @@ +// +// bind/bind_cc.hpp - support for different calling conventions +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +template + _bi::bind_t + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ()) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (); + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1); + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2); + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3); + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4); + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5); + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6); + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7); + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8); + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_mf2_cc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_mf2_cc.hpp new file mode 100644 index 0000000000..66476bc19d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_mf2_cc.hpp @@ -0,0 +1,228 @@ +// +// bind/bind_mf2_cc.hpp - member functions, type<> syntax +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +// 0 + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (), A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +// 1 + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +// 2 + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +// 3 + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +// 4 + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +// 5 + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +// 6 + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +// 7 + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +// 8 + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_mf_cc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_mf_cc.hpp new file mode 100644 index 0000000000..88be8222f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_mf_cc.hpp @@ -0,0 +1,227 @@ +// +// bind/bind_mf_cc.hpp - support for different calling conventions +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +// 0 + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +// 1 + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +// 2 + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +// 3 + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +// 4 + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +// 5 + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +// 6 + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +// 7 + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +// 8 + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_template.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_template.hpp new file mode 100644 index 0000000000..411d20c74e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/bind_template.hpp @@ -0,0 +1,345 @@ +// +// bind/bind_template.hpp +// +// Do not include this header directly. +// +// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + + typedef typename result_traits::type result_type; + + result_type operator()() + { + list0 a; + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + result_type operator()() const + { + list0 a; + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1) + { + list1 a(a1); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1) const + { + list1 a(a1); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1) + { + list1 a(a1); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1) const + { + list1 a(a1); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2) + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2) const + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 & a2) + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 & a2) const + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + + template result_type operator()(A1 & a1, A2 const & a2) + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 const & a2) const + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + + template result_type operator()(A1 const & a1, A2 const & a2) + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2) const + { + list2 a(a1, a2); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) + { + list3 a(a1, a2, a3); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const + { + list3 a(a1, a2, a3); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) + { + list3 a(a1, a2, a3); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const + { + list3 a(a1, a2, a3); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) + { + list4 a(a1, a2, a3, a4); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const + { + list4 a(a1, a2, a3, a4); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) + { + list4 a(a1, a2, a3, a4); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const + { + list4 a(a1, a2, a3, a4); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) + { + list5 a(a1, a2, a3, a4, a5); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const + { + list5 a(a1, a2, a3, a4, a5); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) + { + list5 a(a1, a2, a3, a4, a5); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const + { + list5 a(a1, a2, a3, a4, a5); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) + { + list6 a(a1, a2, a3, a4, a5, a6); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const + { + list6 a(a1, a2, a3, a4, a5, a6); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) + { + list6 a(a1, a2, a3, a4, a5, a6); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const + { + list6 a(a1, a2, a3, a4, a5, a6); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + +#endif + + template result_type eval(A & a) + { + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template result_type eval(A & a) const + { + BOOST_BIND_RETURN l_(type(), f_, a, 0); + } + + template void accept(V & v) const + { +#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) + + using boost::visit_each; + +#endif + BOOST_BIND_VISIT_EACH(v, f_, 0); + l_.accept(v); + } + + bool compare(this_type const & rhs) const + { + return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_; + } + +private: + + F f_; + L l_; diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/make_adaptable.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/make_adaptable.hpp new file mode 100644 index 0000000000..b9f083e307 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/make_adaptable.hpp @@ -0,0 +1,187 @@ +#ifndef BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED +#define BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED + +// +// make_adaptable.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +namespace boost +{ + +namespace _bi +{ + +template class af0 +{ +public: + + typedef R result_type; + + explicit af0(F f): f_(f) + { + } + + result_type operator()() + { + return f_(); + } + + result_type operator()() const + { + return f_(); + } + +private: + + F f_; +}; + +template class af1 +{ +public: + + typedef R result_type; + typedef A1 argument_type; + typedef A1 arg1_type; + + explicit af1(F f): f_(f) + { + } + + result_type operator()(A1 a1) + { + return f_(a1); + } + + result_type operator()(A1 a1) const + { + return f_(a1); + } + +private: + + F f_; +}; + +template class af2 +{ +public: + + typedef R result_type; + typedef A1 first_argument_type; + typedef A2 second_argument_type; + typedef A1 arg1_type; + typedef A2 arg2_type; + + explicit af2(F f): f_(f) + { + } + + result_type operator()(A1 a1, A2 a2) + { + return f_(a1, a2); + } + + result_type operator()(A1 a1, A2 a2) const + { + return f_(a1, a2); + } + +private: + + F f_; +}; + +template class af3 +{ +public: + + typedef R result_type; + typedef A1 arg1_type; + typedef A2 arg2_type; + typedef A3 arg3_type; + + explicit af3(F f): f_(f) + { + } + + result_type operator()(A1 a1, A2 a2, A3 a3) + { + return f_(a1, a2, a3); + } + + result_type operator()(A1 a1, A2 a2, A3 a3) const + { + return f_(a1, a2, a3); + } + +private: + + F f_; +}; + +template class af4 +{ +public: + + typedef R result_type; + typedef A1 arg1_type; + typedef A2 arg2_type; + typedef A3 arg3_type; + typedef A4 arg4_type; + + explicit af4(F f): f_(f) + { + } + + result_type operator()(A1 a1, A2 a2, A3 a3, A4 a4) + { + return f_(a1, a2, a3, a4); + } + + result_type operator()(A1 a1, A2 a2, A3 a3, A4 a4) const + { + return f_(a1, a2, a3, a4); + } + +private: + + F f_; +}; + +} // namespace _bi + +template _bi::af0 make_adaptable(F f) +{ + return _bi::af0(f); +} + +template _bi::af1 make_adaptable(F f) +{ + return _bi::af1(f); +} + +template _bi::af2 make_adaptable(F f) +{ + return _bi::af2(f); +} + +template _bi::af3 make_adaptable(F f) +{ + return _bi::af3(f); +} + +template _bi::af4 make_adaptable(F f) +{ + return _bi::af4(f); +} + +} // namespace boost + +#endif // #ifndef BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn.hpp new file mode 100644 index 0000000000..956e7d8885 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn.hpp @@ -0,0 +1,389 @@ +#ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED +#define BOOST_BIND_MEM_FN_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// mem_fn.hpp - a generalization of std::mem_fun[_ref] +// +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2001 David Abrahams +// Copyright (c) 2003-2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +#include +#include +#include + +namespace boost +{ + +#if defined(BOOST_NO_VOID_RETURNS) + +#define BOOST_MEM_FN_CLASS_F , class F +#define BOOST_MEM_FN_TYPEDEF(X) + +namespace _mfi // mem_fun_impl +{ + +template struct mf +{ + +#define BOOST_MEM_FN_RETURN return + +#define BOOST_MEM_FN_NAME(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +}; // struct mf + +template<> struct mf +{ + +#define BOOST_MEM_FN_RETURN + +#define BOOST_MEM_FN_NAME(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +}; // struct mf + +#undef BOOST_MEM_FN_CLASS_F +#undef BOOST_MEM_FN_TYPEDEF_F + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_NAME2(X) inner_##X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_NAME2(X) inner_##X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_NAME2(X) inner_##X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_NAME2(X) inner_##X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_NAME2 +#undef BOOST_MEM_FN_CC + +#endif + +} // namespace _mfi + +#else // #ifdef BOOST_NO_VOID_RETURNS + +#define BOOST_MEM_FN_CLASS_F +#define BOOST_MEM_FN_TYPEDEF(X) typedef X; + +namespace _mfi +{ + +#define BOOST_MEM_FN_RETURN return + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_CC +#undef BOOST_MEM_FN_NAME + +#endif + +#undef BOOST_MEM_FN_RETURN + +} // namespace _mfi + +#undef BOOST_MEM_FN_CLASS_F +#undef BOOST_MEM_FN_TYPEDEF + +#endif // #ifdef BOOST_NO_VOID_RETURNS + +#define BOOST_MEM_FN_NAME(X) X +#define BOOST_MEM_FN_CC + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#ifdef BOOST_MEM_FN_ENABLE_CDECL + +#define BOOST_MEM_FN_NAME(X) X##_cdecl +#define BOOST_MEM_FN_CC __cdecl + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_STDCALL + +#define BOOST_MEM_FN_NAME(X) X##_stdcall +#define BOOST_MEM_FN_CC __stdcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +#ifdef BOOST_MEM_FN_ENABLE_FASTCALL + +#define BOOST_MEM_FN_NAME(X) X##_fastcall +#define BOOST_MEM_FN_CC __fastcall + +#include + +#undef BOOST_MEM_FN_NAME +#undef BOOST_MEM_FN_CC + +#endif + +// data member support + +namespace _mfi +{ + +template class dm +{ +public: + + typedef R const & result_type; + typedef T const * argument_type; + +private: + + typedef R (T::*F); + F f_; + + template R const & call(U & u, T const *) const + { + return (u.*f_); + } + + template R const & call(U & u, void const *) const + { + return (get_pointer(u)->*f_); + } + +public: + + explicit dm(F f): f_(f) {} + + R & operator()(T * p) const + { + return (p->*f_); + } + + R const & operator()(T const * p) const + { + return (p->*f_); + } + + template R const & operator()(U const & u) const + { + return call(u, &u); + } + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, < 0x3200) + + R & operator()(T & t) const + { + return (t.*f_); + } + + R const & operator()(T const & t) const + { + return (t.*f_); + } + +#endif + + bool operator==(dm const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(dm const & rhs) const + { + return f_ != rhs.f_; + } +}; + +} // namespace _mfi + +template _mfi::dm mem_fn(R T::*f) +{ + return _mfi::dm(f); +} + +} // namespace boost + +#endif // #ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_cc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_cc.hpp new file mode 100644 index 0000000000..8b6ea0ba13 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_cc.hpp @@ -0,0 +1,103 @@ +// +// bind/mem_fn_cc.hpp - support for different calling conventions +// +// Do not include this header directly. +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +template _mfi::BOOST_MEM_FN_NAME(mf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) ()) +{ + return _mfi::BOOST_MEM_FN_NAME(mf0)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) () const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf0)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf1)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf1)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf2)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf2)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf3)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf3)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf4)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf4)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf5)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf5)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf6)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf6)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf7)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf7)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(mf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) +{ + return _mfi::BOOST_MEM_FN_NAME(mf8)(f); +} + +template _mfi::BOOST_MEM_FN_NAME(cmf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const) +{ + return _mfi::BOOST_MEM_FN_NAME(cmf8)(f); +} diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_template.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_template.hpp new file mode 100644 index 0000000000..b26d585dbc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_template.hpp @@ -0,0 +1,1047 @@ +// +// bind/mem_fn_template.hpp +// +// Do not include this header directly +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) +# define BOOST_MEM_FN_ENABLE_CONST_OVERLOADS +#endif + +// mf0 + +template class BOOST_MEM_FN_NAME(mf0) +{ +public: + + typedef R result_type; + typedef T * argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) ()) + F f_; + + template R call(U & u, T const *) const + { + BOOST_MEM_FN_RETURN (u.*f_)(); + } + + template R call(U & u, void const *) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf0)(F f): f_(f) {} + + R operator()(T * p) const + { + BOOST_MEM_FN_RETURN (p->*f_)(); + } + + template R operator()(U & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + +#endif + + R operator()(T & t) const + { + BOOST_MEM_FN_RETURN (t.*f_)(); + } + + bool operator==(BOOST_MEM_FN_NAME(mf0) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf0) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf0 + +template class BOOST_MEM_FN_NAME(cmf0) +{ +public: + + typedef R result_type; + typedef T const * argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) () const) + F f_; + + template R call(U & u, T const *) const + { + BOOST_MEM_FN_RETURN (u.*f_)(); + } + + template R call(U & u, void const *) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {} + + template R operator()(U const & u) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p); + } + + R operator()(T const & t) const + { + BOOST_MEM_FN_RETURN (t.*f_)(); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf0) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf0) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf1 + +template class BOOST_MEM_FN_NAME(mf1) +{ +public: + + typedef R result_type; + typedef T * first_argument_type; + typedef A1 second_argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1)) + F f_; + + template R call(U & u, T const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1); + } + + template R call(U & u, void const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf1)(F f): f_(f) {} + + R operator()(T * p, A1 a1) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1); + } + + template R operator()(U & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + +#endif + + R operator()(T & t, A1 a1) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1); + } + + bool operator==(BOOST_MEM_FN_NAME(mf1) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf1) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf1 + +template class BOOST_MEM_FN_NAME(cmf1) +{ +public: + + typedef R result_type; + typedef T const * first_argument_type; + typedef A1 second_argument_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1) const) + F f_; + + template R call(U & u, T const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1); + } + + template R call(U & u, void const *, B1 & b1) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1); + } + + R operator()(T const & t, A1 a1) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf1) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf1) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf2 + +template class BOOST_MEM_FN_NAME(mf2) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf2)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2); + } + + template R operator()(U & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); + } + + bool operator==(BOOST_MEM_FN_NAME(mf2) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf2) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf2 + +template class BOOST_MEM_FN_NAME(cmf2) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2); + } + + R operator()(T const & t, A1 a1, A2 a2) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf2) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf2) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf3 + +template class BOOST_MEM_FN_NAME(mf3) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf3)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); + } + + bool operator==(BOOST_MEM_FN_NAME(mf3) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf3) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf3 + +template class BOOST_MEM_FN_NAME(cmf3) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf3) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf3) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf4 + +template class BOOST_MEM_FN_NAME(mf4) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf4)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); + } + + bool operator==(BOOST_MEM_FN_NAME(mf4) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf4) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf4 + +template class BOOST_MEM_FN_NAME(cmf4) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf4) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf4) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf5 + +template class BOOST_MEM_FN_NAME(mf5) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf5)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); + } + + bool operator==(BOOST_MEM_FN_NAME(mf5) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf5) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf5 + +template class BOOST_MEM_FN_NAME(cmf5) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf5) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf5) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf6 + +template class BOOST_MEM_FN_NAME(mf6) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf6)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); + } + + bool operator==(BOOST_MEM_FN_NAME(mf6) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf6) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf6 + +template class BOOST_MEM_FN_NAME(cmf6) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf6) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf6) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf7 + +template class BOOST_MEM_FN_NAME(mf7) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf7)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + bool operator==(BOOST_MEM_FN_NAME(mf7) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf7) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf7 + +template class BOOST_MEM_FN_NAME(cmf7) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf7) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf7) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// mf8 + +template class BOOST_MEM_FN_NAME(mf8) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8)) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + +public: + + explicit BOOST_MEM_FN_NAME(mf8)(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + +#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + +#endif + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + bool operator==(BOOST_MEM_FN_NAME(mf8) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(mf8) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +// cmf8 + +template class BOOST_MEM_FN_NAME(cmf8) +{ +public: + + typedef R result_type; + +private: + + BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const) + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + +public: + + explicit BOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {} + + R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + bool operator==(BOOST_MEM_FN_NAME(cmf8) const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(BOOST_MEM_FN_NAME(cmf8) const & rhs) const + { + return f_ != rhs.f_; + } +}; + +#undef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_vw.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_vw.hpp new file mode 100644 index 0000000000..f3fc58db04 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/mem_fn_vw.hpp @@ -0,0 +1,130 @@ +// +// bind/mem_fn_vw.hpp - void return helper wrappers +// +// Do not include this header directly +// +// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/mem_fn.html for documentation. +// + +template struct BOOST_MEM_FN_NAME(mf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (); + explicit BOOST_MEM_FN_NAME(mf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0) +{ + typedef R (BOOST_MEM_FN_CC T::*F) () const; + explicit BOOST_MEM_FN_NAME(cmf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1); + explicit BOOST_MEM_FN_NAME(mf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1) const; + explicit BOOST_MEM_FN_NAME(cmf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2); + explicit BOOST_MEM_FN_NAME(mf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2) const; + explicit BOOST_MEM_FN_NAME(cmf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3); + explicit BOOST_MEM_FN_NAME(mf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const; + explicit BOOST_MEM_FN_NAME(cmf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4); + explicit BOOST_MEM_FN_NAME(mf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const; + explicit BOOST_MEM_FN_NAME(cmf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5); + explicit BOOST_MEM_FN_NAME(mf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const; + explicit BOOST_MEM_FN_NAME(cmf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6); + explicit BOOST_MEM_FN_NAME(mf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const; + explicit BOOST_MEM_FN_NAME(cmf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7); + explicit BOOST_MEM_FN_NAME(mf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const; + explicit BOOST_MEM_FN_NAME(cmf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)(f) {} +}; + + +template struct BOOST_MEM_FN_NAME(mf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8); + explicit BOOST_MEM_FN_NAME(mf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)(f) {} +}; + +template struct BOOST_MEM_FN_NAME(cmf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8) +{ + typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const; + explicit BOOST_MEM_FN_NAME(cmf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)(f) {} +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/placeholders.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/placeholders.hpp new file mode 100644 index 0000000000..3b098b14f8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/placeholders.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED +#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind/placeholders.hpp - _N definitions +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include +#include + +namespace +{ + +#if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ < 4) + +static inline boost::arg<1> _1() { return boost::arg<1>(); } +static inline boost::arg<2> _2() { return boost::arg<2>(); } +static inline boost::arg<3> _3() { return boost::arg<3>(); } +static inline boost::arg<4> _4() { return boost::arg<4>(); } +static inline boost::arg<5> _5() { return boost::arg<5>(); } +static inline boost::arg<6> _6() { return boost::arg<6>(); } +static inline boost::arg<7> _7() { return boost::arg<7>(); } +static inline boost::arg<8> _8() { return boost::arg<8>(); } +static inline boost::arg<9> _9() { return boost::arg<9>(); } + +#elif defined(BOOST_MSVC) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031) || defined(__MWERKS__) || \ + defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 2) + +static boost::arg<1> _1; +static boost::arg<2> _2; +static boost::arg<3> _3; +static boost::arg<4> _4; +static boost::arg<5> _5; +static boost::arg<6> _6; +static boost::arg<7> _7; +static boost::arg<8> _8; +static boost::arg<9> _9; + +#else + +boost::arg<1> _1; +boost::arg<2> _2; +boost::arg<3> _3; +boost::arg<4> _4; +boost::arg<5> _5; +boost::arg<6> _6; +boost::arg<7> _7; +boost::arg<8> _8; +boost::arg<9> _9; + +#endif + +} // unnamed namespace + +#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/protect.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/protect.hpp new file mode 100644 index 0000000000..749e158c34 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/protect.hpp @@ -0,0 +1,304 @@ +#ifndef BOOST_BIND_PROTECT_HPP_INCLUDED +#define BOOST_BIND_PROTECT_HPP_INCLUDED + +// +// protect.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2009 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +namespace boost +{ + +namespace _bi +{ + +template class protected_bind_t +{ +public: + + typedef typename F::result_type result_type; + + explicit protected_bind_t(F f): f_(f) + { + } + + result_type operator()() + { + return f_(); + } + + result_type operator()() const + { + return f_(); + } + + template result_type operator()(A1 & a1) + { + return f_(a1); + } + + template result_type operator()(A1 & a1) const + { + return f_(a1); + } + + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(const A1 & a1) + { + return f_(a1); + } + + template result_type operator()(const A1 & a1) const + { + return f_(a1); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2) + { + return f_(a1, a2); + } + + template result_type operator()(A1 & a1, A2 & a2) const + { + return f_(a1, a2); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 & a2) + { + return f_(a1, a2); + } + + template result_type operator()(A1 const & a1, A2 & a2) const + { + return f_(a1, a2); + } + + template result_type operator()(A1 & a1, A2 const & a2) + { + return f_(a1, a2); + } + + template result_type operator()(A1 & a1, A2 const & a2) const + { + return f_(a1, a2); + } + + template result_type operator()(A1 const & a1, A2 const & a2) + { + return f_(a1, a2); + } + + template result_type operator()(A1 const & a1, A2 const & a2) const + { + return f_(a1, a2); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) + { + return f_(a1, a2, a3); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const + { + return f_(a1, a2, a3); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) + { + return f_(a1, a2, a3); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const + { + return f_(a1, a2, a3); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) + { + return f_(a1, a2, a3, a4); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const + { + return f_(a1, a2, a3, a4); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) + { + return f_(a1, a2, a3, a4); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const + { + return f_(a1, a2, a3, a4); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) + { + return f_(a1, a2, a3, a4, a5); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const + { + return f_(a1, a2, a3, a4, a5); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) + { + return f_(a1, a2, a3, a4, a5); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const + { + return f_(a1, a2, a3, a4, a5); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) + { + return f_(a1, a2, a3, a4, a5, a6); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const + { + return f_(a1, a2, a3, a4, a5, a6); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) + { + return f_(a1, a2, a3, a4, a5, a6); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const + { + return f_(a1, a2, a3, a4, a5, a6); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + +#endif + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + +#endif + +private: + + F f_; +}; + +} // namespace _bi + +template _bi::protected_bind_t protect(F f) +{ + return _bi::protected_bind_t(f); +} + +} // namespace boost + +#endif // #ifndef BOOST_BIND_PROTECT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/bind/storage.hpp b/deal.II/contrib/boost-1.45.0/include/boost/bind/storage.hpp new file mode 100644 index 0000000000..be490b0f59 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/bind/storage.hpp @@ -0,0 +1,475 @@ +#ifndef BOOST_BIND_STORAGE_HPP_INCLUDED +#define BOOST_BIND_STORAGE_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// bind/storage.hpp +// +// boost/bind.hpp support header, optimized storage +// +// Copyright (c) 2006 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/bind/bind.html for documentation. +// + +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated +#endif + +namespace boost +{ + +namespace _bi +{ + +// 1 + +template struct storage1 +{ + explicit storage1( A1 a1 ): a1_( a1 ) {} + + template void accept(V & v) const + { + BOOST_BIND_VISIT_EACH(v, a1_, 0); + } + + A1 a1_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ ) + +template struct storage1< boost::arg > +{ + explicit storage1( boost::arg ) {} + + template void accept(V &) const { } + + static boost::arg a1_() { return boost::arg(); } +}; + +template struct storage1< boost::arg (*) () > +{ + explicit storage1( boost::arg (*) () ) {} + + template void accept(V &) const { } + + static boost::arg a1_() { return boost::arg(); } +}; + +#endif + +// 2 + +template struct storage2: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a2_, 0); + } + + A2 a2_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage2< A1, boost::arg >: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, boost::arg ): storage1( a1 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a2_() { return boost::arg(); } +}; + +template struct storage2< A1, boost::arg (*) () >: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a2_() { return boost::arg(); } +}; + +#endif + +// 3 + +template struct storage3: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a3_, 0); + } + + A3 a3_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a3_() { return boost::arg(); } +}; + +template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a3_() { return boost::arg(); } +}; + +#endif + +// 4 + +template struct storage4: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a4_, 0); + } + + A4 a4_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a4_() { return boost::arg(); } +}; + +template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a4_() { return boost::arg(); } +}; + +#endif + +// 5 + +template struct storage5: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a5_, 0); + } + + A5 a5_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a5_() { return boost::arg(); } +}; + +template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a5_() { return boost::arg(); } +}; + +#endif + +// 6 + +template struct storage6: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a6_, 0); + } + + A6 a6_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a6_() { return boost::arg(); } +}; + +template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a6_() { return boost::arg(); } +}; + +#endif + +// 7 + +template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a7_, 0); + } + + A7 a7_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a7_() { return boost::arg(); } +}; + +template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a7_() { return boost::arg(); } +}; + +#endif + +// 8 + +template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a8_, 0); + } + + A8 a8_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a8_() { return boost::arg(); } +}; + +template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a8_() { return boost::arg(); } +}; + +#endif + +// 9 + +template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + BOOST_BIND_VISIT_EACH(v, a9_, 0); + } + + A9 a9_; +}; + +#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) + +template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a9_() { return boost::arg(); } +}; + +template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a9_() { return boost::arg(); } +}; + +#endif + +} // namespace _bi + +} // namespace boost + +#ifdef BOOST_MSVC +# pragma warning(default: 4512) // assignment operator could not be generated +# pragma warning(pop) +#endif + +#endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/blank.hpp b/deal.II/contrib/boost-1.45.0/include/boost/blank.hpp new file mode 100644 index 0000000000..d0fe5abca5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/blank.hpp @@ -0,0 +1,106 @@ +//----------------------------------------------------------------------------- +// boost blank.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_BLANK_HPP +#define BOOST_BLANK_HPP + +#include "boost/blank_fwd.hpp" + +#if !defined(BOOST_NO_IOSTREAM) +#include // for std::basic_ostream forward declare +#include "boost/detail/templated_streams.hpp" +#endif // BOOST_NO_IOSTREAM + +#include "boost/mpl/bool.hpp" +#include "boost/type_traits/is_empty.hpp" +#include "boost/type_traits/is_pod.hpp" +#include "boost/type_traits/is_stateless.hpp" + +namespace boost { + +struct blank +{ +}; + +// type traits specializations +// + +template <> +struct is_pod< blank > + : mpl::true_ +{ +}; + +template <> +struct is_empty< blank > + : mpl::true_ +{ +}; + +template <> +struct is_stateless< blank > + : mpl::true_ +{ +}; + +// relational operators +// + +inline bool operator==(const blank&, const blank&) +{ + return true; +} + +inline bool operator<=(const blank&, const blank&) +{ + return true; +} + +inline bool operator>=(const blank&, const blank&) +{ + return true; +} + +inline bool operator!=(const blank&, const blank&) +{ + return false; +} + +inline bool operator<(const blank&, const blank&) +{ + return false; +} + +inline bool operator>(const blank&, const blank&) +{ + return false; +} + +// streaming support +// +#if !defined(BOOST_NO_IOSTREAM) + +BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) +inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<( + BOOST_TEMPLATED_STREAM(ostream, E,T)& out + , const blank& + ) +{ + // (output nothing) + return out; +} + +#endif // BOOST_NO_IOSTREAM + +} // namespace boost + +#endif // BOOST_BLANK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/blank_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/blank_fwd.hpp new file mode 100644 index 0000000000..8bfe97c469 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/blank_fwd.hpp @@ -0,0 +1,22 @@ +//----------------------------------------------------------------------------- +// boost blank_fwd.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_BLANK_FWD_HPP +#define BOOST_BLANK_FWD_HPP + +namespace boost { + +struct blank; + +} // namespace boost + +#endif // BOOST_BLANK_FWD_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/call_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/call_traits.hpp new file mode 100644 index 0000000000..5253a6de58 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/call_traits.hpp @@ -0,0 +1,24 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// See boost/detail/call_traits.hpp and boost/detail/ob_call_traits.hpp +// for full copyright notices. + +#ifndef BOOST_CALL_TRAITS_HPP +#define BOOST_CALL_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#include +#else +#include +#endif + +#endif // BOOST_CALL_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/cast.hpp b/deal.II/contrib/boost-1.45.0/include/boost/cast.hpp new file mode 100644 index 0000000000..2615d183fa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/cast.hpp @@ -0,0 +1,107 @@ +// boost cast.hpp header file ----------------------------------------------// + +// (C) Copyright Kevlin Henney and Dave Abrahams 1999. +// Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/conversion for Documentation. + +// Revision History +// 23 JUn 05 numeric_cast removed and redirected to the new verion (Fernando Cacciola) +// 02 Apr 01 Removed BOOST_NO_LIMITS workarounds and included +// instead (the workaround did not +// actually compile when BOOST_NO_LIMITS was defined in +// any case, so we loose nothing). (John Maddock) +// 21 Jan 01 Undid a bug I introduced yesterday. numeric_cast<> never +// worked with stock GCC; trying to get it to do that broke +// vc-stlport. +// 20 Jan 01 Moved BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS to config.hpp. +// Removed unused BOOST_EXPLICIT_TARGET macro. Moved +// boost::detail::type to boost/type.hpp. Made it compile with +// stock gcc again (Dave Abrahams) +// 29 Nov 00 Remove nested namespace cast, cleanup spacing before Formal +// Review (Beman Dawes) +// 19 Oct 00 Fix numeric_cast for floating-point types (Dave Abrahams) +// 15 Jul 00 Suppress numeric_cast warnings for GCC, Borland and MSVC +// (Dave Abrahams) +// 30 Jun 00 More MSVC6 wordarounds. See comments below. (Dave Abrahams) +// 28 Jun 00 Removed implicit_cast<>. See comment below. (Beman Dawes) +// 27 Jun 00 More MSVC6 workarounds +// 15 Jun 00 Add workarounds for MSVC6 +// 2 Feb 00 Remove bad_numeric_cast ";" syntax error (Doncho Angelov) +// 26 Jan 00 Add missing throw() to bad_numeric_cast::what(0 (Adam Levar) +// 29 Dec 99 Change using declarations so usages in other namespaces work +// correctly (Dave Abrahams) +// 23 Sep 99 Change polymorphic_downcast assert to also detect M.I. errors +// as suggested Darin Adler and improved by Valentin Bonnard. +// 2 Sep 99 Remove controversial asserts, simplify, rename. +// 30 Aug 99 Move to cast.hpp, replace value_cast with numeric_cast, +// place in nested namespace. +// 3 Aug 99 Initial version + +#ifndef BOOST_CAST_HPP +#define BOOST_CAST_HPP + +# include +# include +# include +# include +# include +# include + +// It has been demonstrated numerous times that MSVC 6.0 fails silently at link +// time if you use a template function which has template parameters that don't +// appear in the function's argument list. +// +// TODO: Add this to config.hpp? +# if defined(BOOST_MSVC) && BOOST_MSVC < 1300 +# define BOOST_EXPLICIT_DEFAULT_TARGET , ::boost::type* = 0 +# else +# define BOOST_EXPLICIT_DEFAULT_TARGET +# endif + +namespace boost +{ +// See the documentation for descriptions of how to choose between +// static_cast<>, dynamic_cast<>, polymorphic_cast<> and polymorphic_downcast<> + +// polymorphic_cast --------------------------------------------------------// + + // Runtime checked polymorphic downcasts and crosscasts. + // Suggested in The C++ Programming Language, 3rd Ed, Bjarne Stroustrup, + // section 15.8 exercise 1, page 425. + + template + inline Target polymorphic_cast(Source* x BOOST_EXPLICIT_DEFAULT_TARGET) + { + Target tmp = dynamic_cast(x); + if ( tmp == 0 ) throw std::bad_cast(); + return tmp; + } + +// polymorphic_downcast ----------------------------------------------------// + + // BOOST_ASSERT() checked polymorphic downcast. Crosscasts prohibited. + + // WARNING: Because this cast uses BOOST_ASSERT(), it violates + // the One Definition Rule if used in multiple translation units + // where BOOST_DISABLE_ASSERTS, BOOST_ENABLE_ASSERT_HANDLER + // NDEBUG are defined inconsistently. + + // Contributed by Dave Abrahams + + template + inline Target polymorphic_downcast(Source* x BOOST_EXPLICIT_DEFAULT_TARGET) + { + BOOST_ASSERT( dynamic_cast(x) == x ); // detect logic error + return static_cast(x); + } + +# undef BOOST_EXPLICIT_DEFAULT_TARGET + +} // namespace boost + +# include + +#endif // BOOST_CAST_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/cerrno.hpp b/deal.II/contrib/boost-1.45.0/include/boost/cerrno.hpp new file mode 100644 index 0000000000..6f2669846d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/cerrno.hpp @@ -0,0 +1,331 @@ +// Boost cerrno.hpp header -------------------------------------------------// + +// Copyright Beman Dawes 2005. +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/system + +#ifndef BOOST_CERRNO_HPP +#define BOOST_CERRNO_HPP + +#include + +// supply errno values likely to be missing, particularly on Windows + +#ifndef EAFNOSUPPORT +#define EAFNOSUPPORT 9901 +#endif + +#ifndef EADDRINUSE +#define EADDRINUSE 9902 +#endif + +#ifndef EADDRNOTAVAIL +#define EADDRNOTAVAIL 9903 +#endif + +#ifndef EISCONN +#define EISCONN 9904 +#endif + +#ifndef EBADMSG +#define EBADMSG 9905 +#endif + +#ifndef ECONNABORTED +#define ECONNABORTED 9906 +#endif + +#ifndef EALREADY +#define EALREADY 9907 +#endif + +#ifndef ECONNREFUSED +#define ECONNREFUSED 9908 +#endif + +#ifndef ECONNRESET +#define ECONNRESET 9909 +#endif + +#ifndef EDESTADDRREQ +#define EDESTADDRREQ 9910 +#endif + +#ifndef EHOSTUNREACH +#define EHOSTUNREACH 9911 +#endif + +#ifndef EIDRM +#define EIDRM 9912 +#endif + +#ifndef EMSGSIZE +#define EMSGSIZE 9913 +#endif + +#ifndef ENETDOWN +#define ENETDOWN 9914 +#endif + +#ifndef ENETRESET +#define ENETRESET 9915 +#endif + +#ifndef ENETUNREACH +#define ENETUNREACH 9916 +#endif + +#ifndef ENOBUFS +#define ENOBUFS 9917 +#endif + +#ifndef ENOLINK +#define ENOLINK 9918 +#endif + +#ifndef ENODATA +#define ENODATA 9919 +#endif + +#ifndef ENOMSG +#define ENOMSG 9920 +#endif + +#ifndef ENOPROTOOPT +#define ENOPROTOOPT 9921 +#endif + +#ifndef ENOSR +#define ENOSR 9922 +#endif + +#ifndef ENOTSOCK +#define ENOTSOCK 9923 +#endif + +#ifndef ENOSTR +#define ENOSTR 9924 +#endif + +#ifndef ENOTCONN +#define ENOTCONN 9925 +#endif + +#ifndef ENOTSUP +#define ENOTSUP 9926 +#endif + +#ifndef ECANCELED +#define ECANCELED 9927 +#endif + +#ifndef EINPROGRESS +#define EINPROGRESS 9928 +#endif + +#ifndef EOPNOTSUPP +#define EOPNOTSUPP 9929 +#endif + +#ifndef EWOULDBLOCK +#define EWOULDBLOCK 9930 +#endif + +#ifndef EOWNERDEAD +#define EOWNERDEAD 9931 +#endif + +#ifndef EPROTO +#define EPROTO 9932 +#endif + +#ifndef EPROTONOSUPPORT +#define EPROTONOSUPPORT 9933 +#endif + +#ifndef ENOTRECOVERABLE +#define ENOTRECOVERABLE 9934 +#endif + +#ifndef ETIME +#define ETIME 9935 +#endif + +#ifndef ETXTBSY +#define ETXTBSY 9936 +#endif + +#ifndef ETIMEDOUT +#define ETIMEDOUT 9938 +#endif + +#ifndef ELOOP +#define ELOOP 9939 +#endif + +#ifndef EOVERFLOW +#define EOVERFLOW 9940 +#endif + +#ifndef EPROTOTYPE +#define EPROTOTYPE 9941 +#endif + +#ifndef ENOSYS +#define ENOSYS 9942 +#endif + +#ifndef EINVAL +#define EINVAL 9943 +#endif + +#ifndef ERANGE +#define ERANGE 9944 +#endif + +#ifndef EILSEQ +#define EILSEQ 9945 +#endif + +// Windows Mobile doesn't appear to define these: + +#ifndef E2BIG +#define E2BIG 9946 +#endif + +#ifndef EDOM +#define EDOM 9947 +#endif + +#ifndef EFAULT +#define EFAULT 9948 +#endif + +#ifndef EBADF +#define EBADF 9949 +#endif + +#ifndef EPIPE +#define EPIPE 9950 +#endif + +#ifndef EXDEV +#define EXDEV 9951 +#endif + +#ifndef EBUSY +#define EBUSY 9952 +#endif + +#ifndef ENOTEMPTY +#define ENOTEMPTY 9953 +#endif + +#ifndef ENOEXEC +#define ENOEXEC 9954 +#endif + +#ifndef EEXIST +#define EEXIST 9955 +#endif + +#ifndef EFBIG +#define EFBIG 9956 +#endif + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG 9957 +#endif + +#ifndef ENOTTY +#define ENOTTY 9958 +#endif + +#ifndef EINTR +#define EINTR 9959 +#endif + +#ifndef ESPIPE +#define ESPIPE 9960 +#endif + +#ifndef EIO +#define EIO 9961 +#endif + +#ifndef EISDIR +#define EISDIR 9962 +#endif + +#ifndef ECHILD +#define ECHILD 9963 +#endif + +#ifndef ENOLCK +#define ENOLCK 9964 +#endif + +#ifndef ENOSPC +#define ENOSPC 9965 +#endif + +#ifndef ENXIO +#define ENXIO 9966 +#endif + +#ifndef ENODEV +#define ENODEV 9967 +#endif + +#ifndef ENOENT +#define ENOENT 9968 +#endif + +#ifndef ESRCH +#define ESRCH 9969 +#endif + +#ifndef ENOTDIR +#define ENOTDIR 9970 +#endif + +#ifndef ENOMEM +#define ENOMEM 9971 +#endif + +#ifndef EPERM +#define EPERM 9972 +#endif + +#ifndef EACCES +#define EACCES 9973 +#endif + +#ifndef EROFS +#define EROFS 9974 +#endif + +#ifndef EDEADLK +#define EDEADLK 9975 +#endif + +#ifndef EAGAIN +#define EAGAIN 9976 +#endif + +#ifndef ENFILE +#define ENFILE 9977 +#endif + +#ifndef EMFILE +#define EMFILE 9978 +#endif + +#ifndef EMLINK +#define EMLINK 9979 +#endif + +#endif // include guard diff --git a/deal.II/contrib/boost-1.45.0/include/boost/checked_delete.hpp b/deal.II/contrib/boost-1.45.0/include/boost/checked_delete.hpp new file mode 100644 index 0000000000..9bb84e8e1b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/checked_delete.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED +#define BOOST_CHECKED_DELETE_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/checked_delete.hpp +// +// Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) 2003 Daniel Frey +// Copyright (c) 2003 Howard Hinnant +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/utility/checked_delete.html for documentation. +// + +namespace boost +{ + +// verify that types are complete for increased safety + +template inline void checked_delete(T * x) +{ + // intentionally complex - simplification causes regressions + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete x; +} + +template inline void checked_array_delete(T * x) +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete [] x; +} + +template struct checked_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + // boost:: disables ADL + boost::checked_delete(x); + } +}; + +template struct checked_array_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + boost::checked_array_delete(x); + } +}; + +} // namespace boost + +#endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/circular_buffer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/circular_buffer.hpp new file mode 100644 index 0000000000..13cc94fef7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/circular_buffer.hpp @@ -0,0 +1,74 @@ +// Circular buffer library header file. + +// Copyright (c) 2003-2008 Jan Gaspar + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/circular_buffer for documentation. + +#if !defined(BOOST_CIRCULAR_BUFFER_HPP) +#define BOOST_CIRCULAR_BUFFER_HPP + +#if defined(_MSC_VER) && _MSC_VER >= 1200 + #pragma once +#endif + +#include +#include + +// BOOST_CB_ENABLE_DEBUG: Debug support control. +#if defined(NDEBUG) || defined(BOOST_CB_DISABLE_DEBUG) + #define BOOST_CB_ENABLE_DEBUG 0 +#else + #define BOOST_CB_ENABLE_DEBUG 1 +#endif + +// BOOST_CB_ASSERT: Runtime assertion. +#if BOOST_CB_ENABLE_DEBUG + #include + #define BOOST_CB_ASSERT(Expr) BOOST_ASSERT(Expr) +#else + #define BOOST_CB_ASSERT(Expr) ((void)0) +#endif + +// BOOST_CB_STATIC_ASSERT: Compile time assertion. +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + #define BOOST_CB_STATIC_ASSERT(Expr) ((void)0) +#else + #include + #define BOOST_CB_STATIC_ASSERT(Expr) BOOST_STATIC_ASSERT(Expr) +#endif + +// BOOST_CB_IS_CONVERTIBLE: Check if Iterator::value_type is convertible to Type. +#if BOOST_WORKAROUND(__BORLANDC__, <= 0x0550) || BOOST_WORKAROUND(__MWERKS__, <= 0x2407) || \ + BOOST_WORKAROUND(BOOST_MSVC, < 1300) + #define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) ((void)0) +#else + #include + #include + #define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) \ + BOOST_CB_STATIC_ASSERT((is_convertible::value_type, Type>::value)) +#endif + +// BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS: +// Check if the STL provides templated iterator constructors for its containers. +#if defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) + #define BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS BOOST_CB_STATIC_ASSERT(false); +#else + #define BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS ((void)0); +#endif + +#include +#include +#include +#include + +#undef BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS +#undef BOOST_CB_IS_CONVERTIBLE +#undef BOOST_CB_STATIC_ASSERT +#undef BOOST_CB_ASSERT +#undef BOOST_CB_ENABLE_DEBUG + +#endif // #if !defined(BOOST_CIRCULAR_BUFFER_HPP) diff --git a/deal.II/contrib/boost-1.45.0/include/boost/circular_buffer_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/circular_buffer_fwd.hpp new file mode 100644 index 0000000000..6fdb43e037 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/circular_buffer_fwd.hpp @@ -0,0 +1,43 @@ +// Forward declaration of the circular buffer and its adaptor. + +// Copyright (c) 2003-2008 Jan Gaspar + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/circular_buffer for documentation. + +#if !defined(BOOST_CIRCULAR_BUFFER_FWD_HPP) +#define BOOST_CIRCULAR_BUFFER_FWD_HPP + +#if defined(_MSC_VER) && _MSC_VER >= 1200 + #pragma once +#endif + +#include +#if !defined(BOOST_NO_STD_ALLOCATOR) + #include +#else + #include +#endif + +namespace boost { + +#if !defined(BOOST_NO_STD_ALLOCATOR) + #define BOOST_CB_DEFAULT_ALLOCATOR(T) std::allocator +#else + #define BOOST_CB_DEFAULT_ALLOCATOR(T) BOOST_DEDUCED_TYPENAME std::vector::allocator_type +#endif + +template +class circular_buffer; + +template +class circular_buffer_space_optimized; + +#undef BOOST_CB_DEFAULT_ALLOCATOR + +} // namespace boost + +#endif // #if !defined(BOOST_CIRCULAR_BUFFER_FWD_HPP) diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cassert b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cassert new file mode 100644 index 0000000000..5bc7329dde --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cassert @@ -0,0 +1,10 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CASSERT_HEADER +#define __CASSERT_HEADER + +#include + +#endif // CASSERT_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cctype b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cctype new file mode 100644 index 0000000000..1ad03cb5ca --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cctype @@ -0,0 +1,26 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CCTYPE_HEADER +#define __CCTYPE_HEADER + +#include + +namespace std { + using ::isalnum; + using ::isdigit; + using ::isprint; + using ::isupper; + using ::tolower; + using ::isalpha; + using ::isgraph; + using ::ispunct; + using ::isxdigit; + using ::toupper; + using ::iscntrl; + using ::islower; + using ::isspace; +} + +#endif // CCTYPE_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cerrno b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cerrno new file mode 100644 index 0000000000..4d57b80875 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cerrno @@ -0,0 +1,10 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CERRNO_HEADER +#define __CERRNO_HEADER + +#include + +#endif // CERRNO_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cfloat b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cfloat new file mode 100644 index 0000000000..9d3d53318c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cfloat @@ -0,0 +1,10 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CFLOAT_HEADER +#define __CFLOAT_HEADER + +#include + +#endif // CFLOAT_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/climits b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/climits new file mode 100644 index 0000000000..b71b7f5eb4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/climits @@ -0,0 +1,10 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CLIMITS_HEADER +#define __CLIMITS_HEADER + +#include + +#endif // CLIMITS_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/clocale b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/clocale new file mode 100644 index 0000000000..b3ba3c859f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/clocale @@ -0,0 +1,16 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CLOCALE_HEADER +#define __CLOCALE_HEADER + +#include + +namespace std { + using ::lconv; + using ::localeconv; + using ::setlocale; +} + +#endif // CLOCALE_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cmath b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cmath new file mode 100644 index 0000000000..70dc8843ed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cmath @@ -0,0 +1,35 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CMATH_HEADER +#define __CMATH_HEADER + +#include + +namespace std { + using ::acos; + using ::cos; + using ::fmod; + using ::modf; + using ::tan; + using ::asin; + using ::cosh; + using ::frexp; + using ::pow; + using ::tanh; + using ::atan; + using ::exp; + using ::ldexp; + using ::sin; + using ::atan2; + using ::fabs; + using ::log; + using ::sinh; + using ::ceil; + using ::floor; + using ::log10; + using ::sqrt; +} + +#endif // CMATH_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/csetjmp b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/csetjmp new file mode 100644 index 0000000000..aa6a019dfe --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/csetjmp @@ -0,0 +1,15 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CSETJMP_HEADER +#define __CSETJMP_HEADER + +#include + +namespace std { + using ::jmp_buf; + using ::longjmp; +} + +#endif // CSETJMP_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/csignal b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/csignal new file mode 100644 index 0000000000..37e11d9e4a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/csignal @@ -0,0 +1,16 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CSIGNAL_HEADER +#define __CSIGNAL_HEADER + +#include + +namespace std { + using ::sig_atomic_t; + using ::raise; + using ::signal; +} + +#endif // CSIGNAL_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdarg b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdarg new file mode 100644 index 0000000000..5e1dd749f0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdarg @@ -0,0 +1,14 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CSTDARG_HEADER +#define __CSTDARG_HEADER + +#include + +namespace std { + using ::va_list; +} + +#endif // CSTDARG_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstddef b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstddef new file mode 100644 index 0000000000..c00a55c1f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstddef @@ -0,0 +1,15 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CSTDDEF_HEADER +#define __CSTDDEF_HEADER + +#include + +namespace std { + using ::ptrdiff_t; + using ::size_t; +} + +#endif // CSTDDEF_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdio b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdio new file mode 100644 index 0000000000..8a48077ce3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdio @@ -0,0 +1,57 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CSTDIO_HEADER +#define __CSTDIO_HEADER + +#include + +namespace std { + using ::FILE; + using ::fpos_t; + using ::size_t; + using ::clearerr; + using ::fgets; + using ::fscanf; + using ::gets; + using ::rename; + using ::tmpfile; + using ::fclose; + using ::fopen; + using ::fseek; + using ::perror; + using ::rewind; + using ::tmpnam; + using ::feof; + using ::fprintf; + using ::fsetpos; + using ::printf; + using ::scanf; + using ::ungetc; + using ::ferror; + using ::fputc; + using ::ftell; + using ::putc; + using ::setbuf; + using ::vfprintf; + using ::fflush; + using ::fputs; + using ::fwrite; + using ::putchar; + using ::setvbuf; + using ::vprintf; + using ::fgetc; + using ::fread; + using ::getc; + using ::puts; + using ::sprintf; + using ::vsprintf; + using ::fgetpos; + using ::freopen; + using ::getchar; + using ::remove; + using ::sscanf; +} + +#endif // CSTDIO_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdlib b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdlib new file mode 100644 index 0000000000..7592ffcf3d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstdlib @@ -0,0 +1,43 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CSTDLIB_HEADER +#define __CSTDLIB_HEADER + +#include + +namespace std { + using ::abort; + using ::atexit; + using ::exit; + using ::getenv; + using ::system; + using ::calloc; + using ::malloc; + using ::free; + using ::realloc; + using ::atol; + using ::mblen; + using ::strtod; + using ::wctomb; + using ::atof; + using ::mbstowcs; + using ::strtol; + using ::wcstombs; + using ::atoi; + using ::mbtowc; + using ::strtoul; + using ::bsearch; + using ::qsort; + using ::div_t; + using ::ldiv_t; + using ::abs; + using ::labs; + using ::srand; + using ::div; + using ::ldiv; + using ::rand; +} + +#endif // CSTDLIB_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstring b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstring new file mode 100644 index 0000000000..e913597a64 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cstring @@ -0,0 +1,36 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CSTRING_HEADER +#define __CSTRING_HEADER + +#include + +namespace std { + using ::size_t; + using ::memchr; + using ::strcat; + using ::strcspn; + using ::strncpy; + using ::strtok; + using ::memcmp; + using ::strchr; + using ::strerror; + using ::strpbrk; + using ::strxfrm; + using ::memcpy; + using ::strcmp; + using ::strlen; + using ::strrchr; + using ::memmove; + using ::strcoll; + using ::strncat; + using ::strspn; + using ::memset; + using ::strcpy; + using ::strncmp; + using ::strstr; +} + +#endif // CSTRING_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/ctime b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/ctime new file mode 100644 index 0000000000..0c8ac9abf2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/ctime @@ -0,0 +1,26 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CTIME_HEADER +#define __CTIME_HEADER + +#include + +namespace std { + using ::size_t; + using ::clock_t; + using ::time_t; + using ::tm; + using ::asctime; + using ::clock; + using ::difftime; + using ::localtime; + using ::strftime; + using ::ctime; + using ::gmtime; + using ::mktime; + using ::time; +} + +#endif // CTIME_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cwchar b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cwchar new file mode 100644 index 0000000000..f9fbd30955 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cwchar @@ -0,0 +1,156 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CWCHAR_HEADER +#define __CWCHAR_HEADER + +#include + +namespace std { + using ::mbstate_t; + using ::wint_t; + using ::size_t; +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::btowc; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::getwchar; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::ungetwc; +#endif + using ::wcscpy; +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wcsrtombs; +#endif +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wmemchr; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::fgetwc; +#endif +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::mbrlen; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::vfwprintf; +#endif +#endif + using ::wcscspn; + using ::wcsspn; +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wmemcmp; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::fgetws; +#endif +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::mbrtowc; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::vswprintf; +#endif +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::wcsftime; +#endif + using ::wcsstr; +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wmemcpy; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::fputwc; +#endif +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::mbsinit; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::vwprintf; +#endif +#endif + using ::wcslen; + using ::wcstod; +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wmemmove; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::fputws; +#endif +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::mbsrtowcs; +#endif +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wcrtomb; +#endif + using ::wcsncat; + using ::wcstok; +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wmemset; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) +#if !(defined(__DECCXX_VER) && __DECCXX_VER <= 60290024) + using ::fwide; +#endif +#endif +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::putwc; +#endif + using ::wcscat; + using ::wcsncmp; + using ::wcstol; +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wprintf; +#endif +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::fwprintf; +#endif +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::putwchar; +#endif + using ::wcschr; + using ::wcsncpy; + using ::wcstoul; +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wscanf; +#endif +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::fwscanf; +#endif +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::swprintf; +#endif +#endif + using ::wcscmp; + using ::wcspbrk; + using ::wcsxfrm; +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) + using ::getwc; +#endif +#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::swscanf; +#endif +#endif + using ::wcscoll; + using ::wcsrchr; +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wctob; +#endif +} + +#endif // CWCHAR_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cwctype b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cwctype new file mode 100644 index 0000000000..cf8f07b074 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compatibility/cpp_c_headers/cwctype @@ -0,0 +1,39 @@ +// This file is automatically generated. Do not edit. +// ['../../libs/compatibility/generate_cpp_c_headers.py'] +// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') + +#ifndef __CWCTYPE_HEADER +#define __CWCTYPE_HEADER + +#include + +namespace std { +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wctrans_t; +#endif + using ::wctype_t; + using ::wint_t; + using ::iswalnum; + using ::iswctype; + using ::iswlower; + using ::iswspace; +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::towctrans; +#endif +#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) + using ::wctrans; +#endif + using ::iswalpha; + using ::iswdigit; + using ::iswprint; + using ::iswupper; + using ::towlower; + using ::wctype; + using ::iswcntrl; + using ::iswgraph; + using ::iswpunct; + using ::iswxdigit; + using ::towupper; +} + +#endif // CWCTYPE_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/compressed_pair.hpp b/deal.II/contrib/boost-1.45.0/include/boost/compressed_pair.hpp new file mode 100644 index 0000000000..e6cd6a074a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/compressed_pair.hpp @@ -0,0 +1,24 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// See boost/detail/compressed_pair.hpp and boost/detail/ob_compressed_pair.hpp +// for full copyright notices. + +#ifndef BOOST_COMPRESSED_PAIR_HPP +#define BOOST_COMPRESSED_PAIR_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#include +#else +#include +#endif + +#endif // BOOST_COMPRESSED_PAIR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/assert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/assert.hpp new file mode 100644 index 0000000000..80eca817ac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/assert.hpp @@ -0,0 +1,46 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP +# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP + +# include +# include + +// The old protocol used a constraints() member function in concept +// checking classes. If the compiler supports SFINAE, we can detect +// that function and seamlessly support the old concept checking +// classes. In this release, backward compatibility with the old +// concept checking classes is enabled by default, where available. +// The old protocol is deprecated, though, and backward compatibility +// will no longer be the default in the next release. + +# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \ + && !defined(BOOST_NO_SFINAE) \ + \ + && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) \ + && !(BOOST_WORKAROUND(__GNUC__, == 2)) + +// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to +// check for the presence of particularmember functions. + +# define BOOST_OLD_CONCEPT_SUPPORT + +# endif + +# ifdef BOOST_MSVC +# include +# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# include +# else +# include +# endif + + // Usage, in class or function context: + // + // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept)); + // +# define BOOST_CONCEPT_ASSERT(ModelInParens) \ + BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens) + +#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/backward_compatibility.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/backward_compatibility.hpp new file mode 100644 index 0000000000..88d5921506 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/backward_compatibility.hpp @@ -0,0 +1,16 @@ +// Copyright David Abrahams 2009. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP +# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP + +namespace boost +{ + namespace concepts {} + +# if !defined(BOOST_NO_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD) + namespace concept = concepts; +# endif +} // namespace boost::concept + +#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/borland.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/borland.hpp new file mode 100644 index 0000000000..300d5d4050 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/borland.hpp @@ -0,0 +1,30 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP + +# include +# include + +namespace boost { namespace concepts { + +template +struct require; + +template +struct require +{ + enum { instantiate = sizeof((((Model*)0)->~Model()), 3) }; +}; + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ + enum \ + { \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + boost::concepts::require::instantiate \ + } + +}} // namespace boost::concept + +#endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/concept_def.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/concept_def.hpp new file mode 100644 index 0000000000..79f628e999 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/concept_def.hpp @@ -0,0 +1,51 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP +# define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP +# include +# include +# include +# include +#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP + +// BOOST_concept(SomeName, (p1)(p2)...(pN)) +// +// Expands to "template struct SomeName" +// +// Also defines an equivalent SomeNameConcept for backward compatibility. +// Maybe in the next release we can kill off the "Concept" suffix for good. +#if BOOST_WORKAROUND(__GNUC__, <= 3) +# define BOOST_concept(name, params) \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name; /* forward declaration */ \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct BOOST_PP_CAT(name,Concept) \ + : name< BOOST_PP_SEQ_ENUM(params) > \ + { \ + /* at least 2.96 and 3.4.3 both need this */ \ + BOOST_PP_CAT(name,Concept)(); \ + }; \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name +#else +# define BOOST_concept(name, params) \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name; /* forward declaration */ \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct BOOST_PP_CAT(name,Concept) \ + : name< BOOST_PP_SEQ_ENUM(params) > \ + { \ + }; \ + \ + template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ + struct name +#endif + +// Helper for BOOST_concept, above. +# define BOOST_CONCEPT_typename(r, ignored, index, t) \ + BOOST_PP_COMMA_IF(index) typename t + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/concept_undef.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/concept_undef.hpp new file mode 100644 index 0000000000..713db89123 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/concept_undef.hpp @@ -0,0 +1,5 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# undef BOOST_concept_typename +# undef BOOST_concept diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/general.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/general.hpp new file mode 100644 index 0000000000..e3014c1b87 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/general.hpp @@ -0,0 +1,75 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP + +# include +# include + +# ifdef BOOST_OLD_CONCEPT_SUPPORT +# include +# include +# endif + +// This implementation works on Comeau and GCC, all the way back to +// 2.95 +namespace boost { namespace concepts { + +template +struct requirement_; + +namespace detail +{ + template struct instantiate {}; +} + +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; + +struct failed {}; + +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; + +# ifdef BOOST_OLD_CONCEPT_SUPPORT + +template +struct constraint +{ + static void failed() { ((Model*)0)->constraints(); } +}; + +template +struct requirement_ + : mpl::if_< + concepts::not_satisfied + , constraint + , requirement + >::type +{}; + +# else + +// For GCC-2.x, these can't have exactly the same name +template +struct requirement_ + : requirement +{}; + +# endif + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ + typedef ::boost::concepts::detail::instantiate< \ + &::boost::concepts::requirement_::failed> \ + BOOST_PP_CAT(boost_concept_check,__LINE__) + +}} + +#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/has_constraints.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/has_constraints.hpp new file mode 100644 index 0000000000..a309db3d88 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/has_constraints.hpp @@ -0,0 +1,50 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP +# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP + +# include +# include +# include + +namespace boost { namespace concepts { + +namespace detail +{ + +// Here we implement the metafunction that detects whether a +// constraints metafunction exists + typedef char yes; + typedef char (&no)[2]; + + template + struct wrap_constraints {}; + +#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__) + // Work around the following bogus error in Sun Studio 11, by + // turning off the has_constraints function entirely: + // Error: complex expression not allowed in dependent template + // argument expression + inline no has_constraints_(...); +#else + template + inline yes has_constraints_(Model*, wrap_constraints* = 0); + inline no has_constraints_(...); +#endif +} + +// This would be called "detail::has_constraints," but it has a strong +// tendency to show up in error messages. +template +struct not_satisfied +{ + BOOST_STATIC_CONSTANT( + bool + , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) ); + typedef mpl::bool_ type; +}; + +}} // namespace boost::concepts::detail + +#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/msvc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/msvc.hpp new file mode 100644 index 0000000000..9fbd2505d2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/detail/msvc.hpp @@ -0,0 +1,114 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP +# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP + +# include +# include + +# ifdef BOOST_OLD_CONCEPT_SUPPORT +# include +# include +# endif + + +namespace boost { namespace concepts { + + +template +struct check +{ + virtual void failed(Model* x) + { + x->~Model(); + } +}; + +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION +struct failed {}; +template +struct check +{ + virtual void failed(Model* x) + { + x->~Model(); + } +}; +# endif + +# ifdef BOOST_OLD_CONCEPT_SUPPORT + +namespace detail +{ + // No need for a virtual function here, since evaluating + // not_satisfied below will have already instantiated the + // constraints() member. + struct constraint {}; +} + +template +struct require + : mpl::if_c< + not_satisfied::value + , detail::constraint +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + , check +# else + , check +# endif + >::type +{}; + +# else + +template +struct require +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + : check +# else + : check +# endif +{}; + +# endif + +# if BOOST_WORKAROUND(BOOST_MSVC, == 1310) + +// +// The iterator library sees some really strange errors unless we +// do things this way. +// +template +struct require +{ + virtual void failed(Model*) + { + require(); + } +}; + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ +enum \ +{ \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + sizeof(::boost::concepts::require) \ +} + +# else // Not vc-7.1 + +template +require +require_(void(*)(Model)); + +# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ +enum \ +{ \ + BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + sizeof(::boost::concepts::require_((ModelFnPtr)0)) \ +} + +# endif +}} + +#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/requires.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/requires.hpp new file mode 100644 index 0000000000..024ba742c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/requires.hpp @@ -0,0 +1,78 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_REQUIRES_DWA2006430_HPP +# define BOOST_CONCEPT_REQUIRES_DWA2006430_HPP + +# include +# include +# include +# include + +namespace boost { + +// Template for use in handwritten assertions +template +struct requires_ : More +{ +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef typename More::type type; +# endif + BOOST_CONCEPT_ASSERT((Model)); +}; + +// Template for use by macros, where models must be wrapped in parens. +// This isn't in namespace detail to keep extra cruft out of resulting +// error messages. +template +struct _requires_ +{ + enum { value = 0 }; + BOOST_CONCEPT_ASSERT_FN(ModelFn); +}; + +template +struct Requires_ : ::boost::parameter::aux::unaryfunptr_arg_type +{ +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef typename ::boost::parameter::aux::unaryfunptr_arg_type::type type; +# endif +}; + +# if BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1010)) +# define BOOST_CONCEPT_REQUIRES_(r,data,t) | (::boost::_requires_::value) +# else +# define BOOST_CONCEPT_REQUIRES_(r,data,t) + (::boost::_requires_::value) +# endif + +#if defined(NDEBUG) || BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +# define BOOST_CONCEPT_REQUIRES(models, result) \ + typename ::boost::parameter::aux::unaryfunptr_arg_type::type + +#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + +// Same thing as below without the initial typename +# define BOOST_CONCEPT_REQUIRES(models, result) \ + ::boost::Requires_< \ + (0 BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_REQUIRES_, ~, models)), \ + ::boost::parameter::aux::unaryfunptr_arg_type \ + >::type + +#else + +// This just ICEs on MSVC6 :( +# define BOOST_CONCEPT_REQUIRES(models, result) \ + typename ::boost::Requires_< \ + (0 BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_REQUIRES_, ~, models)), \ + void(*)result \ + >::type + +#endif + +// C++0x proposed syntax changed. This supports an older usage +#define BOOST_CONCEPT_WHERE(models,result) BOOST_CONCEPT_REQUIRES(models,result) + +} // namespace boost::concept_check + +#endif // BOOST_CONCEPT_REQUIRES_DWA2006430_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept/usage.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept/usage.hpp new file mode 100644 index 0000000000..21547c31f4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept/usage.hpp @@ -0,0 +1,44 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP +# define BOOST_CONCEPT_USAGE_DWA2006919_HPP + +# include +# include +# include + +namespace boost { namespace concepts { + +# if BOOST_WORKAROUND(__GNUC__, == 2) + +# define BOOST_CONCEPT_USAGE(model) ~model() + +# else + +template +struct usage_requirements +{ + ~usage_requirements() { ((Model*)0)->~Model(); } +}; + +# if BOOST_WORKAROUND(__GNUC__, <= 3) + +# define BOOST_CONCEPT_USAGE(model) \ + model(); /* at least 2.96 and 3.4.3 both need this :( */ \ + BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ + ~model() + +# else + +# define BOOST_CONCEPT_USAGE(model) \ + BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ + ~model() + +# endif + +# endif + +}} // namespace boost::concepts + +#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept_archetype.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept_archetype.hpp new file mode 100644 index 0000000000..f21c817384 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept_archetype.hpp @@ -0,0 +1,669 @@ +// +// (C) Copyright Jeremy Siek 2000. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Revision History: +// +// 17 July 2001: Added const to some member functions. (Jeremy Siek) +// 05 May 2001: Removed static dummy_cons object. (Jeremy Siek) + +// See http://www.boost.org/libs/concept_check for documentation. + +#ifndef BOOST_CONCEPT_ARCHETYPES_HPP +#define BOOST_CONCEPT_ARCHETYPES_HPP + +#include +#include +#include +#include + +namespace boost { + + //=========================================================================== + // Basic Archetype Classes + + namespace detail { + class dummy_constructor { }; + } + + // A type that models no concept. The template parameter + // is only there so that null_archetype types can be created + // that have different type. + template + class null_archetype { + private: + null_archetype() { } + null_archetype(const null_archetype&) { } + null_archetype& operator=(const null_archetype&) { return *this; } + public: + null_archetype(detail::dummy_constructor) { } +#ifndef __MWERKS__ + template + friend void dummy_friend(); // just to avoid warnings +#endif + }; + + // This is a helper class that provides a way to get a reference to + // an object. The get() function will never be called at run-time + // (nothing in this file will) so this seemingly very bad function + // is really quite innocent. The name of this class needs to be + // changed. + template + class static_object + { + public: + static T& get() + { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + return *reinterpret_cast(0); +#else + static char d[sizeof(T)]; + return *reinterpret_cast(d); +#endif + } + }; + + template > + class default_constructible_archetype : public Base { + public: + default_constructible_archetype() + : Base(static_object::get()) { } + default_constructible_archetype(detail::dummy_constructor x) : Base(x) { } + }; + + template > + class assignable_archetype : public Base { + assignable_archetype() { } + assignable_archetype(const assignable_archetype&) { } + public: + assignable_archetype& operator=(const assignable_archetype&) { + return *this; + } + assignable_archetype(detail::dummy_constructor x) : Base(x) { } + }; + + template > + class copy_constructible_archetype : public Base { + public: + copy_constructible_archetype() + : Base(static_object::get()) { } + copy_constructible_archetype(const copy_constructible_archetype&) + : Base(static_object::get()) { } + copy_constructible_archetype(detail::dummy_constructor x) : Base(x) { } + }; + + template > + class sgi_assignable_archetype : public Base { + public: + sgi_assignable_archetype(const sgi_assignable_archetype&) + : Base(static_object::get()) { } + sgi_assignable_archetype& operator=(const sgi_assignable_archetype&) { + return *this; + } + sgi_assignable_archetype(const detail::dummy_constructor& x) : Base(x) { } + }; + + struct default_archetype_base { + default_archetype_base(detail::dummy_constructor) { } + }; + + // Careful, don't use same type for T and Base. That results in the + // conversion operator being invalid. Since T is often + // null_archetype, can't use null_archetype for Base. + template + class convertible_to_archetype : public Base { + private: + convertible_to_archetype() { } + convertible_to_archetype(const convertible_to_archetype& ) { } + convertible_to_archetype& operator=(const convertible_to_archetype&) + { return *this; } + public: + convertible_to_archetype(detail::dummy_constructor x) : Base(x) { } + operator const T&() const { return static_object::get(); } + }; + + template + class convertible_from_archetype : public Base { + private: + convertible_from_archetype() { } + convertible_from_archetype(const convertible_from_archetype& ) { } + convertible_from_archetype& operator=(const convertible_from_archetype&) + { return *this; } + public: + convertible_from_archetype(detail::dummy_constructor x) : Base(x) { } + convertible_from_archetype(const T&) { } + convertible_from_archetype& operator=(const T&) + { return *this; } + }; + + class boolean_archetype { + public: + boolean_archetype(const boolean_archetype&) { } + operator bool() const { return true; } + boolean_archetype(detail::dummy_constructor) { } + private: + boolean_archetype() { } + boolean_archetype& operator=(const boolean_archetype&) { return *this; } + }; + + template > + class equality_comparable_archetype : public Base { + public: + equality_comparable_archetype(detail::dummy_constructor x) : Base(x) { } + }; + template + boolean_archetype + operator==(const equality_comparable_archetype&, + const equality_comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator!=(const equality_comparable_archetype&, + const equality_comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + + + template > + class equality_comparable2_first_archetype : public Base { + public: + equality_comparable2_first_archetype(detail::dummy_constructor x) + : Base(x) { } + }; + template > + class equality_comparable2_second_archetype : public Base { + public: + equality_comparable2_second_archetype(detail::dummy_constructor x) + : Base(x) { } + }; + template + boolean_archetype + operator==(const equality_comparable2_first_archetype&, + const equality_comparable2_second_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator!=(const equality_comparable2_first_archetype&, + const equality_comparable2_second_archetype&) + { + return boolean_archetype(static_object::get()); + } + + + template > + class less_than_comparable_archetype : public Base { + public: + less_than_comparable_archetype(detail::dummy_constructor x) : Base(x) { } + }; + template + boolean_archetype + operator<(const less_than_comparable_archetype&, + const less_than_comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + + + + template > + class comparable_archetype : public Base { + public: + comparable_archetype(detail::dummy_constructor x) : Base(x) { } + }; + template + boolean_archetype + operator<(const comparable_archetype&, + const comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator<=(const comparable_archetype&, + const comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator>(const comparable_archetype&, + const comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator>=(const comparable_archetype&, + const comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + + + // The purpose of the optags is so that one can specify + // exactly which types the operator< is defined between. + // This is useful for allowing the operations: + // + // A a; B b; + // a < b + // b < a + // + // without also allowing the combinations: + // + // a < a + // b < b + // + struct optag1 { }; + struct optag2 { }; + struct optag3 { }; + +#define BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(OP, NAME) \ + template , class Tag = optag1 > \ + class NAME##_first_archetype : public Base { \ + public: \ + NAME##_first_archetype(detail::dummy_constructor x) : Base(x) { } \ + }; \ + \ + template , class Tag = optag1 > \ + class NAME##_second_archetype : public Base { \ + public: \ + NAME##_second_archetype(detail::dummy_constructor x) : Base(x) { } \ + }; \ + \ + template \ + boolean_archetype \ + operator OP (const NAME##_first_archetype&, \ + const NAME##_second_archetype&) \ + { \ + return boolean_archetype(static_object::get()); \ + } + + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(==, equal_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(!=, not_equal_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(<, less_than_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(<=, less_equal_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(>, greater_than_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(>=, greater_equal_op) + +#define BOOST_DEFINE_OPERATOR_ARCHETYPE(OP, NAME) \ + template > \ + class NAME##_archetype : public Base { \ + public: \ + NAME##_archetype(detail::dummy_constructor x) : Base(x) { } \ + NAME##_archetype(const NAME##_archetype&) \ + : Base(static_object::get()) { } \ + NAME##_archetype& operator=(const NAME##_archetype&) { return *this; } \ + }; \ + template \ + NAME##_archetype \ + operator OP (const NAME##_archetype&,\ + const NAME##_archetype&) \ + { \ + return \ + NAME##_archetype(static_object::get()); \ + } + + BOOST_DEFINE_OPERATOR_ARCHETYPE(+, addable) + BOOST_DEFINE_OPERATOR_ARCHETYPE(-, subtractable) + BOOST_DEFINE_OPERATOR_ARCHETYPE(*, multipliable) + BOOST_DEFINE_OPERATOR_ARCHETYPE(/, dividable) + BOOST_DEFINE_OPERATOR_ARCHETYPE(%, modable) + + // As is, these are useless because of the return type. + // Need to invent a better way... +#define BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(OP, NAME) \ + template > \ + class NAME##_first_archetype : public Base { \ + public: \ + NAME##_first_archetype(detail::dummy_constructor x) : Base(x) { } \ + }; \ + \ + template > \ + class NAME##_second_archetype : public Base { \ + public: \ + NAME##_second_archetype(detail::dummy_constructor x) : Base(x) { } \ + }; \ + \ + template \ + Return \ + operator OP (const NAME##_first_archetype&, \ + const NAME##_second_archetype&) \ + { \ + return Return(static_object::get()); \ + } + + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(+, plus_op) + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(*, time_op) + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(/, divide_op) + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(-, subtract_op) + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(%, mod_op) + + //=========================================================================== + // Function Object Archetype Classes + + template + class generator_archetype { + public: + const Return& operator()() { + return static_object::get(); + } + }; + + class void_generator_archetype { + public: + void operator()() { } + }; + + template + class unary_function_archetype { + private: + unary_function_archetype() { } + public: + unary_function_archetype(detail::dummy_constructor) { } + const Return& operator()(const Arg&) const { + return static_object::get(); + } + }; + + template + class binary_function_archetype { + private: + binary_function_archetype() { } + public: + binary_function_archetype(detail::dummy_constructor) { } + const Return& operator()(const Arg1&, const Arg2&) const { + return static_object::get(); + } + }; + + template + class unary_predicate_archetype { + typedef boolean_archetype Return; + unary_predicate_archetype() { } + public: + unary_predicate_archetype(detail::dummy_constructor) { } + const Return& operator()(const Arg&) const { + return static_object::get(); + } + }; + + template > + class binary_predicate_archetype { + typedef boolean_archetype Return; + binary_predicate_archetype() { } + public: + binary_predicate_archetype(detail::dummy_constructor) { } + const Return& operator()(const Arg1&, const Arg2&) const { + return static_object::get(); + } + }; + + //=========================================================================== + // Iterator Archetype Classes + + template + class input_iterator_archetype + { + private: + typedef input_iterator_archetype self; + public: + typedef std::input_iterator_tag iterator_category; + typedef T value_type; + struct reference { + operator const value_type&() const { return static_object::get(); } + }; + typedef const T* pointer; + typedef std::ptrdiff_t difference_type; + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return reference(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + class input_iterator_archetype_no_proxy + { + private: + typedef input_iterator_archetype_no_proxy self; + public: + typedef std::input_iterator_tag iterator_category; + typedef T value_type; + typedef const T& reference; + typedef const T* pointer; + typedef std::ptrdiff_t difference_type; + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + struct output_proxy { + output_proxy& operator=(const T&) { return *this; } + }; + + template + class output_iterator_archetype + { + public: + typedef output_iterator_archetype self; + public: + typedef std::output_iterator_tag iterator_category; + typedef output_proxy value_type; + typedef output_proxy reference; + typedef void pointer; + typedef void difference_type; + output_iterator_archetype(detail::dummy_constructor) { } + output_iterator_archetype(const self&) { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return output_proxy(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + private: + output_iterator_archetype() { } + }; + + template + class input_output_iterator_archetype + { + private: + typedef input_output_iterator_archetype self; + struct in_out_tag : public std::input_iterator_tag, public std::output_iterator_tag { }; + public: + typedef in_out_tag iterator_category; + typedef T value_type; + struct reference { + reference& operator=(const T&) { return *this; } + operator value_type() { return static_object::get(); } + }; + typedef const T* pointer; + typedef std::ptrdiff_t difference_type; + input_output_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return reference(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + class forward_iterator_archetype + { + public: + typedef forward_iterator_archetype self; + public: + typedef std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef const T& reference; + typedef T const* pointer; + typedef std::ptrdiff_t difference_type; + forward_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + class mutable_forward_iterator_archetype + { + public: + typedef mutable_forward_iterator_archetype self; + public: + typedef std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + mutable_forward_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + class bidirectional_iterator_archetype + { + public: + typedef bidirectional_iterator_archetype self; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef T value_type; + typedef const T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + bidirectional_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + self& operator--() { return *this; } + self operator--(int) { return *this; } + }; + + template + class mutable_bidirectional_iterator_archetype + { + public: + typedef mutable_bidirectional_iterator_archetype self; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + mutable_bidirectional_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + self& operator--() { return *this; } + self operator--(int) { return *this; } + }; + + template + class random_access_iterator_archetype + { + public: + typedef random_access_iterator_archetype self; + public: + typedef std::random_access_iterator_tag iterator_category; + typedef T value_type; + typedef const T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + random_access_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + self& operator--() { return *this; } + self operator--(int) { return *this; } + reference operator[](difference_type) const + { return static_object::get(); } + self& operator+=(difference_type) { return *this; } + self& operator-=(difference_type) { return *this; } + difference_type operator-(const self&) const + { return difference_type(); } + self operator+(difference_type) const { return *this; } + self operator-(difference_type) const { return *this; } + bool operator<(const self&) const { return true; } + bool operator<=(const self&) const { return true; } + bool operator>(const self&) const { return true; } + bool operator>=(const self&) const { return true; } + }; + template + random_access_iterator_archetype + operator+(typename random_access_iterator_archetype::difference_type, + const random_access_iterator_archetype& x) + { return x; } + + + template + class mutable_random_access_iterator_archetype + { + public: + typedef mutable_random_access_iterator_archetype self; + public: + typedef std::random_access_iterator_tag iterator_category; + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + mutable_random_access_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + self& operator--() { return *this; } + self operator--(int) { return *this; } + reference operator[](difference_type) const + { return static_object::get(); } + self& operator+=(difference_type) { return *this; } + self& operator-=(difference_type) { return *this; } + difference_type operator-(const self&) const + { return difference_type(); } + self operator+(difference_type) const { return *this; } + self operator-(difference_type) const { return *this; } + bool operator<(const self&) const { return true; } + bool operator<=(const self&) const { return true; } + bool operator>(const self&) const { return true; } + bool operator>=(const self&) const { return true; } + }; + template + mutable_random_access_iterator_archetype + operator+ + (typename mutable_random_access_iterator_archetype::difference_type, + const mutable_random_access_iterator_archetype& x) + { return x; } + +} // namespace boost + +#endif // BOOST_CONCEPT_ARCHETYPES_H diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept_check.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept_check.hpp new file mode 100644 index 0000000000..58bd8b2b9c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept_check.hpp @@ -0,0 +1,1045 @@ +// +// (C) Copyright Jeremy Siek 2000. +// Copyright 2002 The Trustees of Indiana University. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Revision History: +// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek) +// 02 April 2001: Removed limits header altogether. (Jeremy Siek) +// 01 April 2001: Modified to use new header. (JMaddock) +// + +// See http://www.boost.org/libs/concept_check for documentation. + +#ifndef BOOST_CONCEPT_CHECKS_HPP +# define BOOST_CONCEPT_CHECKS_HPP + +# include + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include + +namespace boost +{ + + // + // Backward compatibility + // + + template + inline void function_requires(Model* = 0) + { + BOOST_CONCEPT_ASSERT((Model)); + } + template inline void ignore_unused_variable_warning(T const&) {} + +# define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + + + // + // Begin concept definitions + // + BOOST_concept(Integer, (T)) + { + BOOST_CONCEPT_USAGE(Integer) + { + x.error_type_must_be_an_integer_type(); + } + private: + T x; + }; + + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct Integer< ::boost::long_long_type> {}; + template <> struct Integer< ::boost::ulong_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct Integer<__int64> {}; + template <> struct Integer {}; +# endif + + BOOST_concept(SignedInteger,(T)) { + BOOST_CONCEPT_USAGE(SignedInteger) { + x.error_type_must_be_a_signed_integer_type(); + } + private: + T x; + }; + template <> struct SignedInteger { }; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct SignedInteger< ::boost::long_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct SignedInteger<__int64> {}; +# endif + + BOOST_concept(UnsignedInteger,(T)) { + BOOST_CONCEPT_USAGE(UnsignedInteger) { + x.error_type_must_be_an_unsigned_integer_type(); + } + private: + T x; + }; + + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct UnsignedInteger {}; +# endif + + //=========================================================================== + // Basic Concepts + + BOOST_concept(DefaultConstructible,(TT)) + { + BOOST_CONCEPT_USAGE(DefaultConstructible) { + TT a; // require default constructor + ignore_unused_variable_warning(a); + } + }; + + BOOST_concept(Assignable,(TT)) + { + BOOST_CONCEPT_USAGE(Assignable) { +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = a; // require assignment operator +#endif + const_constraints(a); + } + private: + void const_constraints(const TT& b) { +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = b; // const required for argument to assignment +#else + ignore_unused_variable_warning(b); +#endif + } + private: + TT a; + }; + + + BOOST_concept(CopyConstructible,(TT)) + { + BOOST_CONCEPT_USAGE(CopyConstructible) { + TT a(b); // require copy constructor + TT* ptr = &a; // require address of operator + const_constraints(a); + ignore_unused_variable_warning(ptr); + } + private: + void const_constraints(const TT& a) { + TT c(a); // require const copy constructor + const TT* ptr = &a; // require const address of operator + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(ptr); + } + TT b; + }; + +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 ) // default constructor could not be generated +# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required +#endif + // The SGI STL version of Assignable requires copy constructor and operator= + BOOST_concept(SGIAssignable,(TT)) + { + BOOST_CONCEPT_USAGE(SGIAssignable) { + TT b(a); +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = a; // require assignment operator +#endif + const_constraints(a); + ignore_unused_variable_warning(b); + } + private: + void const_constraints(const TT& b) { + TT c(b); +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = b; // const required for argument to assignment +#endif + ignore_unused_variable_warning(c); + } + TT a; + }; +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif + + BOOST_concept(Convertible,(X)(Y)) + { + BOOST_CONCEPT_USAGE(Convertible) { + Y y = x; + ignore_unused_variable_warning(y); + } + private: + X x; + }; + + // The C++ standard requirements for many concepts talk about return + // types that must be "convertible to bool". The problem with this + // requirement is that it leaves the door open for evil proxies that + // define things like operator|| with strange return types. Two + // possible solutions are: + // 1) require the return type to be exactly bool + // 2) stay with convertible to bool, and also + // specify stuff about all the logical operators. + // For now we just test for convertible to bool. + template + void require_boolean_expr(const TT& t) { + bool x = t; + ignore_unused_variable_warning(x); + } + + BOOST_concept(EqualityComparable,(TT)) + { + BOOST_CONCEPT_USAGE(EqualityComparable) { + require_boolean_expr(a == b); + require_boolean_expr(a != b); + } + private: + TT a, b; + }; + + BOOST_concept(LessThanComparable,(TT)) + { + BOOST_CONCEPT_USAGE(LessThanComparable) { + require_boolean_expr(a < b); + } + private: + TT a, b; + }; + + // This is equivalent to SGI STL's LessThanComparable. + BOOST_concept(Comparable,(TT)) + { + BOOST_CONCEPT_USAGE(Comparable) { + require_boolean_expr(a < b); + require_boolean_expr(a > b); + require_boolean_expr(a <= b); + require_boolean_expr(a >= b); + } + private: + TT a, b; + }; + +#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \ + BOOST_concept(NAME, (First)(Second)) \ + { \ + BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ + private: \ + bool constraints_() { return a OP b; } \ + First a; \ + Second b; \ + } + +#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \ + BOOST_concept(NAME, (Ret)(First)(Second)) \ + { \ + BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ + private: \ + Ret constraints_() { return a OP b; } \ + First a; \ + Second b; \ + } + + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp); + + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp); + + //=========================================================================== + // Function Object Concepts + + BOOST_concept(Generator,(Func)(Return)) + { + BOOST_CONCEPT_USAGE(Generator) { test(is_void()); } + + private: + void test(boost::mpl::false_) + { + // Do we really want a reference here? + const Return& r = f(); + ignore_unused_variable_warning(r); + } + + void test(boost::mpl::true_) + { + f(); + } + + Func f; + }; + + BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) + { + BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void()); } + + private: + void test(boost::mpl::false_) + { + f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) + Return r = f(arg); + ignore_unused_variable_warning(r); + } + + void test(boost::mpl::true_) + { + f(arg); + } + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy construktor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::UnaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + UnaryFunction(); +#endif + + Func f; + Arg arg; + }; + + BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second)) + { + BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void()); } + private: + void test(boost::mpl::false_) + { + f(first,second); + Return r = f(first, second); // require operator() + (void)r; + } + + void test(boost::mpl::true_) + { + f(first,second); + } + + Func f; + First first; + Second second; + }; + + BOOST_concept(UnaryPredicate,(Func)(Arg)) + { + BOOST_CONCEPT_USAGE(UnaryPredicate) { + require_boolean_expr(f(arg)); // require operator() returning bool + } + private: + Func f; + Arg arg; + }; + + BOOST_concept(BinaryPredicate,(Func)(First)(Second)) + { + BOOST_CONCEPT_USAGE(BinaryPredicate) { + require_boolean_expr(f(a, b)); // require operator() returning bool + } + private: + Func f; + First a; + Second b; + }; + + // use this when functor is used inside a container class like std::set + BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) + : BinaryPredicate + { + BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { + const_constraints(f); + } + private: + void const_constraints(const Func& fun) { + // operator() must be a const member function + require_boolean_expr(fun(a, b)); + } + Func f; + First a; + Second b; + }; + + BOOST_concept(AdaptableGenerator,(Func)(Return)) + : Generator + { + typedef typename Func::result_type result_type; + + BOOST_CONCEPT_USAGE(AdaptableGenerator) + { + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg)) + : UnaryFunction + { + typedef typename Func::argument_type argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableUnaryFunction() + { + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second)) + : BinaryFunction< + Func + , typename Func::result_type + , typename Func::first_argument_type + , typename Func::second_argument_type + > + { + typedef typename Func::first_argument_type first_argument_type; + typedef typename Func::second_argument_type second_argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableBinaryFunction() + { + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptablePredicate,(Func)(Arg)) + : UnaryPredicate + , AdaptableUnaryFunction + { + }; + + BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second)) + : BinaryPredicate + , AdaptableBinaryFunction + { + }; + + //=========================================================================== + // Iterator Concepts + + BOOST_concept(InputIterator,(TT)) + : Assignable + , EqualityComparable + { + typedef typename boost::detail::iterator_traits::value_type value_type; + typedef typename boost::detail::iterator_traits::difference_type difference_type; + typedef typename boost::detail::iterator_traits::reference reference; + typedef typename boost::detail::iterator_traits::pointer pointer; + typedef typename boost::detail::iterator_traits::iterator_category iterator_category; + + BOOST_CONCEPT_USAGE(InputIterator) + { + BOOST_CONCEPT_ASSERT((SignedInteger)); + BOOST_CONCEPT_ASSERT((Convertible)); + + TT j(i); + (void)*i; // require dereference operator + ++j; // require preincrement operator + i++; // require postincrement operator + } + private: + TT i; + }; + + BOOST_concept(OutputIterator,(TT)(ValueT)) + : Assignable + { + BOOST_CONCEPT_USAGE(OutputIterator) { + + ++i; // require preincrement operator + i++; // require postincrement operator + *i++ = t; // require postincrement and assignment + } + private: + TT i, j; + ValueT t; + }; + + BOOST_concept(ForwardIterator,(TT)) + : InputIterator + { + BOOST_CONCEPT_USAGE(ForwardIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category + , std::forward_iterator_tag + >)); + + typename InputIterator::reference r = *i; + ignore_unused_variable_warning(r); + } + + private: + TT i; + }; + + BOOST_concept(Mutable_ForwardIterator,(TT)) + : ForwardIterator + { + BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { + *i++ = *i; // require postincrement and assignment + } + private: + TT i; + }; + + BOOST_concept(BidirectionalIterator,(TT)) + : ForwardIterator + { + BOOST_CONCEPT_USAGE(BidirectionalIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category + , std::bidirectional_iterator_tag + >)); + + --i; // require predecrement operator + i--; // require postdecrement operator + } + private: + TT i; + }; + + BOOST_concept(Mutable_BidirectionalIterator,(TT)) + : BidirectionalIterator + , Mutable_ForwardIterator + { + BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) + { + *i-- = *i; // require postdecrement and assignment + } + private: + TT i; + }; + + BOOST_concept(RandomAccessIterator,(TT)) + : BidirectionalIterator + , Comparable + { + BOOST_CONCEPT_USAGE(RandomAccessIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category + , std::random_access_iterator_tag + >)); + + i += n; // require assignment addition operator + i = i + n; i = n + i; // require addition with difference type + i -= n; // require assignment subtraction operator + i = i - n; // require subtraction with difference type + n = i - j; // require difference operator + (void)i[n]; // require element access operator + } + + private: + TT a, b; + TT i, j; + typename boost::detail::iterator_traits::difference_type n; + }; + + BOOST_concept(Mutable_RandomAccessIterator,(TT)) + : RandomAccessIterator + , Mutable_BidirectionalIterator + { + BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator) + { + i[n] = *i; // require element access and assignment + } + private: + TT i; + typename boost::detail::iterator_traits::difference_type n; + }; + + //=========================================================================== + // Container s + + BOOST_concept(Container,(C)) + : Assignable + { + typedef typename C::value_type value_type; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + typedef typename C::const_pointer const_pointer; + typedef typename C::const_iterator const_iterator; + + BOOST_CONCEPT_USAGE(Container) + { + BOOST_CONCEPT_ASSERT((InputIterator)); + const_constraints(c); + } + + private: + void const_constraints(const C& cc) { + i = cc.begin(); + i = cc.end(); + n = cc.size(); + n = cc.max_size(); + b = cc.empty(); + } + C c; + bool b; + const_iterator i; + size_type n; + }; + + BOOST_concept(Mutable_Container,(C)) + : Container + { + typedef typename C::reference reference; + typedef typename C::iterator iterator; + typedef typename C::pointer pointer; + + BOOST_CONCEPT_USAGE(Mutable_Container) + { + BOOST_CONCEPT_ASSERT(( + Assignable)); + + BOOST_CONCEPT_ASSERT((InputIterator)); + + i = c.begin(); + i = c.end(); + c.swap(c2); + } + + private: + iterator i; + C c, c2; + }; + + BOOST_concept(ForwardContainer,(C)) + : Container + { + BOOST_CONCEPT_USAGE(ForwardContainer) + { + BOOST_CONCEPT_ASSERT(( + ForwardIterator< + typename ForwardContainer::const_iterator + >)); + } + }; + + BOOST_concept(Mutable_ForwardContainer,(C)) + : ForwardContainer + , Mutable_Container + { + BOOST_CONCEPT_USAGE(Mutable_ForwardContainer) + { + BOOST_CONCEPT_ASSERT(( + Mutable_ForwardIterator< + typename Mutable_ForwardContainer::iterator + >)); + } + }; + + BOOST_concept(ReversibleContainer,(C)) + : ForwardContainer + { + typedef typename + C::const_reverse_iterator + const_reverse_iterator; + + BOOST_CONCEPT_USAGE(ReversibleContainer) + { + BOOST_CONCEPT_ASSERT(( + BidirectionalIterator< + typename ReversibleContainer::const_iterator>)); + + BOOST_CONCEPT_ASSERT((BidirectionalIterator)); + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reverse_iterator i = cc.rbegin(); + i = cc.rend(); + } + C c; + }; + + BOOST_concept(Mutable_ReversibleContainer,(C)) + : Mutable_ForwardContainer + , ReversibleContainer + { + typedef typename C::reverse_iterator reverse_iterator; + + BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) + { + typedef typename Mutable_ForwardContainer::iterator iterator; + BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); + BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); + + reverse_iterator i = c.rbegin(); + i = c.rend(); + } + private: + C c; + }; + + BOOST_concept(RandomAccessContainer,(C)) + : ReversibleContainer + { + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + + BOOST_CONCEPT_USAGE(RandomAccessContainer) + { + BOOST_CONCEPT_ASSERT(( + RandomAccessIterator< + typename RandomAccessContainer::const_iterator + >)); + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reference r = cc[n]; + ignore_unused_variable_warning(r); + } + + C c; + size_type n; + }; + + BOOST_concept(Mutable_RandomAccessContainer,(C)) + : Mutable_ReversibleContainer + , RandomAccessContainer + { + private: + typedef Mutable_RandomAccessContainer self; + public: + BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer) + { + BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); + BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); + + typename self::reference r = c[i]; + ignore_unused_variable_warning(r); + } + + private: + typename Mutable_ReversibleContainer::size_type i; + C c; + }; + + // A Sequence is inherently mutable + BOOST_concept(Sequence,(S)) + : Mutable_ForwardContainer + // Matt Austern's book puts DefaultConstructible here, the C++ + // standard places it in Container --JGS + // ... so why aren't we following the standard? --DWA + , DefaultConstructible + { + BOOST_CONCEPT_USAGE(Sequence) + { + S + c(n), + c2(n, t), + c3(first, last); + + c.insert(p, t); + c.insert(p, n, t); + c.insert(p, first, last); + + c.erase(p); + c.erase(p, q); + + typename Sequence::reference r = c.front(); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(c3); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& c) { + typename Sequence::const_reference r = c.front(); + ignore_unused_variable_warning(r); + } + + typename S::value_type t; + typename S::size_type n; + typename S::value_type* first, *last; + typename S::iterator p, q; + }; + + BOOST_concept(FrontInsertionSequence,(S)) + : Sequence + { + BOOST_CONCEPT_USAGE(FrontInsertionSequence) + { + c.push_front(t); + c.pop_front(); + } + private: + S c; + typename S::value_type t; + }; + + BOOST_concept(BackInsertionSequence,(S)) + : Sequence + { + BOOST_CONCEPT_USAGE(BackInsertionSequence) + { + c.push_back(t); + c.pop_back(); + typename BackInsertionSequence::reference r = c.back(); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& cc) { + typename BackInsertionSequence::const_reference + r = cc.back(); + ignore_unused_variable_warning(r); + }; + S c; + typename S::value_type t; + }; + + BOOST_concept(AssociativeContainer,(C)) + : ForwardContainer + , DefaultConstructible + { + typedef typename C::key_type key_type; + typedef typename C::key_compare key_compare; + typedef typename C::value_compare value_compare; + typedef typename C::iterator iterator; + + BOOST_CONCEPT_USAGE(AssociativeContainer) + { + i = c.find(k); + r = c.equal_range(k); + c.erase(k); + c.erase(i); + c.erase(r.first, r.second); + const_constraints(c); + BOOST_CONCEPT_ASSERT((BinaryPredicate)); + + typedef typename AssociativeContainer::value_type value_type_; + BOOST_CONCEPT_ASSERT((BinaryPredicate)); + } + + // Redundant with the base concept, but it helps below. + typedef typename C::const_iterator const_iterator; + private: + void const_constraints(const C& cc) + { + ci = cc.find(k); + n = cc.count(k); + cr = cc.equal_range(k); + } + + C c; + iterator i; + std::pair r; + const_iterator ci; + std::pair cr; + typename C::key_type k; + typename C::size_type n; + }; + + BOOST_concept(UniqueAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) + { + C c(first, last); + + pos_flag = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + } + private: + std::pair pos_flag; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + BOOST_concept(MultipleAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) + { + C c(first, last); + + pos = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(pos); + } + private: + typename C::iterator pos; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + BOOST_concept(SimpleAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(SimpleAssociativeContainer) + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + BOOST_MPL_ASSERT((boost::is_same)); + } + }; + + BOOST_concept(PairAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(PairAssociativeContainer) + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + typedef typename C::mapped_type mapped_type; + typedef std::pair required_value_type; + BOOST_MPL_ASSERT((boost::is_same)); + } + }; + + BOOST_concept(SortedAssociativeContainer,(C)) + : AssociativeContainer + , ReversibleContainer + { + BOOST_CONCEPT_USAGE(SortedAssociativeContainer) + { + C + c(kc), + c2(first, last), + c3(first, last, kc); + + p = c.upper_bound(k); + p = c.lower_bound(k); + r = c.equal_range(k); + + c.insert(p, t); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(c3); + const_constraints(c); + } + + void const_constraints(const C& c) + { + kc = c.key_comp(); + vc = c.value_comp(); + + cp = c.upper_bound(k); + cp = c.lower_bound(k); + cr = c.equal_range(k); + } + + private: + typename C::key_compare kc; + typename C::value_compare vc; + typename C::value_type t; + typename C::key_type k; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + + typedef SortedAssociativeContainer self; + iterator p; + const_iterator cp; + std::pair r; + std::pair cr; + typename C::value_type* first, *last; + }; + + // HashedAssociativeContainer + + BOOST_concept(Collection,(C)) + { + BOOST_CONCEPT_USAGE(Collection) + { + boost::function_requires >(); + boost::function_requires >(); + boost::function_requires >(); + const_constraints(c); + i = c.begin(); + i = c.end(); + c.swap(c); + } + + void const_constraints(const C& c) { + ci = c.begin(); + ci = c.end(); + n = c.size(); + b = c.empty(); + } + + private: + typedef typename C::value_type value_type; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + typedef typename C::reference reference; + typedef typename C::const_reference const_reference; + // typedef typename C::pointer pointer; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + + C c; + bool b; + iterator i; + const_iterator ci; + size_type n; + }; +} // namespace boost + +# include + +#endif // BOOST_CONCEPT_CHECKS_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept_check/borland.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept_check/borland.hpp new file mode 100644 index 0000000000..107926bb31 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept_check/borland.hpp @@ -0,0 +1,25 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_CHECK_BORLAND_DWA2006429_HPP +# define BOOST_CONCEPT_CHECK_BORLAND_DWA2006429_HPP + +namespace boost { + +template +struct concept_check; + +template +struct concept_check +{ + enum { instantiate = sizeof((((Model*)0)->~Model()), 3) }; +}; + +# define BOOST_CONCEPT_ASSERT( ModelInParens ) \ + enum { BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + boost::concept_check::instantiate \ + } + +} // namespace boost::concept_checking + +#endif // BOOST_CONCEPT_CHECK_BORLAND_DWA2006429_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept_check/general.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept_check/general.hpp new file mode 100644 index 0000000000..cd09fb043e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept_check/general.hpp @@ -0,0 +1,82 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP +# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP + +# ifdef BOOST_OLD_CONCEPT_SUPPORT +# include +# include +# endif + + +// This implementation works on GCC and Comeau, but has actually been +// fairly carefully tuned to work on GCC versions starting with +// gcc-2.95.x. If you're trying to get an additional compiler to pass +// the tests you might consider breaking out a separate gcc.hpp and +// starting over on the general case. +namespace boost +{ + namespace concept_checking + { + template struct instantiate {}; + } + + template struct concept_check_; + + template + void concept_check_failed() + { + ((Model*)0)->~Model(); + } + + template + struct concept_check + { + concept_checking::instantiate > x; + enum { instantiate = 1 }; + }; + +# ifdef BOOST_OLD_CONCEPT_SUPPORT + + template + void constraint_check_failed() + { + ((Model*)0)->constraints(); + } + + template + struct constraint_check + { + concept_checking::instantiate > x; + enum { instantiate = 1 }; + }; + + template + struct concept_check_ + : mpl::if_c< + concept_checking::has_constraints::value + , constraint_check + , concept_check + >::type + {}; + +# else + + template + struct concept_check_ + : concept_check + {}; + +# endif + + // Usage, in class or function context: + // + // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept)); +# define BOOST_CONCEPT_ASSERT( ModelInParens ) \ + enum { BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + ::boost::concept_check_::instantiate \ + } +} + +#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept_check/has_constraints.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept_check/has_constraints.hpp new file mode 100644 index 0000000000..e19f664f62 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept_check/has_constraints.hpp @@ -0,0 +1,31 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP +# define BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP + +namespace boost { namespace concept_checking { + +// Here we implement the "metafunction" that detects whether a +// constraints metafunction exists +typedef char yes; +typedef char (&no)[2]; + +template +struct wrap_constraints {}; + +template +inline yes has_constraints_(Model*, wrap_constraints* = 0); +inline no has_constraints_(...); + +template +struct has_constraints +{ + BOOST_STATIC_CONSTANT( + bool + , value = sizeof( concept_checking::has_constraints_((Model*)0) ) == 1 ); +}; + +}} // namespace boost::concept_checking + +#endif // BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/concept_check/msvc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/concept_check/msvc.hpp new file mode 100644 index 0000000000..3968469a89 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/concept_check/msvc.hpp @@ -0,0 +1,90 @@ +// Copyright David Abrahams 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP +# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP + +# ifdef BOOST_OLD_CONCEPT_SUPPORT +# include +# include +# endif + + +namespace boost +{ + namespace concept_checking + { + template + struct concept_check_ + { + virtual void failed(Model* x) + { + x->~Model(); + } + }; + } + +# ifdef BOOST_OLD_CONCEPT_SUPPORT + + namespace concept_checking + { + template + struct constraint_check + { + virtual void failed(Model* x) + { + x->constraints(); + } + }; + } + + template + struct concept_check + : mpl::if_c< + concept_checking::has_constraints::value + , concept_checking::constraint_check + , concept_checking::concept_check_ + >::type + {}; + +# else + + template + struct concept_check + : concept_checking::concept_check_ + {}; + +# endif + +# if BOOST_WORKAROUND(BOOST_MSVC, == 1310) + + // + // The iterator library sees some really strange errors unless we + // use partial specialization to extract the model type with + // msvc-7.1 + // + template + struct concept_check + : concept_check + { }; + +# define BOOST_CONCEPT_ASSERT( ModelInParens ) \ + enum { BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + sizeof(::boost::concept_check) \ + } + +# else + + template + concept_check + concept_check_(void(*)(Model)); + +# define BOOST_CONCEPT_ASSERT( ModelInParens ) \ + enum { BOOST_PP_CAT(boost_concept_check,__LINE__) = \ + sizeof(::boost::concept_check_((void(*) ModelInParens)0)) \ + } + +# endif +} + +#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config.hpp new file mode 100644 index 0000000000..055a27855b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config.hpp @@ -0,0 +1,70 @@ +// Boost config.hpp configuration header file ------------------------------// + +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config +// +// CAUTION: This file is intended to be completely stable - +// DO NOT MODIFY THIS FILE! +// + +#ifndef BOOST_CONFIG_HPP +#define BOOST_CONFIG_HPP + +// if we don't have a user config, then use the default location: +#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) +# define BOOST_USER_CONFIG +#endif +// include it first: +#ifdef BOOST_USER_CONFIG +# include BOOST_USER_CONFIG +#endif + +// if we don't have a compiler config set, try and find one: +#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a compiler config, include it now: +#ifdef BOOST_COMPILER_CONFIG +# include BOOST_COMPILER_CONFIG +#endif + +// if we don't have a std library config set, try and find one: +#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a std library config, include it now: +#ifdef BOOST_STDLIB_CONFIG +# include BOOST_STDLIB_CONFIG +#endif + +// if we don't have a platform config set, try and find one: +#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a platform config, include it now: +#ifdef BOOST_PLATFORM_CONFIG +# include BOOST_PLATFORM_CONFIG +#endif + +// get config suffix code: +#include + +#endif // BOOST_CONFIG_HPP + + + + + + + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/abi/borland_prefix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/abi/borland_prefix.hpp new file mode 100644 index 0000000000..3a0e5ae2d7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/abi/borland_prefix.hpp @@ -0,0 +1,27 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// for C++ Builder the following options effect the ABI: +// +// -b (on or off - effect emum sizes) +// -Vx (on or off - empty members) +// -Ve (on or off - empty base classes) +// -aX (alignment - 5 options). +// -pX (Calling convention - 4 options) +// -VmX (member pointer size and layout - 5 options) +// -VC (on or off, changes name mangling) +// -Vl (on or off, changes struct layout). + +// In addition the following warnings are sufficiently annoying (and +// unfixable) to have them turned off by default: +// +// 8027 - functions containing [for|while] loops are not expanded inline +// 8026 - functions taking class by value arguments are not expanded inline + +#pragma nopushoptwarn +# pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/abi/borland_suffix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/abi/borland_suffix.hpp new file mode 100644 index 0000000000..940535f381 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/abi/borland_suffix.hpp @@ -0,0 +1,12 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# pragma option pop +#pragma nopushoptwarn + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/abi/msvc_prefix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/abi/msvc_prefix.hpp new file mode 100644 index 0000000000..97f06cdc0c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/abi/msvc_prefix.hpp @@ -0,0 +1,22 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// +// Boost binaries are built with the compiler's default ABI settings, +// if the user changes their default alignment in the VS IDE then their +// code will no longer be binary compatible with the bjam built binaries +// unless this header is included to force Boost code into a consistent ABI. +// +// Note that inclusion of this header is only necessary for libraries with +// separate source, header only libraries DO NOT need this as long as all +// translation units are built with the same options. +// +#if defined(_M_X64) +# pragma pack(push,16) +#else +# pragma pack(push,8) +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/abi/msvc_suffix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/abi/msvc_suffix.hpp new file mode 100644 index 0000000000..a64d783eb0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/abi/msvc_suffix.hpp @@ -0,0 +1,8 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#pragma pack(pop) + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/abi_prefix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/abi_prefix.hpp new file mode 100644 index 0000000000..3b1347492c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/abi_prefix.hpp @@ -0,0 +1,25 @@ +// abi_prefix header -------------------------------------------------------// + +// (c) Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# define BOOST_CONFIG_ABI_PREFIX_HPP +#else +# error double inclusion of header boost/config/abi_prefix.hpp is an error +#endif + +#include + +// this must occur after all other includes and before any code appears: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif + +#if defined( __BORLANDC__ ) +#pragma nopushoptwarn +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/abi_suffix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/abi_suffix.hpp new file mode 100644 index 0000000000..939161662a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/abi_suffix.hpp @@ -0,0 +1,27 @@ +// abi_sufffix header -------------------------------------------------------// + +// (c) Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +// This header should be #included AFTER code that was preceded by a #include +// . + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp +#else +# undef BOOST_CONFIG_ABI_PREFIX_HPP +#endif + +// the suffix header occurs after all of our code: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif + +#if defined( __BORLANDC__ ) +#pragma nopushoptwarn +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/auto_link.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/auto_link.hpp new file mode 100644 index 0000000000..e562caff7c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/auto_link.hpp @@ -0,0 +1,420 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + /* + * LOCATION: see http://www.boost.org for most recent version. + * FILE auto_link.hpp + * VERSION see + * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. + */ + +/************************************************************************* + +USAGE: +~~~~~~ + +Before including this header you must define one or more of define the following macros: + +BOOST_LIB_NAME: Required: A string containing the basename of the library, + for example boost_regex. +BOOST_LIB_TOOLSET: Optional: the base name of the toolset. +BOOST_DYN_LINK: Optional: when set link to dll rather than static library. +BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name + of the library selected (useful for debugging). +BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, + rather than a mangled-name version. +BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option. + This is essentially the same as the default name-mangled version, but without + the compiler name and version, or the Boost version. Just the build options. + +These macros will be undef'ed at the end of the header, further this header +has no include guards - so be sure to include it only once from your library! + +Algorithm: +~~~~~~~~~~ + +Libraries for Borland and Microsoft compilers are automatically +selected here, the name of the lib is selected according to the following +formula: + +BOOST_LIB_PREFIX + + BOOST_LIB_NAME + + "_" + + BOOST_LIB_TOOLSET + + BOOST_LIB_THREAD_OPT + + BOOST_LIB_RT_OPT + "-" + + BOOST_LIB_VERSION + +These are defined as: + +BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". + +BOOST_LIB_NAME: The base name of the lib ( for example boost_regex). + +BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). + +BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. + +BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, + contains one or more of the following letters after + a hiphen: + + s static runtime (dynamic if not present). + g debug/diagnostic runtime (release if not present). + y Python debug/diagnostic runtime (release if not present). + d debug build (release if not present). + g debug/diagnostic runtime (release if not present). + p STLPort Build. + +BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. + + +***************************************************************************/ + +#ifdef __cplusplus +# ifndef BOOST_CONFIG_HPP +# include +# endif +#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) +// +// C language compatability (no, honestly) +// +# define BOOST_MSVC _MSC_VER +# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +# define BOOST_DO_STRINGIZE(X) #X +#endif +// +// Only include what follows for known and supported compilers: +// +#if defined(BOOST_MSVC) \ + || defined(__BORLANDC__) \ + || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ + || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) + +#ifndef BOOST_VERSION_HPP +# include +#endif + +#ifndef BOOST_LIB_NAME +# error "Macro BOOST_LIB_NAME not set (internal error)" +#endif + +// +// error check: +// +#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG) +# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors") +# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes") +# error "Incompatible build options" +#endif +// +// select toolset if not defined already: +// +#ifndef BOOST_LIB_TOOLSET +// Note: no compilers before 1200 are supported +#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) + +# ifdef UNDER_CE + // vc6: +# define BOOST_LIB_TOOLSET "evc4" +# else + // vc6: +# define BOOST_LIB_TOOLSET "vc6" +# endif + +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300) + + // vc7: +# define BOOST_LIB_TOOLSET "vc7" + +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310) + + // vc71: +# define BOOST_LIB_TOOLSET "vc71" + +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400) + + // vc80: +# define BOOST_LIB_TOOLSET "vc80" + +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1500) + + // vc90: +# define BOOST_LIB_TOOLSET "vc90" + +#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1600) + + // vc10: +# define BOOST_LIB_TOOLSET "vc100" + +#elif defined(__BORLANDC__) + + // CBuilder 6: +# define BOOST_LIB_TOOLSET "bcb" + +#elif defined(__ICL) + + // Intel C++, no version number: +# define BOOST_LIB_TOOLSET "iw" + +#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) + + // Metrowerks CodeWarrior 8.x +# define BOOST_LIB_TOOLSET "cw8" + +#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) + + // Metrowerks CodeWarrior 9.x +# define BOOST_LIB_TOOLSET "cw9" + +#endif +#endif // BOOST_LIB_TOOLSET + +// +// select thread opt: +// +#if defined(_MT) || defined(__MT__) +# define BOOST_LIB_THREAD_OPT "-mt" +#else +# define BOOST_LIB_THREAD_OPT +#endif + +#if defined(_MSC_VER) || defined(__MWERKS__) + +# ifdef _DLL + +# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydp" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-gdp" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydp" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gdp" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-p" +# endif + +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydpn" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-gdpn" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gydpn" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gdpn" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-pn" +# endif + +# else + +# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-gyd" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gd" +# else +# define BOOST_LIB_RT_OPT +# endif + +# endif + +# else + +# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydp" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-sgdp" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydp" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgdp" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-sp" +# endif + +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydpn" +# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-sgdpn" +# elif defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgydpn" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgdpn" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-spn" +# endif + +# else + +# if defined(_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sgyd" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgd" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +# endif + +#elif defined(__BORLANDC__) + +// +// figure out whether we want the debug builds or not: +// +#if __BORLANDC__ > 0x561 +#pragma defineonoption BOOST_BORLAND_DEBUG -v +#endif +// +// sanity check: +// +#if defined(__STL_DEBUG) || defined(_STLP_DEBUG) +#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form" +#endif + +# ifdef _RTLDLL + +# if defined(BOOST_BORLAND_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-yd" +# elif defined(BOOST_BORLAND_DEBUG) +# define BOOST_LIB_RT_OPT "-d" +# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT -y +# else +# define BOOST_LIB_RT_OPT +# endif + +# else + +# if defined(BOOST_BORLAND_DEBUG)\ + && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-syd" +# elif defined(BOOST_BORLAND_DEBUG) +# define BOOST_LIB_RT_OPT "-sd" +# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) +# define BOOST_LIB_RT_OPT "-sy" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +#endif + +// +// select linkage opt: +// +#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK) +# define BOOST_LIB_PREFIX +#elif defined(BOOST_DYN_LINK) +# error "Mixing a dll boost library with a static runtime is a really bad idea..." +#else +# define BOOST_LIB_PREFIX "lib" +#endif + +// +// now include the lib: +// +#if defined(BOOST_LIB_NAME) \ + && defined(BOOST_LIB_PREFIX) \ + && defined(BOOST_LIB_TOOLSET) \ + && defined(BOOST_LIB_THREAD_OPT) \ + && defined(BOOST_LIB_RT_OPT) \ + && defined(BOOST_LIB_VERSION) + +#ifdef BOOST_AUTO_LINK_TAGGED +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# endif +#elif defined(BOOST_AUTO_LINK_NOMANGLE) +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# endif +#else +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# endif +#endif + +#else +# error "some required macros where not defined (internal logic error)." +#endif + + +#endif // _MSC_VER || __BORLANDC__ + +// +// finally undef any macros we may have set: +// +#ifdef BOOST_LIB_PREFIX +# undef BOOST_LIB_PREFIX +#endif +#if defined(BOOST_LIB_NAME) +# undef BOOST_LIB_NAME +#endif +// Don't undef this one: it can be set by the user and should be the +// same for all libraries: +//#if defined(BOOST_LIB_TOOLSET) +//# undef BOOST_LIB_TOOLSET +//#endif +#if defined(BOOST_LIB_THREAD_OPT) +# undef BOOST_LIB_THREAD_OPT +#endif +#if defined(BOOST_LIB_RT_OPT) +# undef BOOST_LIB_RT_OPT +#endif +#if defined(BOOST_LIB_LINK_OPT) +# undef BOOST_LIB_LINK_OPT +#endif +#if defined(BOOST_LIB_DEBUG_OPT) +# undef BOOST_LIB_DEBUG_OPT +#endif +#if defined(BOOST_DYN_LINK) +# undef BOOST_DYN_LINK +#endif +#if defined(BOOST_AUTO_LINK_NOMANGLE) +# undef BOOST_AUTO_LINK_NOMANGLE +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/borland.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/borland.hpp new file mode 100644 index 0000000000..a989fd633b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/borland.hpp @@ -0,0 +1,277 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Borland C++ compiler setup: + +// +// versions check: +// we don't support Borland prior to version 5.4: +#if __BORLANDC__ < 0x540 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// last known compiler version: +#if (__BORLANDC__ > 0x613) +//# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +//# else +//# pragma message( "Unknown compiler version - please run the configure tests and report the results") +//# endif +#elif (__BORLANDC__ == 0x600) +# error "CBuilderX preview compiler is no longer supported" +#endif + +// +// Support macros to help with standard library detection +#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) +# define BOOST_BCB_WITH_ROGUE_WAVE +#elif __BORLANDC__ < 0x570 +# define BOOST_BCB_WITH_STLPORT +#else +# define BOOST_BCB_WITH_DINKUMWARE +#endif + +// +// Version 5.0 and below: +# if __BORLANDC__ <= 0x0550 +// Borland C++Builder 4 and 5: +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# if __BORLANDC__ == 0x0550 +// Borland C++Builder 5, command-line compiler 5.5: +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# endif +// Variadic macros do not exist for C++ Builder versions 5 and below +#define BOOST_NO_VARIADIC_MACROS +# endif + +// Version 5.51 and below: +#if (__BORLANDC__ <= 0x551) +# define BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# define BOOST_NO_DEDUCED_TYPENAME +// workaround for missing WCHAR_MAX/WCHAR_MIN: +#include +#include +#ifndef WCHAR_MAX +# define WCHAR_MAX 0xffff +#endif +#ifndef WCHAR_MIN +# define WCHAR_MIN 0 +#endif +#endif + +// Borland C++ Builder 6 and below: +#if (__BORLANDC__ <= 0x564) + +# ifdef NDEBUG + // fix broken so that Boost.test works: +# include +# undef strcmp +# endif + // fix broken errno declaration: +# include +# ifndef errno +# define errno errno +# endif + +#endif + +// +// new bug in 5.61: +#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) + // this seems to be needed by the command line compiler, but not the IDE: +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +#endif + +// Borland C++ Builder 2006 Update 2 and below: +#if (__BORLANDC__ <= 0x582) +# define BOOST_NO_SFINAE +# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +# define BOOST_NO_TEMPLATE_TEMPLATES + +# define BOOST_NO_PRIVATE_IN_AGGREGATE + +# ifdef _WIN32 +# define BOOST_NO_SWPRINTF +# elif defined(linux) || defined(__linux__) || defined(__linux) + // we should really be able to do without this + // but the wcs* functions aren't imported into std:: +# define BOOST_NO_STDC_NAMESPACE + // _CPPUNWIND doesn't get automatically set for some reason: +# pragma defineonoption BOOST_CPPUNWIND -x +# endif +#endif + +#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info + // we shouldn't really need this - but too many things choke + // without it, this needs more investigation: +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_IS_ABSTRACT +# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS +# define BOOST_NO_USING_TEMPLATE +# define BOOST_SP_NO_SP_CONVERTIBLE + +// Temporary workaround +#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif + +// Borland C++ Builder 2008 and below: +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +# define BOOST_NO_NESTED_FRIENDSHIP +# define BOOST_NO_TYPENAME_WITH_CTOR +#if (__BORLANDC__ < 0x600) +# define BOOST_ILLEGAL_CV_REFERENCES +#endif + +// +// Positive Feature detection +// +// Borland C++ Builder 2008 and below: +#if (__BORLANDC__ >= 0x599) +# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax +#endif +// +// C++0x Macros: +// +#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) +# define BOOST_NO_CHAR16_T +# define BOOST_NO_CHAR32_T +# define BOOST_NO_DECLTYPE +# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_EXTERN_TEMPLATE +# define BOOST_NO_RVALUE_REFERENCES +# define BOOST_NO_SCOPED_ENUMS +# define BOOST_NO_STATIC_ASSERT +#else +# define BOOST_HAS_ALIGNOF +# define BOOST_HAS_CHAR16_T +# define BOOST_HAS_CHAR32_T +# define BOOST_HAS_DECLTYPE +# define BOOST_HAS_EXPLICIT_CONVERSION_OPS +# define BOOST_HAS_REF_QUALIFIER +# define BOOST_HAS_RVALUE_REFS +# define BOOST_HAS_STATIC_ASSERT +#endif + +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported +#define BOOST_NO_VARIADIC_TEMPLATES + +#if __BORLANDC__ >= 0x590 +# define BOOST_HAS_TR1_HASH + +# define BOOST_HAS_MACRO_USE_FACET +#endif + +// +// Post 0x561 we have long long and stdint.h: +#if __BORLANDC__ >= 0x561 +# ifndef __NO_LONG_LONG +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif + // On non-Win32 platforms let the platform config figure this out: +# ifdef _WIN32 +# define BOOST_HAS_STDINT_H +# endif +#endif + +// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is +// defined, then we have 0x560 or greater with the Rogue Wave implementation +// which presumably has the std::DBL_MAX bug. +#if defined( BOOST_BCB_WITH_ROGUE_WAVE ) +// is partly broken, some macros define symbols that are really in +// namespace std, so you end up having to use illegal constructs like +// std::DBL_MAX, as a fix we'll just include float.h and have done with: +#include +#endif +// +// __int64: +// +#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#ifndef __STRICT_ANSI__ +# define BOOST_HAS_DIRENT_H +#endif +// +// all versions support __declspec: +// +#if defined(__STRICT_ANSI__) +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif +// +// ABI fixing headers: +// +#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" +#endif +#endif +// +// Disable Win32 support in ANSI mode: +// +#if __BORLANDC__ < 0x600 +# pragma defineonoption BOOST_DISABLE_WIN32 -A +#elif defined(__STRICT_ANSI__) +# define BOOST_DISABLE_WIN32 +#endif +// +// MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif + +// Borland did not implement value-initialization completely, as I reported +// in 2007, Borland Report 51854, "Value-initialization: POD struct should be +// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, April 2010) +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION + +#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/clang.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/clang.hpp new file mode 100644 index 0000000000..2ce6773266 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/clang.hpp @@ -0,0 +1,63 @@ +// (C) Copyright Douglas Gregor 2010 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Clang compiler setup. + +#if __has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) +#else +# define BOOST_NO_EXCEPTIONS +#endif + +#if __has_feature(cxx_rtti) +#else +# define BOOST_NO_RTTI +#endif + +#if defined(__int64) +# define BOOST_HAS_MS_INT64 +#endif + +#define BOOST_HAS_NRVO + +// NOTE: Clang's C++0x support is not worth detecting. However, it +// supports both extern templates and "long long" even in C++98/03 +// mode. +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_VARIADIC_MACROS + +// HACK: Clang does support extern templates, but Boost's test for +// them is wrong. +#define BOOST_NO_EXTERN_TEMPLATE + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "Clang version " __clang_version__ +#endif + +// Macro used to identify the Clang compiler. +#define BOOST_CLANG 1 + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/codegear.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/codegear.hpp new file mode 100644 index 0000000000..f6dc4c02ba --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/codegear.hpp @@ -0,0 +1,177 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// CodeGear C++ compiler setup: + +#if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) +// these warnings occur frequently in optimized template code +# pragma warn -8004 // var assigned value, but never used +# pragma warn -8008 // condition always true/false +# pragma warn -8066 // dead code can never execute +# pragma warn -8104 // static members with ctors not threadsafe +# pragma warn -8105 // reference member in class without ctors +#endif +// +// versions check: +// last known and checked version is 0x621 +#if (__CODEGEARC__ > 0x621) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message( "Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + +// CodeGear C++ Builder 2009 +#if (__CODEGEARC__ <= 0x613) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_PRIVATE_IN_AGGREGATE +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE + // we shouldn't really need this - but too many things choke + // without it, this needs more investigation: +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_SP_NO_SP_CONVERTIBLE +#endif + +// CodeGear C++ Builder 2010 +#if (__CODEGEARC__ <= 0x621) +# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member +# define BOOST_NO_USING_TEMPLATE +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +// Temporary hack, until specific MPL preprocessed headers are generated +# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +// CodeGear has not yet completely implemented value-initialization, for +// example for array types, as I reported in 2010: Embarcadero Report 83751, +// "Value-initialization: arrays should have each element value-initialized", +// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 +// Last checked version: Embarcadero C++ 6.21 +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, April 2010) +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION + +# ifdef NDEBUG + // fix broken so that Boost.test works: +# include +# undef strcmp +# endif + // fix broken errno declaration: +# include +# ifndef errno +# define errno errno +# endif + +#endif +// +// C++0x macros: +// +#if (__CODEGEARC__ <= 0x620) +#define BOOST_NO_STATIC_ASSERT +#else +#define BOOST_HAS_STATIC_ASSERT +#endif +#define BOOST_HAS_CHAR16_T +#define BOOST_HAS_CHAR32_T +#define BOOST_HAS_LONG_LONG +// #define BOOST_HAS_ALIGNOF +#define BOOST_HAS_DECLTYPE +#define BOOST_HAS_EXPLICIT_CONVERSION_OPS +// #define BOOST_HAS_RVALUE_REFS +#define BOOST_HAS_SCOPED_ENUM +// #define BOOST_HAS_STATIC_ASSERT +#define BOOST_HAS_STD_TYPE_TRAITS + +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES + +// +// TR1 macros: +// +#define BOOST_HAS_TR1_HASH +#define BOOST_HAS_TR1_TYPE_TRAITS +#define BOOST_HAS_TR1_UNORDERED_MAP +#define BOOST_HAS_TR1_UNORDERED_SET + +#define BOOST_HAS_MACRO_USE_FACET + +#define BOOST_NO_INITIALIZER_LISTS + +// On non-Win32 platforms let the platform config figure this out: +#ifdef _WIN32 +# define BOOST_HAS_STDINT_H +#endif + +// +// __int64: +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_DIRENT_H +#endif +// +// all versions support __declspec: +// +#if defined(__STRICT_ANSI__) +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif +// +// ABI fixing headers: +// +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" +#endif +// +// Disable Win32 support in ANSI mode: +// +# pragma defineonoption BOOST_DISABLE_WIN32 -A +// +// MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif + +#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/comeau.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/comeau.hpp new file mode 100644 index 0000000000..278222dcfd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/comeau.hpp @@ -0,0 +1,59 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Douglas Gregor 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright Beman Dawes 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Comeau C++ compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +#if (__COMO_VERSION__ <= 4245) + +# if defined(_MSC_VER) && _MSC_VER <= 1300 +# if _MSC_VER > 100 + // only set this in non-strict mode: +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# endif +# endif + +// Void returns don't work when emulating VC 6 (Peter Dimov) +// TODO: look up if this doesn't apply to the whole 12xx range +# if defined(_MSC_VER) && (_MSC_VER < 1300) +# define BOOST_NO_VOID_RETURNS +# endif + +#endif // version 4245 + +// +// enable __int64 support in VC emulation mode +// +# if defined(_MSC_VER) && (_MSC_VER >= 1200) +# define BOOST_HAS_MS_INT64 +# endif + +#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) + +// +// versions check: +// we don't know Comeau prior to version 4245: +#if __COMO_VERSION__ < 4245 +# error "Compiler not configured - please reconfigure" +#endif +// +// last known and checked version is 4245: +#if (__COMO_VERSION__ > 4245) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/common_edg.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/common_edg.hpp new file mode 100644 index 0000000000..682c73af4a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/common_edg.hpp @@ -0,0 +1,97 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright Markus Schoepflin 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// +// Options common to all edg based compilers. +// +// This is included from within the individual compiler mini-configs. + +#ifndef __EDG_VERSION__ +# error This file requires that __EDG_VERSION__ be defined. +#endif + +#if (__EDG_VERSION__ <= 238) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_SFINAE +#endif + +#if (__EDG_VERSION__ <= 240) +# define BOOST_NO_VOID_RETURNS +#endif + +#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +#endif + +#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) +# define BOOST_NO_TEMPLATE_TEMPLATES +#endif + +#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) +# define BOOST_NO_IS_ABSTRACT +#endif + +#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// See also kai.hpp which checks a Kai-specific symbol for EH +# if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +# endif + +# if !defined(__NO_LONG_LONG) +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif + +// +// C++0x features +// +// See above for BOOST_NO_LONG_LONG +// +#if (__EDG_VERSION__ < 310) +# define BOOST_NO_EXTERN_TEMPLATE +#endif +#if (__EDG_VERSION__ <= 310) || !defined(BOOST_STRICT_CONFIG) +// No support for initializer lists +# define BOOST_NO_INITIALIZER_LISTS +#endif + +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_VARIADIC_MACROS + +#ifdef c_plusplus +// EDG has "long long" in non-strict mode +// However, some libraries have insufficient "long long" support +// #define BOOST_HAS_LONG_LONG +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/compaq_cxx.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/compaq_cxx.hpp new file mode 100644 index 0000000000..b44486c673 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/compaq_cxx.hpp @@ -0,0 +1,19 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Tru64 C++ compiler setup (now HP): + +#define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) + +#include "boost/config/compiler/common_edg.hpp" + +// +// versions check: +// Nothing to do here? + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/digitalmars.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/digitalmars.hpp new file mode 100644 index 0000000000..31c11bf0ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/digitalmars.hpp @@ -0,0 +1,96 @@ +// Copyright (C) Christof Meerwald 2003 +// Copyright (C) Dan Watkins 2003 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Digital Mars C++ compiler setup: +#define BOOST_COMPILER __DMC_VERSION_STRING__ + +#define BOOST_HAS_LONG_LONG +#define BOOST_HAS_PRAGMA_ONCE + +#if (__DMC__ <= 0x833) +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#define BOOST_NO_TEMPLATE_TEMPLATES +#define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING +#define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#endif +#if (__DMC__ <= 0x840) || !defined(BOOST_STRICT_CONFIG) +#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#define BOOST_NO_OPERATORS_IN_NAMESPACE +#define BOOST_NO_UNREACHABLE_RETURN_DETECTION +#define BOOST_NO_SFINAE +#define BOOST_NO_USING_TEMPLATE +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// +// has macros: +#if (__DMC__ >= 0x840) +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_WINTHREADS +#endif + +#if (__DMC__ >= 0x847) +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_LOG1P +#endif + +// +// Is this really the best way to detect whether the std lib is in namespace std? +// +#include +#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD) +# define BOOST_NO_STDC_NAMESPACE +#endif + + +// check for exception handling support: +#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +// +// C++0x features +// +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +#if (__DMC__ < 0x812) +#define BOOST_NO_VARIADIC_MACROS +#endif + +#if __DMC__ < 0x800 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is ...: +#if (__DMC__ > 0x848) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/gcc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/gcc.hpp new file mode 100644 index 0000000000..eeaf998202 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/gcc.hpp @@ -0,0 +1,245 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Jens Maurer 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Douglas Gregor 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Synge Todo 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// GNU C++ compiler setup: + +#if __GNUC__ < 3 +# if __GNUC_MINOR__ == 91 + // egcs 1.1 won't parse shared_ptr.hpp without this: +# define BOOST_NO_AUTO_PTR +# endif +# if __GNUC_MINOR__ < 95 + // + // Prior to gcc 2.95 member templates only partly + // work - define BOOST_MSVC6_MEMBER_TEMPLATES + // instead since inline member templates mostly work. + // +# define BOOST_NO_MEMBER_TEMPLATES +# if __GNUC_MINOR__ >= 9 +# define BOOST_MSVC6_MEMBER_TEMPLATES +# endif +# endif + +# if __GNUC_MINOR__ < 96 +# define BOOST_NO_SFINAE +# endif + +# if __GNUC_MINOR__ <= 97 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# endif + +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_IS_ABSTRACT +# define BOOST_NO_EXTERN_TEMPLATE +// Variadic macros do not exist for gcc versions before 3.0 +# define BOOST_NO_VARIADIC_MACROS +#elif __GNUC__ == 3 +# if defined (__PATHSCALE__) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# define BOOST_NO_IS_ABSTRACT +# endif + // + // gcc-3.x problems: + // + // Bug specific to gcc 3.1 and 3.2: + // +# if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) +# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +# endif +# if __GNUC_MINOR__ < 4 +# define BOOST_NO_IS_ABSTRACT +# endif +# define BOOST_NO_EXTERN_TEMPLATE +#endif +#if __GNUC__ < 4 +// +// All problems to gcc-3.x and earlier here: +// +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# ifdef __OPEN64__ +# define BOOST_NO_IS_ABSTRACT +# endif +#endif + +#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 ) +// Previous versions of GCC did not completely implement value-initialization: +// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize +// members", reported by Jonathan Wakely in 2006, +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) +// GCC Bug 33916, "Default constructor fails to initialize array members", +// reported by Michael Elizabeth Chastain in 2007, +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif + +#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + + +// +// Threading support: Turn this on unconditionally here (except for +// those platforms where we can know for sure). It will get turned off again +// later if no threading API is detected. +// +#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) +# define BOOST_HAS_THREADS +#endif + +// +// gcc has "long long" +// +#define BOOST_HAS_LONG_LONG + +// +// gcc implements the named return value optimization since version 3.1 +// +#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) +#define BOOST_HAS_NRVO +#endif + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if __GNUC__ >= 4 +# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) + // All Win32 development environments, including 64-bit Windows and MinGW, define + // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, + // so does not define _WIN32 or its variants. +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __attribute__((dllexport)) +# define BOOST_SYMBOL_IMPORT __attribute__((dllimport)) +# else +# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) +# define BOOST_SYMBOL_IMPORT +# endif +# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) +#else +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +# define BOOST_SYMBOL_EXPORT +#endif + +// +// RTTI and typeinfo detection is possible post gcc-4.3: +// +#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403 +# ifndef __GXX_RTTI +# ifndef BOOST_NO_TYPEID +# define BOOST_NO_TYPEID +# endif +# ifndef BOOST_NO_RTTI +# define BOOST_NO_RTTI +# endif +# endif +#endif + +// C++0x features not implemented in any GCC version +// +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_NULLPTR +#define BOOST_NO_TEMPLATE_ALIASES + +// C++0x features in 4.3.n and later +// +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) +// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are +// passed on the command line, which in turn defines +// __GXX_EXPERIMENTAL_CXX0X__. +# define BOOST_HAS_DECLTYPE +# define BOOST_HAS_RVALUE_REFS +# define BOOST_HAS_STATIC_ASSERT +# define BOOST_HAS_VARIADIC_TMPL +#else +# define BOOST_NO_DECLTYPE +# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_RVALUE_REFERENCES +# define BOOST_NO_STATIC_ASSERT + +// Variadic templates compiler: +// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html +# ifdef __VARIADIC_TEMPLATES +# define BOOST_HAS_VARIADIC_TMPL +# else +# define BOOST_NO_VARIADIC_TEMPLATES +# endif +#endif + +// C++0x features in 4.4.n and later +// +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_NO_AUTO_DECLARATIONS +# define BOOST_NO_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CHAR16_T +# define BOOST_NO_CHAR32_T +# define BOOST_NO_DEFAULTED_FUNCTIONS +# define BOOST_NO_DELETED_FUNCTIONS +# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_SCOPED_ENUMS +#endif + +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) +# define BOOST_NO_SFINAE_EXPR +#endif + +// C++0x features in 4.4.1 and later +// +#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40401) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_SCOPED_ENUMS before 4.4.1 +// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 +# define BOOST_NO_SCOPED_ENUMS +#endif + +// C++0x features in 4.5.n and later +// +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_LAMBDAS +# define BOOST_NO_RAW_LITERALS +# define BOOST_NO_UNICODE_LITERALS +#endif + +// ConceptGCC compiler: +// http://www.generic-programming.org/software/ConceptGCC/ +#ifdef __GXX_CONCEPTS__ +# define BOOST_HAS_CONCEPTS +# define BOOST_COMPILER "ConceptGCC version " __VERSION__ +#else +# define BOOST_NO_CONCEPTS +#endif + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "GNU C++ version " __VERSION__ +#endif + +// +// versions check: +// we don't know gcc prior to version 2.90: +#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90) +# error "Compiler not configured - please reconfigure" +#endif +// +// last known and checked version is 4.4 (Pre-release): +#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 4)) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +// we don't emit warnings here anymore since there are no defect macros defined for +// gcc post 3.4, so any failures are gcc regressions... +//# warning "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/gcc_xml.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/gcc_xml.hpp new file mode 100644 index 0000000000..a456463ce7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/gcc_xml.hpp @@ -0,0 +1,56 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// GCC-XML C++ compiler setup: + +# if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3)) +# define BOOST_NO_IS_ABSTRACT +# endif + +// +// Threading support: Turn this on unconditionally here (except for +// those platforms where we can know for sure). It will get turned off again +// later if no threading API is detected. +// +#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) +# define BOOST_HAS_THREADS +#endif + +// +// gcc has "long long" +// +#define BOOST_HAS_LONG_LONG + +// C++0x features: +// +# define BOOST_NO_CONSTEXPR +# define BOOST_NO_NULLPTR +# define BOOST_NO_TEMPLATE_ALIASES +# define BOOST_NO_DECLTYPE +# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_RVALUE_REFERENCES +# define BOOST_NO_STATIC_ASSERT +# define BOOST_NO_VARIADIC_TEMPLATES +# define BOOST_NO_VARIADIC_MACROS +# define BOOST_NO_AUTO_DECLARATIONS +# define BOOST_NO_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CHAR16_T +# define BOOST_NO_CHAR32_T +# define BOOST_NO_DEFAULTED_FUNCTIONS +# define BOOST_NO_DELETED_FUNCTIONS +# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_SCOPED_ENUMS +# define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_SCOPED_ENUMS +# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_LAMBDAS +# define BOOST_NO_RAW_LITERALS +# define BOOST_NO_UNICODE_LITERALS + +#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/greenhills.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/greenhills.hpp new file mode 100644 index 0000000000..038b6b2b52 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/greenhills.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Greenhills C++ compiler setup: + +#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) + +#include "boost/config/compiler/common_edg.hpp" + +// +// versions check: +// we don't support Greenhills prior to version 0: +#if __ghs < 0 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0: +#if (__ghs > 0) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/hp_acc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/hp_acc.hpp new file mode 100644 index 0000000000..d0b672ecae --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/hp_acc.hpp @@ -0,0 +1,137 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Toon Knapen 2003. +// (C) Copyright Boris Gubenko 2006 - 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// HP aCC C++ compiler setup: + +#if defined(__EDG__) +#include "boost/config/compiler/common_edg.hpp" +#endif + +#if (__HP_aCC <= 33100) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# if !defined(_NAMESPACE_STD) +# define BOOST_NO_STD_LOCALE +# define BOOST_NO_STRINGSTREAM +# endif +#endif + +#if (__HP_aCC <= 33300) +// member templates are sufficiently broken that we disable them for now +# define BOOST_NO_MEMBER_TEMPLATES +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +#endif + +#if (__HP_aCC <= 38000) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +#if (__HP_aCC > 50000) && (__HP_aCC < 60000) +# define BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_NO_TEMPLATE_TEMPLATES +# define BOOST_NO_SWPRINTF +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_IS_ABSTRACT +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#endif + +// optional features rather than defects: +#if (__HP_aCC >= 33900) +# define BOOST_HAS_LONG_LONG +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#endif + +#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 ) +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +// This macro should not be defined when compiling in strict ansi +// mode, but, currently, we don't have the ability to determine +// what standard mode we are compiling with. Some future version +// of aCC6 compiler will provide predefined macros reflecting the +// compilation options, including the standard mode. +#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98)) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC) + +// +// versions check: +// we don't support HP aCC prior to version 33000: +#if __HP_aCC < 33000 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// +// Extended checks for supporting aCC on PA-RISC +#if __HP_aCC > 30000 && __HP_aCC < 50000 +# if __HP_aCC < 38000 + // versions prior to version A.03.80 not supported +# error "Compiler version not supported - version A.03.80 or higher is required" +# elif !defined(__hpxstd98) + // must compile using the option +hpxstd98 with version A.03.80 and above +# error "Compiler option '+hpxstd98' is required for proper support" +# endif //PA-RISC +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#if !defined(__EDG__) + +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES + +/* + See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and + https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436 +*/ + +#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE) + #define BOOST_NO_VARIADIC_MACROS +#endif + +#endif + +// +// last known and checked version for HP-UX/ia64 is 61300 +// last known and checked version for PA-RISC is 38000 +#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98))) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/intel.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/intel.hpp new file mode 100644 index 0000000000..e7bc95babf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/intel.hpp @@ -0,0 +1,196 @@ +// (C) Copyright John Maddock 2001-8. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright Guillaume Melquiond 2002 - 2003. +// (C) Copyright Beman Dawes 2003. +// (C) Copyright Martin Wille 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Intel compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +#if defined(__INTEL_COMPILER) +# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER +#elif defined(__ICL) +# define BOOST_INTEL_CXX_VERSION __ICL +#elif defined(__ICC) +# define BOOST_INTEL_CXX_VERSION __ICC +#elif defined(__ECC) +# define BOOST_INTEL_CXX_VERSION __ECC +#endif + +#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +#define BOOST_INTEL BOOST_INTEL_CXX_VERSION + +#if defined(_WIN32) || defined(_WIN64) +# define BOOST_INTEL_WIN BOOST_INTEL +#else +# define BOOST_INTEL_LINUX BOOST_INTEL +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER) +# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +# define BOOST_NO_TEMPLATE_TEMPLATES +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 600) + +# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) + +// Boost libraries assume strong standard conformance unless otherwise +// indicated by a config macro. As configured by Intel, the EDG front-end +// requires certain compiler options be set to achieve that strong conformance. +// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) +// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for +// details as they apply to particular versions of the compiler. When the +// compiler does not predefine a macro indicating if an option has been set, +// this config file simply assumes the option has been set. +// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if +// the compiler option is not enabled. + +# define BOOST_NO_SWPRINTF +# endif + +// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) + +# if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_VOID_RETURNS +# define BOOST_NO_INTEGRAL_INT64_T +# endif + +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +#endif + +// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 +#if BOOST_INTEL_CXX_VERSION < 600 +# define BOOST_NO_INTRINSIC_WCHAR_T +#else +// We should test the macro _WCHAR_T_DEFINED to check if the compiler +// supports wchar_t natively. *BUT* there is a problem here: the standard +// headers define this macro if they typedef wchar_t. Anyway, we're lucky +// because they define it without a value, while Intel C++ defines it +// to 1. So we can check its value to see if the macro was defined natively +// or not. +// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T +// is used instead. +# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) +# define BOOST_NO_INTRINSIC_WCHAR_T +# endif +#endif + +#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +// +// Figure out when Intel is emulating this gcc bug +// (All Intel versions prior to 9.0.26, and versions +// later than that if they are set up to emulate gcc 3.2 +// or earlier): +// +# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# endif +#endif +#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1110) +// GCC or VC emulation: +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif +// +// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T +// set correctly, if we don't do this now, we will get errors later +// in type_traits code among other things, getting this correct +// for the Intel compiler is actually remarkably fragile and tricky: +// +#if defined(BOOST_NO_INTRINSIC_WCHAR_T) +#include +template< typename T > struct assert_no_intrinsic_wchar_t; +template<> struct assert_no_intrinsic_wchar_t { typedef void type; }; +// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T +// where it is defined above: +typedef assert_no_intrinsic_wchar_t::type assert_no_intrinsic_wchar_t_; +#else +template< typename T > struct assert_intrinsic_wchar_t; +template<> struct assert_intrinsic_wchar_t {}; +// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: +template<> struct assert_intrinsic_wchar_t {}; +#endif + +#if _MSC_VER+0 >= 1000 +# if _MSC_VER >= 1200 +# define BOOST_HAS_MS_INT64 +# endif +# define BOOST_NO_SWPRINTF +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#elif defined(_WIN32) +# define BOOST_DISABLE_WIN32 +#endif + +// I checked version 6.0 build 020312Z, it implements the NRVO. +// Correct this as you find out which version of the compiler +// implemented the NRVO first. (Daniel Frey) +#if (BOOST_INTEL_CXX_VERSION >= 600) +# define BOOST_HAS_NRVO +#endif + +// +// versions check: +// we don't support Intel prior to version 5.0: +#if BOOST_INTEL_CXX_VERSION < 500 +# error "Compiler not supported or configured - please reconfigure" +#endif + +// Intel on MacOS requires +#if defined(__APPLE__) && defined(__INTEL_COMPILER) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +// Intel on Altix Itanium +#if defined(__itanium__) && defined(__INTEL_COMPILER) +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +// +// An attempt to value-initialize a pointer-to-member may trigger an +// internal error on Intel <= 11.1 (last checked version), as was +// reported by John Maddock, Intel support issue 589832, May 2010. +// Moreover, according to test results from Huang-Vista-x86_32_intel, +// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some +// cases when it should be value-initialized. +// (Niels Dekker, LKEB, May 2010) +#if defined(__INTEL_COMPILER) +# if __INTEL_COMPILER <= 1110 +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# endif +#endif + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) +# define BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) +#endif + +// +// last known and checked version: +#if (BOOST_INTEL_CXX_VERSION > 1110) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# elif defined(_MSC_VER) +// +// We don't emit this warning any more, since we have so few +// defect macros set anyway (just the one). +// +//# pragma message("Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/kai.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/kai.hpp new file mode 100644 index 0000000000..2337e6a8dd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/kai.hpp @@ -0,0 +1,33 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Kai C++ compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) + // at least on Sun, the contents of is not in namespace std +# define BOOST_NO_STDC_NAMESPACE +# endif + +// see also common_edg.hpp which needs a special check for __KCC +# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +# endif + +// +// last known and checked version is 4001: +#if (__KCC_VERSION > 4001) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/metrowerks.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/metrowerks.hpp new file mode 100644 index 0000000000..21083b7a1f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/metrowerks.hpp @@ -0,0 +1,140 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Stefan Slapeta 2004. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Metrowerks C++ compiler setup: + +// locale support is disabled when linking with the dynamic runtime +# ifdef _MSL_NO_LOCALE +# define BOOST_NO_STD_LOCALE +# endif + +# if __MWERKS__ <= 0x2301 // 5.3 +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# define BOOST_NO_POINTER_TO_MEMBER_CONST +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +# endif + +# if __MWERKS__ <= 0x2401 // 6.2 +//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# endif + +# if(__MWERKS__ <= 0x2407) // 7.x +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +# define BOOST_NO_UNREACHABLE_RETURN_DETECTION +# endif + +# if(__MWERKS__ <= 0x3003) // 8.x +# define BOOST_NO_SFINAE +# endif + +// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last +// tested version *only*: +# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_IS_ABSTRACT +# endif + +#if !__option(wchar_type) +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh) +# if __MWERKS__ == 0x3000 +# define BOOST_COMPILER_VERSION 8.0 +# elif __MWERKS__ == 0x3001 +# define BOOST_COMPILER_VERSION 8.1 +# elif __MWERKS__ == 0x3002 +# define BOOST_COMPILER_VERSION 8.2 +# elif __MWERKS__ == 0x3003 +# define BOOST_COMPILER_VERSION 8.3 +# elif __MWERKS__ == 0x3200 +# define BOOST_COMPILER_VERSION 9.0 +# elif __MWERKS__ == 0x3201 +# define BOOST_COMPILER_VERSION 9.1 +# elif __MWERKS__ == 0x3202 +# define BOOST_COMPILER_VERSION 9.2 +# elif __MWERKS__ == 0x3204 +# define BOOST_COMPILER_VERSION 9.3 +# elif __MWERKS__ == 0x3205 +# define BOOST_COMPILER_VERSION 9.4 +# elif __MWERKS__ == 0x3206 +# define BOOST_COMPILER_VERSION 9.5 +# elif __MWERKS__ == 0x3207 +# define BOOST_COMPILER_VERSION 9.6 +# else +# define BOOST_COMPILER_VERSION __MWERKS__ +# endif +#else +# define BOOST_COMPILER_VERSION __MWERKS__ +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#if __MWERKS__ > 0x3206 && __option(rvalue_refs) +# define BOOST_HAS_RVALUE_REFS +#else +# define BOOST_NO_RVALUE_REFERENCES +#endif +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_VARIADIC_MACROS + +#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) + +// +// versions check: +// we don't support Metrowerks prior to version 5.3: +#if __MWERKS__ < 0x2301 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version: +#if (__MWERKS__ > 0x3205) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/mpw.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/mpw.hpp new file mode 100644 index 0000000000..ae12f801d5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/mpw.hpp @@ -0,0 +1,82 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// MPW C++ compilers setup: + +# if defined(__SC__) +# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__) +# elif defined(__MRC__) +# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__) +# else +# error "Using MPW compiler configuration by mistake. Please update." +# endif + +// +// MPW 8.90: +// +#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_INTRINSIC_WCHAR_T +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# define BOOST_NO_USING_TEMPLATE + +# define BOOST_NO_CWCHAR +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + +# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */ + +#endif + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_VARIADIC_MACROS + +// +// versions check: +// we don't support MPW prior to version 8.9: +#if MPW_CPLUS < 0x890 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0x890: +#if (MPW_CPLUS > 0x890) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/nvcc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/nvcc.hpp new file mode 100644 index 0000000000..eaecf37498 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/nvcc.hpp @@ -0,0 +1,87 @@ +// (C) Copyright Eric Jourdanneau, Joel Falcou 2010 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// NVIDIA CUDA C++ compiler setup + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" +#endif + +// NVIDIA Specific support +// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device +#define BOOST_GPU_ENABLED __host__ __device__ + +// Boost support macro for NVCC +// NVCC Basically behaves like some flavor of MSVC6 + some specific quirks +#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +#define BOOST_MSVC6_MEMBER_TEMPLATES +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_SIGACTION +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_YIELD +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#define BOOST_HAS_NRVO +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_LONG_LONG +#define BOOST_HAS_LOG1P +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_VARIADIC_MACROS +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_STD_UNORDERED +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_NULLPTR +#define BOOST_NO_LAMBDAS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DECLTYPE +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CHAR16_T +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_0X_HDR_UNORDERED_SET +#define BOOST_NO_0X_HDR_UNORDERED_MAP +#define BOOST_NO_0X_HDR_TYPE_TRAITS +#define BOOST_NO_0X_HDR_TUPLE +#define BOOST_NO_0X_HDR_THREAD +#define BOOST_NO_0X_HDR_TYPEINDEX +#define BOOST_NO_0X_HDR_SYSTEM_ERROR +#define BOOST_NO_0X_HDR_REGEX +#define BOOST_NO_0X_HDR_RATIO +#define BOOST_NO_0X_HDR_RANDOM +#define BOOST_NO_0X_HDR_MUTEX +#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +#define BOOST_NO_0X_HDR_INITIALIZER_LIST +#define BOOST_NO_0X_HDR_FUTURE +#define BOOST_NO_0X_HDR_FORWARD_LIST +#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +#define BOOST_NO_0X_HDR_CONDITION_VARIABLE +#define BOOST_NO_0X_HDR_CONCEPTS +#define BOOST_NO_0X_HDR_CODECVT +#define BOOST_NO_0X_HDR_CHRONO +#define BOOST_NO_0X_HDR_ARRAY + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/pgi.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/pgi.hpp new file mode 100644 index 0000000000..fb3a6c0b27 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/pgi.hpp @@ -0,0 +1,78 @@ +// (C) Copyright Noel Belcourt 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// PGI C++ compiler setup: + +#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ +#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) + +// +// Threading support: +// Turn this on unconditionally here, it will get turned off again later +// if no threading API is detected. +// + +// PGI 10.x doesn't seem to define __PGIC__ + +// versions earlier than 10.x do define __PGIC__ +#if __PGIC__ >= 10 + +// options requested by configure --enable-test +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_NRVO +#define BOOST_HAS_LONG_LONG + +// options --enable-test wants undefined +#undef BOOST_NO_STDC_NAMESPACE +#undef BOOST_NO_EXCEPTION_STD_NAMESPACE +#undef BOOST_DEDUCED_TYPENAME + +#elif __PGIC__ >= 7 + +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_SWPRINTF +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_AUTO_DECLARATIONS + +#else + +# error "Pgi compiler not configured - please reconfigure" + +#endif +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_VARIADIC_MACROS + +// +// version check: +// probably nothing to do here? + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/sgi_mipspro.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/sgi_mipspro.hpp new file mode 100644 index 0000000000..90688314ad --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/sgi_mipspro.hpp @@ -0,0 +1,29 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// SGI C++ compiler setup: + +#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) + +#include "boost/config/compiler/common_edg.hpp" + +// +// Threading support: +// Turn this on unconditionally here, it will get turned off again later +// if no threading API is detected. +// +#define BOOST_HAS_THREADS +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP + +#undef BOOST_NO_SWPRINTF +#undef BOOST_DEDUCED_TYPENAME + +// +// version check: +// probably nothing to do here? + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/sunpro_cc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/sunpro_cc.hpp new file mode 100644 index 0000000000..85fa462504 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/sunpro_cc.hpp @@ -0,0 +1,145 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Peter Dimov 2002. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright David Abrahams 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Sun C++ compiler setup: + +# if __SUNPRO_CC <= 0x500 +# define BOOST_NO_MEMBER_TEMPLATES +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# endif + +# if (__SUNPRO_CC <= 0x520) + // + // Sunpro 5.2 and earler: + // + // although sunpro 5.2 supports the syntax for + // inline initialization it often gets the value + // wrong, especially where the value is computed + // from other constants (J Maddock 6th May 2001) +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION + + // Although sunpro 5.2 supports the syntax for + // partial specialization, it often seems to + // bind to the wrong specialization. Better + // to disable it until suppport becomes more stable + // (J Maddock 6th May 2001). +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif + +# if (__SUNPRO_CC <= 0x530) + // Requesting debug info (-g) with Boost.Python results + // in an internal compiler error for "static const" + // initialized in-class. + // >> Assertion: (../links/dbg_cstabs.cc, line 611) + // while processing ../test.cpp at line 0. + // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002) +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION + + // SunPro 5.3 has better support for partial specialization, + // but breaks when compiling std::less > + // (Jens Maurer 4 Nov 2001). + + // std::less specialization fixed as reported by George + // Heintzelman; partial specialization re-enabled + // (Peter Dimov 17 Jan 2002) + +//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // integral constant expressions with 64 bit numbers fail +# define BOOST_NO_INTEGRAL_INT64_T +# endif + +# if (__SUNPRO_CC < 0x570) +# define BOOST_NO_TEMPLATE_TEMPLATES + // see http://lists.boost.org/MailArchives/boost/msg47184.php + // and http://lists.boost.org/MailArchives/boost/msg47220.php +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_SFINAE +# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +# endif +# if (__SUNPRO_CC <= 0x580) +# define BOOST_NO_IS_ABSTRACT +# endif + +# if (__SUNPRO_CC <= 0x5100) + // Sun 5.10 may not correctly value-initialize objects of + // some user defined types, as was reported in April 2010 + // (CR 6947016), and confirmed by Steve Clamage. + // (Niels Dekker, LKEB, May 2010). +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# endif + +// +// Dynamic shared object (DSO) and dynamic-link library (DLL) support +// +#if __SUNPRO_CC > 0x500 +# define BOOST_SYMBOL_EXPORT __global +# define BOOST_SYMBOL_IMPORT __global +# define BOOST_SYMBOL_VISIBLE __global +#endif + + + +// +// Issues that effect all known versions: +// +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_ADL_BARRIER + +// +// C++0x features +// +# define BOOST_HAS_LONG_LONG + +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_VARIADIC_MACROS + +// +// Version +// + +#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC) + +// +// versions check: +// we don't support sunpro prior to version 4: +#if __SUNPRO_CC < 0x400 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0x590: +#if (__SUNPRO_CC > 0x590) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/vacpp.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/vacpp.hpp new file mode 100644 index 0000000000..5ae9c2856d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/vacpp.hpp @@ -0,0 +1,97 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Toon Knapen 2001 - 2003. +// (C) Copyright Lie-Quan Lee 2001. +// (C) Copyright Markus Schoepflin 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Visual Age (IBM) C++ compiler setup: + +#if __IBMCPP__ <= 501 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +#endif + +#if (__IBMCPP__ <= 502) +// Actually the compiler supports inclass member initialization but it +// requires a definition for the class member and it doesn't recognize +// it as an integral constant expression when used as a template argument. +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +# define BOOST_NO_INITIALIZER_LISTS +#endif + +#if (__IBMCPP__ <= 1110) +// XL C++ V11.1 and earlier versions may not always value-initialize +// a temporary object T(), when T is a non-POD aggregate class type. +// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it +// high priority. -- Niels Dekker (LKEB), May 2010. +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif + +// +// On AIX thread support seems to be indicated by _THREAD_SAFE: +// +#ifdef _THREAD_SAFE +# define BOOST_HAS_THREADS +#endif + +#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__) + +// +// versions check: +// we don't support Visual age prior to version 5: +#if __IBMCPP__ < 500 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 600: +#if (__IBMCPP__ > 1010) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + +// Some versions of the compiler have issues with default arguments on partial specializations +#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS + +// +// C++0x features +// +// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG +// +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_NULLPTR +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_VARIADIC_MACROS + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/visualc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/visualc.hpp new file mode 100644 index 0000000000..6755287da4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/compiler/visualc.hpp @@ -0,0 +1,276 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Microsoft Visual C++ compiler setup: + +#define BOOST_MSVC _MSC_VER + +#if _MSC_FULL_VER > 100000000 +# define BOOST_MSVC_FULL_VER _MSC_FULL_VER +#else +# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10) +#endif + +// turn off the warnings before we #include anything +#pragma warning( disable : 4503 ) // warning: decorated name length exceeded + +#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4 +# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_VOID_RETURNS +# define BOOST_NO_EXCEPTION_STD_NAMESPACE + +# if BOOST_MSVC == 1202 +# define BOOST_NO_STD_TYPEINFO +# endif + + // disable min/max macro defines on vc6: + // +#endif + +#if (_MSC_VER <= 1300) // 1300 == VC++ 7.0 + +# if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# endif + +# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_PRIVATE_IN_AGGREGATE +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_DEDUCED_TYPENAME +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE + +// VC++ 6/7 has member templates but they have numerous problems including +// cases of silent failure, so for safety we define: +# define BOOST_NO_MEMBER_TEMPLATES +// For VC++ experts wishing to attempt workarounds, we define: +# define BOOST_MSVC6_MEMBER_TEMPLATES + +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# define BOOST_NO_USING_TEMPLATE +# define BOOST_NO_SWPRINTF +# define BOOST_NO_TEMPLATE_TEMPLATES +# define BOOST_NO_SFINAE +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +# define BOOST_NO_IS_ABSTRACT +# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS +// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)? +# if (_MSC_VER > 1200) +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +# endif + +#endif + +#if _MSC_VER < 1400 +// although a conforming signature for swprint exists in VC7.1 +// it appears not to actually work: +# define BOOST_NO_SWPRINTF +// Our extern template tests also fail for this compiler: +# define BOOST_NO_EXTERN_TEMPLATE +// Variadic macros do not exist for VC7.1 and lower +# define BOOST_NO_VARIADIC_MACROS +#endif + +#if defined(UNDER_CE) +// Windows CE does not have a conforming signature for swprintf +# define BOOST_NO_SWPRINTF +#endif + +#if _MSC_VER <= 1400 // 1400 == VC++ 8.0 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#endif + +#if _MSC_VER <= 1600 // 1600 == VC++ 10.0 +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#endif + +#if _MSC_VER == 1500 // 1500 == VC++ 9.0 + // A bug in VC9: +# define BOOST_NO_ADL_BARRIER +#endif + + +#if (_MSC_VER <= 1600) +// MSVC (including the latest checked version) has not yet completely +// implemented value-initialization, as is reported: +// "VC++ does not value-initialize members of derived classes without +// user-declared constructor", reported in 2009 by Sylvester Hesp: +// https://connect.microsoft.com/VisualStudio/feedback/details/484295 +// "Presence of copy constructor breaks member class initialization", +// reported in 2009 by Alex Vakulenko: +// https://connect.microsoft.com/VisualStudio/feedback/details/499606 +// "Value-initialization in new-expression", reported in 2005 by +// Pavel Kuznetsov (MetaCommunications Engineering): +// https://connect.microsoft.com/VisualStudio/feedback/details/100744 +// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues +// (Niels Dekker, LKEB, May 2010) +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +#endif + +#if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0 +# define BOOST_NO_INITIALIZER_LISTS +#endif + +#ifndef _NATIVE_WCHAR_T_DEFINED +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +#if defined(_WIN32_WCE) || defined(UNDER_CE) +# define BOOST_NO_THREADEX +# define BOOST_NO_GETSYSTEMTIMEASFILETIME +# define BOOST_NO_SWPRINTF +#endif + +// +// check for exception handling support: +#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +// +// __int64 support: +// +#if (_MSC_VER >= 1200) +# define BOOST_HAS_MS_INT64 +#endif +#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)) +# define BOOST_HAS_LONG_LONG +#else +# define BOOST_NO_LONG_LONG +#endif +#if (_MSC_VER >= 1400) && !defined(_DEBUG) +# define BOOST_HAS_NRVO +#endif +// +// disable Win32 API's if compiler extentions are +// turned off: +// +#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32) +# define BOOST_DISABLE_WIN32 +#endif +#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// +// C++0x features +// +// See above for BOOST_NO_LONG_LONG + +// C++ features supported by VC++ 10 (aka 2010) +// +#if _MSC_VER < 1600 +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +#define BOOST_NO_LAMBDAS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_NULLPTR +#endif // _MSC_VER < 1600 +#if _MSC_VER >= 1600 +#define BOOST_HAS_STDINT_H +#endif + +// C++0x features not supported by any versions +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONCEPTS +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_TEMPLATE_ALIASES +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES +// +// prefix and suffix headers: +// +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" +#endif + +// TODO: +// these things are mostly bogus. 1200 means version 12.0 of the compiler. The +// artificial versions assigned to them only refer to the versions of some IDE +// these compilers have been shipped with, and even that is not all of it. Some +// were shipped with freely downloadable SDKs, others as crosscompilers in eVC. +// IOW, you can't use these 'versions' in any sensible way. Sorry. +# if defined(UNDER_CE) +# if _MSC_VER < 1200 + // Note: these are so far off, they are not really supported +# elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202 +# define BOOST_COMPILER_VERSION evc4.0 +# elif _MSC_VER == 1400 +# define BOOST_COMPILER_VERSION evc8 +# elif _MSC_VER == 1500 +# define BOOST_COMPILER_VERSION evc9 +# elif _MSC_VER == 1600 +# define BOOST_COMPILER_VERSION evc10 +# else +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown EVC++ compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") +# endif +# endif +# else +# if _MSC_VER < 1200 + // Note: these are so far off, they are not really supported +# define BOOST_COMPILER_VERSION 5.0 +# elif _MSC_VER < 1300 +# define BOOST_COMPILER_VERSION 6.0 +# elif _MSC_VER == 1300 +# define BOOST_COMPILER_VERSION 7.0 +# elif _MSC_VER == 1310 +# define BOOST_COMPILER_VERSION 7.1 +# elif _MSC_VER == 1400 +# define BOOST_COMPILER_VERSION 8.0 +# elif _MSC_VER == 1500 +# define BOOST_COMPILER_VERSION 9.0 +# elif _MSC_VER == 1600 +# define BOOST_COMPILER_VERSION 10.0 +# else +# define BOOST_COMPILER_VERSION _MSC_VER +# endif +# endif + +#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) + +// +// versions check: +// we don't support Visual C++ prior to version 6: +#if _MSC_VER < 1200 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 1600 (VC10, aka 2010): +#if (_MSC_VER > 1600) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown compiler version - please run the configure tests and report the results") +# endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/cmath.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/cmath.hpp new file mode 100644 index 0000000000..d8268d842a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/cmath.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/cmath is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_CMATH +# define BOOST_CONFIG_CMATH + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_CMATH_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_CMATH_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_CMATH_RECURSION +# endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/complex.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/complex.hpp new file mode 100644 index 0000000000..ca200922b3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/complex.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/complex is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_COMPLEX +# define BOOST_CONFIG_COMPLEX + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_COMPLEX_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_COMPLEX_RECURSION +# endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/functional.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/functional.hpp new file mode 100644 index 0000000000..e395efc197 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/functional.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/functional is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_FUNCTIONAL +# define BOOST_CONFIG_FUNCTIONAL + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION +# endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/memory.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/memory.hpp new file mode 100644 index 0000000000..2b5d208027 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/memory.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/memory is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_MEMORY +# define BOOST_CONFIG_MEMORY + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_MEMORY_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_MEMORY_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_MEMORY_RECURSION +# endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/utility.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/utility.hpp new file mode 100644 index 0000000000..dea8f115bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/no_tr1/utility.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/utility is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_UTILITY +# define BOOST_CONFIG_UTILITY + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_UTILITY_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_UTILITY_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_UTILITY_RECURSION +# endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/aix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/aix.hpp new file mode 100644 index 0000000000..894ef42ce9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/aix.hpp @@ -0,0 +1,33 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// IBM/Aix specific config options: + +#define BOOST_PLATFORM "IBM Aix" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_CLOCK_GETTIME + +// This needs support in "boost/cstdint.hpp" exactly like FreeBSD. +// This platform has header named which includes all +// the things needed. +#define BOOST_HAS_STDINT_H + +// Threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_DELAY_NP +#define BOOST_HAS_SCHED_YIELD +//#define BOOST_HAS_PTHREAD_YIELD + +// boilerplate code: +#include + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/amigaos.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/amigaos.hpp new file mode 100644 index 0000000000..34bcf4128b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/amigaos.hpp @@ -0,0 +1,15 @@ +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +#define BOOST_PLATFORM "AmigaOS" + +#define BOOST_DISABLE_THREADS +#define BOOST_NO_CWCHAR +#define BOOST_NO_STD_WSTRING +#define BOOST_NO_INTRINSIC_WCHAR_T + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/beos.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/beos.hpp new file mode 100644 index 0000000000..48c3d8dc5b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/beos.hpp @@ -0,0 +1,26 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// BeOS specific config options: + +#define BOOST_PLATFORM "BeOS" + +#define BOOST_NO_CWCHAR +#define BOOST_NO_CWCTYPE +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_BETHREADS + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +// boilerplate code: +#include + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/bsd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/bsd.hpp new file mode 100644 index 0000000000..a0142978eb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/bsd.hpp @@ -0,0 +1,86 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Douglas Gregor 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// generic BSD config options: + +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) +#error "This platform is not BSD" +#endif + +#ifdef __FreeBSD__ +#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) +#elif defined(__NetBSD__) +#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) +#elif defined(__OpenBSD__) +#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) +#elif defined(__DragonFly__) +#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) +#endif + +// +// is this the correct version check? +// FreeBSD has but does not +// advertise the fact in : +// +#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__) +# define BOOST_HAS_NL_TYPES_H +#endif + +// +// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in +// and not in +// +#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\ + || defined(__OpenBSD__) || defined(__DragonFly__) +# define BOOST_HAS_PTHREADS +#endif + +// +// No wide character support in the BSD header files: +// +#if defined(__NetBSD__) +#define __NetBSD_GCC__ (__GNUC__ * 1000000 \ + + __GNUC_MINOR__ * 1000 \ + + __GNUC_PATCHLEVEL__) +// XXX - the following is required until c++config.h +// defines _GLIBCXX_HAVE_SWPRINTF and friends +// or the preprocessor conditionals are removed +// from the cwchar header. +#define _GLIBCXX_HAVE_SWPRINTF 1 +#endif + +#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__)) +# define BOOST_NO_CWCHAR +#endif +// +// The BSD has macros only, no functions: +// +#if !defined(__OpenBSD__) || defined(__DragonFly__) +# define BOOST_NO_CTYPE_FUNCTIONS +#endif + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_SIGACTION + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/cygwin.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/cygwin.hpp new file mode 100644 index 0000000000..8e1bcb0139 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/cygwin.hpp @@ -0,0 +1,55 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// cygwin specific config options: + +#define BOOST_PLATFORM "Cygwin" +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 + +// +// Threading API: +// See if we have POSIX threads, if we do use them, otherwise +// revert to native Win threads. +#define BOOST_HAS_UNISTD_H +#include +#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_SIGACTION +#else +# if !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_WINTHREADS +# endif +# define BOOST_HAS_FTIME +#endif + +// +// find out if we have a stdint.h, there should be a better way to do this: +// +#include +#ifdef _STDINT_H +#define BOOST_HAS_STDINT_H +#endif + +// boilerplate code: +#include + +// +// Cygwin lies about XSI conformance, there is no nl_types.h: +// +#ifdef BOOST_HAS_NL_TYPES_H +# undef BOOST_HAS_NL_TYPES_H +#endif + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/hpux.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/hpux.hpp new file mode 100644 index 0000000000..19ce68e597 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/hpux.hpp @@ -0,0 +1,87 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Toon Knapen 2003. +// (C) Copyright Boris Gubenko 2006 - 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// hpux specific config options: + +#define BOOST_PLATFORM "HP-UX" + +// In principle, HP-UX has a nice under the name +// However, it has the following problem: +// Use of UINT32_C(0) results in "0u l" for the preprocessed source +// (verifyable with gcc 2.95.3) +#if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC) +# define BOOST_HAS_STDINT_H +#endif + +#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) +# define BOOST_NO_SWPRINTF +#endif +#if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE) +# define BOOST_NO_CWCTYPE +#endif + +#if defined(__GNUC__) +# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) + // GNU C on HP-UX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +# elif !defined(BOOST_DISABLE_THREADS) + // threads supported from gcc-3.3 onwards: +# define BOOST_HAS_THREADS +# define BOOST_HAS_PTHREADS +# endif +#elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS) +# define BOOST_HAS_PTHREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +// the following are always available: +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_SCHED_YIELD +#endif +#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#endif +#ifndef BOOST_HAS_NL_TYPES_H +# define BOOST_HAS_NL_TYPES_H +#endif +#ifndef BOOST_HAS_NANOSLEEP +# define BOOST_HAS_NANOSLEEP +#endif +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_DIRENT_H +# define BOOST_HAS_DIRENT_H +#endif +#ifndef BOOST_HAS_CLOCK_GETTIME +# define BOOST_HAS_CLOCK_GETTIME +#endif +#ifndef BOOST_HAS_SIGACTION +# define BOOST_HAS_SIGACTION +#endif +#ifndef BOOST_HAS_NRVO +# ifndef __parisc +# define BOOST_HAS_NRVO +# endif +#endif +#ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +#endif +#ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/irix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/irix.hpp new file mode 100644 index 0000000000..aeae49c8b4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/irix.hpp @@ -0,0 +1,31 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// SGI Irix specific config options: + +#define BOOST_PLATFORM "SGI Irix" + +#define BOOST_NO_SWPRINTF +// +// these are not auto detected by POSIX feature tests: +// +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + +#ifdef __GNUC__ + // GNU C on IRIX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/linux.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/linux.hpp new file mode 100644 index 0000000000..51ae13347c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/linux.hpp @@ -0,0 +1,98 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// linux specific config options: + +#define BOOST_PLATFORM "linux" + +// make sure we have __GLIBC_PREREQ if available at all +#include + +// +// added to glibc 2.1.1 +// We can only test for 2.1 though: +// +#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) + // defines int64_t unconditionally, but defines + // int64_t only if __GNUC__. Thus, assume a fully usable + // only when using GCC. +# if defined __GNUC__ +# define BOOST_HAS_STDINT_H +# endif +#endif + +#if defined(__LIBCOMO__) + // + // como on linux doesn't have std:: c functions: + // NOTE: versions of libcomo prior to beta28 have octal version numbering, + // e.g. version 25 is 21 (dec) + // +# if __LIBCOMO_VERSION__ <= 20 +# define BOOST_NO_STDC_NAMESPACE +# endif + +# if __LIBCOMO_VERSION__ <= 21 +# define BOOST_NO_SWPRINTF +# endif + +#endif + +// +// If glibc is past version 2 then we definitely have +// gettimeofday, earlier versions may or may not have it: +// +#if defined(__GLIBC__) && (__GLIBC__ >= 2) +# define BOOST_HAS_GETTIMEOFDAY +#endif + +#ifdef __USE_POSIX199309 +# define BOOST_HAS_NANOSLEEP +#endif + +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) +// __GLIBC_PREREQ is available since 2.1.2 + + // swprintf is available since glibc 2.2.0 +# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) +# define BOOST_NO_SWPRINTF +# endif +#else +# define BOOST_NO_SWPRINTF +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +#ifndef __GNUC__ +// +// if the compiler is not gcc we still need to be able to parse +// the GNU system headers, some of which (mainly ) +// use GNU specific extensions: +// +# ifndef __extension__ +# define __extension__ +# endif +# ifndef __const__ +# define __const__ const +# endif +# ifndef __volatile__ +# define __volatile__ volatile +# endif +# ifndef __signed__ +# define __signed__ signed +# endif +# ifndef __typeof__ +# define __typeof__ typeof +# endif +# ifndef __inline__ +# define __inline__ inline +# endif +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/macos.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/macos.hpp new file mode 100644 index 0000000000..2780ef99e9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/macos.hpp @@ -0,0 +1,86 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Bill Kempf 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Mac OS specific config options: + +#define BOOST_PLATFORM "Mac OS" + +#if __MACH__ && !defined(_MSL_USING_MSL_C) + +// Using the Mac OS X system BSD-style C library. + +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif +// +// Begin by including our boilerplate code for POSIX +// feature detection, this is safe even when using +// the MSL as Metrowerks supply their own +// to replace the platform-native BSD one. G++ users +// should also always be able to do this on MaxOS X. +// +# include +# ifndef BOOST_HAS_STDINT_H +# define BOOST_HAS_STDINT_H +# endif + +// +// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, +// of these only pthreads are advertised in , so set the +// other options explicitly: +// +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_SIGACTION + +# if (__GNUC__ < 3) && !defined( __APPLE_CC__) + +// GCC strange "ignore std" mode works better if you pretend everything +// is in the std namespace, for the most part. + +# define BOOST_NO_STDC_NAMESPACE +# endif + +# if (__GNUC__ == 4) + +// Both gcc and intel require these. +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_NANOSLEEP + +# endif + +#else + +// Using the MSL C library. + +// We will eventually support threads in non-Carbon builds, but we do +// not support this yet. +# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON ) + +# if !defined(BOOST_HAS_PTHREADS) +# define BOOST_HAS_MPTASKS +# elif ( __dest_os == __mac_os_x ) +// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the +// gettimeofday and no posix. +# define BOOST_HAS_GETTIMEOFDAY +# endif + +// The MP task implementation of Boost Threads aims to replace MP-unsafe +// parts of the MSL, so we turn on threads unconditionally. +# define BOOST_HAS_THREADS + +// The remote call manager depends on this. +# define BOOST_BIND_ENABLE_PASCAL + +# endif + +#endif + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/qnxnto.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/qnxnto.hpp new file mode 100644 index 0000000000..b1377c8d2c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/qnxnto.hpp @@ -0,0 +1,31 @@ +// (C) Copyright Jim Douglas 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// QNX specific config options: + +#define BOOST_PLATFORM "QNX" + +#define BOOST_HAS_UNISTD_H +#include + +// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h +// or log1p and expm1: +#undef BOOST_HAS_NL_TYPES_H +#undef BOOST_HAS_LOG1P +#undef BOOST_HAS_EXPM1 + +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_NANOSLEEP + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/solaris.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/solaris.hpp new file mode 100644 index 0000000000..9f9256664b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/solaris.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// sun specific config options: + +#define BOOST_PLATFORM "Sun Solaris" + +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +// +// pthreads don't actually work with gcc unless _PTHREADS is defined: +// +#if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) +# undef BOOST_HAS_PTHREADS +#endif + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/symbian.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/symbian.hpp new file mode 100644 index 0000000000..ad37943127 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/symbian.hpp @@ -0,0 +1,94 @@ +// (C) Copyright Yuriy Krasnoschek 2009. +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// symbian specific config options: + + +#define BOOST_PLATFORM "Symbian" +#define BOOST_SYMBIAN 1 + + +#if defined(__S60_3X__) +// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL +# define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK +// make sure we have __GLIBC_PREREQ if available at all +# include +// boilerplate code: +# define BOOST_HAS_UNISTD_H +# include +// S60 SDK defines _POSIX_VERSION as POSIX.1 +# ifndef BOOST_HAS_STDINT_H +# define BOOST_HAS_STDINT_H +# endif +# ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +# endif +# ifndef BOOST_HAS_DIRENT_H +# define BOOST_HAS_DIRENT_H +# endif +# ifndef BOOST_HAS_SIGACTION +# define BOOST_HAS_SIGACTION +# endif +# ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_PTHREADS +# endif +# ifndef BOOST_HAS_NANOSLEEP +# define BOOST_HAS_NANOSLEEP +# endif +# ifndef BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_SCHED_YIELD +# endif +# ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# endif +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# ifndef BOOST_POSIX_API +# define BOOST_POSIX_API +# endif +// endianess support +# include +// Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER +# ifndef __LITTLE_ENDIAN +# ifdef _LITTLE_ENDIAN +# define __LITTLE_ENDIAN _LITTLE_ENDIAN +# else +# define __LITTLE_ENDIAN 1234 +# endif +# endif +# ifndef __BIG_ENDIAN +# ifdef _BIG_ENDIAN +# define __BIG_ENDIAN _BIG_ENDIAN +# else +# define __BIG_ENDIAN 4321 +# endif +# endif +# ifndef __BYTE_ORDER +# define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE +# endif +// Known limitations +# define BOOST_ASIO_DISABLE_SERIAL_PORT +# define BOOST_DATE_TIME_NO_LOCALE +# define BOOST_NO_STD_WSTRING +# define BOOST_EXCEPTION_DISABLE +# define BOOST_NO_EXCEPTIONS + +#else // TODO: More platform support e.g. UIQ +# error "Unsuppoted Symbian SDK" +#endif + +#if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32) +# define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/vms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/vms.hpp new file mode 100644 index 0000000000..f70efcfb8e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/vms.hpp @@ -0,0 +1,25 @@ +// (C) Copyright Artyom Beilis 2010. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP +#define BOOST_CONFIG_PLATFORM_VMS_HPP + +#define BOOST_PLATFORM "OpenVMS" + +#undef BOOST_HAS_STDINT_H +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_THREADS +#undef BOOST_HAS_SCHED_YIELD + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/vxworks.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/vxworks.hpp new file mode 100644 index 0000000000..6ec5171e39 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/vxworks.hpp @@ -0,0 +1,31 @@ +// (C) Copyright Dustin Spicuzza 2009. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// vxWorks specific config options: + +#define BOOST_PLATFORM "vxWorks" + +#define BOOST_NO_CWCHAR +#define BOOST_NO_INTRINSIC_WCHAR_T + +#if defined(__GNUC__) && defined(__STRICT_ANSI__) +#define BOOST_NO_INT64_T +#endif + +#define BOOST_HAS_UNISTD_H + +// these allow posix_features to work, since vxWorks doesn't +// define them itself +#define _POSIX_TIMERS 1 +#define _POSIX_THREADS 1 + +// vxworks doesn't work with asio serial ports +#define BOOST_ASIO_DISABLE_SERIAL_PORT + +// boilerplate code: +#include + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/platform/win32.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/win32.hpp new file mode 100644 index 0000000000..f59c4ea79e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/platform/win32.hpp @@ -0,0 +1,65 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Bill Kempf 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright Rene Rivera 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Win32 specific config options: + +#define BOOST_PLATFORM "Win32" + +// Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION. +#if defined(__MINGW32__) +# include <_mingw.h> +#endif + +#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +#endif + +// Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT +// If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport), +// its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and +// BOOST_SYMBOL_IMPORT +#ifndef BOOST_SYMBOL_EXPORT +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __declspec(dllexport) +# define BOOST_SYMBOL_IMPORT __declspec(dllimport) +#endif + + +#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) +# define BOOST_HAS_STDINT_H +# define __STDC_LIMIT_MACROS +# define BOOST_HAS_DIRENT_H +# define BOOST_HAS_UNISTD_H +#endif + +// +// Win32 will normally be using native Win32 threads, +// but there is a pthread library avaliable as an option, +// we used to disable this when BOOST_DISABLE_WIN32 was +// defined but no longer - this should allow some +// files to be compiled in strict mode - while maintaining +// a consistent setting of BOOST_HAS_THREADS across +// all translation units (needed for shared_ptr etc). +// + +#ifdef _WIN32_WCE +# define BOOST_NO_ANSI_APIS +#endif + +#ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_WINTHREADS +#endif + +#ifndef BOOST_DISABLE_WIN32 +// WEK: Added +#define BOOST_HAS_FTIME +#define BOOST_WINDOWS 1 + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/posix_features.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/posix_features.hpp new file mode 100644 index 0000000000..d12954797f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/posix_features.hpp @@ -0,0 +1,95 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// All POSIX feature tests go in this file, +// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well +// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's +// may be present but none-functional unless _POSIX_C_SOURCE and +// _XOPEN_SOURCE have been defined to the right value (it's up +// to the user to do this *before* including any header, although +// in most cases the compiler will do this for you). + +# if defined(BOOST_HAS_UNISTD_H) +# include + + // XOpen has , but is this the correct version check? +# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) +# define BOOST_HAS_NL_TYPES_H +# endif + + // POSIX version 6 requires +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) +# define BOOST_HAS_STDINT_H +# endif + + // POSIX version 2 requires +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) +# define BOOST_HAS_DIRENT_H +# endif + + // POSIX version 3 requires to have sigaction: +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) +# define BOOST_HAS_SIGACTION +# endif + // POSIX defines _POSIX_THREADS > 0 for pthread support, + // however some platforms define _POSIX_THREADS without + // a value, hence the (_POSIX_THREADS+0 >= 0) check. + // Strictly speaking this may catch platforms with a + // non-functioning stub , but such occurrences should + // occur very rarely if at all. +# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) +# define BOOST_HAS_PTHREADS +# endif + + // BOOST_HAS_NANOSLEEP: + // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: +# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ + || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) +# define BOOST_HAS_NANOSLEEP +# endif + + // BOOST_HAS_CLOCK_GETTIME: + // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME + // but at least one platform - linux - defines that flag without + // defining clock_gettime): +# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) +# define BOOST_HAS_CLOCK_GETTIME +# endif + + // BOOST_HAS_SCHED_YIELD: + // This is predicated on _POSIX_PRIORITY_SCHEDULING or + // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. +# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ + || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ + || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) +# define BOOST_HAS_SCHED_YIELD +# endif + + // BOOST_HAS_GETTIMEOFDAY: + // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: + // These are predicated on _XOPEN_VERSION, and appears to be first released + // in issue 4, version 2 (_XOPEN_VERSION > 500). + // Likewise for the functions log1p and expm1. +# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) +# define BOOST_HAS_GETTIMEOFDAY +# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# endif +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# endif + +# endif + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/requires_threads.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/requires_threads.hpp new file mode 100644 index 0000000000..cfaff23027 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/requires_threads.hpp @@ -0,0 +1,92 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP +#define BOOST_CONFIG_REQUIRES_THREADS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_DISABLE_THREADS) + +// +// special case to handle versions of gcc which don't currently support threads: +// +#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) +// +// this is checked up to gcc 3.3: +// +#if defined(__sgi) || defined(__hpux) +# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" +#endif + +#endif + +# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" + +#elif !defined(BOOST_HAS_THREADS) + +# if defined __COMO__ +// Comeau C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" + +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +#ifdef _WIN32 +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" +#else +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" +#endif + +# elif defined __GNUC__ +// GNU C++: +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" + +#elif defined __sgi +// SGI MIPSpro C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" + +#elif defined __DECCXX +// Compaq Tru64 Unix cxx +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" + +#elif defined __BORLANDC__ +// Borland +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" + +#elif defined __MWERKS__ +// Metrowerks CodeWarrior +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" + +#elif defined __SUNPRO_CC +// Sun Workshop Compiler C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" + +#elif defined __HP_aCC +// HP aCC +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" + +#elif defined(__IBMCPP__) +// IBM Visual Age +# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" + +#elif defined _MSC_VER +// Microsoft Visual C++ +// +// Must remain the last #elif since some other vendors (Metrowerks, for +// example) also #define _MSC_VER +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" + +#else + +# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" + +#endif // compilers + +#endif // BOOST_HAS_THREADS + +#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/select_compiler_config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/select_compiler_config.hpp new file mode 100644 index 0000000000..f9b086ad43 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/select_compiler_config.hpp @@ -0,0 +1,129 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Martin Wille 2003. +// (C) Copyright Guillaume Melquiond 2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for most recent version. + + +// one identification macro for each of the +// compilers we support: + +# define BOOST_CXX_GCCXML 0 +# define BOOST_CXX_CLANG 0 +# define BOOST_CXX_COMO 0 +# define BOOST_CXX_DMC 0 +# define BOOST_CXX_INTEL 0 +# define BOOST_CXX_GNUC 0 +# define BOOST_CXX_KCC 0 +# define BOOST_CXX_SGI 0 +# define BOOST_CXX_TRU64 0 +# define BOOST_CXX_GHS 0 +# define BOOST_CXX_BORLAND 0 +# define BOOST_CXX_CW 0 +# define BOOST_CXX_SUNPRO 0 +# define BOOST_CXX_HPACC 0 +# define BOOST_CXX_MPW 0 +# define BOOST_CXX_IBMCPP 0 +# define BOOST_CXX_MSVC 0 +# define BOOST_CXX_PGI 0 +# define BOOST_CXX_NVCC 0 + + +// locate which compiler we are using and define +// BOOST_COMPILER_CONFIG as needed: + +#if defined(__GCCXML__) +// GCC-XML emulates other compilers, it has to appear first here! +# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" + +#elif defined __CUDACC__ +// NVIDIA CUDA C++ compiler for GPU +# define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp" + +#elif defined __COMO__ +// Comeau C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" + +#elif defined __clang__ +// Clang C++ emulates GCC, so it has to appear early. +# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" + +#elif defined __DMC__ +// Digital Mars C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" + +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" + +# elif defined __GNUC__ +// GNU C++: +# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" + +#elif defined __KCC +// Kai C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp" + +#elif defined __sgi +// SGI MIPSpro C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp" + +#elif defined __DECCXX +// Compaq Tru64 Unix cxx +# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp" + +#elif defined __ghs +// Greenhills C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" + +#elif defined __CODEGEARC__ +// CodeGear - must be checked for before Borland +# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp" + +#elif defined __BORLANDC__ +// Borland +# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" + +#elif defined __MWERKS__ +// Metrowerks CodeWarrior +# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp" + +#elif defined __SUNPRO_CC +// Sun Workshop Compiler C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp" + +#elif defined __HP_aCC +// HP aCC +# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp" + +#elif defined(__MRC__) || defined(__SC__) +// MPW MrCpp or SCpp +# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp" + +#elif defined(__IBMCPP__) +// IBM Visual Age +# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp" + +#elif defined(__PGI) +// Portland Group Inc. +# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp" + +#elif defined _MSC_VER +// Microsoft Visual C++ +// +// Must remain the last #elif since some other vendors (Metrowerks, for +// example) also #define _MSC_VER +# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp" + +#elif defined (BOOST_ASSERT_CONFIG) +// this must come last - generate an error if we don't +// recognise the compiler: +# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/select_platform_config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/select_platform_config.hpp new file mode 100644 index 0000000000..bc1ffaf69f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/select_platform_config.hpp @@ -0,0 +1,101 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. +// Note that we define the headers to include using "header_name" not +// in order to prevent macro expansion within the header +// name (for example "linux" is a macro on linux systems). + +#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) +// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though? +# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp" + +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +// BSD: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp" + +#elif defined(sun) || defined(__sun) +// solaris: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp" + +#elif defined(__sgi) +// SGI Irix: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp" + +#elif defined(__hpux) +// hp unix: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp" + +#elif defined(__CYGWIN__) +// cygwin is not win32: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +// win32: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" + +#elif defined(__BEOS__) +// BeOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" + +#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) +// MacOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp" + +#elif defined(__IBMCPP__) || defined(_AIX) +// IBM +# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" + +#elif defined(__amigaos__) +// AmigaOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp" + +#elif defined(__QNXNTO__) +// QNX: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp" + +#elif defined(__VXWORKS__) +// vxWorks: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp" + +#elif defined(__SYMBIAN32__) +// Symbian: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" + +#elif defined(__VMS) +// VMS: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" +#else + +# if defined(unix) \ + || defined(__unix) \ + || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) + + // generic unix platform: + +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif + +# include + +# endif + +# if defined (BOOST_ASSERT_CONFIG) + // this must come last - generate an error if we don't + // recognise the platform: +# error "Unknown platform - please configure and report the results to boost.org" +# endif + +#endif + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/select_stdlib_config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/select_stdlib_config.hpp new file mode 100644 index 0000000000..2a1430aef4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/select_stdlib_config.hpp @@ -0,0 +1,77 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: + +// First include to determine if some version of STLport is in use as the std lib +// (do not rely on this header being included since users can short-circuit this header +// if they know whose std lib they are using.) +#include + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +// STLPort library; this _must_ come first, otherwise since +// STLport typically sits on top of some other library, we +// can end up detecting that first rather than STLport: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" + +#else + +// If our std lib was not some version of STLport, then include as it is about +// the smallest of the std lib headers that includes real C++ stuff. (Some std libs do not +// include their C++-related macros in so this additional include makes sure +// we get those definitions) +// (again do not rely on this header being included since users can short-circuit this +// header if they know whose std lib they are using.) +#include + +#if defined(__LIBCOMO__) +// Comeau STL: +#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" + +#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +// Rogue Wave library: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" + +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +// GNU libstdc++ 3 +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" + +#elif defined(__STL_CONFIG_H) +// generic SGI STL +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp" + +#elif defined(__MSL_CPP__) +// MSL standard lib: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp" + +#elif defined(__IBMCPP__) +// take the default VACPP std lib +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp" + +#elif defined(MSIPL_COMPILE_H) +// Modena C++ standard library +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" + +#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +// Dinkumware Library (this has to appear after any possible replacement libraries): +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" + +#elif defined (BOOST_ASSERT_CONFIG) +// this must come last - generate an error if we don't +// recognise the library: +# error "Unknown standard library - please configure and report the results to boost.org" + +#endif + +#endif + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/dinkumware.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/dinkumware.hpp new file mode 100644 index 0000000000..e33fef12ea --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/dinkumware.hpp @@ -0,0 +1,149 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Guillaume Melquiond 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Dinkumware standard library config: + +#if !defined(_YVALS) && !defined(_CPPLIB_VER) +#include +#if !defined(_YVALS) && !defined(_CPPLIB_VER) +#error This is not the Dinkumware lib! +#endif +#endif + + +#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) + // full dinkumware 3.06 and above + // fully conforming provided the compiler supports it: +# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h +# define BOOST_NO_STDC_NAMESPACE +# endif +# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) +# define BOOST_NO_STD_ALLOCATOR +# endif +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) + // if this lib version is set up for vc6 then there is no std::use_facet: +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET + // C lib functions aren't in namespace std either: +# define BOOST_NO_STDC_NAMESPACE + // and nor is +# define BOOST_NO_EXCEPTION_STD_NAMESPACE +# endif +// There's no numeric_limits support unless _LONGLONG is defined: +# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310) +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# endif +// 3.06 appears to have (non-sgi versions of) & , +// and no at all +#else +# define BOOST_MSVC_STD_ITERATOR 1 +# define BOOST_NO_STD_ITERATOR +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STDC_NAMESPACE +# define BOOST_NO_STD_USE_FACET +# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN +# define BOOST_HAS_MACRO_USE_FACET +# ifndef _CPPLIB_VER + // Updated Dinkum library defines this, and provides + // its own min and max definitions, as does MTA version. +# ifndef __MTA__ +# define BOOST_NO_STD_MIN_MAX +# endif +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# endif +#endif + +// +// std extension namespace is stdext for vc7.1 and later, +// the same applies to other compilers that sit on top +// of vc7.1 (Intel and Comeau): +// +#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) +# define BOOST_STD_EXTENSION_NAMESPACE stdext +#endif + + +#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) + // if we're using a dinkum lib that's + // been configured for VC6/7 then there is + // no iterator traits (true even for icl) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310) +// Intel C++ chokes over any non-trivial use of +// this may be an overly restrictive define, but regex fails without it: +# define BOOST_NO_STD_LOCALE +#endif + +#include +#if !_HAS_EXCEPTIONS +# define BOOST_NO_STD_TYPEINFO +#endif + +// C++0x headers implemented in 520 (as shipped by Microsoft) +// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPEINDEX +#endif + +#if !defined(_HAS_TR1_IMPORTS) && !defined(BOOST_NO_0X_HDR_TUPLE) +# define BOOST_NO_0X_HDR_TUPLE +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_NUMERIC_LIMITS_LOWEST + +#ifdef _CPPLIB_VER +# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER +#else +# define BOOST_DINKUMWARE_STDLIB 1 +#endif + +#ifdef _CPPLIB_VER +# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER) +#else +# define BOOST_STDLIB "Dinkumware standard library version 1.x" +#endif + + + + + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/libcomo.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/libcomo.hpp new file mode 100644 index 0000000000..16a842ae2e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/libcomo.hpp @@ -0,0 +1,73 @@ +// (C) Copyright John Maddock 2002 - 2003. +// (C) Copyright Jens Maurer 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Comeau STL: + +#if !defined(__LIBCOMO__) +# include +# if !defined(__LIBCOMO__) +# error "This is not the Comeau STL!" +# endif +#endif + +// +// std::streambuf is non-standard +// NOTE: versions of libcomo prior to beta28 have octal version numbering, +// e.g. version 25 is 21 (dec) +#if __LIBCOMO_VERSION__ <= 22 +# define BOOST_NO_STD_WSTREAMBUF +#endif + +#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32) +#define BOOST_NO_SWPRINTF +#endif + +#if __LIBCOMO_VERSION__ >= 31 +# define BOOST_HAS_HASH +# define BOOST_HAS_SLIST +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_NUMERIC_LIMITS_LOWEST + +// +// Intrinsic type_traits support. +// The SGI STL has it's own __type_traits class, which +// has intrinsic compiler support with SGI's compilers. +// Whatever map SGI style type traits to boost equivalents: +// +#define BOOST_HAS_SGI_TYPE_TRAITS + +#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/libstdcpp3.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/libstdcpp3.hpp new file mode 100644 index 0000000000..01dd490751 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/libstdcpp3.hpp @@ -0,0 +1,134 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// config for libstdc++ v3 +// not much to go in here: + +#ifdef __GLIBCXX__ +#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) +#else +#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) +#endif + +#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) +# define BOOST_NO_CWCHAR +# define BOOST_NO_CWCTYPE +# define BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTREAMBUF +#endif + +#if defined(__osf__) && !defined(_REENTRANT) \ + && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) +// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header +// file is included, therefore for consistency we define it here as well. +# define _REENTRANT +#endif + +#ifdef __GLIBCXX__ // gcc 3.4 and greater: +# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ + || defined(_GLIBCXX__PTHREADS) + // + // If the std lib has thread support turned on, then turn it on in Boost + // as well. We do this because some gcc-3.4 std lib headers define _REENTANT + // while others do not... + // +# define BOOST_HAS_THREADS +# else +# define BOOST_DISABLE_THREADS +# endif +#elif defined(__GLIBCPP__) \ + && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ + && !defined(_GLIBCPP__PTHREADS) + // disable thread support if the std lib was built single threaded: +# define BOOST_DISABLE_THREADS +#endif + +#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) +// linux on arm apparently doesn't define _REENTRANT +// so just turn on threading support whenever the std lib is thread safe: +# define BOOST_HAS_THREADS +#endif + + +#if !defined(_GLIBCPP_USE_LONG_LONG) \ + && !defined(_GLIBCXX_USE_LONG_LONG)\ + && defined(BOOST_HAS_LONG_LONG) +// May have been set by compiler/*.hpp, but "long long" without library +// support is useless. +# undef BOOST_HAS_LONG_LONG +#endif + +#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 +# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx +# define BOOST_HAS_SLIST +# define BOOST_HAS_HASH +# define BOOST_SLIST_HEADER +# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) +# define BOOST_HASH_SET_HEADER +# define BOOST_HASH_MAP_HEADER +# else +# define BOOST_HASH_SET_HEADER +# define BOOST_HASH_MAP_HEADER +# endif +#endif + +// stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly +// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ +// developers. He also commented: +// +// "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in +// GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. +// Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support +// than any release in the 4.2 series." +// +// Another resource for understanding stdlibc++ features is: +// http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x + +// C++0x headers in GCC 4.3.0 and later +// +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +#endif + +// C++0x headers in GCC 4.4.0 and later +// +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_THREAD +#endif + +// C++0x features in GCC 4.5.0 and later +// +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_NO_NUMERIC_LIMITS_LOWEST +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_TYPEINDEX + +// --- end --- diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/modena.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/modena.hpp new file mode 100644 index 0000000000..147060d9f7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/modena.hpp @@ -0,0 +1,57 @@ +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Modena C++ standard library (comes with KAI C++) + +#if !defined(MSIPL_COMPILE_H) +# include +# if !defined(__MSIPL_COMPILE_H) +# error "This is not the Modena C++ library!" +# endif +#endif + +#ifndef MSIPL_NL_TYPES +#define BOOST_NO_STD_MESSAGES +#endif + +#ifndef MSIPL_WCHART +#define BOOST_NO_STD_WSTRING +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_NUMERIC_LIMITS_LOWEST + +#define BOOST_STDLIB "Modena C++ standard library" + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/msl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/msl.hpp new file mode 100644 index 0000000000..8185e351ea --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/msl.hpp @@ -0,0 +1,85 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Metrowerks standard library: + +#ifndef __MSL_CPP__ +# include +# ifndef __MSL_CPP__ +# error This is not the MSL standard library! +# endif +#endif + +#if __MSL_CPP__ >= 0x6000 // Pro 6 +# define BOOST_HAS_HASH +# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks +#endif +#define BOOST_HAS_SLIST + +#if __MSL_CPP__ < 0x6209 +# define BOOST_NO_STD_MESSAGES +#endif + +// check C lib version for +#include + +#if defined(__MSL__) && (__MSL__ >= 0x5000) +# define BOOST_HAS_STDINT_H +# if !defined(__PALMOS_TRAPS__) +# define BOOST_HAS_UNISTD_H +# endif + // boilerplate code: +# include +#endif + +#if defined(_MWMT) || _MSL_THREADSAFE +# define BOOST_HAS_THREADS +#endif + +#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_NUMERIC_LIMITS_LOWEST + +#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) + + + + + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/roguewave.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/roguewave.hpp new file mode 100644 index 0000000000..dcd0af84d0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/roguewave.hpp @@ -0,0 +1,181 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2003. +// (C) Copyright Boris Gubenko 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Rogue Wave std lib: + +#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) +# include +# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) +# error This is not the Rogue Wave standard library +# endif +#endif +// +// figure out a consistent version number: +// +#ifndef _RWSTD_VER +# define BOOST_RWSTD_VER 0x010000 +#elif _RWSTD_VER < 0x010000 +# define BOOST_RWSTD_VER (_RWSTD_VER << 8) +#else +# define BOOST_RWSTD_VER _RWSTD_VER +#endif + +#ifndef _RWSTD_VER +# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)" +#elif _RWSTD_VER < 0x04010200 + # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER) +#else +# ifdef _RWSTD_VER_STR +# define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR +# else +# define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER) +# endif +#endif + +// +// Prior to version 2.2.0 the primary template for std::numeric_limits +// does not have compile time constants, even though specializations of that +// template do: +// +#if BOOST_RWSTD_VER < 0x020200 +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the +// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): +#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +# endif + +// +// Borland version of numeric_limits lacks __int64 specialisation: +// +#ifdef __BORLANDC__ +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#endif + +// +// No std::iterator if it can't figure out default template args: +// +#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000) +# define BOOST_NO_STD_ITERATOR +#endif + +// +// No iterator traits without partial specialization: +// +#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// Prior to version 2.0, std::auto_ptr was buggy, and there were no +// new-style iostreams, and no conformant std::allocator: +// +#if (BOOST_RWSTD_VER < 0x020000) +# define BOOST_NO_AUTO_PTR +# define BOOST_NO_STRINGSTREAM +# define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STD_LOCALE +#endif + +// +// No template iterator constructors without member template support: +// +#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +#endif + +// +// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use +// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR +// on HP aCC systems even though the allocator is in fact broken): +// +#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// If we have a std::locale, we still may not have std::use_facet: +// +#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE) +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET +#endif + +// +// There's no std::distance prior to version 2, or without +// partial specialization support: +// +#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + #define BOOST_NO_STD_DISTANCE +#endif + +// +// Some versions of the rogue wave library don't have assignable +// OutputIterators: +// +#if BOOST_RWSTD_VER < 0x020100 +# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN +#endif + +// +// Disable BOOST_HAS_LONG_LONG when the library has no support for it. +// +#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG) +# undef BOOST_HAS_LONG_LONG +#endif + +// +// check that on HP-UX, the proper RW library is used +// +#if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD) +# error "Boost requires Standard RW library. Please compile and link with -AA" +#endif + +// +// Define macros specific to RW V2.2 on HP-UX +// +#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100) +# ifndef __HP_TC1_MAKE_PAIR +# define __HP_TC1_MAKE_PAIR +# endif +# ifndef _HP_INSTANTIATE_STD2_VL +# define _HP_INSTANTIATE_STD2_VL +# endif +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_NUMERIC_LIMITS_LOWEST + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/sgi.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/sgi.hpp new file mode 100644 index 0000000000..4d4264731c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/sgi.hpp @@ -0,0 +1,138 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// generic SGI STL: + +#if !defined(__STL_CONFIG_H) +# include +# if !defined(__STL_CONFIG_H) +# error "This is not the SGI STL!" +# endif +#endif + +// +// No std::iterator traits without partial specialisation: +// +#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// No std::stringstream with gcc < 3 +// +#if defined(__GNUC__) && (__GNUC__ < 3) && \ + ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \ + !defined(__STL_USE_NEW_IOSTREAMS) || \ + defined(__APPLE_CC__) + // Note that we only set this for GNU C++ prior to 2.95 since the + // latest patches for that release do contain a minimal + // If you are running a 2.95 release prior to 2.95.3 then this will need + // setting, but there is no way to detect that automatically (other + // than by running the configure script). + // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't + // have . +# define BOOST_NO_STRINGSTREAM +#endif + +// +// Assume no std::locale without own iostreams (this may be an +// incorrect assumption in some cases): +// +#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +#endif + +// +// Original native SGI streams have non-standard std::messages facet: +// +#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +#endif + +// +// SGI's new iostreams have missing "const" in messages<>::open +// +#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS) +# define BOOST_NO_STD_MESSAGES +#endif + +// +// No template iterator constructors, or std::allocator +// without member templates: +// +#if !defined(__STL_MEMBER_TEMPLATES) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// We always have SGI style hash_set, hash_map, and slist: +// +#define BOOST_HAS_HASH +#define BOOST_HAS_SLIST + +// +// If this is GNU libstdc++2, then no and no std::wstring: +// +#if (defined(__GNUC__) && (__GNUC__ < 3)) +# include +# if defined(__BASTRING__) +# define BOOST_NO_LIMITS +// Note: will provide compile-time constants +# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_STD_WSTRING +# endif +#endif + +// +// There is no standard iterator unless we have namespace support: +// +#if !defined(__STL_USE_NAMESPACES) +# define BOOST_NO_STD_ITERATOR +#endif + +// +// Intrinsic type_traits support. +// The SGI STL has it's own __type_traits class, which +// has intrinsic compiler support with SGI's compilers. +// Whatever map SGI style type traits to boost equivalents: +// +#define BOOST_HAS_SGI_TYPE_TRAITS + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_NUMERIC_LIMITS_LOWEST + +#define BOOST_STDLIB "SGI standard library" + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/stlport.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/stlport.hpp new file mode 100644 index 0000000000..0e1c9b2bc2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/stlport.hpp @@ -0,0 +1,238 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// STLPort standard library config: + +#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +# include +# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +# error "This is not STLPort!" +# endif +#endif + +// +// __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +// for versions prior to 4.1(beta) +// +#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +// +// If STLport thinks that there is no partial specialisation, then there is no +// std::iterator traits: +// +#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// No new style iostreams on GCC without STLport's iostreams enabled: +// +#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) +# define BOOST_NO_STRINGSTREAM +#endif + +// +// No new iostreams implies no std::locale, and no std::stringstream: +// +#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +# define BOOST_NO_STRINGSTREAM +#endif + +// +// If the streams are not native, and we have a "using ::x" compiler bug +// then the io stream facets are not available in namespace std:: +// +#ifdef _STLPORT_VERSION +# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# define BOOST_NO_STD_LOCALE +# endif +#else +# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# define BOOST_NO_STD_LOCALE +# endif +#endif + +#if defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x500) || (_STLPORT_VERSION >= 0x520)) +# define BOOST_NO_STD_UNORDERED +#endif + +#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520) +# define BOOST_HAS_TR1_UNORDERED_SET +# define BOOST_HAS_TR1_UNORDERED_MAP +#endif +// +// Without member template support enabled, their are no template +// iterate constructors, and no std::allocator: +// +#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +#endif +// +// however we always have at least a partial allocator: +// +#define BOOST_HAS_PARTIAL_STD_ALLOCATOR + +#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) +# define BOOST_NO_STD_ALLOCATOR +#endif + +#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// If STLport thinks there is no wchar_t at all, then we have to disable +// the support for the relevant specilazations of std:: templates. +// +#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) +# ifndef BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTRING +# endif +# ifndef BOOST_NO_STD_WSTREAMBUF +# define BOOST_NO_STD_WSTREAMBUF +# endif +#endif + +// +// We always have SGI style hash_set, hash_map, and slist: +// +#ifndef _STLP_NO_EXTENSIONS +#define BOOST_HAS_HASH +#define BOOST_HAS_SLIST +#endif + +// +// STLport does a good job of importing names into namespace std::, +// but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our +// workaround does not conflict with STLports: +// +// +// Harold Howe says: +// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with +// BCB6 does cause problems. If we detect C++ Builder, then don't define +// BOOST_NO_STDC_NAMESPACE +// +#if !defined(__BORLANDC__) && !defined(__DMC__) +// +// If STLport is using it's own namespace, and the real names are in +// the global namespace, then we duplicate STLport's using declarations +// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't +// necessarily import all the names we need into namespace std:: +// +# if (defined(__STL_IMPORT_VENDOR_CSTD) \ + || defined(__STL_USE_OWN_NAMESPACE) \ + || defined(_STLP_IMPORT_VENDOR_CSTD) \ + || defined(_STLP_USE_OWN_NAMESPACE)) \ + && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) +# define BOOST_NO_STDC_NAMESPACE +# define BOOST_NO_EXCEPTION_STD_NAMESPACE +# endif +#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 +// STLport doesn't import std::abs correctly: +#include +namespace std { using ::abs; } +// and strcmp/strcpy don't get imported either ('cos they are macros) +#include +#ifdef strcpy +# undef strcpy +#endif +#ifdef strcmp +# undef strcmp +#endif +#ifdef _STLP_VENDOR_CSTD +namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } +#endif +#endif + +// +// std::use_facet may be non-standard, uses a class instead: +// +#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_STLP_USE_FACET +#endif + +// +// If STLport thinks there are no wide functions, etc. is not working; but +// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import +// into std:: ourselves). +// +#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) +# define BOOST_NO_CWCHAR +# define BOOST_NO_CWCTYPE +#endif + +// +// If STLport for some reason was configured so that it thinks that wchar_t +// is not an intrinsic type, then we have to disable the support for it as +// well (we would be missing required specializations otherwise). +// +#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) +# undef BOOST_NO_INTRINSIC_WCHAR_T +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +// +// Borland ships a version of STLport with C++ Builder 6 that lacks +// hashtables and the like: +// +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) +# undef BOOST_HAS_HASH +#endif + +// +// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max +// +#if defined(__GNUC__) && (__GNUC__ < 3) +# include // for std::min and std::max +# define BOOST_USING_STD_MIN() ((void)0) +# define BOOST_USING_STD_MAX() ((void)0) +namespace boost { using std::min; using std::max; } +#endif + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_NUMERIC_LIMITS_LOWEST + +#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) + + + + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/vacpp.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/vacpp.hpp new file mode 100644 index 0000000000..0fc092f0ee --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/stdlib/vacpp.hpp @@ -0,0 +1,45 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +#if __IBMCPP__ <= 501 +# define BOOST_NO_STD_ALLOCATOR +#endif + +#define BOOST_HAS_MACRO_USE_FACET +#define BOOST_NO_STD_MESSAGES + +// C++0x headers not yet implemented +// +# define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_CHRONO +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_TYPE_TRAITS +# define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_STD_UNORDERED // deprecated; see following +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_NUMERIC_LIMITS_LOWEST + +#define BOOST_STDLIB "Visual Age default standard library" + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/suffix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/suffix.hpp new file mode 100644 index 0000000000..722758f951 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/suffix.hpp @@ -0,0 +1,647 @@ +// Boost config.hpp configuration header file ------------------------------// + +// Copyright (c) 2001-2003 John Maddock +// Copyright (c) 2001 Darin Adler +// Copyright (c) 2001 Peter Dimov +// Copyright (c) 2002 Bill Kempf +// Copyright (c) 2002 Jens Maurer +// Copyright (c) 2002-2003 David Abrahams +// Copyright (c) 2003 Gennaro Prota +// Copyright (c) 2003 Eric Friedman +// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/ for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config/ +// +// This file is intended to be stable, and relatively unchanging. +// It should contain boilerplate code only - no compiler specific +// code unless it is unavoidable - no changes unless unavoidable. + +#ifndef BOOST_CONFIG_SUFFIX_HPP +#define BOOST_CONFIG_SUFFIX_HPP + +#if defined(__GNUC__) && (__GNUC__ >= 4) +// +// Some GCC-4.x versions issue warnings even when __extension__ is used, +// so use this as a workaround: +// +#pragma GCC system_header +#endif + +// +// ensure that visibility macros are always defined, thus symplifying use +// +#ifndef BOOST_SYMBOL_EXPORT +# define BOOST_SYMBOL_EXPORT +#endif +#ifndef BOOST_SYMBOL_IMPORT +# define BOOST_SYMBOL_IMPORT +#endif +#ifndef BOOST_SYMBOL_VISIBLE +# define BOOST_SYMBOL_VISIBLE +#endif + +// +// look for long long by looking for the appropriate macros in . +// Note that we use limits.h rather than climits for maximal portability, +// remember that since these just declare a bunch of macros, there should be +// no namespace issues from this. +// +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ + && !defined(BOOST_MSVC) && !defined(__BORLANDC__) +# include +# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) +# define BOOST_HAS_LONG_LONG +# else +# define BOOST_NO_LONG_LONG +# endif +#endif + +// GCC 3.x will clean up all of those nasty macro definitions that +// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine +// it under GCC 3.x. +#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) +# undef BOOST_NO_CTYPE_FUNCTIONS +#endif + +// +// Assume any extensions are in namespace std:: unless stated otherwise: +// +# ifndef BOOST_STD_EXTENSION_NAMESPACE +# define BOOST_STD_EXTENSION_NAMESPACE std +# endif + +// +// If cv-qualified specializations are not allowed, then neither are cv-void ones: +// +# if defined(BOOST_NO_CV_SPECIALIZATIONS) \ + && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# endif + +// +// If there is no numeric_limits template, then it can't have any compile time +// constants either! +// +# if defined(BOOST_NO_LIMITS) \ + && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +# endif + +// +// if there is no long long then there is no specialisation +// for numeric_limits either: +// +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +#endif + +// +// Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT: +// +#if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) +# define BOOST_HAS_STATIC_ASSERT +#endif + +// +// if there is no __int64 then there is no specialisation +// for numeric_limits<__int64> either: +// +#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#endif + +// +// if member templates are supported then so is the +// VC6 subset of member templates: +// +# if !defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) +# define BOOST_MSVC6_MEMBER_TEMPLATES +# endif + +// +// Without partial specialization, can't test for partial specialisation bugs: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) +# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +# endif + +// +// Without partial specialization, we can't have array-type partial specialisations: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +# endif + +// +// Without partial specialization, std::iterator_traits can't work: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_STD_ITERATOR_TRAITS) +# define BOOST_NO_STD_ITERATOR_TRAITS +# endif + +// +// Without partial specialization, partial +// specialization with default args won't work either: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) +# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS +# endif + +// +// Without member template support, we can't have template constructors +// in the standard library either: +// +# if defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ + && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# endif + +// +// Without member template support, we can't have a conforming +// std::allocator template either: +// +# if defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ + && !defined(BOOST_NO_STD_ALLOCATOR) +# define BOOST_NO_STD_ALLOCATOR +# endif + +// +// without ADL support then using declarations will break ADL as well: +// +#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// +// Without typeid support we have no dynamic RTTI either: +// +#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// +// If we have a standard allocator, then we have a partial one as well: +// +#if !defined(BOOST_NO_STD_ALLOCATOR) +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#endif + +// +// We can't have a working std::use_facet if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) +# define BOOST_NO_STD_USE_FACET +# endif + +// +// We can't have a std::messages facet if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) +# define BOOST_NO_STD_MESSAGES +# endif + +// +// We can't have a working std::wstreambuf if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) +# define BOOST_NO_STD_WSTREAMBUF +# endif + +// +// We can't have a if there is no : +// +# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) +# define BOOST_NO_CWCTYPE +# endif + +// +// We can't have a swprintf if there is no : +// +# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +# endif + +// +// If Win32 support is turned off, then we must turn off +// threading support also, unless there is some other +// thread API enabled: +// +#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ + && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) +# define BOOST_DISABLE_THREADS +#endif + +// +// Turn on threading support if the compiler thinks that it's in +// multithreaded mode. We put this here because there are only a +// limited number of macros that identify this (if there's any missing +// from here then add to the appropriate compiler section): +// +#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ + || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \ + && !defined(BOOST_HAS_THREADS) +# define BOOST_HAS_THREADS +#endif + +// +// Turn threading support off if BOOST_DISABLE_THREADS is defined: +// +#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) +# undef BOOST_HAS_THREADS +#endif + +// +// Turn threading support off if we don't recognise the threading API: +// +#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ + && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ + && !defined(BOOST_HAS_MPTASKS) +# undef BOOST_HAS_THREADS +#endif + +// +// Turn threading detail macros off if we don't (want to) use threading +// +#ifndef BOOST_HAS_THREADS +# undef BOOST_HAS_PTHREADS +# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# undef BOOST_HAS_PTHREAD_YIELD +# undef BOOST_HAS_PTHREAD_DELAY_NP +# undef BOOST_HAS_WINTHREADS +# undef BOOST_HAS_BETHREADS +# undef BOOST_HAS_MPTASKS +#endif + +// +// If the compiler claims to be C99 conformant, then it had better +// have a : +// +# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) +# define BOOST_HAS_STDINT_H +# ifndef BOOST_HAS_LOG1P +# define BOOST_HAS_LOG1P +# endif +# ifndef BOOST_HAS_EXPM1 +# define BOOST_HAS_EXPM1 +# endif +# endif + +// +// Define BOOST_NO_SLIST and BOOST_NO_HASH if required. +// Note that this is for backwards compatibility only. +// +# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) +# define BOOST_NO_SLIST +# endif + +# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) +# define BOOST_NO_HASH +# endif + +// +// Set BOOST_SLIST_HEADER if not set already: +// +#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) +# define BOOST_SLIST_HEADER +#endif + +// +// Set BOOST_HASH_SET_HEADER if not set already: +// +#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER) +# define BOOST_HASH_SET_HEADER +#endif + +// +// Set BOOST_HASH_MAP_HEADER if not set already: +// +#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER) +# define BOOST_HASH_MAP_HEADER +#endif + +// +// Set BOOST_NO_INITIALIZER_LISTS if there is no library support. +// + +#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) +# define BOOST_NO_INITIALIZER_LISTS +#endif + +// +// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined +// +#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) +#define BOOST_HAS_RVALUE_REFS +#endif + +// BOOST_HAS_ABI_HEADERS +// This macro gets set if we have headers that fix the ABI, +// and prevent ODR violations when linking to external libraries: +#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) +# define BOOST_HAS_ABI_HEADERS +#endif + +#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) +# undef BOOST_HAS_ABI_HEADERS +#endif + +// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// +// Because std::size_t usage is so common, even in boost headers which do not +// otherwise use the C library, the workaround is included here so +// that ugly workaround code need not appear in many other boost headers. +// NOTE WELL: This is a workaround for non-conforming compilers; +// must still be #included in the usual places so that inclusion +// works as expected with standard conforming compilers. The resulting +// double inclusion of is harmless. + +# ifdef BOOST_NO_STDC_NAMESPACE +# include + namespace std { using ::ptrdiff_t; using ::size_t; } +# endif + +// Workaround for the unfortunate min/max macros defined by some platform headers + +#define BOOST_PREVENT_MACRO_SUBSTITUTION + +#ifndef BOOST_USING_STD_MIN +# define BOOST_USING_STD_MIN() using std::min +#endif + +#ifndef BOOST_USING_STD_MAX +# define BOOST_USING_STD_MAX() using std::max +#endif + +// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// + +# ifdef BOOST_NO_STD_MIN_MAX + +namespace std { + template + inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { + return __b < __a ? __b : __a; + } + template + inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { + return __a < __b ? __b : __a; + } +} + +# endif + +// BOOST_STATIC_CONSTANT workaround --------------------------------------- // +// On compilers which don't allow in-class initialization of static integral +// constant members, we must use enums as a workaround if we want the constants +// to be available at compile-time. This macro gives us a convenient way to +// declare such constants. + +# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } +# else +# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment +# endif + +// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// +// When the standard library does not have a conforming std::use_facet there +// are various workarounds available, but they differ from library to library. +// The same problem occurs with has_facet. +// These macros provide a consistent way to access a locale's facets. +// Usage: +// replace +// std::use_facet(loc); +// with +// BOOST_USE_FACET(Type, loc); +// Note do not add a std:: prefix to the front of BOOST_USE_FACET! +// Use for BOOST_HAS_FACET is analogous. + +#if defined(BOOST_NO_STD_USE_FACET) +# ifdef BOOST_HAS_TWO_ARG_USE_FACET +# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) +# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) +# elif defined(BOOST_HAS_MACRO_USE_FACET) +# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) +# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) +# elif defined(BOOST_HAS_STLP_USE_FACET) +# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) +# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) +# endif +#else +# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) +# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) +#endif + +// BOOST_NESTED_TEMPLATE workaround ------------------------------------------// +// Member templates are supported by some compilers even though they can't use +// the A::template member syntax, as a workaround replace: +// +// typedef typename A::template rebind binder; +// +// with: +// +// typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; + +#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD +# define BOOST_NESTED_TEMPLATE template +#else +# define BOOST_NESTED_TEMPLATE +#endif + +// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// +// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION +// is defined, in which case it evaluates to return x; Use when you have a return +// statement that can never be reached. + +#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_UNREACHABLE_RETURN(x) return x; +#else +# define BOOST_UNREACHABLE_RETURN(x) +#endif + +// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// +// +// Some compilers don't support the use of `typename' for dependent +// types in deduced contexts, e.g. +// +// template void f(T, typename T::type); +// ^^^^^^^^ +// Replace these declarations with: +// +// template void f(T, BOOST_DEDUCED_TYPENAME T::type); + +#ifndef BOOST_NO_DEDUCED_TYPENAME +# define BOOST_DEDUCED_TYPENAME typename +#else +# define BOOST_DEDUCED_TYPENAME +#endif + +#ifndef BOOST_NO_TYPENAME_WITH_CTOR +# define BOOST_CTOR_TYPENAME typename +#else +# define BOOST_CTOR_TYPENAME +#endif + +// long long workaround ------------------------------------------// +// On gcc (and maybe other compilers?) long long is alway supported +// but it's use may generate either warnings (with -ansi), or errors +// (with -pedantic -ansi) unless it's use is prefixed by __extension__ +// +#if defined(BOOST_HAS_LONG_LONG) +namespace boost{ +# ifdef __GNUC__ + __extension__ typedef long long long_long_type; + __extension__ typedef unsigned long long ulong_long_type; +# else + typedef long long long_long_type; + typedef unsigned long long ulong_long_type; +# endif +} +#endif + +// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// +// +// Some compilers have problems with function templates whose template +// parameters don't appear in the function parameter list (basically +// they just link one instantiation of the template in the final +// executable). These macros provide a uniform way to cope with the +// problem with no effects on the calling syntax. + +// Example: +// +// #include +// #include +// #include +// +// template +// void f() { std::cout << n << ' '; } +// +// template +// void g() { std::cout << typeid(T).name() << ' '; } +// +// int main() { +// f<1>(); +// f<2>(); +// +// g(); +// g(); +// } +// +// With VC++ 6.0 the output is: +// +// 2 2 double double +// +// To fix it, write +// +// template +// void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... } +// +// template +// void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... } +// + + +#if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS + +# include "boost/type.hpp" +# include "boost/non_type.hpp" + +# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type* = 0 +# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type* +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type* = 0 +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type* + +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \ + , BOOST_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \ + , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \ + , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \ + , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +#else + +// no workaround needed: expand to nothing + +# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + + +#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS + +// When BOOST_NO_STD_TYPEINFO is defined, we can just import +// the global definition into std namespace: +#ifdef BOOST_NO_STD_TYPEINFO +#include +namespace std{ using ::typeinfo; } +#endif + +// ---------------------------------------------------------------------------// + +// +// Helper macro BOOST_STRINGIZE: +// Converts the parameter X to a string after macro replacement +// on X has been performed. +// +#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +#define BOOST_DO_STRINGIZE(X) #X + +// +// Helper macro BOOST_JOIN: +// The following piece of macro magic joins the two +// arguments together, even when one of the arguments is +// itself a macro (see 16.3.1 in C++ standard). The key +// is that macro expansion of macro arguments does not +// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. +// +#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) +#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) +#define BOOST_DO_JOIN2( X, Y ) X##Y + +// +// Set some default values for compiler/library/platform names. +// These are for debugging config setup only: +// +# ifndef BOOST_COMPILER +# define BOOST_COMPILER "Unknown ISO C++ Compiler" +# endif +# ifndef BOOST_STDLIB +# define BOOST_STDLIB "Unknown ISO standard library" +# endif +# ifndef BOOST_PLATFORM +# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) +# define BOOST_PLATFORM "Generic Unix" +# else +# define BOOST_PLATFORM "Unknown" +# endif +# endif + +// +// Set some default values GPU support +// +# ifndef BOOST_GPU_ENABLED +# define BOOST_GPU_ENABLED +# endif +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/user.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/user.hpp new file mode 100644 index 0000000000..5a4a9d4776 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/user.hpp @@ -0,0 +1,124 @@ +// boost/config/user.hpp ---------------------------------------------------// + +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Do not check in modified versions of this file, +// This file may be customized by the end user, but not by boost. + +// +// Use this file to define a site and compiler specific +// configuration policy: +// + +// define this to locate a compiler config file: +// #define BOOST_COMPILER_CONFIG + +// define this to locate a stdlib config file: +// #define BOOST_STDLIB_CONFIG + +// define this to locate a platform config file: +// #define BOOST_PLATFORM_CONFIG + +// define this to disable compiler config, +// use if your compiler config has nothing to set: +// #define BOOST_NO_COMPILER_CONFIG + +// define this to disable stdlib config, +// use if your stdlib config has nothing to set: +// #define BOOST_NO_STDLIB_CONFIG + +// define this to disable platform config, +// use if your platform config has nothing to set: +// #define BOOST_NO_PLATFORM_CONFIG + +// define this to disable all config options, +// excluding the user config. Use if your +// setup is fully ISO compliant, and has no +// useful extensions, or for autoconf generated +// setups: +// #define BOOST_NO_CONFIG + +// define this to make the config "optimistic" +// about unknown compiler versions. Normally +// unknown compiler versions are assumed to have +// all the defects of the last known version, however +// setting this flag, causes the config to assume +// that unknown compiler versions are fully conformant +// with the standard: +// #define BOOST_STRICT_CONFIG + +// define this to cause the config to halt compilation +// with an #error if it encounters anything unknown -- +// either an unknown compiler version or an unknown +// compiler/platform/library: +// #define BOOST_ASSERT_CONFIG + + +// define if you want to disable threading support, even +// when available: +// #define BOOST_DISABLE_THREADS + +// define when you want to disable Win32 specific features +// even when available: +// #define BOOST_DISABLE_WIN32 + +// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any +// prefix/suffix headers that normally control things like struct +// packing and alignment. +// #define BOOST_DISABLE_ABI_HEADERS + +// BOOST_ABI_PREFIX: A prefix header to include in place of whatever +// boost.config would normally select, any replacement should set up +// struct packing and alignment options as required. +// #define BOOST_ABI_PREFIX my-header-name + +// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever +// boost.config would normally select, any replacement should undo +// the effects of the prefix header. +// #define BOOST_ABI_SUFFIX my-header-name + +// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, +// to be linked as dll's rather than static libraries on Microsoft Windows +// (this macro is used to turn on __declspec(dllimport) modifiers, so that +// the compiler knows which symbols to look for in a dll rather than in a +// static library). Note that there may be some libraries that can only +// be statically linked (Boost.Test for example) and others which may only +// be dynamically linked (Boost.Threads for example), in these cases this +// macro has no effect. +// #define BOOST_ALL_DYN_LINK + +// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll +// rather than a static library on Microsoft Windows: replace the WHATEVER +// part of the macro name with the name of the library that you want to +// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or +// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) +// modifiers, so that the compiler knows which symbols to look for in a dll +// rather than in a static library). +// Note that there may be some libraries that can only be statically linked +// (Boost.Test for example) and others which may only be dynamically linked +// (Boost.Threads for example), in these cases this macro is unsupported. +// #define BOOST_WHATEVER_DYN_LINK + +// BOOST_ALL_NO_LIB: Tells the config system not to automatically select +// which libraries to link against. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, +// simply by the act of including one of that library's headers. +// This macro turns that feature off. +// #define BOOST_ALL_NO_LIB + +// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically +// select which library to link against for library "whatever", +// replace WHATEVER in the macro name with the name of the library; +// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, simply +// by the act of including one of that library's headers. This macro turns +// that feature off. +// #define BOOST_WHATEVER_NO_LIB + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/config/warning_disable.hpp b/deal.II/contrib/boost-1.45.0/include/boost/config/warning_disable.hpp new file mode 100644 index 0000000000..26ff1323c0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/config/warning_disable.hpp @@ -0,0 +1,47 @@ +// Copyright John Maddock 2008 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// This file exists to turn off some overly-pedantic warning emitted +// by certain compilers. You should include this header only in: +// +// * A test case, before any other headers, or, +// * A library source file before any other headers. +// +// IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER. +// +// YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING. +// +// The only warnings disabled here are those that are: +// +// * Quite unreasonably pedantic. +// * Generally only emitted by a single compiler. +// * Can't easily be fixed: for example if the vendors own std lib +// code emits these warnings! +// +// Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS: +// not even std library ones! Doing so may turn the warning +// off too late to be of any use. For example the VC++ C4996 +// warning can be omitted from if that header is included +// before or by this one :-( +// + +#ifndef BOOST_CONFIG_WARNING_DISABLE_HPP +#define BOOST_CONFIG_WARNING_DISABLE_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) + // Error 'function': was declared deprecated + // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx + // This error is emitted when you use some perfectly conforming + // std lib functions in a perfectly correct way, and also by + // some of Microsoft's own std lib code ! +# pragma warning(disable:4996) +#endif +#if defined(__INTEL_COMPILER) || defined(__ICL) + // As above: gives warning when a "deprecated" + // std library function is encountered. +# pragma warning(disable:1786) +#endif + +#endif // BOOST_CONFIG_WARNING_DISABLE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/crc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/crc.hpp new file mode 100644 index 0000000000..6be5aa1d8b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/crc.hpp @@ -0,0 +1,1110 @@ +// Boost CRC library crc.hpp header file -----------------------------------// + +// Copyright 2001, 2004 Daryle Walker. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_CRC_HPP +#define BOOST_CRC_HPP + +#include // for BOOST_STATIC_CONSTANT, etc. +#include // for boost::uint_t + +#include // for CHAR_BIT, etc. +#include // for std::size_t + +#include // for std::numeric_limits + + +// The type of CRC parameters that can go in a template should be related +// on the CRC's bit count. This macro expresses that type in a compact +// form, but also allows an alternate type for compilers that don't support +// dependent types (in template value-parameters). +#if !(defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) || (defined(BOOST_MSVC) && (BOOST_MSVC <= 1300))) +#define BOOST_CRC_PARM_TYPE typename ::boost::uint_t::fast +#else +#define BOOST_CRC_PARM_TYPE unsigned long +#endif + +// Some compilers [MS VC++ 6] cannot correctly set up several versions of a +// function template unless every template argument can be unambiguously +// deduced from the function arguments. (The bug is hidden if only one version +// is needed.) Since all of the CRC function templates have this problem, the +// workaround is to make up a dummy function argument that encodes the template +// arguments. Calls to such template functions need all their template +// arguments explicitly specified. At least one compiler that needs this +// workaround also needs the default value for the dummy argument to be +// specified in the definition. +#if defined(__GNUC__) || !defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) +#define BOOST_CRC_DUMMY_PARM_TYPE +#define BOOST_CRC_DUMMY_INIT +#define BOOST_ACRC_DUMMY_PARM_TYPE +#define BOOST_ACRC_DUMMY_INIT +#else +namespace boost { namespace detail { + template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > + struct dummy_crc_argument { }; +} } +#define BOOST_CRC_DUMMY_PARM_TYPE , detail::dummy_crc_argument *p_ +#define BOOST_CRC_DUMMY_INIT BOOST_CRC_DUMMY_PARM_TYPE = 0 +#define BOOST_ACRC_DUMMY_PARM_TYPE , detail::dummy_crc_argument *p_ +#define BOOST_ACRC_DUMMY_INIT BOOST_ACRC_DUMMY_PARM_TYPE = 0 +#endif + + +namespace boost +{ + + +// Forward declarations ----------------------------------------------------// + +template < std::size_t Bits > + class crc_basic; + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly = 0u, + BOOST_CRC_PARM_TYPE InitRem = 0u, + BOOST_CRC_PARM_TYPE FinalXor = 0u, bool ReflectIn = false, + bool ReflectRem = false > + class crc_optimal; + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > + typename uint_t::fast crc( void const *buffer, + std::size_t byte_count + BOOST_CRC_DUMMY_PARM_TYPE ); + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > + typename uint_t::fast augmented_crc( void const *buffer, + std::size_t byte_count, typename uint_t::fast initial_remainder + BOOST_ACRC_DUMMY_PARM_TYPE ); + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > + typename uint_t::fast augmented_crc( void const *buffer, + std::size_t byte_count + BOOST_ACRC_DUMMY_PARM_TYPE ); + +typedef crc_optimal<16, 0x8005, 0, 0, true, true> crc_16_type; +typedef crc_optimal<16, 0x1021, 0xFFFF, 0, false, false> crc_ccitt_type; +typedef crc_optimal<16, 0x8408, 0, 0, true, true> crc_xmodem_type; + +typedef crc_optimal<32, 0x04C11DB7, 0xFFFFFFFF, 0xFFFFFFFF, true, true> + crc_32_type; + + +// Forward declarations for implementation detail stuff --------------------// +// (Just for the stuff that will be needed for the next two sections) + +namespace detail +{ + template < std::size_t Bits > + struct mask_uint_t; + + template < > + struct mask_uint_t< std::numeric_limits::digits >; + + #if USHRT_MAX > UCHAR_MAX + template < > + struct mask_uint_t< std::numeric_limits::digits >; + #endif + + #if UINT_MAX > USHRT_MAX + template < > + struct mask_uint_t< std::numeric_limits::digits >; + #endif + + #if ULONG_MAX > UINT_MAX + template < > + struct mask_uint_t< std::numeric_limits::digits >; + #endif + + template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, bool Reflect > + struct crc_table_t; + + template < std::size_t Bits, bool DoReflect > + class crc_helper; + + #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + template < std::size_t Bits > + class crc_helper< Bits, false >; + #endif + +} // namespace detail + + +// Simple cyclic redundancy code (CRC) class declaration -------------------// + +template < std::size_t Bits > +class crc_basic +{ + // Implementation type + typedef detail::mask_uint_t masking_type; + +public: + // Type + typedef typename masking_type::least value_type; + + // Constant for the template parameter + BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits ); + + // Constructor + explicit crc_basic( value_type truncated_polynominal, + value_type initial_remainder = 0, value_type final_xor_value = 0, + bool reflect_input = false, bool reflect_remainder = false ); + + // Internal Operations + value_type get_truncated_polynominal() const; + value_type get_initial_remainder() const; + value_type get_final_xor_value() const; + bool get_reflect_input() const; + bool get_reflect_remainder() const; + + value_type get_interim_remainder() const; + void reset( value_type new_rem ); + void reset(); + + // External Operations + void process_bit( bool bit ); + void process_bits( unsigned char bits, std::size_t bit_count ); + void process_byte( unsigned char byte ); + void process_block( void const *bytes_begin, void const *bytes_end ); + void process_bytes( void const *buffer, std::size_t byte_count ); + + value_type checksum() const; + +private: + // Member data + value_type rem_; + value_type poly_, init_, final_; // non-const to allow assignability + bool rft_in_, rft_out_; // non-const to allow assignability + +}; // boost::crc_basic + + +// Optimized cyclic redundancy code (CRC) class declaration ----------------// + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +class crc_optimal +{ + // Implementation type + typedef detail::mask_uint_t masking_type; + +public: + // Type + typedef typename masking_type::fast value_type; + + // Constants for the template parameters + BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits ); + BOOST_STATIC_CONSTANT( value_type, truncated_polynominal = TruncPoly ); + BOOST_STATIC_CONSTANT( value_type, initial_remainder = InitRem ); + BOOST_STATIC_CONSTANT( value_type, final_xor_value = FinalXor ); + BOOST_STATIC_CONSTANT( bool, reflect_input = ReflectIn ); + BOOST_STATIC_CONSTANT( bool, reflect_remainder = ReflectRem ); + + // Constructor + explicit crc_optimal( value_type init_rem = InitRem ); + + // Internal Operations + value_type get_truncated_polynominal() const; + value_type get_initial_remainder() const; + value_type get_final_xor_value() const; + bool get_reflect_input() const; + bool get_reflect_remainder() const; + + value_type get_interim_remainder() const; + void reset( value_type new_rem = InitRem ); + + // External Operations + void process_byte( unsigned char byte ); + void process_block( void const *bytes_begin, void const *bytes_end ); + void process_bytes( void const *buffer, std::size_t byte_count ); + + value_type checksum() const; + + // Operators + void operator ()( unsigned char byte ); + value_type operator ()() const; + +private: + // The implementation of output reflection depends on both reflect states. + BOOST_STATIC_CONSTANT( bool, reflect_output = (ReflectRem != ReflectIn) ); + + #ifndef __BORLANDC__ + #define BOOST_CRC_REF_OUT_VAL reflect_output + #else + typedef crc_optimal self_type; + #define BOOST_CRC_REF_OUT_VAL (self_type::reflect_output) + #endif + + // More implementation types + typedef detail::crc_table_t crc_table_type; + typedef detail::crc_helper helper_type; + typedef detail::crc_helper reflect_out_type; + + #undef BOOST_CRC_REF_OUT_VAL + + // Member data + value_type rem_; + +}; // boost::crc_optimal + + +// Implementation detail stuff ---------------------------------------------// + +namespace detail +{ + // Forward declarations for more implementation details + template < std::size_t Bits > + struct high_uint_t; + + template < std::size_t Bits > + struct reflector; + + + // Traits class for mask; given the bit number + // (1-based), get the mask for that bit by itself. + template < std::size_t Bits > + struct high_uint_t + : boost::uint_t< Bits > + { + typedef boost::uint_t base_type; + typedef typename base_type::least least; + typedef typename base_type::fast fast; + +#if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 243 + static const least high_bit = 1ul << ( Bits - 1u ); + static const fast high_bit_fast = 1ul << ( Bits - 1u ); +#else + BOOST_STATIC_CONSTANT( least, high_bit = (least( 1u ) << ( Bits + - 1u )) ); + BOOST_STATIC_CONSTANT( fast, high_bit_fast = (fast( 1u ) << ( Bits + - 1u )) ); +#endif + + }; // boost::detail::high_uint_t + + + // Reflection routine class wrapper + // (since MS VC++ 6 couldn't handle the unwrapped version) + template < std::size_t Bits > + struct reflector + { + typedef typename boost::uint_t::fast value_type; + + static value_type reflect( value_type x ); + + }; // boost::detail::reflector + + // Function that reflects its argument + template < std::size_t Bits > + typename reflector::value_type + reflector::reflect + ( + typename reflector::value_type x + ) + { + value_type reflection = 0; + value_type const one = 1; + + for ( std::size_t i = 0 ; i < Bits ; ++i, x >>= 1 ) + { + if ( x & one ) + { + reflection |= ( one << (Bits - 1u - i) ); + } + } + + return reflection; + } + + + // Traits class for masks; given the bit number (1-based), + // get the mask for that bit and its lower bits. + template < std::size_t Bits > + struct mask_uint_t + : high_uint_t< Bits > + { + typedef high_uint_t base_type; + typedef typename base_type::least least; + typedef typename base_type::fast fast; + + #ifndef __BORLANDC__ + using base_type::high_bit; + using base_type::high_bit_fast; + #else + BOOST_STATIC_CONSTANT( least, high_bit = base_type::high_bit ); + BOOST_STATIC_CONSTANT( fast, high_bit_fast = base_type::high_bit_fast ); + #endif + +#if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 243 + static const least sig_bits = (~( ~( 0ul ) << Bits )) ; +#else + BOOST_STATIC_CONSTANT( least, sig_bits = (~( ~(least( 0u )) << Bits )) ); +#endif +#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2 + // Work around a weird bug that ICEs the compiler in build_c_cast + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = static_cast(sig_bits) ); +#else + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); +#endif + }; // boost::detail::mask_uint_t + + template < > + struct mask_uint_t< std::numeric_limits::digits > + : high_uint_t< std::numeric_limits::digits > + { + typedef high_uint_t::digits> + base_type; + typedef base_type::least least; + typedef base_type::fast fast; + + #ifndef __BORLANDC__ + using base_type::high_bit; + using base_type::high_bit_fast; + #else + BOOST_STATIC_CONSTANT( least, high_bit = base_type::high_bit ); + BOOST_STATIC_CONSTANT( fast, high_bit_fast = base_type::high_bit_fast ); + #endif + + BOOST_STATIC_CONSTANT( least, sig_bits = (~( least(0u) )) ); + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); + + }; // boost::detail::mask_uint_t + + #if USHRT_MAX > UCHAR_MAX + template < > + struct mask_uint_t< std::numeric_limits::digits > + : high_uint_t< std::numeric_limits::digits > + { + typedef high_uint_t::digits> + base_type; + typedef base_type::least least; + typedef base_type::fast fast; + + #ifndef __BORLANDC__ + using base_type::high_bit; + using base_type::high_bit_fast; + #else + BOOST_STATIC_CONSTANT( least, high_bit = base_type::high_bit ); + BOOST_STATIC_CONSTANT( fast, high_bit_fast = base_type::high_bit_fast ); + #endif + + BOOST_STATIC_CONSTANT( least, sig_bits = (~( least(0u) )) ); + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); + + }; // boost::detail::mask_uint_t + #endif + + #if UINT_MAX > USHRT_MAX + template < > + struct mask_uint_t< std::numeric_limits::digits > + : high_uint_t< std::numeric_limits::digits > + { + typedef high_uint_t::digits> + base_type; + typedef base_type::least least; + typedef base_type::fast fast; + + #ifndef __BORLANDC__ + using base_type::high_bit; + using base_type::high_bit_fast; + #else + BOOST_STATIC_CONSTANT( least, high_bit = base_type::high_bit ); + BOOST_STATIC_CONSTANT( fast, high_bit_fast = base_type::high_bit_fast ); + #endif + + BOOST_STATIC_CONSTANT( least, sig_bits = (~( least(0u) )) ); + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); + + }; // boost::detail::mask_uint_t + #endif + + #if ULONG_MAX > UINT_MAX + template < > + struct mask_uint_t< std::numeric_limits::digits > + : high_uint_t< std::numeric_limits::digits > + { + typedef high_uint_t::digits> + base_type; + typedef base_type::least least; + typedef base_type::fast fast; + + #ifndef __BORLANDC__ + using base_type::high_bit; + using base_type::high_bit_fast; + #else + BOOST_STATIC_CONSTANT( least, high_bit = base_type::high_bit ); + BOOST_STATIC_CONSTANT( fast, high_bit_fast = base_type::high_bit_fast ); + #endif + + BOOST_STATIC_CONSTANT( least, sig_bits = (~( least(0u) )) ); + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); + + }; // boost::detail::mask_uint_t + #endif + + + // CRC table generator + template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, bool Reflect > + struct crc_table_t + { + BOOST_STATIC_CONSTANT( std::size_t, byte_combos = (1ul << CHAR_BIT) ); + + typedef mask_uint_t masking_type; + typedef typename masking_type::fast value_type; +#if defined(__BORLANDC__) && defined(_M_IX86) && (__BORLANDC__ == 0x560) + // for some reason Borland's command line compiler (version 0x560) + // chokes over this unless we do the calculation for it: + typedef value_type table_type[ 0x100 ]; +#elif defined(__GNUC__) + // old versions of GCC (before 4.0.2) choke on using byte_combos + // as a constant expression when compiling with -pedantic. + typedef value_type table_type[1ul << CHAR_BIT]; +#else + typedef value_type table_type[ byte_combos ]; +#endif + + static void init_table(); + + static table_type table_; + + }; // boost::detail::crc_table_t + + // CRC table generator static data member definition + // (Some compilers [Borland C++] require the initializer to be present.) + template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, bool Reflect > + typename crc_table_t::table_type + crc_table_t::table_ + = { 0 }; + + // Populate CRC lookup table + template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, bool Reflect > + void + crc_table_t::init_table + ( + ) + { + // compute table only on the first run + static bool did_init = false; + if ( did_init ) return; + + // factor-out constants to avoid recalculation + value_type const fast_hi_bit = masking_type::high_bit_fast; + unsigned char const byte_hi_bit = 1u << (CHAR_BIT - 1u); + + // loop over every possible dividend value + unsigned char dividend = 0; + do + { + value_type remainder = 0; + + // go through all the dividend's bits + for ( unsigned char mask = byte_hi_bit ; mask ; mask >>= 1 ) + { + // check if divisor fits + if ( dividend & mask ) + { + remainder ^= fast_hi_bit; + } + + // do polynominal division + if ( remainder & fast_hi_bit ) + { + remainder <<= 1; + remainder ^= TruncPoly; + } + else + { + remainder <<= 1; + } + } + + table_[ crc_helper::reflect(dividend) ] + = crc_helper::reflect( remainder ); + } + while ( ++dividend ); + + did_init = true; + } + + #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // Align the msb of the remainder to a byte + template < std::size_t Bits, bool RightShift > + class remainder + { + public: + typedef typename uint_t::fast value_type; + + static unsigned char align_msb( value_type rem ) + { return rem >> (Bits - CHAR_BIT); } + }; + + // Specialization for the case that the remainder has less + // bits than a byte: align the remainder msb to the byte msb + template < std::size_t Bits > + class remainder< Bits, false > + { + public: + typedef typename uint_t::fast value_type; + + static unsigned char align_msb( value_type rem ) + { return rem << (CHAR_BIT - Bits); } + }; + #endif + + // CRC helper routines + template < std::size_t Bits, bool DoReflect > + class crc_helper + { + public: + // Type + typedef typename uint_t::fast value_type; + + #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // Possibly reflect a remainder + static value_type reflect( value_type x ) + { return detail::reflector::reflect( x ); } + + // Compare a byte to the remainder's highest byte + static unsigned char index( value_type rem, unsigned char x ) + { return x ^ rem; } + + // Shift out the remainder's highest byte + static value_type shift( value_type rem ) + { return rem >> CHAR_BIT; } + #else + // Possibly reflect a remainder + static value_type reflect( value_type x ) + { return DoReflect ? detail::reflector::reflect( x ) : x; } + + // Compare a byte to the remainder's highest byte + static unsigned char index( value_type rem, unsigned char x ) + { return x ^ ( DoReflect ? rem : + ((Bits>CHAR_BIT)?( rem >> (Bits - CHAR_BIT) ) : + ( rem << (CHAR_BIT - Bits) ))); } + + // Shift out the remainder's highest byte + static value_type shift( value_type rem ) + { return DoReflect ? rem >> CHAR_BIT : rem << CHAR_BIT; } + #endif + + }; // boost::detail::crc_helper + + #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + template < std::size_t Bits > + class crc_helper + { + public: + // Type + typedef typename uint_t::fast value_type; + + // Possibly reflect a remainder + static value_type reflect( value_type x ) + { return x; } + + // Compare a byte to the remainder's highest byte + static unsigned char index( value_type rem, unsigned char x ) + { return x ^ remainderCHAR_BIT)>::align_msb( rem ); } + + // Shift out the remainder's highest byte + static value_type shift( value_type rem ) + { return rem << CHAR_BIT; } + + }; // boost::detail::crc_helper + #endif + + +} // namespace detail + + +// Simple CRC class function definitions -----------------------------------// + +template < std::size_t Bits > +inline +crc_basic::crc_basic +( + typename crc_basic::value_type truncated_polynominal, + typename crc_basic::value_type initial_remainder, // = 0 + typename crc_basic::value_type final_xor_value, // = 0 + bool reflect_input, // = false + bool reflect_remainder // = false +) + : rem_( initial_remainder ), poly_( truncated_polynominal ) + , init_( initial_remainder ), final_( final_xor_value ) + , rft_in_( reflect_input ), rft_out_( reflect_remainder ) +{ +} + +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::get_truncated_polynominal +( +) const +{ + return poly_; +} + +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::get_initial_remainder +( +) const +{ + return init_; +} + +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::get_final_xor_value +( +) const +{ + return final_; +} + +template < std::size_t Bits > +inline +bool +crc_basic::get_reflect_input +( +) const +{ + return rft_in_; +} + +template < std::size_t Bits > +inline +bool +crc_basic::get_reflect_remainder +( +) const +{ + return rft_out_; +} + +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::get_interim_remainder +( +) const +{ + return rem_ & masking_type::sig_bits; +} + +template < std::size_t Bits > +inline +void +crc_basic::reset +( + typename crc_basic::value_type new_rem +) +{ + rem_ = new_rem; +} + +template < std::size_t Bits > +inline +void +crc_basic::reset +( +) +{ + this->reset( this->get_initial_remainder() ); +} + +template < std::size_t Bits > +inline +void +crc_basic::process_bit +( + bool bit +) +{ + value_type const high_bit_mask = masking_type::high_bit; + + // compare the new bit with the remainder's highest + rem_ ^= ( bit ? high_bit_mask : 0u ); + + // a full polynominal division step is done when the highest bit is one + bool const do_poly_div = static_cast( rem_ & high_bit_mask ); + + // shift out the highest bit + rem_ <<= 1; + + // carry out the division, if needed + if ( do_poly_div ) + { + rem_ ^= poly_; + } +} + +template < std::size_t Bits > +void +crc_basic::process_bits +( + unsigned char bits, + std::size_t bit_count +) +{ + // ignore the bits above the ones we want + bits <<= CHAR_BIT - bit_count; + + // compute the CRC for each bit, starting with the upper ones + unsigned char const high_bit_mask = 1u << ( CHAR_BIT - 1u ); + for ( std::size_t i = bit_count ; i > 0u ; --i, bits <<= 1u ) + { + process_bit( static_cast(bits & high_bit_mask) ); + } +} + +template < std::size_t Bits > +inline +void +crc_basic::process_byte +( + unsigned char byte +) +{ + process_bits( (rft_in_ ? detail::reflector::reflect(byte) + : byte), CHAR_BIT ); +} + +template < std::size_t Bits > +void +crc_basic::process_block +( + void const * bytes_begin, + void const * bytes_end +) +{ + for ( unsigned char const * p + = static_cast(bytes_begin) ; p < bytes_end ; ++p ) + { + process_byte( *p ); + } +} + +template < std::size_t Bits > +inline +void +crc_basic::process_bytes +( + void const * buffer, + std::size_t byte_count +) +{ + unsigned char const * const b = static_cast( + buffer ); + + process_block( b, b + byte_count ); +} + +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::checksum +( +) const +{ + return ( (rft_out_ ? detail::reflector::reflect( rem_ ) : rem_) + ^ final_ ) & masking_type::sig_bits; +} + + +// Optimized CRC class function definitions --------------------------------// + +// Macro to compact code +#define BOOST_CRC_OPTIMAL_NAME crc_optimal + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +BOOST_CRC_OPTIMAL_NAME::crc_optimal +( + typename BOOST_CRC_OPTIMAL_NAME::value_type init_rem // = InitRem +) + : rem_( helper_type::reflect(init_rem) ) +{ + crc_table_type::init_table(); +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::get_truncated_polynominal +( +) const +{ + return TruncPoly; +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::get_initial_remainder +( +) const +{ + return InitRem; +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::get_final_xor_value +( +) const +{ + return FinalXor; +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +bool +BOOST_CRC_OPTIMAL_NAME::get_reflect_input +( +) const +{ + return ReflectIn; +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +bool +BOOST_CRC_OPTIMAL_NAME::get_reflect_remainder +( +) const +{ + return ReflectRem; +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::get_interim_remainder +( +) const +{ + // Interim remainder should be _un_-reflected, so we have to undo it. + return helper_type::reflect( rem_ ) & masking_type::sig_bits_fast; +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::reset +( + typename BOOST_CRC_OPTIMAL_NAME::value_type new_rem // = InitRem +) +{ + rem_ = helper_type::reflect( new_rem ); +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::process_byte +( + unsigned char byte +) +{ + process_bytes( &byte, sizeof(byte) ); +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +void +BOOST_CRC_OPTIMAL_NAME::process_block +( + void const * bytes_begin, + void const * bytes_end +) +{ + // Recompute the CRC for each byte passed + for ( unsigned char const * p + = static_cast(bytes_begin) ; p < bytes_end ; ++p ) + { + // Compare the new byte with the remainder's higher bits to + // get the new bits, shift out the remainder's current higher + // bits, and update the remainder with the polynominal division + // of the new bits. + unsigned char const byte_index = helper_type::index( rem_, *p ); + rem_ = helper_type::shift( rem_ ); + rem_ ^= crc_table_type::table_[ byte_index ]; + } +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::process_bytes +( + void const * buffer, + std::size_t byte_count +) +{ + unsigned char const * const b = static_cast( + buffer ); + process_block( b, b + byte_count ); +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::checksum +( +) const +{ + return ( reflect_out_type::reflect(rem_) ^ get_final_xor_value() ) + & masking_type::sig_bits_fast; +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::operator () +( + unsigned char byte +) +{ + process_byte( byte ); +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::operator () +( +) const +{ + return checksum(); +} + + +// CRC computation function definition -------------------------------------// + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename uint_t::fast +crc +( + void const * buffer, + std::size_t byte_count + BOOST_CRC_DUMMY_INIT +) +{ + BOOST_CRC_OPTIMAL_NAME computer; + computer.process_bytes( buffer, byte_count ); + return computer.checksum(); +} + + +// Augmented-message CRC computation function definitions ------------------// + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > +typename uint_t::fast +augmented_crc +( + void const * buffer, + std::size_t byte_count, + typename uint_t::fast initial_remainder + BOOST_ACRC_DUMMY_INIT +) +{ + typedef unsigned char byte_type; + typedef detail::mask_uint_t masking_type; + typedef detail::crc_table_t crc_table_type; + + typename masking_type::fast rem = initial_remainder; + byte_type const * const b = static_cast( buffer ); + byte_type const * const e = b + byte_count; + + crc_table_type::init_table(); + for ( byte_type const * p = b ; p < e ; ++p ) + { + // Use the current top byte as the table index to the next + // "partial product." Shift out that top byte, shifting in + // the next augmented-message byte. Complete the division. + byte_type const byte_index = rem >> ( Bits - CHAR_BIT ); + rem <<= CHAR_BIT; + rem |= *p; + rem ^= crc_table_type::table_[ byte_index ]; + } + + return rem & masking_type::sig_bits_fast; +} + +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > +inline +typename uint_t::fast +augmented_crc +( + void const * buffer, + std::size_t byte_count + BOOST_ACRC_DUMMY_INIT +) +{ + // The last function argument has its type specified so the other version of + // augmented_crc will be called. If the cast wasn't in place, and the + // BOOST_ACRC_DUMMY_INIT added a third argument (for a workaround), the "0" + // would match as that third argument, leading to infinite recursion. + return augmented_crc( buffer, byte_count, + static_cast::fast>(0) ); +} + + +} // namespace boost + + +// Undo header-private macros +#undef BOOST_CRC_OPTIMAL_NAME +#undef BOOST_ACRC_DUMMY_INIT +#undef BOOST_ACRC_DUMMY_PARM_TYPE +#undef BOOST_CRC_DUMMY_INIT +#undef BOOST_CRC_DUMMY_PARM_TYPE +#undef BOOST_CRC_PARM_TYPE + + +#endif // BOOST_CRC_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/cregex.hpp b/deal.II/contrib/boost-1.45.0/include/boost/cregex.hpp new file mode 100644 index 0000000000..b7a918eb8e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/cregex.hpp @@ -0,0 +1,39 @@ +/* + * + * Copyright (c) 1998-2002 + * John Maddock + * + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + + /* + * LOCATION: see http://www.boost.org/libs/regex for most recent version. + * FILE cregex.cpp + * VERSION see + * DESCRIPTION: Declares POSIX API functions + * + boost::RegEx high level wrapper. + */ + +#ifndef BOOST_RE_CREGEX_HPP +#define BOOST_RE_CREGEX_HPP + +#ifndef BOOST_REGEX_CONFIG_HPP +#include +#endif + +#include + +#endif /* include guard */ + + + + + + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/cstdint.hpp b/deal.II/contrib/boost-1.45.0/include/boost/cstdint.hpp new file mode 100644 index 0000000000..ea84b65062 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/cstdint.hpp @@ -0,0 +1,508 @@ +// boost cstdint.hpp header file ------------------------------------------// + +// (C) Copyright Beman Dawes 1999. +// (C) Copyright Jens Mauer 2001 +// (C) Copyright John Maddock 2001 +// Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +// Revision History +// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) +// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) +// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) +// 12 Nov 00 Merged (Jens Maurer) +// 23 Sep 00 Added INTXX_C macro support (John Maddock). +// 22 Sep 00 Better 64-bit support (John Maddock) +// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost +// 8 Aug 99 Initial version (Beman Dawes) + + +#ifndef BOOST_CSTDINT_HPP +#define BOOST_CSTDINT_HPP + +// +// Since we always define the INT#_C macros as per C++0x, +// define __STDC_CONSTANT_MACROS so that does the right +// thing if possible, and so that the user knows that the macros +// are actually defined as per C99. +// +#ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS +#endif + +#include + +// +// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not +// depending upon what headers happen to have been included first... +// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. +// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 +// +#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG)) + +// The following #include is an implementation artifact; not part of interface. +# ifdef __hpux +// HP-UX has a vaguely nice in a non-standard location +# include +# ifdef __STDC_32_MODE__ + // this is triggered with GCC, because it defines __cplusplus < 199707L +# define BOOST_NO_INT64_T +# endif +# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) +# include +# else +# include + +// There is a bug in Cygwin two _C macros +# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) +# undef INTMAX_C +# undef UINTMAX_C +# define INTMAX_C(c) c##LL +# define UINTMAX_C(c) c##ULL +# endif + +# endif + +#ifdef __QNX__ + +// QNX (Dinkumware stdlib) defines these as non-standard names. +// Reflect to the standard names. + +typedef ::intleast8_t int_least8_t; +typedef ::intfast8_t int_fast8_t; +typedef ::uintleast8_t uint_least8_t; +typedef ::uintfast8_t uint_fast8_t; + +typedef ::intleast16_t int_least16_t; +typedef ::intfast16_t int_fast16_t; +typedef ::uintleast16_t uint_least16_t; +typedef ::uintfast16_t uint_fast16_t; + +typedef ::intleast32_t int_least32_t; +typedef ::intfast32_t int_fast32_t; +typedef ::uintleast32_t uint_least32_t; +typedef ::uintfast32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + +typedef ::intleast64_t int_least64_t; +typedef ::intfast64_t int_fast64_t; +typedef ::uintleast64_t uint_least64_t; +typedef ::uintfast64_t uint_fast64_t; + +# endif + +#endif + +namespace boost +{ + + using ::int8_t; + using ::int_least8_t; + using ::int_fast8_t; + using ::uint8_t; + using ::uint_least8_t; + using ::uint_fast8_t; + + using ::int16_t; + using ::int_least16_t; + using ::int_fast16_t; + using ::uint16_t; + using ::uint_least16_t; + using ::uint_fast16_t; + + using ::int32_t; + using ::int_least32_t; + using ::int_fast32_t; + using ::uint32_t; + using ::uint_least32_t; + using ::uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + using ::int_least64_t; + using ::int_fast64_t; + using ::uint64_t; + using ::uint_least64_t; + using ::uint_fast64_t; + +# endif + + using ::intmax_t; + using ::uintmax_t; + +} // namespace boost + +#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) +// FreeBSD and Tru64 have an that contains much of what we need. +# include + +namespace boost { + + using ::int8_t; + typedef int8_t int_least8_t; + typedef int8_t int_fast8_t; + using ::uint8_t; + typedef uint8_t uint_least8_t; + typedef uint8_t uint_fast8_t; + + using ::int16_t; + typedef int16_t int_least16_t; + typedef int16_t int_fast16_t; + using ::uint16_t; + typedef uint16_t uint_least16_t; + typedef uint16_t uint_fast16_t; + + using ::int32_t; + typedef int32_t int_least32_t; + typedef int32_t int_fast32_t; + using ::uint32_t; + typedef uint32_t uint_least32_t; + typedef uint32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + typedef int64_t int_least64_t; + typedef int64_t int_fast64_t; + using ::uint64_t; + typedef uint64_t uint_least64_t; + typedef uint64_t uint_fast64_t; + + typedef int64_t intmax_t; + typedef uint64_t uintmax_t; + +# else + + typedef int32_t intmax_t; + typedef uint32_t uintmax_t; + +# endif + +} // namespace boost + +#else // BOOST_HAS_STDINT_H + +# include // implementation artifact; not part of interface +# include // needed for limits macros + + +namespace boost +{ + +// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit +// platforms. For other systems, they will have to be hand tailored. +// +// Because the fast types are assumed to be the same as the undecorated types, +// it may be possible to hand tailor a more efficient implementation. Such +// an optimization may be illusionary; on the Intel x86-family 386 on, for +// example, byte arithmetic and load/stores are as fast as "int" sized ones. + +// 8-bit types ------------------------------------------------------------// + +# if UCHAR_MAX == 0xff + typedef signed char int8_t; + typedef signed char int_least8_t; + typedef signed char int_fast8_t; + typedef unsigned char uint8_t; + typedef unsigned char uint_least8_t; + typedef unsigned char uint_fast8_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 16-bit types -----------------------------------------------------------// + +# if USHRT_MAX == 0xffff +# if defined(__crayx1) + // The Cray X1 has a 16-bit short, however it is not recommend + // for use in performance critical code. + typedef short int16_t; + typedef short int_least16_t; + typedef int int_fast16_t; + typedef unsigned short uint16_t; + typedef unsigned short uint_least16_t; + typedef unsigned int uint_fast16_t; +# else + typedef short int16_t; + typedef short int_least16_t; + typedef short int_fast16_t; + typedef unsigned short uint16_t; + typedef unsigned short uint_least16_t; + typedef unsigned short uint_fast16_t; +# endif +# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) + // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified + // MTA / XMT does support the following non-standard integer types + typedef __short16 int16_t; + typedef __short16 int_least16_t; + typedef __short16 int_fast16_t; + typedef unsigned __short16 uint16_t; + typedef unsigned __short16 uint_least16_t; + typedef unsigned __short16 uint_fast16_t; +# elif (USHRT_MAX == 0xffffffff) && defined(CRAY) + // no 16-bit types on Cray: + typedef short int_least16_t; + typedef short int_fast16_t; + typedef unsigned short uint_least16_t; + typedef unsigned short uint_fast16_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 32-bit types -----------------------------------------------------------// + +# if UINT_MAX == 0xffffffff + typedef int int32_t; + typedef int int_least32_t; + typedef int int_fast32_t; + typedef unsigned int uint32_t; + typedef unsigned int uint_least32_t; + typedef unsigned int uint_fast32_t; +# elif (USHRT_MAX == 0xffffffff) + typedef short int32_t; + typedef short int_least32_t; + typedef short int_fast32_t; + typedef unsigned short uint32_t; + typedef unsigned short uint_least32_t; + typedef unsigned short uint_fast32_t; +# elif ULONG_MAX == 0xffffffff + typedef long int32_t; + typedef long int_least32_t; + typedef long int_fast32_t; + typedef unsigned long uint32_t; + typedef unsigned long uint_least32_t; + typedef unsigned long uint_fast32_t; +# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) + // Integers are 64 bits on the MTA / XMT + typedef __int32 int32_t; + typedef __int32 int_least32_t; + typedef __int32 int_fast32_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int32 uint_least32_t; + typedef unsigned __int32 uint_fast32_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 64-bit types + intmax_t and uintmax_t ----------------------------------// + +# if defined(BOOST_HAS_LONG_LONG) && \ + !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ + (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) + // 2**64 - 1 +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + + typedef ::boost::long_long_type intmax_t; + typedef ::boost::ulong_long_type uintmax_t; + typedef ::boost::long_long_type int64_t; + typedef ::boost::long_long_type int_least64_t; + typedef ::boost::long_long_type int_fast64_t; + typedef ::boost::ulong_long_type uint64_t; + typedef ::boost::ulong_long_type uint_least64_t; + typedef ::boost::ulong_long_type uint_fast64_t; + +# elif ULONG_MAX != 0xffffffff + +# if ULONG_MAX == 18446744073709551615 // 2**64 - 1 + typedef long intmax_t; + typedef unsigned long uintmax_t; + typedef long int64_t; + typedef long int_least64_t; + typedef long int_fast64_t; + typedef unsigned long uint64_t; + typedef unsigned long uint_least64_t; + typedef unsigned long uint_fast64_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG) + __extension__ typedef long long intmax_t; + __extension__ typedef unsigned long long uintmax_t; + __extension__ typedef long long int64_t; + __extension__ typedef long long int_least64_t; + __extension__ typedef long long int_fast64_t; + __extension__ typedef unsigned long long uint64_t; + __extension__ typedef unsigned long long uint_least64_t; + __extension__ typedef unsigned long long uint_fast64_t; +# elif defined(BOOST_HAS_MS_INT64) + // + // we have Borland/Intel/Microsoft __int64: + // + typedef __int64 intmax_t; + typedef unsigned __int64 uintmax_t; + typedef __int64 int64_t; + typedef __int64 int_least64_t; + typedef __int64 int_fast64_t; + typedef unsigned __int64 uint64_t; + typedef unsigned __int64 uint_least64_t; + typedef unsigned __int64 uint_fast64_t; +# else // assume no 64-bit integers +# define BOOST_NO_INT64_T + typedef int32_t intmax_t; + typedef uint32_t uintmax_t; +# endif + +} // namespace boost + + +#endif // BOOST_HAS_STDINT_H + +#endif // BOOST_CSTDINT_HPP + + +/**************************************************** + +Macro definition section: + +Added 23rd September 2000 (John Maddock). +Modified 11th September 2001 to be excluded when +BOOST_HAS_STDINT_H is defined (John Maddock). +Modified 11th Dec 2009 to always define the +INT#_C macros if they're not already defined (John Maddock). + +******************************************************/ + +#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ + (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) +// +// For the following code we get several warnings along the lines of: +// +// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant +// +// So we declare this a system header to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +#include +# define BOOST__STDC_CONSTANT_MACROS_DEFINED +# if defined(BOOST_HAS_MS_INT64) +// +// Borland/Intel/Microsoft compilers have width specific suffixes: +// +#ifndef INT8_C +# define INT8_C(value) value##i8 +#endif +#ifndef INT16_C +# define INT16_C(value) value##i16 +#endif +#ifndef INT32_C +# define INT32_C(value) value##i32 +#endif +#ifndef INT64_C +# define INT64_C(value) value##i64 +#endif +# ifdef __BORLANDC__ + // Borland bug: appending ui8 makes the type a signed char +# define UINT8_C(value) static_cast(value##u) +# else +# define UINT8_C(value) value##ui8 +# endif +#ifndef UINT16_C +# define UINT16_C(value) value##ui16 +#endif +#ifndef UINT32_C +# define UINT32_C(value) value##ui32 +#endif +#ifndef UINT64_C +# define UINT64_C(value) value##ui64 +#endif +#ifndef INTMAX_C +# define INTMAX_C(value) value##i64 +# define UINTMAX_C(value) value##ui64 +#endif + +# else +// do it the old fashioned way: + +// 8-bit types ------------------------------------------------------------// + +# if (UCHAR_MAX == 0xff) && !defined(INT8_C) +# define INT8_C(value) static_cast(value) +# define UINT8_C(value) static_cast(value##u) +# endif + +// 16-bit types -----------------------------------------------------------// + +# if (USHRT_MAX == 0xffff) && !defined(INT16_C) +# define INT16_C(value) static_cast(value) +# define UINT16_C(value) static_cast(value##u) +# endif + +// 32-bit types -----------------------------------------------------------// +#ifndef INT32_C +# if (UINT_MAX == 0xffffffff) +# define INT32_C(value) value +# define UINT32_C(value) value##u +# elif ULONG_MAX == 0xffffffff +# define INT32_C(value) value##L +# define UINT32_C(value) value##uL +# endif +#endif + +// 64-bit types + intmax_t and uintmax_t ----------------------------------// +#ifndef INT64_C +# if defined(BOOST_HAS_LONG_LONG) && \ + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_LLONG_MAX)) + +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ + (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ + (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ + (defined(_LLONG_MAX) && _LLONG_MAX == 18446744073709551615ULL) + +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif ULONG_MAX != 0xffffffff + +# if ULONG_MAX == 18446744073709551615U // 2**64 - 1 +# define INT64_C(value) value##L +# define UINT64_C(value) value##uL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif defined(BOOST_HAS_LONG_LONG) + // Usual macros not defined, work things out for ourselves: +# if(~0uLL == 18446744073709551615ULL) +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +# ifdef BOOST_NO_INT64_T +# define INTMAX_C(value) INT32_C(value) +# define UINTMAX_C(value) UINT32_C(value) +# else +# define INTMAX_C(value) INT64_C(value) +# define UINTMAX_C(value) UINT64_C(value) +# endif +#endif +# endif // Borland/Microsoft specific width suffixes + +#endif // INT#_C macros. + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/cstdlib.hpp b/deal.II/contrib/boost-1.45.0/include/boost/cstdlib.hpp new file mode 100644 index 0000000000..6322146354 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/cstdlib.hpp @@ -0,0 +1,41 @@ +// boost/cstdlib.hpp header ------------------------------------------------// + +// Copyright Beman Dawes 2001. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility/cstdlib.html for documentation. + +// Revision History +// 26 Feb 01 Initial version (Beman Dawes) + +#ifndef BOOST_CSTDLIB_HPP +#define BOOST_CSTDLIB_HPP + +#include + +namespace boost +{ + // The intent is to propose the following for addition to namespace std + // in the C++ Standard Library, and to then deprecate EXIT_SUCCESS and + // EXIT_FAILURE. As an implementation detail, this header defines the + // new constants in terms of EXIT_SUCCESS and EXIT_FAILURE. In a new + // standard, the constants would be implementation-defined, although it + // might be worthwhile to "suggest" (which a standard is allowed to do) + // values of 0 and 1 respectively. + + // Rationale for having multiple failure values: some environments may + // wish to distinguish between different classes of errors. + // Rationale for choice of values: programs often use values < 100 for + // their own error reporting. Values > 255 are sometimes reserved for + // system detected errors. 200/201 were suggested to minimize conflict. + + const int exit_success = EXIT_SUCCESS; // implementation-defined value + const int exit_failure = EXIT_FAILURE; // implementation-defined value + const int exit_exception_failure = 200; // otherwise uncaught exception + const int exit_test_failure = 201; // report_error or + // report_critical_error called. +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/current_function.hpp b/deal.II/contrib/boost-1.45.0/include/boost/current_function.hpp new file mode 100644 index 0000000000..aa5756e0a5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/current_function.hpp @@ -0,0 +1,67 @@ +#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED +#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/current_function.hpp - BOOST_CURRENT_FUNCTION +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/utility/current_function.html +// + +namespace boost +{ + +namespace detail +{ + +inline void current_function_helper() +{ + +#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) + +# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ + +#elif defined(__DMC__) && (__DMC__ >= 0x810) + +# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ + +#elif defined(__FUNCSIG__) + +# define BOOST_CURRENT_FUNCTION __FUNCSIG__ + +#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) + +# define BOOST_CURRENT_FUNCTION __FUNCTION__ + +#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) + +# define BOOST_CURRENT_FUNCTION __FUNC__ + +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) + +# define BOOST_CURRENT_FUNCTION __func__ + +#else + +# define BOOST_CURRENT_FUNCTION "(unknown)" + +#endif + +} + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time.hpp new file mode 100644 index 0000000000..c9666222eb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time.hpp @@ -0,0 +1,17 @@ +#ifndef BOOST_DATE_TIME_ALL_HPP___ +#define BOOST_DATE_TIME_ALL_HPP___ + +/* Copyright (c) 2006 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + // See www.boost.org/libs/date_time for documentation. + +//gregorian and posix time included by indirectly +#include "boost/date_time/local_time/local_time.hpp" + +#endif // BOOST_DATE_TIME_ALL_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/adjust_functors.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/adjust_functors.hpp new file mode 100644 index 0000000000..7854ae4b76 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/adjust_functors.hpp @@ -0,0 +1,178 @@ +#ifndef _DATE_TIME_ADJUST_FUNCTORS_HPP___ +#define _DATE_TIME_ADJUST_FUNCTORS_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/date.hpp" +#include "boost/date_time/wrapping_int.hpp" + +namespace boost { +namespace date_time { + + + //! Functor to iterate a fixed number of days + template + class day_functor + { + public: + typedef typename date_type::duration_type duration_type; + day_functor(int f) : f_(f) {} + duration_type get_offset(const date_type& d) const + { + // why is 'd' a parameter??? + // fix compiler warnings + d.year(); + return duration_type(f_); + } + duration_type get_neg_offset(const date_type& d) const + { + // fix compiler warnings + d.year(); + return duration_type(-f_); + } + private: + int f_; + }; + + + //! Provides calculation to find next nth month given a date + /*! This adjustment function provides the logic for 'month-based' + * advancement on a ymd based calendar. The policy it uses + * to handle the non existant end of month days is to back + * up to the last day of the month. Also, if the starting + * date is the last day of a month, this functor will attempt + * to adjust to the end of the month. + + */ + template + class month_functor + { + public: + typedef typename date_type::duration_type duration_type; + typedef typename date_type::calendar_type cal_type; + typedef typename cal_type::ymd_type ymd_type; + typedef typename cal_type::day_type day_type; + + month_functor(int f) : f_(f), origDayOfMonth_(0) {} + duration_type get_offset(const date_type& d) const + { + ymd_type ymd(d.year_month_day()); + if (origDayOfMonth_ == 0) { + origDayOfMonth_ = ymd.day; + day_type endOfMonthDay(cal_type::end_of_month_day(ymd.year,ymd.month)); + if (endOfMonthDay == ymd.day) { + origDayOfMonth_ = -1; //force the value to the end of month + } + } + typedef date_time::wrapping_int2 wrap_int2; + typedef typename wrap_int2::int_type int_type; + wrap_int2 wi(ymd.month); + //calc the year wrap around, add() returns 0 or 1 if wrapped + int_type year = wi.add(static_cast(f_)); + year = static_cast(year + ymd.year); //calculate resulting year +// std::cout << "trace wi: " << wi.as_int() << std::endl; +// std::cout << "trace year: " << year << std::endl; + //find the last day for the new month + day_type resultingEndOfMonthDay(cal_type::end_of_month_day(year, wi.as_int())); + //original was the end of month -- force to last day of month + if (origDayOfMonth_ == -1) { + return date_type(year, wi.as_int(), resultingEndOfMonthDay) - d; + } + day_type dayOfMonth = origDayOfMonth_; + if (dayOfMonth > resultingEndOfMonthDay) { + dayOfMonth = resultingEndOfMonthDay; + } + return date_type(year, wi.as_int(), dayOfMonth) - d; + } + //! Returns a negative duration_type + duration_type get_neg_offset(const date_type& d) const + { + ymd_type ymd(d.year_month_day()); + if (origDayOfMonth_ == 0) { + origDayOfMonth_ = ymd.day; + day_type endOfMonthDay(cal_type::end_of_month_day(ymd.year,ymd.month)); + if (endOfMonthDay == ymd.day) { + origDayOfMonth_ = -1; //force the value to the end of month + } + } + typedef date_time::wrapping_int2 wrap_int2; + typedef typename wrap_int2::int_type int_type; + wrap_int2 wi(ymd.month); + //calc the year wrap around, add() returns 0 or 1 if wrapped + int_type year = wi.subtract(static_cast(f_)); + year = static_cast(year + ymd.year); //calculate resulting year + //find the last day for the new month + day_type resultingEndOfMonthDay(cal_type::end_of_month_day(year, wi.as_int())); + //original was the end of month -- force to last day of month + if (origDayOfMonth_ == -1) { + return date_type(year, wi.as_int(), resultingEndOfMonthDay) - d; + } + day_type dayOfMonth = origDayOfMonth_; + if (dayOfMonth > resultingEndOfMonthDay) { + dayOfMonth = resultingEndOfMonthDay; + } + return date_type(year, wi.as_int(), dayOfMonth) - d; + } + private: + int f_; + mutable short origDayOfMonth_; + }; + + + //! Functor to iterate a over weeks + template + class week_functor + { + public: + typedef typename date_type::duration_type duration_type; + typedef typename date_type::calendar_type calendar_type; + week_functor(int f) : f_(f) {} + duration_type get_offset(const date_type& d) const + { + // why is 'd' a parameter??? + // fix compiler warnings + d.year(); + return duration_type(f_*calendar_type::days_in_week()); + } + duration_type get_neg_offset(const date_type& d) const + { + // fix compiler warnings + d.year(); + return duration_type(-f_*calendar_type::days_in_week()); + } + private: + int f_; + }; + + //! Functor to iterate by a year adjusting for leap years + template + class year_functor + { + public: + //typedef typename date_type::year_type year_type; + typedef typename date_type::duration_type duration_type; + year_functor(int f) : _mf(f * 12) {} + duration_type get_offset(const date_type& d) const + { + return _mf.get_offset(d); + } + duration_type get_neg_offset(const date_type& d) const + { + return _mf.get_neg_offset(d); + } + private: + month_functor _mf; + }; + + +} }//namespace date_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/c_local_time_adjustor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/c_local_time_adjustor.hpp new file mode 100644 index 0000000000..f8025828f7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/c_local_time_adjustor.hpp @@ -0,0 +1,66 @@ +#ifndef DATE_TIME_C_LOCAL_TIME_ADJUSTOR_HPP__ +#define DATE_TIME_C_LOCAL_TIME_ADJUSTOR_HPP__ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +/*! @file c_local_time_adjustor.hpp + Time adjustment calculations based on machine +*/ + +#include +#include +#include +#include + +namespace boost { +namespace date_time { + + //! Adjust to / from utc using the C API + /*! Warning!!! This class assumes that timezone settings of the + * machine are correct. This can be a very dangerous assumption. + */ + template + class c_local_adjustor { + public: + typedef typename time_type::time_duration_type time_duration_type; + typedef typename time_type::date_type date_type; + typedef typename date_type::duration_type date_duration_type; + //! Convert a utc time to local time + static time_type utc_to_local(const time_type& t) + { + date_type time_t_start_day(1970,1,1); + time_type time_t_start_time(time_t_start_day,time_duration_type(0,0,0)); + if (t < time_t_start_time) { + boost::throw_exception(std::out_of_range("Cannot convert dates prior to Jan 1, 1970")); + BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return time_t_start_time); // should never reach + } + date_duration_type dd = t.date() - time_t_start_day; + time_duration_type td = t.time_of_day(); + std::time_t t2 = dd.days()*86400 + td.hours()*3600 + td.minutes()*60 + td.seconds(); + std::tm tms, *tms_ptr; + tms_ptr = c_time::localtime(&t2, &tms); + date_type d(static_cast(tms_ptr->tm_year + 1900), + static_cast(tms_ptr->tm_mon + 1), + static_cast(tms_ptr->tm_mday)); + time_duration_type td2(tms_ptr->tm_hour, + tms_ptr->tm_min, + tms_ptr->tm_sec, + t.time_of_day().fractional_seconds()); + + return time_type(d,td2); + } + }; + + + +} } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/c_time.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/c_time.hpp new file mode 100644 index 0000000000..24ccfe5c37 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/c_time.hpp @@ -0,0 +1,107 @@ +#ifndef DATE_TIME_C_TIME_HPP___ +#define DATE_TIME_C_TIME_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + + +/*! @file c_time.hpp + Provide workarounds related to the ctime header +*/ + +#include +#include // to be able to convert from string literals to exceptions +#include +#include +#include + +//Work around libraries that don't put time_t and time in namespace std +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { using ::time_t; using ::time; using ::localtime; + using ::tm; using ::gmtime; } +#endif // BOOST_NO_STDC_NAMESPACE + +//The following is used to support high precision time clocks +#ifdef BOOST_HAS_GETTIMEOFDAY +#include +#endif + +#ifdef BOOST_HAS_FTIME +#include +#endif + +namespace boost { +namespace date_time { + //! Provides a uniform interface to some 'ctime' functions + /*! Provides a uniform interface to some ctime functions and + * their '_r' counterparts. The '_r' functions require a pointer to a + * user created std::tm struct whereas the regular functions use a + * staticly created struct and return a pointer to that. These wrapper + * functions require the user to create a std::tm struct and send in a + * pointer to it. This struct may be used to store the resulting time. + * The returned pointer may or may not point to this struct, however, + * it will point to the result of the corresponding function. + * All functions do proper checking of the C function results and throw + * exceptions on error. Therefore the functions will never return NULL. + */ + struct c_time { + public: +#if defined(BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS) + //! requires a pointer to a user created std::tm struct + inline + static std::tm* localtime(const std::time_t* t, std::tm* result) + { + // localtime_r() not in namespace std??? + result = localtime_r(t, result); + if (!result) + boost::throw_exception(std::runtime_error("could not convert calendar time to local time")); + return result; + } + //! requires a pointer to a user created std::tm struct + inline + static std::tm* gmtime(const std::time_t* t, std::tm* result) + { + // gmtime_r() not in namespace std??? + result = gmtime_r(t, result); + if (!result) + boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time")); + return result; + } +#else // BOOST_HAS_THREADS + +#if (defined(_MSC_VER) && (_MSC_VER >= 1400)) +#pragma warning(push) // preserve warning settings +#pragma warning(disable : 4996) // disable depricated localtime/gmtime warning on vc8 +#endif // _MSC_VER >= 1400 + //! requires a pointer to a user created std::tm struct + inline + static std::tm* localtime(const std::time_t* t, std::tm* result) + { + result = std::localtime(t); + if (!result) + boost::throw_exception(std::runtime_error("could not convert calendar time to local time")); + return result; + } + //! requires a pointer to a user created std::tm struct + inline + static std::tm* gmtime(const std::time_t* t, std::tm* result) + { + result = std::gmtime(t); + if (!result) + boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time")); + return result; + } +#if (defined(_MSC_VER) && (_MSC_VER >= 1400)) +#pragma warning(pop) // restore warnings to previous state +#endif // _MSC_VER >= 1400 + +#endif // BOOST_HAS_THREADS + }; +}} // namespaces + +#endif // DATE_TIME_C_TIME_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/compiler_config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/compiler_config.hpp new file mode 100644 index 0000000000..0dc893f9fb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/compiler_config.hpp @@ -0,0 +1,171 @@ +#ifndef DATE_TIME_COMPILER_CONFIG_HPP___ +#define DATE_TIME_COMPILER_CONFIG_HPP___ + +/* Copyright (c) 2002-2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +#include +#include +#include + +// With boost release 1.33, date_time will be using a different, +// more flexible, IO system. This new system is not compatible with +// old compilers. The original date_time IO system remains for those +// compilers. They must define this macro to use the legacy IO. +// (defined(__BORLANDC__) && (__BORLANDC__ <= 0x0581) ) ) && + #if( BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) \ + || BOOST_WORKAROUND( __GNUC__, < 3) \ + || (BOOST_WORKAROUND( _MSC_VER, <= 1300) ) \ + ) \ + && !defined(USE_DATE_TIME_PRE_1_33_FACET_IO) +# define USE_DATE_TIME_PRE_1_33_FACET_IO +#endif + + +// This file performs some local compiler configurations + +#include //set up locale configurations + +//Set up a configuration parameter for platforms that have +//GetTimeOfDay +#if defined(BOOST_HAS_GETTIMEOFDAY) || defined(BOOST_HAS_FTIME) +#define BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK +#endif + +// To Force no default constructors for date & ptime, un-comment following +//#define DATE_TIME_NO_DEFAULT_CONSTRUCTOR + +// Include extensions to date_duration - comment out to remove this feature +#define BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES +// these extensions are known to cause problems with gcc295 +#if defined(__GNUC__) && (__GNUC__ < 3) +#undef BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES +#endif + +#if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) ) +#define BOOST_DATE_TIME_NO_MEMBER_INIT +#endif + +// include these types before we try to re-define them +#include + +//Define INT64_C for compilers that don't have it +#if (!defined(INT64_C)) +#define INT64_C(value) int64_t(value) +#endif + + +/* Workaround for Borland iterator error. Error was "Cannot convert 'istream *' to 'wistream *' in function istream_iterator<>::istream_iterator() */ +#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_RW_LIB) +#define BOOST_DATE_TIME_NO_WISTREAM_ITERATOR +#endif + + +// Borland v5.64 does not have the following in std namespace; v5.5.1 does +#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_STLPORT) +#include +namespace std { + using stlport::tolower; + using stlport::ctype; + using stlport::use_facet; +} +#endif + +// workaround for errors associated with output for date classes +// modifications and input streaming for time classes. +// Compilers affected are: +// gcc295, msvc (neither with STLPort), any borland +// +#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \ + (defined(_MSC_VER) && (_MSC_VER < 1300)) ) && \ + !defined(_STLP_OWN_IOSTREAMS) ) || \ + BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) +#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS +#endif + +// The macro marks up places where compiler complains for missing return statement or +// uninitialized variables after calling to boost::throw_exception. +// BOOST_UNREACHABLE_RETURN doesn't work since even compilers that support +// unreachable statements detection emit such warnings. +#if defined(_MSC_VER) +// Use special MSVC extension to markup unreachable code +# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) __assume(false) +#elif !defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION) +// Call to a non-returning function should suppress the warning +# if defined(BOOST_NO_STDC_NAMESPACE) +namespace std { + using ::abort; +} +# endif // defined(BOOST_NO_STDC_NAMESPACE) +# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) std::abort() +#else +// For other poor compilers the specified expression is compiled. Usually, this would be a return statement. +# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) x +#endif + +/* The following handles the definition of the necessary macros + * for dll building on Win32 platforms. + * + * For code that will be placed in the date_time .dll, + * it must be properly prefixed with BOOST_DATE_TIME_DECL. + * The corresponding .cpp file must have BOOST_DATE_TIME_SOURCE + * defined before including its header. For examples see: + * greg_month.hpp & greg_month.cpp + * + */ + +#ifdef BOOST_HAS_DECLSPEC // defined in config system + // we need to import/export our code only if the user has specifically + // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost + // libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK + // if they want just this one to be dynamically liked: +# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK) + // export if this is our own source, otherwise import: +# ifdef BOOST_DATE_TIME_SOURCE +# define BOOST_DATE_TIME_DECL __declspec(dllexport) +# else +# define BOOST_DATE_TIME_DECL __declspec(dllimport) +# endif // BOOST_DATE_TIME_SOURCE +# endif // DYN_LINK +#endif // BOOST_HAS_DECLSPEC +// +// if BOOST_WHATEVER_DECL isn't defined yet define it now: +#ifndef BOOST_DATE_TIME_DECL +# define BOOST_DATE_TIME_DECL +#endif + +// +// Automatically link to the correct build variant where possible. +// +#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_DATE_TIME_NO_LIB) && !defined(BOOST_DATE_TIME_SOURCE) +// +// Set the name of our library, this will get undef'ed by auto_link.hpp +// once it's done with it: +// +#define BOOST_LIB_NAME boost_date_time +// +// If we're importing code from a dll, then tell auto_link.hpp about it: +// +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK) +# define BOOST_DYN_LINK +#endif +// +// And include the header that does the work: +// +#include +#endif // auto-linking disabled + +#if defined(BOOST_HAS_THREADS) +# if defined(_MSC_VER) || defined(__MWERKS__) || defined(__MINGW32__) || defined(__BORLANDC__) + //no reentrant posix functions (eg: localtime_r) +# elif (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT))) +# define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS +# endif +#endif + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/constrained_value.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/constrained_value.hpp new file mode 100644 index 0000000000..b273dd5aa8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/constrained_value.hpp @@ -0,0 +1,121 @@ +#ifndef CONSTRAINED_VALUE_HPP___ +#define CONSTRAINED_VALUE_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +#include +#include +#include +#include +#include +#include + +namespace boost { + +//! Namespace containing constrained_value template and types +namespace CV { + //! Represent a min or max violation type + enum violation_enum {min_violation, max_violation}; + + //! A template to specify a constrained basic value type + /*! This template provides a quick way to generate + * an integer type with a constrained range. The type + * provides for the ability to specify the min, max, and + * and error handling policy. + * + * value policies + * A class that provides the range limits via the min and + * max functions as well as a function on_error that + * determines how errors are handled. A common strategy + * would be to assert or throw and exception. The on_error + * is passed both the current value and the new value that + * is in error. + * + */ + template + class constrained_value { + public: + typedef typename value_policies::value_type value_type; + // typedef except_type exception_type; + constrained_value(value_type value) : value_((min)()) + { + assign(value); + } + constrained_value& operator=(value_type v) + { + assign(v); + return *this; + } + //! Return the max allowed value (traits method) + static value_type max BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::max)();} + //! Return the min allowed value (traits method) + static value_type min BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::min)();} + //! Coerce into the representation type + operator value_type() const {return value_;} + protected: + value_type value_; + private: + void assign(value_type value) + { + //adding 1 below gets rid of a compiler warning which occurs when the + //min_value is 0 and the type is unsigned.... + if (value+1 < (min)()+1) { + value_policies::on_error(value_, value, min_violation); + return; + } + if (value > (max)()) { + value_policies::on_error(value_, value, max_violation); + return; + } + value_ = value; + } +}; + + //! Template to shortcut the constrained_value policy creation process + template + class simple_exception_policy + { + struct exception_wrapper : public exception_type + { + // In order to support throw_exception mechanism in the BOOST_NO_EXCEPTIONS mode, + // we'll have to provide a way to acquire std::exception from the exception being thrown. + // However, we cannot derive from it, since it would make it interceptable by this class, + // which might not be what the user wanted. + operator std::out_of_range () const + { + // TODO: Make the message more descriptive by using arguments to on_error + return std::out_of_range("constrained value boundary has been violated"); + } + }; + + typedef typename mpl::if_< + is_base_of< std::exception, exception_type >, + exception_type, + exception_wrapper + >::type actual_exception_type; + + public: + typedef rep_type value_type; + static rep_type min BOOST_PREVENT_MACRO_SUBSTITUTION () { return min_value; } + static rep_type max BOOST_PREVENT_MACRO_SUBSTITUTION () { return max_value; } + static void on_error(rep_type, rep_type, violation_enum) + { + boost::throw_exception(actual_exception_type()); + } + }; + + + +} } //namespace CV + + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date.hpp new file mode 100644 index 0000000000..1056fb6a72 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date.hpp @@ -0,0 +1,208 @@ +#ifndef DATE_TIME_DATE_HPP___ +#define DATE_TIME_DATE_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + +#include +#include +#include + +namespace boost { +namespace date_time { + + //!Representation of timepoint at the one day level resolution. + /*! + The date template represents an interface shell for a date class + that is based on a year-month-day system such as the gregorian + or iso systems. It provides basic operations to enable calculation + and comparisons. + + Theory + + This date representation fundamentally departs from the C tm struct + approach. The goal for this type is to provide efficient date + operations (add, subtract) and storage (minimize space to represent) + in a concrete class. Thus, the date uses a count internally to + represent a particular date. The calendar parameter defines + the policies for converting the the year-month-day and internal + counted form here. Applications that need to perform heavy + formatting of the same date repeatedly will perform better + by using the year-month-day representation. + + Internally the date uses a day number to represent the date. + This is a monotonic time representation. This representation + allows for fast comparison as well as simplifying + the creation of writing numeric operations. Essentially, the + internal day number is like adjusted julian day. The adjustment + is determined by the Epoch date which is represented as day 1 of + the calendar. Day 0 is reserved for negative infinity so that + any actual date is automatically greater than negative infinity. + When a date is constructed from a date or formatted for output, + the appropriate conversions are applied to create the year, month, + day representations. + */ + + + template + class date : private + boost::less_than_comparable > + { + public: + typedef T date_type; + typedef calendar calendar_type; + typedef typename calendar::date_traits_type traits_type; + typedef duration_type_ duration_type; + typedef typename calendar::year_type year_type; + typedef typename calendar::month_type month_type; + typedef typename calendar::day_type day_type; + typedef typename calendar::ymd_type ymd_type; + typedef typename calendar::date_rep_type date_rep_type; + typedef typename calendar::date_int_type date_int_type; + typedef typename calendar::day_of_week_type day_of_week_type; + date(year_type y, month_type m, day_type d) + : days_(calendar::day_number(ymd_type(y, m, d))) + {} + date(const ymd_type& ymd) + : days_(calendar::day_number(ymd)) + {} + //let the compiler write copy, assignment, and destructor + year_type year() const + { + ymd_type ymd = calendar::from_day_number(days_); + return ymd.year; + } + month_type month() const + { + ymd_type ymd = calendar::from_day_number(days_); + return ymd.month; + } + day_type day() const + { + ymd_type ymd = calendar::from_day_number(days_); + return ymd.day; + } + day_of_week_type day_of_week() const + { + ymd_type ymd = calendar::from_day_number(days_); + return calendar::day_of_week(ymd); + } + ymd_type year_month_day() const + { + return calendar::from_day_number(days_); + } + bool operator<(const date_type& rhs) const + { + return days_ < rhs.days_; + } + bool operator==(const date_type& rhs) const + { + return days_ == rhs.days_; + } + //! check to see if date is a special value + bool is_special()const + { + return(is_not_a_date() || is_infinity()); + } + //! check to see if date is not a value + bool is_not_a_date() const + { + return traits_type::is_not_a_number(days_); + } + //! check to see if date is one of the infinity values + bool is_infinity() const + { + return traits_type::is_inf(days_); + } + //! check to see if date is greater than all possible dates + bool is_pos_infinity() const + { + return traits_type::is_pos_inf(days_); + } + //! check to see if date is greater than all possible dates + bool is_neg_infinity() const + { + return traits_type::is_neg_inf(days_); + } + //! return as a special value or a not_special if a normal date + special_values as_special() const + { + return traits_type::to_special(days_); + } + duration_type operator-(const date_type& d) const + { + if (!this->is_special() && !d.is_special()) + { + // The duration underlying type may be wider than the date underlying type. + // Thus we calculate the difference in terms of two durations from some common fixed base date. + typedef typename duration_type::duration_rep_type duration_rep_type; + return duration_type(static_cast< duration_rep_type >(days_) - static_cast< duration_rep_type >(d.days_)); + } + else + { + // In this case the difference will be a special value, too + date_rep_type val = date_rep_type(days_) - date_rep_type(d.days_); + return duration_type(val.as_special()); + } + } + + date_type operator-(const duration_type& dd) const + { + if(dd.is_special()) + { + return date_type(date_rep_type(days_) - dd.get_rep()); + } + return date_type(date_rep_type(days_) - dd.days()); + } + date_type operator-=(const duration_type& dd) + { + *this = *this - dd; + return date_type(days_); + } + date_rep_type day_count() const + { + return days_; + } + //allow internal access from operators + date_type operator+(const duration_type& dd) const + { + if(dd.is_special()) + { + return date_type(date_rep_type(days_) + dd.get_rep()); + } + return date_type(date_rep_type(days_) + dd.days()); + } + date_type operator+=(const duration_type& dd) + { + *this = *this + dd; + return date_type(days_); + } + + //see reference + protected: + /*! This is a private constructor which allows for the creation of new + dates. It is not exposed to users since that would require class + users to understand the inner workings of the date class. + */ + explicit date(date_int_type days) : days_(days) {}; + explicit date(date_rep_type days) : days_(days.as_number()) {}; + date_int_type days_; + + }; + + + + +} } // namespace date_time + + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_clock_device.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_clock_device.hpp new file mode 100644 index 0000000000..6ccb26e254 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_clock_device.hpp @@ -0,0 +1,77 @@ +#ifndef DATE_CLOCK_DEVICE_HPP___ +#define DATE_CLOCK_DEVICE_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/c_time.hpp" + + +namespace boost { +namespace date_time { + + //! A clock providing day level services based on C time_t capabilities + /*! This clock uses Posix interfaces as its implementation and hence + * uses the timezone settings of the operating system. Incorrect + * user settings will result in incorrect results for the calls + * to local_day. + */ + template + class day_clock + { + public: + typedef typename date_type::ymd_type ymd_type; + //! Get the local day as a date type + static date_type local_day() + { + return date_type(local_day_ymd()); + } + //! Get the local day as a ymd_type + static typename date_type::ymd_type local_day_ymd() + { + ::std::tm result; + ::std::tm* curr = get_local_time(result); + return ymd_type(curr->tm_year + 1900, + curr->tm_mon + 1, + curr->tm_mday); + } + //! Get the current day in universal date as a ymd_type + static typename date_type::ymd_type universal_day_ymd() + { + ::std::tm result; + ::std::tm* curr = get_universal_time(result); + return ymd_type(curr->tm_year + 1900, + curr->tm_mon + 1, + curr->tm_mday); + } + //! Get the UTC day as a date type + static date_type universal_day() + { + return date_type(universal_day_ymd()); + } + + private: + static ::std::tm* get_local_time(std::tm& result) + { + ::std::time_t t; + ::std::time(&t); + return c_time::localtime(&t, &result); + } + static ::std::tm* get_universal_time(std::tm& result) + { + ::std::time_t t; + ::std::time(&t); + return c_time::gmtime(&t, &result); + } + + }; + +} } //namespace date_time + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_defs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_defs.hpp new file mode 100644 index 0000000000..bc25b56c0d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_defs.hpp @@ -0,0 +1,26 @@ +#ifndef DATE_TIME_DATE_DEFS_HPP +#define DATE_TIME_DATE_DEFS_HPP + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + +namespace boost { +namespace date_time { + + //! An enumeration of weekday names + enum weekdays {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}; + + //! Simple enum to allow for nice programming with Jan, Feb, etc + enum months_of_year {Jan=1,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,NotAMonth,NumMonths}; + +} } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_duration.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_duration.hpp new file mode 100644 index 0000000000..3871aac0ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_duration.hpp @@ -0,0 +1,146 @@ +#ifndef DATE_TIME_DATE_DURATION__ +#define DATE_TIME_DATE_DURATION__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + + +#include +#include + +namespace boost { +namespace date_time { + + + //! Duration type with date level resolution + template + class date_duration : private + boost::less_than_comparable1< date_duration< duration_rep_traits > + , boost::equality_comparable1< date_duration< duration_rep_traits > + , boost::addable1< date_duration< duration_rep_traits > + , boost::subtractable1< date_duration< duration_rep_traits > + , boost::dividable2< date_duration< duration_rep_traits >, int + > > > > > + { + public: + typedef typename duration_rep_traits::int_type duration_rep_type; + typedef typename duration_rep_traits::impl_type duration_rep; + + //! Construct from a day count + explicit date_duration(duration_rep day_count) : days_(day_count) {}; + + /*! construct from special_values - only works when + * instantiated with duration_traits_adapted */ + date_duration(special_values sv) : + days_(duration_rep::from_special(sv)) + {} + + // copy constructor required for addable<> & subtractable<> + //! Construct from another date_duration (Copy Constructor) + date_duration(const date_duration& other) : + days_(other.days_) + {} + + //! returns days_ as it's instantiated type - used for streaming + duration_rep get_rep()const + { + return days_; + } + bool is_special()const + { + return days_.is_special(); + } + //! returns days as value, not object. + duration_rep_type days() const + { + return duration_rep_traits::as_number(days_); + } + //! Returns the smallest duration -- used by to calculate 'end' + static date_duration unit() + { + return date_duration(1); + } + //! Equality + bool operator==(const date_duration& rhs) const + { + return days_ == rhs.days_; + } + //! Less + bool operator<(const date_duration& rhs) const + { + return days_ < rhs.days_; + } + + /* For shortcut operators (+=, -=, etc) simply using + * "days_ += days_" may not work. If instantiated with + * an int_adapter, shortcut operators are not present, + * so this will not compile */ + + //! Subtract another duration -- result is signed + date_duration& operator-=(const date_duration& rhs) + { + //days_ -= rhs.days_; + days_ = days_ - rhs.days_; + return *this; + } + //! Add a duration -- result is signed + date_duration& operator+=(const date_duration& rhs) + { + days_ = days_ + rhs.days_; + return *this; + } + + //! unary- Allows for dd = -date_duration(2); -> dd == -2 + date_duration operator-() const + { + return date_duration(get_rep() * (-1)); + } + //! Division operations on a duration with an integer. + date_duration& operator/=(int divisor) + { + days_ = days_ / divisor; + return *this; + } + + //! return sign information + bool is_negative() const + { + return days_ < 0; + } + + private: + duration_rep days_; + }; + + + /*! Struct for instantiating date_duration with NO special values + * functionality. Allows for transparent implementation of either + * date_duration or date_duration > */ + struct duration_traits_long + { + typedef long int_type; + typedef long impl_type; + static int_type as_number(impl_type i) { return i; }; + }; + + /*! Struct for instantiating date_duration WITH special values + * functionality. Allows for transparent implementation of either + * date_duration or date_duration > */ + struct duration_traits_adapted + { + typedef long int_type; + typedef boost::date_time::int_adapter impl_type; + static int_type as_number(impl_type i) { return i.as_number(); }; + }; + + +} } //namspace date_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_duration_types.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_duration_types.hpp new file mode 100644 index 0000000000..1512c0ef20 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_duration_types.hpp @@ -0,0 +1,269 @@ +#ifndef DATE_DURATION_TYPES_HPP___ +#define DATE_DURATION_TYPES_HPP___ + +/* Copyright (c) 2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include +#include +#include + +namespace boost { +namespace date_time { + + + //! Additional duration type that represents a number of n*7 days + template + class weeks_duration : public date_duration { + public: + weeks_duration(typename duration_config::impl_type w) + : date_duration(w * 7) {} + weeks_duration(special_values sv) + : date_duration(sv) {} + }; + + // predeclare + template + class years_duration; + + //! additional duration type that represents a logical month + /*! A logical month enables things like: "date(2002,Mar,2) + months(2) -> + * 2002-May2". If the date is a last day-of-the-month, the result will + * also be a last-day-of-the-month. + */ + template + class months_duration + { + private: + typedef typename base_config::int_rep int_rep; + typedef typename int_rep::int_type int_type; + typedef typename base_config::date_type date_type; + typedef typename date_type::duration_type duration_type; + typedef typename base_config::month_adjustor_type month_adjustor_type; + typedef months_duration months_type; + typedef years_duration years_type; + public: + months_duration(int_rep num) : _m(num) {} + months_duration(special_values sv) : _m(sv) + { + _m = int_rep::from_special(sv); + } + int_rep number_of_months() const { return _m; } + //! returns a negative duration + duration_type get_neg_offset(const date_type& d) const + { + month_adjustor_type m_adj(_m.as_number()); + return duration_type(m_adj.get_neg_offset(d)); + } + duration_type get_offset(const date_type& d) const + { + month_adjustor_type m_adj(_m.as_number()); + return duration_type(m_adj.get_offset(d)); + } + bool operator==(const months_type& rhs) const + { + return(_m == rhs._m); + } + bool operator!=(const months_type& rhs) const + { + return(_m != rhs._m); + } + months_type operator+(const months_type& rhs)const + { + return months_type(_m + rhs._m); + } + months_type& operator+=(const months_type& rhs) + { + _m = _m + rhs._m; + return *this; + } + months_type operator-(const months_type& rhs)const + { + return months_type(_m - rhs._m); + } + months_type& operator-=(const months_type& rhs) + { + _m = _m - rhs._m; + return *this; + } + months_type operator*(const int_type rhs)const + { + return months_type(_m * rhs); + } + months_type& operator*=(const int_type rhs) + { + _m = _m * rhs; + return *this; + } + months_type operator/(const int_type rhs)const + { + return months_type(_m / rhs); + } + months_type& operator/=(const int_type rhs) + { + _m = _m / rhs; + return *this; + } + months_type operator+(const years_type& y)const + { + return months_type(y.number_of_years() * 12 + _m); + } + months_type& operator+=(const years_type& y) + { + _m = y.number_of_years() * 12 + _m; + return *this; + } + months_type operator-(const years_type& y) const + { + return months_type(_m - y.number_of_years() * 12); + } + months_type& operator-=(const years_type& y) + { + _m = _m - y.number_of_years() * 12; + return *this; + } + + // + friend date_type operator+(const date_type& d, const months_type& m) + { + return d + m.get_offset(d); + } + friend date_type operator+=(date_type& d, const months_type& m) + { + return d += m.get_offset(d); + } + friend date_type operator-(const date_type& d, const months_type& m) + { + // get_neg_offset returns a negative duration, so we add + return d + m.get_neg_offset(d); + } + friend date_type operator-=(date_type& d, const months_type& m) + { + // get_neg_offset returns a negative duration, so we add + return d += m.get_neg_offset(d); + } + + private: + int_rep _m; + }; + + //! additional duration type that represents a logical year + /*! A logical year enables things like: "date(2002,Mar,2) + years(2) -> + * 2004-Mar-2". If the date is a last day-of-the-month, the result will + * also be a last-day-of-the-month (ie date(2001-Feb-28) + years(3) -> + * 2004-Feb-29). + */ + template + class years_duration + { + private: + typedef typename base_config::int_rep int_rep; + typedef typename int_rep::int_type int_type; + typedef typename base_config::date_type date_type; + typedef typename date_type::duration_type duration_type; + typedef typename base_config::month_adjustor_type month_adjustor_type; + typedef years_duration years_type; + typedef months_duration months_type; + public: + years_duration(int_rep num) : _y(num) {} + years_duration(special_values sv) : _y(sv) + { + _y = int_rep::from_special(sv); + } + int_rep number_of_years() const { return _y; } + //! returns a negative duration + duration_type get_neg_offset(const date_type& d) const + { + month_adjustor_type m_adj(_y.as_number() * 12); + return duration_type(m_adj.get_neg_offset(d)); + } + duration_type get_offset(const date_type& d) const + { + month_adjustor_type m_adj(_y.as_number() * 12); + return duration_type(m_adj.get_offset(d)); + } + bool operator==(const years_type& rhs) const + { + return(_y == rhs._y); + } + bool operator!=(const years_type& rhs) const + { + return(_y != rhs._y); + } + years_type operator+(const years_type& rhs)const + { + return years_type(_y + rhs._y); + } + years_type& operator+=(const years_type& rhs) + { + _y = _y + rhs._y; + return *this; + } + years_type operator-(const years_type& rhs)const + { + return years_type(_y - rhs._y); + } + years_type& operator-=(const years_type& rhs) + { + _y = _y - rhs._y; + return *this; + } + years_type operator*(const int_type rhs)const + { + return years_type(_y * rhs); + } + years_type& operator*=(const int_type rhs) + { + _y = _y * rhs; + return *this; + } + years_type operator/(const int_type rhs)const + { + return years_type(_y / rhs); + } + years_type& operator/=(const int_type rhs) + { + _y = _y / rhs; + return *this; + } + months_type operator+(const months_type& m) const + { + return(months_type(_y * 12 + m.number_of_months())); + } + months_type operator-(const months_type& m) const + { + return(months_type(_y * 12 - m.number_of_months())); + } + + // + friend date_type operator+(const date_type& d, const years_type& y) + { + return d + y.get_offset(d); + } + friend date_type operator+=(date_type& d, const years_type& y) + { + return d += y.get_offset(d); + } + friend date_type operator-(const date_type& d, const years_type& y) + { + // get_neg_offset returns a negative duration, so we add + return d + y.get_neg_offset(d); + } + friend date_type operator-=(date_type& d, const years_type& y) + { + // get_neg_offset returns a negative duration, so we add + return d += y.get_neg_offset(d); + } + + private: + int_rep _y; + }; + +}} // namespace boost::date_time + +#endif // DATE_DURATION_TYPES_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_facet.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_facet.hpp new file mode 100644 index 0000000000..3eda4c7d09 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_facet.hpp @@ -0,0 +1,764 @@ +#ifndef _DATE_TIME_DATE_FACET__HPP___ +#define _DATE_TIME_DATE_FACET__HPP___ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Martin Andrian, Jeff Garland, Bart Garst + * $Date: 2009-06-04 07:40:18 -0400 (Thu, 04 Jun 2009) $ + */ + +#include +#include +#include +#include // ostreambuf_iterator +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace date_time { + + + /*! Class that provides format based I/O facet for date types. + * + * This class allows the formatting of dates by using format string. + * Format strings are: + * + * - %A => long_weekday_format - Full name Ex: Tuesday + * - %a => short_weekday_format - Three letter abbreviation Ex: Tue + * - %B => long_month_format - Full name Ex: October + * - %b => short_month_format - Three letter abbreviation Ex: Oct + * - %x => standard_format_specifier - defined by the locale + * - %Y-%b-%d => default_date_format - YYYY-Mon-dd + * + * Default month format == %b + * Default weekday format == %a + */ + template > > + class date_facet : public std::locale::facet { + public: + typedef typename date_type::duration_type duration_type; + // greg_weekday is gregorian_calendar::day_of_week_type + typedef typename date_type::day_of_week_type day_of_week_type; + typedef typename date_type::day_type day_type; + typedef typename date_type::month_type month_type; + typedef boost::date_time::period period_type; + typedef std::basic_string string_type; + typedef CharT char_type; + typedef boost::date_time::period_formatter period_formatter_type; + typedef boost::date_time::special_values_formatter special_values_formatter_type; + typedef std::vector > input_collection_type; + // used for the output of the date_generators + typedef date_generator_formatter date_gen_formatter_type; + typedef partial_date partial_date_type; + typedef nth_kday_of_month nth_kday_type; + typedef first_kday_of_month first_kday_type; + typedef last_kday_of_month last_kday_type; + typedef first_kday_after kday_after_type; + typedef first_kday_before kday_before_type; + static const char_type long_weekday_format[3]; + static const char_type short_weekday_format[3]; + static const char_type long_month_format[3]; + static const char_type short_month_format[3]; + static const char_type default_period_separator[4]; + static const char_type standard_format_specifier[3]; + static const char_type iso_format_specifier[7]; + static const char_type iso_format_extended_specifier[9]; + static const char_type default_date_format[9]; // YYYY-Mon-DD + static std::locale::id id; + +#if defined (__SUNPRO_CC) && defined (_RWSTD_VER) + std::locale::id& __get_id (void) const { return id; } +#endif + + explicit date_facet(::size_t a_ref = 0) + : std::locale::facet(a_ref), + //m_format(standard_format_specifier) + m_format(default_date_format), + m_month_format(short_month_format), + m_weekday_format(short_weekday_format) + {} + + explicit date_facet(const char_type* format_str, + const input_collection_type& short_names, + ::size_t ref_count = 0) + : std::locale::facet(ref_count), + m_format(format_str), + m_month_format(short_month_format), + m_weekday_format(short_weekday_format), + m_month_short_names(short_names) + {} + + + explicit date_facet(const char_type* format_str, + period_formatter_type per_formatter = period_formatter_type(), + special_values_formatter_type sv_formatter = special_values_formatter_type(), + date_gen_formatter_type dg_formatter = date_gen_formatter_type(), + ::size_t ref_count = 0) + : std::locale::facet(ref_count), + m_format(format_str), + m_month_format(short_month_format), + m_weekday_format(short_weekday_format), + m_period_formatter(per_formatter), + m_date_gen_formatter(dg_formatter), + m_special_values_formatter(sv_formatter) + {} + void format(const char_type* const format_str) { + m_format = format_str; + } + virtual void set_iso_format() + { + m_format = iso_format_specifier; + } + virtual void set_iso_extended_format() + { + m_format = iso_format_extended_specifier; + } + void month_format(const char_type* const format_str) { + m_month_format = format_str; + } + void weekday_format(const char_type* const format_str) { + m_weekday_format = format_str; + } + + void period_formatter(period_formatter_type per_formatter) { + m_period_formatter= per_formatter; + } + void special_values_formatter(const special_values_formatter_type& svf) + { + m_special_values_formatter = svf; + } + void short_weekday_names(const input_collection_type& short_names) + { + m_weekday_short_names = short_names; + } + void long_weekday_names(const input_collection_type& long_names) + { + m_weekday_long_names = long_names; + } + + void short_month_names(const input_collection_type& short_names) + { + m_month_short_names = short_names; + } + + void long_month_names(const input_collection_type& long_names) + { + m_month_long_names = long_names; + } + + void date_gen_phrase_strings(const input_collection_type& new_strings, + typename date_gen_formatter_type::phrase_elements beg_pos=date_gen_formatter_type::first) + { + m_date_gen_formatter.elements(new_strings, beg_pos); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const date_type& d) const + { + if (d.is_special()) { + return do_put_special(next, a_ios, fill_char, d.as_special()); + } + //The following line of code required the date to support a to_tm function + return do_put_tm(next, a_ios, fill_char, to_tm(d), m_format); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const duration_type& dd) const + { + if (dd.is_special()) { + return do_put_special(next, a_ios, fill_char, dd.get_rep().as_special()); + } + + typedef std::num_put num_put; + if (std::has_facet(a_ios.getloc())) { + return std::use_facet(a_ios.getloc()).put(next, a_ios, fill_char, dd.get_rep().as_number()); + } + else { + num_put* f = new num_put(); + std::locale l = std::locale(a_ios.getloc(), f); + a_ios.imbue(l); + return f->put(next, a_ios, fill_char, dd.get_rep().as_number()); + } + + } + + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const month_type& m) const + { + //if (d.is_special()) { + // return do_put_special(next, a_ios, fill_char, d.as_special()); + //} + //The following line of code required the date to support a to_tm function + std::tm dtm = {}; + dtm.tm_mon = m - 1; + return do_put_tm(next, a_ios, fill_char, dtm, m_month_format); + } + + //! puts the day of month + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const day_type& day) const + { + std::tm dtm = {}; + dtm.tm_mday = day.as_number(); + char_type tmp[3] = {'%','d'}; + string_type temp_format(tmp); + return do_put_tm(next, a_ios, fill_char, dtm, temp_format); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const day_of_week_type& dow) const + { + //if (d.is_special()) { + // return do_put_special(next, a_ios, fill_char, d.as_special()); + //} + //The following line of code required the date to support a to_tm function + std::tm dtm = {}; + dtm.tm_wday = dow; + return do_put_tm(next, a_ios, fill_char, dtm, m_weekday_format); + } + + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const period_type& p) const + { + return m_period_formatter.put_period(next, a_ios, fill_char, p, *this); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const partial_date_type& pd) const + { + return m_date_gen_formatter.put_partial_date(next, a_ios, fill_char, pd, *this); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const nth_kday_type& nkd) const + { + return m_date_gen_formatter.put_nth_kday(next, a_ios, fill_char, nkd, *this); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const first_kday_type& fkd) const + { + return m_date_gen_formatter.put_first_kday(next, a_ios, fill_char, fkd, *this); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const last_kday_type& lkd) const + { + return m_date_gen_formatter.put_last_kday(next, a_ios, fill_char, lkd, *this); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const kday_before_type& fkb) const + { + return m_date_gen_formatter.put_kday_before(next, a_ios, fill_char, fkb, *this); + } + + OutItrT put(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const kday_after_type& fka) const + { + return m_date_gen_formatter.put_kday_after(next, a_ios, fill_char, fka, *this); + } + + protected: + virtual OutItrT do_put_special(OutItrT next, + std::ios_base& /*a_ios*/, + char_type /*fill_char*/, + const boost::date_time::special_values sv) const + { + m_special_values_formatter.put_special(next, sv); + return next; + } + virtual OutItrT do_put_tm(OutItrT next, + std::ios_base& a_ios, + char_type fill_char, + const tm& tm_value, + string_type a_format) const + { + // update format string with custom names + if (m_weekday_long_names.size()) { + boost::algorithm::replace_all(a_format, + long_weekday_format, + m_weekday_long_names[tm_value.tm_wday]); + } + if (m_weekday_short_names.size()) { + boost::algorithm::replace_all(a_format, + short_weekday_format, + m_weekday_short_names[tm_value.tm_wday]); + + } + if (m_month_long_names.size()) { + boost::algorithm::replace_all(a_format, + long_month_format, + m_month_long_names[tm_value.tm_mon]); + } + if (m_month_short_names.size()) { + boost::algorithm::replace_all(a_format, + short_month_format, + m_month_short_names[tm_value.tm_mon]); + } + // use time_put facet to create final string + const char_type* p_format = a_format.c_str(); + return std::use_facet >(a_ios.getloc()).put(next, a_ios, + fill_char, + &tm_value, + p_format, + p_format + a_format.size()); + } + protected: + string_type m_format; + string_type m_month_format; + string_type m_weekday_format; + period_formatter_type m_period_formatter; + date_gen_formatter_type m_date_gen_formatter; + special_values_formatter_type m_special_values_formatter; + input_collection_type m_month_short_names; + input_collection_type m_month_long_names; + input_collection_type m_weekday_short_names; + input_collection_type m_weekday_long_names; + private: + }; + + template + std::locale::id date_facet::id; + + template + const typename date_facet::char_type + date_facet::long_weekday_format[3] = {'%','A'}; + + template + const typename date_facet::char_type + date_facet::short_weekday_format[3] = {'%','a'}; + + template + const typename date_facet::char_type + date_facet::long_month_format[3] = {'%','B'}; + + template + const typename date_facet::char_type + date_facet::short_month_format[3] = {'%','b'}; + + template + const typename date_facet::char_type + date_facet::default_period_separator[4] = { ' ', '/', ' '}; + + template + const typename date_facet::char_type + date_facet::standard_format_specifier[3] = + {'%', 'x' }; + + template + const typename date_facet::char_type + date_facet::iso_format_specifier[7] = + {'%', 'Y', '%', 'm', '%', 'd' }; + + template + const typename date_facet::char_type + date_facet::iso_format_extended_specifier[9] = + {'%', 'Y', '-', '%', 'm', '-', '%', 'd' }; + + template + const typename date_facet::char_type + date_facet::default_date_format[9] = + {'%','Y','-','%','b','-','%','d'}; + + + + //! Input facet + template > > + class date_input_facet : public std::locale::facet { + public: + typedef typename date_type::duration_type duration_type; + // greg_weekday is gregorian_calendar::day_of_week_type + typedef typename date_type::day_of_week_type day_of_week_type; + typedef typename date_type::day_type day_type; + typedef typename date_type::month_type month_type; + typedef typename date_type::year_type year_type; + typedef boost::date_time::period period_type; + typedef std::basic_string string_type; + typedef CharT char_type; + typedef boost::date_time::period_parser period_parser_type; + typedef boost::date_time::special_values_parser special_values_parser_type; + typedef std::vector > input_collection_type; + typedef format_date_parser format_date_parser_type; + // date_generators stuff goes here + typedef date_generator_parser date_gen_parser_type; + typedef partial_date partial_date_type; + typedef nth_kday_of_month nth_kday_type; + typedef first_kday_of_month first_kday_type; + typedef last_kday_of_month last_kday_type; + typedef first_kday_after kday_after_type; + typedef first_kday_before kday_before_type; + + static const char_type long_weekday_format[3]; + static const char_type short_weekday_format[3]; + static const char_type long_month_format[3]; + static const char_type short_month_format[3]; + static const char_type four_digit_year_format[3]; + static const char_type two_digit_year_format[3]; + static const char_type default_period_separator[4]; + static const char_type standard_format_specifier[3]; + static const char_type iso_format_specifier[7]; + static const char_type iso_format_extended_specifier[9]; + static const char_type default_date_format[9]; // YYYY-Mon-DD + static std::locale::id id; + + explicit date_input_facet(::size_t a_ref = 0) + : std::locale::facet(a_ref), + m_format(default_date_format), + m_month_format(short_month_format), + m_weekday_format(short_weekday_format), + m_year_format(four_digit_year_format), + m_parser(m_format, std::locale::classic()) + // default period_parser & special_values_parser used + {} + + explicit date_input_facet(const string_type& format_str, + ::size_t a_ref = 0) + : std::locale::facet(a_ref), + m_format(format_str), + m_month_format(short_month_format), + m_weekday_format(short_weekday_format), + m_year_format(four_digit_year_format), + m_parser(m_format, std::locale::classic()) + // default period_parser & special_values_parser used + {} + + explicit date_input_facet(const string_type& format_str, + const format_date_parser_type& date_parser, + const special_values_parser_type& sv_parser, + const period_parser_type& per_parser, + const date_gen_parser_type& date_gen_parser, + ::size_t ref_count = 0) + : std::locale::facet(ref_count), + m_format(format_str), + m_month_format(short_month_format), + m_weekday_format(short_weekday_format), + m_year_format(four_digit_year_format), + m_parser(date_parser), + m_date_gen_parser(date_gen_parser), + m_period_parser(per_parser), + m_sv_parser(sv_parser) + {} + + + void format(const char_type* const format_str) { + m_format = format_str; + } + virtual void set_iso_format() + { + m_format = iso_format_specifier; + } + virtual void set_iso_extended_format() + { + m_format = iso_format_extended_specifier; + } + void month_format(const char_type* const format_str) { + m_month_format = format_str; + } + void weekday_format(const char_type* const format_str) { + m_weekday_format = format_str; + } + void year_format(const char_type* const format_str) { + m_year_format = format_str; + } + + void period_parser(period_parser_type per_parser) { + m_period_parser = per_parser; + } + void short_weekday_names(const input_collection_type& weekday_names) + { + m_parser.short_weekday_names(weekday_names); + } + void long_weekday_names(const input_collection_type& weekday_names) + { + m_parser.long_weekday_names(weekday_names); + } + + void short_month_names(const input_collection_type& month_names) + { + m_parser.short_month_names(month_names); + } + + void long_month_names(const input_collection_type& month_names) + { + m_parser.long_month_names(month_names); + } + + void date_gen_element_strings(const input_collection_type& col) + { + m_date_gen_parser.element_strings(col); + } + void date_gen_element_strings(const string_type& first, + const string_type& second, + const string_type& third, + const string_type& fourth, + const string_type& fifth, + const string_type& last, + const string_type& before, + const string_type& after, + const string_type& of) + + { + m_date_gen_parser.element_strings(first,second,third,fourth,fifth,last,before,after,of); + } + + void special_values_parser(special_values_parser_type sv_parser) + { + m_sv_parser = sv_parser; + } + + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& /*a_ios*/, + date_type& d) const + { + d = m_parser.parse_date(from, to, m_format, m_sv_parser); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& /*a_ios*/, + month_type& m) const + { + m = m_parser.parse_month(from, to, m_month_format); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& /*a_ios*/, + day_of_week_type& wd) const + { + wd = m_parser.parse_weekday(from, to, m_weekday_format); + return from; + } + //! Expects 1 or 2 digit day range: 1-31 + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& /*a_ios*/, + day_type& d) const + { + d = m_parser.parse_var_day_of_month(from, to); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& /*a_ios*/, + year_type& y) const + { + y = m_parser.parse_year(from, to, m_year_format); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& a_ios, + duration_type& dd) const + { + // skip leading whitespace + while(std::isspace(*from) && from != to) { ++from; } + + /* num_get.get() will always consume the first character if it + * is a sign indicator (+/-). Special value strings may begin + * with one of these signs so we'll need a copy of it + * in case num_get.get() fails. */ + char_type c = '\0'; + // TODO Are these characters somewhere in the locale? + if(*from == '-' || *from == '+') { + c = *from; + } + typedef std::num_get num_get; + typename duration_type::duration_rep_type val = 0; + std::ios_base::iostate err = std::ios_base::goodbit; + + if (std::has_facet(a_ios.getloc())) { + from = std::use_facet(a_ios.getloc()).get(from, to, a_ios, err, val); + } + else { + num_get* ng = new num_get(); + std::locale l = std::locale(a_ios.getloc(), ng); + a_ios.imbue(l); + from = ng->get(from, to, a_ios, err, val); + } + if(err & std::ios_base::failbit){ + typedef typename special_values_parser_type::match_results match_results; + match_results mr; + if(c == '-' || c == '+') { // was the first character consumed? + mr.cache += c; + } + m_sv_parser.match(from, to, mr); + if(mr.current_match == match_results::PARSE_ERROR) { + boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'")); + BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return from); // should never reach + } + dd = duration_type(static_cast(mr.current_match)); + } + else { + dd = duration_type(val); + } + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& a_ios, + period_type& p) const + { + p = m_period_parser.get_period(from, to, a_ios, p, duration_type::unit(), *this); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& a_ios, + nth_kday_type& nkd) const + { + nkd = m_date_gen_parser.get_nth_kday_type(from, to, a_ios, *this); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& a_ios, + partial_date_type& pd) const + { + + pd = m_date_gen_parser.get_partial_date_type(from, to, a_ios, *this); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& a_ios, + first_kday_type& fkd) const + { + fkd = m_date_gen_parser.get_first_kday_type(from, to, a_ios, *this); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& a_ios, + last_kday_type& lkd) const + { + lkd = m_date_gen_parser.get_last_kday_type(from, to, a_ios, *this); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& a_ios, + kday_before_type& fkb) const + { + fkb = m_date_gen_parser.get_kday_before_type(from, to, a_ios, *this); + return from; + } + InItrT get(InItrT& from, + InItrT& to, + std::ios_base& a_ios, + kday_after_type& fka) const + { + fka = m_date_gen_parser.get_kday_after_type(from, to, a_ios, *this); + return from; + } + + protected: + string_type m_format; + string_type m_month_format; + string_type m_weekday_format; + string_type m_year_format; + format_date_parser_type m_parser; + date_gen_parser_type m_date_gen_parser; + period_parser_type m_period_parser; + special_values_parser_type m_sv_parser; + private: + }; + + + template + std::locale::id date_input_facet::id; + + template + const typename date_input_facet::char_type + date_input_facet::long_weekday_format[3] = {'%','A'}; + + template + const typename date_input_facet::char_type + date_input_facet::short_weekday_format[3] = {'%','a'}; + + template + const typename date_input_facet::char_type + date_input_facet::long_month_format[3] = {'%','B'}; + + template + const typename date_input_facet::char_type + date_input_facet::short_month_format[3] = {'%','b'}; + + template + const typename date_input_facet::char_type + date_input_facet::four_digit_year_format[3] = {'%','Y'}; + + template + const typename date_input_facet::char_type + date_input_facet::two_digit_year_format[3] = {'%','y'}; + + template + const typename date_input_facet::char_type + date_input_facet::default_period_separator[4] = { ' ', '/', ' '}; + + template + const typename date_input_facet::char_type + date_input_facet::standard_format_specifier[3] = + {'%', 'x' }; + + template + const typename date_input_facet::char_type + date_input_facet::iso_format_specifier[7] = + {'%', 'Y', '%', 'm', '%', 'd' }; + + template + const typename date_input_facet::char_type + date_input_facet::iso_format_extended_specifier[9] = + {'%', 'Y', '-', '%', 'm', '-', '%', 'd' }; + + template + const typename date_input_facet::char_type + date_input_facet::default_date_format[9] = + {'%','Y','-','%','b','-','%','d'}; + +} } // namespaces + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_format_simple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_format_simple.hpp new file mode 100644 index 0000000000..be21ce4a57 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_format_simple.hpp @@ -0,0 +1,159 @@ +#ifndef DATE_TIME_SIMPLE_FORMAT_HPP___ +#define DATE_TIME_SIMPLE_FORMAT_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/parse_format_base.hpp" + +namespace boost { +namespace date_time { + +//! Class to provide simple basic formatting rules +template +class simple_format { +public: + + //! String used printed is date is invalid + static const charT* not_a_date() + { + return "not-a-date-time"; + } + //! String used to for positive infinity value + static const charT* pos_infinity() + { + return "+infinity"; + } + //! String used to for positive infinity value + static const charT* neg_infinity() + { + return "-infinity"; + } + //! Describe month format + static month_format_spec month_format() + { + return month_as_short_string; + } + static ymd_order_spec date_order() + { + return ymd_order_iso; //YYYY-MM-DD + } + //! This format uses '-' to separate date elements + static bool has_date_sep_chars() + { + return true; + } + //! Char to sep? + static charT year_sep_char() + { + return '-'; + } + //! char between year-month + static charT month_sep_char() + { + return '-'; + } + //! Char to separate month-day + static charT day_sep_char() + { + return '-'; + } + //! char between date-hours + static charT hour_sep_char() + { + return ' '; + } + //! char between hour and minute + static charT minute_sep_char() + { + return ':'; + } + //! char for second + static charT second_sep_char() + { + return ':'; + } + +}; + +#ifndef BOOST_NO_STD_WSTRING + +//! Specialization of formmating rules for wchar_t +template<> +class simple_format { +public: + + //! String used printed is date is invalid + static const wchar_t* not_a_date() + { + return L"not-a-date-time"; + } + //! String used to for positive infinity value + static const wchar_t* pos_infinity() + { + return L"+infinity"; + } + //! String used to for positive infinity value + static const wchar_t* neg_infinity() + { + return L"-infinity"; + } + //! Describe month format + static month_format_spec month_format() + { + return month_as_short_string; + } + static ymd_order_spec date_order() + { + return ymd_order_iso; //YYYY-MM-DD + } + //! This format uses '-' to separate date elements + static bool has_date_sep_chars() + { + return true; + } + //! Char to sep? + static wchar_t year_sep_char() + { + return '-'; + } + //! char between year-month + static wchar_t month_sep_char() + { + return '-'; + } + //! Char to separate month-day + static wchar_t day_sep_char() + { + return '-'; + } + //! char between date-hours + static wchar_t hour_sep_char() + { + return ' '; + } + //! char between hour and minute + static wchar_t minute_sep_char() + { + return ':'; + } + //! char for second + static wchar_t second_sep_char() + { + return ':'; + } + +}; + +#endif // BOOST_NO_STD_WSTRING +} } //namespace date_time + + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting.hpp new file mode 100644 index 0000000000..abe547a5f7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting.hpp @@ -0,0 +1,127 @@ +#ifndef DATE_TIME_DATE_FORMATTING_HPP___ +#define DATE_TIME_DATE_FORMATTING_HPP___ + +/* Copyright (c) 2002-2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/iso_format.hpp" +#include "boost/date_time/compiler_config.hpp" +#include +#include +#include + +/* NOTE: "formatter" code for older compilers, ones that define + * BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in + * date_formatting_limited.hpp + */ + +namespace boost { +namespace date_time { + + //! Formats a month as as string into an ostream + template + class month_formatter + { + typedef std::basic_ostream ostream_type; + public: + //! Formats a month as as string into an ostream + /*! This function demands that month_type provide + * functions for converting to short and long strings + * if that capability is used. + */ + static ostream_type& format_month(const month_type& month, + ostream_type &os) + { + switch (format_type::month_format()) + { + case month_as_short_string: + { + os << month.as_short_string(); + break; + } + case month_as_long_string: + { + os << month.as_long_string(); + break; + } + case month_as_integer: + { + os << std::setw(2) << std::setfill(os.widen('0')) << month.as_number(); + break; + } + + } + return os; + } // format_month + }; + + + //! Convert ymd to a standard string formatting policies + template + class ymd_formatter + { + public: + //! Convert ymd to a standard string formatting policies + /*! This is standard code for handling date formatting with + * year-month-day based date information. This function + * uses the format_type to control whether the string will + * contain separator characters, and if so what the character + * will be. In addtion, it can format the month as either + * an integer or a string as controled by the formatting + * policy + */ + static std::basic_string ymd_to_string(ymd_type ymd) + { + typedef typename ymd_type::month_type month_type; + std::basic_ostringstream ss; + ss << ymd.year; + if (format_type::has_date_sep_chars()) { + ss << format_type::month_sep_char(); + } + //this name is a bit ugly, oh well.... + month_formatter::format_month(ymd.month, ss); + if (format_type::has_date_sep_chars()) { + ss << format_type::day_sep_char(); + } + ss << std::setw(2) << std::setfill(ss.widen('0')) + << ymd.day; + return ss.str(); + } + }; + + + //! Convert a date to string using format policies + template + class date_formatter + { + public: + typedef std::basic_string string_type; + //! Convert to a date to standard string using format policies + static string_type date_to_string(date_type d) + { + typedef typename date_type::ymd_type ymd_type; + if (d.is_not_a_date()) { + return string_type(format_type::not_a_date()); + } + if (d.is_neg_infinity()) { + return string_type(format_type::neg_infinity()); + } + if (d.is_pos_infinity()) { + return string_type(format_type::pos_infinity()); + } + ymd_type ymd = d.year_month_day(); + return ymd_formatter::ymd_to_string(ymd); + } + }; + + +} } //namespace date_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting_limited.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting_limited.hpp new file mode 100644 index 0000000000..38fee07b91 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting_limited.hpp @@ -0,0 +1,121 @@ +#ifndef DATE_TIME_DATE_FORMATTING_LIMITED_HPP___ +#define DATE_TIME_DATE_FORMATTING_LIMITED_HPP___ + +/* Copyright (c) 2002-2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/iso_format.hpp" +#include "boost/date_time/compiler_config.hpp" +#include +#include +#include + + +namespace boost { +namespace date_time { + + //! Formats a month as as string into an ostream + template + class month_formatter + { + public: + //! Formats a month as as string into an ostream + /*! This function demands that month_type provide + * functions for converting to short and long strings + * if that capability is used. + */ + static std::ostream& format_month(const month_type& month, + std::ostream& os) + { + switch (format_type::month_format()) + { + case month_as_short_string: + { + os << month.as_short_string(); + break; + } + case month_as_long_string: + { + os << month.as_long_string(); + break; + } + case month_as_integer: + { + os << std::setw(2) << std::setfill('0') << month.as_number(); + break; + } + + } + return os; + } // format_month + }; + + + //! Convert ymd to a standard string formatting policies + template + class ymd_formatter + { + public: + //! Convert ymd to a standard string formatting policies + /*! This is standard code for handling date formatting with + * year-month-day based date information. This function + * uses the format_type to control whether the string will + * contain separator characters, and if so what the character + * will be. In addtion, it can format the month as either + * an integer or a string as controled by the formatting + * policy + */ + static std::string ymd_to_string(ymd_type ymd) + { + typedef typename ymd_type::month_type month_type; + std::ostringstream ss; + ss << ymd.year; + if (format_type::has_date_sep_chars()) { + ss << format_type::month_sep_char(); + } + //this name is a bit ugly, oh well.... + month_formatter::format_month(ymd.month, ss); + if (format_type::has_date_sep_chars()) { + ss << format_type::day_sep_char(); + } + ss << std::setw(2) << std::setfill('0') + << ymd.day; + return ss.str(); + } + }; + + + //! Convert a date to string using format policies + template + class date_formatter + { + public: + //! Convert to a date to standard string using format policies + static std::string date_to_string(date_type d) + { + typedef typename date_type::ymd_type ymd_type; + if (d.is_not_a_date()) { + return format_type::not_a_date(); + } + if (d.is_neg_infinity()) { + return format_type::neg_infinity(); + } + if (d.is_pos_infinity()) { + return format_type::pos_infinity(); + } + ymd_type ymd = d.year_month_day(); + return ymd_formatter::ymd_to_string(ymd); + } + }; + + +} } //namespace date_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting_locales.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting_locales.hpp new file mode 100644 index 0000000000..4ac9c4e401 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_formatting_locales.hpp @@ -0,0 +1,233 @@ +#ifndef DATE_TIME_DATE_FORMATTING_LOCALES_HPP___ +#define DATE_TIME_DATE_FORMATTING_LOCALES_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + +#include "boost/date_time/locale_config.hpp" // set BOOST_DATE_TIME_NO_LOCALE + +#ifndef BOOST_DATE_TIME_NO_LOCALE + +#include "boost/date_time/iso_format.hpp" +#include "boost/date_time/date_names_put.hpp" +#include "boost/date_time/parse_format_base.hpp" +//#include +#include +#include + + +namespace boost { +namespace date_time { + + //! Formats a month as as string into an ostream + template + class ostream_month_formatter + { + public: + typedef typename facet_type::month_type month_type; + typedef std::basic_ostream ostream_type; + + //! Formats a month as as string into an output iterator + static void format_month(const month_type& month, + ostream_type& os, + const facet_type& f) + { + + switch (f.month_format()) + { + case month_as_short_string: + { + std::ostreambuf_iterator oitr(os); + f.put_month_short(oitr, month.as_enum()); + break; + } + case month_as_long_string: + { + std::ostreambuf_iterator oitr(os); + f.put_month_long(oitr, month.as_enum()); + break; + } + case month_as_integer: + { + charT fill_char = '0'; + os << std::setw(2) << std::setfill(fill_char) << month.as_number(); + break; + } + + } + } // format_month + + }; + + + //! Formats a weekday + template + class ostream_weekday_formatter + { + public: + typedef typename facet_type::month_type month_type; + typedef std::basic_ostream ostream_type; + + //! Formats a month as as string into an output iterator + static void format_weekday(const weekday_type& wd, + ostream_type& os, + const facet_type& f, + bool as_long_string) + { + + std::ostreambuf_iterator oitr(os); + if (as_long_string) { + f.put_weekday_long(oitr, wd.as_enum()); + } + else { + f.put_weekday_short(oitr, wd.as_enum()); + } + + } // format_weekday + + }; + + + //! Convert ymd to a standard string formatting policies + template + class ostream_ymd_formatter + { + public: + typedef typename ymd_type::month_type month_type; + typedef ostream_month_formatter month_formatter_type; + typedef std::basic_ostream ostream_type; + typedef std::basic_string foo_type; + + //! Convert ymd to a standard string formatting policies + /*! This is standard code for handling date formatting with + * year-month-day based date information. This function + * uses the format_type to control whether the string will + * contain separator characters, and if so what the character + * will be. In addtion, it can format the month as either + * an integer or a string as controled by the formatting + * policy + */ + // static string_type ymd_to_string(ymd_type ymd) +// { +// std::ostringstream ss; +// facet_type dnp; +// ymd_put(ymd, ss, dnp); +// return ss.str(); +// } + + + // Put ymd to ostream -- part of ostream refactor + static void ymd_put(ymd_type ymd, + ostream_type& os, + const facet_type& f) + { + std::ostreambuf_iterator oitr(os); + charT fill_char = '0'; + switch (f.date_order()) { + case ymd_order_iso: { + os << ymd.year; + if (f.has_date_sep_chars()) { + f.month_sep_char(oitr); + } + month_formatter_type::format_month(ymd.month, os, f); + if (f.has_date_sep_chars()) { + f.day_sep_char(oitr); + } + os << std::setw(2) << std::setfill(fill_char) + << ymd.day; + break; + } + case ymd_order_us: { + month_formatter_type::format_month(ymd.month, os, f); + if (f.has_date_sep_chars()) { + f.day_sep_char(oitr); + } + os << std::setw(2) << std::setfill(fill_char) + << ymd.day; + if (f.has_date_sep_chars()) { + f.month_sep_char(oitr); + } + os << ymd.year; + break; + } + case ymd_order_dmy: { + os << std::setw(2) << std::setfill(fill_char) + << ymd.day; + if (f.has_date_sep_chars()) { + f.day_sep_char(oitr); + } + month_formatter_type::format_month(ymd.month, os, f); + if (f.has_date_sep_chars()) { + f.month_sep_char(oitr); + } + os << ymd.year; + break; + } + } + } + }; + + + //! Convert a date to string using format policies + template + class ostream_date_formatter + { + public: + typedef std::basic_ostream ostream_type; + typedef typename date_type::ymd_type ymd_type; + + //! Put date into an ostream + static void date_put(const date_type& d, + ostream_type& os, + const facet_type& f) + { + special_values sv = d.as_special(); + if (sv == not_special) { + ymd_type ymd = d.year_month_day(); + ostream_ymd_formatter::ymd_put(ymd, os, f); + } + else { // output a special value + std::ostreambuf_iterator coi(os); + f.put_special_value(coi, sv); + } + } + + + //! Put date into an ostream + static void date_put(const date_type& d, + ostream_type& os) + { + //retrieve the local from the ostream + std::locale locale = os.getloc(); + if (std::has_facet(locale)) { + const facet_type& f = std::use_facet(locale); + date_put(d, os, f); + } + else { + //default to something sensible if no facet installed + facet_type default_facet; + date_put(d, os, default_facet); + } + } // date_to_ostream + }; //class date_formatter + + +} } //namespace date_time + +#endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generator_formatter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generator_formatter.hpp new file mode 100644 index 0000000000..88cd7e1aba --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generator_formatter.hpp @@ -0,0 +1,265 @@ +#ifndef _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___ +#define _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___ + +/* Copyright (c) 2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-13 14:05:31 -0500 (Thu, 13 Nov 2008) $ + */ + +#include +#include +#include +#include +#include "boost/date_time/date_generators.hpp" + +namespace boost { +namespace date_time { + + //! Formats date_generators for output + /*! Formatting of date_generators follows specific orders for the + * various types of date_generators. + * - partial_date => "dd Month" + * - nth_day_of_the_week_in_month => "nth weekday of month" + * - first_day_of_the_week_in_month => "first weekday of month" + * - last_day_of_the_week_in_month => "last weekday of month" + * - first_day_of_the_week_after => "weekday after" + * - first_day_of_the_week_before => "weekday before" + * While the order of the elements in these phrases cannot be changed, + * the elements themselves can be. Weekday and Month get their formats + * and names from the date_facet. The remaining elements are stored in + * the date_generator_formatter and can be customized upon construction + * or via a member function. The default elements are those shown in the + * examples above. + */ + template > > + class date_generator_formatter { + public: + typedef partial_date partial_date_type; + typedef nth_kday_of_month nth_kday_type; + typedef first_kday_of_month first_kday_type; + typedef last_kday_of_month last_kday_type; + typedef first_kday_after kday_after_type; + typedef first_kday_before kday_before_type; + + typedef CharT char_type; + typedef std::basic_string string_type; + typedef std::vector collection_type; + static const char_type first_string[6]; + static const char_type second_string[7]; + static const char_type third_string[6]; + static const char_type fourth_string[7]; + static const char_type fifth_string[6]; + static const char_type last_string[5]; + static const char_type before_string[8]; + static const char_type after_string[6]; + static const char_type of_string[3]; + + enum phrase_elements {first=0, second, third, fourth, fifth, last, + before, after, of, number_of_phrase_elements}; + + //! Default format elements used + date_generator_formatter() + { + phrase_strings.reserve(number_of_phrase_elements); + phrase_strings.push_back(string_type(first_string)); + phrase_strings.push_back(string_type(second_string)); + phrase_strings.push_back(string_type(third_string)); + phrase_strings.push_back(string_type(fourth_string)); + phrase_strings.push_back(string_type(fifth_string)); + phrase_strings.push_back(string_type(last_string)); + phrase_strings.push_back(string_type(before_string)); + phrase_strings.push_back(string_type(after_string)); + phrase_strings.push_back(string_type(of_string)); + } + + //! Constructor that allows for a custom set of phrase elements + date_generator_formatter(const string_type& first_str, + const string_type& second_str, + const string_type& third_str, + const string_type& fourth_str, + const string_type& fifth_str, + const string_type& last_str, + const string_type& before_str, + const string_type& after_str, + const string_type& of_str) + { + phrase_strings.reserve(number_of_phrase_elements); + phrase_strings.push_back(first_str); + phrase_strings.push_back(second_str); + phrase_strings.push_back(third_str); + phrase_strings.push_back(fourth_str); + phrase_strings.push_back(fifth_str); + phrase_strings.push_back(last_str); + phrase_strings.push_back(before_str); + phrase_strings.push_back(after_str); + phrase_strings.push_back(of_str); + } + + //! Replace the set of phrase elements with those contained in new_strings + /*! The order of the strings in the given collection is important. + * They must follow: + * - first, second, third, fourth, fifth, last, before, after, of. + * + * It is not necessary to send in a complete set if only a few + * elements are to be replaced as long as the correct beg_pos is used. + * + * Ex: To keep the default first through fifth elements, but replace + * the rest with a collection of: + * - "final", "prior", "following", "in". + * The beg_pos of date_generator_formatter::last would be used. + */ + void elements(const collection_type& new_strings, + phrase_elements beg_pos=first) + { + if(beg_pos < number_of_phrase_elements) { + typename collection_type::iterator itr = phrase_strings.begin(); + itr += beg_pos; + std::copy(new_strings.begin(), new_strings.end(), + itr); + //phrase_strings.begin()); + } + } + + //!Put a partial_date => "dd Month" + template + OutItrT put_partial_date(OutItrT next, std::ios_base& a_ios, + CharT a_fill, const partial_date_type& pd, + const facet_type& facet) const + { + facet.put(next, a_ios, a_fill, pd.day()); + next = a_fill; //TODO change this ??? + facet.put(next, a_ios, a_fill, pd.month()); + return next; + } + + //! Put an nth_day_of_the_week_in_month => "nth weekday of month" + template + OutItrT put_nth_kday(OutItrT next, std::ios_base& a_ios, + CharT a_fill, const nth_kday_type& nkd, + const facet_type& facet) const + { + put_string(next, phrase_strings[nkd.nth_week() -1]); + next = a_fill; //TODO change this ??? + facet.put(next, a_ios, a_fill, nkd.day_of_week()); + next = a_fill; //TODO change this ??? + put_string(next, string_type(of_string)); + next = a_fill; //TODO change this ??? + facet.put(next, a_ios, a_fill, nkd.month()); + return next; + } + + //! Put a first_day_of_the_week_in_month => "first weekday of month" + template + OutItrT put_first_kday(OutItrT next, std::ios_base& a_ios, + CharT a_fill, const first_kday_type& fkd, + const facet_type& facet) const + { + put_string(next, phrase_strings[first]); + next = a_fill; //TODO change this ??? + facet.put(next, a_ios, a_fill, fkd.day_of_week()); + next = a_fill; //TODO change this ??? + put_string(next, string_type(of_string)); + next = a_fill; //TODO change this ??? + facet.put(next, a_ios, a_fill, fkd.month()); + return next; + } + + //! Put a last_day_of_the_week_in_month => "last weekday of month" + template + OutItrT put_last_kday(OutItrT next, std::ios_base& a_ios, + CharT a_fill, const last_kday_type& lkd, + const facet_type& facet) const + { + put_string(next, phrase_strings[last]); + next = a_fill; //TODO change this ??? + facet.put(next, a_ios, a_fill, lkd.day_of_week()); + next = a_fill; //TODO change this ??? + put_string(next, string_type(of_string)); + next = a_fill; //TODO change this ??? + facet.put(next, a_ios, a_fill, lkd.month()); + return next; + } + + //! Put a first_day_of_the_week_before => "weekday before" + template + OutItrT put_kday_before(OutItrT next, std::ios_base& a_ios, + CharT a_fill, const kday_before_type& fkb, + const facet_type& facet) const + { + facet.put(next, a_ios, a_fill, fkb.day_of_week()); + next = a_fill; //TODO change this ??? + put_string(next, phrase_strings[before]); + return next; + } + + //! Put a first_day_of_the_week_after => "weekday after" + template + OutItrT put_kday_after(OutItrT next, std::ios_base& a_ios, + CharT a_fill, const kday_after_type& fka, + const facet_type& facet) const + { + facet.put(next, a_ios, a_fill, fka.day_of_week()); + next = a_fill; //TODO change this ??? + put_string(next, phrase_strings[after]); + return next; + } + + + private: + collection_type phrase_strings; + + //! helper function to put the various member string into stream + OutItrT put_string(OutItrT next, const string_type& str) const + { + typename string_type::const_iterator itr = str.begin(); + while(itr != str.end()) { + *next = *itr; + ++itr; + ++next; + } + return next; + } + }; + + template + const typename date_generator_formatter::char_type + date_generator_formatter::first_string[6] = + {'f','i','r','s','t'}; + template + const typename date_generator_formatter::char_type + date_generator_formatter::second_string[7] = + {'s','e','c','o','n','d'}; + template + const typename date_generator_formatter::char_type + date_generator_formatter::third_string[6] = + {'t','h','i','r','d'}; + template + const typename date_generator_formatter::char_type + date_generator_formatter::fourth_string[7] = + {'f','o','u','r','t','h'}; + template + const typename date_generator_formatter::char_type + date_generator_formatter::fifth_string[6] = + {'f','i','f','t','h'}; + template + const typename date_generator_formatter::char_type + date_generator_formatter::last_string[5] = + {'l','a','s','t'}; + template + const typename date_generator_formatter::char_type + date_generator_formatter::before_string[8] = + {'b','e','f','o','r','e'}; + template + const typename date_generator_formatter::char_type + date_generator_formatter::after_string[6] = + {'a','f','t','e','r'}; + template + const typename date_generator_formatter::char_type + date_generator_formatter::of_string[3] = + {'o','f'}; +} } // namespaces + +#endif // _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generator_parser.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generator_parser.hpp new file mode 100644 index 0000000000..f11eb42d52 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generator_parser.hpp @@ -0,0 +1,330 @@ + +#ifndef DATE_TIME_DATE_GENERATOR_PARSER_HPP__ +#define DATE_TIME_DATE_GENERATOR_PARSER_HPP__ + +/* Copyright (c) 2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +#include +#include +#include // istreambuf_iterator +#include +#include +#include +#include +#include + +namespace boost { namespace date_time { + + //! Class for date_generator parsing + /*! The elements of a date_generator "phrase" are parsed from the input stream in a + * particular order. All elements are required and the order in which they appear + * cannot change, however, the elements themselves can be changed. The default + * elements and their order are as follows: + * + * - partial_date => "dd Month" + * - nth_day_of_the_week_in_month => "nth weekday of month" + * - first_day_of_the_week_in_month => "first weekday of month" + * - last_day_of_the_week_in_month => "last weekday of month" + * - first_day_of_the_week_after => "weekday after" + * - first_day_of_the_week_before => "weekday before" + * + * Weekday and Month names and formats are handled via the date_input_facet. + * + */ + template + class date_generator_parser + { + public: + typedef std::basic_string string_type; + typedef std::istreambuf_iterator stream_itr_type; + + typedef typename date_type::month_type month_type; + typedef typename date_type::day_of_week_type day_of_week_type; + typedef typename date_type::day_type day_type; + + typedef string_parse_tree parse_tree_type; + typedef typename parse_tree_type::parse_match_result_type match_results; + typedef std::vector > collection_type; + + typedef partial_date partial_date_type; + typedef nth_kday_of_month nth_kday_type; + typedef first_kday_of_month first_kday_type; + typedef last_kday_of_month last_kday_type; + typedef first_kday_after kday_after_type; + typedef first_kday_before kday_before_type; + + typedef charT char_type; + static const char_type first_string[6]; + static const char_type second_string[7]; + static const char_type third_string[6]; + static const char_type fourth_string[7]; + static const char_type fifth_string[6]; + static const char_type last_string[5]; + static const char_type before_string[8]; + static const char_type after_string[6]; + static const char_type of_string[3]; + + enum phrase_elements {first=0, second, third, fourth, fifth, last, + before, after, of, number_of_phrase_elements}; + + //! Creates a date_generator_parser with the default set of "element_strings" + date_generator_parser() + { + element_strings(string_type(first_string), + string_type(second_string), + string_type(third_string), + string_type(fourth_string), + string_type(fifth_string), + string_type(last_string), + string_type(before_string), + string_type(after_string), + string_type(of_string)); + } + + //! Creates a date_generator_parser using a user defined set of element strings + date_generator_parser(const string_type& first_str, + const string_type& second_str, + const string_type& third_str, + const string_type& fourth_str, + const string_type& fifth_str, + const string_type& last_str, + const string_type& before_str, + const string_type& after_str, + const string_type& of_str) + { + element_strings(first_str, second_str, third_str, fourth_str, fifth_str, + last_str, before_str, after_str, of_str); + } + + //! Replace strings that determine nth week for generator + void element_strings(const string_type& first_str, + const string_type& second_str, + const string_type& third_str, + const string_type& fourth_str, + const string_type& fifth_str, + const string_type& last_str, + const string_type& before_str, + const string_type& after_str, + const string_type& of_str) + { + collection_type phrases; + phrases.push_back(first_str); + phrases.push_back(second_str); + phrases.push_back(third_str); + phrases.push_back(fourth_str); + phrases.push_back(fifth_str); + phrases.push_back(last_str); + phrases.push_back(before_str); + phrases.push_back(after_str); + phrases.push_back(of_str); + m_element_strings = parse_tree_type(phrases, this->first); // enum first + } + + void element_strings(const collection_type& col) + { + m_element_strings = parse_tree_type(col, this->first); // enum first + } + + //! returns partial_date parsed from stream + template + partial_date_type + get_partial_date_type(stream_itr_type& sitr, + stream_itr_type& stream_end, + std::ios_base& a_ios, + const facet_type& facet) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + day_type d(1); + month_type m(1); + facet.get(sitr, stream_end, a_ios, d); + facet.get(sitr, stream_end, a_ios, m); + + return partial_date_type(d,m); + } + + //! returns nth_kday_of_week parsed from stream + template + nth_kday_type + get_nth_kday_type(stream_itr_type& sitr, + stream_itr_type& stream_end, + std::ios_base& a_ios, + const facet_type& facet) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + typename nth_kday_type::week_num wn; + day_of_week_type wd(0); // no default constructor + month_type m(1); // no default constructor + + match_results mr = m_element_strings.match(sitr, stream_end); + switch(mr.current_match) { + case first : { wn = nth_kday_type::first; break; } + case second : { wn = nth_kday_type::second; break; } + case third : { wn = nth_kday_type::third; break; } + case fourth : { wn = nth_kday_type::fourth; break; } + case fifth : { wn = nth_kday_type::fifth; break; } + default: + { + boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'")); + BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(wn = nth_kday_type::first); + } + } // week num + facet.get(sitr, stream_end, a_ios, wd); // day_of_week + extract_element(sitr, stream_end, of); // "of" element + facet.get(sitr, stream_end, a_ios, m); // month + + return nth_kday_type(wn, wd, m); + } + + //! returns first_kday_of_week parsed from stream + template + first_kday_type + get_first_kday_type(stream_itr_type& sitr, + stream_itr_type& stream_end, + std::ios_base& a_ios, + const facet_type& facet) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + day_of_week_type wd(0); // no default constructor + month_type m(1); // no default constructor + + extract_element(sitr, stream_end, first); // "first" element + facet.get(sitr, stream_end, a_ios, wd); // day_of_week + extract_element(sitr, stream_end, of); // "of" element + facet.get(sitr, stream_end, a_ios, m); // month + + + return first_kday_type(wd, m); + } + + //! returns last_kday_of_week parsed from stream + template + last_kday_type + get_last_kday_type(stream_itr_type& sitr, + stream_itr_type& stream_end, + std::ios_base& a_ios, + const facet_type& facet) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + day_of_week_type wd(0); // no default constructor + month_type m(1); // no default constructor + + extract_element(sitr, stream_end, last); // "last" element + facet.get(sitr, stream_end, a_ios, wd); // day_of_week + extract_element(sitr, stream_end, of); // "of" element + facet.get(sitr, stream_end, a_ios, m); // month + + + return last_kday_type(wd, m); + } + + //! returns first_kday_of_week parsed from stream + template + kday_before_type + get_kday_before_type(stream_itr_type& sitr, + stream_itr_type& stream_end, + std::ios_base& a_ios, + const facet_type& facet) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + day_of_week_type wd(0); // no default constructor + + facet.get(sitr, stream_end, a_ios, wd); // day_of_week + extract_element(sitr, stream_end, before);// "before" element + + return kday_before_type(wd); + } + + //! returns first_kday_of_week parsed from stream + template + kday_after_type + get_kday_after_type(stream_itr_type& sitr, + stream_itr_type& stream_end, + std::ios_base& a_ios, + const facet_type& facet) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + day_of_week_type wd(0); // no default constructor + + facet.get(sitr, stream_end, a_ios, wd); // day_of_week + extract_element(sitr, stream_end, after); // "after" element + + return kday_after_type(wd); + } + + private: + parse_tree_type m_element_strings; + + //! Extracts phrase element from input. Throws ios_base::failure on error. + void extract_element(stream_itr_type& sitr, + stream_itr_type& stream_end, + typename date_generator_parser::phrase_elements ele) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + match_results mr = m_element_strings.match(sitr, stream_end); + if(mr.current_match != ele) { + boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'")); + } + } + + }; + + template + const typename date_generator_parser::char_type + date_generator_parser::first_string[6] = + {'f','i','r','s','t'}; + template + const typename date_generator_parser::char_type + date_generator_parser::second_string[7] = + {'s','e','c','o','n','d'}; + template + const typename date_generator_parser::char_type + date_generator_parser::third_string[6] = + {'t','h','i','r','d'}; + template + const typename date_generator_parser::char_type + date_generator_parser::fourth_string[7] = + {'f','o','u','r','t','h'}; + template + const typename date_generator_parser::char_type + date_generator_parser::fifth_string[6] = + {'f','i','f','t','h'}; + template + const typename date_generator_parser::char_type + date_generator_parser::last_string[5] = + {'l','a','s','t'}; + template + const typename date_generator_parser::char_type + date_generator_parser::before_string[8] = + {'b','e','f','o','r','e'}; + template + const typename date_generator_parser::char_type + date_generator_parser::after_string[6] = + {'a','f','t','e','r'}; + template + const typename date_generator_parser::char_type + date_generator_parser::of_string[3] = + {'o','f'}; + +} } //namespace + +#endif // DATE_TIME_DATE_GENERATOR_PARSER_HPP__ + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generators.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generators.hpp new file mode 100644 index 0000000000..1f1a34a667 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_generators.hpp @@ -0,0 +1,509 @@ +#ifndef DATE_TIME_DATE_GENERATORS_HPP__ +#define DATE_TIME_DATE_GENERATORS_HPP__ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +/*! @file date_generators.hpp + Definition and implementation of date algorithm templates +*/ + +#include +#include +#include +#include +#include + +namespace boost { +namespace date_time { + + //! Base class for all generators that take a year and produce a date. + /*! This class is a base class for polymorphic function objects that take + a year and produce a concrete date. + @param date_type The type representing a date. This type must + export a calender_type which defines a year_type. + */ + template + class year_based_generator + { + public: + typedef typename date_type::calendar_type calendar_type; + typedef typename calendar_type::year_type year_type; + year_based_generator() {}; + virtual ~year_based_generator() {}; + virtual date_type get_date(year_type y) const = 0; + //! Returns a string for use in a POSIX time_zone string + virtual std::string to_string() const =0; + }; + + //! Generates a date by applying the year to the given month and day. + /*! + Example usage: + @code + partial_date pd(1, Jan); + partial_date pd2(70); + date d = pd.get_date(2002); //2002-Jan-01 + date d2 = pd2.get_date(2002); //2002-Mar-10 + @endcode + \ingroup date_alg + */ + template + class partial_date : public year_based_generator + { + public: + typedef typename date_type::calendar_type calendar_type; + typedef typename calendar_type::day_type day_type; + typedef typename calendar_type::month_type month_type; + typedef typename calendar_type::year_type year_type; + typedef typename date_type::duration_type duration_type; + typedef typename duration_type::duration_rep duration_rep; + partial_date(day_type d, month_type m) : + day_(d), + month_(m) + {} + //! Partial date created from number of days into year. Range 1-366 + /*! Allowable values range from 1 to 366. 1=Jan1, 366=Dec31. If argument + * exceeds range, partial_date will be created with closest in-range value. + * 60 will always be Feb29, if get_date() is called with a non-leap year + * an exception will be thrown */ + partial_date(duration_rep days) : + day_(1), // default values + month_(1) + { + date_type d1(2000,1,1); + if(days > 1) { + if(days > 366) // prevents wrapping + { + days = 366; + } + days = days - 1; + duration_type dd(days); + d1 = d1 + dd; + } + day_ = d1.day(); + month_ = d1.month(); + } + //! Return a concrete date when provided with a year specific year. + /*! Will throw an 'invalid_argument' exception if a partial_date object, + * instantiated with Feb-29, has get_date called with a non-leap year. + * Example: + * @code + * partial_date pd(29, Feb); + * pd.get_date(2003); // throws invalid_argument exception + * pg.get_date(2000); // returns 2000-2-29 + * @endcode + */ + date_type get_date(year_type y) const + { + if((day_ == 29) && (month_ == 2) && !(calendar_type::is_leap_year(y))) { + std::ostringstream ss; + ss << "No Feb 29th in given year of " << y << "."; + boost::throw_exception(std::invalid_argument(ss.str())); + } + return date_type(y, month_, day_); + } + date_type operator()(year_type y) const + { + return get_date(y); + //return date_type(y, month_, day_); + } + bool operator==(const partial_date& rhs) const + { + return (month_ == rhs.month_) && (day_ == rhs.day_); + } + bool operator<(const partial_date& rhs) const + { + if (month_ < rhs.month_) return true; + if (month_ > rhs.month_) return false; + //months are equal + return (day_ < rhs.day_); + } + + // added for streaming purposes + month_type month() const + { + return month_; + } + day_type day() const + { + return day_; + } + + //! Returns string suitable for use in POSIX time zone string + /*! Returns string formatted with up to 3 digits: + * Jan-01 == "0" + * Feb-29 == "58" + * Dec-31 == "365" */ + virtual std::string to_string() const + { + std::ostringstream ss; + date_type d(2004, month_, day_); + unsigned short c = d.day_of_year(); + c--; // numbered 0-365 while day_of_year is 1 based... + ss << c; + return ss.str(); + } + private: + day_type day_; + month_type month_; + }; + + + //! Returns nth arg as string. 1 -> "first", 2 -> "second", max is 5. + BOOST_DATE_TIME_DECL const char* nth_as_str(int n); + + //! Useful generator functor for finding holidays + /*! Based on the idea in Cal. Calc. for finding holidays that are + * the 'first Monday of September'. When instantiated with + * 'fifth' kday of month, the result will be the last kday of month + * which can be the fourth or fifth depending on the structure of + * the month. + * + * The algorithm here basically guesses for the first + * day of the month. Then finds the first day of the correct + * type. That is, if the first of the month is a Tuesday + * and it needs Wenesday then we simply increment by a day + * and then we can add the length of a week until we get + * to the 'nth kday'. There are probably more efficient + * algorithms based on using a mod 7, but this one works + * reasonably well for basic applications. + * \ingroup date_alg + */ + template + class nth_kday_of_month : public year_based_generator + { + public: + typedef typename date_type::calendar_type calendar_type; + typedef typename calendar_type::day_of_week_type day_of_week_type; + typedef typename calendar_type::month_type month_type; + typedef typename calendar_type::year_type year_type; + typedef typename date_type::duration_type duration_type; + enum week_num {first=1, second, third, fourth, fifth}; + nth_kday_of_month(week_num week_no, + day_of_week_type dow, + month_type m) : + month_(m), + wn_(week_no), + dow_(dow) + {} + //! Return a concrete date when provided with a year specific year. + date_type get_date(year_type y) const + { + date_type d(y, month_, 1); //first day of month + duration_type one_day(1); + duration_type one_week(7); + while (dow_ != d.day_of_week()) { + d = d + one_day; + } + int week = 1; + while (week < wn_) { + d = d + one_week; + week++; + } + // remove wrapping to next month behavior + if(d.month() != month_) { + d = d - one_week; + } + return d; + } + // added for streaming + month_type month() const + { + return month_; + } + week_num nth_week() const + { + return wn_; + } + day_of_week_type day_of_week() const + { + return dow_; + } + const char* nth_week_as_str() const + { + return nth_as_str(wn_); + } + //! Returns string suitable for use in POSIX time zone string + /*! Returns a string formatted as "M4.3.0" ==> 3rd Sunday in April. */ + virtual std::string to_string() const + { + std::ostringstream ss; + ss << 'M' + << static_cast(month_) << '.' + << static_cast(wn_) << '.' + << static_cast(dow_); + return ss.str(); + } + private: + month_type month_; + week_num wn_; + day_of_week_type dow_; + }; + + //! Useful generator functor for finding holidays and daylight savings + /*! Similar to nth_kday_of_month, but requires less paramters + * \ingroup date_alg + */ + template + class first_kday_of_month : public year_based_generator + { + public: + typedef typename date_type::calendar_type calendar_type; + typedef typename calendar_type::day_of_week_type day_of_week_type; + typedef typename calendar_type::month_type month_type; + typedef typename calendar_type::year_type year_type; + typedef typename date_type::duration_type duration_type; + //!Specify the first 'Sunday' in 'April' spec + /*!@param dow The day of week, eg: Sunday, Monday, etc + * @param m The month of the year, eg: Jan, Feb, Mar, etc + */ + first_kday_of_month(day_of_week_type dow, month_type m) : + month_(m), + dow_(dow) + {} + //! Return a concrete date when provided with a year specific year. + date_type get_date(year_type year) const + { + date_type d(year, month_,1); + duration_type one_day(1); + while (dow_ != d.day_of_week()) { + d = d + one_day; + } + return d; + } + // added for streaming + month_type month() const + { + return month_; + } + day_of_week_type day_of_week() const + { + return dow_; + } + //! Returns string suitable for use in POSIX time zone string + /*! Returns a string formatted as "M4.1.0" ==> 1st Sunday in April. */ + virtual std::string to_string() const + { + std::ostringstream ss; + ss << 'M' + << static_cast(month_) << '.' + << 1 << '.' + << static_cast(dow_); + return ss.str(); + } + private: + month_type month_; + day_of_week_type dow_; + }; + + + + //! Calculate something like Last Sunday of January + /*! Useful generator functor for finding holidays and daylight savings + * Get the last day of the month and then calculate the difference + * to the last previous day. + * @param date_type A date class that exports day_of_week, month_type, etc. + * \ingroup date_alg + */ + template + class last_kday_of_month : public year_based_generator + { + public: + typedef typename date_type::calendar_type calendar_type; + typedef typename calendar_type::day_of_week_type day_of_week_type; + typedef typename calendar_type::month_type month_type; + typedef typename calendar_type::year_type year_type; + typedef typename date_type::duration_type duration_type; + //!Specify the date spec like last 'Sunday' in 'April' spec + /*!@param dow The day of week, eg: Sunday, Monday, etc + * @param m The month of the year, eg: Jan, Feb, Mar, etc + */ + last_kday_of_month(day_of_week_type dow, month_type m) : + month_(m), + dow_(dow) + {} + //! Return a concrete date when provided with a year specific year. + date_type get_date(year_type year) const + { + date_type d(year, month_, calendar_type::end_of_month_day(year,month_)); + duration_type one_day(1); + while (dow_ != d.day_of_week()) { + d = d - one_day; + } + return d; + } + // added for streaming + month_type month() const + { + return month_; + } + day_of_week_type day_of_week() const + { + return dow_; + } + //! Returns string suitable for use in POSIX time zone string + /*! Returns a string formatted as "M4.5.0" ==> last Sunday in April. */ + virtual std::string to_string() const + { + std::ostringstream ss; + ss << 'M' + << static_cast(month_) << '.' + << 5 << '.' + << static_cast(dow_); + return ss.str(); + } + private: + month_type month_; + day_of_week_type dow_; + }; + + + //! Calculate something like "First Sunday after Jan 1,2002 + /*! Date generator that takes a date and finds kday after + *@code + typedef boost::date_time::first_kday_after firstkdayafter; + firstkdayafter fkaf(Monday); + fkaf.get_date(date(2002,Feb,1)); + @endcode + * \ingroup date_alg + */ + template + class first_kday_after + { + public: + typedef typename date_type::calendar_type calendar_type; + typedef typename calendar_type::day_of_week_type day_of_week_type; + typedef typename date_type::duration_type duration_type; + first_kday_after(day_of_week_type dow) : + dow_(dow) + {} + //! Return next kday given. + date_type get_date(date_type start_day) const + { + duration_type one_day(1); + date_type d = start_day + one_day; + while (dow_ != d.day_of_week()) { + d = d + one_day; + } + return d; + } + // added for streaming + day_of_week_type day_of_week() const + { + return dow_; + } + private: + day_of_week_type dow_; + }; + + //! Calculate something like "First Sunday before Jan 1,2002 + /*! Date generator that takes a date and finds kday after + *@code + typedef boost::date_time::first_kday_before firstkdaybefore; + firstkdaybefore fkbf(Monday); + fkbf.get_date(date(2002,Feb,1)); + @endcode + * \ingroup date_alg + */ + template + class first_kday_before + { + public: + typedef typename date_type::calendar_type calendar_type; + typedef typename calendar_type::day_of_week_type day_of_week_type; + typedef typename date_type::duration_type duration_type; + first_kday_before(day_of_week_type dow) : + dow_(dow) + {} + //! Return next kday given. + date_type get_date(date_type start_day) const + { + duration_type one_day(1); + date_type d = start_day - one_day; + while (dow_ != d.day_of_week()) { + d = d - one_day; + } + return d; + } + // added for streaming + day_of_week_type day_of_week() const + { + return dow_; + } + private: + day_of_week_type dow_; + }; + + //! Calculates the number of days until the next weekday + /*! Calculates the number of days until the next weekday. + * If the date given falls on a Sunday and the given weekday + * is Tuesday the result will be 2 days */ + template + inline + typename date_type::duration_type days_until_weekday(const date_type& d, const weekday_type& wd) + { + typedef typename date_type::duration_type duration_type; + duration_type wks(0); + duration_type dd(wd.as_number() - d.day_of_week().as_number()); + if(dd.is_negative()){ + wks = duration_type(7); + } + return dd + wks; + } + + //! Calculates the number of days since the previous weekday + /*! Calculates the number of days since the previous weekday + * If the date given falls on a Sunday and the given weekday + * is Tuesday the result will be 5 days. The answer will be a positive + * number because Tuesday is 5 days before Sunday, not -5 days before. */ + template + inline + typename date_type::duration_type days_before_weekday(const date_type& d, const weekday_type& wd) + { + typedef typename date_type::duration_type duration_type; + duration_type wks(0); + duration_type dd(wd.as_number() - d.day_of_week().as_number()); + if(dd.days() > 0){ + wks = duration_type(7); + } + // we want a number of days, not an offset. The value returned must + // be zero or larger. + return (-dd + wks); + } + + //! Generates a date object representing the date of the following weekday from the given date + /*! Generates a date object representing the date of the following + * weekday from the given date. If the date given is 2004-May-9 + * (a Sunday) and the given weekday is Tuesday then the resulting date + * will be 2004-May-11. */ + template + inline + date_type next_weekday(const date_type& d, const weekday_type& wd) + { + return d + days_until_weekday(d, wd); + } + + //! Generates a date object representing the date of the previous weekday from the given date + /*! Generates a date object representing the date of the previous + * weekday from the given date. If the date given is 2004-May-9 + * (a Sunday) and the given weekday is Tuesday then the resulting date + * will be 2004-May-4. */ + template + inline + date_type previous_weekday(const date_type& d, const weekday_type& wd) + { + return d - days_before_weekday(d, wd); + } + +} } //namespace date_time + + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_iterator.hpp new file mode 100644 index 0000000000..284dc749d0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_iterator.hpp @@ -0,0 +1,101 @@ +#ifndef DATE_ITERATOR_HPP___ +#define DATE_ITERATOR_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include + +namespace boost { +namespace date_time { + //! An iterator over dates with varying resolution (day, week, month, year, etc) + enum date_resolutions {day, week, months, year, decade, century, NumDateResolutions}; + + //! Base date iterator type + /*! This class provides the skeleton for the creation of iterators. + * New and interesting interators can be created by plugging in a new + * function that derives the next value from the current state. + * generation of various types of -based information. + * + * Template Parameters + * + * date_type + * + * The date_type is a concrete date_type. The date_type must + * define a duration_type and a calendar_type. + */ + template + class date_itr_base { + // works, but benefit unclear at the moment + // class date_itr_base : public std::iterator{ + public: + typedef typename date_type::duration_type duration_type; + typedef date_type value_type; + typedef std::input_iterator_tag iterator_category; + + date_itr_base(date_type d) : current_(d) {} + virtual ~date_itr_base() {}; + date_itr_base& operator++() + { + current_ = current_ + get_offset(current_); + return *this; + } + date_itr_base& operator--() + { + current_ = current_ + get_neg_offset(current_); + return *this; + } + virtual duration_type get_offset(const date_type& current) const=0; + virtual duration_type get_neg_offset(const date_type& current) const=0; + date_type operator*() {return current_;}; + date_type* operator->() {return ¤t_;}; + bool operator< (const date_type& d) {return current_ < d;} + bool operator<= (const date_type& d) {return current_ <= d;} + bool operator> (const date_type& d) {return current_ > d;} + bool operator>= (const date_type& d) {return current_ >= d;} + bool operator== (const date_type& d) {return current_ == d;} + bool operator!= (const date_type& d) {return current_ != d;} + private: + date_type current_; + }; + + //! Overrides the base date iterator providing hook for functors + /* + * offset_functor + * + * The offset functor must define a get_offset function that takes the + * current point in time and calculates and offset. + * + */ + template + class date_itr : public date_itr_base { + public: + typedef typename date_type::duration_type duration_type; + date_itr(date_type d, int factor=1) : + date_itr_base(d), + of_(factor) + {} + private: + virtual duration_type get_offset(const date_type& current) const + { + return of_.get_offset(current); + } + virtual duration_type get_neg_offset(const date_type& current) const + { + return of_.get_neg_offset(current); + } + offset_functor of_; + }; + + + +} } //namespace date_time + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_names_put.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_names_put.hpp new file mode 100644 index 0000000000..c6f0ce2a6f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_names_put.hpp @@ -0,0 +1,320 @@ +#ifndef DATE_TIME_DATE_NAMES_PUT_HPP___ +#define DATE_TIME_DATE_NAMES_PUT_HPP___ + +/* Copyright (c) 2002-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + +#include "boost/date_time/locale_config.hpp" // set BOOST_DATE_TIME_NO_LOCALE + +#ifndef BOOST_DATE_TIME_NO_LOCALE + +#include "boost/date_time/special_defs.hpp" +#include "boost/date_time/date_defs.hpp" +#include "boost/date_time/parse_format_base.hpp" +#include "boost/lexical_cast.hpp" +#include + + +namespace boost { +namespace date_time { + + //! Output facet base class for gregorian dates. + /*! This class is a base class for date facets used to localize the + * names of months and the names of days in the week. + * + * Requirements of Config + * - define an enumeration month_enum that enumerates the months. + * The enumeration should be '1' based eg: Jan==1 + * - define as_short_string and as_long_string + * + * (see langer & kreft p334). + * + */ + template > + class date_names_put : public std::locale::facet + { + public: + date_names_put() {}; + typedef OutputIterator iter_type; + typedef typename Config::month_type month_type; + typedef typename Config::month_enum month_enum; + typedef typename Config::weekday_enum weekday_enum; + typedef typename Config::special_value_enum special_value_enum; + //typedef typename Config::format_type format_type; + typedef std::basic_string string_type; + typedef charT char_type; + static const char_type default_special_value_names[3][17]; + static const char_type separator[2]; + + static std::locale::id id; + +#if defined (__SUNPRO_CC) && defined (_RWSTD_VER) + std::locale::id& __get_id (void) const { return id; } +#endif + + void put_special_value(iter_type& oitr, special_value_enum sv) const + { + do_put_special_value(oitr, sv); + } + void put_month_short(iter_type& oitr, month_enum moy) const + { + do_put_month_short(oitr, moy); + } + void put_month_long(iter_type& oitr, month_enum moy) const + { + do_put_month_long(oitr, moy); + } + void put_weekday_short(iter_type& oitr, weekday_enum wd) const + { + do_put_weekday_short(oitr, wd); + } + void put_weekday_long(iter_type& oitr, weekday_enum wd) const + { + do_put_weekday_long(oitr, wd); + } + bool has_date_sep_chars() const + { + return do_has_date_sep_chars(); + } + void year_sep_char(iter_type& oitr) const + { + do_year_sep_char(oitr); + } + //! char between year-month + void month_sep_char(iter_type& oitr) const + { + do_month_sep_char(oitr); + } + //! Char to separate month-day + void day_sep_char(iter_type& oitr) const + { + do_day_sep_char(oitr); + } + //! Determines the order to put the date elements + ymd_order_spec date_order() const + { + return do_date_order(); + } + //! Determines if month is displayed as integer, short or long string + month_format_spec month_format() const + { + return do_month_format(); + } + + protected: + //! Default facet implementation uses month_type defaults + virtual void do_put_month_short(iter_type& oitr, month_enum moy) const + { + month_type gm(moy); + charT c = '\0'; + put_string(oitr, gm.as_short_string(c)); + } + //! Default facet implementation uses month_type defaults + virtual void do_put_month_long(iter_type& oitr, + month_enum moy) const + { + month_type gm(moy); + charT c = '\0'; + put_string(oitr, gm.as_long_string(c)); + } + //! Default facet implementation for special value types + virtual void do_put_special_value(iter_type& oitr, special_value_enum sv) const + { + if(sv <= 2) { // only output not_a_date_time, neg_infin, or pos_infin + string_type s(default_special_value_names[sv]); + put_string(oitr, s); + } + } + virtual void do_put_weekday_short(iter_type&, weekday_enum) const + { + } + virtual void do_put_weekday_long(iter_type&, weekday_enum) const + { + } + virtual bool do_has_date_sep_chars() const + { + return true; + } + virtual void do_year_sep_char(iter_type& oitr) const + { + string_type s(separator); + put_string(oitr, s); + } + //! char between year-month + virtual void do_month_sep_char(iter_type& oitr) const + { + string_type s(separator); + put_string(oitr, s); + } + //! Char to separate month-day + virtual void do_day_sep_char(iter_type& oitr) const + { + string_type s(separator); //put in '-' + put_string(oitr, s); + } + //! Default for date order + virtual ymd_order_spec do_date_order() const + { + return ymd_order_iso; + } + //! Default month format + virtual month_format_spec do_month_format() const + { + return month_as_short_string; + } + void put_string(iter_type& oi, const charT* const s) const + { + string_type s1(boost::lexical_cast(s)); + typename string_type::iterator si,end; + for (si=s1.begin(), end=s1.end(); si!=end; si++, oi++) { + *oi = *si; + } + } + void put_string(iter_type& oi, const string_type& s1) const + { + typename string_type::const_iterator si,end; + for (si=s1.begin(), end=s1.end(); si!=end; si++, oi++) { + *oi = *si; + } + } + }; + + template + const typename date_names_put::char_type + date_names_put::default_special_value_names[3][17] = { + {'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'}, + {'-','i','n','f','i','n','i','t','y'}, + {'+','i','n','f','i','n','i','t','y'} }; + + template + const typename date_names_put::char_type + date_names_put::separator[2] = + {'-', '\0'} ; + + + //! Generate storage location for a std::locale::id + template + std::locale::id date_names_put::id; + + //! A date name output facet that takes an array of char* to define strings + template > + class all_date_names_put : public date_names_put + { + public: + all_date_names_put(const charT* const month_short_names[], + const charT* const month_long_names[], + const charT* const special_value_names[], + const charT* const weekday_short_names[], + const charT* const weekday_long_names[], + charT separator_char = '-', + ymd_order_spec order_spec = ymd_order_iso, + month_format_spec month_format = month_as_short_string) : + month_short_names_(month_short_names), + month_long_names_(month_long_names), + special_value_names_(special_value_names), + weekday_short_names_(weekday_short_names), + weekday_long_names_(weekday_long_names), + order_spec_(order_spec), + month_format_spec_(month_format) + { + separator_char_[0] = separator_char; + separator_char_[1] = '\0'; + + }; + typedef OutputIterator iter_type; + typedef typename Config::month_enum month_enum; + typedef typename Config::weekday_enum weekday_enum; + typedef typename Config::special_value_enum special_value_enum; + + const charT* const* get_short_month_names() const + { + return month_short_names_; + } + const charT* const* get_long_month_names() const + { + return month_long_names_; + } + const charT* const* get_special_value_names() const + { + return special_value_names_; + } + const charT* const* get_short_weekday_names()const + { + return weekday_short_names_; + } + const charT* const* get_long_weekday_names()const + { + return weekday_long_names_; + } + + protected: + //! Generic facet that takes array of chars + virtual void do_put_month_short(iter_type& oitr, month_enum moy) const + { + this->put_string(oitr, month_short_names_[moy-1]); + } + //! Long month names + virtual void do_put_month_long(iter_type& oitr, month_enum moy) const + { + this->put_string(oitr, month_long_names_[moy-1]); + } + //! Special values names + virtual void do_put_special_value(iter_type& oitr, special_value_enum sv) const + { + this->put_string(oitr, special_value_names_[sv]); + } + virtual void do_put_weekday_short(iter_type& oitr, weekday_enum wd) const + { + this->put_string(oitr, weekday_short_names_[wd]); + } + virtual void do_put_weekday_long(iter_type& oitr, weekday_enum wd) const + { + this->put_string(oitr, weekday_long_names_[wd]); + } + //! char between year-month + virtual void do_month_sep_char(iter_type& oitr) const + { + this->put_string(oitr, separator_char_); + } + //! Char to separate month-day + virtual void do_day_sep_char(iter_type& oitr) const + { + this->put_string(oitr, separator_char_); + } + //! Set the date ordering + virtual ymd_order_spec do_date_order() const + { + return order_spec_; + } + //! Set the date ordering + virtual month_format_spec do_month_format() const + { + return month_format_spec_; + } + + private: + const charT* const* month_short_names_; + const charT* const* month_long_names_; + const charT* const* special_value_names_; + const charT* const* weekday_short_names_; + const charT* const* weekday_long_names_; + charT separator_char_[2]; + ymd_order_spec order_spec_; + month_format_spec month_format_spec_; + }; + +} } //namespace boost::date_time + +#endif //BOOST_NO_STD_LOCALE + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_parsing.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_parsing.hpp new file mode 100644 index 0000000000..f361bc8096 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/date_parsing.hpp @@ -0,0 +1,316 @@ +#ifndef _DATE_TIME_DATE_PARSING_HPP___ +#define _DATE_TIME_DATE_PARSING_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2009-06-04 04:24:49 -0400 (Thu, 04 Jun 2009) $ + */ + +#include +#include +#include +#include +#include +#include +#include + +#if defined(BOOST_DATE_TIME_NO_LOCALE) +#include // ::tolower(int) +#else +#include // std::tolower(char, locale) +#endif + +namespace boost { +namespace date_time { + + //! A function to replace the std::transform( , , ,tolower) construct + /*! This function simply takes a string, and changes all the characters + * in that string to lowercase (according to the default system locale). + * In the event that a compiler does not support locales, the old + * C style tolower() is used. + */ + inline + std::string + convert_to_lower(std::string inp) + { +#if !defined(BOOST_DATE_TIME_NO_LOCALE) + const std::locale loc(std::locale::classic()); +#endif + std::string::size_type i = 0, n = inp.length(); + for (; i < n; ++i) { + inp[i] = +#if defined(BOOST_DATE_TIME_NO_LOCALE) + static_cast(std::tolower(inp[i])); +#else + // tolower and others were brought in to std for borland >= v564 + // in compiler_config.hpp + std::tolower(inp[i], loc); +#endif + } + return inp; + } + + //! Helper function for parse_date. + /* Used by-value parameter because we change the string and may + * want to preserve the original argument */ + template + inline unsigned short + month_str_to_ushort(std::string const& s) { + if((s.at(0) >= '0') && (s.at(0) <= '9')) { + return boost::lexical_cast(s); + } + else { + std::string str = convert_to_lower(s); + typename month_type::month_map_ptr_type ptr = month_type::get_month_map_ptr(); + typename month_type::month_map_type::iterator iter = ptr->find(str); + if(iter != ptr->end()) { // required for STLport + return iter->second; + } + } + return 13; // intentionally out of range - name not found + } + + //! Find index of a string in either of 2 arrays + /*! find_match searches both arrays for a match to 's'. Both arrays + * must contain 'size' elements. The index of the match is returned. + * If no match is found, 'size' is returned. + * Ex. "Jan" returns 0, "Dec" returns 11, "Tue" returns 2. + * 'size' can be sent in with: (greg_month::max)() (which 12), + * (greg_weekday::max)() + 1 (which is 7) or date_time::NumSpecialValues */ + template + short find_match(const charT* const* short_names, + const charT* const* long_names, + short size, + const std::basic_string& s) { + for(short i = 0; i < size; ++i){ + if(short_names[i] == s || long_names[i] == s){ + return i; + } + } + return size; // not-found, return a value out of range + } + + //! Generic function to parse a delimited date (eg: 2002-02-10) + /*! Accepted formats are: "2003-02-10" or " 2003-Feb-10" or + * "2003-Feburary-10" + * The order in which the Month, Day, & Year appear in the argument + * string can be accomodated by passing in the appropriate ymd_order_spec + */ + template + date_type + parse_date(const std::string& s, int order_spec = ymd_order_iso) { + std::string spec_str; + if(order_spec == ymd_order_iso) { + spec_str = "ymd"; + } + else if(order_spec == ymd_order_dmy) { + spec_str = "dmy"; + } + else { // (order_spec == ymd_order_us) + spec_str = "mdy"; + } + + typedef typename date_type::year_type year_type; + typedef typename date_type::month_type month_type; + unsigned pos = 0; + unsigned short year(0), month(0), day(0); + typedef typename std::basic_string::traits_type traits_type; + typedef boost::char_separator char_separator_type; + typedef boost::tokenizer::const_iterator, + std::basic_string > tokenizer; + typedef boost::tokenizer::const_iterator, + std::basic_string >::iterator tokenizer_iterator; + // may need more delimiters, these work for the regression tests + const char sep_char[] = {',','-','.',' ','/','\0'}; + char_separator_type sep(sep_char); + tokenizer tok(s,sep); + for(tokenizer_iterator beg=tok.begin(); + beg!=tok.end() && pos < spec_str.size(); + ++beg, ++pos) { + switch(spec_str.at(pos)) { + case 'y': + { + year = boost::lexical_cast(*beg); + break; + } + case 'm': + { + month = month_str_to_ushort(*beg); + break; + } + case 'd': + { + day = boost::lexical_cast(*beg); + break; + } + } //switch + } + return date_type(year, month, day); + } + + //! Generic function to parse undelimited date (eg: 20020201) + template + date_type + parse_undelimited_date(const std::string& s) { + int offsets[] = {4,2,2}; + int pos = 0; + typedef typename date_type::year_type year_type; + //typename date_type::ymd_type ymd((year_type::min)(),1,1); + unsigned short y = 0, m = 0, d = 0; + + /* The two bool arguments state that parsing will not wrap + * (only the first 8 characters will be parsed) and partial + * strings will not be parsed. + * Ex: + * "2005121" will parse 2005 & 12, but not the "1" */ + boost::offset_separator osf(offsets, offsets+3, false, false); + + typedef typename boost::tokenizer::const_iterator, + std::basic_string > tokenizer_type; + tokenizer_type tok(s, osf); + for(typename tokenizer_type::iterator ti=tok.begin(); ti!=tok.end();++ti) { + unsigned short i = boost::lexical_cast(*ti); + switch(pos) { + case 0: y = i; break; + case 1: m = i; break; + case 2: d = i; break; + } + pos++; + } + return date_type(y,m,d); + } + + //! Helper function for 'date gregorian::from_stream()' + /*! Creates a string from the iterators that reference the + * begining & end of a char[] or string. All elements are + * used in output string */ + template + inline + date_type + from_stream_type(iterator_type& beg, + iterator_type const& end, + char) + { + std::ostringstream ss; + while(beg != end) { + ss << *beg++; + } + return parse_date(ss.str()); + } + + //! Helper function for 'date gregorian::from_stream()' + /*! Returns the first string found in the stream referenced by the + * begining & end iterators */ + template + inline + date_type + from_stream_type(iterator_type& beg, + iterator_type const& /* end */, + std::string const&) + { + return parse_date(*beg); + } + + /* I believe the wchar stuff would be best elsewhere, perhaps in + * parse_date<>()? In the mean time this gets us started... */ + //! Helper function for 'date gregorian::from_stream()' + /*! Creates a string from the iterators that reference the + * begining & end of a wstring. All elements are + * used in output string */ + template + inline + date_type from_stream_type(iterator_type& beg, + iterator_type const& end, + wchar_t) + { + std::ostringstream ss; +#if !defined(BOOST_DATE_TIME_NO_LOCALE) + std::locale loc; + std::ctype const& fac = std::use_facet >(loc); + while(beg != end) { + ss << fac.narrow(*beg++, 'X'); // 'X' will cause exception to be thrown + } +#else + while(beg != end) { + char c = 'X'; // 'X' will cause exception to be thrown + const wchar_t wc = *beg++; + if (wc >= 0 && wc <= 127) + c = static_cast< char >(wc); + ss << c; + } +#endif + return parse_date(ss.str()); + } +#ifndef BOOST_NO_STD_WSTRING + //! Helper function for 'date gregorian::from_stream()' + /*! Creates a string from the first wstring found in the stream + * referenced by the begining & end iterators */ + template + inline + date_type + from_stream_type(iterator_type& beg, + iterator_type const& /* end */, + std::wstring const&) { + std::wstring ws = *beg; + std::ostringstream ss; + std::wstring::iterator wsb = ws.begin(), wse = ws.end(); +#if !defined(BOOST_DATE_TIME_NO_LOCALE) + std::locale loc; + std::ctype const& fac = std::use_facet >(loc); + while(wsb != wse) { + ss << fac.narrow(*wsb++, 'X'); // 'X' will cause exception to be thrown + } +#else + while(wsb != wse) { + char c = 'X'; // 'X' will cause exception to be thrown + const wchar_t wc = *wsb++; + if (wc >= 0 && wc <= 127) + c = static_cast< char >(wc); + ss << c; + } +#endif + return parse_date(ss.str()); + } +#endif // BOOST_NO_STD_WSTRING +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + // This function cannot be compiled with MSVC 6.0 due to internal compiler shorcomings +#else + //! function called by wrapper functions: date_period_from_(w)string() + template + period + from_simple_string_type(const std::basic_string& s){ + typedef typename std::basic_string::traits_type traits_type; + typedef typename boost::char_separator char_separator; + typedef typename boost::tokenizer::const_iterator, + std::basic_string > tokenizer; + const charT sep_list[4] = {'[','/',']','\0'}; + char_separator sep(sep_list); + tokenizer tokens(s, sep); + typename tokenizer::iterator tok_it = tokens.begin(); + std::basic_string date_string = *tok_it; + // get 2 string iterators and generate a date from them + typename std::basic_string::iterator date_string_start = date_string.begin(), + date_string_end = date_string.end(); + typedef typename std::iterator_traits::iterator>::value_type value_type; + date_type d1 = from_stream_type(date_string_start, date_string_end, value_type()); + date_string = *(++tok_it); // next token + date_string_start = date_string.begin(), date_string_end = date_string.end(); + date_type d2 = from_stream_type(date_string_start, date_string_end, value_type()); + return period(d1, d2); + } +#endif + +} } //namespace date_time + + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/dst_rules.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/dst_rules.hpp new file mode 100644 index 0000000000..20cb40b676 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/dst_rules.hpp @@ -0,0 +1,391 @@ +#ifndef DATE_TIME_DST_RULES_HPP__ +#define DATE_TIME_DST_RULES_HPP__ + +/* Copyright (c) 2002,2003, 2007 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +/*! @file dst_rules.hpp + Contains template class to provide static dst rule calculations +*/ + +#include "boost/date_time/date_generators.hpp" +#include "boost/date_time/period.hpp" +#include "boost/date_time/date_defs.hpp" +#include + +namespace boost { + namespace date_time { + + enum time_is_dst_result {is_not_in_dst, is_in_dst, + ambiguous, invalid_time_label}; + + + //! Dynamic class used to caluclate dst transition information + template + class dst_calculator + { + public: + typedef time_duration_type_ time_duration_type; + typedef date_type_ date_type; + + //! Check the local time offset when on dst start day + /*! On this dst transition, the time label between + * the transition boundary and the boudary + the offset + * are invalid times. If before the boundary then still + * not in dst. + *@param time_of_day Time offset in the day for the local time + *@param dst_start_offset_minutes Local day offset for start of dst + *@param dst_length_minutes Number of minutes to adjust clock forward + *@retval status of time label w.r.t. dst + */ + static time_is_dst_result + process_local_dst_start_day(const time_duration_type& time_of_day, + unsigned int dst_start_offset_minutes, + long dst_length_minutes) + { + //std::cout << "here" << std::endl; + if (time_of_day < time_duration_type(0,dst_start_offset_minutes,0)) { + return is_not_in_dst; + } + long offset = dst_start_offset_minutes + dst_length_minutes; + if (time_of_day >= time_duration_type(0,offset,0)) { + return is_in_dst; + } + return invalid_time_label; + } + + //! Check the local time offset when on the last day of dst + /*! This is the calculation for the DST end day. On that day times + * prior to the conversion time - dst_length (1 am in US) are still + * in dst. Times between the above and the switch time are + * ambiguous. Times after the start_offset are not in dst. + *@param time_of_day Time offset in the day for the local time + *@param dst_end_offset_minutes Local time of day for end of dst + *@retval status of time label w.r.t. dst + */ + static time_is_dst_result + process_local_dst_end_day(const time_duration_type& time_of_day, + unsigned int dst_end_offset_minutes, + long dst_length_minutes) + { + //in US this will be 60 so offset in day is 1,0,0 + int offset = dst_end_offset_minutes-dst_length_minutes; + if (time_of_day < time_duration_type(0,offset,0)) { + return is_in_dst; + } + if (time_of_day >= time_duration_type(0,dst_end_offset_minutes,0)) { + return is_not_in_dst; + } + return ambiguous; + } + + //! Calculates if the given local time is dst or not + /*! Determines if the time is really in DST or not. Also checks for + * invalid and ambiguous. + * @param current_day The day to check for dst + * @param time_of_day Time offset within the day to check + * @param dst_start_day Starting day of dst for the given locality + * @param dst_start_offset Time offset within day for dst boundary + * @param dst_end_day Ending day of dst for the given locality + * @param dst_end_offset Time offset within day given in dst for dst boundary + * @param dst_length lenght of dst adjusment + * @retval The time is either ambiguous, invalid, in dst, or not in dst + */ + static time_is_dst_result + local_is_dst(const date_type& current_day, + const time_duration_type& time_of_day, + const date_type& dst_start_day, + const time_duration_type& dst_start_offset, + const date_type& dst_end_day, + const time_duration_type& dst_end_offset, + const time_duration_type& dst_length_minutes) + { + unsigned int start_minutes = + dst_start_offset.hours() * 60 + dst_start_offset.minutes(); + unsigned int end_minutes = + dst_end_offset.hours() * 60 + dst_end_offset.minutes(); + long length_minutes = + dst_length_minutes.hours() * 60 + dst_length_minutes.minutes(); + + return local_is_dst(current_day, time_of_day, + dst_start_day, start_minutes, + dst_end_day, end_minutes, + length_minutes); + } + + //! Calculates if the given local time is dst or not + /*! Determines if the time is really in DST or not. Also checks for + * invalid and ambiguous. + * @param current_day The day to check for dst + * @param time_of_day Time offset within the day to check + * @param dst_start_day Starting day of dst for the given locality + * @param dst_start_offset_minutes Offset within day for dst + * boundary (eg 120 for US which is 02:00:00) + * @param dst_end_day Ending day of dst for the given locality + * @param dst_end_offset_minutes Offset within day given in dst for dst + * boundary (eg 120 for US which is 02:00:00) + * @param dst_length_minutes Length of dst adjusment (eg: 60 for US) + * @retval The time is either ambiguous, invalid, in dst, or not in dst + */ + static time_is_dst_result + local_is_dst(const date_type& current_day, + const time_duration_type& time_of_day, + const date_type& dst_start_day, + unsigned int dst_start_offset_minutes, + const date_type& dst_end_day, + unsigned int dst_end_offset_minutes, + long dst_length_minutes) + { + //in northern hemisphere dst is in the middle of the year + if (dst_start_day < dst_end_day) { + if ((current_day > dst_start_day) && (current_day < dst_end_day)) { + return is_in_dst; + } + if ((current_day < dst_start_day) || (current_day > dst_end_day)) { + return is_not_in_dst; + } + } + else {//southern hemisphere dst is at begining /end of year + if ((current_day < dst_start_day) && (current_day > dst_end_day)) { + return is_not_in_dst; + } + if ((current_day > dst_start_day) || (current_day < dst_end_day)) { + return is_in_dst; + } + } + + if (current_day == dst_start_day) { + return process_local_dst_start_day(time_of_day, + dst_start_offset_minutes, + dst_length_minutes); + } + + if (current_day == dst_end_day) { + return process_local_dst_end_day(time_of_day, + dst_end_offset_minutes, + dst_length_minutes); + } + //you should never reach this statement + return invalid_time_label; + } + + }; + + + //! Compile-time configurable daylight savings time calculation engine + /* This template provides the ability to configure a daylight savings + * calculation at compile time covering all the cases. Unfortunately + * because of the number of dimensions related to daylight savings + * calculation the number of parameters is high. In addition, the + * start and end transition rules are complex types that specify + * an algorithm for calculation of the starting day and ending + * day of daylight savings time including the month and day + * specifications (eg: last sunday in October). + * + * @param date_type A type that represents dates, typically gregorian::date + * @param time_duration_type Used for the offset in the day calculations + * @param dst_traits A set of traits that define the rules of dst + * calculation. The dst_trait must include the following: + * start_rule_functor - Rule to calculate the starting date of a + * dst transition (eg: last_kday_of_month). + * start_day - static function that returns month of dst start for + * start_rule_functor + * start_month -static function that returns day or day of week for + * dst start of dst + * end_rule_functor - Rule to calculate the end of dst day. + * end_day - static fucntion that returns end day for end_rule_functor + * end_month - static function that returns end month for end_rule_functor + * dst_start_offset_minutes - number of minutes from start of day to transition to dst -- 120 (or 2:00 am) is typical for the U.S. and E.U. + * dst_start_offset_minutes - number of minutes from start of day to transition off of dst -- 180 (or 3:00 am) is typical for E.U. + * dst_length_minutes - number of minutes that dst shifts clock + */ + template + class dst_calc_engine + { + public: + typedef typename date_type::year_type year_type; + typedef typename date_type::calendar_type calendar_type; + typedef dst_calculator dstcalc; + + //! Calculates if the given local time is dst or not + /*! Determines if the time is really in DST or not. Also checks for + * invalid and ambiguous. + * @retval The time is either ambiguous, invalid, in dst, or not in dst + */ + static time_is_dst_result local_is_dst(const date_type& d, + const time_duration_type& td) + { + + year_type y = d.year(); + date_type dst_start = local_dst_start_day(y); + date_type dst_end = local_dst_end_day(y); + return dstcalc::local_is_dst(d,td, + dst_start, + dst_traits::dst_start_offset_minutes(), + dst_end, + dst_traits::dst_end_offset_minutes(), + dst_traits::dst_shift_length_minutes()); + + } + + static bool is_dst_boundary_day(date_type d) + { + year_type y = d.year(); + return ((d == local_dst_start_day(y)) || + (d == local_dst_end_day(y))); + } + + //! The time of day for the dst transition (eg: typically 01:00:00 or 02:00:00) + static time_duration_type dst_offset() + { + return time_duration_type(0,dst_traits::dst_shift_length_minutes(),0); + } + + static date_type local_dst_start_day(year_type year) + { + return dst_traits::local_dst_start_day(year); + } + + static date_type local_dst_end_day(year_type year) + { + return dst_traits::local_dst_end_day(year); + } + + + }; + + //! Depricated: Class to calculate dst boundaries for US time zones + /* Use dst_calc_engine instead. + * In 2007 US/Canada DST rules changed + * (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_saving_time). + */ + template //1 hour == 60 min in US + class us_dst_rules + { + public: + typedef time_duration_type_ time_duration_type; + typedef date_type_ date_type; + typedef typename date_type::year_type year_type; + typedef typename date_type::calendar_type calendar_type; + typedef date_time::last_kday_of_month lkday; + typedef date_time::first_kday_of_month fkday; + typedef date_time::nth_kday_of_month nkday; + typedef dst_calculator dstcalc; + + //! Calculates if the given local time is dst or not + /*! Determines if the time is really in DST or not. Also checks for + * invalid and ambiguous. + * @retval The time is either ambiguous, invalid, in dst, or not in dst + */ + static time_is_dst_result local_is_dst(const date_type& d, + const time_duration_type& td) + { + + year_type y = d.year(); + date_type dst_start = local_dst_start_day(y); + date_type dst_end = local_dst_end_day(y); + return dstcalc::local_is_dst(d,td, + dst_start,dst_start_offset_minutes, + dst_end, dst_start_offset_minutes, + dst_length_minutes); + + } + + + static bool is_dst_boundary_day(date_type d) + { + year_type y = d.year(); + return ((d == local_dst_start_day(y)) || + (d == local_dst_end_day(y))); + } + + static date_type local_dst_start_day(year_type year) + { + if (year >= year_type(2007)) { + //second sunday in march + nkday ssim(nkday::second, Sunday, gregorian::Mar); + return ssim.get_date(year); + } else { + //first sunday in april + fkday fsia(Sunday, gregorian::Apr); + return fsia.get_date(year); + } + } + + static date_type local_dst_end_day(year_type year) + { + if (year >= year_type(2007)) { + //first sunday in november + fkday fsin(Sunday, gregorian::Nov); + return fsin.get_date(year); + } else { + //last sunday in october + lkday lsio(Sunday, gregorian::Oct); + return lsio.get_date(year); + } + } + + static time_duration_type dst_offset() + { + return time_duration_type(0,dst_length_minutes,0); + } + + private: + + + }; + + //! Used for local time adjustments in places that don't use dst + template + class null_dst_rules + { + public: + typedef time_duration_type_ time_duration_type; + typedef date_type_ date_type; + + + //! Calculates if the given local time is dst or not + /*! @retval Always is_not_in_dst since this is for zones without dst + */ + static time_is_dst_result local_is_dst(const date_type&, + const time_duration_type&) + { + return is_not_in_dst; + } + + //! Calculates if the given utc time is in dst + static time_is_dst_result utc_is_dst(const date_type&, + const time_duration_type&) + { + return is_not_in_dst; + } + + static bool is_dst_boundary_day(date_type d) + { + return false; + } + + static time_duration_type dst_offset() + { + return time_duration_type(0,0,0); + } + + }; + + + } } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/dst_transition_generators.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/dst_transition_generators.hpp new file mode 100644 index 0000000000..6c4da1c3c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/dst_transition_generators.hpp @@ -0,0 +1,75 @@ +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + */ +#ifndef DATE_TIME_DATE_DST_TRANSITION_DAY_GEN_HPP__ +#define DATE_TIME_DATE_DST_TRANSITION_DAY_GEN_HPP__ + + + +namespace boost { +namespace date_time { + + //! Defines base interface for calculating start and end date of daylight savings + template + class dst_day_calc_rule + { + public: + typedef typename date_type::year_type year_type; + virtual ~dst_day_calc_rule() {}; + virtual date_type start_day(year_type y) const=0; + virtual std::string start_rule_as_string() const=0; + virtual date_type end_day(year_type y) const=0; + virtual std::string end_rule_as_string() const=0; + + }; + + //! Canonical form for a class that provides day rule calculation + /*! This class is used to generate specific sets of dst rules + * + *@param spec Provides a specifiction of the function object types used + * to generate start and end days of daylight savings as well + * as the date type. + */ + template + class day_calc_dst_rule : public dst_day_calc_rule + { + public: + typedef typename spec::date_type date_type; + typedef typename date_type::year_type year_type; + typedef typename spec::start_rule start_rule; + typedef typename spec::end_rule end_rule; + day_calc_dst_rule(start_rule dst_start, + end_rule dst_end) : + dst_start_(dst_start), + dst_end_(dst_end) + {} + virtual date_type start_day(year_type y) const + { + return dst_start_.get_date(y); + } + virtual std::string start_rule_as_string() const + { + return dst_start_.to_string(); + } + virtual date_type end_day(year_type y) const + { + return dst_end_.get_date(y); + } + virtual std::string end_rule_as_string() const + { + return dst_end_.to_string(); + } + private: + start_rule dst_start_; + end_rule dst_end_; + }; + + +} }//namespace + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/filetime_functions.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/filetime_functions.hpp new file mode 100644 index 0000000000..27ed754f74 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/filetime_functions.hpp @@ -0,0 +1,170 @@ +#ifndef DATE_TIME_FILETIME_FUNCTIONS_HPP__ +#define DATE_TIME_FILETIME_FUNCTIONS_HPP__ + +/* Copyright (c) 2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2009-06-06 07:24:09 -0400 (Sat, 06 Jun 2009) $ + */ + +/*! @file filetime_functions.hpp + * Function(s) for converting between a FILETIME structure and a + * time object. This file is only available on systems that have + * BOOST_HAS_FTIME defined. + */ + +#include + +#if defined(BOOST_HAS_FTIME) // skip this file if no FILETIME + +#if defined(BOOST_USE_WINDOWS_H) +# include +#endif + +#include +#include +#include + +namespace boost { + +namespace date_time { + +namespace winapi { + +#if !defined(BOOST_USE_WINDOWS_H) + + extern "C" { + + struct FILETIME + { + boost::uint32_t dwLowDateTime; + boost::uint32_t dwHighDateTime; + }; + struct SYSTEMTIME + { + boost::uint16_t wYear; + boost::uint16_t wMonth; + boost::uint16_t wDayOfWeek; + boost::uint16_t wDay; + boost::uint16_t wHour; + boost::uint16_t wMinute; + boost::uint16_t wSecond; + boost::uint16_t wMilliseconds; + }; + + __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(FILETIME* lpFileTime); + __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const FILETIME* lpFileTime, FILETIME* lpLocalFileTime); + __declspec(dllimport) void __stdcall GetSystemTime(SYSTEMTIME* lpSystemTime); + __declspec(dllimport) int __stdcall SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, FILETIME* lpFileTime); + + } // extern "C" + +#endif // defined(BOOST_USE_WINDOWS_H) + + typedef FILETIME file_time; + typedef SYSTEMTIME system_time; + + inline void get_system_time_as_file_time(file_time& ft) + { +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) + // Some runtime library implementations expect local times as the norm for ctime. + file_time ft_utc; + GetSystemTimeAsFileTime(&ft_utc); + FileTimeToLocalFileTime(&ft_utc, &ft); +#elif defined(BOOST_NO_GETSYSTEMTIMEASFILETIME) + system_time st; + GetSystemTime(&st); + SystemTimeToFileTime(&st, &ft); +#else + GetSystemTimeAsFileTime(&ft); +#endif + } + + /*! + * The function converts file_time into number of microseconds elapsed since 1970-Jan-01 + * + * \note Only dates after 1970-Jan-01 are supported. Dates before will be wrapped. + * + * \note The function is templated on the FILETIME type, so that + * it can be used with both native FILETIME and the ad-hoc + * boost::date_time::winapi::file_time type. + */ + template< typename FileTimeT > + inline boost::uint64_t file_time_to_microseconds(FileTimeT const& ft) + { + /* shift is difference between 1970-Jan-01 & 1601-Jan-01 + * in 100-nanosecond intervals */ + const uint64_t shift = 116444736000000000ULL; // (27111902 << 32) + 3577643008 + + union { + FileTimeT as_file_time; + uint64_t as_integer; // 100-nanos since 1601-Jan-01 + } caster; + caster.as_file_time = ft; + + caster.as_integer -= shift; // filetime is now 100-nanos since 1970-Jan-01 + return (caster.as_integer / 10); // truncate to microseconds + } + +} // namespace winapi + +//! Create a time object from an initialized FILETIME struct. +/*! + * Create a time object from an initialized FILETIME struct. + * A FILETIME struct holds 100-nanosecond units (0.0000001). When + * built with microsecond resolution the file_time's sub second value + * will be truncated. Nanosecond resolution has no truncation. + * + * \note The function is templated on the FILETIME type, so that + * it can be used with both native FILETIME and the ad-hoc + * boost::date_time::winapi::file_time type. + */ +template< typename TimeT, typename FileTimeT > +inline +TimeT time_from_ftime(const FileTimeT& ft) +{ + typedef typename TimeT::date_type date_type; + typedef typename TimeT::date_duration_type date_duration_type; + typedef typename TimeT::time_duration_type time_duration_type; + + // https://svn.boost.org/trac/boost/ticket/2523 + // Since this function can be called with arbitrary times, including ones that + // are before 1970-Jan-01, we'll have to cast the time a bit differently, + // than it is done in the file_time_to_microseconds function. This allows to + // avoid integer wrapping for dates before 1970-Jan-01. + union { + FileTimeT as_file_time; + uint64_t as_integer; // 100-nanos since 1601-Jan-01 + } caster; + caster.as_file_time = ft; + + uint64_t sec = caster.as_integer / 10000000UL; + uint32_t sub_sec = (caster.as_integer % 10000000UL) // 100-nanoseconds since the last second +#if !defined(BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG) + / 10; // microseconds since the last second +#else + * 100; // nanoseconds since the last second +#endif + + // split sec into usable chunks: days, hours, minutes, & seconds + const uint32_t sec_per_day = 86400; // seconds per day + uint32_t days = static_cast< uint32_t >(sec / sec_per_day); + uint32_t tmp = static_cast< uint32_t >(sec % sec_per_day); + uint32_t hours = tmp / 3600; // sec_per_hour + tmp %= 3600; + uint32_t minutes = tmp / 60; // sec_per_min + tmp %= 60; + uint32_t seconds = tmp; // seconds + + date_duration_type dd(days); + date_type d = date_type(1601, Jan, 01) + dd; + return TimeT(d, time_duration_type(hours, minutes, seconds, sub_sec)); +} + +}} // boost::date_time + +#endif // BOOST_HAS_FTIME + +#endif // DATE_TIME_FILETIME_FUNCTIONS_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/format_date_parser.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/format_date_parser.hpp new file mode 100644 index 0000000000..a4a4d0dfbe --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/format_date_parser.hpp @@ -0,0 +1,743 @@ + +#ifndef DATE_TIME_FORMAT_DATE_PARSER_HPP__ +#define DATE_TIME_FORMAT_DATE_PARSER_HPP__ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2009-06-04 04:24:49 -0400 (Thu, 04 Jun 2009) $ + */ + + +#include "boost/lexical_cast.hpp" +#include "boost/date_time/string_parse_tree.hpp" +#include "boost/date_time/strings_from_facet.hpp" +#include "boost/date_time/special_values_parser.hpp" +#include +#include +#include +#include +#ifndef BOOST_NO_STDC_NAMESPACE +# include +#else +# include +#endif + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { + using ::isspace; + using ::isdigit; +} +#endif +namespace boost { namespace date_time { + +//! Helper function for parsing fixed length strings into integers +/*! Will consume 'length' number of characters from stream. Consumed + * character are transfered to parse_match_result struct. + * Returns '-1' if no number can be parsed or incorrect number of + * digits in stream. */ +template +inline +int_type +fixed_string_to_int(std::istreambuf_iterator& itr, + std::istreambuf_iterator& stream_end, + parse_match_result& mr, + unsigned int length, + const charT& fill_char) +{ + //typedef std::basic_string string_type; + unsigned int j = 0; + //string_type s; + while (j < length && itr != stream_end && + (std::isdigit(*itr) || *itr == fill_char)) { + if(*itr == fill_char) { + /* Since a fill_char can be anything, we convert it to a zero. + * lexical_cast will behave predictably when zero is used as fill. */ + mr.cache += ('0'); + } + else { + mr.cache += (*itr); + } + itr++; + j++; + } + int_type i = -1; + // mr.cache will hold leading zeros. size() tells us when input is too short. + if(mr.cache.size() < length) { + return i; + } + try { + i = boost::lexical_cast(mr.cache); + }catch(bad_lexical_cast&){ + // we want to return -1 if the cast fails so nothing to do here + } + return i; +} + +//! Helper function for parsing fixed length strings into integers +/*! Will consume 'length' number of characters from stream. Consumed + * character are transfered to parse_match_result struct. + * Returns '-1' if no number can be parsed or incorrect number of + * digits in stream. */ +template +inline +int_type +fixed_string_to_int(std::istreambuf_iterator& itr, + std::istreambuf_iterator& stream_end, + parse_match_result& mr, + unsigned int length) +{ + return fixed_string_to_int(itr, stream_end, mr, length, '0'); +} + +//! Helper function for parsing varied length strings into integers +/*! Will consume 'max_length' characters from stream only if those + * characters are digits. Returns '-1' if no number can be parsed. + * Will not parse a number preceeded by a '+' or '-'. */ +template +inline +int_type +var_string_to_int(std::istreambuf_iterator& itr, + const std::istreambuf_iterator& stream_end, + unsigned int max_length) +{ + typedef std::basic_string string_type; + unsigned int j = 0; + string_type s; + while (itr != stream_end && (j < max_length) && std::isdigit(*itr)) { + s += (*itr); + ++itr; + ++j; + } + int_type i = -1; + if(!s.empty()) { + i = boost::lexical_cast(s); + } + return i; +} + + +//! Class with generic date parsing using a format string +/*! The following is the set of recognized format specifiers + - %a - Short weekday name + - %A - Long weekday name + - %b - Abbreviated month name + - %B - Full month name + - %d - Day of the month as decimal 01 to 31 + - %j - Day of year as decimal from 001 to 366 + - %m - Month name as a decimal 01 to 12 + - %U - Week number 00 to 53 with first Sunday as the first day of week 1? + - %w - Weekday as decimal number 0 to 6 where Sunday == 0 + - %W - Week number 00 to 53 where Monday is first day of week 1 + - %x - facet default date representation + - %y - Year without the century - eg: 04 for 2004 + - %Y - Year with century + + The weekday specifiers (%a and %A) do not add to the date construction, + but they provide a way to skip over the weekday names for formats that + provide them. + + todo -- Another interesting feature that this approach could provide is + an option to fill in any missing fields with the current values + from the clock. So if you have %m-%d the parser would detect + the missing year value and fill it in using the clock. + + todo -- What to do with the %x. %x in the classic facet is just bad... + + */ +template +class format_date_parser +{ + public: + typedef std::basic_string string_type; + typedef std::basic_istringstream stringstream_type; + typedef std::istreambuf_iterator stream_itr_type; + typedef typename string_type::const_iterator const_itr; + typedef typename date_type::year_type year_type; + typedef typename date_type::month_type month_type; + typedef typename date_type::day_type day_type; + typedef typename date_type::duration_type duration_type; + typedef typename date_type::day_of_week_type day_of_week_type; + typedef typename date_type::day_of_year_type day_of_year_type; + typedef string_parse_tree parse_tree_type; + typedef typename parse_tree_type::parse_match_result_type match_results; + typedef std::vector > input_collection_type; + + // TODO sv_parser uses its default constructor - write the others + + format_date_parser(const string_type& format_str, + const input_collection_type& month_short_names, + const input_collection_type& month_long_names, + const input_collection_type& weekday_short_names, + const input_collection_type& weekday_long_names) : + m_format(format_str), + m_month_short_names(month_short_names, 1), + m_month_long_names(month_long_names, 1), + m_weekday_short_names(weekday_short_names), + m_weekday_long_names(weekday_long_names) + {} + + format_date_parser(const string_type& format_str, + const std::locale& locale) : + m_format(format_str), + m_month_short_names(gather_month_strings(locale), 1), + m_month_long_names(gather_month_strings(locale, false), 1), + m_weekday_short_names(gather_weekday_strings(locale)), + m_weekday_long_names(gather_weekday_strings(locale, false)) + {} + + format_date_parser(const format_date_parser& fdp) + { + this->m_format = fdp.m_format; + this->m_month_short_names = fdp.m_month_short_names; + this->m_month_long_names = fdp.m_month_long_names; + this->m_weekday_short_names = fdp.m_weekday_short_names; + this->m_weekday_long_names = fdp.m_weekday_long_names; + } + + string_type format() const + { + return m_format; + } + + void format(string_type format_str) + { + m_format = format_str; + } + + void short_month_names(const input_collection_type& month_names) + { + m_month_short_names = parse_tree_type(month_names, 1); + } + void long_month_names(const input_collection_type& month_names) + { + m_month_long_names = parse_tree_type(month_names, 1); + } + void short_weekday_names(const input_collection_type& weekday_names) + { + m_weekday_short_names = parse_tree_type(weekday_names); + } + void long_weekday_names(const input_collection_type& weekday_names) + { + m_weekday_long_names = parse_tree_type(weekday_names); + } + + date_type + parse_date(const string_type& value, + const string_type& format_str, + const special_values_parser& sv_parser) const + { + stringstream_type ss(value); + stream_itr_type sitr(ss); + stream_itr_type stream_end; + return parse_date(sitr, stream_end, format_str, sv_parser); + } + + date_type + parse_date(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + const special_values_parser& sv_parser) const + { + return parse_date(sitr, stream_end, m_format, sv_parser); + } + + /*! Of all the objects that the format_date_parser can parse, only a + * date can be a special value. Therefore, only parse_date checks + * for special_values. */ + date_type + parse_date(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + string_type format_str, + const special_values_parser& sv_parser) const + { + bool use_current_char = false; + + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + charT current_char = *sitr; + + short year(0), month(0), day(0), day_of_year(0);// wkday(0); + /* Initialized the following to their minimum values. These intermediate + * objects are used so we get specific exceptions when part of the input + * is unparsable. + * Ex: "205-Jan-15" will throw a bad_year, "2005-Jsn-15"- bad_month, etc.*/ + year_type t_year(1400); + month_type t_month(1); + day_type t_day(1); + day_of_week_type wkday(0); + + + const_itr itr(format_str.begin()); + while (itr != format_str.end() && (sitr != stream_end)) { + if (*itr == '%') { + itr++; + if (*itr != '%') { + switch(*itr) { + case 'a': + { + //this value is just throw away. It could be used for + //error checking potentially, but it isn't helpful in + //actually constructing the date - we just need to get it + //out of the stream + match_results mr = m_weekday_short_names.match(sitr, stream_end); + if(mr.current_match == match_results::PARSE_ERROR) { + // check special_values + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + wkday = mr.current_match; + if (mr.has_remaining()) { + current_char = mr.last_char(); + use_current_char = true; + } + break; + } + case 'A': + { + //this value is just throw away. It could be used for + //error checking potentially, but it isn't helpful in + //actually constructing the date - we just need to get it + //out of the stream + match_results mr = m_weekday_long_names.match(sitr, stream_end); + if(mr.current_match == match_results::PARSE_ERROR) { + // check special_values + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + wkday = mr.current_match; + if (mr.has_remaining()) { + current_char = mr.last_char(); + use_current_char = true; + } + break; + } + case 'b': + { + match_results mr = m_month_short_names.match(sitr, stream_end); + if(mr.current_match == match_results::PARSE_ERROR) { + // check special_values + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + t_month = month_type(mr.current_match); + if (mr.has_remaining()) { + current_char = mr.last_char(); + use_current_char = true; + } + break; + } + case 'B': + { + match_results mr = m_month_long_names.match(sitr, stream_end); + if(mr.current_match == match_results::PARSE_ERROR) { + // check special_values + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + t_month = month_type(mr.current_match); + if (mr.has_remaining()) { + current_char = mr.last_char(); + use_current_char = true; + } + break; + } + case 'd': + { + match_results mr; + day = fixed_string_to_int(sitr, stream_end, mr, 2); + if(day == -1) { + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + t_day = day_type(day); + break; + } + case 'e': + { + match_results mr; + day = fixed_string_to_int(sitr, stream_end, mr, 2, ' '); + if(day == -1) { + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + t_day = day_type(day); + break; + } + case 'j': + { + match_results mr; + day_of_year = fixed_string_to_int(sitr, stream_end, mr, 3); + if(day_of_year == -1) { + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + // these next two lines are so we get an exception with bad input + day_of_year_type t_day_of_year(1); + t_day_of_year = day_of_year_type(day_of_year); + break; + } + case 'm': + { + match_results mr; + month = fixed_string_to_int(sitr, stream_end, mr, 2); + if(month == -1) { + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + t_month = month_type(month); + break; + } + case 'Y': + { + match_results mr; + year = fixed_string_to_int(sitr, stream_end, mr, 4); + if(year == -1) { + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + t_year = year_type(year); + break; + } + case 'y': + { + match_results mr; + year = fixed_string_to_int(sitr, stream_end, mr, 2); + if(year == -1) { + if(sv_parser.match(sitr, stream_end, mr)) { + return date_type(static_cast(mr.current_match)); + } + } + year += 2000; //make 2 digit years in this century + t_year = year_type(year); + break; + } + default: + {} //ignore those we don't understand + + }//switch + + } + else { // itr == '%', second consecutive + sitr++; + } + + itr++; //advance past format specifier + } + else { //skip past chars in format and in buffer + itr++; + if (use_current_char) { + use_current_char = false; + current_char = *sitr; + } + else { + sitr++; + } + } + } + + if (day_of_year > 0) { + date_type d(static_cast(year-1),12,31); //end of prior year + return d + duration_type(day_of_year); + } + + return date_type(t_year, t_month, t_day); // exceptions were thrown earlier + // if input was no good + } + + //! Throws bad_month if unable to parse + month_type + parse_month(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + string_type format_str) const + { + match_results mr; + return parse_month(sitr, stream_end, format_str, mr); + } + + //! Throws bad_month if unable to parse + month_type + parse_month(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + string_type format_str, + match_results& mr) const + { + bool use_current_char = false; + + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + charT current_char = *sitr; + + short month(0); + + const_itr itr(format_str.begin()); + while (itr != format_str.end() && (sitr != stream_end)) { + if (*itr == '%') { + itr++; + if (*itr != '%') { + switch(*itr) { + case 'b': + { + mr = m_month_short_names.match(sitr, stream_end); + month = mr.current_match; + if (mr.has_remaining()) { + current_char = mr.last_char(); + use_current_char = true; + } + break; + } + case 'B': + { + mr = m_month_long_names.match(sitr, stream_end); + month = mr.current_match; + if (mr.has_remaining()) { + current_char = mr.last_char(); + use_current_char = true; + } + break; + } + case 'm': + { + month = var_string_to_int(sitr, stream_end, 2); + // var_string_to_int returns -1 if parse failed. That will + // cause a bad_month exception to be thrown so we do nothing here + break; + } + default: + {} //ignore those we don't understand + + }//switch + + } + else { // itr == '%', second consecutive + sitr++; + } + + itr++; //advance past format specifier + } + else { //skip past chars in format and in buffer + itr++; + if (use_current_char) { + use_current_char = false; + current_char = *sitr; + } + else { + sitr++; + } + } + } + + return month_type(month); // throws bad_month exception when values are zero + } + + //! Expects 1 or 2 digits 1-31. Throws bad_day_of_month if unable to parse + day_type + parse_var_day_of_month(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + return day_type(var_string_to_int(sitr, stream_end, 2)); + } + //! Expects 2 digits 01-31. Throws bad_day_of_month if unable to parse + day_type + parse_day_of_month(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + //return day_type(var_string_to_int(sitr, stream_end, 2)); + match_results mr; + return day_type(fixed_string_to_int(sitr, stream_end, mr, 2)); + } + + day_of_week_type + parse_weekday(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + string_type format_str) const + { + match_results mr; + return parse_weekday(sitr, stream_end, format_str, mr); + } + day_of_week_type + parse_weekday(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + string_type format_str, + match_results& mr) const + { + bool use_current_char = false; + + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + charT current_char = *sitr; + + short wkday(0); + + const_itr itr(format_str.begin()); + while (itr != format_str.end() && (sitr != stream_end)) { + if (*itr == '%') { + itr++; + if (*itr != '%') { + switch(*itr) { + case 'a': + { + //this value is just throw away. It could be used for + //error checking potentially, but it isn't helpful in + //actually constructing the date - we just need to get it + //out of the stream + mr = m_weekday_short_names.match(sitr, stream_end); + wkday = mr.current_match; + if (mr.has_remaining()) { + current_char = mr.last_char(); + use_current_char = true; + } + break; + } + case 'A': + { + //this value is just throw away. It could be used for + //error checking potentially, but it isn't helpful in + //actually constructing the date - we just need to get it + //out of the stream + mr = m_weekday_long_names.match(sitr, stream_end); + wkday = mr.current_match; + if (mr.has_remaining()) { + current_char = mr.last_char(); + use_current_char = true; + } + break; + } + case 'w': + { + // weekday as number 0-6, Sunday == 0 + wkday = var_string_to_int(sitr, stream_end, 2); + break; + } + default: + {} //ignore those we don't understand + + }//switch + + } + else { // itr == '%', second consecutive + sitr++; + } + + itr++; //advance past format specifier + } + else { //skip past chars in format and in buffer + itr++; + if (use_current_char) { + use_current_char = false; + current_char = *sitr; + } + else { + sitr++; + } + } + } + + return day_of_week_type(wkday); // throws bad_day_of_month exception + // when values are zero + } + + //! throws bad_year if unable to parse + year_type + parse_year(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + string_type format_str) const + { + match_results mr; + return parse_year(sitr, stream_end, format_str, mr); + } + + //! throws bad_year if unable to parse + year_type + parse_year(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + string_type format_str, + match_results& mr) const + { + bool use_current_char = false; + + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + charT current_char = *sitr; + + unsigned short year(0); + + const_itr itr(format_str.begin()); + while (itr != format_str.end() && (sitr != stream_end)) { + if (*itr == '%') { + itr++; + if (*itr != '%') { + //match_results mr; + switch(*itr) { + case 'Y': + { + // year from 4 digit string + year = fixed_string_to_int(sitr, stream_end, mr, 4); + break; + } + case 'y': + { + // year from 2 digit string (no century) + year = fixed_string_to_int(sitr, stream_end, mr, 2); + year += 2000; //make 2 digit years in this century + break; + } + default: + {} //ignore those we don't understand + + }//switch + + } + else { // itr == '%', second consecutive + sitr++; + } + + itr++; //advance past format specifier + } + else { //skip past chars in format and in buffer + itr++; + if (use_current_char) { + use_current_char = false; + current_char = *sitr; + } + else { + sitr++; + } + } + } + + return year_type(year); // throws bad_year exception when values are zero + } + + + private: + string_type m_format; + parse_tree_type m_month_short_names; + parse_tree_type m_month_long_names; + parse_tree_type m_weekday_short_names; + parse_tree_type m_weekday_long_names; + +}; + +} } //namespace + +#endif + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/conversion.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/conversion.hpp new file mode 100644 index 0000000000..c505bddf51 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/conversion.hpp @@ -0,0 +1,68 @@ +#ifndef _GREGORIAN__CONVERSION_HPP___ +#define _GREGORIAN__CONVERSION_HPP___ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-06-09 14:10:13 -0400 (Wed, 09 Jun 2010) $ + */ + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace gregorian { + + //! Converts a date to a tm struct. Throws out_of_range exception if date is a special value + inline + std::tm to_tm(const date& d) + { + if (d.is_special()) + { + std::string s = "tm unable to handle "; + switch (d.as_special()) + { + case date_time::not_a_date_time: + s += "not-a-date-time value"; break; + case date_time::neg_infin: + s += "-infinity date value"; break; + case date_time::pos_infin: + s += "+infinity date value"; break; + default: + s += "a special date value"; break; + } + boost::throw_exception(std::out_of_range(s)); + } + + std::tm datetm; + std::memset(&datetm, 0, sizeof(datetm)); + boost::gregorian::date::ymd_type ymd = d.year_month_day(); + datetm.tm_year = ymd.year - 1900; + datetm.tm_mon = ymd.month - 1; + datetm.tm_mday = ymd.day; + datetm.tm_wday = d.day_of_week(); + datetm.tm_yday = d.day_of_year() - 1; + datetm.tm_isdst = -1; // negative because not enough info to set tm_isdst + return datetm; + } + + //! Converts a tm structure into a date dropping the any time values. + inline + date date_from_tm(const std::tm& datetm) + { + return date(static_cast(datetm.tm_year+1900), + static_cast(datetm.tm_mon+1), + static_cast(datetm.tm_mday)); + } + +} } //namespace boost::gregorian + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/formatters.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/formatters.hpp new file mode 100644 index 0000000000..786e79f2c1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/formatters.hpp @@ -0,0 +1,162 @@ +#ifndef GREGORIAN_FORMATTERS_HPP___ +#define GREGORIAN_FORMATTERS_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/compiler_config.hpp" +#include "boost/date_time/gregorian/gregorian_types.hpp" +#if defined(BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS) +#include "boost/date_time/date_formatting_limited.hpp" +#else +#include "boost/date_time/date_formatting.hpp" +#endif +#include "boost/date_time/iso_format.hpp" +#include "boost/date_time/date_format_simple.hpp" + +/* NOTE: "to_*_string" code for older compilers, ones that define + * BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in + * formatters_limited.hpp + */ + +namespace boost { +namespace gregorian { + + // wrapper function for to_simple_(w)string(date) + template + inline + std::basic_string to_simple_string_type(const date& d) { + return date_time::date_formatter,charT>::date_to_string(d); + } + //! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01 + /*!\ingroup date_format + */ + inline std::string to_simple_string(const date& d) { + return to_simple_string_type(d); + } + + + // wrapper function for to_simple_(w)string(date_period) + template + inline std::basic_string to_simple_string_type(const date_period& d) { + typedef std::basic_string string_type; + charT b = '[', m = '/', e=']'; + + string_type d1(date_time::date_formatter,charT>::date_to_string(d.begin())); + string_type d2(date_time::date_formatter,charT>::date_to_string(d.last())); + return string_type(b + d1 + m + d2 + e); + } + //! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02] + /*!\ingroup date_format + */ + inline std::string to_simple_string(const date_period& d) { + return to_simple_string_type(d); + } + + // wrapper function for to_iso_(w)string(date_period) + template + inline std::basic_string to_iso_string_type(const date_period& d) { + charT sep = '/'; + std::basic_string s(date_time::date_formatter,charT>::date_to_string(d.begin())); + return s + sep + date_time::date_formatter,charT>::date_to_string(d.last()); + } + //! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231 + /*!\ingroup date_format + */ + inline std::string to_iso_string(const date_period& d) { + return to_iso_string_type(d); + } + + + // wrapper function for to_iso_extended_(w)string(date) + template + inline std::basic_string to_iso_extended_string_type(const date& d) { + return date_time::date_formatter,charT>::date_to_string(d); + } + //! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31 + /*!\ingroup date_format + */ + inline std::string to_iso_extended_string(const date& d) { + return to_iso_extended_string_type(d); + } + + // wrapper function for to_iso_(w)string(date) + template + inline std::basic_string to_iso_string_type(const date& d) { + return date_time::date_formatter,charT>::date_to_string(d); + } + //! Convert to iso standard string YYYYMMDD. Example: 20021231 + /*!\ingroup date_format + */ + inline std::string to_iso_string(const date& d) { + return to_iso_string_type(d); + } + + + + + // wrapper function for to_sql_(w)string(date) + template + inline std::basic_string to_sql_string_type(const date& d) + { + date::ymd_type ymd = d.year_month_day(); + std::basic_ostringstream ss; + ss << ymd.year << "-" + << std::setw(2) << std::setfill(ss.widen('0')) + << ymd.month.as_number() //solves problem with gcc 3.1 hanging + << "-" + << std::setw(2) << std::setfill(ss.widen('0')) + << ymd.day; + return ss.str(); + } + inline std::string to_sql_string(const date& d) { + return to_sql_string_type(d); + } + + +#if !defined(BOOST_NO_STD_WSTRING) + //! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02] + /*!\ingroup date_format + */ + inline std::wstring to_simple_wstring(const date_period& d) { + return to_simple_string_type(d); + } + //! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01 + /*!\ingroup date_format + */ + inline std::wstring to_simple_wstring(const date& d) { + return to_simple_string_type(d); + } + //! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231 + /*!\ingroup date_format + */ + inline std::wstring to_iso_wstring(const date_period& d) { + return to_iso_string_type(d); + } + //! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31 + /*!\ingroup date_format + */ + inline std::wstring to_iso_extended_wstring(const date& d) { + return to_iso_extended_string_type(d); + } + //! Convert to iso standard string YYYYMMDD. Example: 20021231 + /*!\ingroup date_format + */ + inline std::wstring to_iso_wstring(const date& d) { + return to_iso_string_type(d); + } + inline std::wstring to_sql_wstring(const date& d) { + return to_sql_string_type(d); + } +#endif // BOOST_NO_STD_WSTRING + +} } //namespace gregorian + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/formatters_limited.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/formatters_limited.hpp new file mode 100644 index 0000000000..4531ebec13 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/formatters_limited.hpp @@ -0,0 +1,81 @@ +#ifndef GREGORIAN_FORMATTERS_LIMITED_HPP___ +#define GREGORIAN_FORMATTERS_LIMITED_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/gregorian/gregorian_types.hpp" +#include "boost/date_time/date_formatting_limited.hpp" +#include "boost/date_time/iso_format.hpp" +#include "boost/date_time/date_format_simple.hpp" +#include "boost/date_time/compiler_config.hpp" + +namespace boost { +namespace gregorian { + + //! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01 + /*!\ingroup date_format + */ + inline std::string to_simple_string(const date& d) { + return date_time::date_formatter >::date_to_string(d); + } + + //! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02] + /*!\ingroup date_format + */ + inline std::string to_simple_string(const date_period& d) { + std::string s("["); + std::string d1(date_time::date_formatter >::date_to_string(d.begin())); + std::string d2(date_time::date_formatter >::date_to_string(d.last())); + return std::string("[" + d1 + "/" + d2 + "]"); + } + + //! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231 + /*!\ingroup date_format + */ + inline std::string to_iso_string(const date_period& d) { + std::string s(date_time::date_formatter >::date_to_string(d.begin())); + return s + "/" + date_time::date_formatter >::date_to_string(d.last()); + } + + + //! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31 + /*!\ingroup date_format + */ + inline std::string to_iso_extended_string(const date& d) { + return date_time::date_formatter >::date_to_string(d); + } + + //! Convert to iso standard string YYYYMMDD. Example: 20021231 + /*!\ingroup date_format + */ + inline std::string to_iso_string(const date& d) { + return date_time::date_formatter >::date_to_string(d); + } + + + + inline std::string to_sql_string(const date& d) + { + date::ymd_type ymd = d.year_month_day(); + std::ostringstream ss; + ss << ymd.year << "-" + << std::setw(2) << std::setfill('0') + << ymd.month.as_number() //solves problem with gcc 3.1 hanging + << "-" + << std::setw(2) << std::setfill('0') + << ymd.day; + return ss.str(); + } + + +} } //namespace gregorian + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_calendar.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_calendar.hpp new file mode 100644 index 0000000000..483ead5016 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_calendar.hpp @@ -0,0 +1,48 @@ +#ifndef GREGORIAN_GREGORIAN_CALENDAR_HPP__ +#define GREGORIAN_GREGORIAN_CALENDAR_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace gregorian { + + //!An internal date representation that includes infinities, not a date + typedef date_time::int_adapter fancy_date_rep; + + //! Gregorian calendar for this implementation, hard work in the base + class gregorian_calendar : + public date_time::gregorian_calendar_base { + public: + //! Type to hold a weekday (eg: Sunday, Monday,...) + typedef greg_weekday day_of_week_type; + //! Counter type from 1 to 366 for gregorian dates. + typedef greg_day_of_year_rep day_of_year_type; + //! Internal date representation that handles infinity, not a date + typedef fancy_date_rep date_rep_type; + //! Date rep implements the traits stuff as well + typedef fancy_date_rep date_traits_type; + + + private: + }; + +} } //namespace gregorian + + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_date.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_date.hpp new file mode 100644 index 0000000000..ad67c0ce2f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_date.hpp @@ -0,0 +1,136 @@ +#ifndef GREG_DATE_HPP___ +#define GREG_DATE_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + +#include +#include +#include +#include +#include + +namespace boost { +namespace gregorian { + + //bring special enum values into the namespace + using date_time::special_values; + using date_time::not_special; + using date_time::neg_infin; + using date_time::pos_infin; + using date_time::not_a_date_time; + using date_time::max_date_time; + using date_time::min_date_time; + + //! A date type based on gregorian_calendar + /*! This class is the primary interface for programming with + greogorian dates. The is a lightweight type that can be + freely passed by value. All comparison operators are + supported. + \ingroup date_basics + */ + class date : public date_time::date + { + public: + typedef gregorian_calendar::year_type year_type; + typedef gregorian_calendar::month_type month_type; + typedef gregorian_calendar::day_type day_type; + typedef gregorian_calendar::day_of_year_type day_of_year_type; + typedef gregorian_calendar::ymd_type ymd_type; + typedef gregorian_calendar::date_rep_type date_rep_type; + typedef gregorian_calendar::date_int_type date_int_type; + typedef date_duration duration_type; +#if !defined(DATE_TIME_NO_DEFAULT_CONSTRUCTOR) + //! Default constructor constructs with not_a_date_time + date(): + date_time::date(date_rep_type::from_special(not_a_date_time)) + {} +#endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR + //! Main constructor with year, month, day + date(year_type y, month_type m, day_type d) + : date_time::date(y, m, d) + { + if (gregorian_calendar::end_of_month_day(y, m) < d) { + boost::throw_exception(bad_day_of_month(std::string("Day of month is not valid for year"))); + } + } + //! Constructor from a ymd_type structure + explicit date(const ymd_type& ymd) + : date_time::date(ymd) + {} + //! Needed copy constructor + explicit date(const date_int_type& rhs): + date_time::date(rhs) + {} + //! Needed copy constructor + explicit date(date_rep_type rhs): + date_time::date(rhs) + {} + //! Constructor for infinities, not a date, max and min date + explicit date(special_values sv): + date_time::date(date_rep_type::from_special(sv)) + { + if (sv == min_date_time) + { + *this = date(1400, 1, 1); + } + if (sv == max_date_time) + { + *this = date(9999, 12, 31); + } + + } + //!Return the Julian Day number for the date. + date_int_type julian_day() const + { + ymd_type ymd = year_month_day(); + return gregorian_calendar::julian_day_number(ymd); + } + //!Return the day of year 1..365 or 1..366 (for leap year) + day_of_year_type day_of_year() const + { + date start_of_year(year(), 1, 1); + unsigned short doy = static_cast((*this-start_of_year).days() + 1); + return day_of_year_type(doy); + } + //!Return the Modified Julian Day number for the date. + date_int_type modjulian_day() const + { + ymd_type ymd = year_month_day(); + return gregorian_calendar::modjulian_day_number(ymd); + } + //!Return the iso 8601 week number 1..53 + int week_number() const + { + ymd_type ymd = year_month_day(); + return gregorian_calendar::week_number(ymd); + } + //! Return the day number from the calendar + date_int_type day_number() const + { + return days_; + } + //! Return the last day of the current month + date end_of_month() const + { + ymd_type ymd = year_month_day(); + short eom_day = gregorian_calendar::end_of_month_day(ymd.year, ymd.month); + return date(ymd.year, ymd.month, eom_day); + } + + private: + + }; + + + +} } //namespace gregorian + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_day.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_day.hpp new file mode 100644 index 0000000000..92ea6ab07e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_day.hpp @@ -0,0 +1,57 @@ +#ifndef GREG_DAY_HPP___ +#define GREG_DAY_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/constrained_value.hpp" +#include +#include + +namespace boost { +namespace gregorian { + + //! Exception type for gregorian day of month (1..31) + struct bad_day_of_month : public std::out_of_range + { + bad_day_of_month() : + std::out_of_range(std::string("Day of month value is out of range 1..31")) + {} + //! Allow other classes to throw with unique string for bad day like Feb 29 + bad_day_of_month(const std::string& s) : + std::out_of_range(s) + {} + }; + //! Policy class that declares error handling and day of month ranges + typedef CV::simple_exception_policy greg_day_policies; + + //! Generated represetation for gregorian day of month + typedef CV::constrained_value greg_day_rep; + + //! Represent a day of the month (range 1 - 31) + /*! This small class allows for simple conversion an integer value into + a day of the month for a standard gregorian calendar. The type + is automatically range checked so values outside of the range 1-31 + will cause a bad_day_of_month exception + */ + class greg_day : public greg_day_rep { + public: + greg_day(unsigned short day_of_month) : greg_day_rep(day_of_month) {} + unsigned short as_number() const {return value_;} + operator unsigned short() const {return value_;} + private: + + }; + + + +} } //namespace gregorian + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_day_of_year.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_day_of_year.hpp new file mode 100644 index 0000000000..36b22c2b75 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_day_of_year.hpp @@ -0,0 +1,38 @@ +#ifndef GREG_DAY_OF_YEAR_HPP___ +#define GREG_DAY_OF_YEAR_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/constrained_value.hpp" +#include +#include + +namespace boost { +namespace gregorian { + + //! Exception type for day of year (1..366) + struct bad_day_of_year : public std::out_of_range + { + bad_day_of_year() : + std::out_of_range(std::string("Day of year value is out of range 1..366")) + {} + }; + + //! A day of the year range (1..366) + typedef CV::simple_exception_policy greg_day_of_year_policies; + + //! Define a range representation type for the day of the year 1..366 + typedef CV::constrained_value greg_day_of_year_rep; + + +} } //namespace gregorian + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_duration.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_duration.hpp new file mode 100644 index 0000000000..fd7554201e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_duration.hpp @@ -0,0 +1,134 @@ +#ifndef GREG_DURATION_HPP___ +#define GREG_DURATION_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +#include +#include +#include + +namespace boost { +namespace gregorian { + + //!An internal date representation that includes infinities, not a date + typedef boost::date_time::duration_traits_adapted date_duration_rep; + + //! Durations in days for gregorian system + /*! \ingroup date_basics + */ + class date_duration : + public boost::date_time::date_duration< date_duration_rep > + { + typedef boost::date_time::date_duration< date_duration_rep > base_type; + + public: + typedef base_type::duration_rep duration_rep; + + //! Construct from a day count + explicit date_duration(duration_rep day_count = 0) : base_type(day_count) {} + + //! construct from special_values + date_duration(date_time::special_values sv) : base_type(sv) {} + + //! Copy constructor + date_duration(const date_duration& other) : base_type(static_cast< base_type const& >(other)) + {} + + //! Construct from another date_duration + date_duration(const base_type& other) : base_type(other) + {} + + // Relational operators + // NOTE: Because of date_time::date_duration< T > design choice we don't use Boost.Operators here, + // because we need the class to be a direct base. Either lose EBO, or define operators by hand. + // The latter is more effecient. + bool operator== (const date_duration& rhs) const + { + return base_type::operator== (rhs); + } + bool operator!= (const date_duration& rhs) const + { + return !operator== (rhs); + } + bool operator< (const date_duration& rhs) const + { + return base_type::operator< (rhs); + } + bool operator> (const date_duration& rhs) const + { + return !(base_type::operator< (rhs) || base_type::operator== (rhs)); + } + bool operator<= (const date_duration& rhs) const + { + return (base_type::operator< (rhs) || base_type::operator== (rhs)); + } + bool operator>= (const date_duration& rhs) const + { + return !base_type::operator< (rhs); + } + + //! Subtract another duration -- result is signed + date_duration& operator-= (const date_duration& rhs) + { + base_type::operator-= (rhs); + return *this; + } + friend date_duration operator- (date_duration rhs, date_duration const& lhs) + { + rhs -= lhs; + return rhs; + } + + //! Add a duration -- result is signed + date_duration& operator+= (const date_duration& rhs) + { + base_type::operator+= (rhs); + return *this; + } + friend date_duration operator+ (date_duration rhs, date_duration const& lhs) + { + rhs += lhs; + return rhs; + } + + //! unary- Allows for dd = -date_duration(2); -> dd == -2 + date_duration operator- ()const + { + return date_duration(get_rep() * (-1)); + } + + //! Division operations on a duration with an integer. + date_duration& operator/= (int divisor) + { + base_type::operator/= (divisor); + return *this; + } + friend date_duration operator/ (date_duration rhs, int lhs) + { + rhs /= lhs; + return rhs; + } + + //! Returns the smallest duration -- used by to calculate 'end' + static date_duration unit() + { + return date_duration(base_type::unit().get_rep()); + } + }; + + //! Shorthand for date_duration + typedef date_duration days; + +} } //namespace gregorian + +#if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) +#include +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_duration_types.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_duration_types.hpp new file mode 100644 index 0000000000..3d1ce62183 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_duration_types.hpp @@ -0,0 +1,43 @@ +#ifndef GREG_DURATION_TYPES_HPP___ +#define GREG_DURATION_TYPES_HPP___ + +/* Copyright (c) 2004 CrystalClear Software, Inc. + * Subject to Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + + +#include +#include +#include +#include +#include + +namespace boost { +namespace gregorian { + + //! config struct for additional duration types (ie months_duration<> & years_duration<>) + struct greg_durations_config { + typedef date date_type; + typedef date_time::int_adapter int_rep; + typedef date_time::month_functor month_adjustor_type; + }; + + typedef date_time::months_duration months; + typedef date_time::years_duration years; + + class weeks_duration : public date_duration { + public: + weeks_duration(duration_rep w) + : date_duration(w * 7) {} + weeks_duration(date_time::special_values sv) + : date_duration(sv) {} + }; + + typedef weeks_duration weeks; + +}} // namespace boost::gregorian + +#endif // GREG_DURATION_TYPES_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_facet.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_facet.hpp new file mode 100644 index 0000000000..9c3877ed03 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_facet.hpp @@ -0,0 +1,354 @@ +#ifndef GREGORIAN_FACET_HPP___ +#define GREGORIAN_FACET_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-23 06:13:35 -0500 (Sun, 23 Nov 2008) $ + */ + +#include "boost/date_time/gregorian/gregorian_types.hpp" +#include "boost/date_time/date_formatting_locales.hpp" // sets BOOST_DATE_TIME_NO_LOCALE +#include "boost/date_time/gregorian/parsers.hpp" + +//This file is basically commented out if locales are not supported +#ifndef BOOST_DATE_TIME_NO_LOCALE + +#include +#include +#include +#include +#include + +namespace boost { +namespace gregorian { + + //! Configuration of the output facet template + struct greg_facet_config + { + typedef boost::gregorian::greg_month month_type; + typedef boost::date_time::special_values special_value_enum; + typedef boost::gregorian::months_of_year month_enum; + typedef boost::date_time::weekdays weekday_enum; + }; + +#if defined(USE_DATE_TIME_PRE_1_33_FACET_IO) + //! Create the base facet type for gregorian::date + typedef boost::date_time::date_names_put greg_base_facet; + + //! ostream operator for gregorian::date + /*! Uses the date facet to determine various output parameters including: + * - string values for the month (eg: Jan, Feb, Mar) (default: English) + * - string values for special values (eg: not-a-date-time) (default: English) + * - selection of long, short strings, or numerical month representation (default: short string) + * - month day year order (default yyyy-mmm-dd) + */ + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const date& d) + { + typedef boost::date_time::date_names_put facet_def; + typedef boost::date_time::ostream_date_formatter greg_ostream_formatter; + greg_ostream_formatter::date_put(d, os); + return os; + } + + //! operator<< for gregorian::greg_month typically streaming: Jan, Feb, Mar... + /*! Uses the date facet to determine output string as well as selection of long or short strings. + * Default if no facet is installed is to output a 2 wide numeric value for the month + * eg: 01 == Jan, 02 == Feb, ... 12 == Dec. + */ + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const greg_month& m) + { + typedef boost::date_time::date_names_put facet_def; + typedef boost::date_time::ostream_month_formatter greg_month_formatter; + std::locale locale = os.getloc(); + if (std::has_facet(locale)) { + const facet_def& f = std::use_facet(locale); + greg_month_formatter::format_month(m, os, f); + + } + else { //default to numeric + charT fill_char = '0'; + os << std::setw(2) << std::setfill(fill_char) << m.as_number(); + } + + return os; + } + + //! operator<< for gregorian::greg_weekday typically streaming: Sun, Mon, Tue, ... + /*! Uses the date facet to determine output string as well as selection of long or short string. + * Default if no facet is installed is to output a 3 char english string for the + * day of the week. + */ + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const greg_weekday& wd) + { + typedef boost::date_time::date_names_put facet_def; + typedef boost::date_time::ostream_weekday_formatter greg_weekday_formatter; + std::locale locale = os.getloc(); + if (std::has_facet(locale)) { + const facet_def& f = std::use_facet(locale); + greg_weekday_formatter::format_weekday(wd.as_enum(), os, f, true); + } + else { //default to short English string eg: Sun, Mon, Tue, Wed... + os << wd.as_short_string(); + } + + return os; + } + + //! operator<< for gregorian::date_period typical output: [2002-Jan-01/2002-Jan-31] + /*! Uses the date facet to determine output string as well as selection of long + * or short string fr dates. + * Default if no facet is installed is to output a 3 char english string for the + * day of the week. + */ + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const date_period& dp) + { + os << '['; //TODO: facet or manipulator for periods? + os << dp.begin(); + os << '/'; //TODO: facet or manipulator for periods? + os << dp.last(); + os << ']'; + return os; + } + + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const date_duration& dd) + { + //os << dd.days(); + os << dd.get_rep(); + return os; + } + + //! operator<< for gregorian::partial_date. Output: "Jan 1" + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const partial_date& pd) + { + os << std::setw(2) << std::setfill('0') << pd.day() << ' ' + << pd.month().as_short_string() ; + return os; + } + + //! operator<< for gregorian::nth_kday_of_month. Output: "first Mon of Jun" + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, + const nth_kday_of_month& nkd) + { + os << nkd.nth_week_as_str() << ' ' + << nkd.day_of_week() << " of " + << nkd.month().as_short_string() ; + return os; + } + + //! operator<< for gregorian::first_kday_of_month. Output: "first Mon of Jun" + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, + const first_kday_of_month& fkd) + { + os << "first " << fkd.day_of_week() << " of " + << fkd.month().as_short_string() ; + return os; + } + + //! operator<< for gregorian::last_kday_of_month. Output: "last Mon of Jun" + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, + const last_kday_of_month& lkd) + { + os << "last " << lkd.day_of_week() << " of " + << lkd.month().as_short_string() ; + return os; + } + + //! operator<< for gregorian::first_kday_after. Output: "first Mon after" + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, + const first_kday_after& fka) + { + os << fka.day_of_week() << " after"; + return os; + } + + //! operator<< for gregorian::first_kday_before. Output: "first Mon before" + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, + const first_kday_before& fkb) + { + os << fkb.day_of_week() << " before"; + return os; + } +#endif // USE_DATE_TIME_PRE_1_33_FACET_IO + /**************** Input Streaming ******************/ + +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) + //! operator>> for gregorian::date + template + inline + std::basic_istream& operator>>(std::basic_istream& is, date& d) + { + std::istream_iterator, charT> beg(is), eos; + + typedef boost::date_time::all_date_names_put facet_def; + d = from_stream(beg, eos); + return is; + } +#endif // BOOST_NO_STD_ITERATOR_TRAITS + + //! operator>> for gregorian::date_duration + template + inline + std::basic_istream& operator>>(std::basic_istream& is, + date_duration& dd) + { + long v; + is >> v; + dd = date_duration(v); + return is; + } + + //! operator>> for gregorian::date_period + template + inline + std::basic_istream& operator>>(std::basic_istream& is, + date_period& dp) + { + std::basic_string s; + is >> s; + dp = date_time::from_simple_string_type(s); + return is; + } + + //! generates a locale with the set of gregorian name-strings of type char* + BOOST_DATE_TIME_DECL std::locale generate_locale(std::locale& loc, char type); + + //! Returns a pointer to a facet with a default set of names (English) + /* Necessary in the event an exception is thrown from op>> for + * weekday or month. See comments in those functions for more info */ + BOOST_DATE_TIME_DECL boost::date_time::all_date_names_put* create_facet_def(char type); + +#ifndef BOOST_NO_STD_WSTRING + //! generates a locale with the set of gregorian name-strings of type wchar_t* + BOOST_DATE_TIME_DECL std::locale generate_locale(std::locale& loc, wchar_t type); + //! Returns a pointer to a facet with a default set of names (English) + /* Necessary in the event an exception is thrown from op>> for + * weekday or month. See comments in those functions for more info */ + BOOST_DATE_TIME_DECL boost::date_time::all_date_names_put* create_facet_def(wchar_t type); +#endif // BOOST_NO_STD_WSTRING + + //! operator>> for gregorian::greg_month - throws exception if invalid month given + template + inline + std::basic_istream& operator>>(std::basic_istream& is,greg_month& m) + { + typedef boost::date_time::all_date_names_put facet_def; + + std::basic_string s; + is >> s; + + if(!std::has_facet(is.getloc())) { + std::locale loc = is.getloc(); + charT a = '\0'; + is.imbue(generate_locale(loc, a)); + } + + short num = 0; + + try{ + const facet_def& f = std::use_facet(is.getloc()); + num = date_time::find_match(f.get_short_month_names(), + f.get_long_month_names(), + (greg_month::max)(), s); // greg_month spans 1..12, so max returns the array size, + // which is needed by find_match + } + /* bad_cast will be thrown if the desired facet is not accessible + * so we can generate the facet. This has the drawback of using english + * names as a default. */ + catch(std::bad_cast&){ + charT a = '\0'; + std::auto_ptr< const facet_def > f(create_facet_def(a)); + num = date_time::find_match(f->get_short_month_names(), + f->get_long_month_names(), + (greg_month::max)(), s); // greg_month spans 1..12, so max returns the array size, + // which is needed by find_match + } + + ++num; // months numbered 1-12 + m = greg_month(num); + + return is; + } + + //! operator>> for gregorian::greg_weekday - throws exception if invalid weekday given + template + inline + std::basic_istream& operator>>(std::basic_istream& is,greg_weekday& wd) + { + typedef boost::date_time::all_date_names_put facet_def; + + std::basic_string s; + is >> s; + + if(!std::has_facet(is.getloc())) { + std::locale loc = is.getloc(); + charT a = '\0'; + is.imbue(generate_locale(loc, a)); + } + + short num = 0; + try{ + const facet_def& f = std::use_facet(is.getloc()); + num = date_time::find_match(f.get_short_weekday_names(), + f.get_long_weekday_names(), + (greg_weekday::max)() + 1, s); // greg_weekday spans 0..6, so increment is needed + // to form the array size which is needed by find_match + } + /* bad_cast will be thrown if the desired facet is not accessible + * so we can generate the facet. This has the drawback of using english + * names as a default. */ + catch(std::bad_cast&){ + charT a = '\0'; + std::auto_ptr< const facet_def > f(create_facet_def(a)); + num = date_time::find_match(f->get_short_weekday_names(), + f->get_long_weekday_names(), + (greg_weekday::max)() + 1, s); // greg_weekday spans 0..6, so increment is needed + // to form the array size which is needed by find_match + } + + wd = greg_weekday(num); // weekdays numbered 0-6 + return is; + } + +} } //namespace gregorian + +#endif + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_month.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_month.hpp new file mode 100644 index 0000000000..fc9c86148d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_month.hpp @@ -0,0 +1,105 @@ +#ifndef GREG_MONTH_HPP___ +#define GREG_MONTH_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/constrained_value.hpp" +#include "boost/date_time/date_defs.hpp" +#include "boost/shared_ptr.hpp" +#include "boost/date_time/compiler_config.hpp" +#include +#include +#include +#include +#include + +namespace boost { +namespace gregorian { + + typedef date_time::months_of_year months_of_year; + + //bring enum values into the namespace + using date_time::Jan; + using date_time::Feb; + using date_time::Mar; + using date_time::Apr; + using date_time::May; + using date_time::Jun; + using date_time::Jul; + using date_time::Aug; + using date_time::Sep; + using date_time::Oct; + using date_time::Nov; + using date_time::Dec; + using date_time::NotAMonth; + using date_time::NumMonths; + + //! Exception thrown if a greg_month is constructed with a value out of range + struct bad_month : public std::out_of_range + { + bad_month() : std::out_of_range(std::string("Month number is out of range 1..12")) {} + }; + //! Build a policy class for the greg_month_rep + typedef CV::simple_exception_policy greg_month_policies; + //! A constrained range that implements the gregorian_month rules + typedef CV::constrained_value greg_month_rep; + + + //! Wrapper class to represent months in gregorian based calendar + class BOOST_DATE_TIME_DECL greg_month : public greg_month_rep { + public: + typedef date_time::months_of_year month_enum; + typedef std::map month_map_type; + typedef boost::shared_ptr month_map_ptr_type; + //! Construct a month from the months_of_year enumeration + greg_month(month_enum theMonth) : + greg_month_rep(static_cast(theMonth)) {} + //! Construct from a short value + greg_month(unsigned short theMonth) : greg_month_rep(theMonth) {} + //! Convert the value back to a short + operator unsigned short() const {return value_;} + //! Returns month as number from 1 to 12 + unsigned short as_number() const {return value_;} + month_enum as_enum() const {return static_cast(value_);} + const char* as_short_string() const; + const char* as_long_string() const; +#ifndef BOOST_NO_STD_WSTRING + const wchar_t* as_short_wstring() const; + const wchar_t* as_long_wstring() const; +#endif // BOOST_NO_STD_WSTRING + //! Shared pointer to a map of Month strings (Names & Abbrev) & numbers + static month_map_ptr_type get_month_map_ptr(); + + /* parameterized as_*_string functions are intended to be called + * from a template function: "... as_short_string(charT c='\0');" */ + const char* as_short_string(char) const + { + return as_short_string(); + } + const char* as_long_string(char) const + { + return as_long_string(); + } +#ifndef BOOST_NO_STD_WSTRING + const wchar_t* as_short_string(wchar_t) const + { + return as_short_wstring(); + } + const wchar_t* as_long_string(wchar_t) const + { + return as_long_wstring(); + } +#endif // BOOST_NO_STD_WSTRING + }; + +} } //namespace gregorian + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_serialize.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_serialize.hpp new file mode 100644 index 0000000000..e427a48a20 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_serialize.hpp @@ -0,0 +1,490 @@ +#ifndef GREGORIAN_SERIALIZE_HPP___ +#define GREGORIAN_SERIALIZE_HPP___ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-11-11 15:19:38 -0500 (Thu, 11 Nov 2010) $ + */ + +#include "boost/date_time/gregorian/gregorian_types.hpp" +#include "boost/date_time/gregorian/parsers.hpp" +#include "boost/serialization/split_free.hpp" +#include "boost/serialization/nvp.hpp" + + +// macros to split serialize functions into save & load functions +// An expanded version is below for gregorian::date +// NOTE: these macros define template functions in the boost::serialization namespace. +// They must be expanded *outside* of any namespace +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::date_duration) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::date_duration::duration_rep) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::date_period) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::greg_month) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::greg_day) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::greg_weekday) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::partial_date) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::nth_kday_of_month) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::first_kday_of_month) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::last_kday_of_month) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::first_kday_before) +BOOST_SERIALIZATION_SPLIT_FREE(::boost::gregorian::first_kday_after) + +namespace boost { +namespace serialization { + +/*! Method that does serialization for gregorian::date -- splits to load/save + */ +template +inline void serialize(Archive & ar, + ::boost::gregorian::date & d, + const unsigned int file_version) +{ + split_free(ar, d, file_version); +} + +//! Function to save gregorian::date objects using serialization lib +/*! Dates are serialized into a string for transport and storage. + * While it would be more efficient to store the internal + * integer used to manipulate the dates, it is an unstable solution. + */ +template +void save(Archive & ar, + const ::boost::gregorian::date & d, + unsigned int /* version */) +{ + std::string ds = to_iso_string(d); + ar & make_nvp("date", ds); +} + +//! Function to load gregorian::date objects using serialization lib +/*! Dates are serialized into a string for transport and storage. + * While it would be more efficient to store the internal + * integer used to manipulate the dates, it is an unstable solution. + */ +template +void load(Archive & ar, + ::boost::gregorian::date & d, + unsigned int /*version*/) +{ + std::string ds; + ar & make_nvp("date", ds); + try{ + d = ::boost::gregorian::from_undelimited_string(ds); + }catch(bad_lexical_cast&) { + gregorian::special_values sv = gregorian::special_value_from_string(ds); + if(sv == gregorian::not_special) { + throw; // no match found, rethrow original exception + } + else { + d = gregorian::date(sv); + } + } +} + + +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, + ::boost::gregorian::date* dp, + const unsigned int /*file_version*/) +{ + // retrieve data from archive required to construct new + // invoke inplace constructor to initialize instance of date + ::new(dp) ::boost::gregorian::date(::boost::gregorian::not_a_date_time); +} + +/**** date_duration ****/ + +//! Function to save gregorian::date_duration objects using serialization lib +template +void save(Archive & ar, const gregorian::date_duration & dd, + unsigned int /*version*/) +{ + typename gregorian::date_duration::duration_rep dr = dd.get_rep(); + ar & make_nvp("date_duration", dr); +} +//! Function to load gregorian::date_duration objects using serialization lib +template +void load(Archive & ar, gregorian::date_duration & dd, unsigned int /*version*/) +{ + typename gregorian::date_duration::duration_rep dr(0); + ar & make_nvp("date_duration", dr); + dd = gregorian::date_duration(dr); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, gregorian::date_duration* dd, + const unsigned int /*file_version*/) +{ + ::new(dd) gregorian::date_duration(gregorian::not_a_date_time); +} + +/**** date_duration::duration_rep (most likely int_adapter) ****/ + +//! helper unction to save date_duration objects using serialization lib +template +void save(Archive & ar, const gregorian::date_duration::duration_rep & dr, + unsigned int /*version*/) +{ + typename gregorian::date_duration::duration_rep::int_type it = dr.as_number(); + ar & make_nvp("date_duration_duration_rep", it); +} +//! helper function to load date_duration objects using serialization lib +template +void load(Archive & ar, gregorian::date_duration::duration_rep & dr, unsigned int /*version*/) +{ + typename gregorian::date_duration::duration_rep::int_type it(0); + ar & make_nvp("date_duration_duration_rep", it); + dr = gregorian::date_duration::duration_rep::int_type(it); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, gregorian::date_duration::duration_rep* dr, + const unsigned int /*file_version*/) +{ + ::new(dr) gregorian::date_duration::duration_rep(0); +} + +/**** date_period ****/ + +//! Function to save gregorian::date_period objects using serialization lib +/*! date_period objects are broken down into 2 parts for serialization: + * the begining date object and the end date object + */ +template +void save(Archive & ar, const gregorian::date_period& dp, + unsigned int /*version*/) +{ + gregorian::date d1 = dp.begin(); + gregorian::date d2 = dp.end(); + ar & make_nvp("date_period_begin_date", d1); + ar & make_nvp("date_period_end_date", d2); +} +//! Function to load gregorian::date_period objects using serialization lib +/*! date_period objects are broken down into 2 parts for serialization: + * the begining date object and the end date object + */ +template +void load(Archive & ar, gregorian::date_period& dp, unsigned int /*version*/) +{ + gregorian::date d1(gregorian::not_a_date_time); + gregorian::date d2(gregorian::not_a_date_time); + ar & make_nvp("date_period_begin_date", d1); + ar & make_nvp("date_period_end_date", d2); + dp = gregorian::date_period(d1,d2); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, gregorian::date_period* dp, + const unsigned int /*file_version*/) +{ + gregorian::date d(gregorian::not_a_date_time); + gregorian::date_duration dd(1); + ::new(dp) gregorian::date_period(d,dd); +} + +/**** greg_month ****/ + +//! Function to save gregorian::greg_month objects using serialization lib +template +void save(Archive & ar, const gregorian::greg_month& gm, + unsigned int /*version*/) +{ + unsigned short us = gm.as_number(); + ar & make_nvp("greg_month", us); +} +//! Function to load gregorian::greg_month objects using serialization lib +template +void load(Archive & ar, gregorian::greg_month& gm, unsigned int /*version*/) +{ + unsigned short us; + ar & make_nvp("greg_month", us); + gm = gregorian::greg_month(us); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, gregorian::greg_month* gm, + const unsigned int /*file_version*/) +{ + ::new(gm) gregorian::greg_month(1); +} + +/**** greg_day ****/ + +//! Function to save gregorian::greg_day objects using serialization lib +template +void save(Archive & ar, const gregorian::greg_day& gd, + unsigned int /*version*/) +{ + unsigned short us = gd.as_number(); + ar & make_nvp("greg_day", us); +} +//! Function to load gregorian::greg_day objects using serialization lib +template +void load(Archive & ar, gregorian::greg_day& gd, unsigned int /*version*/) +{ + unsigned short us; + ar & make_nvp("greg_day", us); + gd = gregorian::greg_day(us); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, gregorian::greg_day* gd, + const unsigned int /*file_version*/) +{ + ::new(gd) gregorian::greg_day(1); +} + +/**** greg_weekday ****/ + +//! Function to save gregorian::greg_weekday objects using serialization lib +template +void save(Archive & ar, const gregorian::greg_weekday& gd, + unsigned int /*version*/) +{ + unsigned short us = gd.as_number(); + ar & make_nvp("greg_weekday", us); +} +//! Function to load gregorian::greg_weekday objects using serialization lib +template +void load(Archive & ar, gregorian::greg_weekday& gd, unsigned int /*version*/) +{ + unsigned short us; + ar & make_nvp("greg_weekday", us); + gd = gregorian::greg_weekday(us); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, gregorian::greg_weekday* gd, + const unsigned int /*file_version*/) +{ + ::new(gd) gregorian::greg_weekday(1); +} + +/**** date_generators ****/ + +/**** partial_date ****/ + +//! Function to save gregorian::partial_date objects using serialization lib +/*! partial_date objects are broken down into 2 parts for serialization: + * the day (typically greg_day) and month (typically greg_month) objects + */ +template +void save(Archive & ar, const gregorian::partial_date& pd, + unsigned int /*version*/) +{ + gregorian::greg_day gd(pd.day()); + gregorian::greg_month gm(pd.month().as_number()); + ar & make_nvp("partial_date_day", gd); + ar & make_nvp("partial_date_month", gm); +} +//! Function to load gregorian::partial_date objects using serialization lib +/*! partial_date objects are broken down into 2 parts for serialization: + * the day (greg_day) and month (greg_month) objects + */ +template +void load(Archive & ar, gregorian::partial_date& pd, unsigned int /*version*/) +{ + gregorian::greg_day gd(1); + gregorian::greg_month gm(1); + ar & make_nvp("partial_date_day", gd); + ar & make_nvp("partial_date_month", gm); + pd = gregorian::partial_date(gd,gm); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, gregorian::partial_date* pd, + const unsigned int /*file_version*/) +{ + gregorian::greg_month gm(1); + gregorian::greg_day gd(1); + ::new(pd) gregorian::partial_date(gd,gm); +} + +/**** nth_kday_of_month ****/ + +//! Function to save nth_day_of_the_week_in_month objects using serialization lib +/*! nth_day_of_the_week_in_month objects are broken down into 3 parts for + * serialization: the week number, the day of the week, and the month + */ +template +void save(Archive & ar, const gregorian::nth_kday_of_month& nkd, + unsigned int /*version*/) +{ + typename gregorian::nth_kday_of_month::week_num wn(nkd.nth_week()); + typename gregorian::nth_kday_of_month::day_of_week_type d(nkd.day_of_week().as_number()); + typename gregorian::nth_kday_of_month::month_type m(nkd.month().as_number()); + ar & make_nvp("nth_kday_of_month_week_num", wn); + ar & make_nvp("nth_kday_of_month_day_of_week", d); + ar & make_nvp("nth_kday_of_month_month", m); +} +//! Function to load nth_day_of_the_week_in_month objects using serialization lib +/*! nth_day_of_the_week_in_month objects are broken down into 3 parts for + * serialization: the week number, the day of the week, and the month + */ +template +void load(Archive & ar, gregorian::nth_kday_of_month& nkd, unsigned int /*version*/) +{ + typename gregorian::nth_kday_of_month::week_num wn(gregorian::nth_kday_of_month::first); + typename gregorian::nth_kday_of_month::day_of_week_type d(gregorian::Monday); + typename gregorian::nth_kday_of_month::month_type m(gregorian::Jan); + ar & make_nvp("nth_kday_of_month_week_num", wn); + ar & make_nvp("nth_kday_of_month_day_of_week", d); + ar & make_nvp("nth_kday_of_month_month", m); + + nkd = gregorian::nth_kday_of_month(wn,d,m); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, + gregorian::nth_kday_of_month* nkd, + const unsigned int /*file_version*/) +{ + // values used are not significant + ::new(nkd) gregorian::nth_kday_of_month(gregorian::nth_kday_of_month::first, + gregorian::Monday,gregorian::Jan); +} + +/**** first_kday_of_month ****/ + +//! Function to save first_day_of_the_week_in_month objects using serialization lib +/*! first_day_of_the_week_in_month objects are broken down into 2 parts for + * serialization: the day of the week, and the month + */ +template +void save(Archive & ar, const gregorian::first_kday_of_month& fkd, + unsigned int /*version*/) +{ + typename gregorian::first_kday_of_month::day_of_week_type d(fkd.day_of_week().as_number()); + typename gregorian::first_kday_of_month::month_type m(fkd.month().as_number()); + ar & make_nvp("first_kday_of_month_day_of_week", d); + ar & make_nvp("first_kday_of_month_month", m); +} +//! Function to load first_day_of_the_week_in_month objects using serialization lib +/*! first_day_of_the_week_in_month objects are broken down into 2 parts for + * serialization: the day of the week, and the month + */ +template +void load(Archive & ar, gregorian::first_kday_of_month& fkd, unsigned int /*version*/) +{ + typename gregorian::first_kday_of_month::day_of_week_type d(gregorian::Monday); + typename gregorian::first_kday_of_month::month_type m(gregorian::Jan); + ar & make_nvp("first_kday_of_month_day_of_week", d); + ar & make_nvp("first_kday_of_month_month", m); + + fkd = gregorian::first_kday_of_month(d,m); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, + gregorian::first_kday_of_month* fkd, + const unsigned int /*file_version*/) +{ + // values used are not significant + ::new(fkd) gregorian::first_kday_of_month(gregorian::Monday,gregorian::Jan); +} + +/**** last_kday_of_month ****/ + +//! Function to save last_day_of_the_week_in_month objects using serialization lib +/*! last_day_of_the_week_in_month objects are broken down into 2 parts for + * serialization: the day of the week, and the month + */ +template +void save(Archive & ar, const gregorian::last_kday_of_month& lkd, + unsigned int /*version*/) +{ + typename gregorian::last_kday_of_month::day_of_week_type d(lkd.day_of_week().as_number()); + typename gregorian::last_kday_of_month::month_type m(lkd.month().as_number()); + ar & make_nvp("last_kday_of_month_day_of_week", d); + ar & make_nvp("last_kday_of_month_month", m); +} +//! Function to load last_day_of_the_week_in_month objects using serialization lib +/*! last_day_of_the_week_in_month objects are broken down into 2 parts for + * serialization: the day of the week, and the month + */ +template +void load(Archive & ar, gregorian::last_kday_of_month& lkd, unsigned int /*version*/) +{ + typename gregorian::last_kday_of_month::day_of_week_type d(gregorian::Monday); + typename gregorian::last_kday_of_month::month_type m(gregorian::Jan); + ar & make_nvp("last_kday_of_month_day_of_week", d); + ar & make_nvp("last_kday_of_month_month", m); + + lkd = gregorian::last_kday_of_month(d,m); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, + gregorian::last_kday_of_month* lkd, + const unsigned int /*file_version*/) +{ + // values used are not significant + ::new(lkd) gregorian::last_kday_of_month(gregorian::Monday,gregorian::Jan); +} + +/**** first_kday_before ****/ + +//! Function to save first_day_of_the_week_before objects using serialization lib +template +void save(Archive & ar, const gregorian::first_kday_before& fkdb, + unsigned int /*version*/) +{ + typename gregorian::first_kday_before::day_of_week_type d(fkdb.day_of_week().as_number()); + ar & make_nvp("first_kday_before_day_of_week", d); +} +//! Function to load first_day_of_the_week_before objects using serialization lib +template +void load(Archive & ar, gregorian::first_kday_before& fkdb, unsigned int /*version*/) +{ + typename gregorian::first_kday_before::day_of_week_type d(gregorian::Monday); + ar & make_nvp("first_kday_before_day_of_week", d); + + fkdb = gregorian::first_kday_before(d); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, + gregorian::first_kday_before* fkdb, + const unsigned int /*file_version*/) +{ + // values used are not significant + ::new(fkdb) gregorian::first_kday_before(gregorian::Monday); +} + +/**** first_kday_after ****/ + +//! Function to save first_day_of_the_week_after objects using serialization lib +template +void save(Archive & ar, const gregorian::first_kday_after& fkda, + unsigned int /*version*/) +{ + typename gregorian::first_kday_after::day_of_week_type d(fkda.day_of_week().as_number()); + ar & make_nvp("first_kday_after_day_of_week", d); +} +//! Function to load first_day_of_the_week_after objects using serialization lib +template +void load(Archive & ar, gregorian::first_kday_after& fkda, unsigned int /*version*/) +{ + typename gregorian::first_kday_after::day_of_week_type d(gregorian::Monday); + ar & make_nvp("first_kday_after_day_of_week", d); + + fkda = gregorian::first_kday_after(d); +} +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, + gregorian::first_kday_after* fkda, + const unsigned int /*file_version*/) +{ + // values used are not significant + ::new(fkda) gregorian::first_kday_after(gregorian::Monday); +} + +} // namespace serialization +} // namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_weekday.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_weekday.hpp new file mode 100644 index 0000000000..9b566c440d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_weekday.hpp @@ -0,0 +1,66 @@ +#ifndef GREG_WEEKDAY_HPP___ +#define GREG_WEEKDAY_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +#include "boost/date_time/constrained_value.hpp" +#include "boost/date_time/date_defs.hpp" +#include "boost/date_time/compiler_config.hpp" +#include +#include + +namespace boost { +namespace gregorian { + + //bring enum values into the namespace + using date_time::Sunday; + using date_time::Monday; + using date_time::Tuesday; + using date_time::Wednesday; + using date_time::Thursday; + using date_time::Friday; + using date_time::Saturday; + + + //! Exception that flags that a weekday number is incorrect + struct bad_weekday : public std::out_of_range + { + bad_weekday() : std::out_of_range(std::string("Weekday is out of range 0..6")) {} + }; + typedef CV::simple_exception_policy greg_weekday_policies; + typedef CV::constrained_value greg_weekday_rep; + + + //! Represent a day within a week (range 0==Sun to 6==Sat) + class BOOST_DATE_TIME_DECL greg_weekday : public greg_weekday_rep { + public: + typedef boost::date_time::weekdays weekday_enum; + greg_weekday(unsigned short day_of_week_num) : + greg_weekday_rep(day_of_week_num) + {} + + unsigned short as_number() const {return value_;} + const char* as_short_string() const; + const char* as_long_string() const; +#ifndef BOOST_NO_STD_WSTRING + const wchar_t* as_short_wstring() const; + const wchar_t* as_long_wstring() const; +#endif // BOOST_NO_STD_WSTRING + weekday_enum as_enum() const {return static_cast(value_);} + + + }; + + + +} } //namespace gregorian + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_year.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_year.hpp new file mode 100644 index 0000000000..ef1735f427 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_year.hpp @@ -0,0 +1,53 @@ +#ifndef GREG_YEAR_HPP___ +#define GREG_YEAR_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/constrained_value.hpp" +#include +#include + +namespace boost { +namespace gregorian { + + //! Exception type for gregorian year + struct bad_year : public std::out_of_range + { + bad_year() : + std::out_of_range(std::string("Year is out of valid range: 1400..10000")) + {} + }; + //! Policy class that declares error handling gregorian year type + typedef CV::simple_exception_policy greg_year_policies; + + //! Generated representation for gregorian year + typedef CV::constrained_value greg_year_rep; + + //! Represent a day of the month (range 1900 - 10000) + /*! This small class allows for simple conversion an integer value into + a year for the gregorian calendar. This currently only allows a + range of 1900 to 10000. Both ends of the range are a bit arbitrary + at the moment, but they are the limits of current testing of the + library. As such they may be increased in the future. + */ + class greg_year : public greg_year_rep { + public: + greg_year(unsigned short year) : greg_year_rep(year) {} + operator unsigned short() const {return value_;} + private: + + }; + + + +} } //namespace gregorian + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_ymd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_ymd.hpp new file mode 100644 index 0000000000..086e73df4a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/greg_ymd.hpp @@ -0,0 +1,33 @@ +#ifndef DATE_TIME_GREG_YMD_HPP__ +#define DATE_TIME_GREG_YMD_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/year_month_day.hpp" +#include "boost/date_time/special_defs.hpp" +#include "boost/date_time/gregorian/greg_day.hpp" +#include "boost/date_time/gregorian/greg_year.hpp" +#include "boost/date_time/gregorian/greg_month.hpp" + +namespace boost { +namespace gregorian { + + typedef date_time::year_month_day_base greg_year_month_day; + + + +} } //namespace gregorian + + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian.hpp new file mode 100644 index 0000000000..bfafa1b037 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian.hpp @@ -0,0 +1,38 @@ +#ifndef GREGORIAN_HPP__ +#define GREGORIAN_HPP__ + +/* Copyright (c) 2002-2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +/*! @file gregorian.hpp + Single file header that provides overall include for all elements of + the gregorian date-time system. This includes the various types + defined, but also other functions for formatting and parsing. +*/ + + +#include "boost/date_time/compiler_config.hpp" +#include "boost/date_time/gregorian/gregorian_types.hpp" +#include "boost/date_time/gregorian/conversion.hpp" +#if defined(BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS) +#include "boost/date_time/gregorian/formatters_limited.hpp" +#else +#include "boost/date_time/gregorian/formatters.hpp" +#endif + +#if defined(USE_DATE_TIME_PRE_1_33_FACET_IO) +#include "boost/date_time/gregorian/greg_facet.hpp" +#else +#include "boost/date_time/gregorian/gregorian_io.hpp" +#endif // USE_DATE_TIME_PRE_1_33_FACET_IO + +#include "boost/date_time/gregorian/parsers.hpp" + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian_io.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian_io.hpp new file mode 100644 index 0000000000..62a759f55c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian_io.hpp @@ -0,0 +1,784 @@ +#ifndef DATE_TIME_GREGORIAN_IO_HPP__ +#define DATE_TIME_GREGORIAN_IO_HPP__ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +#include +#include +#include // i/ostreambuf_iterator +#include +#include +#include +#include +#include +#include +#include +#include // to_tm will be needed in the facets + +namespace boost { +namespace gregorian { + + + typedef boost::date_time::period_formatter wperiod_formatter; + typedef boost::date_time::period_formatter period_formatter; + + typedef boost::date_time::date_facet wdate_facet; + typedef boost::date_time::date_facet date_facet; + + typedef boost::date_time::period_parser period_parser; + typedef boost::date_time::period_parser wperiod_parser; + + typedef boost::date_time::special_values_formatter special_values_formatter; + typedef boost::date_time::special_values_formatter wspecial_values_formatter; + + typedef boost::date_time::special_values_parser special_values_parser; + typedef boost::date_time::special_values_parser wspecial_values_parser; + + typedef boost::date_time::date_input_facet date_input_facet; + typedef boost::date_time::date_input_facet wdate_input_facet; + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::date& d) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), d); + else { + //instantiate a custom facet for dealing with dates since the user + //has not put one in the stream so far. This is for efficiency + //since we would always need to reconstruct for every date + //if the locale did not already exist. Of course this will be overridden + //if the user imbues at some later point. With the default settings + //for the facet the resulting format will be the same as the + //std::time_facet settings. + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), d); + } + return os; + } + + //! input operator for date + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, date& d) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, d); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, d); + } + } + catch(...) { + // mask tells us what exceptions are turned on + std::ios_base::iostate exception_mask = is.exceptions(); + // if the user wants exceptions on failbit, we'll rethrow our + // date_time exception & set the failbit + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} // ignore this one + throw; // rethrow original exception + } + else { + // if the user want's to fail quietly, we simply set the failbit + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::date_duration& dd) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), dd); + else { + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), dd); + + } + return os; + } + + //! input operator for date_duration + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, date_duration& dd) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, dd); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, dd); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::date_period& dp) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), dp); + else { + //instantiate a custom facet for dealing with date periods since the user + //has not put one in the stream so far. This is for efficiency + //since we would always need to reconstruct for every time period + //if the local did not already exist. Of course this will be overridden + //if the user imbues at some later point. With the default settings + //for the facet the resulting format will be the same as the + //std::time_facet settings. + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), dp); + + } + return os; + } + + //! input operator for date_period + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, date_period& dp) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, dp); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, dp); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + /********** small gregorian types **********/ + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::greg_month& gm) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), gm); + else { + custom_date_facet* f = new custom_date_facet();//-> 10/1074199752/32 because year & day not initialized in put(...) + //custom_date_facet* f = new custom_date_facet("%B"); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), gm); + } + return os; + } + + //! input operator for greg_month + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, greg_month& m) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, m); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, m); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::greg_weekday& gw) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), gw); + else { + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), gw); + } + return os; + } + + //! input operator for greg_weekday + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, greg_weekday& wd) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, wd); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, wd); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + //NOTE: output operator for greg_day was not necessary + + //! input operator for greg_day + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, greg_day& gd) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, gd); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, gd); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + //NOTE: output operator for greg_year was not necessary + + //! input operator for greg_year + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, greg_year& gy) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, gy); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, gy); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + /********** date generator types **********/ + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::partial_date& pd) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), pd); + else { + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), pd); + } + return os; + } + + //! input operator for partial_date + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, partial_date& pd) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, pd); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, pd); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::nth_day_of_the_week_in_month& nkd) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), nkd); + else { + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), nkd); + } + return os; + } + + //! input operator for nth_day_of_the_week_in_month + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, + nth_day_of_the_week_in_month& nday) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, nday); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, nday); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::first_day_of_the_week_in_month& fkd) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), fkd); + else { + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), fkd); + } + return os; + } + + //! input operator for first_day_of_the_week_in_month + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, + first_day_of_the_week_in_month& fkd) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, fkd); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, fkd); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::last_day_of_the_week_in_month& lkd) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), lkd); + else { + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), lkd); + } + return os; + } + + //! input operator for last_day_of_the_week_in_month + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, + last_day_of_the_week_in_month& lkd) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, lkd); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, lkd); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::first_day_of_the_week_after& fda) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) { + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), fda); + } + else { + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), fda); + } + return os; + } + + //! input operator for first_day_of_the_week_after + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, + first_day_of_the_week_after& fka) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, fka); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, fka); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const boost::gregorian::first_day_of_the_week_before& fdb) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::date_facet custom_date_facet; + std::ostreambuf_iterator output_itr(os); + if (std::has_facet(os.getloc())) { + std::use_facet(os.getloc()).put(output_itr, os, os.fill(), fdb); + } + else { + custom_date_facet* f = new custom_date_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(output_itr, os, os.fill(), fdb); + } + return os; + } + + //! input operator for first_day_of_the_week_before + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, + first_day_of_the_week_before& fkb) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::date_input_facet date_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, fkb); + } + else { + date_input_facet* f = new date_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, fkb); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + +} } // namespaces + +#endif // DATE_TIME_GREGORIAN_IO_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian_types.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian_types.hpp new file mode 100644 index 0000000000..0c74857a25 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/gregorian_types.hpp @@ -0,0 +1,109 @@ +#ifndef _GREGORIAN_TYPES_HPP__ +#define _GREGORIAN_TYPES_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +/*! @file gregorian_types.hpp + Single file header that defines most of the types for the gregorian + date-time system. +*/ + +#include "boost/date_time/date.hpp" +#include "boost/date_time/period.hpp" +#include "boost/date_time/gregorian/greg_calendar.hpp" +#include "boost/date_time/gregorian/greg_duration.hpp" +#if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) +#include "boost/date_time/gregorian/greg_duration_types.hpp" +#endif +#include "boost/date_time/gregorian/greg_date.hpp" +#include "boost/date_time/date_generators.hpp" +#include "boost/date_time/date_clock_device.hpp" +#include "boost/date_time/date_iterator.hpp" +#include "boost/date_time/adjust_functors.hpp" + +namespace boost { + +//! Gregorian date system based on date_time components +/*! This date system defines a full complement of types including + * a date, date_duration, date_period, day_clock, and a + * day_iterator. + */ +namespace gregorian { + //! Date periods for the gregorian system + /*!\ingroup date_basics + */ + typedef date_time::period date_period; + + //! A unifying date_generator base type + /*! A unifying date_generator base type for: + * partial_date, nth_day_of_the_week_in_month, + * first_day_of_the_week_in_month, and last_day_of_the_week_in_month + */ + typedef date_time::year_based_generator year_based_generator; + + //! A date generation object type + typedef date_time::partial_date partial_date; + + typedef date_time::nth_kday_of_month nth_kday_of_month; + typedef nth_kday_of_month nth_day_of_the_week_in_month; + + typedef date_time::first_kday_of_month first_kday_of_month; + typedef first_kday_of_month first_day_of_the_week_in_month; + + typedef date_time::last_kday_of_month last_kday_of_month; + typedef last_kday_of_month last_day_of_the_week_in_month; + + typedef date_time::first_kday_after first_kday_after; + typedef first_kday_after first_day_of_the_week_after; + + typedef date_time::first_kday_before first_kday_before; + typedef first_kday_before first_day_of_the_week_before; + + //! A clock to get the current day from the local computer + /*!\ingroup date_basics + */ + typedef date_time::day_clock day_clock; + + //! Base date_iterator type for gregorian types. + /*!\ingroup date_basics + */ + typedef date_time::date_itr_base date_iterator; + + //! A day level iterator + /*!\ingroup date_basics + */ + typedef date_time::date_itr, + date> day_iterator; + //! A week level iterator + /*!\ingroup date_basics + */ + typedef date_time::date_itr, + date> week_iterator; + //! A month level iterator + /*!\ingroup date_basics + */ + typedef date_time::date_itr, + date> month_iterator; + //! A year level iterator + /*!\ingroup date_basics + */ + typedef date_time::date_itr, + date> year_iterator; + + // bring in these date_generator functions from date_time namespace + using date_time::days_until_weekday; + using date_time::days_before_weekday; + using date_time::next_weekday; + using date_time::previous_weekday; + +} } //namespace gregorian + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/parsers.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/parsers.hpp new file mode 100644 index 0000000000..95d4f23dec --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian/parsers.hpp @@ -0,0 +1,91 @@ +#ifndef GREGORIAN_PARSERS_HPP___ +#define GREGORIAN_PARSERS_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/gregorian/gregorian_types.hpp" +#include "boost/date_time/date_parsing.hpp" +#include "boost/date_time/compiler_config.hpp" +#include "boost/date_time/parse_format_base.hpp" +#include +#include + +namespace boost { +namespace gregorian { + + //! Return special_value from string argument + /*! Return special_value from string argument. If argument is + * not one of the special value names (defined in src/gregorian/names.hpp), + * return 'not_special' */ + BOOST_DATE_TIME_DECL special_values special_value_from_string(const std::string& s); + + //! Deprecated: Use from_simple_string + inline date from_string(std::string s) { + return date_time::parse_date(s); + } + + //! From delimited date string where with order year-month-day eg: 2002-1-25 or 2003-Jan-25 (full month name is also accepted) + inline date from_simple_string(std::string s) { + return date_time::parse_date(s, date_time::ymd_order_iso); + } + + //! From delimited date string where with order year-month-day eg: 1-25-2003 or Jan-25-2003 (full month name is also accepted) + inline date from_us_string(std::string s) { + return date_time::parse_date(s, date_time::ymd_order_us); + } + + //! From delimited date string where with order day-month-year eg: 25-1-2002 or 25-Jan-2003 (full month name is also accepted) + inline date from_uk_string(std::string s) { + return date_time::parse_date(s, date_time::ymd_order_dmy); + } + + //! From iso type date string where with order year-month-day eg: 20020125 + inline date from_undelimited_string(std::string s) { + return date_time::parse_undelimited_date(s); + } + + //! From iso type date string where with order year-month-day eg: 20020125 + inline date date_from_iso_string(const std::string& s) { + return date_time::parse_undelimited_date(s); + } + +#if !(defined(BOOST_NO_STD_ITERATOR_TRAITS)) + //! Stream should hold a date in the form of: 2002-1-25. Month number, abbrev, or name are accepted + /* Arguments passed in by-value for convertability of char[] + * to iterator_type. Calls to from_stream_type are by-reference + * since conversion is already done */ + template + inline date from_stream(iterator_type beg, iterator_type end) { + if(beg == end) + { + return date(not_a_date_time); + } + typedef typename std::iterator_traits::value_type value_type; + return date_time::from_stream_type(beg, end, value_type()); + } +#endif //BOOST_NO_STD_ITERATOR_TRAITS + +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) + // This function cannot be compiled with MSVC 6.0 due to internal compiler shorcomings +#else + //! Function to parse a date_period from a string (eg: [2003-Oct-31/2003-Dec-25]) + inline date_period date_period_from_string(const std::string& s){ + return date_time::from_simple_string_type(s); + } +# if !defined(BOOST_NO_STD_WSTRING) + //! Function to parse a date_period from a wstring (eg: [2003-Oct-31/2003-Dec-25]) + inline date_period date_period_from_wstring(const std::wstring& s){ + return date_time::from_simple_string_type(s); + } +# endif // BOOST_NO_STD_WSTRING +#endif + +} } //namespace gregorian + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian_calendar.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian_calendar.hpp new file mode 100644 index 0000000000..c27c09e760 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian_calendar.hpp @@ -0,0 +1,70 @@ +#ifndef DATE_TIME_GREGORIAN_CALENDAR_HPP__ +#define DATE_TIME_GREGORIAN_CALENDAR_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + + +namespace boost { +namespace date_time { + + + //! An implementation of the Gregorian calendar + /*! This is a parameterized implementation of a proleptic Gregorian Calendar that + can be used in the creation of date systems or just to perform calculations. + All the methods of this class are static functions, so the intent is to + never create instances of this class. + @param ymd_type_ Struct type representing the year, month, day. The ymd_type must + define a of types for the year, month, and day. These types need to be + arithmetic types. + @param date_int_type_ Underlying type for the date count. Must be an arithmetic type. + */ + template + class gregorian_calendar_base { + public: + //! define a type a date split into components + typedef ymd_type_ ymd_type; + //! define a type for representing months + typedef typename ymd_type::month_type month_type; + //! define a type for representing days + typedef typename ymd_type::day_type day_type; + //! Type to hold a stand alone year value (eg: 2002) + typedef typename ymd_type::year_type year_type; + //! Define the integer type to use for internal calculations + typedef date_int_type_ date_int_type; + + + static unsigned short day_of_week(const ymd_type& ymd); + static int week_number(const ymd_type&ymd); + //static unsigned short day_of_year(date_int_type); + static date_int_type day_number(const ymd_type& ymd); + static date_int_type julian_day_number(const ymd_type& ymd); + static date_int_type modjulian_day_number(const ymd_type& ymd); + static ymd_type from_day_number(date_int_type); + static ymd_type from_julian_day_number(date_int_type); + static ymd_type from_modjulian_day_number(date_int_type); + static bool is_leap_year(year_type); + static unsigned short end_of_month_day(year_type y, month_type m); + static ymd_type epoch(); + static unsigned short days_in_week(); + + }; + + + +} } //namespace + +#ifndef NO_BOOST_DATE_TIME_INLINE +#include "boost/date_time/gregorian_calendar.ipp" +#endif + + + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian_calendar.ipp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian_calendar.ipp new file mode 100644 index 0000000000..a281b45cca --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/gregorian_calendar.ipp @@ -0,0 +1,219 @@ +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + +#ifndef NO_BOOST_DATE_TIME_INLINE + #undef BOOST_DATE_TIME_INLINE + #define BOOST_DATE_TIME_INLINE inline +#endif + +namespace boost { +namespace date_time { + //! Return the day of the week (0==Sunday, 1==Monday, etc) + /*! Converts a year-month-day into a day of the week number + */ + template + BOOST_DATE_TIME_INLINE + unsigned short + gregorian_calendar_base::day_of_week(const ymd_type& ymd) { + unsigned short a = static_cast((14-ymd.month)/12); + unsigned short y = static_cast(ymd.year - a); + unsigned short m = static_cast(ymd.month + 12*a - 2); + unsigned short d = static_cast((ymd.day + y + (y/4) - (y/100) + (y/400) + (31*m)/12) % 7); + //std::cout << year << "-" << month << "-" << day << " is day: " << d << "\n"; + return d; + } + + //!Return the iso week number for the date + /*!Implements the rules associated with the iso 8601 week number. + Basically the rule is that Week 1 of the year is the week that contains + January 4th or the week that contains the first Thursday in January. + Reference for this algorithm is the Calendar FAQ by Claus Tondering, April 2000. + */ + template + BOOST_DATE_TIME_INLINE + int + gregorian_calendar_base::week_number(const ymd_type& ymd) { + unsigned long julianbegin = julian_day_number(ymd_type(ymd.year,1,1)); + unsigned long juliantoday = julian_day_number(ymd); + unsigned long day = (julianbegin + 3) % 7; + unsigned long week = (juliantoday + day - julianbegin + 4)/7; + + if ((week >= 1) && (week <= 52)) { + return week; + } + + if ((week == 53)) { + if((day==6) ||(day == 5 && is_leap_year(ymd.year))) { + return week; //under these circumstances week == 53. + } else { + return 1; //monday - wednesday is in week 1 of next year + } + } + //if the week is not in current year recalculate using the previous year as the beginning year + else if (week == 0) { + julianbegin = julian_day_number(ymd_type(static_cast(ymd.year-1),1,1)); + juliantoday = julian_day_number(ymd); + day = (julianbegin + 3) % 7; + week = (juliantoday + day - julianbegin + 4)/7; + return week; + } + + return week; //not reachable -- well except if day == 5 and is_leap_year != true + + } + + //! Convert a ymd_type into a day number + /*! The day number is an absolute number of days since the start of count + */ + template + BOOST_DATE_TIME_INLINE + date_int_type_ + gregorian_calendar_base::day_number(const ymd_type& ymd) + { + unsigned short a = static_cast((14-ymd.month)/12); + unsigned short y = static_cast(ymd.year + 4800 - a); + unsigned short m = static_cast(ymd.month + 12*a - 3); + unsigned long d = ymd.day + ((153*m + 2)/5) + 365*y + (y/4) - (y/100) + (y/400) - 32045; + return d; + } + + //! Convert a year-month-day into the julian day number + /*! Since this implementation uses julian day internally, this is the same as the day_number. + */ + template + BOOST_DATE_TIME_INLINE + date_int_type_ + gregorian_calendar_base::julian_day_number(const ymd_type& ymd) + { + return day_number(ymd); + } + + //! Convert year-month-day into a modified julian day number + /*! The day number is an absolute number of days. + * MJD 0 thus started on 17 Nov 1858(Gregorian) at 00:00:00 UTC + */ + template + BOOST_DATE_TIME_INLINE + date_int_type_ + gregorian_calendar_base::modjulian_day_number(const ymd_type& ymd) + { + return julian_day_number(ymd)-2400001; //prerounded + } + + //! Change a day number into a year-month-day + template + BOOST_DATE_TIME_INLINE + ymd_type_ + gregorian_calendar_base::from_day_number(date_int_type dayNumber) + { + date_int_type a = dayNumber + 32044; + date_int_type b = (4*a + 3)/146097; + date_int_type c = a-((146097*b)/4); + date_int_type d = (4*c + 3)/1461; + date_int_type e = c - (1461*d)/4; + date_int_type m = (5*e + 2)/153; + unsigned short day = static_cast(e - ((153*m + 2)/5) + 1); + unsigned short month = static_cast(m + 3 - 12 * (m/10)); + year_type year = static_cast(100*b + d - 4800 + (m/10)); + //std::cout << year << "-" << month << "-" << day << "\n"; + + return ymd_type(static_cast(year),month,day); + } + + //! Change a day number into a year-month-day + template + BOOST_DATE_TIME_INLINE + ymd_type_ + gregorian_calendar_base::from_julian_day_number(date_int_type dayNumber) + { + date_int_type a = dayNumber + 32044; + date_int_type b = (4*a+3)/146097; + date_int_type c = a - ((146097*b)/4); + date_int_type d = (4*c + 3)/1461; + date_int_type e = c - ((1461*d)/4); + date_int_type m = (5*e + 2)/153; + unsigned short day = static_cast(e - ((153*m + 2)/5) + 1); + unsigned short month = static_cast(m + 3 - 12 * (m/10)); + year_type year = static_cast(100*b + d - 4800 + (m/10)); + //std::cout << year << "-" << month << "-" << day << "\n"; + + return ymd_type(year,month,day); + } + + //! Change a modified julian day number into a year-month-day + template + BOOST_DATE_TIME_INLINE + ymd_type_ + gregorian_calendar_base::from_modjulian_day_number(date_int_type dayNumber) { + date_int_type jd = dayNumber + 2400001; //is 2400000.5 prerounded + return from_julian_day_number(jd); + } + + //! Determine if the provided year is a leap year + /*! + *@return true if year is a leap year, false otherwise + */ + template + BOOST_DATE_TIME_INLINE + bool + gregorian_calendar_base::is_leap_year(year_type year) + { + //divisible by 4, not if divisible by 100, but true if divisible by 400 + return (!(year % 4)) && ((year % 100) || (!(year % 400))); + } + + //! Calculate the last day of the month + /*! Find the day which is the end of the month given year and month + * No error checking is performed. + */ + template + BOOST_DATE_TIME_INLINE + unsigned short + gregorian_calendar_base::end_of_month_day(year_type year, + month_type month) + { + switch (month) { + case 2: + if (is_leap_year(year)) { + return 29; + } else { + return 28; + }; + case 4: + case 6: + case 9: + case 11: + return 30; + default: + return 31; + }; + + } + + //! Provide the ymd_type specification for the calandar start + template + BOOST_DATE_TIME_INLINE + ymd_type_ + gregorian_calendar_base::epoch() + { + return ymd_type(1400,1,1); + } + + //! Defines length of a week for week calculations + template + BOOST_DATE_TIME_INLINE + unsigned short + gregorian_calendar_base::days_in_week() + { + return 7; + } + + +} } //namespace gregorian + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/int_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/int_adapter.hpp new file mode 100644 index 0000000000..fc98fc1278 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/int_adapter.hpp @@ -0,0 +1,509 @@ +#ifndef _DATE_TIME_INT_ADAPTER_HPP__ +#define _DATE_TIME_INT_ADAPTER_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + + +#include "boost/config.hpp" +#include "boost/limits.hpp" //work around compilers without limits +#include "boost/date_time/special_defs.hpp" +#include "boost/date_time/locale_config.hpp" +#ifndef BOOST_DATE_TIME_NO_LOCALE +# include +#endif + +namespace boost { +namespace date_time { + + +//! Adapter to create integer types with +-infinity, and not a value +/*! This class is used internally in counted date/time representations. + * It adds the floating point like features of infinities and + * not a number. It also provides mathmatical operations with + * consideration to special values following these rules: + *@code + * +infinity - infinity == Not A Number (NAN) + * infinity * non-zero == infinity + * infinity * zero == NAN + * +infinity * -integer == -infinity + * infinity / infinity == NAN + * infinity * infinity == infinity + *@endcode + */ +template +class int_adapter { +public: + typedef int_type_ int_type; + int_adapter(int_type v) : + value_(v) + {} + static bool has_infinity() + { + return true; + } + static const int_adapter pos_infinity() + { + return (::std::numeric_limits::max)(); + } + static const int_adapter neg_infinity() + { + return (::std::numeric_limits::min)(); + } + static const int_adapter not_a_number() + { + return (::std::numeric_limits::max)()-1; + } + static int_adapter max BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return (::std::numeric_limits::max)()-2; + } + static int_adapter min BOOST_PREVENT_MACRO_SUBSTITUTION () + { + return (::std::numeric_limits::min)()+1; + } + static int_adapter from_special(special_values sv) + { + switch (sv) { + case not_a_date_time: return not_a_number(); + case neg_infin: return neg_infinity(); + case pos_infin: return pos_infinity(); + case max_date_time: return (max)(); + case min_date_time: return (min)(); + default: return not_a_number(); + } + } + static bool is_inf(int_type v) + { + return (v == neg_infinity().as_number() || + v == pos_infinity().as_number()); + } + static bool is_neg_inf(int_type v) + { + return (v == neg_infinity().as_number()); + } + static bool is_pos_inf(int_type v) + { + return (v == pos_infinity().as_number()); + } + static bool is_not_a_number(int_type v) + { + return (v == not_a_number().as_number()); + } + //! Returns either special value type or is_not_special + static special_values to_special(int_type v) + { + if (is_not_a_number(v)) return not_a_date_time; + if (is_neg_inf(v)) return neg_infin; + if (is_pos_inf(v)) return pos_infin; + return not_special; + } + + //-3 leaves room for representations of infinity and not a date + static int_type maxcount() + { + return (::std::numeric_limits::max)()-3; + } + bool is_infinity() const + { + return (value_ == neg_infinity().as_number() || + value_ == pos_infinity().as_number()); + } + bool is_pos_infinity()const + { + return(value_ == pos_infinity().as_number()); + } + bool is_neg_infinity()const + { + return(value_ == neg_infinity().as_number()); + } + bool is_nan() const + { + return (value_ == not_a_number().as_number()); + } + bool is_special() const + { + return(is_infinity() || is_nan()); + } + bool operator==(const int_adapter& rhs) const + { + return (compare(rhs) == 0); + } + bool operator==(const int& rhs) const + { + // quiets compiler warnings + bool is_signed = std::numeric_limits::is_signed; + if(!is_signed) + { + if(is_neg_inf(value_) && rhs == 0) + { + return false; + } + } + return (compare(rhs) == 0); + } + bool operator!=(const int_adapter& rhs) const + { + return (compare(rhs) != 0); + } + bool operator!=(const int& rhs) const + { + // quiets compiler warnings + bool is_signed = std::numeric_limits::is_signed; + if(!is_signed) + { + if(is_neg_inf(value_) && rhs == 0) + { + return true; + } + } + return (compare(rhs) != 0); + } + bool operator<(const int_adapter& rhs) const + { + return (compare(rhs) == -1); + } + bool operator<(const int& rhs) const + { + // quiets compiler warnings + bool is_signed = std::numeric_limits::is_signed; + if(!is_signed) + { + if(is_neg_inf(value_) && rhs == 0) + { + return true; + } + } + return (compare(rhs) == -1); + } + bool operator>(const int_adapter& rhs) const + { + return (compare(rhs) == 1); + } + int_type as_number() const + { + return value_; + } + //! Returns either special value type or is_not_special + special_values as_special() const + { + return int_adapter::to_special(value_); + } + //creates nasty ambiguities +// operator int_type() const +// { +// return value_; +// } + + /*! Operator allows for adding dissimilar int_adapter types. + * The return type will match that of the the calling object's type */ + template + inline + int_adapter operator+(const int_adapter& rhs) const + { + if(is_special() || rhs.is_special()) + { + if (is_nan() || rhs.is_nan()) + { + return int_adapter::not_a_number(); + } + if((is_pos_inf(value_) && rhs.is_neg_inf(rhs.as_number())) || + (is_neg_inf(value_) && rhs.is_pos_inf(rhs.as_number())) ) + { + return int_adapter::not_a_number(); + } + if (is_infinity()) + { + return *this; + } + if (rhs.is_pos_inf(rhs.as_number())) + { + return int_adapter::pos_infinity(); + } + if (rhs.is_neg_inf(rhs.as_number())) + { + return int_adapter::neg_infinity(); + } + } + return int_adapter(value_ + rhs.as_number()); + } + + int_adapter operator+(const int_type rhs) const + { + if(is_special()) + { + if (is_nan()) + { + return int_adapter(not_a_number()); + } + if (is_infinity()) + { + return *this; + } + } + return int_adapter(value_ + rhs); + } + + /*! Operator allows for subtracting dissimilar int_adapter types. + * The return type will match that of the the calling object's type */ + template + inline + int_adapter operator-(const int_adapter& rhs)const + { + if(is_special() || rhs.is_special()) + { + if (is_nan() || rhs.is_nan()) + { + return int_adapter::not_a_number(); + } + if((is_pos_inf(value_) && rhs.is_pos_inf(rhs.as_number())) || + (is_neg_inf(value_) && rhs.is_neg_inf(rhs.as_number())) ) + { + return int_adapter::not_a_number(); + } + if (is_infinity()) + { + return *this; + } + if (rhs.is_pos_inf(rhs.as_number())) + { + return int_adapter::neg_infinity(); + } + if (rhs.is_neg_inf(rhs.as_number())) + { + return int_adapter::pos_infinity(); + } + } + return int_adapter(value_ - rhs.as_number()); + } + int_adapter operator-(const int_type rhs) const + { + if(is_special()) + { + if (is_nan()) + { + return int_adapter(not_a_number()); + } + if (is_infinity()) + { + return *this; + } + } + return int_adapter(value_ - rhs); + } + + // should templatize this to be consistant with op +- + int_adapter operator*(const int_adapter& rhs)const + { + if(this->is_special() || rhs.is_special()) + { + return mult_div_specials(rhs); + } + return int_adapter(value_ * rhs.value_); + } + /*! Provided for cases when automatic conversion from + * 'int' to 'int_adapter' causes incorrect results. */ + int_adapter operator*(const int rhs) const + { + if(is_special()) + { + return mult_div_specials(rhs); + } + return int_adapter(value_ * rhs); + } + + // should templatize this to be consistant with op +- + int_adapter operator/(const int_adapter& rhs)const + { + if(this->is_special() || rhs.is_special()) + { + if(is_infinity() && rhs.is_infinity()) + { + return int_adapter(not_a_number()); + } + if(rhs != 0) + { + return mult_div_specials(rhs); + } + else { // let divide by zero blow itself up + return int_adapter(value_ / rhs.value_); + } + } + return int_adapter(value_ / rhs.value_); + } + /*! Provided for cases when automatic conversion from + * 'int' to 'int_adapter' causes incorrect results. */ + int_adapter operator/(const int rhs) const + { + if(is_special() && rhs != 0) + { + return mult_div_specials(rhs); + } + return int_adapter(value_ / rhs); + } + + // should templatize this to be consistant with op +- + int_adapter operator%(const int_adapter& rhs)const + { + if(this->is_special() || rhs.is_special()) + { + if(is_infinity() && rhs.is_infinity()) + { + return int_adapter(not_a_number()); + } + if(rhs != 0) + { + return mult_div_specials(rhs); + } + else { // let divide by zero blow itself up + return int_adapter(value_ % rhs.value_); + } + } + return int_adapter(value_ % rhs.value_); + } + /*! Provided for cases when automatic conversion from + * 'int' to 'int_adapter' causes incorrect results. */ + int_adapter operator%(const int rhs) const + { + if(is_special() && rhs != 0) + { + return mult_div_specials(rhs); + } + return int_adapter(value_ % rhs); + } +private: + int_type value_; + + //! returns -1, 0, 1, or 2 if 'this' is <, ==, >, or 'nan comparison' rhs + int compare(const int_adapter& rhs)const + { + if(this->is_special() || rhs.is_special()) + { + if(this->is_nan() || rhs.is_nan()) { + if(this->is_nan() && rhs.is_nan()) { + return 0; // equal + } + else { + return 2; // nan + } + } + if((is_neg_inf(value_) && !is_neg_inf(rhs.value_)) || + (is_pos_inf(rhs.value_) && !is_pos_inf(value_)) ) + { + return -1; // less than + } + if((is_pos_inf(value_) && !is_pos_inf(rhs.value_)) || + (is_neg_inf(rhs.value_) && !is_neg_inf(value_)) ) { + return 1; // greater than + } + } + if(value_ < rhs.value_) return -1; + if(value_ > rhs.value_) return 1; + // implied-> if(value_ == rhs.value_) + return 0; + } + /* When multiplying and dividing with at least 1 special value + * very simmilar rules apply. In those cases where the rules + * are different, they are handled in the respective operator + * function. */ + //! Assumes at least 'this' or 'rhs' is a special value + int_adapter mult_div_specials(const int_adapter& rhs)const + { + int min_value; + // quiets compiler warnings + bool is_signed = std::numeric_limits::is_signed; + if(is_signed) { + min_value = 0; + } + else { + min_value = 1;// there is no zero with unsigned + } + if(this->is_nan() || rhs.is_nan()) { + return int_adapter(not_a_number()); + } + if((*this > 0 && rhs > 0) || (*this < min_value && rhs < min_value)) { + return int_adapter(pos_infinity()); + } + if((*this > 0 && rhs < min_value) || (*this < min_value && rhs > 0)) { + return int_adapter(neg_infinity()); + } + //implied -> if(this->value_ == 0 || rhs.value_ == 0) + return int_adapter(not_a_number()); + } + /* Overloaded function necessary because of special + * situation where int_adapter is instantiated with + * 'unsigned' and func is called with negative int. + * It would produce incorrect results since 'unsigned' + * wraps around when initialized with a negative value */ + //! Assumes 'this' is a special value + int_adapter mult_div_specials(const int& rhs) const + { + int min_value; + // quiets compiler warnings + bool is_signed = std::numeric_limits::is_signed; + if(is_signed) { + min_value = 0; + } + else { + min_value = 1;// there is no zero with unsigned + } + if(this->is_nan()) { + return int_adapter(not_a_number()); + } + if((*this > 0 && rhs > 0) || (*this < min_value && rhs < 0)) { + return int_adapter(pos_infinity()); + } + if((*this > 0 && rhs < 0) || (*this < min_value && rhs > 0)) { + return int_adapter(neg_infinity()); + } + //implied -> if(this->value_ == 0 || rhs.value_ == 0) + return int_adapter(not_a_number()); + } + +}; + +#ifndef BOOST_DATE_TIME_NO_LOCALE + /*! Expected output is either a numeric representation + * or a special values representation.
+ * Ex. "12", "+infinity", "not-a-number", etc. */ + //template, typename int_type> + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const int_adapter& ia) + { + if(ia.is_special()) { + // switch copied from date_names_put.hpp + switch(ia.as_special()) + { + case not_a_date_time: + os << "not-a-number"; + break; + case pos_infin: + os << "+infinity"; + break; + case neg_infin: + os << "-infinity"; + break; + default: + os << ""; + } + } + else { + os << ia.as_number(); + } + return os; + } +#endif + + +} } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/iso_format.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/iso_format.hpp new file mode 100644 index 0000000000..8262fa2117 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/iso_format.hpp @@ -0,0 +1,303 @@ +#ifndef ISO_FORMAT_HPP___ +#define ISO_FORMAT_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/parse_format_base.hpp" + +namespace boost { +namespace date_time { + +//! Class to provide common iso formatting spec +template +class iso_format_base { +public: + //! Describe month format -- its an integer in iso format + static month_format_spec month_format() + { + return month_as_integer; + } + + //! String used printed is date is invalid + static const charT* not_a_date() + { + return "not-a-date-time"; + } + //! String used to for positive infinity value + static const charT* pos_infinity() + { + return "+infinity"; + } + //! String used to for positive infinity value + static const charT* neg_infinity() + { + return "-infinity"; + } + + //! ISO char for a year -- used in durations + static charT year_sep_char() + { + return 'Y'; + } + //! ISO char for a month + static charT month_sep_char() + { + return '-'; + } + //! ISO char for a day + static charT day_sep_char() + { + return '-'; + } + //! char for minute + static charT hour_sep_char() + { + return ':'; + } + //! char for minute + static charT minute_sep_char() + { + return ':'; + } + //! char for second + static charT second_sep_char() + { + return ':'; + } + //! ISO char for a period + static charT period_start_char() + { + return 'P'; + } + //! Used in time in mixed strings to set start of time + static charT time_start_char() + { + return 'T'; + } + + //! Used in mixed strings to identify start of a week number + static charT week_start_char() + { + return 'W'; + } + + //! Separators for periods + static charT period_sep_char() + { + return '/'; + } + //! Separator for hh:mm:ss + static charT time_sep_char() + { + return ':'; + } + //! Preferred Separator for hh:mm:ss,decimal_fraction + static charT fractional_time_sep_char() + { + return ','; + } + + static bool is_component_sep(charT sep) + { + switch(sep) { + case 'H': + case 'M': + case 'S': + case 'W': + case 'T': + case 'Y': + case 'D':return true; + default: + return false; + } + } + + static bool is_fractional_time_sep(charT sep) + { + switch(sep) { + case ',': + case '.': return true; + default: return false; + } + } + static bool is_timezone_sep(charT sep) + { + switch(sep) { + case '+': + case '-': return true; + default: return false; + } + } + static charT element_sep_char() + { + return '-'; + } + +}; + +#ifndef BOOST_NO_STD_WSTRING + +//! Class to provide common iso formatting spec +template<> +class iso_format_base { +public: + //! Describe month format -- its an integer in iso format + static month_format_spec month_format() + { + return month_as_integer; + } + + //! String used printed is date is invalid + static const wchar_t* not_a_date() + { + return L"not-a-date-time"; + } + //! String used to for positive infinity value + static const wchar_t* pos_infinity() + { + return L"+infinity"; + } + //! String used to for positive infinity value + static const wchar_t* neg_infinity() + { + return L"-infinity"; + } + + //! ISO char for a year -- used in durations + static wchar_t year_sep_char() + { + return 'Y'; + } + //! ISO char for a month + static wchar_t month_sep_char() + { + return '-'; + } + //! ISO char for a day + static wchar_t day_sep_char() + { + return '-'; + } + //! char for minute + static wchar_t hour_sep_char() + { + return ':'; + } + //! char for minute + static wchar_t minute_sep_char() + { + return ':'; + } + //! char for second + static wchar_t second_sep_char() + { + return ':'; + } + //! ISO char for a period + static wchar_t period_start_char() + { + return 'P'; + } + //! Used in time in mixed strings to set start of time + static wchar_t time_start_char() + { + return 'T'; + } + + //! Used in mixed strings to identify start of a week number + static wchar_t week_start_char() + { + return 'W'; + } + + //! Separators for periods + static wchar_t period_sep_char() + { + return '/'; + } + //! Separator for hh:mm:ss + static wchar_t time_sep_char() + { + return ':'; + } + //! Preferred Separator for hh:mm:ss,decimal_fraction + static wchar_t fractional_time_sep_char() + { + return ','; + } + + static bool is_component_sep(wchar_t sep) + { + switch(sep) { + case 'H': + case 'M': + case 'S': + case 'W': + case 'T': + case 'Y': + case 'D':return true; + default: + return false; + } + } + + static bool is_fractional_time_sep(wchar_t sep) + { + switch(sep) { + case ',': + case '.': return true; + default: return false; + } + } + static bool is_timezone_sep(wchar_t sep) + { + switch(sep) { + case '+': + case '-': return true; + default: return false; + } + } + static wchar_t element_sep_char() + { + return '-'; + } + +}; + +#endif // BOOST_NO_STD_WSTRING + +//! Format description for iso normal YYYYMMDD +template +class iso_format : public iso_format_base { +public: + //! The ios standard format doesn't use char separators + static bool has_date_sep_chars() + { + return false; + } +}; + +//! Extended format uses seperators YYYY-MM-DD +template +class iso_extended_format : public iso_format_base { +public: + //! Extended format needs char separators + static bool has_date_sep_chars() + { + return true; + } + +}; + +} } //namespace date_time + + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/conversion.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/conversion.hpp new file mode 100644 index 0000000000..13e4d3eb5c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/conversion.hpp @@ -0,0 +1,34 @@ +#ifndef DATE_TIME_LOCAL_TIME_CONVERSION_HPP__ +#define DATE_TIME_LOCAL_TIME_CONVERSION_HPP__ + +/* Copyright (c) 2003-2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2009-06-04 04:24:49 -0400 (Thu, 04 Jun 2009) $ + */ + + +#include "boost/date_time/posix_time/conversion.hpp" +#include "boost/date_time/c_time.hpp" +#include "boost/date_time/local_time/local_date_time.hpp" + +namespace boost { +namespace local_time { + +//! Function that creates a tm struct from a local_date_time +inline +std::tm to_tm(const local_date_time& lt) { + std::tm lt_tm = posix_time::to_tm(lt.local_time()); + if(lt.is_dst()){ + lt_tm.tm_isdst = 1; + } + else{ + lt_tm.tm_isdst = 0; + } + return lt_tm; +} + + +}} // namespaces +#endif // DATE_TIME_LOCAL_TIME_CONVERSION_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/custom_time_zone.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/custom_time_zone.hpp new file mode 100644 index 0000000000..a6c1d42055 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/custom_time_zone.hpp @@ -0,0 +1,169 @@ +#ifndef LOCAL_TIME_CUSTOM_TIME_ZONE_HPP__ +#define LOCAL_TIME_CUSTOM_TIME_ZONE_HPP__ + +/* Copyright (c) 2003-2005 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/time_zone_base.hpp" +#include "boost/date_time/time_zone_names.hpp" +#include "boost/date_time/posix_time/posix_time.hpp" +#include "boost/date_time/local_time/dst_transition_day_rules.hpp" +#include "boost/date_time/string_convert.hpp" +//#include "boost/date_time/special_defs.hpp" +#include "boost/shared_ptr.hpp" + +namespace boost { +namespace local_time { + + //typedef boost::date_time::time_zone_names time_zone_names; + typedef boost::date_time::dst_adjustment_offsets dst_adjustment_offsets; + //typedef boost::date_time::time_zone_base time_zone; + typedef boost::shared_ptr dst_calc_rule_ptr; + + //! A real time zone + template + class custom_time_zone_base : public date_time::time_zone_base { + public: + typedef boost::posix_time::time_duration time_duration_type; + typedef date_time::time_zone_base base_type; + typedef typename base_type::string_type string_type; + typedef typename base_type::stringstream_type stringstream_type; + typedef date_time::time_zone_names_base time_zone_names; + typedef CharT char_type; + + custom_time_zone_base(const time_zone_names& zone_names, + const time_duration_type& utc_offset, + const dst_adjustment_offsets& dst_shift, + boost::shared_ptr calc_rule) : + zone_names_(zone_names), + base_utc_offset_(utc_offset), + dst_offsets_(dst_shift), + dst_calc_rules_(calc_rule) + {}; + virtual ~custom_time_zone_base() {}; + virtual string_type dst_zone_abbrev() const + { + return zone_names_.dst_zone_abbrev(); + } + virtual string_type std_zone_abbrev() const + { + return zone_names_.std_zone_abbrev(); + } + virtual string_type dst_zone_name() const + { + return zone_names_.dst_zone_name(); + } + virtual string_type std_zone_name() const + { + return zone_names_.std_zone_name(); + } + //! True if zone uses daylight savings adjustments + virtual bool has_dst() const + { + return (dst_calc_rules_); //if calc_rule is set the tz has dst + } + //! Local time that DST starts -- NADT if has_dst is false + virtual posix_time::ptime dst_local_start_time(gregorian::greg_year y) const + { + gregorian::date d(gregorian::not_a_date_time); + if (dst_calc_rules_) { + d = dst_calc_rules_->start_day(y); + } + return posix_time::ptime(d, dst_offsets_.dst_start_offset_); + } + //! Local time that DST ends -- NADT if has_dst is false + virtual posix_time::ptime dst_local_end_time(gregorian::greg_year y) const + { + gregorian::date d(gregorian::not_a_date_time); + if (dst_calc_rules_) { + d = dst_calc_rules_->end_day(y); + } + return posix_time::ptime(d, dst_offsets_.dst_end_offset_); + } + //! Base offset from UTC for zone (eg: -07:30:00) + virtual time_duration_type base_utc_offset() const + { + return base_utc_offset_; + } + //! Adjustment forward or back made while DST is in effect + virtual time_duration_type dst_offset() const + { + return dst_offsets_.dst_adjust_; + } + //! Returns a POSIX time_zone string for this object + virtual string_type to_posix_string() const + { + // std offset dst [offset],start[/time],end[/time] - w/o spaces + stringstream_type ss; + ss.fill('0'); + boost::shared_ptr no_rules; + // std + ss << std_zone_abbrev(); + // offset + if(base_utc_offset().is_negative()) { + // inverting the sign guarantees we get two digits + ss << '-' << std::setw(2) << base_utc_offset().invert_sign().hours(); + } + else { + ss << '+' << std::setw(2) << base_utc_offset().hours(); + } + if(base_utc_offset().minutes() != 0 || base_utc_offset().seconds() != 0) { + ss << ':' << std::setw(2) << base_utc_offset().minutes(); + if(base_utc_offset().seconds() != 0) { + ss << ':' << std::setw(2) << base_utc_offset().seconds(); + } + } + if(dst_calc_rules_ != no_rules) { + // dst + ss << dst_zone_abbrev(); + // dst offset + if(dst_offset().is_negative()) { + // inverting the sign guarantees we get two digits + ss << '-' << std::setw(2) << dst_offset().invert_sign().hours(); + } + else { + ss << '+' << std::setw(2) << dst_offset().hours(); + } + if(dst_offset().minutes() != 0 || dst_offset().seconds() != 0) { + ss << ':' << std::setw(2) << dst_offset().minutes(); + if(dst_offset().seconds() != 0) { + ss << ':' << std::setw(2) << dst_offset().seconds(); + } + } + // start/time + ss << ',' << date_time::convert_string_type(dst_calc_rules_->start_rule_as_string()) << '/' + << std::setw(2) << dst_offsets_.dst_start_offset_.hours() << ':' + << std::setw(2) << dst_offsets_.dst_start_offset_.minutes(); + if(dst_offsets_.dst_start_offset_.seconds() != 0) { + ss << ':' << std::setw(2) << dst_offsets_.dst_start_offset_.seconds(); + } + // end/time + ss << ',' << date_time::convert_string_type(dst_calc_rules_->end_rule_as_string()) << '/' + << std::setw(2) << dst_offsets_.dst_end_offset_.hours() << ':' + << std::setw(2) << dst_offsets_.dst_end_offset_.minutes(); + if(dst_offsets_.dst_end_offset_.seconds() != 0) { + ss << ':' << std::setw(2) << dst_offsets_.dst_end_offset_.seconds(); + } + } + + return ss.str(); + } + private: + time_zone_names zone_names_; + bool has_dst_; + time_duration_type base_utc_offset_; + dst_adjustment_offsets dst_offsets_; + boost::shared_ptr dst_calc_rules_; + }; + + typedef custom_time_zone_base custom_time_zone; + +} }//namespace + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/date_duration_operators.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/date_duration_operators.hpp new file mode 100644 index 0000000000..ee870227a9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/date_duration_operators.hpp @@ -0,0 +1,115 @@ +#ifndef LOCAL_TIME_DATE_DURATION_OPERATORS_HPP___ +#define LOCAL_TIME_DATE_DURATION_OPERATORS_HPP___ + +/* Copyright (c) 2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/gregorian/greg_duration_types.hpp" +#include "boost/date_time/local_time/local_date_time.hpp" + +namespace boost { +namespace local_time { + + /*!@file date_duration_operators.hpp Operators for local_date_time and + * optional gregorian types. Operators use snap-to-end-of-month behavior. + * Further details on this behavior can be found in reference for + * date_time/date_duration_types.hpp and documentation for + * month and year iterators. + */ + + + /*! Adds a months object and a local_date_time. Result will be same + * day-of-month as local_date_time unless original day was the last day of month. + * see date_time::months_duration for more details */ + inline + local_date_time + operator+(const local_date_time& t, const boost::gregorian::months& m) + { + return t + m.get_offset(t.utc_time().date()); + } + + /*! Adds a months object to a local_date_time. Result will be same + * day-of-month as local_date_time unless original day was the last day of month. + * see date_time::months_duration for more details */ + inline + local_date_time + operator+=(local_date_time& t, const boost::gregorian::months& m) + { + return t += m.get_offset(t.utc_time().date()); + } + + /*! Subtracts a months object and a local_date_time. Result will be same + * day-of-month as local_date_time unless original day was the last day of month. + * see date_time::months_duration for more details */ + inline + local_date_time + operator-(const local_date_time& t, const boost::gregorian::months& m) + { + // get_neg_offset returns a negative duration, so we add + return t + m.get_neg_offset(t.utc_time().date()); + } + + /*! Subtracts a months object from a local_date_time. Result will be same + * day-of-month as local_date_time unless original day was the last day of month. + * see date_time::months_duration for more details */ + inline + local_date_time + operator-=(local_date_time& t, const boost::gregorian::months& m) + { + // get_neg_offset returns a negative duration, so we add + return t += m.get_neg_offset(t.utc_time().date()); + } + + // local_date_time & years + + /*! Adds a years object and a local_date_time. Result will be same + * month and day-of-month as local_date_time unless original day was the + * last day of month. see date_time::years_duration for more details */ + inline + local_date_time + operator+(const local_date_time& t, const boost::gregorian::years& y) + { + return t + y.get_offset(t.utc_time().date()); + } + + /*! Adds a years object to a local_date_time. Result will be same + * month and day-of-month as local_date_time unless original day was the + * last day of month. see date_time::years_duration for more details */ + inline + local_date_time + operator+=(local_date_time& t, const boost::gregorian::years& y) + { + return t += y.get_offset(t.utc_time().date()); + } + + /*! Subtracts a years object and a local_date_time. Result will be same + * month and day-of-month as local_date_time unless original day was the + * last day of month. see date_time::years_duration for more details */ + inline + local_date_time + operator-(const local_date_time& t, const boost::gregorian::years& y) + { + // get_neg_offset returns a negative duration, so we add + return t + y.get_neg_offset(t.utc_time().date()); + } + + /*! Subtracts a years object from a local_date_time. Result will be same + * month and day-of-month as local_date_time unless original day was the + * last day of month. see date_time::years_duration for more details */ + inline + local_date_time + operator-=(local_date_time& t, const boost::gregorian::years& y) + { + // get_neg_offset returns a negative duration, so we add + return t += y.get_neg_offset(t.utc_time().date()); + } + + +}} // namespaces + +#endif // LOCAL_TIME_DATE_DURATION_OPERATORS_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/dst_transition_day_rules.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/dst_transition_day_rules.hpp new file mode 100644 index 0000000000..3d6cfbacf4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/dst_transition_day_rules.hpp @@ -0,0 +1,77 @@ +#ifndef LOCAL_TIME_DST_TRANSITION_DAY_RULES_HPP__ +#define LOCAL_TIME_DST_TRANSITION_DAY_RULES_HPP__ + +/* Copyright (c) 2003-2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + +#include "boost/date_time/gregorian/gregorian_types.hpp" +#include "boost/date_time/dst_transition_generators.hpp" + +namespace boost { +namespace local_time { + + //! Provides rule of the form starting Apr 30 ending Oct 21 + typedef date_time::dst_day_calc_rule dst_calc_rule; + + struct partial_date_rule_spec + { + typedef gregorian::date date_type; + typedef gregorian::partial_date start_rule; + typedef gregorian::partial_date end_rule; + }; + + //! Provides rule of the form first Sunday in April, last Saturday in Oct + typedef date_time::day_calc_dst_rule partial_date_dst_rule; + + struct first_last_rule_spec + { + typedef gregorian::date date_type; + typedef gregorian::first_kday_of_month start_rule; + typedef gregorian::last_kday_of_month end_rule; + }; + + //! Provides rule of the form first Sunday in April, last Saturday in Oct + typedef date_time::day_calc_dst_rule first_last_dst_rule; + + struct last_last_rule_spec + { + typedef gregorian::date date_type; + typedef gregorian::last_kday_of_month start_rule; + typedef gregorian::last_kday_of_month end_rule; + }; + + //! Provides rule of the form last Sunday in April, last Saturday in Oct + typedef date_time::day_calc_dst_rule last_last_dst_rule; + + struct nth_last_rule_spec + { + typedef gregorian::date date_type; + typedef gregorian::nth_kday_of_month start_rule; + typedef gregorian::last_kday_of_month end_rule; + }; + + //! Provides rule in form of [1st|2nd|3rd|4th] Sunday in April, last Sunday in Oct + typedef date_time::day_calc_dst_rule nth_last_dst_rule; + + struct nth_kday_rule_spec + { + typedef gregorian::date date_type; + typedef gregorian::nth_kday_of_month start_rule; + typedef gregorian::nth_kday_of_month end_rule; + }; + + //! Provides rule in form of [1st|2nd|3rd|4th] Sunday in April/October + typedef date_time::day_calc_dst_rule nth_kday_dst_rule; + //! Provides rule in form of [1st|2nd|3rd|4th] Sunday in April/October + typedef date_time::day_calc_dst_rule nth_day_of_the_week_in_month_dst_rule; + + +} }//namespace + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_date_time.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_date_time.hpp new file mode 100644 index 0000000000..9c9f62340f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_date_time.hpp @@ -0,0 +1,528 @@ +#ifndef LOCAL_TIME_LOCAL_DATE_TIME_HPP__ +#define LOCAL_TIME_LOCAL_DATE_TIME_HPP__ + +/* Copyright (c) 2003-2005 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + +#include +#include +#include +#include +#include +#include +#include +#include //todo remove? +#include +#include +#include +#include // absolute_value + +namespace boost { +namespace local_time { + + //! simple exception for reporting when STD or DST cannot be determined + struct ambiguous_result : public std::logic_error + { + ambiguous_result (std::string const& msg = std::string()) : + std::logic_error(std::string("Daylight Savings Results are ambiguous: " + msg)) {} + }; + //! simple exception for when time label given cannot exist + struct time_label_invalid : public std::logic_error + { + time_label_invalid (std::string const& msg = std::string()) : + std::logic_error(std::string("Time label given is invalid: " + msg)) {} + }; + struct dst_not_valid: public std::logic_error + { + dst_not_valid(std::string const& msg = std::string()) : + std::logic_error(std::string("is_dst flag does not match resulting dst for time label given: " + msg)) {} + }; + + //TODO: I think these should be in local_date_time_base and not + // necessarily brought into the namespace + using date_time::time_is_dst_result; + using date_time::is_in_dst; + using date_time::is_not_in_dst; + using date_time::ambiguous; + using date_time::invalid_time_label; + + //! Representation of "wall-clock" time in a particular time zone + /*! Representation of "wall-clock" time in a particular time zone + * Local_date_time_base holds a time value (date and time offset from 00:00) + * along with a time zone. The time value is stored as UTC and conversions + * to wall clock time are made as needed. This approach allows for + * operations between wall-clock times in different time zones, and + * daylight savings time considerations, to be made. Time zones are + * required to be in the form of a boost::shared_ptr. + */ + template > + class local_date_time_base : public date_time::base_time { + public: + typedef utc_time_ utc_time_type; + typedef typename utc_time_type::time_duration_type time_duration_type; + typedef typename utc_time_type::date_type date_type; + typedef typename date_type::duration_type date_duration_type; + typedef typename utc_time_type::time_system_type time_system_type; + /*! This constructor interprets the passed time as a UTC time. + * So, for example, if the passed timezone is UTC-5 then the + * time will be adjusted back 5 hours. The time zone allows for + * automatic calculation of whether the particular time is adjusted for + * daylight savings, etc. + * If the time zone shared pointer is null then time stays unadjusted. + *@param t A UTC time + *@param tz Timezone for to adjust the UTC time to. + */ + local_date_time_base(utc_time_type t, + boost::shared_ptr tz) : + date_time::base_time(t), + zone_(tz) + { + // param was already utc so nothing more to do + } + + /*! This constructs a local time -- the passed time information + * understood to be in the passed tz. The DST flag must be passed + * to indicate whether the time is in daylight savings or not. + * @throws -- time_label_invalid if the time passed does not exist in + * the given locale. The non-existent case occurs typically + * during the shift-back from daylight savings time. When + * the clock is shifted forward a range of times + * (2 am to 3 am in the US) is skipped and hence is invalid. + * @throws -- dst_not_valid if the DST flag is passed for a period + * where DST is not active. + */ + local_date_time_base(date_type d, + time_duration_type td, + boost::shared_ptr tz, + bool dst_flag) : //necessary for constr_adj() + date_time::base_time(construction_adjustment(utc_time_type(d, td), tz, dst_flag)), + zone_(tz) + { + if(tz != boost::shared_ptr() && tz->has_dst()){ + + // d & td are already local so we use them + time_is_dst_result result = check_dst(d, td, tz); + bool in_dst = (result == is_in_dst); // less processing than is_dst() + + // ambig occurs at end, invalid at start + if(result == invalid_time_label){ + // Ex: 2:15am local on trans-in day in nyc, dst_flag irrelevant + std::ostringstream ss; + ss << "time given: " << d << ' ' << td; + boost::throw_exception(time_label_invalid(ss.str())); + } + else if(result != ambiguous && in_dst != dst_flag){ + // is dst_flag accurate? + // Ex: false flag in NYC in June + std::ostringstream ss; + ss.setf(std::ios_base::boolalpha); + ss << "flag given: dst=" << dst_flag << ", dst calculated: dst=" << in_dst; + boost::throw_exception(dst_not_valid(ss.str())); + } + + // everything checks out and conversion to utc already done + } + } + + //TODO maybe not the right set...Ignore the last 2 for now... + enum DST_CALC_OPTIONS { EXCEPTION_ON_ERROR, NOT_DATE_TIME_ON_ERROR }; + //ASSUME_DST_ON_ERROR, ASSUME_NOT_DST_ON_ERROR }; + + /*! This constructs a local time -- the passed time information + * understood to be in the passed tz. The DST flag is calculated + * according to the specified rule. + */ + local_date_time_base(date_type d, + time_duration_type td, + boost::shared_ptr tz, + DST_CALC_OPTIONS calc_option) : + // dummy value - time_ is set in constructor code + date_time::base_time(utc_time_type(d,td)), + zone_(tz) + { + time_is_dst_result result = check_dst(d, td, tz); + if(result == ambiguous) { + if(calc_option == EXCEPTION_ON_ERROR){ + std::ostringstream ss; + ss << "time given: " << d << ' ' << td; + boost::throw_exception(ambiguous_result(ss.str())); + } + else{ // NADT on error + this->time_ = posix_time::posix_time_system::get_time_rep(date_type(date_time::not_a_date_time), time_duration_type(date_time::not_a_date_time)); + } + } + else if(result == invalid_time_label){ + if(calc_option == EXCEPTION_ON_ERROR){ + std::ostringstream ss; + ss << "time given: " << d << ' ' << td; + boost::throw_exception(time_label_invalid(ss.str())); + } + else{ // NADT on error + this->time_ = posix_time::posix_time_system::get_time_rep(date_type(date_time::not_a_date_time), time_duration_type(date_time::not_a_date_time)); + } + } + else if(result == is_in_dst){ + utc_time_type t = + construction_adjustment(utc_time_type(d, td), tz, true); + this->time_ = posix_time::posix_time_system::get_time_rep(t.date(), + t.time_of_day()); + } + else{ + utc_time_type t = + construction_adjustment(utc_time_type(d, td), tz, false); + this->time_ = posix_time::posix_time_system::get_time_rep(t.date(), + t.time_of_day()); + } + } + + + //! Determines if given time label is in daylight savings for given zone + /*! Determines if given time label is in daylight savings for given zone. + * Takes a date and time_duration representing a local time, along + * with time zone, and returns a time_is_dst_result object as result. + */ + static time_is_dst_result check_dst(date_type d, + time_duration_type td, + boost::shared_ptr tz) + { + if(tz != boost::shared_ptr() && tz->has_dst()) { + typedef typename date_time::dst_calculator dst_calculator; + return dst_calculator::local_is_dst( + d, td, + tz->dst_local_start_time(d.year()).date(), + tz->dst_local_start_time(d.year()).time_of_day(), + tz->dst_local_end_time(d.year()).date(), + tz->dst_local_end_time(d.year()).time_of_day(), + tz->dst_offset() + ); + } + else{ + return is_not_in_dst; + } + } + + //! Simple destructor, releases time zone if last referrer + ~local_date_time_base() {}; + + //! Copy constructor + local_date_time_base(const local_date_time_base& rhs) : + date_time::base_time(rhs), + zone_(rhs.zone_) + {} + + //! Special values constructor + explicit local_date_time_base(const boost::date_time::special_values sv, + boost::shared_ptr tz = boost::shared_ptr()) : + date_time::base_time(utc_time_type(sv)), + zone_(tz) + {} + + //! returns time zone associated with calling instance + boost::shared_ptr zone() const + { + return zone_; + } + //! returns false is time_zone is NULL and if time value is a special_value + bool is_dst() const + { + if(zone_ != boost::shared_ptr() && zone_->has_dst() && !this->is_special()) { + // check_dst takes a local time, *this is utc + utc_time_type lt(this->time_); + lt += zone_->base_utc_offset(); + // dst_offset only needs to be considered with ambiguous time labels + // make that adjustment there + + switch(check_dst(lt.date(), lt.time_of_day(), zone_)){ + case is_not_in_dst: + return false; + case is_in_dst: + return true; + case ambiguous: + if(lt + zone_->dst_offset() < zone_->dst_local_end_time(lt.date().year())) { + return true; + } + break; + case invalid_time_label: + if(lt >= zone_->dst_local_start_time(lt.date().year())) { + return true; + } + break; + } + } + return false; + } + //! Returns object's time value as a utc representation + utc_time_type utc_time() const + { + return utc_time_type(this->time_); + } + //! Returns object's time value as a local representation + utc_time_type local_time() const + { + if(zone_ != boost::shared_ptr()){ + utc_time_type lt = this->utc_time() + zone_->base_utc_offset(); + if (is_dst()) { + lt += zone_->dst_offset(); + } + return lt; + } + return utc_time_type(this->time_); + } + //! Returns string in the form "2003-Aug-20 05:00:00 EDT" + /*! Returns string in the form "2003-Aug-20 05:00:00 EDT". If + * time_zone is NULL the time zone abbreviation will be "UTC". The time + * zone abbrev will not be included if calling object is a special_value*/ + std::string to_string() const + { + //TODO is this a temporary function ??? + std::ostringstream ss; + if(this->is_special()){ + ss << utc_time(); + return ss.str(); + } + if(zone_ == boost::shared_ptr()) { + ss << utc_time() << " UTC"; + return ss.str(); + } + bool is_dst_ = is_dst(); + utc_time_type lt = this->utc_time() + zone_->base_utc_offset(); + if (is_dst_) { + lt += zone_->dst_offset(); + } + ss << local_time() << " "; + if (is_dst()) { + ss << zone_->dst_zone_abbrev(); + } + else { + ss << zone_->std_zone_abbrev(); + } + return ss.str(); + } + /*! returns a local_date_time_base in the given time zone with the + * optional time_duration added. */ + local_date_time_base local_time_in(boost::shared_ptr new_tz, + time_duration_type td=time_duration_type(0,0,0)) const + { + return local_date_time_base(utc_time_type(this->time_) + td, new_tz); + } + + //! Returns name of associated time zone or "Coordinated Universal Time". + /*! Optional bool parameter will return time zone as an offset + * (ie "+07:00" extended iso format). Empty string is returned for + * classes that do not use a time_zone */ + std::string zone_name(bool as_offset=false) const + { + if(zone_ == boost::shared_ptr()) { + if(as_offset) { + return std::string("Z"); + } + else { + return std::string("Coordinated Universal Time"); + } + } + if (is_dst()) { + if(as_offset) { + time_duration_type td = zone_->base_utc_offset(); + td += zone_->dst_offset(); + return zone_as_offset(td, ":"); + } + else { + return zone_->dst_zone_name(); + } + } + else { + if(as_offset) { + time_duration_type td = zone_->base_utc_offset(); + return zone_as_offset(td, ":"); + } + else { + return zone_->std_zone_name(); + } + } + } + //! Returns abbreviation of associated time zone or "UTC". + /*! Optional bool parameter will return time zone as an offset + * (ie "+0700" iso format). Empty string is returned for classes + * that do not use a time_zone */ + std::string zone_abbrev(bool as_offset=false) const + { + if(zone_ == boost::shared_ptr()) { + if(as_offset) { + return std::string("Z"); + } + else { + return std::string("UTC"); + } + } + if (is_dst()) { + if(as_offset) { + time_duration_type td = zone_->base_utc_offset(); + td += zone_->dst_offset(); + return zone_as_offset(td, ""); + } + else { + return zone_->dst_zone_abbrev(); + } + } + else { + if(as_offset) { + time_duration_type td = zone_->base_utc_offset(); + return zone_as_offset(td, ""); + } + else { + return zone_->std_zone_abbrev(); + } + } + } + + //! returns a posix_time_zone string for the associated time_zone. If no time_zone, "UTC+00" is returned. + std::string zone_as_posix_string() const + { + if(zone_ == shared_ptr()) { + return std::string("UTC+00"); + } + return zone_->to_posix_string(); + } + + //! Equality comparison operator + /*bool operator==(const date_time::base_time& rhs) const + { // fails due to rhs.time_ being protected + return date_time::base_time::operator==(rhs); + //return this->time_ == rhs.time_; + }*/ + //! Equality comparison operator + bool operator==(const local_date_time_base& rhs) const + { + return time_system_type::is_equal(this->time_, rhs.time_); + } + //! Non-Equality comparison operator + bool operator!=(const local_date_time_base& rhs) const + { + return !(*this == rhs); + } + //! Less than comparison operator + bool operator<(const local_date_time_base& rhs) const + { + return time_system_type::is_less(this->time_, rhs.time_); + } + //! Less than or equal to comparison operator + bool operator<=(const local_date_time_base& rhs) const + { + return (*this < rhs || *this == rhs); + } + //! Greater than comparison operator + bool operator>(const local_date_time_base& rhs) const + { + return !(*this <= rhs); + } + //! Greater than or equal to comparison operator + bool operator>=(const local_date_time_base& rhs) const + { + return (*this > rhs || *this == rhs); + } + + //! Local_date_time + date_duration + local_date_time_base operator+(const date_duration_type& dd) const + { + return local_date_time_base(time_system_type::add_days(this->time_,dd), zone_); + } + //! Local_date_time += date_duration + local_date_time_base operator+=(const date_duration_type& dd) + { + this->time_ = time_system_type::add_days(this->time_,dd); + return *this; + } + //! Local_date_time - date_duration + local_date_time_base operator-(const date_duration_type& dd) const + { + return local_date_time_base(time_system_type::subtract_days(this->time_,dd), zone_); + } + //! Local_date_time -= date_duration + local_date_time_base operator-=(const date_duration_type& dd) + { + this->time_ = time_system_type::subtract_days(this->time_,dd); + return *this; + } + //! Local_date_time + time_duration + local_date_time_base operator+(const time_duration_type& td) const + { + return local_date_time_base(time_system_type::add_time_duration(this->time_,td), zone_); + } + //! Local_date_time += time_duration + local_date_time_base operator+=(const time_duration_type& td) + { + this->time_ = time_system_type::add_time_duration(this->time_,td); + return *this; + } + //! Local_date_time - time_duration + local_date_time_base operator-(const time_duration_type& td) const + { + return local_date_time_base(time_system_type::subtract_time_duration(this->time_,td), zone_); + } + //! Local_date_time -= time_duration + local_date_time_base operator-=(const time_duration_type& td) + { + this->time_ = time_system_type::subtract_time_duration(this->time_,td); + return *this; + } + //! local_date_time -= local_date_time --> time_duration_type + time_duration_type operator-(const local_date_time_base& rhs) const + { + return utc_time_type(this->time_) - utc_time_type(rhs.time_); + } + private: + boost::shared_ptr zone_; + //bool is_dst_; + + /*! Adjust the passed in time to UTC? + */ + utc_time_type construction_adjustment(utc_time_type t, + boost::shared_ptr z, + bool dst_flag) + { + if(z != boost::shared_ptr()) { + if(dst_flag && z->has_dst()) { + t -= z->dst_offset(); + } // else no adjust + t -= z->base_utc_offset(); + } + return t; + } + + /*! Simple formatting code -- todo remove this? + */ + std::string zone_as_offset(const time_duration_type& td, + const std::string& separator) const + { + std::ostringstream ss; + if(td.is_negative()) { + // a negative duration is represented as "-[h]h:mm" + // we require two digits for the hour. A positive duration + // with the %H flag will always give two digits + ss << "-"; + } + else { + ss << "+"; + } + ss << std::setw(2) << std::setfill('0') + << date_time::absolute_value(td.hours()) + << separator + << std::setw(2) << std::setfill('0') + << date_time::absolute_value(td.minutes()); + return ss.str(); + } + }; + + //!Use the default parameters to define local_date_time + typedef local_date_time_base<> local_date_time; + +} } + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time.hpp new file mode 100644 index 0000000000..f7d4cc68e3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time.hpp @@ -0,0 +1,24 @@ +#ifndef LOCAL_TIME_LOCAL_TIME_HPP__ +#define LOCAL_TIME_LOCAL_TIME_HPP__ + +/* Copyright (c) 2003-2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/posix_time/posix_time.hpp" +#include "boost/date_time/local_time/local_date_time.hpp" +#include "boost/date_time/local_time/local_time_types.hpp" +#if !defined(USE_DATE_TIME_PRE_1_33_FACET_IO) +#include "boost/date_time/local_time/local_time_io.hpp" +#endif // USE_DATE_TIME_PRE_1_33_FACET_IO +#include "boost/date_time/local_time/posix_time_zone.hpp" +#include "boost/date_time/local_time/custom_time_zone.hpp" +#include "boost/date_time/local_time/tz_database.hpp" +#include "boost/date_time/local_time/conversion.hpp" +#include "boost/date_time/time_zone_base.hpp" + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time_io.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time_io.hpp new file mode 100644 index 0000000000..c161ff7e23 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time_io.hpp @@ -0,0 +1,186 @@ +#ifndef BOOST_DATE_TIME_LOCAL_TIME_IO_HPP__ +#define BOOST_DATE_TIME_LOCAL_TIME_IO_HPP__ + +/* Copyright (c) 2003-2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-13 14:05:31 -0500 (Thu, 13 Nov 2008) $ + */ + +#include +#include +#include // i/ostreambuf_iterator +#include +#include +#include +#include +#include +#include // to_tm will be needed in the facets + +namespace boost { +namespace local_time { + + typedef boost::date_time::time_facet wlocal_time_facet; + typedef boost::date_time::time_facet local_time_facet; + + typedef boost::date_time::time_input_facet wlocal_time_input_facet; + typedef boost::date_time::time_input_facet local_time_input_facet; + + //! operator<< for local_date_time - see local_time docs for formatting details + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const local_date_time& ldt) + { + boost::io::ios_flags_saver iflags(os); + typedef local_date_time time_type;//::utc_time_type typename + typedef date_time::time_facet custom_time_facet; + typedef std::time_put std_time_facet; + std::ostreambuf_iterator oitr(os); + + if(std::has_facet(os.getloc())) { + std::use_facet(os.getloc()).put(oitr, + os, + os.fill(), + ldt); + } + else { + custom_time_facet* f = new custom_time_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(oitr, os, os.fill(), ldt); + } + + return os; + } + + + //! input operator for local_date_time + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, local_date_time& ldt) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename local_date_time::utc_time_type utc_time_type; + typedef typename date_time::time_input_facet time_input_facet; + + // intermediate objects + std::basic_string tz_str; + utc_time_type pt(not_a_date_time); + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get_local_time(sit, str_end, is, pt, tz_str); + } + else { + time_input_facet* f = new time_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get_local_time(sit, str_end, is, pt, tz_str); + } + if(tz_str.empty()) { + time_zone_ptr null_ptr; + // a null time_zone_ptr creates a local_date_time that is UTC + ldt = local_date_time(pt, null_ptr); + } + else { + time_zone_ptr tz_ptr(new posix_time_zone(date_time::convert_string_type(tz_str))); + // the "date & time" constructor expects the time label to *not* be utc. + // a posix_tz_string also expects the time label to *not* be utc. + ldt = local_date_time(pt.date(), pt.time_of_day(), tz_ptr, local_date_time::EXCEPTION_ON_ERROR); + } + } + catch(...) { + // mask tells us what exceptions are turned on + std::ios_base::iostate exception_mask = is.exceptions(); + // if the user wants exceptions on failbit, we'll rethrow our + // date_time exception & set the failbit + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} // ignore this one + throw; // rethrow original exception + } + else { + // if the user want's to fail quietly, we simply set the failbit + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + + //! output operator for local_time_period + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, + const boost::local_time::local_time_period& p) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::time_facet custom_facet; + typedef std::time_put std_time_facet; + std::ostreambuf_iterator oitr(os); + if (std::has_facet(os.getloc())) { + std::use_facet(os.getloc()).put(oitr, os, os.fill(), p); + } + else { + //instantiate a custom facet for dealing with periods since the user + //has not put one in the stream so far. This is for efficiency + //since we would always need to reconstruct for every time period + //if the local did not already exist. Of course this will be overridden + //if the user imbues as some later point. + custom_facet* f = new custom_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(oitr, os, os.fill(), p); + } + return os; + } + + //! input operator for local_time_period + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, boost::local_time::local_time_period& tp) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::time_input_facet time_input_facet; + + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, tp); + } + else { + time_input_facet* f = new time_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, tp); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + + } + } + return is; + } + +} } // namespaces + +#endif // BOOST_DATE_TIME_LOCAL_TIME_IO_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time_types.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time_types.hpp new file mode 100644 index 0000000000..ed58b8018a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/local_time_types.hpp @@ -0,0 +1,52 @@ +#ifndef LOCAL_TIME_LOCAL_TIME_TYPES_HPP__ +#define LOCAL_TIME_LOCAL_TIME_TYPES_HPP__ + +/* Copyright (c) 2003-2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/local_time/local_date_time.hpp" +#include "boost/date_time/period.hpp" +#include "boost/date_time/time_iterator.hpp" +#include "boost/date_time/compiler_config.hpp" +#if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) +#include "boost/date_time/local_time/date_duration_operators.hpp" +#endif //BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES +#include "boost/date_time/local_time/custom_time_zone.hpp" + +namespace boost { +namespace local_time { + + typedef boost::date_time::period local_time_period; + + typedef date_time::time_itr local_time_iterator; + + typedef date_time::second_clock local_sec_clock; + typedef date_time::microsec_clock local_microsec_clock; + + typedef date_time::time_zone_base time_zone; + typedef date_time::time_zone_base wtime_zone; + + //! Shared Pointer for custom_time_zone and posix_time_zone objects + typedef boost::shared_ptr time_zone_ptr; + typedef boost::shared_ptr wtime_zone_ptr; + + typedef date_time::time_zone_names_base time_zone_names; + typedef date_time::time_zone_names_base wtime_zone_names; + + //bring special enum values into the namespace + using date_time::special_values; + using date_time::not_special; + using date_time::neg_infin; + using date_time::pos_infin; + using date_time::not_a_date_time; + using date_time::max_date_time; + using date_time::min_date_time; + +}} // namespaces + +#endif // LOCAL_TIME_LOCAL_TIME_TYPES_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/posix_time_zone.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/posix_time_zone.hpp new file mode 100644 index 0000000000..2a0199fcae --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/posix_time_zone.hpp @@ -0,0 +1,474 @@ +#ifndef _DATE_TIME_POSIX_TIME_ZONE__ +#define _DATE_TIME_POSIX_TIME_ZONE__ + +/* Copyright (c) 2003-2005 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-06-10 13:24:38 -0400 (Thu, 10 Jun 2010) $ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{ +namespace local_time{ + + //! simple exception for UTC and Daylight savings start/end offsets + struct bad_offset : public std::out_of_range + { + bad_offset(std::string const& msg = std::string()) : + std::out_of_range(std::string("Offset out of range: " + msg)) {} + }; + //! simple exception for UTC daylight savings adjustment + struct bad_adjustment : public std::out_of_range + { + bad_adjustment(std::string const& msg = std::string()) : + std::out_of_range(std::string("Adjustment out of range: " + msg)) {} + }; + + typedef boost::date_time::dst_adjustment_offsets dst_adjustment_offsets; + + //! A time zone class constructed from a POSIX time zone string + /*! A POSIX time zone string takes the form of:
+ * "std offset dst [offset],start[/time],end[/time]" (w/no spaces) + * 'std' specifies the abbrev of the time zone.
+ * 'offset' is the offset from UTC.
+ * 'dst' specifies the abbrev of the time zone during daylight savings time.
+ * The second offset is how many hours changed during DST. Default=1
+ * 'start' and'end' are the dates when DST goes into (and out of) effect.
+ * 'offset' takes the form of: [+|-]hh[:mm[:ss]] {h=0-23, m/s=0-59}
+ * 'time' and 'offset' take the same form. Time defaults=02:00:00
+ * 'start' and 'end' can be one of three forms:
+ * Mm.w.d {month=1-12, week=1-5 (5 is always last), day=0-6}
+ * Jn {n=1-365 Feb29 is never counted}
+ * n {n=0-365 Feb29 is counted in leap years}
+ * Example "PST-5PDT01:00:00,M4.1.0/02:00:00,M10.1.0/02:00:00" + *
+ * Exceptions will be thrown under these conditions:
+ * An invalid date spec (see date class)
+ * A boost::local_time::bad_offset exception will be thrown for:
+ * A DST start or end offset that is negative or more than 24 hours
+ * A UTC zone that is greater than +14 or less than -12 hours
+ * A boost::local_time::bad_adjustment exception will be thrown for:
+ * A DST adjustment that is 24 hours or more (positive or negative)
+ * + * Note that UTC zone offsets can be greater than +12: + * http://www.worldtimezone.com/utc/utc+1200.html + */ + template + class posix_time_zone_base : public date_time::time_zone_base { + public: + typedef boost::posix_time::time_duration time_duration_type; + typedef date_time::time_zone_names_base time_zone_names; + typedef date_time::time_zone_base base_type; + typedef typename base_type::string_type string_type; + typedef CharT char_type; + typedef typename base_type::stringstream_type stringstream_type; + typedef boost::char_separator > char_separator_type; + typedef boost::tokenizer tokenizer_type; + typedef typename tokenizer_type::iterator tokenizer_iterator_type; + + //! Construct from a POSIX time zone string + posix_time_zone_base(const string_type& s) : + //zone_names_("std_name","std_abbrev","no-dst","no-dst"), + zone_names_(), + has_dst_(false), + base_utc_offset_(posix_time::hours(0)), + dst_offsets_(posix_time::hours(0),posix_time::hours(0),posix_time::hours(0)), + dst_calc_rules_() + { +#ifdef __HP_aCC + // Work around bug in aC++ compiler: see QXCR1000880488 in the + // HP bug tracking system + const char_type sep_chars[2] = {',',0}; +#else + const char_type sep_chars[2] = {','}; +#endif + char_separator_type sep(sep_chars); + tokenizer_type tokens(s, sep); + tokenizer_iterator_type it = tokens.begin(), end = tokens.end(); + if (it == end) + BOOST_THROW_EXCEPTION(std::invalid_argument("Could not parse time zone name")); + calc_zone(*it++); + if(has_dst_) + { + if (it == end) + BOOST_THROW_EXCEPTION(std::invalid_argument("Could not parse DST begin time")); + string_type dst_begin = *it++; + + if (it == end) + BOOST_THROW_EXCEPTION(std::invalid_argument("Could not parse DST end time")); + string_type dst_end = *it; + calc_rules(dst_begin, dst_end); + } + } + virtual ~posix_time_zone_base() {}; + //!String for the zone when not in daylight savings (eg: EST) + virtual string_type std_zone_abbrev()const + { + return zone_names_.std_zone_abbrev(); + } + //!String for the timezone when in daylight savings (eg: EDT) + /*! For those time zones that have no DST, an empty string is used */ + virtual string_type dst_zone_abbrev() const + { + return zone_names_.dst_zone_abbrev(); + } + //!String for the zone when not in daylight savings (eg: Eastern Standard Time) + /*! The full STD name is not extracted from the posix time zone string. + * Therefore, the STD abbreviation is used in it's place */ + virtual string_type std_zone_name()const + { + return zone_names_.std_zone_name(); + } + //!String for the timezone when in daylight savings (eg: Eastern Daylight Time) + /*! The full DST name is not extracted from the posix time zone string. + * Therefore, the STD abbreviation is used in it's place. For time zones + * that have no DST, an empty string is used */ + virtual string_type dst_zone_name()const + { + return zone_names_.dst_zone_name(); + } + //! True if zone uses daylight savings adjustments otherwise false + virtual bool has_dst()const + { + return has_dst_; + } + //! Local time that DST starts -- NADT if has_dst is false + virtual posix_time::ptime dst_local_start_time(gregorian::greg_year y)const + { + gregorian::date d(gregorian::not_a_date_time); + if(has_dst_) + { + d = dst_calc_rules_->start_day(y); + } + return posix_time::ptime(d, dst_offsets_.dst_start_offset_); + } + //! Local time that DST ends -- NADT if has_dst is false + virtual posix_time::ptime dst_local_end_time(gregorian::greg_year y)const + { + gregorian::date d(gregorian::not_a_date_time); + if(has_dst_) + { + d = dst_calc_rules_->end_day(y); + } + return posix_time::ptime(d, dst_offsets_.dst_end_offset_); + } + //! Base offset from UTC for zone (eg: -07:30:00) + virtual time_duration_type base_utc_offset()const + { + return base_utc_offset_; + } + //! Adjustment forward or back made while DST is in effect + virtual time_duration_type dst_offset()const + { + return dst_offsets_.dst_adjust_; + } + + //! Returns a POSIX time_zone string for this object + virtual string_type to_posix_string() const + { + // std offset dst [offset],start[/time],end[/time] - w/o spaces + stringstream_type ss; + ss.fill('0'); + boost::shared_ptr no_rules; + // std + ss << std_zone_abbrev(); + // offset + if(base_utc_offset().is_negative()) { + // inverting the sign guarantees we get two digits + ss << '-' << std::setw(2) << base_utc_offset().invert_sign().hours(); + } + else { + ss << '+' << std::setw(2) << base_utc_offset().hours(); + } + if(base_utc_offset().minutes() != 0 || base_utc_offset().seconds() != 0) { + ss << ':' << std::setw(2) << base_utc_offset().minutes(); + if(base_utc_offset().seconds() != 0) { + ss << ':' << std::setw(2) << base_utc_offset().seconds(); + } + } + if(dst_calc_rules_ != no_rules) { + // dst + ss << dst_zone_abbrev(); + // dst offset + if(dst_offset().is_negative()) { + // inverting the sign guarantees we get two digits + ss << '-' << std::setw(2) << dst_offset().invert_sign().hours(); + } + else { + ss << '+' << std::setw(2) << dst_offset().hours(); + } + if(dst_offset().minutes() != 0 || dst_offset().seconds() != 0) { + ss << ':' << std::setw(2) << dst_offset().minutes(); + if(dst_offset().seconds() != 0) { + ss << ':' << std::setw(2) << dst_offset().seconds(); + } + } + // start/time + ss << ',' << date_time::convert_string_type(dst_calc_rules_->start_rule_as_string()) << '/' + << std::setw(2) << dst_offsets_.dst_start_offset_.hours() << ':' + << std::setw(2) << dst_offsets_.dst_start_offset_.minutes(); + if(dst_offsets_.dst_start_offset_.seconds() != 0) { + ss << ':' << std::setw(2) << dst_offsets_.dst_start_offset_.seconds(); + } + // end/time + ss << ',' << date_time::convert_string_type(dst_calc_rules_->end_rule_as_string()) << '/' + << std::setw(2) << dst_offsets_.dst_end_offset_.hours() << ':' + << std::setw(2) << dst_offsets_.dst_end_offset_.minutes(); + if(dst_offsets_.dst_end_offset_.seconds() != 0) { + ss << ':' << std::setw(2) << dst_offsets_.dst_end_offset_.seconds(); + } + } + + return ss.str(); + } + private: + time_zone_names zone_names_; + bool has_dst_; + time_duration_type base_utc_offset_; + dst_adjustment_offsets dst_offsets_; + boost::shared_ptr dst_calc_rules_; + + /*! Extract time zone abbreviations for STD & DST as well + * as the offsets for the time shift that occurs and how + * much of a shift. At this time full time zone names are + * NOT extracted so the abbreviations are used in their place */ + void calc_zone(const string_type& obj){ + const char_type empty_string[2] = {'\0'}; + stringstream_type ss(empty_string); + typename string_type::const_pointer sit = obj.c_str(), obj_end = sit + obj.size(); + string_type l_std_zone_abbrev, l_dst_zone_abbrev; + + // get 'std' name/abbrev + while(std::isalpha(*sit)){ + ss << *sit++; + } + l_std_zone_abbrev = ss.str(); + ss.str(empty_string); + + // get UTC offset + if(sit != obj_end){ + // get duration + while(sit != obj_end && !std::isalpha(*sit)){ + ss << *sit++; + } + base_utc_offset_ = date_time::str_from_delimited_time_duration(ss.str()); + ss.str(empty_string); + + // base offset must be within range of -12 hours to +14 hours + if(base_utc_offset_ < time_duration_type(-12,0,0) || + base_utc_offset_ > time_duration_type(14,0,0)) + { + boost::throw_exception(bad_offset(posix_time::to_simple_string(base_utc_offset_))); + } + } + + // get DST data if given + if(sit != obj_end){ + has_dst_ = true; + + // get 'dst' name/abbrev + while(sit != obj_end && std::isalpha(*sit)){ + ss << *sit++; + } + l_dst_zone_abbrev = ss.str(); + ss.str(empty_string); + + // get DST offset if given + if(sit != obj_end){ + // get duration + while(sit != obj_end && !std::isalpha(*sit)){ + ss << *sit++; + } + dst_offsets_.dst_adjust_ = date_time::str_from_delimited_time_duration(ss.str()); + ss.str(empty_string); + } + else{ // default DST offset + dst_offsets_.dst_adjust_ = posix_time::hours(1); + } + + // adjustment must be within +|- 1 day + if(dst_offsets_.dst_adjust_ <= time_duration_type(-24,0,0) || + dst_offsets_.dst_adjust_ >= time_duration_type(24,0,0)) + { + boost::throw_exception(bad_adjustment(posix_time::to_simple_string(dst_offsets_.dst_adjust_))); + } + } + // full names not extracted so abbrevs used in their place + zone_names_ = time_zone_names(l_std_zone_abbrev, l_std_zone_abbrev, l_dst_zone_abbrev, l_dst_zone_abbrev); + } + + void calc_rules(const string_type& start, const string_type& end){ +#ifdef __HP_aCC + // Work around bug in aC++ compiler: see QXCR1000880488 in the + // HP bug tracking system + const char_type sep_chars[2] = {'/',0}; +#else + const char_type sep_chars[2] = {'/'}; +#endif + char_separator_type sep(sep_chars); + tokenizer_type st_tok(start, sep); + tokenizer_type et_tok(end, sep); + tokenizer_iterator_type sit = st_tok.begin(); + tokenizer_iterator_type eit = et_tok.begin(); + + // generate date spec + char_type x = string_type(*sit).at(0); + if(x == 'M'){ + M_func(*sit, *eit); + } + else if(x == 'J'){ + julian_no_leap(*sit, *eit); + } + else{ + julian_day(*sit, *eit); + } + + ++sit; + ++eit; + // generate durations + // starting offset + if(sit != st_tok.end()){ + dst_offsets_.dst_start_offset_ = date_time::str_from_delimited_time_duration(*sit); + } + else{ + // default + dst_offsets_.dst_start_offset_ = posix_time::hours(2); + } + // start/end offsets must fall on given date + if(dst_offsets_.dst_start_offset_ < time_duration_type(0,0,0) || + dst_offsets_.dst_start_offset_ >= time_duration_type(24,0,0)) + { + boost::throw_exception(bad_offset(posix_time::to_simple_string(dst_offsets_.dst_start_offset_))); + } + + // ending offset + if(eit != et_tok.end()){ + dst_offsets_.dst_end_offset_ = date_time::str_from_delimited_time_duration(*eit); + } + else{ + // default + dst_offsets_.dst_end_offset_ = posix_time::hours(2); + } + // start/end offsets must fall on given date + if(dst_offsets_.dst_end_offset_ < time_duration_type(0,0,0) || + dst_offsets_.dst_end_offset_ >= time_duration_type(24,0,0)) + { + boost::throw_exception(bad_offset(posix_time::to_simple_string(dst_offsets_.dst_end_offset_))); + } + } + + /* Parses out a start/end date spec from a posix time zone string. + * Date specs come in three possible formats, this function handles + * the 'M' spec. Ex "M2.2.4" => 2nd month, 2nd week, 4th day . + */ + void M_func(const string_type& s, const string_type& e){ + typedef gregorian::nth_kday_of_month nkday; + unsigned short sm=0,sw=0,sd=0,em=0,ew=0,ed=0; // start/end month,week,day +#ifdef __HP_aCC + // Work around bug in aC++ compiler: see QXCR1000880488 in the + // HP bug tracking system + const char_type sep_chars[3] = {'M','.',0}; +#else + const char_type sep_chars[3] = {'M','.'}; +#endif + char_separator_type sep(sep_chars); + tokenizer_type stok(s, sep), etok(e, sep); + + tokenizer_iterator_type it = stok.begin(); + sm = lexical_cast(*it++); + sw = lexical_cast(*it++); + sd = lexical_cast(*it); + + it = etok.begin(); + em = lexical_cast(*it++); + ew = lexical_cast(*it++); + ed = lexical_cast(*it); + + dst_calc_rules_ = shared_ptr( + new nth_kday_dst_rule( + nth_last_dst_rule::start_rule( + static_cast(sw),sd,sm), + nth_last_dst_rule::start_rule( + static_cast(ew),ed,em) + ) + ); + } + + //! Julian day. Feb29 is never counted, even in leap years + // expects range of 1-365 + void julian_no_leap(const string_type& s, const string_type& e){ + typedef gregorian::gregorian_calendar calendar; + const unsigned short year = 2001; // Non-leap year + unsigned short sm=1; + int sd=0; + sd = lexical_cast(s.substr(1)); // skip 'J' + while(sd >= calendar::end_of_month_day(year,sm)){ + sd -= calendar::end_of_month_day(year,sm++); + } + unsigned short em=1; + int ed=0; + ed = lexical_cast(e.substr(1)); // skip 'J' + while(ed > calendar::end_of_month_day(year,em)){ + ed -= calendar::end_of_month_day(year,em++); + } + + dst_calc_rules_ = shared_ptr( + new partial_date_dst_rule( + partial_date_dst_rule::start_rule( + sd, static_cast(sm)), + partial_date_dst_rule::end_rule( + ed, static_cast(em)) + ) + ); + } + + //! Julian day. Feb29 is always counted, but exception thrown in non-leap years + // expects range of 0-365 + void julian_day(const string_type& s, const string_type& e){ + int sd=0, ed=0; + sd = lexical_cast(s); + ed = lexical_cast(e); + dst_calc_rules_ = shared_ptr( + new partial_date_dst_rule( + partial_date_dst_rule::start_rule(++sd),// args are 0-365 + partial_date_dst_rule::end_rule(++ed) // pd expects 1-366 + ) + ); + } + + //! helper function used when throwing exceptions + static std::string td_as_string(const time_duration_type& td) + { + std::string s; +#if defined(USE_DATE_TIME_PRE_1_33_FACET_IO) + s = posix_time::to_simple_string(td); +#else + std::stringstream ss; + ss << td; + s = ss.str(); +#endif + return s; + } + }; + + typedef posix_time_zone_base posix_time_zone; + +} } // namespace boost::local_time + + +#endif // _DATE_TIME_POSIX_TIME_ZONE__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/tz_database.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/tz_database.hpp new file mode 100644 index 0000000000..4cfca45c18 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time/tz_database.hpp @@ -0,0 +1,32 @@ +#ifndef BOOST_DATE_TIME_TZ_DATABASE_HPP__ +#define BOOST_DATE_TIME_TZ_DATABASE_HPP__ + +/* Copyright (c) 2003-2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include +#include "boost/date_time/local_time/custom_time_zone.hpp" +#include "boost/date_time/local_time/dst_transition_day_rules.hpp" +#include "boost/date_time/tz_db_base.hpp" + + +namespace boost { +namespace local_time { + + using date_time::data_not_accessible; + using date_time::bad_field_count; + + //! Object populated with boost::shared_ptr objects + /*! Object populated with boost::shared_ptr objects + * Database is populated from specs stored in external csv file. See + * date_time::tz_db_base for greater detail */ + typedef date_time::tz_db_base tz_database; + +}} // namespace + +#endif // BOOST_DATE_TIME_TZ_DATABASE_HPP__ + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time_adjustor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time_adjustor.hpp new file mode 100644 index 0000000000..eea4d37ae3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_time_adjustor.hpp @@ -0,0 +1,218 @@ +#ifndef DATE_TIME_LOCAL_TIME_ADJUSTOR_HPP__ +#define DATE_TIME_LOCAL_TIME_ADJUSTOR_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +/*! @file local_time_adjustor.hpp + Time adjustment calculations for local times +*/ + +#include +#include +#include +#include +#include +#include // boost::date_time::dst_flags +#include // not_a_date_time + +namespace boost { + namespace date_time { + + + //! Provides a base offset adjustment from utc + template + class utc_adjustment + { + public: + static time_duration_type local_to_utc_base_offset() + { + time_duration_type td(hours,minutes,0); + return td.invert_sign(); + } + static time_duration_type utc_to_local_base_offset() + { + return time_duration_type(hours,minutes,0); + } + }; + + + + //! Allow sliding utc adjustment with fixed dst rules + template + class dynamic_local_time_adjustor : public dst_rules + { + public: + typedef typename time_type::time_duration_type time_duration_type; + typedef typename time_type::date_type date_type; + + dynamic_local_time_adjustor(time_duration_type utc_offset) : + utc_offset_(utc_offset) + {} + + //! Presumes local time + time_duration_type utc_offset(bool is_dst) + { + if (is_dst) { + return utc_offset_ + this->dst_offset(); + } + else { + return utc_offset_; + } + + } + private: + time_duration_type utc_offset_; + + }; + + + + //! Embed the rules for local time adjustments at compile time + template + class static_local_time_adjustor: public dst_rules, public utc_offset_rules + { + public: + typedef typename time_type::time_duration_type time_duration_type; + typedef typename time_type::date_type date_type; + + //! Calculates the offset from a utc time to local based on dst and utc offset + /*! @param t UTC time to calculate offset to local time + * This adjustment depends on the following observations about the + * workings of the DST boundary offset. Since UTC time labels are + * monotonically increasing we can determine if a given local time + * is in DST or not and therefore adjust the offset appropriately. + * + * The logic is as follows. Starting with UTC time use the offset to + * create a label for an non-dst adjusted local time. Then call + * dst_rules::local_is_dst with the non adjust local time. The + * results of this function will either unabiguously decide that + * the initial local time is in dst or return an illegal or + * ambiguous result. An illegal result only occurs at the end + * of dst (where labels are skipped) and indicates that dst has + * ended. An ambiguous result means that we need to recheck by + * making a dst adjustment and then rechecking. If the dst offset + * is added to the utc time and the recheck proves non-ambiguous + * then we are past the boundary. If it is still ambiguous then + * we are ahead of the boundary and dst is still in effect. + * + * TODO -- check if all dst offsets are positive. If not then + * the algorithm needs to check for this and reverse the + * illegal/ambiguous logic. + */ + static time_duration_type utc_to_local_offset(const time_type& t) + { + //get initial local time guess by applying utc offset + time_type initial = t + utc_offset_rules::utc_to_local_base_offset(); + time_is_dst_result dst_flag = + dst_rules::local_is_dst(initial.date(), initial.time_of_day()); + switch(dst_flag) { + case is_in_dst: return utc_offset_rules::utc_to_local_base_offset() + dst_rules::dst_offset(); + case is_not_in_dst: return utc_offset_rules::utc_to_local_base_offset(); + case invalid_time_label:return utc_offset_rules::utc_to_local_base_offset() + dst_rules::dst_offset(); + case ambiguous: { + time_type retry = initial + dst_rules::dst_offset(); + dst_flag = dst_rules::local_is_dst(retry.date(), retry.time_of_day()); + //if still ambibuous then the utc time still translates to a dst time + if (dst_flag == ambiguous) { + return utc_offset_rules::utc_to_local_base_offset() + dst_rules::dst_offset(); + } + // we are past the dst boundary + else { + return utc_offset_rules::utc_to_local_base_offset(); + } + } + }//case + //TODO better exception type + boost::throw_exception(std::out_of_range("Unreachable case")); + BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return time_duration_type(not_a_date_time)); // should never reach + } + + //! Get the offset to UTC given a local time + static time_duration_type local_to_utc_offset(const time_type& t, + date_time::dst_flags dst=date_time::calculate) + { + switch (dst) { + case is_dst: + return utc_offset_rules::local_to_utc_base_offset() - dst_rules::dst_offset(); + case not_dst: + return utc_offset_rules::local_to_utc_base_offset(); + case calculate: + time_is_dst_result res = + dst_rules::local_is_dst(t.date(), t.time_of_day()); + switch(res) { + case is_in_dst: return utc_offset_rules::local_to_utc_base_offset() - dst_rules::dst_offset(); + case is_not_in_dst: return utc_offset_rules::local_to_utc_base_offset(); + case ambiguous: return utc_offset_rules::local_to_utc_base_offset(); + case invalid_time_label: break; + } + } + boost::throw_exception(std::out_of_range("Time label invalid")); + BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return time_duration_type(not_a_date_time)); // should never reach + } + + + private: + + }; + + void dummy_to_prevent_msvc6_ice(); //why ask why? + + //! Template that simplifies the creation of local time calculator + /*! Use this template to create the timezone to utc convertors as required. + * + * This class will also work for other regions that don't use dst and + * have a utc offset which is an integral number of hours. + * + * Template Parameters + * -time_type -- Time class to use + * -utc_offset -- Number hours local time is adjust from utc + * -use_dst -- true (default) if region uses dst, false otherwise + * For example: + * @code + * //eastern timezone is utc-5 + typedef date_time::local_adjustor us_eastern; + typedef date_time::local_adjustor us_central; + typedef date_time::local_adjustor us_mountain; + typedef date_time::local_adjustor us_pacific; + typedef date_time::local_adjustor us_arizona; + @endcode + + */ + template + class local_adjustor + { + public: + typedef typename time_type::time_duration_type time_duration_type; + typedef typename time_type::date_type date_type; + typedef static_local_time_adjustor > dst_adjustor; + //! Convert a utc time to local time + static time_type utc_to_local(const time_type& t) + { + time_duration_type td = dst_adjustor::utc_to_local_offset(t); + return t + td; + } + //! Convert a local time to utc + static time_type local_to_utc(const time_type& t, + date_time::dst_flags dst=date_time::calculate) + { + time_duration_type td = dst_adjustor::local_to_utc_offset(t, dst); + return t + td; + } + }; + + + } } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_timezone_defs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_timezone_defs.hpp new file mode 100644 index 0000000000..fd6d3c2fab --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/local_timezone_defs.hpp @@ -0,0 +1,193 @@ +#ifndef DATE_TIME_LOCAL_TIMEZONE_DEFS_HPP__ +#define DATE_TIME_LOCAL_TIMEZONE_DEFS_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-11-13 15:10:23 -0500 (Thu, 13 Nov 2008) $ + */ + +#include "boost/date_time/dst_rules.hpp" + +namespace boost { + namespace date_time { + + // Configurations for common dst rules cases: + // See http://www.wharton.co.uk/Support/sup_dst.htm for more + // information on how various locales use dst rules + + //! Specification for daylight savings start rules in US + /*! This class is used to configure dst_calc_engine template typically + as follows: + @code + using namespace boost::gregorian; + using namespace boost::posix_time; + typedef us_dst_trait us_dst_traits; + typedef boost::date_time::dst_calc_engine + us_dst_calc; + //calculate the 2002 transition day of USA April 7 2002 + date dst_start = us_dst_calc::local_dst_start_day(2002); + + //calculate the 2002 transition day of USA Oct 27 2002 + date dst_end = us_dst_calc::local_dst_end_day(2002); + + //check if a local time is in dst or not -- posible answers + //are yes, no, invalid time label, ambiguous + ptime t(...some time...); + if (us_dst::local_is_dst(t.date(), t.time_of_day()) + == boost::date_time::is_not_in_dst) + { + + } + + @endcode + This generates a type suitable for the calculation of dst + transitions for the United States. Of course other templates + can be used for other locales. + + */ + + template + struct us_dst_trait + { + typedef typename date_type::day_of_week_type day_of_week_type; + typedef typename date_type::month_type month_type; + typedef typename date_type::year_type year_type; + typedef date_time::nth_kday_of_month start_rule_functor; + typedef date_time::first_kday_of_month end_rule_functor; + typedef date_time::first_kday_of_month start_rule_functor_pre2007; + typedef date_time::last_kday_of_month end_rule_functor_pre2007; + static day_of_week_type start_day(year_type) {return Sunday;} + static month_type start_month(year_type y) + { + if (y < 2007) return Apr; + return Mar; + } + static day_of_week_type end_day(year_type) {return Sunday;} + static month_type end_month(year_type y) + { + if (y < 2007) return Oct; + return Nov; + } + static date_type local_dst_start_day(year_type year) + { + if (year < 2007) { + start_rule_functor_pre2007 start1(start_day(year), + start_month(year)); + return start1.get_date(year); + } + start_rule_functor start(start_rule_functor::second, + start_day(year), + start_month(year)); + return start.get_date(year); + + } + static date_type local_dst_end_day(year_type year) + { + if (year < 2007) { + end_rule_functor_pre2007 end_rule(end_day(year), + end_month(year)); + return end_rule.get_date(year); + } + end_rule_functor end(end_day(year), + end_month(year)); + return end.get_date(year); + } + static int dst_start_offset_minutes() { return 120;} + static int dst_end_offset_minutes() { return 120; } + static int dst_shift_length_minutes() { return 60; } + }; + + //!Rules for daylight savings start in the EU (Last Sun in Mar) + /*!These amount to the following: + - Start of dst day is last Sunday in March + - End day of dst is last Sunday in Oct + - Going forward switch time is 2:00 am (offset 120 minutes) + - Going back switch time is 3:00 am (off set 180 minutes) + - Shift duration is one hour (60 minutes) + */ + template + struct eu_dst_trait + { + typedef typename date_type::day_of_week_type day_of_week_type; + typedef typename date_type::month_type month_type; + typedef typename date_type::year_type year_type; + typedef date_time::last_kday_of_month start_rule_functor; + typedef date_time::last_kday_of_month end_rule_functor; + static day_of_week_type start_day(year_type) {return Sunday;} + static month_type start_month(year_type) {return Mar;} + static day_of_week_type end_day(year_type) {return Sunday;} + static month_type end_month(year_type) {return Oct;} + static int dst_start_offset_minutes() { return 120;} + static int dst_end_offset_minutes() { return 180; } + static int dst_shift_length_minutes() { return 60; } + static date_type local_dst_start_day(year_type year) + { + start_rule_functor start(start_day(year), + start_month(year)); + return start.get_date(year); + } + static date_type local_dst_end_day(year_type year) + { + end_rule_functor end(end_day(year), + end_month(year)); + return end.get_date(year); + } + }; + + //! Alternative dst traits for some parts of the United Kingdom + /* Several places in the UK use EU start and end rules for the + day, but different local conversion times (eg: forward change at 1:00 + am local and backward change at 2:00 am dst instead of 2:00am + forward and 3:00am back for the EU). + */ + template + struct uk_dst_trait : public eu_dst_trait + { + static int dst_start_offset_minutes() { return 60;} + static int dst_end_offset_minutes() { return 120; } + static int dst_shift_length_minutes() { return 60; } + }; + + //Rules for Adelaide Australia + template + struct acst_dst_trait + { + typedef typename date_type::day_of_week_type day_of_week_type; + typedef typename date_type::month_type month_type; + typedef typename date_type::year_type year_type; + typedef date_time::last_kday_of_month start_rule_functor; + typedef date_time::last_kday_of_month end_rule_functor; + static day_of_week_type start_day(year_type) {return Sunday;} + static month_type start_month(year_type) {return Oct;} + static day_of_week_type end_day(year_type) {return Sunday;} + static month_type end_month(year_type) {return Mar;} + static int dst_start_offset_minutes() { return 120;} + static int dst_end_offset_minutes() { return 180; } + static int dst_shift_length_minutes() { return 60; } + static date_type local_dst_start_day(year_type year) + { + start_rule_functor start(start_day(year), + start_month(year)); + return start.get_date(year); + } + static date_type local_dst_end_day(year_type year) + { + end_rule_functor end(end_day(year), + end_month(year)); + return end.get_date(year); + } + }; + + + + + + +} } //namespace boost::date_time + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/locale_config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/locale_config.hpp new file mode 100644 index 0000000000..d01e008fea --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/locale_config.hpp @@ -0,0 +1,31 @@ +#ifndef DATE_TIME_LOCALE_CONFIG_HPP___ +#define DATE_TIME_LOCALE_CONFIG_HPP___ + +/* Copyright (c) 2002-2006 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +// This file configures whether the library will support locales and hence +// iostream based i/o. Even if a compiler has some support for locales, +// any failure to be compatible gets the compiler on the exclusion list. +// +// At the moment this is defined for MSVC 6 and any compiler that +// defines BOOST_NO_STD_LOCALE (gcc 2.95.x) + +#include "boost/config.hpp" //sets BOOST_NO_STD_LOCALE +#include "boost/detail/workaround.hpp" + +//This file basically becomes a noop if locales are not properly supported +#if (defined(BOOST_NO_STD_LOCALE) \ + || (BOOST_WORKAROUND( BOOST_MSVC, < 1300)) \ + || (BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x581 )) ) ) +#define BOOST_DATE_TIME_NO_LOCALE +#endif + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/microsec_time_clock.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/microsec_time_clock.hpp new file mode 100644 index 0000000000..9396579d30 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/microsec_time_clock.hpp @@ -0,0 +1,127 @@ +#ifndef DATE_TIME_HIGHRES_TIME_CLOCK_HPP___ +#define DATE_TIME_HIGHRES_TIME_CLOCK_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-05-10 05:15:48 -0400 (Mon, 10 May 2010) $ + */ + + +/*! @file microsec_time_clock.hpp + This file contains a high resolution time clock implementation. +*/ + +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK + +namespace boost { +namespace date_time { + + //! A clock providing microsecond level resolution + /*! A high precision clock that measures the local time + * at a resolution up to microseconds and adjusts to the + * resolution of the time system. For example, for the + * a library configuration with nano second resolution, + * the last 3 places of the fractional seconds will always + * be 000 since there are 1000 nano-seconds in a micro second. + */ + template + class microsec_clock + { + private: + //! Type for the function used to convert time_t to tm + typedef std::tm* (*time_converter)(const std::time_t*, std::tm*); + + public: + typedef typename time_type::date_type date_type; + typedef typename time_type::time_duration_type time_duration_type; + typedef typename time_duration_type::rep_type resolution_traits_type; + + //! return a local time object for the given zone, based on computer clock + //JKG -- looks like we could rewrite this against universal_time + template + static time_type local_time(shared_ptr tz_ptr) + { + typedef typename time_type::utc_time_type utc_time_type; + typedef second_clock second_clock; + // we'll need to know the utc_offset this machine has + // in order to get a utc_time_type set to utc + utc_time_type utc_time = second_clock::universal_time(); + time_duration_type utc_offset = second_clock::local_time() - utc_time; + // use micro clock to get a local time with sub seconds + // and adjust it to get a true utc time reading with sub seconds + utc_time = microsec_clock::local_time() - utc_offset; + return time_type(utc_time, tz_ptr); + } + + //! Returns the local time based on computer clock settings + static time_type local_time() + { + return create_time(&c_time::localtime); + } + + //! Returns the UTC time based on computer settings + static time_type universal_time() + { + return create_time(&c_time::gmtime); + } + + private: + static time_type create_time(time_converter converter) + { +#ifdef BOOST_HAS_GETTIMEOFDAY + timeval tv; + gettimeofday(&tv, 0); //gettimeofday does not support TZ adjust on Linux. + std::time_t t = tv.tv_sec; + boost::uint32_t sub_sec = tv.tv_usec; +#elif defined(BOOST_HAS_FTIME) + winapi::file_time ft; + winapi::get_system_time_as_file_time(ft); + uint64_t micros = winapi::file_time_to_microseconds(ft); // it will not wrap, since ft is the current time + // and cannot be before 1970-Jan-01 + std::time_t t = static_cast(micros / 1000000UL); // seconds since epoch + // microseconds -- static casts supress warnings + boost::uint32_t sub_sec = static_cast(micros % 1000000UL); +#else +#error Internal Boost.DateTime error: BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK is defined, however neither gettimeofday nor FILETIME support is detected. +#endif + + std::tm curr; + std::tm* curr_ptr = converter(&t, &curr); + date_type d(static_cast< typename date_type::year_type::value_type >(curr_ptr->tm_year + 1900), + static_cast< typename date_type::month_type::value_type >(curr_ptr->tm_mon + 1), + static_cast< typename date_type::day_type::value_type >(curr_ptr->tm_mday)); + + //The following line will adjust the fractional second tick in terms + //of the current time system. For example, if the time system + //doesn't support fractional seconds then res_adjust returns 0 + //and all the fractional seconds return 0. + int adjust = static_cast< int >(resolution_traits_type::res_adjust() / 1000000); + + time_duration_type td(static_cast< typename time_duration_type::hour_type >(curr_ptr->tm_hour), + static_cast< typename time_duration_type::min_type >(curr_ptr->tm_min), + static_cast< typename time_duration_type::sec_type >(curr_ptr->tm_sec), + sub_sec * adjust); + + return time_type(d,td); + } + }; + + +} } //namespace date_time + +#endif //BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/parse_format_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/parse_format_base.hpp new file mode 100644 index 0000000000..b17a5c8e77 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/parse_format_base.hpp @@ -0,0 +1,29 @@ +#ifndef DATE_TIME_PARSE_FORMAT_BASE__ +#define DATE_TIME_PARSE_FORMAT_BASE__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +namespace boost { +namespace date_time { + + //! Enum for distinguishing parsing and formatting options + enum month_format_spec {month_as_integer, month_as_short_string, + month_as_long_string}; + + //! Enum for distinguishing the order of Month, Day, & Year. + /*! Enum for distinguishing the order in which Month, Day, & Year + * will appear in a date string */ + enum ymd_order_spec {ymd_order_iso, //order is year-month-day + ymd_order_dmy, //day-month-year + ymd_order_us}; //order is month-day-year + + +} }//namespace date_time + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/period.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/period.hpp new file mode 100644 index 0000000000..c67bc36c65 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/period.hpp @@ -0,0 +1,377 @@ +#ifndef DATE_TIME_PERIOD_HPP___ +#define DATE_TIME_PERIOD_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +/*! \file period.hpp + This file contain the implementation of the period abstraction. This is + basically the same idea as a range. Although this class is intended for + use in the time library, it is pretty close to general enough for other + numeric uses. + +*/ + +#include "boost/operators.hpp" + + +namespace boost { +namespace date_time { + //!Provides generalized period type useful in date-time systems + /*!This template uses a class to represent a time point within the period + and another class to represent a duration. As a result, this class is + not appropriate for use when the number and duration representation + are the same (eg: in the regular number domain). + + A period can be specified by providing either the begining point and + a duration or the begining point and the end point( end is NOT part + of the period but 1 unit past it. A period will be "invalid" if either + end_point <= begin_point or the given duration is <= 0. Any valid period + will return false for is_null(). + + Zero length periods are also considered invalid. Zero length periods are + periods where the begining and end points are the same, or, the given + duration is zero. For a zero length period, the last point will be one + unit less than the begining point. + + In the case that the begin and last are the same, the period has a + length of one unit. + + The best way to handle periods is usually to provide a begining point and + a duration. So, day1 + 7 days is a week period which includes all of the + first day and 6 more days (eg: Sun to Sat). + + */ + template + class period : private + boost::less_than_comparable + , boost::equality_comparable< period + > > + { + public: + typedef point_rep point_type; + typedef duration_rep duration_type; + + period(point_rep first_point, point_rep end_point); + period(point_rep first_point, duration_rep len); + point_rep begin() const; + point_rep end() const; + point_rep last() const; + duration_rep length() const; + bool is_null() const; + bool operator==(const period& rhs) const; + bool operator<(const period& rhs) const; + void shift(const duration_rep& d); + void expand(const duration_rep& d); + bool contains(const point_rep& point) const; + bool contains(const period& other) const; + bool intersects(const period& other) const; + bool is_adjacent(const period& other) const; + bool is_before(const point_rep& point) const; + bool is_after(const point_rep& point) const; + period intersection(const period& other) const; + period merge(const period& other) const; + period span(const period& other) const; + private: + point_rep begin_; + point_rep last_; + }; + + //! create a period from begin to last eg: [begin,end) + /*! If end <= begin then the period will be invalid + */ + template + inline + period::period(point_rep first_point, + point_rep end_point) : + begin_(first_point), + last_(end_point - duration_rep::unit()) + {} + + //! create a period as [begin, begin+len) + /*! If len is <= 0 then the period will be invalid + */ + template + inline + period::period(point_rep first_point, duration_rep len) : + begin_(first_point), + last_(first_point + len-duration_rep::unit()) + { } + + + //! Return the first element in the period + template + inline + point_rep period::begin() const + { + return begin_; + } + + //! Return one past the last element + template + inline + point_rep period::end() const + { + return last_ + duration_rep::unit(); + } + + //! Return the last item in the period + template + inline + point_rep period::last() const + { + return last_; + } + + //! True if period is ill formed (length is zero or less) + template + inline + bool period::is_null() const + { + return end() <= begin_; + } + + //! Return the length of the period + template + inline + duration_rep period::length() const + { + if(last_ < begin_){ // invalid period + return last_+duration_rep::unit() - begin_; + } + else{ + return end() - begin_; // normal case + } + } + + //! Equality operator + template + inline + bool period::operator==(const period& rhs) const + { + return ((begin_ == rhs.begin_) && + (last_ == rhs.last_)); + } + + //! Strict as defined by rhs.last <= lhs.last + template + inline + bool period::operator<(const period& rhs) const + { + return (last_ < rhs.begin_); + } + + + //! Shift the start and end by the specified amount + template + inline + void period::shift(const duration_rep& d) + { + begin_ = begin_ + d; + last_ = last_ + d; + } + + /** Expands the size of the period by the duration on both ends. + * + *So before expand + *@code + * + * [-------] + * ^ ^ ^ ^ ^ ^ ^ + * 1 2 3 4 5 6 7 + * + *@endcode + * After expand(2) + *@code + * + * [----------------------] + * ^ ^ ^ ^ ^ ^ ^ + * 1 2 3 4 5 6 7 + * + *@endcode + */ + template + inline + void period::expand(const duration_rep& d) + { + begin_ = begin_ - d; + last_ = last_ + d; + } + + //! True if the point is inside the period, zero length periods contain no points + template + inline + bool period::contains(const point_rep& point) const + { + return ((point >= begin_) && + (point <= last_)); + } + + + //! True if this period fully contains (or equals) the other period + template + inline + bool period::contains(const period& other) const + { + return ((begin_ <= other.begin_) && (last_ >= other.last_)); + } + + + //! True if periods are next to each other without a gap. + /* In the example below, p1 and p2 are adjacent, but p3 is not adjacent + * with either of p1 or p2. + *@code + * [-p1-) + * [-p2-) + * [-p3-) + *@endcode + */ + template + inline + bool + period::is_adjacent(const period& other) const + { + return (other.begin() == end() || + begin_ == other.end()); + } + + + //! True if all of the period is prior or t < start + /* In the example below only point 1 would evaluate to true. + *@code + * [---------]) + * ^ ^ ^ ^ ^ + * 1 2 3 4 5 + * + *@endcode + */ + template + inline + bool + period::is_after(const point_rep& t) const + { + if (is_null()) + { + return false; //null period isn't after + } + + return t < begin_; + } + + //! True if all of the period is prior to the passed point or end <= t + /* In the example below points 4 and 5 return true. + *@code + * [---------]) + * ^ ^ ^ ^ ^ + * 1 2 3 4 5 + * + *@endcode + */ + template + inline + bool + period::is_before(const point_rep& t) const + { + if (is_null()) + { + return false; //null period isn't before anything + } + + return last_ < t; + } + + + //! True if the periods overlap in any way + /* In the example below p1 intersects with p2, p4, and p6. + *@code + * [---p1---) + * [---p2---) + * [---p3---) + * [---p4---) + * [-p5-) + * [-p6-) + *@endcode + */ + template + inline + bool period::intersects(const period& other) const + { + return ( contains(other.begin_) || + other.contains(begin_) || + ((other.begin_ < begin_) && (other.last_ >= begin_))); + } + + //! Returns the period of intersection or invalid range no intersection + template + inline + period + period::intersection(const period& other) const + { + if (begin_ > other.begin_) { + if (last_ <= other.last_) { //case2 + return *this; + } + //case 1 + return period(begin_, other.end()); + } + else { + if (last_ <= other.last_) { //case3 + return period(other.begin_, this->end()); + } + //case4 + return other; + } + //unreachable + } + + //! Returns the union of intersecting periods -- or null period + /*! + */ + template + inline + period + period::merge(const period& other) const + { + if (this->intersects(other)) { + if (begin_ < other.begin_) { + return period(begin_, last_ > other.last_ ? this->end() : other.end()); + } + + return period(other.begin_, last_ > other.last_ ? this->end() : other.end()); + + } + return period(begin_,begin_); // no intersect return null + } + + //! Combine two periods with earliest start and latest end. + /*! Combines two periods and any gap between them such that + * start = min(p1.start, p2.start) + * end = max(p1.end , p2.end) + *@code + * [---p1---) + * [---p2---) + * result: + * [-----------p3----------) + *@endcode + */ + template + inline + period + period::span(const period& other) const + { + point_rep start((begin_ < other.begin_) ? begin() : other.begin()); + point_rep newend((last_ < other.last_) ? other.end() : this->end()); + return period(start, newend); + } + + +} } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/period_formatter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/period_formatter.hpp new file mode 100644 index 0000000000..08082e10f6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/period_formatter.hpp @@ -0,0 +1,196 @@ + +#ifndef DATETIME_PERIOD_FORMATTER_HPP___ +#define DATETIME_PERIOD_FORMATTER_HPP___ + +/* Copyright (c) 2002-2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + + +namespace boost { namespace date_time { + + + //! Not a facet, but a class used to specify and control period formats + /*! Provides settings for the following: + * - period_separator -- default '/' + * - period_open_start_delimeter -- default '[' + * - period_open_range_end_delimeter -- default ')' + * - period_closed_range_end_delimeter -- default ']' + * - display_as_open_range, display_as_closed_range -- default closed_range + * + * Thus the default formatting for a period is as follows: + *@code + * [period.start()/period.last()] + *@endcode + * So for a typical date_period this would be + *@code + * [2004-Jan-04/2004-Feb-01] + *@endcode + * where the date formatting is controlled by the date facet + */ + template > > + class period_formatter { + public: + typedef std::basic_string string_type; + typedef CharT char_type; + typedef typename std::basic_string::const_iterator const_itr_type; + typedef std::vector > collection_type; + + static const char_type default_period_separator[2]; + static const char_type default_period_start_delimeter[2]; + static const char_type default_period_open_range_end_delimeter[2]; + static const char_type default_period_closed_range_end_delimeter[2]; + + enum range_display_options { AS_OPEN_RANGE, AS_CLOSED_RANGE }; + + //! Constructor that sets up period formatter options -- default should suffice most cases. + period_formatter(range_display_options range_option_in = AS_CLOSED_RANGE, + const char_type* const period_separator = default_period_separator, + const char_type* const period_start_delimeter = default_period_start_delimeter, + const char_type* const period_open_range_end_delimeter = default_period_open_range_end_delimeter, + const char_type* const period_closed_range_end_delimeter = default_period_closed_range_end_delimeter) : + m_range_option(range_option_in), + m_period_separator(period_separator), + m_period_start_delimeter(period_start_delimeter), + m_open_range_end_delimeter(period_open_range_end_delimeter), + m_closed_range_end_delimeter(period_closed_range_end_delimeter) + {} + + //! Puts the characters between period elements into stream -- default is / + OutItrT put_period_separator(OutItrT& oitr) const + { + const_itr_type ci = m_period_separator.begin(); + while (ci != m_period_separator.end()) { + *oitr = *ci; + ci++; + } + return oitr; + } + + //! Puts the period start characters into stream -- default is [ + OutItrT put_period_start_delimeter(OutItrT& oitr) const + { + const_itr_type ci = m_period_start_delimeter.begin(); + while (ci != m_period_start_delimeter.end()) { + *oitr = *ci; + ci++; + } + return oitr; + } + + //! Puts the period end characters into stream as controled by open/closed range setting. + OutItrT put_period_end_delimeter(OutItrT& oitr) const + { + + const_itr_type ci, end; + if (m_range_option == AS_OPEN_RANGE) { + ci = m_open_range_end_delimeter.begin(); + end = m_open_range_end_delimeter.end(); + } + else { + ci = m_closed_range_end_delimeter.begin(); + end = m_closed_range_end_delimeter.end(); + } + while (ci != end) { + *oitr = *ci; + ci++; + } + return oitr; + } + + range_display_options range_option() const + { + return m_range_option; + } + + //! Reset the range_option control + void + range_option(range_display_options option) const + { + m_range_option = option; + } + void delimiter_strings(const string_type& separator, + const string_type& start_delim, + const string_type& open_end_delim, + const string_type& closed_end_delim) + { + m_period_separator; + m_period_start_delimeter; + m_open_range_end_delimeter; + m_closed_range_end_delimeter; + } + + + //! Generic code to output a period -- no matter the period type. + /*! This generic code will output any period using a facet to + * to output the 'elements'. For example, in the case of a date_period + * the elements will be instances of a date which will be formatted + * according the to setup in the passed facet parameter. + * + * The steps for formatting a period are always the same: + * - put the start delimiter + * - put start element + * - put the separator + * - put either last or end element depending on range settings + * - put end delimeter depending on range settings + * + * Thus for a typical date period the result might look like this: + *@code + * + * [March 01, 2004/June 07, 2004] <-- closed range + * [March 01, 2004/June 08, 2004) <-- open range + * + *@endcode + */ + template + OutItrT put_period(OutItrT next, + std::ios_base& a_ios, + char_type a_fill, + const period_type& p, + const facet_type& facet) const { + put_period_start_delimeter(next); + next = facet.put(next, a_ios, a_fill, p.begin()); + put_period_separator(next); + if (m_range_option == AS_CLOSED_RANGE) { + facet.put(next, a_ios, a_fill, p.last()); + } + else { + facet.put(next, a_ios, a_fill, p.end()); + } + put_period_end_delimeter(next); + return next; + } + + + private: + range_display_options m_range_option; + string_type m_period_separator; + string_type m_period_start_delimeter; + string_type m_open_range_end_delimeter; + string_type m_closed_range_end_delimeter; + }; + + template + const typename period_formatter::char_type + period_formatter::default_period_separator[2] = {'/'}; + + template + const typename period_formatter::char_type + period_formatter::default_period_start_delimeter[2] = {'['}; + + template + const typename period_formatter::char_type + period_formatter::default_period_open_range_end_delimeter[2] = {')'}; + + template + const typename period_formatter::char_type + period_formatter::default_period_closed_range_end_delimeter[2] = {']'}; + + } } //namespace boost::date_time + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/period_parser.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/period_parser.hpp new file mode 100644 index 0000000000..9cd57e18c7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/period_parser.hpp @@ -0,0 +1,198 @@ + +#ifndef DATETIME_PERIOD_PARSER_HPP___ +#define DATETIME_PERIOD_PARSER_HPP___ + +/* Copyright (c) 2002-2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-13 15:10:23 -0500 (Thu, 13 Nov 2008) $ + */ + +#include +#include +#include + + +namespace boost { namespace date_time { + + + //! Not a facet, but a class used to specify and control period parsing + /*! Provides settings for the following: + * - period_separator -- default '/' + * - period_open_start_delimeter -- default '[' + * - period_open_range_end_delimeter -- default ')' + * - period_closed_range_end_delimeter -- default ']' + * - display_as_open_range, display_as_closed_range -- default closed_range + * + * For a typical date_period, the contents of the input stream would be + *@code + * [2004-Jan-04/2004-Feb-01] + *@endcode + * where the date format is controlled by the date facet + */ + template + class period_parser { + public: + typedef std::basic_string string_type; + typedef CharT char_type; + //typedef typename std::basic_string::const_iterator const_itr_type; + typedef std::istreambuf_iterator stream_itr_type; + typedef string_parse_tree parse_tree_type; + typedef typename parse_tree_type::parse_match_result_type match_results; + typedef std::vector > collection_type; + + static const char_type default_period_separator[2]; + static const char_type default_period_start_delimeter[2]; + static const char_type default_period_open_range_end_delimeter[2]; + static const char_type default_period_closed_range_end_delimeter[2]; + + enum period_range_option { AS_OPEN_RANGE, AS_CLOSED_RANGE }; + + //! Constructor that sets up period parser options + period_parser(period_range_option range_opt = AS_CLOSED_RANGE, + const char_type* const period_separator = default_period_separator, + const char_type* const period_start_delimeter = default_period_start_delimeter, + const char_type* const period_open_range_end_delimeter = default_period_open_range_end_delimeter, + const char_type* const period_closed_range_end_delimeter = default_period_closed_range_end_delimeter) + : m_range_option(range_opt) + { + delimiters.push_back(string_type(period_separator)); + delimiters.push_back(string_type(period_start_delimeter)); + delimiters.push_back(string_type(period_open_range_end_delimeter)); + delimiters.push_back(string_type(period_closed_range_end_delimeter)); + } + + period_parser(const period_parser& p_parser) + { + this->delimiters = p_parser.delimiters; + this->m_range_option = p_parser.m_range_option; + } + + period_range_option range_option() const + { + return m_range_option; + } + void range_option(period_range_option option) + { + m_range_option = option; + } + collection_type delimiter_strings() const + { + return delimiters; + } + void delimiter_strings(const string_type& separator, + const string_type& start_delim, + const string_type& open_end_delim, + const string_type& closed_end_delim) + { + delimiters.clear(); + delimiters.push_back(separator); + delimiters.push_back(start_delim); + delimiters.push_back(open_end_delim); + delimiters.push_back(closed_end_delim); + } + + //! Generic code to parse a period -- no matter the period type. + /*! This generic code will parse any period using a facet to + * to get the 'elements'. For example, in the case of a date_period + * the elements will be instances of a date which will be parsed + * according the to setup in the passed facet parameter. + * + * The steps for parsing a period are always the same: + * - consume the start delimiter + * - get start element + * - consume the separator + * - get either last or end element depending on range settings + * - consume the end delimeter depending on range settings + * + * Thus for a typical date period the contents of the input stream + * might look like this: + *@code + * + * [March 01, 2004/June 07, 2004] <-- closed range + * [March 01, 2004/June 08, 2004) <-- open range + * + *@endcode + */ + template + period_type get_period(stream_itr_type& sitr, + stream_itr_type& stream_end, + std::ios_base& a_ios, + const period_type& /* p */, + const duration_type& dur_unit, + const facet_type& facet) const + { + // skip leading whitespace + while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } + + typedef typename period_type::point_type point_type; + point_type p1(not_a_date_time), p2(not_a_date_time); + + + consume_delim(sitr, stream_end, delimiters[START]); // start delim + facet.get(sitr, stream_end, a_ios, p1); // first point + consume_delim(sitr, stream_end, delimiters[SEPARATOR]); // separator + facet.get(sitr, stream_end, a_ios, p2); // second point + + // period construction parameters are always open range [begin, end) + if (m_range_option == AS_CLOSED_RANGE) { + consume_delim(sitr, stream_end, delimiters[CLOSED_END]);// end delim + // add 1 duration unit to p2 to make range open + p2 += dur_unit; + } + else { + consume_delim(sitr, stream_end, delimiters[OPEN_END]); // end delim + } + + return period_type(p1, p2); + } + + private: + collection_type delimiters; + period_range_option m_range_option; + + enum delim_ids { SEPARATOR, START, OPEN_END, CLOSED_END }; + + //! throws ios_base::failure if delimiter and parsed data do not match + void consume_delim(stream_itr_type& sitr, + stream_itr_type& stream_end, + const string_type& delim) const + { + /* string_parse_tree will not parse a string of punctuation characters + * without knowing exactly how many characters to process + * Ex [2000. Will not parse out the '[' string without knowing + * to process only one character. By using length of the delimiter + * string we can safely iterate past it. */ + string_type s; + for(unsigned int i = 0; i < delim.length() && sitr != stream_end; ++i) { + s += *sitr; + ++sitr; + } + if(s != delim) { + boost::throw_exception(std::ios_base::failure("Parse failed. Expected '" + + convert_string_type(delim) + "' but found '" + convert_string_type(s) + "'")); + } + } + }; + + template + const typename period_parser::char_type + period_parser::default_period_separator[2] = {'/'}; + + template + const typename period_parser::char_type + period_parser::default_period_start_delimeter[2] = {'['}; + + template + const typename period_parser::char_type + period_parser::default_period_open_range_end_delimeter[2] = {')'}; + + template + const typename period_parser::char_type + period_parser::default_period_closed_range_end_delimeter[2] = {']'}; + + } } //namespace boost::date_time + +#endif // DATETIME_PERIOD_PARSER_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/conversion.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/conversion.hpp new file mode 100644 index 0000000000..3fb21d79eb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/conversion.hpp @@ -0,0 +1,94 @@ +#ifndef POSIX_TIME_CONVERSION_HPP___ +#define POSIX_TIME_CONVERSION_HPP___ + +/* Copyright (c) 2002-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-06-09 14:10:13 -0400 (Wed, 09 Jun 2010) $ + */ + +#include +#include +#include +#include +#include +#include // absolute_value +#include + +namespace boost { + +namespace posix_time { + + + //! Function that converts a time_t into a ptime. + inline + ptime from_time_t(std::time_t t) + { + ptime start(gregorian::date(1970,1,1)); + return start + seconds(static_cast(t)); + } + + //! Convert a time to a tm structure truncating any fractional seconds + inline + std::tm to_tm(const boost::posix_time::ptime& t) { + std::tm timetm = boost::gregorian::to_tm(t.date()); + boost::posix_time::time_duration td = t.time_of_day(); + timetm.tm_hour = td.hours(); + timetm.tm_min = td.minutes(); + timetm.tm_sec = td.seconds(); + timetm.tm_isdst = -1; // -1 used when dst info is unknown + return timetm; + } + //! Convert a time_duration to a tm structure truncating any fractional seconds and zeroing fields for date components + inline + std::tm to_tm(const boost::posix_time::time_duration& td) { + std::tm timetm; + std::memset(&timetm, 0, sizeof(timetm)); + timetm.tm_hour = date_time::absolute_value(td.hours()); + timetm.tm_min = date_time::absolute_value(td.minutes()); + timetm.tm_sec = date_time::absolute_value(td.seconds()); + timetm.tm_isdst = -1; // -1 used when dst info is unknown + return timetm; + } + + //! Convert a tm struct to a ptime ignoring is_dst flag + inline + ptime ptime_from_tm(const std::tm& timetm) { + boost::gregorian::date d = boost::gregorian::date_from_tm(timetm); + return ptime(d, time_duration(timetm.tm_hour, timetm.tm_min, timetm.tm_sec)); + } + + +#if defined(BOOST_HAS_FTIME) + + //! Function to create a time object from an initialized FILETIME struct. + /*! Function to create a time object from an initialized FILETIME struct. + * A FILETIME struct holds 100-nanosecond units (0.0000001). When + * built with microsecond resolution the FILETIME's sub second value + * will be truncated. Nanosecond resolution has no truncation. + * + * \note FILETIME is part of the Win32 API, so it is not portable to non-windows + * platforms. + * + * \note The function is templated on the FILETIME type, so that + * it can be used with both native FILETIME and the ad-hoc + * boost::date_time::winapi::file_time type. + */ + template< typename TimeT, typename FileTimeT > + inline + TimeT from_ftime(const FileTimeT& ft) + { + return boost::date_time::time_from_ftime(ft); + } + +#endif // BOOST_HAS_FTIME + +} } //namespace boost::posix_time + + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/date_duration_operators.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/date_duration_operators.hpp new file mode 100644 index 0000000000..e6899ba0aa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/date_duration_operators.hpp @@ -0,0 +1,114 @@ +#ifndef DATE_DURATION_OPERATORS_HPP___ +#define DATE_DURATION_OPERATORS_HPP___ + +/* Copyright (c) 2004 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/gregorian/greg_duration_types.hpp" +#include "boost/date_time/posix_time/ptime.hpp" + +namespace boost { +namespace posix_time { + + /*!@file date_duration_operators.hpp Operators for ptime and + * optional gregorian types. Operators use snap-to-end-of-month behavior. + * Further details on this behavior can be found in reference for + * date_time/date_duration_types.hpp and documentation for + * month and year iterators. + */ + + + /*! Adds a months object and a ptime. Result will be same + * day-of-month as ptime unless original day was the last day of month. + * see date_time::months_duration for more details */ + inline + ptime + operator+(const ptime& t, const boost::gregorian::months& m) + { + return t + m.get_offset(t.date()); + } + + /*! Adds a months object to a ptime. Result will be same + * day-of-month as ptime unless original day was the last day of month. + * see date_time::months_duration for more details */ + inline + ptime + operator+=(ptime& t, const boost::gregorian::months& m) + { + // get_neg_offset returns a negative duration, so we add + return t += m.get_offset(t.date()); + } + + /*! Subtracts a months object and a ptime. Result will be same + * day-of-month as ptime unless original day was the last day of month. + * see date_time::months_duration for more details */ + inline + ptime + operator-(const ptime& t, const boost::gregorian::months& m) + { + // get_neg_offset returns a negative duration, so we add + return t + m.get_neg_offset(t.date()); + } + + /*! Subtracts a months object from a ptime. Result will be same + * day-of-month as ptime unless original day was the last day of month. + * see date_time::months_duration for more details */ + inline + ptime + operator-=(ptime& t, const boost::gregorian::months& m) + { + return t += m.get_neg_offset(t.date()); + } + + // ptime & years + + /*! Adds a years object and a ptime. Result will be same + * month and day-of-month as ptime unless original day was the + * last day of month. see date_time::years_duration for more details */ + inline + ptime + operator+(const ptime& t, const boost::gregorian::years& y) + { + return t + y.get_offset(t.date()); + } + + /*! Adds a years object to a ptime. Result will be same + * month and day-of-month as ptime unless original day was the + * last day of month. see date_time::years_duration for more details */ + inline + ptime + operator+=(ptime& t, const boost::gregorian::years& y) + { + return t += y.get_offset(t.date()); + } + + /*! Subtracts a years object and a ptime. Result will be same + * month and day-of-month as ptime unless original day was the + * last day of month. see date_time::years_duration for more details */ + inline + ptime + operator-(const ptime& t, const boost::gregorian::years& y) + { + // get_neg_offset returns a negative duration, so we add + return t + y.get_neg_offset(t.date()); + } + + /*! Subtracts a years object from a ptime. Result will be same + * month and day-of-month as ptime unless original day was the + * last day of month. see date_time::years_duration for more details */ + inline + ptime + operator-=(ptime& t, const boost::gregorian::years& y) + { + // get_neg_offset returns a negative duration, so we add + return t += y.get_neg_offset(t.date()); + } + +}} // namespaces + +#endif // DATE_DURATION_OPERATORS_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time.hpp new file mode 100644 index 0000000000..4e9294c426 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time.hpp @@ -0,0 +1,39 @@ +#ifndef POSIX_TIME_HPP___ +#define POSIX_TIME_HPP___ + +/* Copyright (c) 2002-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ +/*!@file posix_time.hpp Global header file to get all of posix time types + */ + +#include "boost/date_time/compiler_config.hpp" +#include "boost/date_time/posix_time/ptime.hpp" +#if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) +#include "boost/date_time/posix_time/date_duration_operators.hpp" +#endif + +// output functions +#if defined(BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS) +#include "boost/date_time/posix_time/time_formatters_limited.hpp" +#else +#include "boost/date_time/posix_time/time_formatters.hpp" +#endif // BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS + +// streaming operators +#if defined(USE_DATE_TIME_PRE_1_33_FACET_IO) +#include "boost/date_time/posix_time/posix_time_legacy_io.hpp" +#else +#include "boost/date_time/posix_time/posix_time_io.hpp" +#endif // USE_DATE_TIME_PRE_1_33_FACET_IO + +#include "boost/date_time/posix_time/time_parsers.hpp" +#include "boost/date_time/posix_time/conversion.hpp" + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_config.hpp new file mode 100644 index 0000000000..60c3f7ee37 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_config.hpp @@ -0,0 +1,178 @@ +#ifndef POSIX_TIME_CONFIG_HPP___ +#define POSIX_TIME_CONFIG_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2009-06-04 07:52:28 -0400 (Thu, 04 Jun 2009) $ + */ + +#include //for MCW 7.2 std::abs(long long) +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace posix_time { + +//Remove the following line if you want 64 bit millisecond resolution time +//#define BOOST_GDTL_POSIX_TIME_STD_CONFIG + +#ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG + // set up conditional test compilations +#define BOOST_DATE_TIME_HAS_MILLISECONDS +#define BOOST_DATE_TIME_HAS_MICROSECONDS +#define BOOST_DATE_TIME_HAS_NANOSECONDS + typedef date_time::time_resolution_traits time_res_traits; +#else + // set up conditional test compilations +#define BOOST_DATE_TIME_HAS_MILLISECONDS +#define BOOST_DATE_TIME_HAS_MICROSECONDS +#undef BOOST_DATE_TIME_HAS_NANOSECONDS + typedef date_time::time_resolution_traits< + boost::date_time::time_resolution_traits_adapted64_impl, boost::date_time::micro, + 1000000, 6 > time_res_traits; + + +// #undef BOOST_DATE_TIME_HAS_MILLISECONDS +// #undef BOOST_DATE_TIME_HAS_MICROSECONDS +// #undef BOOST_DATE_TIME_HAS_NANOSECONDS +// typedef date_time::time_resolution_traits time_res_traits; + +#endif + + + //! Base time duration type + /*! \ingroup time_basics + */ + class time_duration : + public date_time::time_duration + { + public: + typedef time_res_traits rep_type; + typedef time_res_traits::day_type day_type; + typedef time_res_traits::hour_type hour_type; + typedef time_res_traits::min_type min_type; + typedef time_res_traits::sec_type sec_type; + typedef time_res_traits::fractional_seconds_type fractional_seconds_type; + typedef time_res_traits::tick_type tick_type; + typedef time_res_traits::impl_type impl_type; + time_duration(hour_type hour, + min_type min, + sec_type sec, + fractional_seconds_type fs=0) : + date_time::time_duration(hour,min,sec,fs) + {} + time_duration() : + date_time::time_duration(0,0,0) + {} + //! Construct from special_values + time_duration(boost::date_time::special_values sv) : + date_time::time_duration(sv) + {} + //Give duration access to ticks constructor -- hide from users + friend class date_time::time_duration; + private: + explicit time_duration(impl_type tick_count) : + date_time::time_duration(tick_count) + {} + }; + +#ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG + + //! Simple implementation for the time rep + struct simple_time_rep + { + typedef gregorian::date date_type; + typedef time_duration time_duration_type; + simple_time_rep(date_type d, time_duration_type tod) : + day(d), + time_of_day(tod) + { + // make sure we have sane values for date & time + if(!day.is_special() && !time_of_day.is_special()){ + if(time_of_day >= time_duration_type(24,0,0)) { + while(time_of_day >= time_duration_type(24,0,0)) { + day += date_type::duration_type(1); + time_of_day -= time_duration_type(24,0,0); + } + } + else if(time_of_day.is_negative()) { + while(time_of_day.is_negative()) { + day -= date_type::duration_type(1); + time_of_day += time_duration_type(24,0,0); + } + } + } + } + date_type day; + time_duration_type time_of_day; + bool is_special()const + { + return(is_pos_infinity() || is_neg_infinity() || is_not_a_date_time()); + } + bool is_pos_infinity()const + { + return(day.is_pos_infinity() || time_of_day.is_pos_infinity()); + } + bool is_neg_infinity()const + { + return(day.is_neg_infinity() || time_of_day.is_neg_infinity()); + } + bool is_not_a_date_time()const + { + return(day.is_not_a_date() || time_of_day.is_not_a_date_time()); + } + }; + + class posix_time_system_config + { + public: + typedef simple_time_rep time_rep_type; + typedef gregorian::date date_type; + typedef gregorian::date_duration date_duration_type; + typedef time_duration time_duration_type; + typedef time_res_traits::tick_type int_type; + typedef time_res_traits resolution_traits; +#if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) //help bad compilers +#else + BOOST_STATIC_CONSTANT(boost::int64_t, tick_per_second = 1000000000); +#endif + }; + +#else + + class millisec_posix_time_system_config + { + public: + typedef boost::int64_t time_rep_type; + //typedef time_res_traits::tick_type time_rep_type; + typedef gregorian::date date_type; + typedef gregorian::date_duration date_duration_type; + typedef time_duration time_duration_type; + typedef time_res_traits::tick_type int_type; + typedef time_res_traits::impl_type impl_type; + typedef time_res_traits resolution_traits; +#if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) //help bad compilers +#else + BOOST_STATIC_CONSTANT(boost::int64_t, tick_per_second = 1000000); +#endif + }; + +#endif + +} }//namespace posix_time + + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_duration.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_duration.hpp new file mode 100644 index 0000000000..db3b85fec3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_duration.hpp @@ -0,0 +1,82 @@ +#ifndef POSIX_TIME_DURATION_HPP___ +#define POSIX_TIME_DURATION_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/posix_time/posix_time_config.hpp" + +namespace boost { +namespace posix_time { + + //! Allows expression of durations as an hour count + /*! \ingroup time_basics + */ + class hours : public time_duration + { + public: + explicit hours(long h) : + time_duration(h,0,0) + {} + }; + + //! Allows expression of durations as a minute count + /*! \ingroup time_basics + */ + class minutes : public time_duration + { + public: + explicit minutes(long m) : + time_duration(0,m,0) + {} + }; + + //! Allows expression of durations as a seconds count + /*! \ingroup time_basics + */ + class seconds : public time_duration + { + public: + explicit seconds(long s) : + time_duration(0,0,s) + {} + }; + + + //! Allows expression of durations as milli seconds + /*! \ingroup time_basics + */ + typedef date_time::subsecond_duration millisec; + typedef date_time::subsecond_duration milliseconds; + + //! Allows expression of durations as micro seconds + /*! \ingroup time_basics + */ + typedef date_time::subsecond_duration microsec; + typedef date_time::subsecond_duration microseconds; + + //This is probably not needed anymore... +#if defined(BOOST_DATE_TIME_HAS_NANOSECONDS) + + //! Allows expression of durations as nano seconds + /*! \ingroup time_basics + */ + typedef date_time::subsecond_duration nanosec; + typedef date_time::subsecond_duration nanoseconds; + + +#endif + + + + +} }//namespace posix_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_io.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_io.hpp new file mode 100644 index 0000000000..9a80737a47 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_io.hpp @@ -0,0 +1,239 @@ +#ifndef DATE_TIME_POSIX_TIME_IO_HPP__ +#define DATE_TIME_POSIX_TIME_IO_HPP__ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-13 14:05:31 -0500 (Thu, 13 Nov 2008) $ + */ + +#include +#include +#include // i/ostreambuf_iterator +#include +#include +#include +#include +#include +#include +#include // to_tm will be needed in the facets + +namespace boost { +namespace posix_time { + + + //! wptime_facet is depricated and will be phased out. use wtime_facet instead + //typedef boost::date_time::time_facet wptime_facet; + //! ptime_facet is depricated and will be phased out. use time_facet instead + //typedef boost::date_time::time_facet ptime_facet; + + //! wptime_input_facet is depricated and will be phased out. use wtime_input_facet instead + //typedef boost::date_time::time_input_facet wptime_input_facet; + //! ptime_input_facet is depricated and will be phased out. use time_input_facet instead + //typedef boost::date_time::time_input_facet ptime_input_facet; + + typedef boost::date_time::time_facet wtime_facet; + typedef boost::date_time::time_facet time_facet; + + typedef boost::date_time::time_input_facet wtime_input_facet; + typedef boost::date_time::time_input_facet time_input_facet; + + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, + const ptime& p) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::time_facet custom_ptime_facet; + typedef std::time_put std_ptime_facet; + std::ostreambuf_iterator oitr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(oitr, os, os.fill(), p); + else { + //instantiate a custom facet for dealing with times since the user + //has not put one in the stream so far. This is for efficiency + //since we would always need to reconstruct for every time period + //if the locale did not already exist. Of course this will be overridden + //if the user imbues as some later point. + custom_ptime_facet* f = new custom_ptime_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(oitr, os, os.fill(), p); + } + return os; + } + + //! input operator for ptime + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, ptime& pt) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::time_input_facet time_input_facet; + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, pt); + } + else { + time_input_facet* f = new time_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, pt); + } + } + catch(...) { + // mask tells us what exceptions are turned on + std::ios_base::iostate exception_mask = is.exceptions(); + // if the user wants exceptions on failbit, we'll rethrow our + // date_time exception & set the failbit + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} // ignore this one + throw; // rethrow original exception + } + else { + // if the user want's to fail quietly, we simply set the failbit + is.setstate(std::ios_base::failbit); + } + } + } + return is; + } + + + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, + const boost::posix_time::time_period& p) { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::time_facet custom_ptime_facet; + typedef std::time_put std_time_facet; + std::ostreambuf_iterator oitr(os); + if (std::has_facet(os.getloc())) { + std::use_facet(os.getloc()).put(oitr, os, os.fill(), p); + } + else { + //instantiate a custom facet for dealing with periods since the user + //has not put one in the stream so far. This is for efficiency + //since we would always need to reconstruct for every time period + //if the local did not already exist. Of course this will be overridden + //if the user imbues as some later point. + custom_ptime_facet* f = new custom_ptime_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(oitr, os, os.fill(), p); + } + return os; + } + + //! input operator for time_period + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, time_period& tp) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::time_input_facet time_input_facet; + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, tp); + } + else { + time_input_facet* f = new time_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, tp); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + } + } + return is; + } + + + //! ostream operator for posix_time::time_duration + // todo fix to use facet -- place holder for now... + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const time_duration& td) + { + boost::io::ios_flags_saver iflags(os); + typedef boost::date_time::time_facet custom_ptime_facet; + typedef std::time_put std_ptime_facet; + std::ostreambuf_iterator oitr(os); + if (std::has_facet(os.getloc())) + std::use_facet(os.getloc()).put(oitr, os, os.fill(), td); + else { + //instantiate a custom facet for dealing with times since the user + //has not put one in the stream so far. This is for efficiency + //since we would always need to reconstruct for every time period + //if the locale did not already exist. Of course this will be overridden + //if the user imbues as some later point. + custom_ptime_facet* f = new custom_ptime_facet(); + std::locale l = std::locale(os.getloc(), f); + os.imbue(l); + f->put(oitr, os, os.fill(), td); + } + return os; + } + + //! input operator for time_duration + template + inline + std::basic_istream& + operator>>(std::basic_istream& is, time_duration& td) + { + boost::io::ios_flags_saver iflags(is); + typename std::basic_istream::sentry strm_sentry(is, false); + if (strm_sentry) { + try { + typedef typename date_time::time_input_facet time_input_facet; + std::istreambuf_iterator sit(is), str_end; + if(std::has_facet(is.getloc())) { + std::use_facet(is.getloc()).get(sit, str_end, is, td); + } + else { + time_input_facet* f = new time_input_facet(); + std::locale l = std::locale(is.getloc(), f); + is.imbue(l); + f->get(sit, str_end, is, td); + } + } + catch(...) { + std::ios_base::iostate exception_mask = is.exceptions(); + if(std::ios_base::failbit & exception_mask) { + try { is.setstate(std::ios_base::failbit); } + catch(std::ios_base::failure&) {} + throw; // rethrow original exception + } + else { + is.setstate(std::ios_base::failbit); + } + } + } + return is; + } + +} } // namespaces +#endif // DATE_TIME_POSIX_TIME_IO_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_legacy_io.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_legacy_io.hpp new file mode 100644 index 0000000000..f5b20a8f8b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_legacy_io.hpp @@ -0,0 +1,153 @@ +#ifndef POSIX_TIME_PRE133_OPERATORS_HPP___ +#define POSIX_TIME_PRE133_OPERATORS_HPP___ + +/* Copyright (c) 2002-2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +/*! @file posix_time_pre133_operators.hpp + * These input and output operators are for use with the + * pre 1.33 version of the date_time libraries io facet code. + * The operators used in version 1.33 and later can be found + * in posix_time_io.hpp */ + +#include +#include +#include +#include "boost/date_time/compiler_config.hpp" +#include "boost/date_time/gregorian/gregorian.hpp" +#include "boost/date_time/posix_time/posix_time_duration.hpp" +#include "boost/date_time/posix_time/ptime.hpp" +#include "boost/date_time/posix_time/time_period.hpp" +#include "boost/date_time/time_parsing.hpp" + +namespace boost { +namespace posix_time { + + +//The following code is removed for configurations with poor std::locale support (eg: MSVC6, gcc 2.9x) +#ifndef BOOST_DATE_TIME_NO_LOCALE +#if defined(USE_DATE_TIME_PRE_1_33_FACET_IO) + //! ostream operator for posix_time::time_duration + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const time_duration& td) + { + typedef boost::date_time::ostream_time_duration_formatter duration_formatter; + duration_formatter::duration_put(td, os); + return os; + } + + //! ostream operator for posix_time::ptime + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const ptime& t) + { + typedef boost::date_time::ostream_time_formatter time_formatter; + time_formatter::time_put(t, os); + return os; + } + + //! ostream operator for posix_time::time_period + template + inline + std::basic_ostream& + operator<<(std::basic_ostream& os, const time_period& tp) + { + typedef boost::date_time::ostream_time_period_formatter period_formatter; + period_formatter::period_put(tp, os); + return os; + } +#endif // USE_DATE_TIME_PRE_1_33_FACET_IO +/******** input streaming ********/ + template + inline + std::basic_istream& operator>>(std::basic_istream& is, time_duration& td) + { + // need to create a std::string and parse it + std::basic_string inp_s; + std::stringstream out_ss; + is >> inp_s; + typename std::basic_string::iterator b = inp_s.begin(); + // need to use both iterators because there is no requirement + // for the data held by a std::basic_string<> be terminated with + // any marker (such as '\0'). + typename std::basic_string::iterator e = inp_s.end(); + while(b != e){ + out_ss << out_ss.narrow(*b, 0); + ++b; + } + + td = date_time::parse_delimited_time_duration(out_ss.str()); + return is; + } + + template + inline + std::basic_istream& operator>>(std::basic_istream& is, ptime& pt) + { + gregorian::date d(not_a_date_time); + time_duration td(0,0,0); + is >> d >> td; + pt = ptime(d, td); + + return is; + } + + /** operator>> for time_period. time_period must be in + * "[date time_duration/date time_duration]" format. */ + template + inline + std::basic_istream& operator>>(std::basic_istream& is, time_period& tp) + { + gregorian::date d(not_a_date_time); + time_duration td(0,0,0); + ptime beg(d, td); + ptime end(beg); + std::basic_string s; + // get first date string and remove leading '[' + is >> s; + { + std::basic_stringstream ss; + ss << s.substr(s.find('[')+1); + ss >> d; + } + // get first time_duration & second date string, remove the '/' + // and split into 2 strings + is >> s; + { + std::basic_stringstream ss; + ss << s.substr(0, s.find('/')); + ss >> td; + } + beg = ptime(d, td); + { + std::basic_stringstream ss; + ss << s.substr(s.find('/')+1); + ss >> d; + } + // get last time_duration and remove the trailing ']' + is >> s; + { + std::basic_stringstream ss; + ss << s.substr(0, s.find(']')); + ss >> td; + } + end = ptime(d, td); + + tp = time_period(beg,end); + return is; + } + + +#endif //BOOST_DATE_TIME_NO_LOCALE + +} } // namespaces + +#endif // POSIX_TIME_PRE133_OPERATORS_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_system.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_system.hpp new file mode 100644 index 0000000000..3d44e0ff00 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_system.hpp @@ -0,0 +1,68 @@ +#ifndef POSIX_TIME_SYSTEM_HPP___ +#define POSIX_TIME_SYSTEM_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + +#include "boost/date_time/posix_time/posix_time_config.hpp" +#include "boost/date_time/time_system_split.hpp" +#include "boost/date_time/time_system_counted.hpp" +#include "boost/date_time/compiler_config.hpp" + + +namespace boost { +namespace posix_time { + +#ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG + +#if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) //help bad compilers + typedef date_time::split_timedate_system posix_time_system; +#else + typedef date_time::split_timedate_system posix_time_system; +#endif + +#else + + typedef date_time::counted_time_rep int64_time_rep; + typedef date_time::counted_time_system posix_time_system; + +#endif + +} }//namespace posix_time + + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_types.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_types.hpp new file mode 100644 index 0000000000..f2488f8bed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/posix_time_types.hpp @@ -0,0 +1,55 @@ +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + */ +#ifndef POSIX_TIME_TYPES_HPP___ +#define POSIX_TIME_TYPES_HPP___ + +#include "boost/date_time/time_clock.hpp" +#include "boost/date_time/microsec_time_clock.hpp" +#include "boost/date_time/posix_time/ptime.hpp" +#if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) +#include "boost/date_time/posix_time/date_duration_operators.hpp" +#endif +#include "boost/date_time/posix_time/posix_time_duration.hpp" +#include "boost/date_time/posix_time/posix_time_system.hpp" +#include "boost/date_time/posix_time/time_period.hpp" +#include "boost/date_time/time_iterator.hpp" +#include "boost/date_time/dst_rules.hpp" + +namespace boost { + +//!Defines a non-adjusted time system with nano-second resolution and stable calculation properties +namespace posix_time { + + //! Iterator over a defined time duration + /*! \ingroup time_basics + */ + typedef date_time::time_itr time_iterator; + //! A time clock that has a resolution of one second + /*! \ingroup time_basics + */ + typedef date_time::second_clock second_clock; + +#ifdef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK + //! A time clock that has a resolution of one microsecond + /*! \ingroup time_basics + */ + typedef date_time::microsec_clock microsec_clock; +#endif + + //! Define a dst null dst rule for the posix_time system + typedef date_time::null_dst_rules no_dst; + //! Define US dst rule calculator for the posix_time system + typedef date_time::us_dst_rules us_dst; + + +} } //namespace posix_time + + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/ptime.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/ptime.hpp new file mode 100644 index 0000000000..2abc02d318 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/ptime.hpp @@ -0,0 +1,65 @@ +#ifndef POSIX_PTIME_HPP___ +#define POSIX_PTIME_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/posix_time/posix_time_system.hpp" +#include "boost/date_time/time.hpp" + +namespace boost { + +namespace posix_time { + + //bring special enum values into the namespace + using date_time::special_values; + using date_time::not_special; + using date_time::neg_infin; + using date_time::pos_infin; + using date_time::not_a_date_time; + using date_time::max_date_time; + using date_time::min_date_time; + + //! Time type with no timezone or other adjustments + /*! \ingroup time_basics + */ + class ptime : public date_time::base_time + { + public: + typedef posix_time_system time_system_type; + typedef time_system_type::time_rep_type time_rep_type; + typedef time_system_type::time_duration_type time_duration_type; + typedef ptime time_type; + //! Construct with date and offset in day + ptime(gregorian::date d,time_duration_type td) : date_time::base_time(d,td) + {} + //! Construct a time at start of the given day (midnight) + explicit ptime(gregorian::date d) : date_time::base_time(d,time_duration_type(0,0,0)) + {} + //! Copy from time_rep + ptime(const time_rep_type& rhs): + date_time::base_time(rhs) + {} + //! Construct from special value + ptime(const special_values sv) : date_time::base_time(sv) + {} +#if !defined(DATE_TIME_NO_DEFAULT_CONSTRUCTOR) + // Default constructor constructs to not_a_date_time + ptime() : date_time::base_time(gregorian::date(not_a_date_time), time_duration_type(not_a_date_time)) + {} +#endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR + + }; + + + +} }//namespace posix_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_formatters.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_formatters.hpp new file mode 100644 index 0000000000..466331b0a1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_formatters.hpp @@ -0,0 +1,289 @@ +#ifndef POSIXTIME_FORMATTERS_HPP___ +#define POSIXTIME_FORMATTERS_HPP___ + +/* Copyright (c) 2002-2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + +#include +#include +#include +#include +#include +#include +#include // absolute_value +#include + +/* NOTE: The "to_*_string" code for older compilers, ones that define + * BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in + * formatters_limited.hpp + */ + +namespace boost { + +namespace posix_time { + + // template function called by wrapper functions: + // to_*_string(time_duration) & to_*_wstring(time_duration) + template + inline std::basic_string to_simple_string_type(time_duration td) { + std::basic_ostringstream ss; + if(td.is_special()) { + /* simply using 'ss << td.get_rep()' won't work on compilers + * that don't support locales. This way does. */ + // switch copied from date_names_put.hpp + switch(td.get_rep().as_special()) + { + case not_a_date_time: + //ss << "not-a-number"; + ss << "not-a-date-time"; + break; + case pos_infin: + ss << "+infinity"; + break; + case neg_infin: + ss << "-infinity"; + break; + default: + ss << ""; + } + } + else { + charT fill_char = '0'; + if(td.is_negative()) { + ss << '-'; + } + ss << std::setw(2) << std::setfill(fill_char) + << date_time::absolute_value(td.hours()) << ":"; + ss << std::setw(2) << std::setfill(fill_char) + << date_time::absolute_value(td.minutes()) << ":"; + ss << std::setw(2) << std::setfill(fill_char) + << date_time::absolute_value(td.seconds()); + //TODO the following is totally non-generic, yelling FIXME +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + boost::int64_t frac_sec = + date_time::absolute_value(td.fractional_seconds()); + // JDG [7/6/02 VC++ compatibility] + charT buff[32]; + _i64toa(frac_sec, buff, 10); +#else + time_duration::fractional_seconds_type frac_sec = + date_time::absolute_value(td.fractional_seconds()); +#endif + if (frac_sec != 0) { + ss << "." << std::setw(time_duration::num_fractional_digits()) + << std::setfill(fill_char) + + // JDG [7/6/02 VC++ compatibility] +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + << buff; +#else + << frac_sec; +#endif + } + }// else + return ss.str(); + } + //! Time duration to string -hh::mm::ss.fffffff. Example: 10:09:03.0123456 + /*!\ingroup time_format + */ + inline std::string to_simple_string(time_duration td) { + return to_simple_string_type(td); + } + + + // template function called by wrapper functions: + // to_*_string(time_duration) & to_*_wstring(time_duration) + template + inline std::basic_string to_iso_string_type(time_duration td) + { + std::basic_ostringstream ss; + if(td.is_special()) { + /* simply using 'ss << td.get_rep()' won't work on compilers + * that don't support locales. This way does. */ + // switch copied from date_names_put.hpp + switch(td.get_rep().as_special()) { + case not_a_date_time: + //ss << "not-a-number"; + ss << "not-a-date-time"; + break; + case pos_infin: + ss << "+infinity"; + break; + case neg_infin: + ss << "-infinity"; + break; + default: + ss << ""; + } + } + else { + charT fill_char = '0'; + if(td.is_negative()) { + ss << '-'; + } + ss << std::setw(2) << std::setfill(fill_char) + << date_time::absolute_value(td.hours()); + ss << std::setw(2) << std::setfill(fill_char) + << date_time::absolute_value(td.minutes()); + ss << std::setw(2) << std::setfill(fill_char) + << date_time::absolute_value(td.seconds()); + //TODO the following is totally non-generic, yelling FIXME +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + boost::int64_t frac_sec = + date_time::absolute_value(td.fractional_seconds()); + // JDG [7/6/02 VC++ compatibility] + charT buff[32]; + _i64toa(frac_sec, buff, 10); +#else + time_duration::fractional_seconds_type frac_sec = + date_time::absolute_value(td.fractional_seconds()); +#endif + if (frac_sec != 0) { + ss << "." << std::setw(time_duration::num_fractional_digits()) + << std::setfill(fill_char) + + // JDG [7/6/02 VC++ compatibility] +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + << buff; +#else + << frac_sec; +#endif + } + }// else + return ss.str(); + } + //! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456 + /*!\ingroup time_format + */ + inline std::string to_iso_string(time_duration td){ + return to_iso_string_type(td); + } + + //! Time to simple format CCYY-mmm-dd hh:mm:ss.fffffff + /*!\ingroup time_format + */ + template + inline std::basic_string to_simple_string_type(ptime t) + { + // can't use this w/gcc295, no to_simple_string_type<>(td) available + std::basic_string ts = gregorian::to_simple_string_type(t.date());// + " "; + if(!t.time_of_day().is_special()) { + charT space = ' '; + return ts + space + to_simple_string_type(t.time_of_day()); + } + else { + return ts; + } + } + inline std::string to_simple_string(ptime t){ + return to_simple_string_type(t); + } + + // function called by wrapper functions to_*_string(time_period) + // & to_*_wstring(time_period) + template + inline std::basic_string to_simple_string_type(time_period tp) + { + charT beg = '[', mid = '/', end = ']'; + std::basic_string d1(to_simple_string_type(tp.begin())); + std::basic_string d2(to_simple_string_type(tp.last())); + return std::basic_string(beg + d1 + mid + d2 + end); + } + //! Convert to string of form [YYYY-mmm-DD HH:MM::SS.ffffff/YYYY-mmm-DD HH:MM::SS.fffffff] + /*!\ingroup time_format + */ + inline std::string to_simple_string(time_period tp){ + return to_simple_string_type(tp); + } + + // function called by wrapper functions to_*_string(time_period) + // & to_*_wstring(time_period) + template + inline std::basic_string to_iso_string_type(ptime t) + { + std::basic_string ts = gregorian::to_iso_string_type(t.date());// + "T"; + if(!t.time_of_day().is_special()) { + charT sep = 'T'; + return ts + sep + to_iso_string_type(t.time_of_day()); + } + else { + return ts; + } + } + //! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator + /*!\ingroup time_format + */ + inline std::string to_iso_string(ptime t){ + return to_iso_string_type(t); + } + + + // function called by wrapper functions to_*_string(time_period) + // & to_*_wstring(time_period) + template + inline std::basic_string to_iso_extended_string_type(ptime t) + { + std::basic_string ts = gregorian::to_iso_extended_string_type(t.date());// + "T"; + if(!t.time_of_day().is_special()) { + charT sep = 'T'; + return ts + sep + to_simple_string_type(t.time_of_day()); + } + else { + return ts; + } + } + //! Convert to form YYYY-MM-DDTHH:MM:SS where T is the date-time separator + /*!\ingroup time_format + */ + inline std::string to_iso_extended_string(ptime t){ + return to_iso_extended_string_type(t); + } + +#if !defined(BOOST_NO_STD_WSTRING) + //! Time duration to wstring -hh::mm::ss.fffffff. Example: 10:09:03.0123456 + /*!\ingroup time_format + */ + inline std::wstring to_simple_wstring(time_duration td) { + return to_simple_string_type(td); + } + //! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456 + /*!\ingroup time_format + */ + inline std::wstring to_iso_wstring(time_duration td){ + return to_iso_string_type(td); + } + inline std::wstring to_simple_wstring(ptime t){ + return to_simple_string_type(t); + } + //! Convert to wstring of form [YYYY-mmm-DD HH:MM::SS.ffffff/YYYY-mmm-DD HH:MM::SS.fffffff] + /*!\ingroup time_format + */ + inline std::wstring to_simple_wstring(time_period tp){ + return to_simple_string_type(tp); + } + //! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator + /*!\ingroup time_format + */ + inline std::wstring to_iso_wstring(ptime t){ + return to_iso_string_type(t); + } + //! Convert to form YYYY-MM-DDTHH:MM:SS where T is the date-time separator + /*!\ingroup time_format + */ + inline std::wstring to_iso_extended_wstring(ptime t){ + return to_iso_extended_string_type(t); + } + +#endif // BOOST_NO_STD_WSTRING + + +} } //namespace posix_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_formatters_limited.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_formatters_limited.hpp new file mode 100644 index 0000000000..d0e959e915 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_formatters_limited.hpp @@ -0,0 +1,212 @@ +#ifndef POSIXTIME_FORMATTERS_LIMITED_HPP___ +#define POSIXTIME_FORMATTERS_LIMITED_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $ + */ + +#include +#include +#include +#include +#include +#include +#include // absolute_value + +namespace boost { + +namespace posix_time { + + //! Time duration to string -hh::mm::ss.fffffff. Example: 10:09:03.0123456 + /*!\ingroup time_format + */ + inline std::string to_simple_string(time_duration td) { + std::ostringstream ss; + if(td.is_special()) { + /* simply using 'ss << td.get_rep()' won't work on compilers + * that don't support locales. This way does. */ + // switch copied from date_names_put.hpp + switch(td.get_rep().as_special()) + { + case not_a_date_time: + //ss << "not-a-number"; + ss << "not-a-date-time"; + break; + case pos_infin: + ss << "+infinity"; + break; + case neg_infin: + ss << "-infinity"; + break; + default: + ss << ""; + } + } + else { + if(td.is_negative()) { + ss << '-'; + } + ss << std::setw(2) << std::setfill('0') + << date_time::absolute_value(td.hours()) << ":"; + ss << std::setw(2) << std::setfill('0') + << date_time::absolute_value(td.minutes()) << ":"; + ss << std::setw(2) << std::setfill('0') + << date_time::absolute_value(td.seconds()); + //TODO the following is totally non-generic, yelling FIXME +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + boost::int64_t frac_sec = + date_time::absolute_value(td.fractional_seconds()); + // JDG [7/6/02 VC++ compatibility] + char buff[32]; + _i64toa(frac_sec, buff, 10); +#else + time_duration::fractional_seconds_type frac_sec = + date_time::absolute_value(td.fractional_seconds()); +#endif + if (frac_sec != 0) { + ss << "." << std::setw(time_duration::num_fractional_digits()) + << std::setfill('0') + + // JDG [7/6/02 VC++ compatibility] +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + << buff; +#else + << frac_sec; +#endif + } + }// else + return ss.str(); + } + + //! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456 + /*!\ingroup time_format + */ + inline + std::string + to_iso_string(time_duration td) + { + std::ostringstream ss; + if(td.is_special()) { + /* simply using 'ss << td.get_rep()' won't work on compilers + * that don't support locales. This way does. */ + // switch copied from date_names_put.hpp + switch(td.get_rep().as_special()) { + case not_a_date_time: + //ss << "not-a-number"; + ss << "not-a-date-time"; + break; + case pos_infin: + ss << "+infinity"; + break; + case neg_infin: + ss << "-infinity"; + break; + default: + ss << ""; + } + } + else { + if(td.is_negative()) { + ss << '-'; + } + ss << std::setw(2) << std::setfill('0') + << date_time::absolute_value(td.hours()); + ss << std::setw(2) << std::setfill('0') + << date_time::absolute_value(td.minutes()); + ss << std::setw(2) << std::setfill('0') + << date_time::absolute_value(td.seconds()); + //TODO the following is totally non-generic, yelling FIXME +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + boost::int64_t frac_sec = + date_time::absolute_value(td.fractional_seconds()); + // JDG [7/6/02 VC++ compatibility] + char buff[32]; + _i64toa(frac_sec, buff, 10); +#else + time_duration::fractional_seconds_type frac_sec = + date_time::absolute_value(td.fractional_seconds()); +#endif + if (frac_sec != 0) { + ss << "." << std::setw(time_duration::num_fractional_digits()) + << std::setfill('0') + + // JDG [7/6/02 VC++ compatibility] +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + << buff; +#else + << frac_sec; +#endif + } + }// else + return ss.str(); + } + + //! Time to simple format CCYY-mmm-dd hh:mm:ss.fffffff + /*!\ingroup time_format + */ + inline + std::string + to_simple_string(ptime t) + { + std::string ts = gregorian::to_simple_string(t.date());// + " "; + if(!t.time_of_day().is_special()) { + return ts + " " + to_simple_string(t.time_of_day()); + } + else { + return ts; + } + } + + //! Convert to string of form [YYYY-mmm-DD HH:MM::SS.ffffff/YYYY-mmm-DD HH:MM::SS.fffffff] + /*!\ingroup time_format + */ + inline + std::string + to_simple_string(time_period tp) + { + std::string d1(to_simple_string(tp.begin())); + std::string d2(to_simple_string(tp.last())); + return std::string("[" + d1 + "/" + d2 +"]"); + } + + //! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator + /*!\ingroup time_format + */ + inline + std::string to_iso_string(ptime t) + { + std::string ts = gregorian::to_iso_string(t.date());// + "T"; + if(!t.time_of_day().is_special()) { + return ts + "T" + to_iso_string(t.time_of_day()); + } + else { + return ts; + } + } + + //! Convert to form YYYY-MM-DDTHH:MM:SS where T is the date-time separator + /*!\ingroup time_format + */ + inline + std::string + to_iso_extended_string(ptime t) + { + std::string ts = gregorian::to_iso_extended_string(t.date());// + "T"; + if(!t.time_of_day().is_special()) { + return ts + "T" + to_simple_string(t.time_of_day()); + } + else { + return ts; + } + } + + +} } //namespace posix_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_parsers.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_parsers.hpp new file mode 100644 index 0000000000..8a352f6e2b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_parsers.hpp @@ -0,0 +1,44 @@ +#ifndef POSIXTIME_PARSERS_HPP___ +#define POSIXTIME_PARSERS_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/gregorian/gregorian.hpp" +#include "boost/date_time/time_parsing.hpp" +#include "boost/date_time/posix_time/posix_time_types.hpp" + + +namespace boost { + +namespace posix_time { + + //! Creates a time_duration object from a delimited string + /*! Expected format for string is "[-]h[h][:mm][:ss][.fff]". + * A negative duration will be created if the first character in + * string is a '-', all other '-' will be treated as delimiters. + * Accepted delimiters are "-:,.". */ + inline time_duration duration_from_string(const std::string& s) { + return date_time::parse_delimited_time_duration(s); + } + + inline ptime time_from_string(const std::string& s) { + return date_time::parse_delimited_time(s, ' '); + } + + inline ptime from_iso_string(const std::string& s) { + return date_time::parse_iso_time(s, 'T'); + } + + + +} } //namespace posix_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_period.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_period.hpp new file mode 100644 index 0000000000..cb7bf07f47 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_period.hpp @@ -0,0 +1,29 @@ +#ifndef POSIX_TIME_PERIOD_HPP___ +#define POSIX_TIME_PERIOD_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/period.hpp" +#include "boost/date_time/posix_time/posix_time_duration.hpp" +#include "boost/date_time/posix_time/ptime.hpp" + +namespace boost { +namespace posix_time { + + //! Time period type + /*! \ingroup time_basics + */ + typedef date_time::period time_period; + + +} }//namespace posix_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_serialize.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_serialize.hpp new file mode 100644 index 0000000000..039763e08e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/posix_time/time_serialize.hpp @@ -0,0 +1,201 @@ +#ifndef POSIX_TIME_SERIALIZE_HPP___ +#define POSIX_TIME_SERIALIZE_HPP___ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2010-11-11 15:19:38 -0500 (Thu, 11 Nov 2010) $ + */ + +#include "boost/date_time/posix_time/posix_time.hpp" +#include "boost/date_time/gregorian/greg_serialize.hpp" +#include "boost/serialization/split_free.hpp" +#include "boost/serialization/nvp.hpp" + + +// macros to split serialize functions into save & load functions +// NOTE: these macros define template functions in the boost::serialization namespace. +// They must be expanded *outside* of any namespace +BOOST_SERIALIZATION_SPLIT_FREE(boost::posix_time::ptime) +BOOST_SERIALIZATION_SPLIT_FREE(boost::posix_time::time_duration) +BOOST_SERIALIZATION_SPLIT_FREE(boost::posix_time::time_period) + +namespace boost { +namespace serialization { + + +/*** time_duration ***/ + +//! Function to save posix_time::time_duration objects using serialization lib +/*! time_duration objects are broken down into 4 parts for serialization: + * types are hour_type, min_type, sec_type, and fractional_seconds_type + * as defined in the time_duration class + */ +template +void save(Archive & ar, + const posix_time::time_duration& td, + unsigned int /*version*/) +{ + // serialize a bool so we know how to read this back in later + bool is_special = td.is_special(); + ar & make_nvp("is_special", is_special); + if(is_special) { + std::string s = to_simple_string(td); + ar & make_nvp("sv_time_duration", s); + } + else { + typename posix_time::time_duration::hour_type h = td.hours(); + typename posix_time::time_duration::min_type m = td.minutes(); + typename posix_time::time_duration::sec_type s = td.seconds(); + typename posix_time::time_duration::fractional_seconds_type fs = td.fractional_seconds(); + ar & make_nvp("time_duration_hours", h); + ar & make_nvp("time_duration_minutes", m); + ar & make_nvp("time_duration_seconds", s); + ar & make_nvp("time_duration_fractional_seconds", fs); + } +} + +//! Function to load posix_time::time_duration objects using serialization lib +/*! time_duration objects are broken down into 4 parts for serialization: + * types are hour_type, min_type, sec_type, and fractional_seconds_type + * as defined in the time_duration class + */ +template +void load(Archive & ar, + posix_time::time_duration & td, + unsigned int /*version*/) +{ + bool is_special = false; + ar & make_nvp("is_special", is_special); + if(is_special) { + std::string s; + ar & make_nvp("sv_time_duration", s); + posix_time::special_values sv = gregorian::special_value_from_string(s); + td = posix_time::time_duration(sv); + } + else { + typename posix_time::time_duration::hour_type h(0); + typename posix_time::time_duration::min_type m(0); + typename posix_time::time_duration::sec_type s(0); + typename posix_time::time_duration::fractional_seconds_type fs(0); + ar & make_nvp("time_duration_hours", h); + ar & make_nvp("time_duration_minutes", m); + ar & make_nvp("time_duration_seconds", s); + ar & make_nvp("time_duration_fractional_seconds", fs); + td = posix_time::time_duration(h,m,s,fs); + } +} + +// no load_construct_data function provided as time_duration provides a +// default constructor + +/*** ptime ***/ + +//! Function to save posix_time::ptime objects using serialization lib +/*! ptime objects are broken down into 2 parts for serialization: + * a date object and a time_duration onject + */ +template +void save(Archive & ar, + const posix_time::ptime& pt, + unsigned int /*version*/) +{ + // from_iso_string does not include fractional seconds + // therefore date and time_duration are used + typename posix_time::ptime::date_type d = pt.date(); + ar & make_nvp("ptime_date", d); + if(!pt.is_special()) { + typename posix_time::ptime::time_duration_type td = pt.time_of_day(); + ar & make_nvp("ptime_time_duration", td); + } +} + +//! Function to load posix_time::ptime objects using serialization lib +/*! ptime objects are broken down into 2 parts for serialization: + * a date object and a time_duration onject + */ +template +void load(Archive & ar, + posix_time::ptime & pt, + unsigned int /*version*/) +{ + // from_iso_string does not include fractional seconds + // therefore date and time_duration are used + typename posix_time::ptime::date_type d(posix_time::not_a_date_time); + typename posix_time::ptime::time_duration_type td; + ar & make_nvp("ptime_date", d); + if(!d.is_special()) { + ar & make_nvp("ptime_time_duration", td); + pt = boost::posix_time::ptime(d,td); + } + else { + pt = boost::posix_time::ptime(d.as_special()); + } + +} + +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & /*ar*/, + posix_time::ptime* pt, + const unsigned int /*file_version*/) +{ + // retrieve data from archive required to construct new + // invoke inplace constructor to initialize instance of date + new(pt) boost::posix_time::ptime(boost::posix_time::not_a_date_time); +} + +/*** time_period ***/ + +//! Function to save posix_time::time_period objects using serialization lib +/*! time_period objects are broken down into 2 parts for serialization: + * a begining ptime object and an ending ptime object + */ +template +void save(Archive & ar, + const posix_time::time_period& tp, + unsigned int /*version*/) +{ + posix_time::ptime beg(tp.begin().date(), tp.begin().time_of_day()); + posix_time::ptime end(tp.end().date(), tp.end().time_of_day()); + ar & make_nvp("time_period_begin", beg); + ar & make_nvp("time_period_end", end); +} + +//! Function to load posix_time::time_period objects using serialization lib +/*! time_period objects are broken down into 2 parts for serialization: + * a begining ptime object and an ending ptime object + */ +template +void load(Archive & ar, + boost::posix_time::time_period & tp, + unsigned int /*version*/) +{ + posix_time::time_duration td(1,0,0); + gregorian::date d(gregorian::not_a_date_time); + posix_time::ptime beg(d,td); + posix_time::ptime end(d,td); + ar & make_nvp("time_period_begin", beg); + ar & make_nvp("time_period_end", end); + tp = boost::posix_time::time_period(beg, end); +} + +//!override needed b/c no default constructor +template +inline void load_construct_data(Archive & ar, + boost::posix_time::time_period* tp, + const unsigned int /*file_version*/) +{ + posix_time::time_duration td(1,0,0); + gregorian::date d(gregorian::not_a_date_time); + posix_time::ptime beg(d,td); + posix_time::ptime end(d,td); + new(tp) boost::posix_time::time_period(beg,end); +} + +} // namespace serialization +} // namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_defs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_defs.hpp new file mode 100644 index 0000000000..56eb6fea1d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_defs.hpp @@ -0,0 +1,25 @@ +#ifndef DATE_TIME_SPECIAL_DEFS_HPP__ +#define DATE_TIME_SPECIAL_DEFS_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +namespace boost { +namespace date_time { + + enum special_values {not_a_date_time, + neg_infin, pos_infin, + min_date_time, max_date_time, + not_special, NumSpecialValues}; + + +} } //namespace date_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_values_formatter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_values_formatter.hpp new file mode 100644 index 0000000000..33542b6e42 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_values_formatter.hpp @@ -0,0 +1,96 @@ + +#ifndef DATETIME_SPECIAL_VALUE_FORMATTER_HPP___ +#define DATETIME_SPECIAL_VALUE_FORMATTER_HPP___ + +/* Copyright (c) 2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include +#include +#include "boost/date_time/special_defs.hpp" + +namespace boost { namespace date_time { + + + //! Class that provides generic formmatting ostream formatting for special values + /*! This class provides for the formmating of special values to an output stream. + * In particular, it produces strings for the values of negative and positive + * infinity as well as not_a_date_time. + * + * While not a facet, this class is used by the date and time facets for formatting + * special value types. + * + */ + template > > + class special_values_formatter + { + public: + typedef std::basic_string string_type; + typedef CharT char_type; + typedef std::vector collection_type; + static const char_type default_special_value_names[3][17]; + + //! Construct special values formatter using default strings. + /*! Default strings are not-a-date-time -infinity +infinity + */ + special_values_formatter() + { + std::copy(&default_special_value_names[0], + &default_special_value_names[3], + std::back_inserter(m_special_value_names)); + } + + //! Construct special values formatter from array of strings + /*! This constructor will take pair of iterators from an array of strings + * that represent the special values and copy them for use in formatting + * special values. + *@code + * const char* const special_value_names[]={"nadt","-inf","+inf" }; + * + * special_value_formatter svf(&special_value_names[0], &special_value_names[3]); + *@endcode + */ + special_values_formatter(const char_type* const* begin, const char_type* const* end) + { + std::copy(begin, end, std::back_inserter(m_special_value_names)); + } + special_values_formatter(typename collection_type::iterator beg, typename collection_type::iterator end) + { + std::copy(beg, end, std::back_inserter(m_special_value_names)); + } + + OutItrT put_special(OutItrT next, + const boost::date_time::special_values& value) const + { + + unsigned int index = value; + if (index < m_special_value_names.size()) { + std::copy(m_special_value_names[index].begin(), + m_special_value_names[index].end(), + next); + } + return next; + } + protected: + collection_type m_special_value_names; + }; + + //! Storage for the strings used to indicate special values + /* using c_strings to initialize these worked fine in testing, however, + * a project that compiled its objects separately, then linked in a separate + * step wound up with redefinition errors for the values in this array. + * Initializing individual characters eliminated this problem */ + template + const typename special_values_formatter::char_type special_values_formatter::default_special_value_names[3][17] = { + {'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'}, + {'-','i','n','f','i','n','i','t','y'}, + {'+','i','n','f','i','n','i','t','y'} }; + + } } //namespace boost::date_time + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_values_parser.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_values_parser.hpp new file mode 100644 index 0000000000..e48ec5fda9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/special_values_parser.hpp @@ -0,0 +1,159 @@ + +#ifndef DATE_TIME_SPECIAL_VALUES_PARSER_HPP__ +#define DATE_TIME_SPECIAL_VALUES_PARSER_HPP__ + +/* Copyright (c) 2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: + */ + + +#include "boost/date_time/string_parse_tree.hpp" +#include "boost/date_time/special_defs.hpp" +#include +#include + +namespace boost { namespace date_time { + + //! Class for special_value parsing + /*! + * TODO: add doc-comments for which elements can be changed + * Parses input stream for strings representing special_values. + * Special values parsed are: + * - not_a_date_time + * - neg_infin + * - pod_infin + * - min_date_time + * - max_date_time + */ + template + class special_values_parser + { + public: + typedef std::basic_string string_type; + //typedef std::basic_stringstream stringstream_type; + typedef std::istreambuf_iterator stream_itr_type; + //typedef typename string_type::const_iterator const_itr; + //typedef typename date_type::year_type year_type; + //typedef typename date_type::month_type month_type; + typedef typename date_type::duration_type duration_type; + //typedef typename date_type::day_of_week_type day_of_week_type; + //typedef typename date_type::day_type day_type; + typedef string_parse_tree parse_tree_type; + typedef typename parse_tree_type::parse_match_result_type match_results; + typedef std::vector > collection_type; + + typedef charT char_type; + static const char_type nadt_string[16]; + static const char_type neg_inf_string[10]; + static const char_type pos_inf_string[10]; + static const char_type min_date_time_string[18]; + static const char_type max_date_time_string[18]; + + //! Creates a special_values_parser with the default set of "sv_strings" + special_values_parser() + { + sv_strings(string_type(nadt_string), + string_type(neg_inf_string), + string_type(pos_inf_string), + string_type(min_date_time_string), + string_type(max_date_time_string)); + } + + //! Creates a special_values_parser using a user defined set of element strings + special_values_parser(const string_type& nadt_str, + const string_type& neg_inf_str, + const string_type& pos_inf_str, + const string_type& min_dt_str, + const string_type& max_dt_str) + { + sv_strings(nadt_str, neg_inf_str, pos_inf_str, min_dt_str, max_dt_str); + } + + special_values_parser(typename collection_type::iterator beg, typename collection_type::iterator end) + { + collection_type phrases; + std::copy(beg, end, std::back_inserter(phrases)); + m_sv_strings = parse_tree_type(phrases, static_cast(not_a_date_time)); + } + + special_values_parser(const special_values_parser& svp) + { + this->m_sv_strings = svp.m_sv_strings; + } + + //! Replace special value strings + void sv_strings(const string_type& nadt_str, + const string_type& neg_inf_str, + const string_type& pos_inf_str, + const string_type& min_dt_str, + const string_type& max_dt_str) + { + collection_type phrases; + phrases.push_back(nadt_str); + phrases.push_back(neg_inf_str); + phrases.push_back(pos_inf_str); + phrases.push_back(min_dt_str); + phrases.push_back(max_dt_str); + m_sv_strings = parse_tree_type(phrases, static_cast(not_a_date_time)); + } + + /* Does not return a special_value because if the parsing fails, + * the return value will always be not_a_date_time + * (mr.current_match retains its default value of -1 on a failed + * parse and that casts to not_a_date_time). */ + //! Sets match_results.current_match to the corresponding special_value or -1 + bool match(stream_itr_type& sitr, + stream_itr_type& str_end, + match_results& mr) const + { + unsigned int level = 0; + m_sv_strings.match(sitr, str_end, mr, level); + return (mr.current_match != match_results::PARSE_ERROR); + } + /*special_values match(stream_itr_type& sitr, + stream_itr_type& str_end, + match_results& mr) const + { + unsigned int level = 0; + m_sv_strings.match(sitr, str_end, mr, level); + if(mr.current_match == match_results::PARSE_ERROR) { + throw std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'"); + } + return static_cast(mr.current_match); + }*/ + + + private: + parse_tree_type m_sv_strings; + + }; + + template + const typename special_values_parser::char_type + special_values_parser::nadt_string[16] = + {'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'}; + template + const typename special_values_parser::char_type + special_values_parser::neg_inf_string[10] = + {'-','i','n','f','i','n','i','t','y'}; + template + const typename special_values_parser::char_type + special_values_parser::pos_inf_string[10] = + {'+','i','n','f','i','n','i','t','y'}; + template + const typename special_values_parser::char_type + special_values_parser::min_date_time_string[18] = + {'m','i','n','i','m','u','m','-','d','a','t','e','-','t','i','m','e'}; + template + const typename special_values_parser::char_type + special_values_parser::max_date_time_string[18] = + {'m','a','x','i','m','u','m','-','d','a','t','e','-','t','i','m','e'}; + +} } //namespace + +#endif // DATE_TIME_SPECIAL_VALUES_PARSER_HPP__ + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/string_convert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/string_convert.hpp new file mode 100644 index 0000000000..54a979c70f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/string_convert.hpp @@ -0,0 +1,33 @@ +#ifndef _STRING_CONVERT_HPP___ +#define _STRING_CONVERT_HPP___ + +/* Copyright (c) 2005 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/date_time/compiler_config.hpp" +#include + +namespace boost { +namespace date_time { + + //! Converts a string from one value_type to another + /*! Converts a wstring to a string (or a string to wstring). If both template parameters + * are of same type, a copy of the input string is returned. */ + template + inline + std::basic_string convert_string_type(const std::basic_string& inp_str) + { + typedef std::basic_string input_type; + typedef std::basic_string output_type; + output_type result; + result.insert(result.begin(), inp_str.begin(), inp_str.end()); + return result; + } + +}} // namespace boost::date_time + +#endif // _STRING_CONVERT_HPP___ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/string_parse_tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/string_parse_tree.hpp new file mode 100644 index 0000000000..0d515ff824 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/string_parse_tree.hpp @@ -0,0 +1,278 @@ +#ifndef BOOST_DATE_TIME_STRING_PARSE_TREE___HPP__ +#define BOOST_DATE_TIME_STRING_PARSE_TREE___HPP__ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + + +#include "boost/lexical_cast.hpp" //error without? +#include "boost/algorithm/string/case_conv.hpp" +#include +#include +#include +#include + +namespace boost { namespace date_time { + + +template +struct parse_match_result +{ + parse_match_result() : + match_depth(0), + current_match(-1)// -1 is match_not-found value + {} + typedef std::basic_string string_type; + string_type remaining() const + { + if (match_depth == cache.size()) { + return string_type(); + } + if (current_match == -1) { + return cache; + } + //some of the cache was used return the rest + return string_type(cache, match_depth); + } + charT last_char() const + { + return cache[cache.size()-1]; + } + //! Returns true if more characters were parsed than was necessary + /*! Should be used in conjunction with last_char() + * to get the remaining character. + */ + bool has_remaining() const + { + return (cache.size() > match_depth); + } + + // cache will hold characters that have been read from the stream + string_type cache; + unsigned short match_depth; + short current_match; + enum PARSE_STATE { PARSE_ERROR= -1 }; +}; + + //for debug -- really only char streams... +template +std::basic_ostream& +operator<<(std::basic_ostream& os, parse_match_result& mr) +{ + os << "cm: " << mr.current_match + << " C: '" << mr.cache + << "' md: " << mr.match_depth + << " R: " << mr.remaining(); + return os; +} + + + +//! Recursive data structure to allow efficient parsing of various strings +/*! This class provides a quick lookup by building what amounts to a + * tree data structure. It also features a match function which can + * can handle nasty input interators by caching values as it recurses + * the tree so that it can backtrack as needed. + */ +template +struct string_parse_tree +{ +#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) + typedef std::multimap > ptree_coll; +#else + typedef std::multimap ptree_coll; +#endif + typedef typename ptree_coll::value_type value_type; + typedef typename ptree_coll::iterator iterator; + typedef typename ptree_coll::const_iterator const_iterator; + typedef std::basic_string string_type; + typedef std::vector > collection_type; + typedef parse_match_result parse_match_result_type; + + /*! Parameter "starting_point" designates where the numbering begins. + * A starting_point of zero will start the numbering at zero + * (Sun=0, Mon=1, ...) were a starting_point of one starts the + * numbering at one (Jan=1, Feb=2, ...). The default is zero, + * negative vaules are not allowed */ + string_parse_tree(collection_type names, unsigned int starting_point=0) + { + // iterate thru all the elements and build the tree + unsigned short index = 0; + while (index != names.size() ) { + string_type s = boost::algorithm::to_lower_copy(names[index]); + insert(s, static_cast(index + starting_point)); + index++; + } + //set the last tree node = index+1 indicating a value + index++; + } + + + string_parse_tree(short value = -1) : + m_value(value) + {} + ptree_coll m_next_chars; + short m_value; + + void insert(const string_type& s, unsigned short value) + { + unsigned int i = 0; + iterator ti; + while(i < s.size()) { + if (i==0) { + if (i == (s.size()-1)) { + ti = m_next_chars.insert(value_type(s[i], + string_parse_tree(value))); + } + else { + ti = m_next_chars.insert(value_type(s[i], + string_parse_tree())); + } + } + else { + if (i == (s.size()-1)) { + ti = ti->second.m_next_chars.insert(value_type(s[i], + string_parse_tree(value))); + } + + else { + ti = ti->second.m_next_chars.insert(value_type(s[i], + string_parse_tree())); + } + + } + i++; + } + } + + + //! Recursive function that finds a matching string in the tree. + /*! Must check match_results::has_remaining() after match() is + * called. This is required so the user can determine if + * stream iterator is already pointing to the expected + * character or not (match() might advance sitr to next char in stream). + * + * A parse_match_result that has been returned from a failed match + * attempt can be sent in to the match function of a different + * string_parse_tree to attempt a match there. Use the iterators + * for the partially consumed stream, the parse_match_result object, + * and '0' for the level parameter. */ + short + match(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end, + parse_match_result_type& result, + unsigned int& level) const + { + + level++; + charT c; + // if we conditionally advance sitr, we won't have + // to consume the next character past the input + bool adv_itr = true; + if (level > result.cache.size()) { + if (sitr == stream_end) return 0; //bail - input exhausted + c = static_cast(std::tolower(*sitr)); + //result.cache += c; + //sitr++; + } + else { + // if we're looking for characters from the cache, + // we don't want to increment sitr + adv_itr = false; + c = static_cast(std::tolower(result.cache[level-1])); + } + const_iterator litr = m_next_chars.lower_bound(c); + const_iterator uitr = m_next_chars.upper_bound(c); + while (litr != uitr) { // equal if not found + if(adv_itr) { + sitr++; + result.cache += c; + } + if (litr->second.m_value != -1) { // -1 is default value + if (result.match_depth < level) { + result.current_match = litr->second.m_value; + result.match_depth = static_cast(level); + } + litr->second.match(sitr, stream_end, + result, level); + level--; + } + else { + litr->second.match(sitr, stream_end, + result, level); + level--; + } + + if(level <= result.cache.size()) { + adv_itr = false; + } + + litr++; + } + return result.current_match; + + } + + /*! Must check match_results::has_remaining() after match() is + * called. This is required so the user can determine if + * stream iterator is already pointing to the expected + * character or not (match() might advance sitr to next char in stream). + */ + parse_match_result_type + match(std::istreambuf_iterator& sitr, + std::istreambuf_iterator& stream_end) const + { + // lookup to_lower of char in tree. + unsigned int level = 0; + // string_type cache; + parse_match_result_type result; + match(sitr, stream_end, result, level); + return result; + } + + void printme(std::ostream& os, int& level) + { + level++; + iterator itr = m_next_chars.begin(); + iterator end = m_next_chars.end(); + // os << "starting level: " << level << std::endl; + while (itr != end) { + os << "level: " << level + << " node: " << itr->first + << " value: " << itr->second.m_value + << std::endl; + itr->second.printme(os, level); + itr++; + } + level--; + } + + void print(std::ostream& os) + { + int level = 0; + printme(os, level); + } + + void printmatch(std::ostream& os, charT c) + { + iterator litr = m_next_chars.lower_bound(c); + iterator uitr = m_next_chars.upper_bound(c); + os << "matches for: " << c << std::endl; + while (litr != uitr) { + os << " node: " << litr->first + << " value: " << litr->second.m_value + << std::endl; + litr++; + } + } + +}; + + +} } //namespace +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/strings_from_facet.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/strings_from_facet.hpp new file mode 100644 index 0000000000..2bc26fb33e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/strings_from_facet.hpp @@ -0,0 +1,125 @@ +#ifndef DATE_TIME_STRINGS_FROM_FACET__HPP___ +#define DATE_TIME_STRINGS_FROM_FACET__HPP___ + +/* Copyright (c) 2004 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2009-02-01 06:29:43 -0500 (Sun, 01 Feb 2009) $ + */ + +#include +#include +#include +#include + +namespace boost { namespace date_time { + +//! This function gathers up all the month strings from a std::locale +/*! Using the time_put facet, this function creates a collection of + * all the month strings from a locale. This is handy when building + * custom date parsers or formatters that need to be localized. + * + *@param charT The type of char to use when gathering typically char + * or wchar_t. + *@param locale The locale to use when gathering the strings + *@param short_strings True(default) to gather short strings, + * false for long strings. + *@return A vector of strings containing the strings in order. eg: + * Jan, Feb, Mar, etc. + */ +template +std::vector > +gather_month_strings(const std::locale& locale, bool short_strings=true) +{ + typedef std::basic_string string_type; + typedef std::vector collection_type; + typedef std::basic_ostringstream ostream_type; + typedef std::ostreambuf_iterator ostream_iter_type; + typedef std::basic_ostringstream stringstream_type; + typedef std::time_put time_put_facet_type; + charT short_fmt[3] = { '%', 'b' }; + charT long_fmt[3] = { '%', 'B' }; + collection_type months; + string_type outfmt(short_fmt); + if (!short_strings) { + outfmt = long_fmt; + } + { + //grab the needed strings by using the locale to + //output each month + const charT* p_outfmt = outfmt.c_str(), *p_outfmt_end = p_outfmt + outfmt.size(); + for (int m=0; m < 12; m++) { + tm tm_value; + tm_value.tm_mon = m; + stringstream_type ss; + ostream_iter_type oitr(ss); + std::use_facet(locale).put(oitr, ss, ss.fill(), + &tm_value, + p_outfmt, + p_outfmt_end); + months.push_back(ss.str()); + } + } + return months; +} + +//! This function gathers up all the weekday strings from a std::locale +/*! Using the time_put facet, this function creates a collection of + * all the weekday strings from a locale starting with the string for + * 'Sunday'. This is handy when building custom date parsers or + * formatters that need to be localized. + * + *@param charT The type of char to use when gathering typically char + * or wchar_t. + *@param locale The locale to use when gathering the strings + *@param short_strings True(default) to gather short strings, + * false for long strings. + *@return A vector of strings containing the weekdays in order. eg: + * Sun, Mon, Tue, Wed, Thu, Fri, Sat + */ +template +std::vector > +gather_weekday_strings(const std::locale& locale, bool short_strings=true) +{ + typedef std::basic_string string_type; + typedef std::vector collection_type; + typedef std::basic_ostringstream ostream_type; + typedef std::ostreambuf_iterator ostream_iter_type; + typedef std::basic_ostringstream stringstream_type; + typedef std::time_put time_put_facet_type; + charT short_fmt[3] = { '%', 'a' }; + charT long_fmt[3] = { '%', 'A' }; + + collection_type weekdays; + + + string_type outfmt(short_fmt); + if (!short_strings) { + outfmt = long_fmt; + } + { + //grab the needed strings by using the locale to + //output each month / weekday + const charT* p_outfmt = outfmt.c_str(), *p_outfmt_end = p_outfmt + outfmt.size(); + for (int i=0; i < 7; i++) { + tm tm_value; + tm_value.tm_wday = i; + stringstream_type ss; + ostream_iter_type oitr(ss); + std::use_facet(locale).put(oitr, ss, ss.fill(), + &tm_value, + p_outfmt, + p_outfmt_end); + + weekdays.push_back(ss.str()); + } + } + return weekdays; +} + +} } //namespace + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time.hpp new file mode 100644 index 0000000000..6a6cbe1f89 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time.hpp @@ -0,0 +1,191 @@ +#ifndef DATE_TIME_TIME_HPP___ +#define DATE_TIME_TIME_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + + +/*! @file time.hpp + This file contains the interface for the time associated classes. +*/ +#include +#include +#include +#include + +namespace boost { +namespace date_time { + + //! Representation of a precise moment in time, including the date. + /*! + This class is a skeleton for the interface of a temporal type + with a resolution that is higher than a day. It is intended that + this class be the base class and that the actual time + class be derived using the BN pattern. In this way, the derived + class can make decisions such as 'should there be a default constructor' + and what should it set its value to, should there be optional constructors + say allowing only an time_durations that generate a time from a clock,etc. + So, in fact multiple time types can be created for a time_system with + different construction policies, and all of them can perform basic + operations by only writing a copy constructor. Finally, compiler + errors are also shorter. + + The real behavior of the time class is provided by the time_system + template parameter. This class must provide all the logic + for addition, subtraction, as well as define all the interface + types. + + */ + + template + class base_time : private + boost::less_than_comparable > + { + public: + typedef T time_type; + typedef typename time_system::time_rep_type time_rep_type; + typedef typename time_system::date_type date_type; + typedef typename time_system::date_duration_type date_duration_type; + typedef typename time_system::time_duration_type time_duration_type; + //typedef typename time_system::hms_type hms_type; + + base_time(const date_type& day, + const time_duration_type& td, + dst_flags dst=not_dst) : + time_(time_system::get_time_rep(day, td, dst)) + {} + base_time(special_values sv) : + time_(time_system::get_time_rep(sv)) + {} + base_time(const time_rep_type& rhs) : + time_(rhs) + {} + date_type date() const + { + return time_system::get_date(time_); + } + time_duration_type time_of_day() const + { + return time_system::get_time_of_day(time_); + } + /*! Optional bool parameter will return time zone as an offset + * (ie "+07:00"). Empty string is returned for classes that do + * not use a time_zone */ + std::string zone_name(bool /*as_offset*/=false) const + { + return time_system::zone_name(time_); + } + /*! Optional bool parameter will return time zone as an offset + * (ie "+07:00"). Empty string is returned for classes that do + * not use a time_zone */ + std::string zone_abbrev(bool /*as_offset*/=false) const + { + return time_system::zone_name(time_); + } + //! An empty string is returned for classes that do not use a time_zone + std::string zone_as_posix_string() const + { + return std::string(); + } + + //! check to see if date is not a value + bool is_not_a_date_time() const + { + return time_.is_not_a_date_time(); + } + //! check to see if date is one of the infinity values + bool is_infinity() const + { + return (is_pos_infinity() || is_neg_infinity()); + } + //! check to see if date is greater than all possible dates + bool is_pos_infinity() const + { + return time_.is_pos_infinity(); + } + //! check to see if date is greater than all possible dates + bool is_neg_infinity() const + { + return time_.is_neg_infinity(); + } + //! check to see if time is a special value + bool is_special() const + { + return(is_not_a_date_time() || is_infinity()); + } + //!Equality operator -- others generated by boost::equality_comparable + bool operator==(const time_type& rhs) const + { + return time_system::is_equal(time_,rhs.time_); + } + //!Equality operator -- others generated by boost::less_than_comparable + bool operator<(const time_type& rhs) const + { + return time_system::is_less(time_,rhs.time_); + } + //! difference between two times + time_duration_type operator-(const time_type& rhs) const + { + return time_system::subtract_times(time_, rhs.time_); + } + //! add date durations + time_type operator+(const date_duration_type& dd) const + { + return time_system::add_days(time_, dd); + } + time_type operator+=(const date_duration_type& dd) + { + time_ = (time_system::get_time_rep(date() + dd, time_of_day())); + return time_type(time_); + } + //! subtract date durations + time_type operator-(const date_duration_type& dd) const + { + return time_system::subtract_days(time_, dd); + } + time_type operator-=(const date_duration_type& dd) + { + time_ = (time_system::get_time_rep(date() - dd, time_of_day())); + return time_type(time_); + } + //! add time durations + time_type operator+(const time_duration_type& td) const + { + return time_type(time_system::add_time_duration(time_, td)); + } + time_type operator+=(const time_duration_type& td) + { + time_ = (time_system::get_time_rep(date(), time_of_day() + td)); + return time_type(time_); + } + //! subtract time durations + time_type operator-(const time_duration_type& rhs) const + { + return time_system::subtract_time_duration(time_, rhs); + } + time_type operator-=(const time_duration_type& td) + { + time_ = (time_system::get_time_rep(date(), time_of_day() - td)); + return time_type(time_); + } + + protected: + time_rep_type time_; + }; + + + + + +} } //namespace date_time::boost + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_clock.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_clock.hpp new file mode 100644 index 0000000000..1ea5d2e8bd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_clock.hpp @@ -0,0 +1,83 @@ +#ifndef DATE_TIME_TIME_CLOCK_HPP___ +#define DATE_TIME_TIME_CLOCK_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +/*! @file time_clock.hpp + This file contains the interface for clock devices. +*/ + +#include "boost/date_time/c_time.hpp" +#include "boost/shared_ptr.hpp" + +namespace boost { +namespace date_time { + + + //! A clock providing time level services based on C time_t capabilities + /*! This clock provides resolution to the 1 second level + */ + template + class second_clock + { + public: + typedef typename time_type::date_type date_type; + typedef typename time_type::time_duration_type time_duration_type; + + static time_type local_time() + { + ::std::time_t t; + ::std::time(&t); + ::std::tm curr, *curr_ptr; + //curr_ptr = ::std::localtime(&t); + curr_ptr = c_time::localtime(&t, &curr); + return create_time(curr_ptr); + } + + + //! Get the current day in universal date as a ymd_type + static time_type universal_time() + { + + ::std::time_t t; + ::std::time(&t); + ::std::tm curr, *curr_ptr; + //curr_ptr = ::std::gmtime(&t); + curr_ptr = c_time::gmtime(&t, &curr); + return create_time(curr_ptr); + } + + template + static time_type local_time(boost::shared_ptr tz_ptr) + { + typedef typename time_type::utc_time_type utc_time_type; + utc_time_type utc_time = second_clock::universal_time(); + return time_type(utc_time, tz_ptr); + } + + + private: + static time_type create_time(::std::tm* current) + { + date_type d(static_cast(current->tm_year + 1900), + static_cast(current->tm_mon + 1), + static_cast(current->tm_mday)); + time_duration_type td(current->tm_hour, + current->tm_min, + current->tm_sec); + return time_type(d,td); + } + + }; + + +} } //namespace date_time + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_defs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_defs.hpp new file mode 100644 index 0000000000..55fe42a594 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_defs.hpp @@ -0,0 +1,43 @@ +#ifndef DATE_TIME_TIME_PRECISION_LIMITS_HPP +#define DATE_TIME_TIME_PRECISION_LIMITS_HPP + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + + + +/*! \file time_defs.hpp + This file contains nice definitions for handling the resoluion of various time + reprsentations. +*/ + +namespace boost { +namespace date_time { + + //!Defines some nice types for handling time level resolutions + enum time_resolutions { + sec, + tenth, + hundreth, // deprecated misspelled version of hundredth + hundredth = hundreth, + milli, + ten_thousandth, + micro, + nano, + NumResolutions + }; + + //! Flags for daylight savings or summer time + enum dst_flags {not_dst, is_dst, calculate}; + + +} } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_duration.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_duration.hpp new file mode 100644 index 0000000000..2fd259012e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_duration.hpp @@ -0,0 +1,282 @@ +#ifndef DATE_TIME_TIME_DURATION_HPP___ +#define DATE_TIME_TIME_DURATION_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2009-06-04 04:24:49 -0400 (Thu, 04 Jun 2009) $ + */ + +#include +#include +#include +#include +#include + +namespace boost { +namespace date_time { + + + //! Represents some amount of elapsed time measure to a given resolution + /*! This class represents a standard set of capabilities for all + counted time durations. Time duration implementations should derive + from this class passing their type as the first template parameter. + This design allows the subclass duration types to provide custom + construction policies or other custom features not provided here. + + @param T The subclass type + @param rep_type The time resolution traits for this duration type. + */ + template + class time_duration : private + boost::less_than_comparable > + /* dividable, addable, and subtractable operator templates + * won't work with this class (MSVC++ 6.0). return type + * from '+=' is different than expected return type + * from '+'. multipliable probably wont work + * either (haven't tried) */ + { + public: + typedef T duration_type; //the subclass + typedef rep_type traits_type; + typedef typename rep_type::day_type day_type; + typedef typename rep_type::hour_type hour_type; + typedef typename rep_type::min_type min_type; + typedef typename rep_type::sec_type sec_type; + typedef typename rep_type::fractional_seconds_type fractional_seconds_type; + typedef typename rep_type::tick_type tick_type; + typedef typename rep_type::impl_type impl_type; + + time_duration() : ticks_(0) {} + time_duration(hour_type hours_in, + min_type minutes_in, + sec_type seconds_in=0, + fractional_seconds_type frac_sec_in = 0) : + ticks_(rep_type::to_tick_count(hours_in,minutes_in,seconds_in,frac_sec_in)) + {} + // copy constructor required for dividable<> + //! Construct from another time_duration (Copy constructor) + time_duration(const time_duration& other) + : ticks_(other.ticks_) + {} + //! Construct from special_values + time_duration(special_values sv) : ticks_(impl_type::from_special(sv)) + {} + //! Returns smallest representable duration + static duration_type unit() + { + return duration_type(0,0,0,1); + } + //! Return the number of ticks in a second + static tick_type ticks_per_second() + { + return rep_type::res_adjust(); + } + //! Provide the resolution of this duration type + static time_resolutions resolution() + { + return rep_type::resolution(); + } + //! Returns number of hours in the duration + hour_type hours() const + { + return static_cast(ticks() / (3600*ticks_per_second())); + } + //! Returns normalized number of minutes + min_type minutes() const + { + return static_cast((ticks() / (60*ticks_per_second())) % 60); + } + //! Returns normalized number of seconds (0..60) + sec_type seconds() const + { + return static_cast((ticks()/ticks_per_second()) % 60); + } + //! Returns total number of seconds truncating any fractional seconds + sec_type total_seconds() const + { + return static_cast(ticks() / ticks_per_second()); + } + //! Returns total number of milliseconds truncating any fractional seconds + tick_type total_milliseconds() const + { + if (ticks_per_second() < 1000) { + return ticks() * (static_cast(1000) / ticks_per_second()); + } + return ticks() / (ticks_per_second() / static_cast(1000)) ; + } + //! Returns total number of nanoseconds truncating any sub millisecond values + tick_type total_nanoseconds() const + { + if (ticks_per_second() < 1000000000) { + return ticks() * (static_cast(1000000000) / ticks_per_second()); + } + return ticks() / (ticks_per_second() / static_cast(1000000000)) ; + } + //! Returns total number of microseconds truncating any sub microsecond values + tick_type total_microseconds() const + { + if (ticks_per_second() < 1000000) { + return ticks() * (static_cast(1000000) / ticks_per_second()); + } + return ticks() / (ticks_per_second() / static_cast(1000000)) ; + } + //! Returns count of fractional seconds at given resolution + fractional_seconds_type fractional_seconds() const + { + return (ticks() % ticks_per_second()); + } + //! Returns number of possible digits in fractional seconds + static unsigned short num_fractional_digits() + { + return rep_type::num_fractional_digits(); + } + duration_type invert_sign() const + { + return duration_type(ticks_ * (-1)); + } + bool is_negative() const + { + return ticks_ < 0; + } + bool operator<(const time_duration& rhs) const + { + return ticks_ < rhs.ticks_; + } + bool operator==(const time_duration& rhs) const + { + return ticks_ == rhs.ticks_; + } + //! unary- Allows for time_duration td = -td1 + duration_type operator-()const + { + return duration_type(ticks_ * (-1)); + } + duration_type operator-(const duration_type& d) const + { + return duration_type(ticks_ - d.ticks_); + } + duration_type operator+(const duration_type& d) const + { + return duration_type(ticks_ + d.ticks_); + } + duration_type operator/(int divisor) const + { + return duration_type(ticks_ / divisor); + } + duration_type operator-=(const duration_type& d) + { + ticks_ = ticks_ - d.ticks_; + return duration_type(ticks_); + } + duration_type operator+=(const duration_type& d) + { + ticks_ = ticks_ + d.ticks_; + return duration_type(ticks_); + } + //! Division operations on a duration with an integer. + duration_type operator/=(int divisor) + { + ticks_ = ticks_ / divisor; + return duration_type(ticks_); + } + //! Multiplication operations an a duration with an integer + duration_type operator*(int rhs) const + { + return duration_type(ticks_ * rhs); + } + duration_type operator*=(int divisor) + { + ticks_ = ticks_ * divisor; + return duration_type(ticks_); + } + tick_type ticks() const + { + return traits_type::as_number(ticks_); + } + + //! Is ticks_ a special value? + bool is_special()const + { + if(traits_type::is_adapted()) + { + return ticks_.is_special(); + } + else{ + return false; + } + } + //! Is duration pos-infinity + bool is_pos_infinity()const + { + if(traits_type::is_adapted()) + { + return ticks_.is_pos_infinity(); + } + else{ + return false; + } + } + //! Is duration neg-infinity + bool is_neg_infinity()const + { + if(traits_type::is_adapted()) + { + return ticks_.is_neg_infinity(); + } + else{ + return false; + } + } + //! Is duration not-a-date-time + bool is_not_a_date_time()const + { + if(traits_type::is_adapted()) + { + return ticks_.is_nan(); + } + else{ + return false; + } + } + + //! Used for special_values output + impl_type get_rep()const + { + return ticks_; + } + + protected: + explicit time_duration(impl_type in) : ticks_(in) {}; + impl_type ticks_; + }; + + + + //! Template for instantiating derived adjusting durations + /* These templates are designed to work with multiples of + * 10 for frac_of_second and resoultion adjustment + */ + template + class subsecond_duration : public base_duration + { + public: + typedef typename base_duration::traits_type traits_type; + explicit subsecond_duration(boost::int64_t ss) : + base_duration(0,0,0,ss*traits_type::res_adjust()/frac_of_second) + {} + }; + + + +} } //namespace date_time + + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_facet.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_facet.hpp new file mode 100644 index 0000000000..a456db944d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_facet.hpp @@ -0,0 +1,1367 @@ + +#ifndef _DATE_TIME_FACET__HPP__ +#define _DATE_TIME_FACET__HPP__ + +/* Copyright (c) 2004-2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Martin Andrian, Jeff Garland, Bart Garst + * $Date: 2010-06-09 12:39:31 -0400 (Wed, 09 Jun 2010) $ + */ + +#include +#include +#include +#include +#include +#include +#include // i/ostreambuf_iterator +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // absolute_value + +namespace boost { +namespace date_time { + + template + struct time_formats { + public: + typedef CharT char_type; + static const char_type fractional_seconds_format[3]; // f + static const char_type fractional_seconds_or_none_format[3]; // F + static const char_type seconds_with_fractional_seconds_format[3]; // s + static const char_type seconds_format[3]; // S + static const char_type hours_format[3]; // H + static const char_type unrestricted_hours_format[3]; // O + static const char_type full_24_hour_time_format[3]; // T + static const char_type full_24_hour_time_expanded_format[9]; // HH:MM:SS + static const char_type short_24_hour_time_format[3]; // R + static const char_type short_24_hour_time_expanded_format[6]; // HH:MM + static const char_type standard_format[9]; // x X + static const char_type zone_abbrev_format[3]; // z + static const char_type zone_name_format[3]; // Z + static const char_type zone_iso_format[3]; // q + static const char_type zone_iso_extended_format[3]; // Q + static const char_type posix_zone_string_format[4]; // ZP + static const char_type duration_sign_negative_only[3]; // - + static const char_type duration_sign_always[3]; // + + static const char_type duration_seperator[2]; + static const char_type negative_sign[2]; //- + static const char_type positive_sign[2]; //+ + static const char_type iso_time_format_specifier[18]; + static const char_type iso_time_format_extended_specifier[22]; + //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz] + static const char_type default_time_format[23]; + // default_time_input_format uses a posix_time_zone_string instead of a time zone abbrev + static const char_type default_time_input_format[24]; + //default time_duration format is HH:MM:SS[.fff...] + static const char_type default_time_duration_format[11]; + }; + + template + const typename time_formats::char_type + time_formats::fractional_seconds_format[3] = {'%','f'}; + + template + const typename time_formats::char_type + time_formats::fractional_seconds_or_none_format[3] = {'%','F'}; + + template + const typename time_formats::char_type + time_formats::seconds_with_fractional_seconds_format[3] = {'%','s'}; + + template + const typename time_formats::char_type + time_formats::seconds_format[3] = {'%','S'}; + + template + const typename time_formats::char_type + time_formats::hours_format[3] = {'%','H'}; + + template + const typename time_formats::char_type + time_formats::unrestricted_hours_format[3] = {'%','O'}; + + template + const typename time_formats::char_type + time_formats::full_24_hour_time_format[3] = {'%','T'}; + + template + const typename time_formats::char_type + time_formats::full_24_hour_time_expanded_format[9] = + {'%','H',':','%','M',':','%','S'}; + + template + const typename time_formats::char_type + time_formats::short_24_hour_time_format[3] = {'%','R'}; + + template + const typename time_formats::char_type + time_formats::short_24_hour_time_expanded_format[6] = + {'%','H',':','%','M'}; + + template + const typename time_formats::char_type + //time_formats::standard_format[5] = {'%','c',' ','%','z'}; + time_formats::standard_format[9] = {'%','x',' ','%','X',' ','%','z'}; + + template + const typename time_formats::char_type + time_formats::zone_abbrev_format[3] = {'%','z'}; + + template + const typename time_formats::char_type + time_formats::zone_name_format[3] = {'%','Z'}; + + template + const typename time_formats::char_type + time_formats::zone_iso_format[3] = {'%','q'}; + + template + const typename time_formats::char_type + time_formats::zone_iso_extended_format[3] ={'%','Q'}; + + template + const typename time_formats::char_type + time_formats::posix_zone_string_format[4] ={'%','Z','P'}; + + template + const typename time_formats::char_type + time_formats::duration_seperator[2] = {':'}; + + template + const typename time_formats::char_type + time_formats::negative_sign[2] = {'-'}; + + template + const typename time_formats::char_type + time_formats::positive_sign[2] = {'+'}; + + template + const typename time_formats::char_type + time_formats::duration_sign_negative_only[3] ={'%','-'}; + + template + const typename time_formats::char_type + time_formats::duration_sign_always[3] ={'%','+'}; + + template + const typename time_formats::char_type + time_formats::iso_time_format_specifier[18] = + {'%', 'Y', '%', 'm', '%', 'd', 'T', + '%', 'H', '%', 'M', '%', 'S', '%', 'F', '%','q' }; + + template + const typename time_formats::char_type + time_formats::iso_time_format_extended_specifier[22] = + {'%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', + '%', 'H', ':', '%', 'M', ':', '%', 'S', '%', 'F','%','Q'}; + + template + const typename time_formats::char_type + time_formats::default_time_format[23] = + {'%','Y','-','%','b','-','%','d',' ', + '%','H',':','%','M',':','%','S','%','F',' ','%','z'}; + + template + const typename time_formats::char_type + time_formats::default_time_input_format[24] = + {'%','Y','-','%','b','-','%','d',' ', + '%','H',':','%','M',':','%','S','%','F',' ','%','Z','P'}; + + template + const typename time_formats::char_type + time_formats::default_time_duration_format[11] = + {'%','O',':','%','M',':','%','S','%','F'}; + + + + /*! Facet used for format-based output of time types + * This class provides for the use of format strings to output times. In addition + * to the flags for formatting date elements, the following are the allowed format flags: + * - %x %X => default format - enables addition of more flags to default (ie. "%x %X %z") + * - %f => fractional seconds ".123456" + * - %F => fractional seconds or none: like frac sec but empty if frac sec == 0 + * - %s => seconds w/ fractional sec "02.123" (this is the same as "%S%f) + * - %S => seconds "02" + * - %z => abbreviated time zone "EDT" + * - %Z => full time zone name "Eastern Daylight Time" + */ + template > > + class time_facet : + public boost::date_time::date_facet { + typedef time_formats< CharT > formats_type; + public: + typedef typename time_type::date_type date_type; + typedef typename time_type::time_duration_type time_duration_type; + typedef boost::date_time::period period_type; + typedef boost::date_time::date_facet base_type; + typedef typename base_type::string_type string_type; + typedef typename base_type::char_type char_type; + typedef typename base_type::period_formatter_type period_formatter_type; + typedef typename base_type::special_values_formatter_type special_values_formatter_type; + typedef typename base_type::date_gen_formatter_type date_gen_formatter_type; + static const char_type* fractional_seconds_format; // %f + static const char_type* fractional_seconds_or_none_format; // %F + static const char_type* seconds_with_fractional_seconds_format; // %s + static const char_type* seconds_format; // %S + static const char_type* hours_format; // %H + static const char_type* unrestricted_hours_format; // %O + static const char_type* standard_format; // %x X + static const char_type* zone_abbrev_format; // %z + static const char_type* zone_name_format; // %Z + static const char_type* zone_iso_format; // %q + static const char_type* zone_iso_extended_format; // %Q + static const char_type* posix_zone_string_format; // %ZP + static const char_type* duration_seperator; + static const char_type* duration_sign_always; // %+ + static const char_type* duration_sign_negative_only; // %- + static const char_type* negative_sign; //- + static const char_type* positive_sign; //+ + static const char_type* iso_time_format_specifier; + static const char_type* iso_time_format_extended_specifier; + + //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz] + static const char_type* default_time_format; + //default time_duration format is HH:MM:SS[.fff...] + static const char_type* default_time_duration_format; + static std::locale::id id; + +#if defined (__SUNPRO_CC) && defined (_RWSTD_VER) + std::locale::id& __get_id (void) const { return id; } +#endif + + //! sets default formats for ptime, local_date_time, and time_duration + explicit time_facet(::size_t a_ref = 0) + : base_type(default_time_format, period_formatter_type(), special_values_formatter_type(), date_gen_formatter_type(), a_ref), + m_time_duration_format(string_type(duration_sign_negative_only) + default_time_duration_format) + {} + + //! Construct the facet with an explicitly specified format + explicit time_facet(const char_type* a_format, + period_formatter_type period_formatter = period_formatter_type(), + const special_values_formatter_type& special_value_formatter = special_values_formatter_type(), + date_gen_formatter_type dg_formatter = date_gen_formatter_type(), + ::size_t a_ref = 0) + : base_type(a_format, + period_formatter, + special_value_formatter, + dg_formatter, + a_ref), + m_time_duration_format(string_type(duration_sign_negative_only) + default_time_duration_format) + {} + + //! Changes format for time_duration + void time_duration_format(const char_type* const format) + { + m_time_duration_format = format; + } + + virtual void set_iso_format() + { + this->m_format = iso_time_format_specifier; + } + virtual void set_iso_extended_format() + { + this->m_format = iso_time_format_extended_specifier; + } + + OutItrT put(OutItrT a_next, + std::ios_base& a_ios, + char_type a_fill, + const time_type& a_time) const + { + if (a_time.is_special()) { + return this->do_put_special(a_next, a_ios, a_fill, + a_time.date().as_special()); + } + string_type format(this->m_format); + + // %T and %R have to be replaced here since they are not standard + boost::algorithm::replace_all(format, + boost::as_literal(formats_type::full_24_hour_time_format), + boost::as_literal(formats_type::full_24_hour_time_expanded_format)); + boost::algorithm::replace_all(format, + boost::as_literal(formats_type::short_24_hour_time_format), + boost::as_literal(formats_type::short_24_hour_time_expanded_format)); + + string_type frac_str; + if (format.find(seconds_with_fractional_seconds_format) != string_type::npos) { + // replace %s with %S.nnn + frac_str = + fractional_seconds_as_string(a_time.time_of_day(), false); + char_type sep = std::use_facet >(a_ios.getloc()).decimal_point(); + + string_type replace_string(seconds_format); + replace_string += sep; + replace_string += frac_str; + boost::algorithm::replace_all(format, + seconds_with_fractional_seconds_format, + replace_string); + } + /* NOTE: replacing posix_zone_string_format must be done BEFORE + * zone_name_format: "%ZP" & "%Z", if Z is checked first it will + * incorrectly replace a zone_name where a posix_string should go */ + if (format.find(posix_zone_string_format) != string_type::npos) { + if(a_time.zone_abbrev().empty()) { + // if zone_abbrev() returns an empty string, we want to + // erase posix_zone_string_format from format + boost::algorithm::erase_all(format, posix_zone_string_format); + } + else{ + boost::algorithm::replace_all(format, + posix_zone_string_format, + a_time.zone_as_posix_string()); + } + } + if (format.find(zone_name_format) != string_type::npos) { + if(a_time.zone_name().empty()) { + /* TODO: this'll probably create problems if a user places + * the zone_*_format flag in the format with a ptime. This + * code removes the flag from the default formats */ + + // if zone_name() returns an empty string, we want to + // erase zone_name_format & one preceeding space + std::basic_ostringstream ss; + ss << ' ' << zone_name_format; + boost::algorithm::erase_all(format, ss.str()); + } + else{ + boost::algorithm::replace_all(format, + zone_name_format, + a_time.zone_name()); + } + } + if (format.find(zone_abbrev_format) != string_type::npos) { + if(a_time.zone_abbrev(false).empty()) { + /* TODO: this'll probably create problems if a user places + * the zone_*_format flag in the format with a ptime. This + * code removes the flag from the default formats */ + + // if zone_abbrev() returns an empty string, we want to + // erase zone_abbrev_format & one preceeding space + std::basic_ostringstream ss; + ss << ' ' << zone_abbrev_format; + boost::algorithm::erase_all(format, ss.str()); + } + else{ + boost::algorithm::replace_all(format, + zone_abbrev_format, + a_time.zone_abbrev(false)); + } + } + if (format.find(zone_iso_extended_format) != string_type::npos) { + if(a_time.zone_name(true).empty()) { + /* TODO: this'll probably create problems if a user places + * the zone_*_format flag in the format with a ptime. This + * code removes the flag from the default formats */ + + // if zone_name() returns an empty string, we want to + // erase zone_iso_extended_format from format + boost::algorithm::erase_all(format, zone_iso_extended_format); + } + else{ + boost::algorithm::replace_all(format, + zone_iso_extended_format, + a_time.zone_name(true)); + } + } + + if (format.find(zone_iso_format) != string_type::npos) { + if(a_time.zone_abbrev(true).empty()) { + /* TODO: this'll probably create problems if a user places + * the zone_*_format flag in the format with a ptime. This + * code removes the flag from the default formats */ + + // if zone_abbrev() returns an empty string, we want to + // erase zone_iso_format from format + boost::algorithm::erase_all(format, zone_iso_format); + } + else{ + boost::algorithm::replace_all(format, + zone_iso_format, + a_time.zone_abbrev(true)); + } + } + if (format.find(fractional_seconds_format) != string_type::npos) { + // replace %f with nnnnnnn + if (frac_str.empty()) { + frac_str = fractional_seconds_as_string(a_time.time_of_day(), false); + } + boost::algorithm::replace_all(format, + fractional_seconds_format, + frac_str); + } + + if (format.find(fractional_seconds_or_none_format) != string_type::npos) { + // replace %F with nnnnnnn or nothing if fs == 0 + frac_str = + fractional_seconds_as_string(a_time.time_of_day(), true); + if (frac_str.size()) { + char_type sep = std::use_facet >(a_ios.getloc()).decimal_point(); + string_type replace_string; + replace_string += sep; + replace_string += frac_str; + boost::algorithm::replace_all(format, + fractional_seconds_or_none_format, + replace_string); + } + else { + boost::algorithm::erase_all(format, + fractional_seconds_or_none_format); + } + } + + return this->do_put_tm(a_next, a_ios, a_fill, + to_tm(a_time), format); + } + + //! put function for time_duration + OutItrT put(OutItrT a_next, + std::ios_base& a_ios, + char_type a_fill, + const time_duration_type& a_time_dur) const + { + if (a_time_dur.is_special()) { + return this->do_put_special(a_next, a_ios, a_fill, + a_time_dur.get_rep().as_special()); + } + + string_type format(m_time_duration_format); + if (a_time_dur.is_negative()) { + // replace %- with minus sign. Should we use the numpunct facet? + boost::algorithm::replace_all(format, + duration_sign_negative_only, + negative_sign); + // remove all the %+ in the string with '-' + boost::algorithm::replace_all(format, + duration_sign_always, + negative_sign); + } + else { //duration is positive + // remove all the %- combos from the string + boost::algorithm::erase_all(format, duration_sign_negative_only); + // remove all the %+ in the string with '+' + boost::algorithm::replace_all(format, + duration_sign_always, + positive_sign); + } + + // %T and %R have to be replaced here since they are not standard + boost::algorithm::replace_all(format, + boost::as_literal(formats_type::full_24_hour_time_format), + boost::as_literal(formats_type::full_24_hour_time_expanded_format)); + boost::algorithm::replace_all(format, + boost::as_literal(formats_type::short_24_hour_time_format), + boost::as_literal(formats_type::short_24_hour_time_expanded_format)); + + /* + * It is possible for a time duration to span more then 24 hours. + * Standard time_put::put is obliged to behave the same as strftime + * (See ISO 14882-2003 22.2.5.3.1 par. 1) and strftime's behavior is + * unspecified for the case when tm_hour field is outside 0-23 range + * (See ISO 9899-1999 7.23.3.5 par. 3). So we must output %H and %O + * here ourself. + */ + string_type hours_str; + if (format.find(unrestricted_hours_format) != string_type::npos) { + hours_str = hours_as_string(a_time_dur); + boost::algorithm::replace_all(format, unrestricted_hours_format, hours_str); + } + // We still have to process restricted hours format specifier. In order to + // support parseability of durations in ISO format (%H%M%S), we'll have to + // restrict the stringified hours length to 2 characters. + if (format.find(hours_format) != string_type::npos) { + if (hours_str.empty()) + hours_str = hours_as_string(a_time_dur); + BOOST_ASSERT(hours_str.length() <= 2); + boost::algorithm::replace_all(format, hours_format, hours_str); + } + + string_type frac_str; + if (format.find(seconds_with_fractional_seconds_format) != string_type::npos) { + // replace %s with %S.nnn + frac_str = + fractional_seconds_as_string(a_time_dur, false); + char_type sep = std::use_facet >(a_ios.getloc()).decimal_point(); + + string_type replace_string(seconds_format); + replace_string += sep; + replace_string += frac_str; + boost::algorithm::replace_all(format, + seconds_with_fractional_seconds_format, + replace_string); + } + if (format.find(fractional_seconds_format) != string_type::npos) { + // replace %f with nnnnnnn + if (!frac_str.size()) { + frac_str = fractional_seconds_as_string(a_time_dur, false); + } + boost::algorithm::replace_all(format, + fractional_seconds_format, + frac_str); + } + + if (format.find(fractional_seconds_or_none_format) != string_type::npos) { + // replace %F with nnnnnnn or nothing if fs == 0 + frac_str = + fractional_seconds_as_string(a_time_dur, true); + if (frac_str.size()) { + char_type sep = std::use_facet >(a_ios.getloc()).decimal_point(); + string_type replace_string; + replace_string += sep; + replace_string += frac_str; + boost::algorithm::replace_all(format, + fractional_seconds_or_none_format, + replace_string); + } + else { + boost::algorithm::erase_all(format, + fractional_seconds_or_none_format); + } + } + + return this->do_put_tm(a_next, a_ios, a_fill, + to_tm(a_time_dur), format); + } + + OutItrT put(OutItrT next, std::ios_base& a_ios, + char_type fill, const period_type& p) const + { + return this->m_period_formatter.put_period(next, a_ios, fill,p,*this); + } + + + protected: + + static + string_type + fractional_seconds_as_string(const time_duration_type& a_time, + bool null_when_zero) + { + typename time_duration_type::fractional_seconds_type frac_sec = + a_time.fractional_seconds(); + + if (null_when_zero && (frac_sec == 0)) { + return string_type(); + } + + //make sure there is no sign + return integral_as_string( + date_time::absolute_value(frac_sec), + time_duration_type::num_fractional_digits()); + } + + static + string_type + hours_as_string(const time_duration_type& a_time, int width = 2) + { + return integral_as_string(date_time::absolute_value(a_time.hours()), width); + } + + template< typename IntT > + static + string_type + integral_as_string(IntT val, int width = 2) + { + std::basic_ostringstream ss; + ss.imbue(std::locale::classic()); // don't want any formatting + ss << std::setw(width) + << std::setfill(static_cast('0')); +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + // JDG [7/6/02 VC++ compatibility] + char_type buff[34]; + ss << _i64toa(static_cast(val), buff, 10); +#else + ss << val; +#endif + return ss.str(); + } + + private: + string_type m_time_duration_format; + + }; + + template + std::locale::id time_facet::id; + + template + const typename time_facet::char_type* + time_facet::fractional_seconds_format = time_formats::fractional_seconds_format; + + template + const typename time_facet::char_type* + time_facet::fractional_seconds_or_none_format = time_formats::fractional_seconds_or_none_format; + + template + const typename time_facet::char_type* + time_facet::seconds_with_fractional_seconds_format = + time_formats::seconds_with_fractional_seconds_format; + + + template + const typename time_facet::char_type* + time_facet::zone_name_format = time_formats::zone_name_format; + + template + const typename time_facet::char_type* + time_facet::zone_abbrev_format = time_formats::zone_abbrev_format; + + template + const typename time_facet::char_type* + time_facet::zone_iso_extended_format =time_formats::zone_iso_extended_format; + + template + const typename time_facet::char_type* + time_facet::posix_zone_string_format =time_formats::posix_zone_string_format; + + template + const typename time_facet::char_type* + time_facet::zone_iso_format = time_formats::zone_iso_format; + + template + const typename time_facet::char_type* + time_facet::seconds_format = time_formats::seconds_format; + + template + const typename time_facet::char_type* + time_facet::hours_format = time_formats::hours_format; + + template + const typename time_facet::char_type* + time_facet::unrestricted_hours_format = time_formats::unrestricted_hours_format; + + template + const typename time_facet::char_type* + time_facet::standard_format = time_formats::standard_format; + + template + const typename time_facet::char_type* + time_facet::duration_seperator = time_formats::duration_seperator; + + template + const typename time_facet::char_type* + time_facet::negative_sign = time_formats::negative_sign; + + template + const typename time_facet::char_type* + time_facet::positive_sign = time_formats::positive_sign; + + template + const typename time_facet::char_type* + time_facet::duration_sign_negative_only = time_formats::duration_sign_negative_only; + + template + const typename time_facet::char_type* + time_facet::duration_sign_always = time_formats::duration_sign_always; + + template + const typename time_facet::char_type* + time_facet::iso_time_format_specifier = time_formats::iso_time_format_specifier; + + template + const typename time_facet::char_type* + time_facet::iso_time_format_extended_specifier = time_formats::iso_time_format_extended_specifier; + + template + const typename time_facet::char_type* + time_facet::default_time_format = + time_formats::default_time_format; + + template + const typename time_facet::char_type* + time_facet::default_time_duration_format = + time_formats::default_time_duration_format; + + + //! Facet for format-based input. + /*! + */ + template > > + class time_input_facet : + public boost::date_time::date_input_facet { + public: + typedef typename time_type::date_type date_type; + typedef typename time_type::time_duration_type time_duration_type; + typedef typename time_duration_type::fractional_seconds_type fracional_seconds_type; + typedef boost::date_time::period period_type; + typedef boost::date_time::date_input_facet base_type; + typedef typename base_type::duration_type date_duration_type; + typedef typename base_type::year_type year_type; + typedef typename base_type::month_type month_type; + typedef typename base_type::day_type day_type; + typedef typename base_type::string_type string_type; + typedef typename string_type::const_iterator const_itr; + typedef typename base_type::char_type char_type; + typedef typename base_type::format_date_parser_type format_date_parser_type; + typedef typename base_type::period_parser_type period_parser_type; + typedef typename base_type::special_values_parser_type special_values_parser_type; + typedef typename base_type::date_gen_parser_type date_gen_parser_type; + typedef typename base_type::special_values_parser_type::match_results match_results; + + static const char_type* fractional_seconds_format; // f + static const char_type* fractional_seconds_or_none_format; // F + static const char_type* seconds_with_fractional_seconds_format; // s + static const char_type* seconds_format; // S + static const char_type* standard_format; // x X + static const char_type* zone_abbrev_format; // z + static const char_type* zone_name_format; // Z + static const char_type* zone_iso_format; // q + static const char_type* zone_iso_extended_format; // Q + static const char_type* duration_seperator; + static const char_type* iso_time_format_specifier; + static const char_type* iso_time_format_extended_specifier; + static const char_type* default_time_input_format; + static const char_type* default_time_duration_format; + static std::locale::id id; + + //! Constructor that takes a format string for a ptime + explicit time_input_facet(const string_type& format, ::size_t a_ref = 0) + : base_type(format, a_ref), + m_time_duration_format(default_time_duration_format) + { } + + explicit time_input_facet(const string_type& format, + const format_date_parser_type& date_parser, + const special_values_parser_type& sv_parser, + const period_parser_type& per_parser, + const date_gen_parser_type& date_gen_parser, + ::size_t a_ref = 0) + : base_type(format, + date_parser, + sv_parser, + per_parser, + date_gen_parser, + a_ref), + m_time_duration_format(default_time_duration_format) + {} + + //! sets default formats for ptime, local_date_time, and time_duration + explicit time_input_facet(::size_t a_ref = 0) + : base_type(default_time_input_format, a_ref), + m_time_duration_format(default_time_duration_format) + { } + + //! Set the format for time_duration + void time_duration_format(const char_type* const format) { + m_time_duration_format = format; + } + virtual void set_iso_format() + { + this->m_format = iso_time_format_specifier; + } + virtual void set_iso_extended_format() + { + this->m_format = iso_time_format_extended_specifier; + } + + InItrT get(InItrT& sitr, + InItrT& stream_end, + std::ios_base& a_ios, + period_type& p) const + { + p = this->m_period_parser.get_period(sitr, + stream_end, + a_ios, + p, + time_duration_type::unit(), + *this); + return sitr; + } + + //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz] + //default time_duration format is %H:%M:%S%F HH:MM:SS[.fff...] + + InItrT get(InItrT& sitr, + InItrT& stream_end, + std::ios_base& a_ios, + time_duration_type& td) const + { + // skip leading whitespace + while((sitr != stream_end) && std::isspace(*sitr)) { ++sitr; } + + bool use_current_char = false; + + // num_get will consume the +/-, we may need a copy if special_value + char_type c = '\0'; + if((sitr != stream_end) && (*sitr == '-' || *sitr == '+')) { + c = *sitr; + } + + typedef typename time_duration_type::hour_type hour_type; + typedef typename time_duration_type::min_type min_type; + typedef typename time_duration_type::sec_type sec_type; + + hour_type hour = 0; + min_type min = 0; + sec_type sec = 0; + typename time_duration_type::fractional_seconds_type frac(0); + + typedef std::num_get num_get; + if(!std::has_facet(a_ios.getloc())) { + num_get* ng = new num_get(); + std::locale loc = std::locale(a_ios.getloc(), ng); + a_ios.imbue(loc); + } + + const_itr itr(m_time_duration_format.begin()); + while (itr != m_time_duration_format.end() && (sitr != stream_end)) { + if (*itr == '%') { + ++itr; + if (*itr != '%') { + switch(*itr) { + case 'O': + { + // A period may span more than 24 hours. In that case the format + // string should be composed with the unrestricted hours specifier. + hour = var_string_to_int(sitr, stream_end, + std::numeric_limits::digits10 + 1); + if(hour == -1){ + return check_special_value(sitr, stream_end, td, c); + } + break; + } + case 'H': + { + match_results mr; + hour = fixed_string_to_int(sitr, stream_end, mr, 2); + if(hour == -1){ + return check_special_value(sitr, stream_end, td, c); + } + break; + } + case 'M': + { + match_results mr; + min = fixed_string_to_int(sitr, stream_end, mr, 2); + if(min == -1){ + return check_special_value(sitr, stream_end, td, c); + } + break; + } + case 's': + case 'S': + { + match_results mr; + sec = fixed_string_to_int(sitr, stream_end, mr, 2); + if(sec == -1){ + return check_special_value(sitr, stream_end, td, c); + } + if (*itr == 'S') + break; + // %s is the same as %S%f so we drop through into %f + } + case 'f': + { + // check for decimal, check special_values if missing + if(*sitr == '.') { + ++sitr; + parse_frac_type(sitr, stream_end, frac); + // sitr will point to next expected char after this parsing + // is complete so no need to advance it + use_current_char = true; + } + else { + return check_special_value(sitr, stream_end, td, c); + } + break; + } + case 'F': + { + // check for decimal, skip if missing + if(*sitr == '.') { + ++sitr; + parse_frac_type(sitr, stream_end, frac); + // sitr will point to next expected char after this parsing + // is complete so no need to advance it + use_current_char = true; + } + else { + // nothing was parsed so we don't want to advance sitr + use_current_char = true; + } + break; + } + default: + {} // ignore what we don't understand? + }// switch + } + else { // itr == '%', second consecutive + ++sitr; + } + + ++itr; //advance past format specifier + } + else { //skip past chars in format and in buffer + ++itr; + // set use_current_char when sitr is already + // pointing at the next character to process + if (use_current_char) { + use_current_char = false; + } + else { + ++sitr; + } + } + } + + td = time_duration_type(hour, min, sec, frac); + return sitr; + } + + + //! Parses a time object from the input stream + InItrT get(InItrT& sitr, + InItrT& stream_end, + std::ios_base& a_ios, + time_type& t) const + { + string_type tz_str; + return get(sitr, stream_end, a_ios, t, tz_str, false); + } + //! Expects a time_zone in the input stream + InItrT get_local_time(InItrT& sitr, + InItrT& stream_end, + std::ios_base& a_ios, + time_type& t, + string_type& tz_str) const + { + return get(sitr, stream_end, a_ios, t, tz_str, true); + } + + protected: + + InItrT get(InItrT& sitr, + InItrT& stream_end, + std::ios_base& a_ios, + time_type& t, + string_type& tz_str, + bool time_is_local) const + { + // skip leading whitespace + while((sitr != stream_end) && std::isspace(*sitr)) { ++sitr; } + + bool use_current_char = false; + bool use_current_format_char = false; // used whith two character flags + + // num_get will consume the +/-, we may need a copy if special_value + char_type c = '\0'; + if((sitr != stream_end) && (*sitr == '-' || *sitr == '+')) { + c = *sitr; + } + + typedef typename time_duration_type::hour_type hour_type; + typedef typename time_duration_type::min_type min_type; + typedef typename time_duration_type::sec_type sec_type; + + // time elements + hour_type hour = 0; + min_type min = 0; + sec_type sec = 0; + typename time_duration_type::fractional_seconds_type frac(0); + // date elements + short day_of_year(0); + /* Initialized the following to their minimum values. These intermediate + * objects are used so we get specific exceptions when part of the input + * is unparsable. + * Ex: "205-Jan-15" will throw a bad_year, "2005-Jsn-15"- bad_month, etc.*/ + year_type t_year(1400); + month_type t_month(1); + day_type t_day(1); + + typedef std::num_get num_get; + if(!std::has_facet(a_ios.getloc())) { + num_get* ng = new num_get(); + std::locale loc = std::locale(a_ios.getloc(), ng); + a_ios.imbue(loc); + } + + const_itr itr(this->m_format.begin()); + while (itr != this->m_format.end() && (sitr != stream_end)) { + if (*itr == '%') { + ++itr; + if (*itr != '%') { + // the cases are grouped by date & time flags - not alphabetical order + switch(*itr) { + // date flags + case 'Y': + case 'y': + { + char_type cs[3] = { '%', *itr }; + string_type s(cs); + match_results mr; + try { + t_year = this->m_parser.parse_year(sitr, stream_end, s, mr); + } + catch(std::out_of_range&) { // base class for bad_year exception + if(this->m_sv_parser.match(sitr, stream_end, mr)) { + t = time_type(static_cast(mr.current_match)); + return sitr; + } + else { + throw; // rethrow bad_year + } + } + break; + } + case 'B': + case 'b': + case 'm': + { + char_type cs[3] = { '%', *itr }; + string_type s(cs); + match_results mr; + try { + t_month = this->m_parser.parse_month(sitr, stream_end, s, mr); + } + catch(std::out_of_range&) { // base class for bad_month exception + if(this->m_sv_parser.match(sitr, stream_end, mr)) { + t = time_type(static_cast(mr.current_match)); + return sitr; + } + else { + throw; // rethrow bad_month + } + } + // did m_parser already advance sitr to next char? + if(mr.has_remaining()) { + use_current_char = true; + } + break; + } + case 'a': + case 'A': + case 'w': + { + // weekday is not used in construction but we need to get it out of the stream + char_type cs[3] = { '%', *itr }; + string_type s(cs); + match_results mr; + typename date_type::day_of_week_type wd(0); + try { + wd = this->m_parser.parse_weekday(sitr, stream_end, s, mr); + } + catch(std::out_of_range&) { // base class for bad_weekday exception + if(this->m_sv_parser.match(sitr, stream_end, mr)) { + t = time_type(static_cast(mr.current_match)); + return sitr; + } + else { + throw; // rethrow bad_weekday + } + } + // did m_parser already advance sitr to next char? + if(mr.has_remaining()) { + use_current_char = true; + } + break; + } + case 'j': + { + // code that gets julian day (from format_date_parser) + match_results mr; + day_of_year = fixed_string_to_int(sitr, stream_end, mr, 3); + if(day_of_year == -1) { + if(this->m_sv_parser.match(sitr, stream_end, mr)) { + t = time_type(static_cast(mr.current_match)); + return sitr; + } + } + // these next two lines are so we get an exception with bad input + typedef typename time_type::date_type::day_of_year_type day_of_year_type; + day_of_year_type t_day_of_year(day_of_year); + break; + } + case 'd': + { + try { + t_day = this->m_parser.parse_day_of_month(sitr, stream_end); + } + catch(std::out_of_range&) { // base class for exception bad_day_of_month + match_results mr; + if(this->m_sv_parser.match(sitr, stream_end, mr)) { + t = time_type(static_cast(mr.current_match)); + return sitr; + } + else { + throw; // rethrow bad_day_of_month + } + } + break; + } + // time flags + case 'H': + { + match_results mr; + hour = fixed_string_to_int(sitr, stream_end, mr, 2); + if(hour == -1){ + return check_special_value(sitr, stream_end, t, c); + } + break; + } + case 'M': + { + match_results mr; + min = fixed_string_to_int(sitr, stream_end, mr, 2); + if(min == -1){ + return check_special_value(sitr, stream_end, t, c); + } + break; + } + case 's': + case 'S': + { + match_results mr; + sec = fixed_string_to_int(sitr, stream_end, mr, 2); + if(sec == -1){ + return check_special_value(sitr, stream_end, t, c); + } + if (*itr == 'S') + break; + // %s is the same as %S%f so we drop through into %f + } + case 'f': + { + // check for decimal, check SV if missing + if(*sitr == '.') { + ++sitr; + parse_frac_type(sitr, stream_end, frac); + // sitr will point to next expected char after this parsing + // is complete so no need to advance it + use_current_char = true; + } + else { + return check_special_value(sitr, stream_end, t, c); + } + break; + } + case 'F': + { + // check for decimal, skip if missing + if(*sitr == '.') { + ++sitr; + parse_frac_type(sitr, stream_end, frac); + // sitr will point to next expected char after this parsing + // is complete so no need to advance it + use_current_char = true; + } + else { + // nothing was parsed so we don't want to advance sitr + use_current_char = true; + } + break; + } + // time_zone flags + //case 'q': + //case 'Q': + //case 'z': + case 'Z': + { + if(time_is_local) { // skip if 't' is a ptime + ++itr; + if(*itr == 'P') { + // skip leading whitespace + while((sitr != stream_end) && std::isspace(*sitr)) { ++sitr; } + // parse zone + while((sitr != stream_end) && (!std::isspace(*sitr))) { + tz_str += *sitr; + ++sitr; + } + } + else { + use_current_format_char = true; + } + + } + else { + // nothing was parsed so we don't want to advance sitr + use_current_char = true; + } + + break; + } + default: + {} // ignore what we don't understand? + }// switch + } + else { // itr == '%', second consecutive + ++sitr; + } + + if(use_current_format_char) { + use_current_format_char = false; + } + else { + ++itr; //advance past format specifier + } + + } + else { //skip past chars in format and in buffer + ++itr; + // set use_current_char when sitr is already + // pointing at the next character to process + if (use_current_char) { + use_current_char = false; + } + else { + ++sitr; + } + } + } + + date_type d(not_a_date_time); + if (day_of_year > 0) { + d = date_type(static_cast(t_year-1),12,31) + date_duration_type(day_of_year); + } + else { + d = date_type(t_year, t_month, t_day); + } + + time_duration_type td(hour, min, sec, frac); + t = time_type(d, td); + return sitr; + } + + //! Helper function to check for special_value + /*! First character may have been consumed during original parse + * attempt. Parameter 'c' should be a copy of that character. + * Throws ios_base::failure if parse fails. */ + template + inline + InItrT check_special_value(InItrT& sitr,InItrT& stream_end, temporal_type& tt, char_type c='\0') const + { + match_results mr; + if((c == '-' || c == '+') && (*sitr != c)) { // was the first character consumed? + mr.cache += c; + } + this->m_sv_parser.match(sitr, stream_end, mr); + if(mr.current_match == match_results::PARSE_ERROR) { + std::string tmp = convert_string_type(mr.cache); + boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + tmp + "'")); + BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return sitr); // should never reach + } + tt = temporal_type(static_cast(mr.current_match)); + return sitr; + } + + //! Helper function for parsing a fractional second type from the stream + void parse_frac_type(InItrT& sitr, + InItrT& stream_end, + fracional_seconds_type& frac) const + { + string_type cache; + while((sitr != stream_end) && std::isdigit(*sitr)) { + cache += *sitr; + ++sitr; + } + if(cache.size() > 0) { + unsigned short precision = time_duration_type::num_fractional_digits(); + // input may be only the first few decimal places + if(cache.size() < precision) { + frac = lexical_cast(cache); + frac = decimal_adjust(frac, static_cast(precision - cache.size())); + } + else { + // if input has too many decimal places, drop excess digits + frac = lexical_cast(cache.substr(0, precision)); + } + } + } + + private: + string_type m_time_duration_format; + + //! Helper function to adjust trailing zeros when parsing fractional digits + template + inline + int_type decimal_adjust(int_type val, const unsigned short places) const + { + unsigned long factor = 1; + for(int i = 0; i < places; ++i){ + factor *= 10; // shift decimal to the right + } + return val * factor; + } + + }; + +template + std::locale::id time_input_facet::id; + +template + const typename time_input_facet::char_type* + time_input_facet::fractional_seconds_format = time_formats::fractional_seconds_format; + + template + const typename time_input_facet::char_type* + time_input_facet::fractional_seconds_or_none_format = time_formats::fractional_seconds_or_none_format; + + template + const typename time_input_facet::char_type* + time_input_facet::seconds_with_fractional_seconds_format = time_formats::seconds_with_fractional_seconds_format; + + template + const typename time_input_facet::char_type* + time_input_facet::seconds_format = time_formats::seconds_format; + + template + const typename time_input_facet::char_type* + time_input_facet::standard_format = time_formats::standard_format; + + template + const typename time_input_facet::char_type* + time_input_facet::zone_abbrev_format = time_formats::zone_abbrev_format; + + template + const typename time_input_facet::char_type* + time_input_facet::zone_name_format = time_formats::zone_name_format; + + template + const typename time_input_facet::char_type* + time_input_facet::zone_iso_format = time_formats::zone_iso_format; + + template + const typename time_input_facet::char_type* + time_input_facet::zone_iso_extended_format = time_formats::zone_iso_extended_format; + + template + const typename time_input_facet::char_type* + time_input_facet::duration_seperator = time_formats::duration_seperator; + + template + const typename time_input_facet::char_type* + time_input_facet::iso_time_format_specifier = time_formats::iso_time_format_specifier; + + template + const typename time_input_facet::char_type* + time_input_facet::iso_time_format_extended_specifier = time_formats::iso_time_format_extended_specifier; + + template + const typename time_input_facet::char_type* + time_input_facet::default_time_input_format = time_formats::default_time_input_format; + + template + const typename time_input_facet::char_type* + time_input_facet::default_time_duration_format = time_formats::default_time_duration_format; + + +} } // namespaces + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_formatting_streams.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_formatting_streams.hpp new file mode 100644 index 0000000000..3537c103cc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_formatting_streams.hpp @@ -0,0 +1,122 @@ +#ifndef DATE_TIME_TIME_FORMATTING_STREAMS_HPP___ +#define DATE_TIME_TIME_FORMATTING_STREAMS_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +#include + +#ifndef BOOST_DATE_TIME_NO_LOCALE + +#include +#include +#include +#include +#include + +namespace boost { +namespace date_time { + + + //! Put a time type into a stream using appropriate facets + template + class ostream_time_duration_formatter + { + public: + typedef std::basic_ostream ostream_type; + typedef typename time_duration_type::fractional_seconds_type fractional_seconds_type; + + //! Put time into an ostream + static void duration_put(const time_duration_type& td, + ostream_type& os) + { + if(td.is_special()) { + os << td.get_rep(); + } + else { + charT fill_char = '0'; + if(td.is_negative()) { + os << '-'; + } + os << std::setw(2) << std::setfill(fill_char) + << absolute_value(td.hours()) << ":"; + os << std::setw(2) << std::setfill(fill_char) + << absolute_value(td.minutes()) << ":"; + os << std::setw(2) << std::setfill(fill_char) + << absolute_value(td.seconds()); + fractional_seconds_type frac_sec = + absolute_value(td.fractional_seconds()); + if (frac_sec != 0) { + os << "." + << std::setw(time_duration_type::num_fractional_digits()) + << std::setfill(fill_char) + << frac_sec; + } + } // else + } // duration_put + }; //class ostream_time_duration_formatter + + //! Put a time type into a stream using appropriate facets + template + class ostream_time_formatter + { + public: + typedef std::basic_ostream ostream_type; + typedef typename time_type::date_type date_type; + typedef typename time_type::time_duration_type time_duration_type; + typedef ostream_time_duration_formatter duration_formatter; + + //! Put time into an ostream + static void time_put(const time_type& t, + ostream_type& os) + { + date_type d = t.date(); + os << d; + if(!d.is_infinity() && !d.is_not_a_date()) + { + os << " "; //TODO: fix the separator here. + duration_formatter::duration_put(t.time_of_day(), os); + } + + } // time_to_ostream + }; //class ostream_time_formatter + + + //! Put a time period into a stream using appropriate facets + template + class ostream_time_period_formatter + { + public: + typedef std::basic_ostream ostream_type; + typedef typename time_period_type::point_type time_type; + typedef ostream_time_formatter time_formatter; + + //! Put time into an ostream + static void period_put(const time_period_type& tp, + ostream_type& os) + { + os << '['; //TODO: facet or manipulator for periods? + time_formatter::time_put(tp.begin(), os); + os << '/'; //TODO: facet or manipulator for periods? + time_formatter::time_put(tp.last(), os); + os << ']'; + + } // period_put + + }; //class ostream_time_period_formatter + + + +} } //namespace date_time + +#endif //BOOST_DATE_TIME_NO_LOCALE + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_iterator.hpp new file mode 100644 index 0000000000..2258a3308e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_iterator.hpp @@ -0,0 +1,52 @@ +#ifndef DATE_TIME_TIME_ITERATOR_HPP___ +#define DATE_TIME_TIME_ITERATOR_HPP___ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + +namespace boost { +namespace date_time { + + + //! Simple time iterator skeleton class + template + class time_itr { + public: + typedef typename time_type::time_duration_type time_duration_type; + time_itr(time_type t, time_duration_type d) : current_(t), offset_(d) {}; + time_itr& operator++() + { + current_ = current_ + offset_; + return *this; + } + time_itr& operator--() + { + current_ = current_ - offset_; + return *this; + } + time_type operator*() {return current_;}; + time_type* operator->() {return ¤t_;}; + bool operator< (const time_type& t) {return current_ < t;}; + bool operator<= (const time_type& t) {return current_ <= t;}; + bool operator!= (const time_type& t) {return current_ != t;}; + bool operator== (const time_type& t) {return current_ == t;}; + bool operator> (const time_type& t) {return current_ > t;}; + bool operator>= (const time_type& t) {return current_ >= t;}; + + private: + time_type current_; + time_duration_type offset_; + }; + + + +} }//namespace date_time + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_parsing.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_parsing.hpp new file mode 100644 index 0000000000..dfccf6a1df --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_parsing.hpp @@ -0,0 +1,321 @@ +#ifndef _DATE_TIME_TIME_PARSING_HPP___ +#define _DATE_TIME_TIME_PARSING_HPP___ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include "boost/tokenizer.hpp" +#include "boost/lexical_cast.hpp" +#include "boost/date_time/date_parsing.hpp" +#include "boost/cstdint.hpp" +#include + +namespace boost { +namespace date_time { + + //! computes exponential math like 2^8 => 256, only works with positive integers + //Not general purpose, but needed b/c std::pow is not available + //everywehere. Hasn't been tested with negatives and zeros + template + inline + int_type power(int_type base, int_type exponent) + { + int_type result = 1; + for(int i = 0; i < exponent; ++i){ + result *= base; + } + return result; + } + + //! Creates a time_duration object from a delimited string + /*! Expected format for string is "[-]h[h][:mm][:ss][.fff]". + * If the number of fractional digits provided is greater than the + * precision of the time duration type then the extra digits are + * truncated. + * + * A negative duration will be created if the first character in + * string is a '-', all other '-' will be treated as delimiters. + * Accepted delimiters are "-:,.". + */ + template + inline + time_duration + str_from_delimited_time_duration(const std::basic_string& s) + { + unsigned short min=0, sec =0; + int hour =0; + bool is_neg = (s.at(0) == '-'); + boost::int64_t fs=0; + int pos = 0; + + typedef typename std::basic_string::traits_type traits_type; + typedef boost::char_separator char_separator_type; + typedef boost::tokenizer::const_iterator, + std::basic_string > tokenizer; + typedef typename boost::tokenizer::const_iterator, + typename std::basic_string >::iterator tokenizer_iterator; + + char_type sep_chars[5] = {'-',':',',','.'}; + char_separator_type sep(sep_chars); + tokenizer tok(s,sep); + for(tokenizer_iterator beg=tok.begin(); beg!=tok.end();++beg){ + switch(pos) { + case 0: { + hour = boost::lexical_cast(*beg); + break; + } + case 1: { + min = boost::lexical_cast(*beg); + break; + } + case 2: { + sec = boost::lexical_cast(*beg); + break; + }; + case 3: { + int digits = static_cast(beg->length()); + //Works around a bug in MSVC 6 library that does not support + //operator>> thus meaning lexical_cast will fail to compile. +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + // msvc wouldn't compile 'time_duration::num_fractional_digits()' + // (required template argument list) as a workaround a temp + // time_duration object was used + time_duration td(hour,min,sec,fs); + int precision = td.num_fractional_digits(); + // _atoi64 is an MS specific function + if(digits >= precision) { + // drop excess digits + fs = _atoi64(beg->substr(0, precision).c_str()); + } + else { + fs = _atoi64(beg->c_str()); + } +#else + int precision = time_duration::num_fractional_digits(); + if(digits >= precision) { + // drop excess digits + fs = boost::lexical_cast(beg->substr(0, precision)); + } + else { + fs = boost::lexical_cast(*beg); + } +#endif + if(digits < precision){ + // trailing zeros get dropped from the string, + // "1:01:01.1" would yield .000001 instead of .100000 + // the power() compensates for the missing decimal places + fs *= power(10, precision - digits); + } + + break; + } + }//switch + pos++; + } + if(is_neg) { + return -time_duration(hour, min, sec, fs); + } + else { + return time_duration(hour, min, sec, fs); + } + } + + //! Creates a time_duration object from a delimited string + /*! Expected format for string is "[-]h[h][:mm][:ss][.fff]". + * If the number of fractional digits provided is greater than the + * precision of the time duration type then the extra digits are + * truncated. + * + * A negative duration will be created if the first character in + * string is a '-', all other '-' will be treated as delimiters. + * Accepted delimiters are "-:,.". + */ + template + inline + time_duration + parse_delimited_time_duration(const std::string& s) + { + return str_from_delimited_time_duration(s); + } + + //! Utility function to split appart string + inline + bool + split(const std::string& s, + char sep, + std::string& first, + std::string& second) + { + int sep_pos = static_cast(s.find(sep)); + first = s.substr(0,sep_pos); + second = s.substr(sep_pos+1); + return true; + } + + + template + inline + time_type + parse_delimited_time(const std::string& s, char sep) + { + typedef typename time_type::time_duration_type time_duration; + typedef typename time_type::date_type date_type; + + //split date/time on a unique delimiter char such as ' ' or 'T' + std::string date_string, tod_string; + split(s, sep, date_string, tod_string); + //call parse_date with first string + date_type d = parse_date(date_string); + //call parse_time_duration with remaining string + time_duration td = parse_delimited_time_duration(tod_string); + //construct a time + return time_type(d, td); + + } + + //! Parse time duration part of an iso time of form: [-]hhmmss[.fff...] (eg: 120259.123 is 12 hours, 2 min, 59 seconds, 123000 microseconds) + template + inline + time_duration + parse_undelimited_time_duration(const std::string& s) + { + int precision = 0; + { + // msvc wouldn't compile 'time_duration::num_fractional_digits()' + // (required template argument list) as a workaround, a temp + // time_duration object was used + time_duration tmp(0,0,0,1); + precision = tmp.num_fractional_digits(); + } + // 'precision+1' is so we grab all digits, plus the decimal + int offsets[] = {2,2,2, precision+1}; + int pos = 0, sign = 0; + int hours = 0; + short min=0, sec=0; + boost::int64_t fs=0; + // increment one position if the string was "signed" + if(s.at(sign) == '-') + { + ++sign; + } + // stlport choked when passing s.substr() to tokenizer + // using a new string fixed the error + std::string remain = s.substr(sign); + /* We do not want the offset_separator to wrap the offsets, we + * will never want to process more than: + * 2 char, 2 char, 2 char, frac_sec length. + * We *do* want the offset_separator to give us a partial for the + * last characters if there were not enough provided in the input string. */ + bool wrap_off = false; + bool ret_part = true; + boost::offset_separator osf(offsets, offsets+4, wrap_off, ret_part); + typedef boost::tokenizer::const_iterator, + std::basic_string > tokenizer; + typedef boost::tokenizer::const_iterator, + std::basic_string >::iterator tokenizer_iterator; + tokenizer tok(remain, osf); + for(tokenizer_iterator ti=tok.begin(); ti!=tok.end();++ti){ + switch(pos) { + case 0: + { + hours = boost::lexical_cast(*ti); + break; + } + case 1: + { + min = boost::lexical_cast(*ti); + break; + } + case 2: + { + sec = boost::lexical_cast(*ti); + break; + } + case 3: + { + std::string char_digits(ti->substr(1)); // digits w/no decimal + int digits = static_cast(char_digits.length()); + + //Works around a bug in MSVC 6 library that does not support + //operator>> thus meaning lexical_cast will fail to compile. +#if (defined(BOOST_MSVC) && (_MSC_VER <= 1200)) // 1200 == VC++ 6.0 + // _atoi64 is an MS specific function + if(digits >= precision) { + // drop excess digits + fs = _atoi64(char_digits.substr(0, precision).c_str()); + } + else if(digits == 0) { + fs = 0; // just in case _atoi64 doesn't like an empty string + } + else { + fs = _atoi64(char_digits.c_str()); + } +#else + if(digits >= precision) { + // drop excess digits + fs = boost::lexical_cast(char_digits.substr(0, precision)); + } + else if(digits == 0) { + fs = 0; // lexical_cast doesn't like empty strings + } + else { + fs = boost::lexical_cast(char_digits); + } +#endif + if(digits < precision){ + // trailing zeros get dropped from the string, + // "1:01:01.1" would yield .000001 instead of .100000 + // the power() compensates for the missing decimal places + fs *= power(10, precision - digits); + } + + break; + } + }; + pos++; + } + if(sign) { + return -time_duration(hours, min, sec, fs); + } + else { + return time_duration(hours, min, sec, fs); + } + } + + //! Parse time string of form YYYYMMDDThhmmss where T is delimeter between date and time + template + inline + time_type + parse_iso_time(const std::string& s, char sep) + { + typedef typename time_type::time_duration_type time_duration; + typedef typename time_type::date_type date_type; + + //split date/time on a unique delimiter char such as ' ' or 'T' + std::string date_string, tod_string; + split(s, sep, date_string, tod_string); + //call parse_date with first string + date_type d = parse_undelimited_date(date_string); + //call parse_time_duration with remaining string + time_duration td = parse_undelimited_time_duration(tod_string); + //construct a time + return time_type(d, td); + } + + + +} }//namespace date_time + + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_resolution_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_resolution_traits.hpp new file mode 100644 index 0000000000..658f3d207c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_resolution_traits.hpp @@ -0,0 +1,144 @@ +#ifndef DATE_TIME_TIME_RESOLUTION_TRAITS_HPP +#define DATE_TIME_TIME_RESOLUTION_TRAITS_HPP + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2009-06-06 07:25:55 -0400 (Sat, 06 Jun 2009) $ + */ + + +#include +#include +#include +#include + +namespace boost { +namespace date_time { + + //! Simple function to calculate absolute value of a numeric type + template + // JDG [7/6/02 made a template], + // moved here from time_duration.hpp 2003-Sept-4. + inline T absolute_value(T x) + { + return x < 0 ? -x : x; + } + + //! traits struct for time_resolution_traits implementation type + struct time_resolution_traits_bi32_impl { + typedef boost::int32_t int_type; + typedef boost::int32_t impl_type; + static int_type as_number(impl_type i){ return i;} + //! Used to determine if implemented type is int_adapter or int + static bool is_adapted() { return false;} + }; + //! traits struct for time_resolution_traits implementation type + struct time_resolution_traits_adapted32_impl { + typedef boost::int32_t int_type; + typedef boost::date_time::int_adapter impl_type; + static int_type as_number(impl_type i){ return i.as_number();} + //! Used to determine if implemented type is int_adapter or int + static bool is_adapted() { return true;} + }; + //! traits struct for time_resolution_traits implementation type + struct time_resolution_traits_bi64_impl { + typedef boost::int64_t int_type; + typedef boost::int64_t impl_type; + static int_type as_number(impl_type i){ return i;} + //! Used to determine if implemented type is int_adapter or int + static bool is_adapted() { return false;} + }; + //! traits struct for time_resolution_traits implementation type + struct time_resolution_traits_adapted64_impl { + typedef boost::int64_t int_type; + typedef boost::date_time::int_adapter impl_type; + static int_type as_number(impl_type i){ return i.as_number();} + //! Used to determine if implemented type is int_adapter or int + static bool is_adapted() { return true;} + }; + + template + class time_resolution_traits { + public: + typedef typename frac_sec_type::int_type fractional_seconds_type; + typedef typename frac_sec_type::int_type tick_type; + typedef typename frac_sec_type::impl_type impl_type; + typedef v_type day_type; + typedef v_type hour_type; + typedef v_type min_type; + typedef v_type sec_type; + + // bring in function from frac_sec_type traits structs + static fractional_seconds_type as_number(impl_type i) + { + return frac_sec_type::as_number(i); + } + static bool is_adapted() + { + return frac_sec_type::is_adapted(); + } + + //Would like this to be frac_sec_type, but some compilers complain +#if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) + BOOST_STATIC_CONSTANT(boost::int64_t, ticks_per_second = resolution_adjust); +#else + BOOST_STATIC_CONSTANT(fractional_seconds_type, ticks_per_second = resolution_adjust); +#endif + + static time_resolutions resolution() + { + return res; + } + static unsigned short num_fractional_digits() + { + return frac_digits; + } + static fractional_seconds_type res_adjust() + { + return resolution_adjust; + } + //! Any negative argument results in a negative tick_count + static tick_type to_tick_count(hour_type hours, + min_type minutes, + sec_type seconds, + fractional_seconds_type fs) + { + if(hours < 0 || minutes < 0 || seconds < 0 || fs < 0) + { + hours = absolute_value(hours); + minutes = absolute_value(minutes); + seconds = absolute_value(seconds); + fs = absolute_value(fs); + return (((((fractional_seconds_type(hours)*3600) + + (fractional_seconds_type(minutes)*60) + + seconds)*res_adjust()) + fs) * -1); + } + + return (((fractional_seconds_type(hours)*3600) + + (fractional_seconds_type(minutes)*60) + + seconds)*res_adjust()) + fs; + } + + }; + + typedef time_resolution_traits milli_res; + typedef time_resolution_traits micro_res; + typedef time_resolution_traits nano_res; + + +} } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_system_counted.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_system_counted.hpp new file mode 100644 index 0000000000..fa883907eb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_system_counted.hpp @@ -0,0 +1,254 @@ +#ifndef DATE_TIME_TIME_SYSTEM_COUNTED_HPP +#define DATE_TIME_TIME_SYSTEM_COUNTED_HPP + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + + +#include "boost/date_time/time_defs.hpp" +#include + + +namespace boost { +namespace date_time { + + //! Time representation that uses a single integer count + template + struct counted_time_rep + { + typedef typename config::int_type int_type; + typedef typename config::date_type date_type; + typedef typename config::impl_type impl_type; + typedef typename date_type::duration_type date_duration_type; + typedef typename date_type::calendar_type calendar_type; + typedef typename date_type::ymd_type ymd_type; + typedef typename config::time_duration_type time_duration_type; + typedef typename config::resolution_traits resolution_traits; + + counted_time_rep(const date_type& d, const time_duration_type& time_of_day) + : time_count_(1) + { + if(d.is_infinity() || d.is_not_a_date() || time_of_day.is_special()) { + time_count_ = time_of_day.get_rep() + d.day_count(); + //std::cout << time_count_ << std::endl; + } + else { + time_count_ = (d.day_number() * frac_sec_per_day()) + time_of_day.ticks(); + } + } + explicit counted_time_rep(int_type count) : + time_count_(count) + {} + explicit counted_time_rep(impl_type count) : + time_count_(count) + {} + date_type date() const + { + if(time_count_.is_special()) { + return date_type(time_count_.as_special()); + } + else { + typename calendar_type::date_int_type dc = day_count(); + //std::cout << "time_rep here:" << dc << std::endl; + ymd_type ymd = calendar_type::from_day_number(dc); + return date_type(ymd); + } + } + //int_type day_count() const + unsigned long day_count() const + { + /* resolution_traits::as_number returns a boost::int64_t & + * frac_sec_per_day is also a boost::int64_t so, naturally, + * the division operation returns a boost::int64_t. + * The static_cast to an unsigned long is ok (results in no data loss) + * because frac_sec_per_day is either the number of + * microseconds per day, or the number of nanoseconds per day. + * Worst case scenario: resolution_traits::as_number returns the + * maximum value an int64_t can hold and frac_sec_per_day + * is microseconds per day (lowest possible value). + * The division operation will then return a value of 106751991 - + * easily fitting in an unsigned long. + */ + return static_cast(resolution_traits::as_number(time_count_) / frac_sec_per_day()); + } + int_type time_count() const + { + return resolution_traits::as_number(time_count_); + } + int_type tod() const + { + return resolution_traits::as_number(time_count_) % frac_sec_per_day(); + } + static int_type frac_sec_per_day() + { + int_type seconds_per_day = 60*60*24; + int_type fractional_sec_per_sec(resolution_traits::res_adjust()); + return seconds_per_day*fractional_sec_per_sec; + } + bool is_pos_infinity()const + { + return impl_type::is_pos_inf(time_count_.as_number()); + } + bool is_neg_infinity()const + { + return impl_type::is_neg_inf(time_count_.as_number()); + } + bool is_not_a_date_time()const + { + return impl_type::is_not_a_number(time_count_.as_number()); + } + bool is_special()const + { + return time_count_.is_special(); + } + impl_type get_rep()const + { + return time_count_; + } + private: + impl_type time_count_; + }; + + //! An unadjusted time system implementation. + template + class counted_time_system + { + public: + typedef time_rep time_rep_type; + typedef typename time_rep_type::impl_type impl_type; + typedef typename time_rep_type::time_duration_type time_duration_type; + typedef typename time_duration_type::fractional_seconds_type fractional_seconds_type; + typedef typename time_rep_type::date_type date_type; + typedef typename time_rep_type::date_duration_type date_duration_type; + + + template static void unused_var(const T&) {} + + static time_rep_type get_time_rep(const date_type& day, + const time_duration_type& tod, + date_time::dst_flags dst=not_dst) + { + unused_var(dst); + return time_rep_type(day, tod); + } + + static time_rep_type get_time_rep(special_values sv) + { + switch (sv) { + case not_a_date_time: + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + case pos_infin: + return time_rep_type(date_type(pos_infin), + time_duration_type(pos_infin)); + case neg_infin: + return time_rep_type(date_type(neg_infin), + time_duration_type(neg_infin)); + case max_date_time: { + time_duration_type td = time_duration_type(24,0,0,0) - time_duration_type(0,0,0,1); + return time_rep_type(date_type(max_date_time), td); + } + case min_date_time: + return time_rep_type(date_type(min_date_time), time_duration_type(0,0,0,0)); + + default: + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + + } + + } + + static date_type get_date(const time_rep_type& val) + { + return val.date(); + } + static time_duration_type get_time_of_day(const time_rep_type& val) + { + if(val.is_special()) { + return time_duration_type(val.get_rep().as_special()); + } + else{ + return time_duration_type(0,0,0,val.tod()); + } + } + static std::string zone_name(const time_rep_type&) + { + return ""; + } + static bool is_equal(const time_rep_type& lhs, const time_rep_type& rhs) + { + return (lhs.time_count() == rhs.time_count()); + } + static bool is_less(const time_rep_type& lhs, const time_rep_type& rhs) + { + return (lhs.time_count() < rhs.time_count()); + } + static time_rep_type add_days(const time_rep_type& base, + const date_duration_type& dd) + { + if(base.is_special() || dd.is_special()) { + return(time_rep_type(base.get_rep() + dd.get_rep())); + } + else { + return time_rep_type(base.time_count() + (dd.days() * time_rep_type::frac_sec_per_day())); + } + } + static time_rep_type subtract_days(const time_rep_type& base, + const date_duration_type& dd) + { + if(base.is_special() || dd.is_special()) { + return(time_rep_type(base.get_rep() - dd.get_rep())); + } + else{ + return time_rep_type(base.time_count() - (dd.days() * time_rep_type::frac_sec_per_day())); + } + } + static time_rep_type subtract_time_duration(const time_rep_type& base, + const time_duration_type& td) + { + if(base.is_special() || td.is_special()) { + return(time_rep_type(base.get_rep() - td.get_rep())); + } + else { + return time_rep_type(base.time_count() - td.ticks()); + } + } + static time_rep_type add_time_duration(const time_rep_type& base, + time_duration_type td) + { + if(base.is_special() || td.is_special()) { + return(time_rep_type(base.get_rep() + td.get_rep())); + } + else { + return time_rep_type(base.time_count() + td.ticks()); + } + } + static time_duration_type subtract_times(const time_rep_type& lhs, + const time_rep_type& rhs) + { + if(lhs.is_special() || rhs.is_special()) { + return(time_duration_type( + impl_type::to_special((lhs.get_rep() - rhs.get_rep()).as_number()))); + } + else { + fractional_seconds_type fs = lhs.time_count() - rhs.time_count(); + return time_duration_type(0,0,0,fs); + } + } + + }; + + +} } //namespace date_time + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_system_split.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_system_split.hpp new file mode 100644 index 0000000000..08ea1ec2d1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_system_split.hpp @@ -0,0 +1,207 @@ +#ifndef DATE_TIME_TIME_SYSTEM_SPLIT_HPP +#define DATE_TIME_TIME_SYSTEM_SPLIT_HPP + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-13 15:10:23 -0500 (Thu, 13 Nov 2008) $ + */ + + +#include +#include "boost/date_time/compiler_config.hpp" +#include "boost/date_time/special_defs.hpp" + +namespace boost { +namespace date_time { + + //! An unadjusted time system implementation. +#if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) + template +#else + template +#endif + class split_timedate_system + { + public: + typedef typename config::time_rep_type time_rep_type; + typedef typename config::date_type date_type; + typedef typename config::time_duration_type time_duration_type; + typedef typename config::date_duration_type date_duration_type; + typedef typename config::int_type int_type; + typedef typename config::resolution_traits resolution_traits; + + //86400 is number of seconds in a day... +#if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) + typedef date_time::wrapping_int wrap_int_type; +#else + private: + BOOST_STATIC_CONSTANT(int_type, ticks_per_day = INT64_C(86400) * config::tick_per_second); + public: +# if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0X581) ) + typedef date_time::wrapping_int< split_timedate_system::int_type, split_timedate_system::ticks_per_day> wrap_int_type; +# else + typedef date_time::wrapping_int wrap_int_type; +#endif +#endif + + static time_rep_type get_time_rep(special_values sv) + { + switch (sv) { + case not_a_date_time: + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + case pos_infin: + return time_rep_type(date_type(pos_infin), + time_duration_type(pos_infin)); + case neg_infin: + return time_rep_type(date_type(neg_infin), + time_duration_type(neg_infin)); + case max_date_time: { + time_duration_type td = time_duration_type(24,0,0,0) - time_duration_type(0,0,0,1); + return time_rep_type(date_type(max_date_time), td); + } + case min_date_time: + return time_rep_type(date_type(min_date_time), time_duration_type(0,0,0,0)); + + default: + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + + } + + } + + static time_rep_type get_time_rep(const date_type& day, + const time_duration_type& tod, + date_time::dst_flags /* dst */ = not_dst) + { + if(day.is_special() || tod.is_special()) { + if(day.is_not_a_date() || tod.is_not_a_date_time()) { + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + } + else if(day.is_pos_infinity()) { + if(tod.is_neg_infinity()) { + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + } + else { + return time_rep_type(day, time_duration_type(pos_infin)); + } + } + else if(day.is_neg_infinity()) { + if(tod.is_pos_infinity()) { + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + } + else { + return time_rep_type(day, time_duration_type(neg_infin)); + } + } + else if(tod.is_pos_infinity()) { + if(day.is_neg_infinity()) { + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + } + else { + return time_rep_type(date_type(pos_infin), tod); + } + } + else if(tod.is_neg_infinity()) { + if(day.is_pos_infinity()) { + return time_rep_type(date_type(not_a_date_time), + time_duration_type(not_a_date_time)); + } + else { + return time_rep_type(date_type(neg_infin), tod); + } + } + } + return time_rep_type(day, tod); + } + static date_type get_date(const time_rep_type& val) + { + return date_type(val.day); + } + static time_duration_type get_time_of_day(const time_rep_type& val) + { + return time_duration_type(val.time_of_day); + } + static std::string zone_name(const time_rep_type&) + { + return std::string(); + } + static bool is_equal(const time_rep_type& lhs, const time_rep_type& rhs) + { + return ((lhs.day == rhs.day) && (lhs.time_of_day == rhs.time_of_day)); + } + static bool is_less(const time_rep_type& lhs, const time_rep_type& rhs) + { + if (lhs.day < rhs.day) return true; + if (lhs.day > rhs.day) return false; + return (lhs.time_of_day < rhs.time_of_day); + } + static time_rep_type add_days(const time_rep_type& base, + const date_duration_type& dd) + { + return time_rep_type(base.day+dd, base.time_of_day); + } + static time_rep_type subtract_days(const time_rep_type& base, + const date_duration_type& dd) + { + return split_timedate_system::get_time_rep(base.day-dd, base.time_of_day); + } + static time_rep_type subtract_time_duration(const time_rep_type& base, + const time_duration_type& td) + { + if(base.day.is_special() || td.is_special()) + { + return split_timedate_system::get_time_rep(base.day, -td); + } + if (td.is_negative()) { + time_duration_type td1 = td.invert_sign(); + return add_time_duration(base,td1); + } + + wrap_int_type day_offset(base.time_of_day.ticks()); + date_duration_type day_overflow(static_cast(day_offset.subtract(td.ticks()))); + + return time_rep_type(base.day-day_overflow, + time_duration_type(0,0,0,day_offset.as_int())); + } + static time_rep_type add_time_duration(const time_rep_type& base, + time_duration_type td) + { + if(base.day.is_special() || td.is_special()) { + return split_timedate_system::get_time_rep(base.day, td); + } + if (td.is_negative()) { + time_duration_type td1 = td.invert_sign(); + return subtract_time_duration(base,td1); + } + + wrap_int_type day_offset(base.time_of_day.ticks()); + date_duration_type day_overflow(static_cast< typename date_duration_type::duration_rep_type >(day_offset.add(td.ticks()))); + + return time_rep_type(base.day+day_overflow, + time_duration_type(0,0,0,day_offset.as_int())); + } + static time_duration_type subtract_times(const time_rep_type& lhs, + const time_rep_type& rhs) + { + date_duration_type dd = lhs.day - rhs.day; + time_duration_type td(dd.days()*24,0,0); //days * 24 hours + time_duration_type td2 = lhs.time_of_day - rhs.time_of_day; + return td+td2; + // return time_rep_type(base.day-dd, base.time_of_day); + } + + }; + +} } //namespace date_time + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_zone_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_zone_base.hpp new file mode 100644 index 0000000000..0d3cb903e6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_zone_base.hpp @@ -0,0 +1,99 @@ +#ifndef _DATE_TIME_TIME_ZONE_BASE__ +#define _DATE_TIME_TIME_ZONE_BASE__ + +/* Copyright (c) 2003-2005 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + + +#include +#include + +namespace boost { +namespace date_time { + + + + //! Interface class for dynamic time zones. + /*! This class represents the base interface for all timezone + * representations. Subclasses may provide different systems + * for identifying a particular zone. For example some may + * provide a geographical based zone construction while others + * may specify the offset from GMT. Another possible implementation + * would be to convert from POSIX timezone strings. Regardless of + * the construction technique, this is the interface that these + * time zone types must provide. + * + * Note that this class is intended to be used as a shared + * resource (hence the derivation from boost::counted_base. + */ + template + class time_zone_base { + public: + typedef CharT char_type; + typedef std::basic_string string_type; + typedef std::basic_ostringstream stringstream_type; + typedef typename time_type::date_type::year_type year_type; + typedef typename time_type::time_duration_type time_duration_type; + + time_zone_base() {}; + virtual ~time_zone_base() {}; + //!String for the timezone when in daylight savings (eg: EDT) + virtual string_type dst_zone_abbrev() const=0; + //!String for the zone when not in daylight savings (eg: EST) + virtual string_type std_zone_abbrev() const=0; + //!String for the timezone when in daylight savings (eg: Eastern Daylight Time) + virtual string_type dst_zone_name() const=0; + //!String for the zone when not in daylight savings (eg: Eastern Standard Time) + virtual string_type std_zone_name() const=0; + //! True if zone uses daylight savings adjustments otherwise false + virtual bool has_dst() const=0; + //! Local time that DST starts -- undefined if has_dst is false + virtual time_type dst_local_start_time(year_type y) const=0; + //! Local time that DST ends -- undefined if has_dst is false + virtual time_type dst_local_end_time(year_type y) const=0; + //! Base offset from UTC for zone (eg: -07:30:00) + virtual time_duration_type base_utc_offset() const=0; + //! Adjustment forward or back made while DST is in effect + virtual time_duration_type dst_offset() const=0; + //! Returns a POSIX time_zone string for this object + virtual string_type to_posix_string() const =0; + + private: + + }; + + + //! Structure which holds the time offsets associated with daylight savings time + /*! + *@param time_duration_type A type used to represent the offset + */ + template + class dst_adjustment_offsets + { + public: + dst_adjustment_offsets(const time_duration_type& dst_adjust, + const time_duration_type& dst_start_offset, + const time_duration_type& dst_end_offset) : + dst_adjust_(dst_adjust), + dst_start_offset_(dst_start_offset), + dst_end_offset_(dst_end_offset) + {} + + //! Amount DST adjusts the clock eg: plus one hour + time_duration_type dst_adjust_; + //! Time past midnight on start transition day that dst starts + time_duration_type dst_start_offset_; + //! Time past midnight on end transition day that dst ends + time_duration_type dst_end_offset_; + }; + + +} } //namespace date_time + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_zone_names.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_zone_names.hpp new file mode 100644 index 0000000000..05260c7162 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/time_zone_names.hpp @@ -0,0 +1,98 @@ +#ifndef DATE_TIME_TIME_ZONE_NAMES_HPP__ +#define DATE_TIME_TIME_ZONE_NAMES_HPP__ + +/* Copyright (c) 2002-2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +#include + +namespace boost { +namespace date_time { + + template + struct default_zone_names { + public: + typedef CharT char_type; + static const char_type standard_name[9]; + static const char_type standard_abbrev[11]; + static const char_type non_dst_identifier[7]; + }; + template + const typename default_zone_names::char_type + default_zone_names::standard_name[9] = + {'s','t','d','_','n','a','m','e'}; + + template + const typename default_zone_names::char_type + default_zone_names::standard_abbrev[11] = + {'s','t','d','_','a','b','b','r','e','v'}; + + template + const typename default_zone_names::char_type + default_zone_names::non_dst_identifier[7] = + {'n','o','-','d','s','t'}; + + //! Base type that holds various string names for timezone output. + /*! Class that holds various types of strings used for timezones. + * For example, for the western United States there is the full + * name: Pacific Standard Time and the abbreviated name: PST. + * During daylight savings there are additional names: + * Pacific Daylight Time and PDT. + *@parm CharT Allows class to support different character types + */ + template + class time_zone_names_base + { + public: + typedef std::basic_string string_type; + time_zone_names_base() : + std_zone_name_(default_zone_names::standard_name), + std_zone_abbrev_(default_zone_names::standard_abbrev), + dst_zone_name_(default_zone_names::non_dst_identifier), + dst_zone_abbrev_(default_zone_names::non_dst_identifier) + {} + time_zone_names_base(const string_type& std_zone_name_str, + const string_type& std_zone_abbrev_str, + const string_type& dst_zone_name_str, + const string_type& dst_zone_abbrev_str) : + std_zone_name_(std_zone_name_str), + std_zone_abbrev_(std_zone_abbrev_str), + dst_zone_name_(dst_zone_name_str), + dst_zone_abbrev_(dst_zone_abbrev_str) + {} + string_type dst_zone_abbrev() const + { + return dst_zone_abbrev_; + } + string_type std_zone_abbrev() const + { + return std_zone_abbrev_; + } + string_type dst_zone_name() const + { + return dst_zone_name_; + } + string_type std_zone_name() const + { + return std_zone_name_; + } + private: + string_type std_zone_name_; + string_type std_zone_abbrev_; + string_type dst_zone_name_; + string_type dst_zone_abbrev_; + + }; + + //! Specialization of timezone names for standard char. + //typedef time_zone_names_base time_zone_names; + +} } //namespace + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/tz_db_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/tz_db_base.hpp new file mode 100644 index 0000000000..2440115460 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/tz_db_base.hpp @@ -0,0 +1,378 @@ +#ifndef DATE_TIME_TZ_DB_BASE_HPP__ +#define DATE_TIME_TZ_DB_BASE_HPP__ + +/* Copyright (c) 2003-2005 CrystalClear Software, Inc. + * Subject to the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace date_time { + + //! Exception thrown when tz database cannot locate requested data file + class data_not_accessible : public std::logic_error + { + public: + data_not_accessible() : + std::logic_error(std::string("Unable to locate or access the required datafile.")) + {} + data_not_accessible(const std::string& filespec) : + std::logic_error(std::string("Unable to locate or access the required datafile. Filespec: " + filespec)) + {} + }; + + //! Exception thrown when tz database locates incorrect field structure in data file + class bad_field_count : public std::out_of_range + { + public: + bad_field_count(const std::string& s) : + std::out_of_range(s) + {} + }; + + //! Creates a database of time_zones from csv datafile + /*! The csv file containing the zone_specs used by the + * tz_db_base is intended to be customized by the + * library user. When customizing this file (or creating your own) the + * file must follow a specific format. + * + * This first line is expected to contain column headings and is therefore + * not processed by the tz_db_base. + * + * Each record (line) must have eleven fields. Some of those fields can + * be empty. Every field (even empty ones) must be enclosed in + * double-quotes. + * Ex: + * @code + * "America/Phoenix" <- string enclosed in quotes + * "" <- empty field + * @endcode + * + * Some fields represent a length of time. The format of these fields + * must be: + * @code + * "{+|-}hh:mm[:ss]" <- length-of-time format + * @endcode + * Where the plus or minus is mandatory and the seconds are optional. + * + * Since some time zones do not use daylight savings it is not always + * necessary for every field in a zone_spec to contain a value. All + * zone_specs must have at least ID and GMT offset. Zones that use + * daylight savings must have all fields filled except: + * STD ABBR, STD NAME, DST NAME. You should take note + * that DST ABBR is mandatory for zones that use daylight savings + * (see field descriptions for further details). + * + * ******* Fields and their description/details ********* + * + * ID: + * Contains the identifying string for the zone_spec. Any string will + * do as long as it's unique. No two ID's can be the same. + * + * STD ABBR: + * STD NAME: + * DST ABBR: + * DST NAME: + * These four are all the names and abbreviations used by the time + * zone being described. While any string will do in these fields, + * care should be taken. These fields hold the strings that will be + * used in the output of many of the local_time classes. + * Ex: + * @code + * time_zone nyc = tz_db.time_zone_from_region("America/New_York"); + * local_time ny_time(date(2004, Aug, 30), IS_DST, nyc); + * cout << ny_time.to_long_string() << endl; + * // 2004-Aug-30 00:00:00 Eastern Daylight Time + * cout << ny_time.to_short_string() << endl; + * // 2004-Aug-30 00:00:00 EDT + * @endcode + * + * NOTE: The exact format/function names may vary - see local_time + * documentation for further details. + * + * GMT offset: + * This is the number of hours added to utc to get the local time + * before any daylight savings adjustments are made. Some examples + * are: America/New_York offset -5 hours, & Africa/Cairo offset +2 hours. + * The format must follow the length-of-time format described above. + * + * DST adjustment: + * The amount of time added to gmt_offset when daylight savings is in + * effect. The format must follow the length-of-time format described + * above. + * + * DST Start Date rule: + * This is a specially formatted string that describes the day of year + * in which the transition take place. It holds three fields of it's own, + * separated by semicolons. + * The first field indicates the "nth" weekday of the month. The possible + * values are: 1 (first), 2 (second), 3 (third), 4 (fourth), 5 (fifth), + * and -1 (last). + * The second field indicates the day-of-week from 0-6 (Sun=0). + * The third field indicates the month from 1-12 (Jan=1). + * + * Examples are: "-1;5;9"="Last Friday of September", + * "2;1;3"="Second Monday of March" + * + * Start time: + * Start time is the number of hours past midnight, on the day of the + * start transition, the transition takes place. More simply put, the + * time of day the transition is made (in 24 hours format). The format + * must follow the length-of-time format described above with the + * exception that it must always be positive. + * + * DST End date rule: + * See DST Start date rule. The difference here is this is the day + * daylight savings ends (transition to STD). + * + * End time: + * Same as Start time. + */ + template + class tz_db_base { + public: + /* Having CharT as a template parameter created problems + * with posix_time::duration_from_string. Templatizing + * duration_from_string was not possible at this time, however, + * it should be possible in the future (when poor compilers get + * fixed or stop being used). + * Since this class was designed to use CharT as a parameter it + * is simply typedef'd here to ease converting in back to a + * parameter the future */ + typedef char char_type; + + typedef typename time_zone_type::base_type time_zone_base_type; + typedef typename time_zone_type::time_duration_type time_duration_type; + typedef time_zone_names_base time_zone_names; + typedef boost::date_time::dst_adjustment_offsets dst_adjustment_offsets; + typedef std::basic_string string_type; + + //! Constructs an empty database + tz_db_base() {} + + //! Process csv data file, may throw exceptions + /*! May throw data_not_accessible, or bad_field_count exceptions */ + void load_from_file(const std::string& pathspec) + { + string_type in_str; + std::string buff; + + std::ifstream ifs(pathspec.c_str()); + if(!ifs){ + boost::throw_exception(data_not_accessible(pathspec)); + } + std::getline(ifs, buff); // first line is column headings + + while( std::getline(ifs, buff)) { + parse_string(buff); + } + } + + //! returns true if record successfully added to map + /*! Takes a region name in the form of "America/Phoenix", and a + * time_zone object for that region. The id string must be a unique + * name that does not already exist in the database. */ + bool add_record(const string_type& region, + boost::shared_ptr tz) + { + typename map_type::value_type p(region, tz); + return (m_zone_map.insert(p)).second; + } + + //! Returns a time_zone object built from the specs for the given region + /*! Returns a time_zone object built from the specs for the given + * region. If region does not exist a local_time::record_not_found + * exception will be thrown */ + boost::shared_ptr + time_zone_from_region(const string_type& region) const + { + // get the record + typename map_type::const_iterator record = m_zone_map.find(region); + if(record == m_zone_map.end()){ + return boost::shared_ptr(); //null pointer + } + return record->second; + } + + //! Returns a vector of strings holding the time zone regions in the database + std::vector region_list() const + { + typedef std::vector vector_type; + vector_type regions; + typename map_type::const_iterator itr = m_zone_map.begin(); + while(itr != m_zone_map.end()) { + regions.push_back(itr->first); + ++itr; + } + return regions; + } + + private: + typedef std::map > map_type; + map_type m_zone_map; + + // start and end rule are of the same type + typedef typename rule_type::start_rule::week_num week_num; + + /* TODO: mechanisms need to be put in place to handle different + * types of rule specs. parse_rules() only handles nth_kday + * rule types. */ + + //! parses rule specs for transition day rules + rule_type* parse_rules(const string_type& sr, const string_type& er) const + { + using namespace gregorian; + // start and end rule are of the same type, + // both are included here for readability + typedef typename rule_type::start_rule start_rule; + typedef typename rule_type::end_rule end_rule; + + // these are: [start|end] nth, day, month + int s_nth = 0, s_d = 0, s_m = 0; + int e_nth = 0, e_d = 0, e_m = 0; + split_rule_spec(s_nth, s_d, s_m, sr); + split_rule_spec(e_nth, e_d, e_m, er); + + typename start_rule::week_num s_wn, e_wn; + s_wn = get_week_num(s_nth); + e_wn = get_week_num(e_nth); + + + return new rule_type(start_rule(s_wn, s_d, s_m), + end_rule(e_wn, e_d, e_m)); + } + //! helper function for parse_rules() + week_num get_week_num(int nth) const + { + typedef typename rule_type::start_rule start_rule; + switch(nth){ + case 1: + return start_rule::first; + case 2: + return start_rule::second; + case 3: + return start_rule::third; + case 4: + return start_rule::fourth; + case 5: + case -1: + return start_rule::fifth; + default: + // shouldn't get here - add error handling later + break; + } + return start_rule::fifth; // silence warnings + } + + //! splits the [start|end]_date_rule string into 3 ints + void split_rule_spec(int& nth, int& d, int& m, string_type rule) const + { + typedef boost::char_separator > char_separator_type; + typedef boost::tokenizer::const_iterator, + std::basic_string > tokenizer; + typedef boost::tokenizer::const_iterator, + std::basic_string >::iterator tokenizer_iterator; + + const char_type sep_char[] = { ';', '\0'}; + char_separator_type sep(sep_char); + tokenizer tokens(rule, sep); // 3 fields + + tokenizer_iterator tok_iter = tokens.begin(); + nth = std::atoi(tok_iter->c_str()); ++tok_iter; + d = std::atoi(tok_iter->c_str()); ++tok_iter; + m = std::atoi(tok_iter->c_str()); + } + + + //! Take a line from the csv, turn it into a time_zone_type. + /*! Take a line from the csv, turn it into a time_zone_type, + * and add it to the map. Zone_specs in csv file are expected to + * have eleven fields that describe the time zone. Returns true if + * zone_spec successfully added to database */ + bool parse_string(string_type& s) + { + std::vector result; + typedef boost::token_iterator_generator, string_type::const_iterator, string_type >::type token_iter_type; + + token_iter_type i = boost::make_token_iterator(s.begin(), s.end(),boost::escaped_list_separator()); + + token_iter_type end; + while (i != end) { + result.push_back(*i); + i++; + } + + enum db_fields { ID, STDABBR, STDNAME, DSTABBR, DSTNAME, GMTOFFSET, + DSTADJUST, START_DATE_RULE, START_TIME, END_DATE_RULE, + END_TIME, FIELD_COUNT }; + + //take a shot at fixing gcc 4.x error + const unsigned int expected_fields = static_cast(FIELD_COUNT); + if (result.size() != expected_fields) { + std::ostringstream msg; + msg << "Expecting " << FIELD_COUNT << " fields, got " + << result.size() << " fields in line: " << s; + boost::throw_exception(bad_field_count(msg.str())); + BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return false); // should never reach + } + + // initializations + bool has_dst = true; + if(result[DSTABBR] == std::string()){ + has_dst = false; + } + + + // start building components of a time_zone + time_zone_names names(result[STDNAME], result[STDABBR], + result[DSTNAME], result[DSTABBR]); + + time_duration_type utc_offset = + str_from_delimited_time_duration(result[GMTOFFSET]); + + dst_adjustment_offsets adjust(time_duration_type(0,0,0), + time_duration_type(0,0,0), + time_duration_type(0,0,0)); + + boost::shared_ptr rules; + + if(has_dst){ + adjust = dst_adjustment_offsets( + str_from_delimited_time_duration(result[DSTADJUST]), + str_from_delimited_time_duration(result[START_TIME]), + str_from_delimited_time_duration(result[END_TIME]) + ); + + rules = + boost::shared_ptr(parse_rules(result[START_DATE_RULE], + result[END_DATE_RULE])); + } + string_type id(result[ID]); + boost::shared_ptr zone(new time_zone_type(names, utc_offset, adjust, rules)); + return (add_record(id, zone)); + + } + + }; + +} } // namespace + +#endif // DATE_TIME_TZ_DB_BASE_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/wrapping_int.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/wrapping_int.hpp new file mode 100644 index 0000000000..969b078ac1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/wrapping_int.hpp @@ -0,0 +1,169 @@ +#ifndef _DATE_TIME_WRAPPING_INT_HPP__ +#define _DATE_TIME_WRAPPING_INT_HPP__ + +/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland, Bart Garst + * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + */ + + +namespace boost { +namespace date_time { + +//! A wrapping integer used to support time durations (WARNING: only instantiate with a signed type) +/*! In composite date and time types this type is used to + * wrap at the day boundary. + * Ex: + * A wrapping_int will roll over after nine, and + * roll under below zero. This gives a range of [0,9] + * + * NOTE: it is strongly recommended that wrapping_int2 be used + * instead of wrapping_int as wrapping_int is to be depricated + * at some point soon. + * + * Also Note that warnings will occur if instantiated with an + * unsigned type. Only a signed type should be used! + */ +template +class wrapping_int { +public: + typedef int_type_ int_type; + //typedef overflow_type_ overflow_type; + static int_type wrap_value() {return wrap_val;} + //!Add, return true if wrapped + wrapping_int(int_type v) : value_(v) {}; + //! Explicit converion method + int_type as_int() const {return value_;} + operator int_type() const {return value_;} + //!Add, return number of wraps performed + /*! The sign of the returned value will indicate which direction the + * wraps went. Ex: add a negative number and wrapping under could occur, + * this would be indicated by a negative return value. If wrapping over + * took place, a positive value would be returned */ + template< typename IntT > + IntT add(IntT v) + { + int_type remainder = static_cast(v % (wrap_val)); + IntT overflow = static_cast(v / (wrap_val)); + value_ = static_cast(value_ + remainder); + return calculate_wrap(overflow); + } + //! Subtract will return '+d' if wrapping under took place ('d' is the number of wraps) + /*! The sign of the returned value will indicate which direction the + * wraps went (positive indicates wrap under, negative indicates wrap over). + * Ex: subtract a negative number and wrapping over could + * occur, this would be indicated by a negative return value. If + * wrapping under took place, a positive value would be returned. */ + template< typename IntT > + IntT subtract(IntT v) + { + int_type remainder = static_cast(v % (wrap_val)); + IntT underflow = static_cast(-(v / (wrap_val))); + value_ = static_cast(value_ - remainder); + return calculate_wrap(underflow) * -1; + } +private: + int_type value_; + + template< typename IntT > + IntT calculate_wrap(IntT wrap) + { + if ((value_) >= wrap_val) + { + ++wrap; + value_ -= (wrap_val); + } + else if(value_ < 0) + { + --wrap; + value_ += (wrap_val); + } + return wrap; + } + +}; + + +//! A wrapping integer used to wrap around at the top (WARNING: only instantiate with a signed type) +/*! Bad name, quick impl to fix a bug -- fix later!! + * This allows the wrap to restart at a value other than 0. + */ +template +class wrapping_int2 { +public: + typedef int_type_ int_type; + static int_type wrap_value() {return wrap_max;} + static int_type min_value() {return wrap_min;} + /*! If initializing value is out of range of [wrap_min, wrap_max], + * value will be initialized to closest of min or max */ + wrapping_int2(int_type v) : value_(v) { + if(value_ < wrap_min) + { + value_ = wrap_min; + } + if(value_ > wrap_max) + { + value_ = wrap_max; + } + } + //! Explicit converion method + int_type as_int() const {return value_;} + operator int_type() const {return value_;} + //!Add, return number of wraps performed + /*! The sign of the returned value will indicate which direction the + * wraps went. Ex: add a negative number and wrapping under could occur, + * this would be indicated by a negative return value. If wrapping over + * took place, a positive value would be returned */ + template< typename IntT > + IntT add(IntT v) + { + int_type remainder = static_cast(v % (wrap_max - wrap_min + 1)); + IntT overflow = static_cast(v / (wrap_max - wrap_min + 1)); + value_ = static_cast(value_ + remainder); + return calculate_wrap(overflow); + } + //! Subtract will return '-d' if wrapping under took place ('d' is the number of wraps) + /*! The sign of the returned value will indicate which direction the + * wraps went. Ex: subtract a negative number and wrapping over could + * occur, this would be indicated by a positive return value. If + * wrapping under took place, a negative value would be returned */ + template< typename IntT > + IntT subtract(IntT v) + { + int_type remainder = static_cast(v % (wrap_max - wrap_min + 1)); + IntT underflow = static_cast(-(v / (wrap_max - wrap_min + 1))); + value_ = static_cast(value_ - remainder); + return calculate_wrap(underflow); + } + +private: + int_type value_; + + template< typename IntT > + IntT calculate_wrap(IntT wrap) + { + if ((value_) > wrap_max) + { + ++wrap; + value_ -= (wrap_max - wrap_min + 1); + } + else if((value_) < wrap_min) + { + --wrap; + value_ += (wrap_max - wrap_min + 1); + } + return wrap; + } +}; + + + +} } //namespace date_time + + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/date_time/year_month_day.hpp b/deal.II/contrib/boost-1.45.0/include/boost/date_time/year_month_day.hpp new file mode 100644 index 0000000000..802ce42eb9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/date_time/year_month_day.hpp @@ -0,0 +1,45 @@ +#ifndef YearMonthDayBase_HPP__ +#define YearMonthDayBase_HPP__ + +/* Copyright (c) 2002,2003 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ + */ + +namespace boost { +namespace date_time { + + //! Allow rapid creation of ymd triples of different types + template + struct year_month_day_base { + year_month_day_base(YearType year, + MonthType month, + DayType day); + YearType year; + MonthType month; + DayType day; + typedef YearType year_type; + typedef MonthType month_type; + typedef DayType day_type; + }; + + + //! A basic constructor + template + inline + year_month_day_base::year_month_day_base(YearType y, + MonthType m, + DayType d) : + year(y), + month(m), + day(d) + {} + +} }//namespace date_time + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/algorithm.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/algorithm.hpp new file mode 100644 index 0000000000..3f9297bcab --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/algorithm.hpp @@ -0,0 +1,82 @@ +// (C) Copyright Jeremy Siek 2001. +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef BOOST_ALGORITHM_HPP +# define BOOST_ALGORITHM_HPP +# include +// Algorithms on sequences +// +// The functions in this file have not yet gone through formal +// review, and are subject to change. This is a work in progress. +// They have been checked into the detail directory because +// there are some graph algorithms that use these functions. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + bool any_if(InputIterator first, InputIterator last, Predicate p) + { + return std::find_if(first, last, p) != last; + } + + template + bool any_if(const Container& c, Predicate p) + { + return any_if(boost::begin(c), boost::end(c), p); + } + + template + bool container_contains(InputIterator first, InputIterator last, T value) + { + return std::find(first, last, value) != last; + } + template + bool container_contains(const Container& c, const T& value) + { + return container_contains(boost::begin(c), boost::end(c), value); + } + +} // namespace boost + +#endif // BOOST_ALGORITHM_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/allocator_utilities.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/allocator_utilities.hpp new file mode 100644 index 0000000000..5d6ef48b05 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/allocator_utilities.hpp @@ -0,0 +1,212 @@ +/* Copyright 2003-2009 Joaquin M Lopez Munoz. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See Boost website at http://www.boost.org/ + */ + +#ifndef BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP +#define BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP + +#include /* keep it first to prevent nasty warns in MSVC */ +#include +#include +#include +#include +#include +#include +#include + +namespace boost{ + +namespace detail{ + +/* Allocator adaption layer. Some stdlibs provide allocators without rebind + * and template ctors. These facilities are simulated with the external + * template class rebind_to and the aid of partial_std_allocator_wrapper. + */ + +namespace allocator{ + +/* partial_std_allocator_wrapper inherits the functionality of a std + * allocator while providing a templatized ctor and other bits missing + * in some stdlib implementation or another. + */ + +template +class partial_std_allocator_wrapper:public std::allocator +{ +public: + /* Oddly enough, STLport does not define std::allocator::value_type + * when configured to work without partial template specialization. + * No harm in supplying the definition here unconditionally. + */ + + typedef Type value_type; + + partial_std_allocator_wrapper(){}; + + template + partial_std_allocator_wrapper(const partial_std_allocator_wrapper&){} + + partial_std_allocator_wrapper(const std::allocator& x): + std::allocator(x) + { + }; + +#if defined(BOOST_DINKUMWARE_STDLIB) + /* Dinkumware guys didn't provide a means to call allocate() without + * supplying a hint, in disagreement with the standard. + */ + + Type* allocate(std::size_t n,const void* hint=0) + { + std::allocator& a=*this; + return a.allocate(n,hint); + } +#endif + +}; + +/* Detects whether a given allocator belongs to a defective stdlib not + * having the required member templates. + * Note that it does not suffice to check the Boost.Config stdlib + * macros, as the user might have passed a custom, compliant allocator. + * The checks also considers partial_std_allocator_wrapper to be + * a standard defective allocator. + */ + +#if defined(BOOST_NO_STD_ALLOCATOR)&&\ + (defined(BOOST_HAS_PARTIAL_STD_ALLOCATOR)||defined(BOOST_DINKUMWARE_STDLIB)) + +template +struct is_partial_std_allocator +{ + BOOST_STATIC_CONSTANT(bool, + value= + (is_same< + std::allocator, + Allocator + >::value)|| + (is_same< + partial_std_allocator_wrapper< + BOOST_DEDUCED_TYPENAME Allocator::value_type>, + Allocator + >::value)); +}; + +#else + +template +struct is_partial_std_allocator +{ + BOOST_STATIC_CONSTANT(bool,value=false); +}; + +#endif + +/* rebind operations for defective std allocators */ + +template +struct partial_std_allocator_rebind_to +{ + typedef partial_std_allocator_wrapper type; +}; + +/* rebind operation in all other cases */ + +#if BOOST_WORKAROUND(BOOST_MSVC,<1300) +/* Workaround for a problem in MSVC with dependent template typedefs + * when doing rebinding of allocators. + * Modeled after (thanks, Aleksey!) + */ + +template +struct rebinder +{ + template struct fake_allocator:Allocator{}; + template<> struct fake_allocator + { + template struct rebind{}; + }; + + template + struct result: + fake_allocator::value>:: + template rebind + { + }; +}; +#else +template +struct rebinder +{ + template + struct result + { + typedef typename Allocator::BOOST_NESTED_TEMPLATE + rebind::other other; + }; +}; +#endif + +template +struct compliant_allocator_rebind_to +{ + typedef typename rebinder:: + BOOST_NESTED_TEMPLATE result::other type; +}; + +/* rebind front-end */ + +template +struct rebind_to: + mpl::eval_if_c< + is_partial_std_allocator::value, + partial_std_allocator_rebind_to, + compliant_allocator_rebind_to + > +{ +}; + +/* allocator-independent versions of construct and destroy */ + +template +void construct(void* p,const Type& t) +{ + new (p) Type(t); +} + +#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500)) +/* MSVC++ issues spurious warnings about unreferencend formal parameters + * in destroy when Type is a class with trivial dtor. + */ + +#pragma warning(push) +#pragma warning(disable:4100) +#endif + +template +void destroy(const Type* p) +{ + +#if BOOST_WORKAROUND(__SUNPRO_CC,BOOST_TESTED_AT(0x590)) + const_cast(p)->~Type(); +#else + p->~Type(); +#endif + +} + +#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500)) +#pragma warning(pop) +#endif + +} /* namespace boost::detail::allocator */ + +} /* namespace boost::detail */ + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/atomic_count.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/atomic_count.hpp new file mode 100644 index 0000000000..5411c7ae99 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/atomic_count.hpp @@ -0,0 +1,21 @@ +#ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED +#define BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/atomic_count.hpp - thread/SMP safe reference counter +// +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +#endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/binary_search.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/binary_search.hpp new file mode 100644 index 0000000000..3dca9b6509 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/binary_search.hpp @@ -0,0 +1,216 @@ +// Copyright (c) 2000 David Abrahams. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Copyright (c) 1994 +// Hewlett-Packard Company +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Hewlett-Packard Company makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// +// Copyright (c) 1996 +// Silicon Graphics Computer Systems, Inc. +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Silicon Graphics makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// +#ifndef BINARY_SEARCH_DWA_122600_H_ +# define BINARY_SEARCH_DWA_122600_H_ + +# include +# include + +namespace boost { namespace detail { + +template +ForwardIter lower_bound(ForwardIter first, ForwardIter last, + const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (*middle < val) { + first = middle; + ++first; + len = len - half - 1; + } + else + len = half; + } + return first; +} + +template +ForwardIter lower_bound(ForwardIter first, ForwardIter last, + const Tp& val, Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(*middle, val)) { + first = middle; + ++first; + len = len - half - 1; + } + else + len = half; + } + return first; +} + +template +ForwardIter upper_bound(ForwardIter first, ForwardIter last, + const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (val < *middle) + len = half; + else { + first = middle; + ++first; + len = len - half - 1; + } + } + return first; +} + +template +ForwardIter upper_bound(ForwardIter first, ForwardIter last, + const Tp& val, Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(val, *middle)) + len = half; + else { + first = middle; + ++first; + len = len - half - 1; + } + } + return first; +} + +template +std::pair +equal_range(ForwardIter first, ForwardIter last, const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle, left, right; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (*middle < val) { + first = middle; + ++first; + len = len - half - 1; + } + else if (val < *middle) + len = half; + else { + left = boost::detail::lower_bound(first, middle, val); + std::advance(first, len); + right = boost::detail::upper_bound(++middle, first, val); + return std::pair(left, right); + } + } + return std::pair(first, first); +} + +template +std::pair +equal_range(ForwardIter first, ForwardIter last, const Tp& val, + Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle, left, right; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(*middle, val)) { + first = middle; + ++first; + len = len - half - 1; + } + else if (comp(val, *middle)) + len = half; + else { + left = boost::detail::lower_bound(first, middle, val, comp); + std::advance(first, len); + right = boost::detail::upper_bound(++middle, first, val, comp); + return std::pair(left, right); + } + } + return std::pair(first, first); +} + +template +bool binary_search(ForwardIter first, ForwardIter last, + const Tp& val) { + ForwardIter i = boost::detail::lower_bound(first, last, val); + return i != last && !(val < *i); +} + +template +bool binary_search(ForwardIter first, ForwardIter last, + const Tp& val, + Compare comp) { + ForwardIter i = boost::detail::lower_bound(first, last, val, comp); + return i != last && !comp(val, *i); +} + +}} // namespace boost::detail + +#endif // BINARY_SEARCH_DWA_122600_H_ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/call_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/call_traits.hpp new file mode 100644 index 0000000000..6ad646ec60 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/call_traits.hpp @@ -0,0 +1,164 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// call_traits: defines typedefs for function usage +// (see libs/utility/call_traits.htm) + +/* Release notes: + 23rd July 2000: + Fixed array specialization. (JM) + Added Borland specific fixes for reference types + (issue raised by Steve Cleary). +*/ + +#ifndef BOOST_DETAIL_CALL_TRAITS_HPP +#define BOOST_DETAIL_CALL_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif +#include + +#include +#include +#include + +namespace boost{ + +namespace detail{ + +template +struct ct_imp2 +{ + typedef const T& param_type; +}; + +template +struct ct_imp2 +{ + typedef const T param_type; +}; + +template +struct ct_imp +{ + typedef const T& param_type; +}; + +template +struct ct_imp +{ + typedef typename ct_imp2::param_type param_type; +}; + +template +struct ct_imp +{ + typedef const T param_type; +}; + +} + +template +struct call_traits +{ +public: + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + // + // C++ Builder workaround: we should be able to define a compile time + // constant and pass that as a single template parameter to ct_imp, + // however compiler bugs prevent this - instead pass three bool's to + // ct_imp and add an extra partial specialisation + // of ct_imp to handle the logic. (JM) + typedef typename boost::detail::ct_imp< + T, + ::boost::is_pointer::value, + ::boost::is_arithmetic::value + >::param_type param_type; +}; + +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; + +#if BOOST_WORKAROUND( __BORLANDC__, < 0x5A0 ) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; + +template +struct call_traits< T * > +{ + typedef T * value_type; + typedef T * & reference; + typedef T * const & const_reference; + typedef T * const param_type; // hh removed const +}; +#endif +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template +struct call_traits +{ +private: + typedef T array_type[N]; +public: + // degrades array to pointer: + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; + +template +struct call_traits +{ +private: + typedef const T array_type[N]; +public: + // degrades array to pointer: + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; +#endif + +} + +#endif // BOOST_DETAIL_CALL_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/catch_exceptions.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/catch_exceptions.hpp new file mode 100644 index 0000000000..b1a3c76b2a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/catch_exceptions.hpp @@ -0,0 +1,146 @@ +// boost/catch_exceptions.hpp -----------------------------------------------// + +// Copyright Beman Dawes 1995-2001. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/test for documentation. + +// Revision History +// 13 Jun 01 report_exception() made inline. (John Maddock, Jesse Jones) +// 26 Feb 01 Numerous changes suggested during formal review. (Beman) +// 25 Jan 01 catch_exceptions.hpp code factored out of cpp_main.cpp. +// 22 Jan 01 Remove test_tools dependencies to reduce coupling. +// 5 Nov 00 Initial boost version (Beman Dawes) + +#ifndef BOOST_CATCH_EXCEPTIONS_HPP +#define BOOST_CATCH_EXCEPTIONS_HPP + +// header dependencies are deliberately restricted to the standard library +// to reduce coupling to other boost libraries. +#include // for string +#include // for bad_alloc +#include // for bad_cast, bad_typeid +#include // for exception, bad_exception +#include // for std exception hierarchy +#include // for exit codes +# if __GNUC__ != 2 || __GNUC_MINOR__ > 96 +# include // for ostream +# else +# include // workaround GNU missing ostream header +# endif + +# if defined(__BORLANDC__) && (__BORLANDC__ <= 0x0551) +# define BOOST_BUILT_IN_EXCEPTIONS_MISSING_WHAT +# endif + +#if defined(MPW_CPLUS) && (MPW_CPLUS <= 0x890) +# define BOOST_BUILT_IN_EXCEPTIONS_MISSING_WHAT + namespace std { class bad_typeid { }; } +# endif + +namespace boost +{ + + namespace detail + { + // A separate reporting function was requested during formal review. + inline void report_exception( std::ostream & os, + const char * name, const char * info ) + { os << "\n** uncaught exception: " << name << " " << info << std::endl; } + } + + // catch_exceptions ------------------------------------------------------// + + template< class Generator > // Generator is function object returning int + int catch_exceptions( Generator function_object, + std::ostream & out, std::ostream & err ) + { + int result = 0; // quiet compiler warnings + bool exception_thrown = true; // avoid setting result for each excptn type + +#ifndef BOOST_NO_EXCEPTIONS + try + { +#endif + result = function_object(); + exception_thrown = false; +#ifndef BOOST_NO_EXCEPTIONS + } + + // As a result of hard experience with strangely interleaved output + // under some compilers, there is a lot of use of endl in the code below + // where a simple '\n' might appear to do. + + // The rules for catch & arguments are a bit different from function + // arguments (ISO 15.3 paragraphs 18 & 19). Apparently const isn't + // required, but it doesn't hurt and some programmers ask for it. + + catch ( const char * ex ) + { detail::report_exception( out, "", ex ); } + catch ( const std::string & ex ) + { detail::report_exception( out, "", ex.c_str() ); } + + // std:: exceptions + catch ( const std::bad_alloc & ex ) + { detail::report_exception( out, "std::bad_alloc:", ex.what() ); } + +# ifndef BOOST_BUILT_IN_EXCEPTIONS_MISSING_WHAT + catch ( const std::bad_cast & ex ) + { detail::report_exception( out, "std::bad_cast:", ex.what() ); } + catch ( const std::bad_typeid & ex ) + { detail::report_exception( out, "std::bad_typeid:", ex.what() ); } +# else + catch ( const std::bad_cast & ) + { detail::report_exception( out, "std::bad_cast", "" ); } + catch ( const std::bad_typeid & ) + { detail::report_exception( out, "std::bad_typeid", "" ); } +# endif + + catch ( const std::bad_exception & ex ) + { detail::report_exception( out, "std::bad_exception:", ex.what() ); } + catch ( const std::domain_error & ex ) + { detail::report_exception( out, "std::domain_error:", ex.what() ); } + catch ( const std::invalid_argument & ex ) + { detail::report_exception( out, "std::invalid_argument:", ex.what() ); } + catch ( const std::length_error & ex ) + { detail::report_exception( out, "std::length_error:", ex.what() ); } + catch ( const std::out_of_range & ex ) + { detail::report_exception( out, "std::out_of_range:", ex.what() ); } + catch ( const std::range_error & ex ) + { detail::report_exception( out, "std::range_error:", ex.what() ); } + catch ( const std::overflow_error & ex ) + { detail::report_exception( out, "std::overflow_error:", ex.what() ); } + catch ( const std::underflow_error & ex ) + { detail::report_exception( out, "std::underflow_error:", ex.what() ); } + catch ( const std::logic_error & ex ) + { detail::report_exception( out, "std::logic_error:", ex.what() ); } + catch ( const std::runtime_error & ex ) + { detail::report_exception( out, "std::runtime_error:", ex.what() ); } + catch ( const std::exception & ex ) + { detail::report_exception( out, "std::exception:", ex.what() ); } + + catch ( ... ) + { detail::report_exception( out, "unknown exception", "" ); } +#endif // BOOST_NO_EXCEPTIONS + + if ( exception_thrown ) result = boost::exit_exception_failure; + + if ( result != 0 && result != exit_success ) + { + out << std::endl << "**** returning with error code " + << result << std::endl; + err + << "********** errors detected; see stdout for details ***********" + << std::endl; + } +#if !defined(BOOST_NO_CPP_MAIN_SUCCESS_MESSAGE) + else { out << std::flush << "no errors detected" << std::endl; } +#endif + return result; + } // catch_exceptions + +} // boost + +#endif // BOOST_CATCH_EXCEPTIONS_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/compressed_pair.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/compressed_pair.hpp new file mode 100644 index 0000000000..3f326456ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/compressed_pair.hpp @@ -0,0 +1,443 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// compressed_pair: pair that "compresses" empty members +// (see libs/utility/compressed_pair.htm) +// +// JM changes 25 Jan 2004: +// For the case where T1 == T2 and both are empty, then first() and second() +// should return different objects. +// JM changes 25 Jan 2000: +// Removed default arguments from compressed_pair_switch to get +// C++ Builder 4 to accept them +// rewriten swap to get gcc and C++ builder to compile. +// added partial specialisations for case T1 == T2 to avoid duplicate constructor defs. + +#ifndef BOOST_DETAIL_COMPRESSED_PAIR_HPP +#define BOOST_DETAIL_COMPRESSED_PAIR_HPP + +#include + +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4512) +#endif +namespace boost +{ + +template +class compressed_pair; + + +// compressed_pair + +namespace details +{ + // JM altered 26 Jan 2000: + template + struct compressed_pair_switch; + + template + struct compressed_pair_switch + {static const int value = 0;}; + + template + struct compressed_pair_switch + {static const int value = 3;}; + + template + struct compressed_pair_switch + {static const int value = 1;}; + + template + struct compressed_pair_switch + {static const int value = 2;}; + + template + struct compressed_pair_switch + {static const int value = 4;}; + + template + struct compressed_pair_switch + {static const int value = 5;}; + + template class compressed_pair_imp; + +#ifdef __GNUC__ + // workaround for GCC (JM): + using std::swap; +#endif + // + // can't call unqualified swap from within classname::swap + // as Koenig lookup rules will find only the classname::swap + // member function not the global declaration, so use cp_swap + // as a forwarding function (JM): + template + inline void cp_swap(T& t1, T& t2) + { +#ifndef __GNUC__ + using std::swap; +#endif + swap(t1, t2); + } + + // 0 derive from neither + + template + class compressed_pair_imp + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_(x) {} + + compressed_pair_imp(second_param_type y) + : second_(y) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + cp_swap(second_, y.second()); + } + private: + first_type first_; + second_type second_; + }; + + // 1 derive from T1 + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x) {} + + compressed_pair_imp(second_param_type y) + : second_(y) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + // no need to swap empty base class: + cp_swap(second_, y.second()); + } + private: + second_type second_; + }; + + // 2 derive from T2 + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : second_type(y), first_(x) {} + + compressed_pair_imp(first_param_type x) + : first_(x) {} + + compressed_pair_imp(second_param_type y) + : second_type(y) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return *this;} + second_const_reference second() const {return *this;} + + void swap(::boost::compressed_pair& y) + { + // no need to swap empty base class: + cp_swap(first_, y.first()); + } + + private: + first_type first_; + }; + + // 3 derive from T1 and T2 + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type, + protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), second_type(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x) {} + + compressed_pair_imp(second_param_type y) + : second_type(y) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return *this;} + second_const_reference second() const {return *this;} + // + // no need to swap empty bases: + void swap(::boost::compressed_pair&) {} + }; + + // JM + // 4 T1 == T2, T1 and T2 both empty + // Originally this did not store an instance of T2 at all + // but that led to problems beause it meant &x.first() == &x.second() + // which is not true for any other kind of pair, so now we store an instance + // of T2 just in case the user is relying on first() and second() returning + // different objects (albeit both empty). + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), m_second(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x), m_second(x) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return m_second;} + second_const_reference second() const {return m_second;} + + void swap(::boost::compressed_pair&) {} + private: + T2 m_second; + }; + + // 5 T1 == T2 and are not empty: //JM + + template + class compressed_pair_imp + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_(x), second_(x) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + cp_swap(second_, y.second()); + } + private: + first_type first_; + second_type second_; + }; + +} // details + +template +class compressed_pair + : private ::boost::details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> +{ +private: + typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> base; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair() : base() {} + compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} + explicit compressed_pair(first_param_type x) : base(x) {} + explicit compressed_pair(second_param_type y) : base(y) {} + + first_reference first() {return base::first();} + first_const_reference first() const {return base::first();} + + second_reference second() {return base::second();} + second_const_reference second() const {return base::second();} + + void swap(compressed_pair& y) { base::swap(y); } +}; + +// JM +// Partial specialisation for case where T1 == T2: +// +template +class compressed_pair + : private details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> +{ +private: + typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> base; +public: + typedef T first_type; + typedef T second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair() : base() {} + compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} +#if !(defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) + explicit +#endif + compressed_pair(first_param_type x) : base(x) {} + + first_reference first() {return base::first();} + first_const_reference first() const {return base::first();} + + second_reference second() {return base::second();} + second_const_reference second() const {return base::second();} + + void swap(::boost::compressed_pair& y) { base::swap(y); } +}; + +template +inline +void +swap(compressed_pair& x, compressed_pair& y) +{ + x.swap(y); +} + +} // boost + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // BOOST_DETAIL_COMPRESSED_PAIR_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/container_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/container_fwd.hpp new file mode 100644 index 0000000000..67c5a21c8a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/container_fwd.hpp @@ -0,0 +1,101 @@ + +// Copyright 2005-2008 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP) +#define BOOST_DETAIL_CONTAINER_FWD_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include + +#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) \ + || ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ + && (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL))) \ + || BOOST_WORKAROUND(__BORLANDC__, > 0x551) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \ + || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) + +#include +#include +#include +#include +#include +#include +#include +#include + +#else + +#include + +#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) && \ + defined(__STL_CONFIG_H) + +#define BOOST_CONTAINER_FWD_BAD_BITSET + +#if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) +#define BOOST_CONTAINER_FWD_BAD_DEQUE +#endif + +#endif + +#if defined(BOOST_CONTAINER_FWD_BAD_DEQUE) +#include +#endif + +#if defined(BOOST_CONTAINER_FWD_BAD_BITSET) +#include +#endif + +#if defined(BOOST_MSVC) +#pragma warning(push) +#pragma warning(disable:4099) // struct/class mismatch in fwd declarations +#endif + +namespace std +{ + template class allocator; + template class basic_string; + +#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + template struct string_char_traits; +#else + template struct char_traits; +#endif + + template class complex; +} + +// gcc 3.4 and greater +namespace std +{ +#if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE) + template class deque; +#endif + + template class list; + template class vector; + template class map; + template + class multimap; + template class set; + template class multiset; + +#if !defined(BOOST_CONTAINER_FWD_BAD_BITSET) + template class bitset; +#endif + template struct pair; +} + +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/dynamic_bitset.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/dynamic_bitset.hpp new file mode 100644 index 0000000000..281aa55cd6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/dynamic_bitset.hpp @@ -0,0 +1,229 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2006, 2008 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP +#define BOOST_DETAIL_DYNAMIC_BITSET_HPP + +#include +#include "boost/config.hpp" +#include "boost/detail/workaround.hpp" + + +namespace boost { + + namespace detail { + namespace dynamic_bitset_impl { + + // Gives (read-)access to the object representation + // of an object of type T (3.9p4). CANNOT be used + // on a base sub-object + // + template + inline const unsigned char * object_representation (T* p) + { + return static_cast(static_cast(p)); + } + + template + struct shifter + { + static void left_shift(T & v) { + amount >= width ? (v = 0) + : (v >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(amount)); + } + }; + + // ------- count function implementation -------------- + + typedef unsigned char byte_type; + + // These two entities + // + // enum mode { access_by_bytes, access_by_blocks }; + // template struct mode_to_type {}; + // + // were removed, since the regression logs (as of 24 Aug 2008) + // showed that several compilers had troubles with recognizing + // + // const mode m = access_by_bytes + // + // as a constant expression + // + // * So, we'll use bool, instead of enum *. + // + template + struct value_to_type + { + value_to_type() {} + }; + const bool access_by_bytes = true; + const bool access_by_blocks = false; + + + // the table: wrapped in a class template, so + // that it is only instantiated if/when needed + // + template + struct count_table { static const byte_type table[]; }; + + template <> + struct count_table { /* no table */ }; + + + const unsigned int table_width = 8; + template + const byte_type count_table::table[] = + { + // Automatically generated by GPTableGen.exe v.1.0 + // + 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 + }; + + + // overload for access by bytes + // + + template + inline std::size_t do_count(Iterator first, std::size_t length, + int /*dummy param*/, + value_to_type* ) + { + std::size_t num = 0; + if (length) + { + const byte_type * p = object_representation(&*first); + length *= sizeof(*first); + + do { + num += count_table<>::table[*p]; + ++p; + --length; + + } while (length); + } + + return num; + } + + + // overload for access by blocks + // + template + inline std::size_t do_count(Iterator first, std::size_t length, ValueType, + value_to_type*) + { + std::size_t num = 0; + while (length){ + + ValueType value = *first; + while (value) { + num += count_table<>::table[value & ((1u<>= table_width; + } + + ++first; + --length; + } + + return num; + } + + // ------------------------------------------------------- + + + // Some library implementations simply return a dummy + // value such as + // + // size_type(-1) / sizeof(T) + // + // from vector<>::max_size. This tries to get more + // meaningful info. + // + template + typename T::size_type vector_max_size_workaround(const T & v) { + + typedef typename T::allocator_type allocator_type; + + const typename allocator_type::size_type alloc_max = + v.get_allocator().max_size(); + const typename T::size_type container_max = v.max_size(); + + return alloc_max < container_max? + alloc_max : + container_max; + } + + // for static_asserts + template + struct allowed_block_type { + enum { value = T(-1) > 0 }; // ensure T has no sign + }; + + template <> + struct allowed_block_type { + enum { value = false }; + }; + + + template + struct is_numeric { + enum { value = false }; + }; + +# define BOOST_dynamic_bitset_is_numeric(x) \ + template<> \ + struct is_numeric< x > { \ + enum { value = true }; \ + } /**/ + + BOOST_dynamic_bitset_is_numeric(bool); + BOOST_dynamic_bitset_is_numeric(char); + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + BOOST_dynamic_bitset_is_numeric(wchar_t); +#endif + + BOOST_dynamic_bitset_is_numeric(signed char); + BOOST_dynamic_bitset_is_numeric(short int); + BOOST_dynamic_bitset_is_numeric(int); + BOOST_dynamic_bitset_is_numeric(long int); + + BOOST_dynamic_bitset_is_numeric(unsigned char); + BOOST_dynamic_bitset_is_numeric(unsigned short); + BOOST_dynamic_bitset_is_numeric(unsigned int); + BOOST_dynamic_bitset_is_numeric(unsigned long); + +#if defined(BOOST_HAS_LONG_LONG) + BOOST_dynamic_bitset_is_numeric(::boost::long_long_type); + BOOST_dynamic_bitset_is_numeric(::boost::ulong_long_type); +#endif + + // intentionally omitted + //BOOST_dynamic_bitset_is_numeric(float); + //BOOST_dynamic_bitset_is_numeric(double); + //BOOST_dynamic_bitset_is_numeric(long double); + +#undef BOOST_dynamic_bitset_is_numeric + + } // dynamic_bitset_impl + } // namespace detail + +} // namespace boost + +#endif // include guard + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/endian.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/endian.hpp new file mode 100644 index 0000000000..5f9b90efd9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/endian.hpp @@ -0,0 +1,76 @@ +// Copyright 2005 Caleb Epstein +// Copyright 2006 John Maddock +// Copyright 2010 Rene Rivera +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* + * Copyright notice reproduced from , from + * which this code was originally taken. + * + * Modified by Caleb Epstein to use with GNU libc and to + * defined the BOOST_ENDIAN macro. + */ + +#ifndef BOOST_DETAIL_ENDIAN_HPP +#define BOOST_DETAIL_ENDIAN_HPP + +// GNU libc offers the helpful header which defines +// __BYTE_ORDER + +#if defined (__GLIBC__) +# include +# if (__BYTE_ORDER == __LITTLE_ENDIAN) +# define BOOST_LITTLE_ENDIAN +# elif (__BYTE_ORDER == __BIG_ENDIAN) +# define BOOST_BIG_ENDIAN +# elif (__BYTE_ORDER == __PDP_ENDIAN) +# define BOOST_PDP_ENDIAN +# else +# error Unknown machine endianness detected. +# endif +# define BOOST_BYTE_ORDER __BYTE_ORDER +#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ + defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 +#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \ + defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +# define BOOST_LITTLE_ENDIAN +# define BOOST_BYTE_ORDER 1234 +#elif defined(__sparc) || defined(__sparc__) \ + || defined(_POWER) || defined(__powerpc__) \ + || defined(__ppc__) || defined(__hpux) || defined(__hppa) \ + || defined(_MIPSEB) || defined(_POWER) \ + || defined(__s390__) +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 +#elif defined(__i386__) || defined(__alpha__) \ + || defined(__ia64) || defined(__ia64__) \ + || defined(_M_IX86) || defined(_M_IA64) \ + || defined(_M_ALPHA) || defined(__amd64) \ + || defined(__amd64__) || defined(_M_AMD64) \ + || defined(__x86_64) || defined(__x86_64__) \ + || defined(_M_X64) || defined(__bfin__) + +# define BOOST_LITTLE_ENDIAN +# define BOOST_BYTE_ORDER 1234 +#else +# error The file boost/detail/endian.hpp needs to be set up for your CPU type. +#endif + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/has_default_constructor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/has_default_constructor.hpp new file mode 100644 index 0000000000..319b30abcd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/has_default_constructor.hpp @@ -0,0 +1,29 @@ + +// (C) Copyright Matthias Troyerk 2006. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED + +#include + +namespace boost { namespace detail { + +/// type trait to check for a default constructor +/// +/// The default implementation just checks for a trivial constructor. +/// Using some compiler magic it might be possible to provide a better default + +template +struct has_default_constructor + : public has_trivial_constructor +{}; + +} } // namespace boost::detail + + +#endif // BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/identifier.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/identifier.hpp new file mode 100644 index 0000000000..688a664f7d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/identifier.hpp @@ -0,0 +1,89 @@ +// boost/identifier.hpp ----------------------------------------------------// + +// Copyright Beman Dawes 2006 + +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See documentation at http://www.boost.org/libs/utility + +#ifndef BOOST_IDENTIFIER_HPP +#define BOOST_IDENTIFIER_HPP + +#include +#include +#include + +namespace boost +{ + namespace detail + { + // class template identifier ---------------------------------------------// + + // Always used as a base class so that different instantiations result in + // different class types even if instantiated with the same value type T. + + // Expected usage is that T is often an integer type, best passed by + // value. There is no reason why T can't be a possibly larger class such as + // std::string, best passed by const reference. + + // This implementation uses pass by value, based on expected common uses. + + template + class identifier + { + public: + typedef T value_type; + + const value_type value() const { return m_value; } + void assign( value_type v ) { m_value = v; } + + bool operator==( const D & rhs ) const { return m_value == rhs.m_value; } + bool operator!=( const D & rhs ) const { return m_value != rhs.m_value; } + bool operator< ( const D & rhs ) const { return m_value < rhs.m_value; } + bool operator<=( const D & rhs ) const { return m_value <= rhs.m_value; } + bool operator> ( const D & rhs ) const { return m_value > rhs.m_value; } + bool operator>=( const D & rhs ) const { return m_value >= rhs.m_value; } + + typedef void (*unspecified_bool_type)(D); // without the D, unspecified_bool_type + static void unspecified_bool_true(D){} // conversion allows relational operators + // between different identifier types + + operator unspecified_bool_type() const { return m_value == value_type() ? 0 : unspecified_bool_true; } + bool operator!() const { return m_value == value_type(); } + + // constructors are protected so that class can only be used as a base class + protected: + identifier() {} + explicit identifier( value_type v ) : m_value(v) {} + + #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // 1300 == VC++ 7.0 bug workaround + private: + #endif + T m_value; + }; + + //#ifndef BOOST_NO_SFINAE + + // template + // typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >, + // Ostream & >::type operator<<( Ostream & os, const Id & id ) + // { + // return os << id.value(); + // } + + // template + // typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >, + // Istream & >::type operator>>( Istream & is, Id & id ) + // { + // typename Id::value_type v; + // is >> v; + // id.value( v ); + // return is; + // } + //#endif + + } // namespace detail +} // namespace boost + +#endif // BOOST_IDENTIFIER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/indirect_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/indirect_traits.hpp new file mode 100644 index 0000000000..f9c0cd6a04 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/indirect_traits.hpp @@ -0,0 +1,487 @@ +// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef INDIRECT_TRAITS_DWA2002131_HPP +# define INDIRECT_TRAITS_DWA2002131_HPP +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include + +# include +# include +# include +# include +# include +# include + +# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# include +# endif + +namespace boost { namespace detail { + +namespace indirect_traits { + +# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +template +struct is_reference_to_const : mpl::false_ +{ +}; + +template +struct is_reference_to_const : mpl::true_ +{ +}; + +# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround +template +struct is_reference_to_const : mpl::true_ +{ +}; +# endif + +template +struct is_reference_to_function : mpl::false_ +{ +}; + +template +struct is_reference_to_function : is_function +{ +}; + +template +struct is_pointer_to_function : mpl::false_ +{ +}; + +// There's no such thing as a pointer-to-cv-function, so we don't need +// specializations for those +template +struct is_pointer_to_function : is_function +{ +}; + +template +struct is_reference_to_member_function_pointer_impl : mpl::false_ +{ +}; + +template +struct is_reference_to_member_function_pointer_impl + : is_member_function_pointer::type> +{ +}; + + +template +struct is_reference_to_member_function_pointer + : is_reference_to_member_function_pointer_impl +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T)) +}; + +template +struct is_reference_to_function_pointer_aux + : mpl::and_< + is_reference + , is_pointer_to_function< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those +}; + +template +struct is_reference_to_function_pointer + : mpl::if_< + is_reference_to_function + , mpl::false_ + , is_reference_to_function_pointer_aux + >::type +{ +}; + +template +struct is_reference_to_non_const + : mpl::and_< + is_reference + , mpl::not_< + is_reference_to_const + > + > +{ +}; + +template +struct is_reference_to_volatile : mpl::false_ +{ +}; + +template +struct is_reference_to_volatile : mpl::true_ +{ +}; + +# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround +template +struct is_reference_to_volatile : mpl::true_ +{ +}; +# endif + + +template +struct is_reference_to_pointer : mpl::false_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_class + : mpl::and_< + is_reference + , is_class< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) +}; + +template +struct is_pointer_to_class + : mpl::and_< + is_pointer + , is_class< + typename remove_cv< + typename remove_pointer::type + >::type + > + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T)) +}; + +# else + +using namespace boost::detail::is_function_ref_tester_; + +typedef char (&inner_yes_type)[3]; +typedef char (&inner_no_type)[2]; +typedef char (&outer_no_type)[1]; + +template +struct is_const_help +{ + typedef typename mpl::if_< + is_const + , inner_yes_type + , inner_no_type + >::type type; +}; + +template +struct is_volatile_help +{ + typedef typename mpl::if_< + is_volatile + , inner_yes_type + , inner_no_type + >::type type; +}; + +template +struct is_pointer_help +{ + typedef typename mpl::if_< + is_pointer + , inner_yes_type + , inner_no_type + >::type type; +}; + +template +struct is_class_help +{ + typedef typename mpl::if_< + is_class + , inner_yes_type + , inner_no_type + >::type type; +}; + +template +struct is_reference_to_function_aux +{ + static T t; + BOOST_STATIC_CONSTANT( + bool, value = sizeof(detail::is_function_ref_tester(t,0)) == sizeof(::boost::type_traits::yes_type)); + typedef mpl::bool_ type; + }; + +template +struct is_reference_to_function + : mpl::if_, is_reference_to_function_aux, mpl::bool_ >::type +{ +}; + +template +struct is_pointer_to_function_aux +{ + static T t; + BOOST_STATIC_CONSTANT( + bool, value + = sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type)); + typedef mpl::bool_ type; +}; + +template +struct is_pointer_to_function + : mpl::if_, is_pointer_to_function_aux, mpl::bool_ >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_function,(T)) +}; + +struct false_helper1 +{ + template + struct apply : mpl::false_ + { + }; +}; + +template +typename is_const_help::type reference_to_const_helper(V&); +outer_no_type +reference_to_const_helper(...); + +struct true_helper1 +{ + template + struct apply + { + static T t; + BOOST_STATIC_CONSTANT( + bool, value + = sizeof(reference_to_const_helper(t)) == sizeof(inner_yes_type)); + typedef mpl::bool_ type; + }; +}; + +template +struct is_reference_to_const_helper1 : true_helper1 +{ +}; + +template <> +struct is_reference_to_const_helper1 : false_helper1 +{ +}; + + +template +struct is_reference_to_const + : is_reference_to_const_helper1::value>::template apply +{ +}; + + +template +struct is_reference_to_non_const_helper1 +{ + template + struct apply + { + static T t; + BOOST_STATIC_CONSTANT( + bool, value + = sizeof(reference_to_const_helper(t)) == sizeof(inner_no_type)); + + typedef mpl::bool_ type; + }; +}; + +template <> +struct is_reference_to_non_const_helper1 : false_helper1 +{ +}; + + +template +struct is_reference_to_non_const + : is_reference_to_non_const_helper1::value>::template apply +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_non_const,(T)) +}; + + +template +typename is_volatile_help::type reference_to_volatile_helper(V&); +outer_no_type +reference_to_volatile_helper(...); + +template +struct is_reference_to_volatile_helper1 +{ + template + struct apply + { + static T t; + BOOST_STATIC_CONSTANT( + bool, value + = sizeof(reference_to_volatile_helper(t)) == sizeof(inner_yes_type)); + typedef mpl::bool_ type; + }; +}; + +template <> +struct is_reference_to_volatile_helper1 : false_helper1 +{ +}; + + +template +struct is_reference_to_volatile + : is_reference_to_volatile_helper1::value>::template apply +{ +}; + +template +typename is_pointer_help::type reference_to_pointer_helper(V&); +outer_no_type reference_to_pointer_helper(...); + +template +struct reference_to_pointer_impl +{ + static T t; + BOOST_STATIC_CONSTANT( + bool, value + = (sizeof((reference_to_pointer_helper)(t)) == sizeof(inner_yes_type)) + ); + + typedef mpl::bool_ type; +}; + +template +struct is_reference_to_pointer + : mpl::eval_if, reference_to_pointer_impl, mpl::false_>::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_pointer,(T)) +}; + +template +struct is_reference_to_function_pointer + : mpl::eval_if, is_pointer_to_function_aux, mpl::false_>::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T)) +}; + + +template +struct is_member_function_pointer_help + : mpl::if_, inner_yes_type, inner_no_type> +{}; + +template +typename is_member_function_pointer_help::type member_function_pointer_helper(V&); +outer_no_type member_function_pointer_helper(...); + +template +struct is_pointer_to_member_function_aux +{ + static T t; + BOOST_STATIC_CONSTANT( + bool, value + = sizeof((member_function_pointer_helper)(t)) == sizeof(inner_yes_type)); + typedef mpl::bool_ type; +}; + +template +struct is_reference_to_member_function_pointer + : mpl::if_< + is_reference + , is_pointer_to_member_function_aux + , mpl::bool_ + >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T)) +}; + +template +typename is_class_help::type reference_to_class_helper(V const volatile&); +outer_no_type reference_to_class_helper(...); + +template +struct is_reference_to_class +{ + static T t; + BOOST_STATIC_CONSTANT( + bool, value + = (is_reference::value + & (sizeof(reference_to_class_helper(t)) == sizeof(inner_yes_type))) + ); + typedef mpl::bool_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) +}; + +template +typename is_class_help::type pointer_to_class_helper(V const volatile*); +outer_no_type pointer_to_class_helper(...); + +template +struct is_pointer_to_class +{ + static T t; + BOOST_STATIC_CONSTANT( + bool, value + = (is_pointer::value + && sizeof(pointer_to_class_helper(t)) == sizeof(inner_yes_type)) + ); + typedef mpl::bool_ type; +}; +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} + +using namespace indirect_traits; + +}} // namespace boost::python::detail + +#endif // INDIRECT_TRAITS_DWA2002131_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/interlocked.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/interlocked.hpp new file mode 100644 index 0000000000..fccebc3f70 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/interlocked.hpp @@ -0,0 +1,142 @@ +#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED +#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/interlocked.hpp +// +// Copyright 2005 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include + +#if defined( BOOST_USE_WINDOWS_H ) + +# include + +# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer +# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer + +#elif defined(_WIN32_WCE) + +// under Windows CE we still have old-style Interlocked* functions + +extern "C" long __cdecl InterlockedIncrement( long* ); +extern "C" long __cdecl InterlockedDecrement( long* ); +extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); +extern "C" long __cdecl InterlockedExchange( long*, long ); +extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); + +# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd + +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ + ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare))) +# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ + ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange))) + +#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) + +#if defined( __CLRCALL_PURE_OR_CDECL ) + +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long ); + +#else + +extern "C" long __cdecl _InterlockedIncrement( long volatile * ); +extern "C" long __cdecl _InterlockedDecrement( long volatile * ); +extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); +extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); + +#endif + +# pragma intrinsic( _InterlockedIncrement ) +# pragma intrinsic( _InterlockedDecrement ) +# pragma intrinsic( _InterlockedCompareExchange ) +# pragma intrinsic( _InterlockedExchange ) +# pragma intrinsic( _InterlockedExchangeAdd ) + +# if defined(_M_IA64) || defined(_M_AMD64) + +extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* ); +extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* ); + +# pragma intrinsic( _InterlockedCompareExchangePointer ) +# pragma intrinsic( _InterlockedExchangePointer ) + +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer +# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer + +# else + +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ + ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) +# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ + ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) + +# endif + +# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) + +namespace boost +{ + +namespace detail +{ + +extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * ); +extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * ); +extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long ); +extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long ); +extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long ); + +} // namespace detail + +} // namespace boost + +# define BOOST_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement +# define BOOST_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange +# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange +# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd + +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ + ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) +# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ + ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) + +#else + +# error "Interlocked intrinsics not available" + +#endif + +#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/is_function_ref_tester.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/is_function_ref_tester.hpp new file mode 100644 index 0000000000..5f367ea818 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/is_function_ref_tester.hpp @@ -0,0 +1,135 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED +#define BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED + +#include "boost/type_traits/detail/yes_no_type.hpp" +#include "boost/type_traits/config.hpp" + +#if defined(BOOST_TT_PREPROCESSING_MODE) +# include "boost/preprocessor/iterate.hpp" +# include "boost/preprocessor/enum_params.hpp" +# include "boost/preprocessor/comma_if.hpp" +#endif + +namespace boost { +namespace detail { +namespace is_function_ref_tester_ { + +template +boost::type_traits::no_type BOOST_TT_DECL is_function_ref_tester(T& ...); + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// preprocessor-generated part, don't edit by hand! + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23), int); + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24), int); + +#else + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_function_ref_tester.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace detail +} // namespace python +} // namespace boost + +#endif // BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED + +///// iteration + +#else +#define i BOOST_PP_FRAME_ITERATION(1) + +template +boost::type_traits::yes_type is_function_ref_tester(R (&)(BOOST_PP_ENUM_PARAMS(i,T)), int); + +#undef i +#endif // BOOST_PP_IS_ITERATING diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/is_incrementable.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/is_incrementable.hpp new file mode 100644 index 0000000000..e7ef9dc625 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/is_incrementable.hpp @@ -0,0 +1,134 @@ +// Copyright David Abrahams 2004. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef IS_INCREMENTABLE_DWA200415_HPP +# define IS_INCREMENTABLE_DWA200415_HPP + +# include +# include +# include +# include +# include + +// Must be the last include +# include + +namespace boost { namespace detail { + +// is_incrementable metafunction +// +// Requires: Given x of type T&, if the expression ++x is well-formed +// it must have complete type; otherwise, it must neither be ambiguous +// nor violate access. + +// This namespace ensures that ADL doesn't mess things up. +namespace is_incrementable_ +{ + // a type returned from operator++ when no increment is found in the + // type's own namespace + struct tag {}; + + // any soaks up implicit conversions and makes the following + // operator++ less-preferred than any other such operator that + // might be found via ADL. + struct any { template any(T const&); }; + + // This is a last-resort operator++ for when none other is found +# if BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2 + +} + +namespace is_incrementable_2 +{ + is_incrementable_::tag operator++(is_incrementable_::any const&); + is_incrementable_::tag operator++(is_incrementable_::any const&,int); +} +using namespace is_incrementable_2; + +namespace is_incrementable_ +{ + +# else + + tag operator++(any const&); + tag operator++(any const&,int); + +# endif + +# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_comma(a,b) (a) +# else + // In case an operator++ is found that returns void, we'll use ++x,0 + tag operator,(tag,int); +# define BOOST_comma(a,b) (a,b) +# endif + +# if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4913) // Warning about operator, +# endif + + // two check overloads help us identify which operator++ was picked + char (& check_(tag) )[2]; + + template + char check_(T const&); + + + template + struct impl + { + static typename boost::remove_cv::type& x; + + BOOST_STATIC_CONSTANT( + bool + , value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1 + ); + }; + + template + struct postfix_impl + { + static typename boost::remove_cv::type& x; + + BOOST_STATIC_CONSTANT( + bool + , value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1 + ); + }; + +# if defined(BOOST_MSVC) +# pragma warning(pop) +# endif + +} + +# undef BOOST_comma + +template +struct is_incrementable +BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl::value) +{ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(::boost::detail::is_incrementable_::impl::value) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_incrementable,(T)) +}; + +template +struct is_postfix_incrementable +BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl::value) +{ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(::boost::detail::is_incrementable_::postfix_impl::value) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_postfix_incrementable,(T)) +}; + +} // namespace detail + +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::detail::is_incrementable) +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::detail::is_postfix_incrementable) + +} // namespace boost + +# include + +#endif // IS_INCREMENTABLE_DWA200415_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/is_xxx.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/is_xxx.hpp new file mode 100644 index 0000000000..cb64fb32b8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/is_xxx.hpp @@ -0,0 +1,61 @@ +// Copyright David Abrahams 2005. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_DETAIL_IS_XXX_DWA20051011_HPP +# define BOOST_DETAIL_IS_XXX_DWA20051011_HPP + +# include +# include +# include + +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include +# include + +# define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \ +template \ +struct is_##name \ +{ \ + typedef char yes; \ + typedef char (&no)[2]; \ + \ + static typename add_reference::type dummy; \ + \ + struct helpers \ + { \ + template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class U) > \ + static yes test( \ + qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, U) >&, int \ + ); \ + \ + template \ + static no test(U&, ...); \ + }; \ + \ + BOOST_STATIC_CONSTANT( \ + bool, value \ + = !is_reference::value \ + & (sizeof(helpers::test(dummy, 0)) == sizeof(yes))); \ + \ + typedef mpl::bool_ type; \ +}; + +# else + +# define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \ +template \ +struct is_##name : mpl::false_ \ +{ \ +}; \ + \ +template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \ +struct is_##name< \ + qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \ +> \ + : mpl::true_ \ +{ \ +}; + +# endif + +#endif // BOOST_DETAIL_IS_XXX_DWA20051011_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/iterator.hpp new file mode 100644 index 0000000000..5bb9c6269c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/iterator.hpp @@ -0,0 +1,494 @@ +// (C) Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Boost versions of +// +// std::iterator_traits<>::iterator_category +// std::iterator_traits<>::difference_type +// std::distance() +// +// ...for all compilers and iterators +// +// Additionally, if X is a pointer +// std::iterator_traits::pointer + +// Otherwise, if partial specialization is supported or X is not a pointer +// std::iterator_traits::value_type +// std::iterator_traits::pointer +// std::iterator_traits::reference +// +// See http://www.boost.org for most recent version including documentation. + +// Revision History +// 04 Mar 2001 - More attempted fixes for Intel C++ (David Abrahams) +// 03 Mar 2001 - Put all implementation into namespace +// boost::detail::iterator_traits_. Some progress made on fixes +// for Intel compiler. (David Abrahams) +// 02 Mar 2001 - Changed BOOST_MSVC to BOOST_MSVC_STD_ITERATOR in a few +// places. (Jeremy Siek) +// 19 Feb 2001 - Improved workarounds for stock MSVC6; use yes_type and +// no_type from type_traits.hpp; stopped trying to remove_cv +// before detecting is_pointer, in honor of the new type_traits +// semantics. (David Abrahams) +// 13 Feb 2001 - Make it work with nearly all standard-conforming iterators +// under raw VC6. The one category remaining which will fail is +// that of iterators derived from std::iterator but not +// boost::iterator and which redefine difference_type. +// 11 Feb 2001 - Clean away code which can never be used (David Abrahams) +// 09 Feb 2001 - Always have a definition for each traits member, even if it +// can't be properly deduced. These will be incomplete types in +// some cases (undefined), but it helps suppress MSVC errors +// elsewhere (David Abrahams) +// 07 Feb 2001 - Support for more of the traits members where possible, making +// this useful as a replacement for std::iterator_traits when +// used as a default template parameter. +// 06 Feb 2001 - Removed useless #includes of standard library headers +// (David Abrahams) + +#ifndef ITERATOR_DWA122600_HPP_ +# define ITERATOR_DWA122600_HPP_ + +# include +# include + +// STLPort 4.0 and betas have a bug when debugging is enabled and there is no +// partial specialization: instead of an iterator_category typedef, the standard +// container iterators have _Iterator_category. +// +// Also, whether debugging is enabled or not, there is a broken specialization +// of std::iterator which has no +// typedefs but iterator_category. +# if defined(__SGI_STL_PORT) + +# if (__SGI_STL_PORT <= 0x410) && !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && defined(__STL_DEBUG) +# define BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF +# endif + +# define BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION + +# endif // STLPort <= 4.1b4 && no partial specialization + +# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) \ + && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MSVC_STD_ITERATOR) + +namespace boost { namespace detail { + +// Define a new template so it can be specialized +template +struct iterator_traits + : std::iterator_traits +{}; +using std::distance; + +}} // namespace boost::detail + +# else + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MSVC_STD_ITERATOR) + +// This is the case where everything conforms except BOOST_NO_STD_ITERATOR_TRAITS + +namespace boost { namespace detail { + +// Rogue Wave Standard Library fools itself into thinking partial +// specialization is missing on some platforms (e.g. Sun), so fails to +// supply iterator_traits! +template +struct iterator_traits +{ + typedef typename Iterator::value_type value_type; + typedef typename Iterator::reference reference; + typedef typename Iterator::pointer pointer; + typedef typename Iterator::difference_type difference_type; + typedef typename Iterator::iterator_category iterator_category; +}; + +template +struct iterator_traits +{ + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + typedef std::random_access_iterator_tag iterator_category; +}; + +template +struct iterator_traits +{ + typedef T value_type; + typedef T const& reference; + typedef T const* pointer; + typedef std::ptrdiff_t difference_type; + typedef std::random_access_iterator_tag iterator_category; +}; + +}} // namespace boost::detail + +# else + +# include +# include +# include + +# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# include +# include +# endif +# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION +# include +# endif + +# include +# include +# include + +// should be the last #include +# include "boost/type_traits/detail/bool_trait_def.hpp" + +namespace boost { namespace detail { + +BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type) +BOOST_MPL_HAS_XXX_TRAIT_DEF(reference) +BOOST_MPL_HAS_XXX_TRAIT_DEF(pointer) +BOOST_MPL_HAS_XXX_TRAIT_DEF(difference_type) +BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category) + +// is_mutable_iterator -- +// +// A metafunction returning true iff T is a mutable iterator type +// with a nested value_type. Will only work portably with iterators +// whose operator* returns a reference, but that seems to be OK for +// the iterators supplied by Dinkumware. Some input iterators may +// compile-time if they arrive here, and if the compiler is strict +// about not taking the address of an rvalue. + +// This one detects ordinary mutable iterators - the result of +// operator* is convertible to the value_type. +template +type_traits::yes_type is_mutable_iterator_helper(T const*, BOOST_DEDUCED_TYPENAME T::value_type*); + +// Since you can't take the address of an rvalue, the guts of +// is_mutable_iterator_impl will fail if we use &*t directly. This +// makes sure we can still work with non-lvalue iterators. +template T* mutable_iterator_lvalue_helper(T& x); +int mutable_iterator_lvalue_helper(...); + + +// This one detects output iterators such as ostream_iterator which +// return references to themselves. +template +type_traits::yes_type is_mutable_iterator_helper(T const*, T const*); + +type_traits::no_type is_mutable_iterator_helper(...); + +template +struct is_mutable_iterator_impl +{ + static T t; + + BOOST_STATIC_CONSTANT( + bool, value = sizeof( + detail::is_mutable_iterator_helper( + (T*)0 + , mutable_iterator_lvalue_helper(*t) // like &*t + )) + == sizeof(type_traits::yes_type) + ); +}; + +BOOST_TT_AUX_BOOL_TRAIT_DEF1( + is_mutable_iterator,T,::boost::detail::is_mutable_iterator_impl::value) + + +// is_full_iterator_traits -- +// +// A metafunction returning true iff T has all the requisite nested +// types to satisfy the requirements for a fully-conforming +// iterator_traits implementation. +template +struct is_full_iterator_traits_impl +{ + enum { value = + has_value_type::value + & has_reference::value + & has_pointer::value + & has_difference_type::value + & has_iterator_category::value + }; +}; + +BOOST_TT_AUX_BOOL_TRAIT_DEF1( + is_full_iterator_traits,T,::boost::detail::is_full_iterator_traits_impl::value) + + +# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF +BOOST_MPL_HAS_XXX_TRAIT_DEF(_Iterator_category) + +// is_stlport_40_debug_iterator -- +// +// A metafunction returning true iff T has all the requisite nested +// types to satisfy the requirements of an STLPort 4.0 debug iterator +// iterator_traits implementation. +template +struct is_stlport_40_debug_iterator_impl +{ + enum { value = + has_value_type::value + & has_reference::value + & has_pointer::value + & has_difference_type::value + & has__Iterator_category::value + }; +}; + +BOOST_TT_AUX_BOOL_TRAIT_DEF1( + is_stlport_40_debug_iterator,T,::boost::detail::is_stlport_40_debug_iterator_impl::value) + +template +struct stlport_40_debug_iterator_traits +{ + typedef typename T::value_type value_type; + typedef typename T::reference reference; + typedef typename T::pointer pointer; + typedef typename T::difference_type difference_type; + typedef typename T::_Iterator_category iterator_category; +}; +# endif // BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF + +template struct pointer_iterator_traits; + +# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +template +struct pointer_iterator_traits +{ + typedef typename remove_const::type value_type; + typedef T* pointer; + typedef T& reference; + typedef std::random_access_iterator_tag iterator_category; + typedef std::ptrdiff_t difference_type; +}; +# else + +// In case of no template partial specialization, and if T is a +// pointer, iterator_traits::value_type can still be computed. For +// some basic types, remove_pointer is manually defined in +// type_traits/broken_compiler_spec.hpp. For others, do it yourself. + +template class please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee; + +template +struct pointer_value_type + : mpl::if_< + is_same::type> + , please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee

+ , typename remove_const< + typename remove_pointer

::type + >::type + > +{ +}; + + +template +struct pointer_reference + : mpl::if_< + is_same::type> + , please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee

+ , typename remove_pointer

::type& + > +{ +}; + +template +struct pointer_iterator_traits +{ + typedef T pointer; + typedef std::random_access_iterator_tag iterator_category; + typedef std::ptrdiff_t difference_type; + + typedef typename pointer_value_type::type value_type; + typedef typename pointer_reference::type reference; +}; + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +// We'll sort iterator types into one of these classifications, from which we +// can determine the difference_type, pointer, reference, and value_type +template +struct standard_iterator_traits +{ + typedef typename Iterator::difference_type difference_type; + typedef typename Iterator::value_type value_type; + typedef typename Iterator::pointer pointer; + typedef typename Iterator::reference reference; + typedef typename Iterator::iterator_category iterator_category; +}; + +template +struct msvc_stdlib_mutable_traits + : std::iterator_traits +{ + typedef typename std::iterator_traits::distance_type difference_type; + typedef typename std::iterator_traits::value_type* pointer; + typedef typename std::iterator_traits::value_type& reference; +}; + +template +struct msvc_stdlib_const_traits + : std::iterator_traits +{ + typedef typename std::iterator_traits::distance_type difference_type; + typedef const typename std::iterator_traits::value_type* pointer; + typedef const typename std::iterator_traits::value_type& reference; +}; + +# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION +template +struct is_bad_output_iterator + : is_base_and_derived< + std::iterator + , Iterator> +{ +}; + +struct bad_output_iterator_traits +{ + typedef void value_type; + typedef void difference_type; + typedef std::output_iterator_tag iterator_category; + typedef void pointer; + typedef void reference; +}; +# endif + +// If we're looking at an MSVC6 (old Dinkumware) ``standard'' +// iterator, this will generate an appropriate traits class. +template +struct msvc_stdlib_iterator_traits + : mpl::if_< + is_mutable_iterator + , msvc_stdlib_mutable_traits + , msvc_stdlib_const_traits + >::type +{}; + +template +struct non_pointer_iterator_traits + : mpl::if_< + // if the iterator contains all the right nested types... + is_full_iterator_traits + // Use a standard iterator_traits implementation + , standard_iterator_traits +# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF + // Check for STLPort 4.0 broken _Iterator_category type + , mpl::if_< + is_stlport_40_debug_iterator + , stlport_40_debug_iterator_traits +# endif + // Otherwise, assume it's a Dinkum iterator + , msvc_stdlib_iterator_traits +# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF + >::type +# endif + >::type +{ +}; + +template +struct iterator_traits_aux + : mpl::if_< + is_pointer + , pointer_iterator_traits + , non_pointer_iterator_traits + >::type +{ +}; + +template +struct iterator_traits +{ + // Explicit forwarding from base class needed to keep MSVC6 happy + // under some circumstances. + private: +# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION + typedef + typename mpl::if_< + is_bad_output_iterator + , bad_output_iterator_traits + , iterator_traits_aux + >::type base; +# else + typedef iterator_traits_aux base; +# endif + public: + typedef typename base::value_type value_type; + typedef typename base::pointer pointer; + typedef typename base::reference reference; + typedef typename base::difference_type difference_type; + typedef typename base::iterator_category iterator_category; +}; + +// This specialization cuts off ETI (Early Template Instantiation) for MSVC. +template <> struct iterator_traits +{ + typedef int value_type; + typedef int pointer; + typedef int reference; + typedef int difference_type; + typedef int iterator_category; +}; + +}} // namespace boost::detail + +# endif // workarounds + +namespace boost { namespace detail { + +namespace iterator_traits_ +{ + template + struct distance_select + { + static Difference execute(Iterator i1, const Iterator i2, ...) + { + Difference result = 0; + while (i1 != i2) + { + ++i1; + ++result; + } + return result; + } + + static Difference execute(Iterator i1, const Iterator i2, std::random_access_iterator_tag*) + { + return i2 - i1; + } + }; +} // namespace boost::detail::iterator_traits_ + +template +inline typename iterator_traits::difference_type +distance(Iterator first, Iterator last) +{ + typedef typename iterator_traits::difference_type diff_t; + typedef typename ::boost::detail::iterator_traits::iterator_category iterator_category; + + return iterator_traits_::distance_select::execute( + first, last, (iterator_category*)0); +} + +}} + +# endif + + +# undef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF +# undef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION + +#endif // ITERATOR_DWA122600_HPP_ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/lcast_precision.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/lcast_precision.hpp new file mode 100644 index 0000000000..93abce18ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/lcast_precision.hpp @@ -0,0 +1,184 @@ +// Copyright Alexander Nasonov & Paul A. Bristow 2006. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED +#define BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED + +#include +#include +#include + +#include +#include + +#ifndef BOOST_NO_IS_ABSTRACT +// Fix for SF:1358600 - lexical_cast & pure virtual functions & VC 8 STL +#include +#include +#endif + +#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || \ + (defined(BOOST_MSVC) && (BOOST_MSVC<1310)) + +#define BOOST_LCAST_NO_COMPILE_TIME_PRECISION +#endif + +#ifdef BOOST_LCAST_NO_COMPILE_TIME_PRECISION +#include +#else +#include +#endif + +namespace boost { namespace detail { + +class lcast_abstract_stub {}; + +#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION +// Calculate an argument to pass to std::ios_base::precision from +// lexical_cast. See alternative implementation for broken standard +// libraries in lcast_get_precision below. Keep them in sync, please. +template +struct lcast_precision +{ +#ifdef BOOST_NO_IS_ABSTRACT + typedef std::numeric_limits limits; // No fix for SF:1358600. +#else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::is_abstract + , std::numeric_limits + , std::numeric_limits + >::type limits; +#endif + + BOOST_STATIC_CONSTANT(bool, use_default_precision = + !limits::is_specialized || limits::is_exact + ); + + BOOST_STATIC_CONSTANT(bool, is_specialized_bin = + !use_default_precision && + limits::radix == 2 && limits::digits > 0 + ); + + BOOST_STATIC_CONSTANT(bool, is_specialized_dec = + !use_default_precision && + limits::radix == 10 && limits::digits10 > 0 + ); + + BOOST_STATIC_CONSTANT(std::streamsize, streamsize_max = + boost::integer_traits::const_max + ); + + BOOST_STATIC_CONSTANT(unsigned int, precision_dec = limits::digits10 + 1U); + + BOOST_STATIC_ASSERT(!is_specialized_dec || + precision_dec <= streamsize_max + 0UL + ); + + BOOST_STATIC_CONSTANT(unsigned long, precision_bin = + 2UL + limits::digits * 30103UL / 100000UL + ); + + BOOST_STATIC_ASSERT(!is_specialized_bin || + (limits::digits + 0UL < ULONG_MAX / 30103UL && + precision_bin > limits::digits10 + 0UL && + precision_bin <= streamsize_max + 0UL) + ); + + BOOST_STATIC_CONSTANT(std::streamsize, value = + is_specialized_bin ? precision_bin + : is_specialized_dec ? precision_dec : 6 + ); +}; +#endif + +template +inline std::streamsize lcast_get_precision(T* = 0) +{ +#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION + return lcast_precision::value; +#else // Follow lcast_precision algorithm at run-time: + +#ifdef BOOST_NO_IS_ABSTRACT + typedef std::numeric_limits limits; // No fix for SF:1358600. +#else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::is_abstract + , std::numeric_limits + , std::numeric_limits + >::type limits; +#endif + + bool const use_default_precision = + !limits::is_specialized || limits::is_exact; + + if(!use_default_precision) + { // Includes all built-in floating-point types, float, double ... + // and UDT types for which digits (significand bits) is defined (not zero) + + bool const is_specialized_bin = + limits::radix == 2 && limits::digits > 0; + bool const is_specialized_dec = + limits::radix == 10 && limits::digits10 > 0; + std::streamsize const streamsize_max = + (boost::integer_traits::max)(); + + if(is_specialized_bin) + { // Floating-point types with + // limits::digits defined by the specialization. + + unsigned long const digits = limits::digits; + unsigned long const precision = 2UL + digits * 30103UL / 100000UL; + // unsigned long is selected because it is at least 32-bits + // and thus ULONG_MAX / 30103UL is big enough for all types. + BOOST_ASSERT( + digits < ULONG_MAX / 30103UL && + precision > limits::digits10 + 0UL && + precision <= streamsize_max + 0UL + ); + return precision; + } + else if(is_specialized_dec) + { // Decimal Floating-point type, most likely a User Defined Type + // rather than a real floating-point hardware type. + unsigned int const precision = limits::digits10 + 1U; + BOOST_ASSERT(precision <= streamsize_max + 0UL); + return precision; + } + } + + // Integral type (for which precision has no effect) + // or type T for which limits is NOT specialized, + // so assume stream precision remains the default 6 decimal digits. + // Warning: if your User-defined Floating-point type T is NOT specialized, + // then you may lose accuracy by only using 6 decimal digits. + // To avoid this, you need to specialize T with either + // radix == 2 and digits == the number of significand bits, + // OR + // radix = 10 and digits10 == the number of decimal digits. + + return 6; +#endif +} + +template +inline void lcast_set_precision(std::ios_base& stream, T*) +{ + stream.precision(lcast_get_precision()); +} + +template +inline void lcast_set_precision(std::ios_base& stream, Source*, Target*) +{ + std::streamsize const s = lcast_get_precision(static_cast(0)); + std::streamsize const t = lcast_get_precision(static_cast(0)); + stream.precision(s > t ? s : t); +} + +}} + +#endif // BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_mutex.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_mutex.hpp new file mode 100644 index 0000000000..b7a7f6dd4e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_mutex.hpp @@ -0,0 +1,22 @@ +#ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED +#define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lightweight_mutex.hpp - lightweight mutex +// +// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include + +#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_test.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_test.hpp new file mode 100644 index 0000000000..ffa750d324 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_test.hpp @@ -0,0 +1,91 @@ +#ifndef BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED +#define BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lightweight_test.hpp - lightweight test library +// +// Copyright (c) 2002, 2009 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// BOOST_TEST(expression) +// BOOST_ERROR(message) +// BOOST_TEST_EQ(expr1, expr2) +// +// int boost::report_errors() +// + +#include +#include + +namespace boost +{ + +namespace detail +{ + +inline int & test_errors() +{ + static int x = 0; + return x; +} + +inline void test_failed_impl(char const * expr, char const * file, int line, char const * function) +{ + std::cerr << file << "(" << line << "): test '" << expr << "' failed in function '" << function << "'" << std::endl; + ++test_errors(); +} + +inline void error_impl(char const * msg, char const * file, int line, char const * function) +{ + std::cerr << file << "(" << line << "): " << msg << " in function '" << function << "'" << std::endl; + ++test_errors(); +} + +template inline void test_eq_impl( char const * expr1, char const * expr2, char const * file, int line, char const * function, T const & t, U const & u ) +{ + if( t == u ) + { + } + else + { + std::cerr << file << "(" << line << "): test '" << expr1 << " == " << expr2 + << "' failed in function '" << function << "': " + << "'" << t << "' != '" << u << "'" << std::endl; + ++test_errors(); + } +} + +} // namespace detail + +inline int report_errors() +{ + int errors = detail::test_errors(); + + if( errors == 0 ) + { + std::cerr << "No errors detected." << std::endl; + return 0; + } + else + { + std::cerr << errors << " error" << (errors == 1? "": "s") << " detected." << std::endl; + return 1; + } +} + +} // namespace boost + +#define BOOST_TEST(expr) ((expr)? (void)0: ::boost::detail::test_failed_impl(#expr, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION)) +#define BOOST_ERROR(msg) ::boost::detail::error_impl(msg, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) +#define BOOST_TEST_EQ(expr1,expr2) ( ::boost::detail::test_eq_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) + +#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_thread.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_thread.hpp new file mode 100644 index 0000000000..6fe70a613d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/lightweight_thread.hpp @@ -0,0 +1,135 @@ +#ifndef BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED +#define BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// boost/detail/lightweight_thread.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2008 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include + +// pthread_create, pthread_join + +#if defined( BOOST_HAS_PTHREADS ) + +#include + +#else + +#include +#include + +typedef HANDLE pthread_t; + +int pthread_create( pthread_t * thread, void const *, unsigned (__stdcall * start_routine) (void*), void* arg ) +{ + HANDLE h = (HANDLE)_beginthreadex( 0, 0, start_routine, arg, 0, 0 ); + + if( h != 0 ) + { + *thread = h; + return 0; + } + else + { + return EAGAIN; + } +} + +int pthread_join( pthread_t thread, void ** /*value_ptr*/ ) +{ + ::WaitForSingleObject( thread, INFINITE ); + ::CloseHandle( thread ); + return 0; +} + +#endif + +// template int lw_thread_create( pthread_t & pt, F f ); + +namespace boost +{ + +namespace detail +{ + +class lw_abstract_thread +{ +public: + + virtual ~lw_abstract_thread() {} + virtual void run() = 0; +}; + +#if defined( BOOST_HAS_PTHREADS ) + +extern "C" void * lw_thread_routine( void * pv ) +{ + std::auto_ptr pt( static_cast( pv ) ); + + pt->run(); + + return 0; +} + +#else + +unsigned __stdcall lw_thread_routine( void * pv ) +{ + std::auto_ptr pt( static_cast( pv ) ); + + pt->run(); + + return 0; +} + +#endif + +template class lw_thread_impl: public lw_abstract_thread +{ +public: + + explicit lw_thread_impl( F f ): f_( f ) + { + } + + void run() + { + f_(); + } + +private: + + F f_; +}; + +template int lw_thread_create( pthread_t & pt, F f ) +{ + std::auto_ptr p( new lw_thread_impl( f ) ); + + int r = pthread_create( &pt, 0, lw_thread_routine, p.get() ); + + if( r == 0 ) + { + p.release(); + } + + return r; +} + +} // namespace detail +} // namespace boost + +#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/limits.hpp new file mode 100644 index 0000000000..6f018dfaca --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/limits.hpp @@ -0,0 +1,449 @@ +// Copyright 2001 John Maddock +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is not portable code. Parts of numeric_limits<> are + * inherently machine-dependent, and this file is written for the MIPS + * architecture and the SGI MIPSpro C++ compiler. Parts of it (in + * particular, some of the characteristics of floating-point types) + * are almost certainly incorrect for any other platform. + */ + +/* The above comment is almost certainly out of date. This file works + * on systems other than SGI MIPSpro C++ now. + */ + +/* + * Revision history: + * 21 Sep 2001: + * Only include if BOOST_NO_CWCHAR is defined. (Darin Adler) + * 10 Aug 2001: + * Added MIPS (big endian) to the big endian family. (Jens Maurer) + * 13 Apr 2001: + * Added powerpc to the big endian family. (Jeremy Siek) + * 5 Apr 2001: + * Added sparc (big endian) processor support (John Maddock). + * Initial sub: + * Modified by Jens Maurer for gcc 2.95 on x86. + */ + +#ifndef BOOST_SGI_CPP_LIMITS +#define BOOST_SGI_CPP_LIMITS + +#include +#include +#include +#include + +#ifndef BOOST_NO_CWCHAR +#include // for WCHAR_MIN and WCHAR_MAX +#endif + +namespace std { + +enum float_round_style { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 +}; + +enum float_denorm_style { + denorm_indeterminate = -1, + denorm_absent = 0, + denorm_present = 1 +}; + +// The C++ standard (section 18.2.1) requires that some of the members of +// numeric_limits be static const data members that are given constant- +// initializers within the class declaration. On compilers where the +// BOOST_NO_INCLASS_MEMBER_INITIALIZATION macro is defined, it is impossible to write +// a standard-conforming numeric_limits class. +// +// There are two possible workarounds: either initialize the data +// members outside the class, or change them from data members to +// enums. Neither workaround is satisfactory: the former makes it +// impossible to use the data members in constant-expressions, and the +// latter means they have the wrong type and that it is impossible to +// take their addresses. We choose the former workaround. + +#ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_STL_DECLARE_LIMITS_MEMBER(__mem_type, __mem_name, __mem_value) \ + enum { __mem_name = __mem_value } +#else /* BOOST_NO_INCLASS_MEMBER_INITIALIZATION */ +# define BOOST_STL_DECLARE_LIMITS_MEMBER(__mem_type, __mem_name, __mem_value) \ + static const __mem_type __mem_name = __mem_value +#endif /* BOOST_NO_INCLASS_MEMBER_INITIALIZATION */ + +// Base class for all specializations of numeric_limits. +template +class _Numeric_limits_base { +public: + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, false); + + static __number min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __number(); } + static __number max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __number(); } + + BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits, 0); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, 0); + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_integer, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_exact, false); + + BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 0); + + static __number epsilon() throw() { return __number(); } + static __number round_error() throw() { return __number(); } + + BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent, 0); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent10, 0); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent, 0); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent10, 0); + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_infinity, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_quiet_NaN, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_signaling_NaN, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(float_denorm_style, + has_denorm, + denorm_absent); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false); + + static __number infinity() throw() { return __number(); } + static __number quiet_NaN() throw() { return __number(); } + static __number signaling_NaN() throw() { return __number(); } + static __number denorm_min() throw() { return __number(); } + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_iec559, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_modulo, false); + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, traps, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, tinyness_before, false); + BOOST_STL_DECLARE_LIMITS_MEMBER(float_round_style, + round_style, + round_toward_zero); +}; + +// Base class for integers. + +template +class _Integer_limits : public _Numeric_limits_base<_Int> +{ +public: + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, true); + + static _Int min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __imin; } + static _Int max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __imax; } + + BOOST_STL_DECLARE_LIMITS_MEMBER(int, + digits, + (__idigits < 0) ? (int)(sizeof(_Int) * CHAR_BIT) + - (__imin == 0 ? 0 : 1) + : __idigits); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, (digits * 301) / 1000); + // log 2 = 0.301029995664... + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, __imin != 0); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_integer, true); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_exact, true); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 2); + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, true); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_modulo, true); +}; + +#if defined(BOOST_BIG_ENDIAN) + + template + struct float_helper{ + static Number get_word() throw() { + // sizeof(long double) == 16 + const unsigned int _S_word[4] = { Word, 0, 0, 0 }; + return *reinterpret_cast(&_S_word); + } +}; + +#else + + template + struct float_helper{ + static Number get_word() throw() { + // sizeof(long double) == 12, but only 10 bytes significant + const unsigned int _S_word[4] = { 0, 0, 0, Word }; + return *reinterpret_cast( + reinterpret_cast(&_S_word)+16- + (sizeof(Number) == 12 ? 10 : sizeof(Number))); + } +}; + +#endif + +// Base class for floating-point numbers. +template +class _Floating_limits : public _Numeric_limits_base<__number> +{ +public: + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, true); + + BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits, __Digits); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, __Digits10); + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, true); + + BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 2); + + BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent, __MinExp); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent, __MaxExp); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent10, __MinExp10); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent10, __MaxExp10); + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_infinity, true); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_quiet_NaN, true); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_signaling_NaN, true); + BOOST_STL_DECLARE_LIMITS_MEMBER(float_denorm_style, + has_denorm, + denorm_indeterminate); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false); + + + static __number infinity() throw() { + return float_helper<__number, __InfinityWord>::get_word(); + } + static __number quiet_NaN() throw() { + return float_helper<__number,__QNaNWord>::get_word(); + } + static __number signaling_NaN() throw() { + return float_helper<__number,__SNaNWord>::get_word(); + } + + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_iec559, __IsIEC559); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, true); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, traps, false /* was: true */ ); + BOOST_STL_DECLARE_LIMITS_MEMBER(bool, tinyness_before, false); + + BOOST_STL_DECLARE_LIMITS_MEMBER(float_round_style, round_style, __RoundStyle); +}; + +// Class numeric_limits + +// The unspecialized class. + +template +class numeric_limits : public _Numeric_limits_base {}; + +// Specializations for all built-in integral types. + +template<> +class numeric_limits + : public _Integer_limits +{}; + +template<> +class numeric_limits + : public _Integer_limits +{}; + +template<> +class numeric_limits + : public _Integer_limits +{}; + +template<> +class numeric_limits + : public _Integer_limits +{}; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template<> +class numeric_limits +#if !defined(WCHAR_MAX) || !defined(WCHAR_MIN) +#if defined(_WIN32) || defined(__CYGWIN__) + : public _Integer_limits +#elif defined(__hppa) +// wchar_t has "unsigned int" as the underlying type + : public _Integer_limits +#else +// assume that wchar_t has "int" as the underlying type + : public _Integer_limits +#endif +#else +// we have WCHAR_MIN and WCHAR_MAX defined, so use it + : public _Integer_limits +#endif +{}; +#endif + +template<> +class numeric_limits + : public _Integer_limits +{}; + +template<> +class numeric_limits + : public _Integer_limits +{}; + +template<> +class numeric_limits + : public _Integer_limits +{}; + +template<> +class numeric_limits + : public _Integer_limits +{}; + +template<> +class numeric_limits + : public _Integer_limits +{}; + +template<> +class numeric_limits + : public _Integer_limits +{}; + +#ifdef __GNUC__ + +// Some compilers have long long, but don't define the +// LONGLONG_MIN and LONGLONG_MAX macros in limits.h. This +// assumes that long long is 64 bits. +#if !defined(LONGLONG_MAX) && !defined(ULONGLONG_MAX) + +# define ULONGLONG_MAX 0xffffffffffffffffLLU +# define LONGLONG_MAX 0x7fffffffffffffffLL + +#endif + +#if !defined(LONGLONG_MIN) +# define LONGLONG_MIN (-LONGLONG_MAX - 1) +#endif + + +#if !defined(ULONGLONG_MIN) +# define ULONGLONG_MIN 0 +#endif + +#endif /* __GNUC__ */ + +// Specializations for all built-in floating-point type. + +template<> class numeric_limits + : public _Floating_limits +{ +public: + static float min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return FLT_MIN; } + static float denorm_min() throw() { return FLT_MIN; } + static float max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return FLT_MAX; } + static float epsilon() throw() { return FLT_EPSILON; } + static float round_error() throw() { return 0.5f; } // Units: ulps. +}; + +template<> class numeric_limits + : public _Floating_limits +{ +public: + static double min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return DBL_MIN; } + static double denorm_min() throw() { return DBL_MIN; } + static double max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return DBL_MAX; } + static double epsilon() throw() { return DBL_EPSILON; } + static double round_error() throw() { return 0.5; } // Units: ulps. +}; + +template<> class numeric_limits + : public _Floating_limits +{ +public: + static long double min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return LDBL_MIN; } + static long double denorm_min() throw() { return LDBL_MIN; } + static long double max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return LDBL_MAX; } + static long double epsilon() throw() { return LDBL_EPSILON; } + static long double round_error() throw() { return 4; } // Units: ulps. +}; + +} // namespace std + +#endif /* BOOST_SGI_CPP_LIMITS */ + +// Local Variables: +// mode:C++ +// End: + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/named_template_params.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/named_template_params.hpp new file mode 100644 index 0000000000..e7cb079433 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/named_template_params.hpp @@ -0,0 +1,177 @@ +// (C) Copyright Jeremy Siek 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Revision History: + +// 04 Oct 2001 David Abrahams +// Changed name of "bind" to "select" to avoid problems with MSVC. + +#ifndef BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP +#define BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP + +#include +#include // for is_reference +#if defined(__BORLANDC__) +#include +#endif + +namespace boost { + namespace detail { + + struct default_argument { }; + + struct dummy_default_gen { + template + struct select { + typedef default_argument type; + }; + }; + + // This class template is a workaround for MSVC. + template struct default_generator { + typedef detail::dummy_default_gen type; + }; + + template struct is_default { + enum { value = false }; + typedef type_traits::no_type type; + }; + template <> struct is_default { + enum { value = true }; + typedef type_traits::yes_type type; + }; + + struct choose_default { + template + struct select { + typedef typename default_generator::type Gen; + typedef typename Gen::template select::type type; + }; + }; + struct choose_arg { + template + struct select { + typedef Arg type; + }; + }; + +#if defined(__BORLANDC__) + template + struct choose_arg_or_default { typedef choose_arg type; }; + template <> + struct choose_arg_or_default { + typedef choose_default type; + }; +#else + template + struct choose_arg_or_default { typedef choose_arg type; }; + template <> + struct choose_arg_or_default { + typedef choose_default type; + }; +#endif + + template + class resolve_default { +#if defined(__BORLANDC__) + typedef typename choose_arg_or_default::type>::type Selector; +#else + // This usually works for Borland, but I'm seeing weird errors in + // iterator_adaptor_test.cpp when using this method. + enum { is_def = is_default::value }; + typedef typename choose_arg_or_default::type Selector; +#endif + public: + typedef typename Selector + ::template select::type type; + }; + + // To differentiate an unnamed parameter from a traits generator + // we use is_convertible. + struct named_template_param_base { }; + + template + struct is_named_param_list { + enum { value = is_convertible::value }; + }; + + struct choose_named_params { + template struct select { typedef Prev type; }; + }; + struct choose_default_arg { + template struct select { + typedef detail::default_argument type; + }; + }; + + template struct choose_default_dispatch_; + template <> struct choose_default_dispatch_ { + typedef choose_named_params type; + }; + template <> struct choose_default_dispatch_ { + typedef choose_default_arg type; + }; + // The use of inheritance here is a Solaris Forte 6 workaround. + template struct choose_default_dispatch + : public choose_default_dispatch_ { }; + + template + struct choose_default_argument { + enum { is_named = is_named_param_list::value }; + typedef typename choose_default_dispatch::type Selector; + typedef typename Selector::template select::type type; + }; + + // This macro assumes that there is a class named default_##TYPE + // defined before the application of the macro. This class should + // have a single member class template named "select" with two + // template parameters: the type of the class being created (e.g., + // the iterator_adaptor type when creating iterator adaptors) and + // a traits class. The select class should have a single typedef + // named "type" that produces the default for TYPE. See + // boost/iterator_adaptors.hpp for an example usage. Also, + // applications of this macro must be placed in namespace + // boost::detail. + +#define BOOST_NAMED_TEMPLATE_PARAM(TYPE) \ + struct get_##TYPE##_from_named { \ + template \ + struct select { \ + typedef typename NamedParams::traits NamedTraits; \ + typedef typename NamedTraits::TYPE TYPE; \ + typedef typename resolve_default::type type; \ + }; \ + }; \ + struct pass_thru_##TYPE { \ + template struct select { \ + typedef typename resolve_default::type type; \ + };\ + }; \ + template \ + struct get_##TYPE##_dispatch { }; \ + template <> struct get_##TYPE##_dispatch<1> { \ + typedef get_##TYPE##_from_named type; \ + }; \ + template <> struct get_##TYPE##_dispatch<0> { \ + typedef pass_thru_##TYPE type; \ + }; \ + template \ + class get_##TYPE { \ + enum { is_named = is_named_param_list::value }; \ + typedef typename get_##TYPE##_dispatch::type Selector; \ + public: \ + typedef typename Selector::template select::type type; \ + }; \ + template <> struct default_generator { \ + typedef default_##TYPE type; \ + } + + + } // namespace detail +} // namespace boost + +#endif // BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/no_exceptions_support.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/no_exceptions_support.hpp new file mode 100644 index 0000000000..d94e35834f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/no_exceptions_support.hpp @@ -0,0 +1,87 @@ +#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP_ +#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP_ + +#if (defined _MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif + +//---------------------------------------------------------------------- +// (C) Copyright 2004 Pavel Vozenilek. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// +// This file contains helper macros used when exception support may be +// disabled (as indicated by macro BOOST_NO_EXCEPTIONS). +// +// Before picking up these macros you may consider using RAII techniques +// to deal with exceptions - their syntax can be always the same with +// or without exception support enabled. +// + +/* Example of use: + +void foo() { + BOOST_TRY { + ... + } BOOST_CATCH(const std::bad_alloc&) { + ... + BOOST_RETHROW + } BOOST_CATCH(const std::exception& e) { + ... + } + BOOST_CATCH_END +} + +With exception support enabled it will expand into: + +void foo() { + { try { + ... + } catch (const std::bad_alloc&) { + ... + throw; + } catch (const std::exception& e) { + ... + } + } +} + +With exception support disabled it will expand into: + +void foo() { + { if(true) { + ... + } else if (false) { + ... + } else if (false) { + ... + } + } +} +*/ +//---------------------------------------------------------------------- + +#include +#include + +#if !(defined BOOST_NO_EXCEPTIONS) +# define BOOST_TRY { try +# define BOOST_CATCH(x) catch(x) +# define BOOST_RETHROW throw; +# define BOOST_CATCH_END } +#else +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# define BOOST_TRY { if ("") +# define BOOST_CATCH(x) else if (!"") +# else +# define BOOST_TRY { if (true) +# define BOOST_CATCH(x) else if (false) +# endif +# define BOOST_RETHROW +# define BOOST_CATCH_END } +#endif + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/none_t.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/none_t.hpp new file mode 100644 index 0000000000..40805ec0ff --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/none_t.hpp @@ -0,0 +1,28 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_DETAIL_NONE_T_17SEP2003_HPP +#define BOOST_DETAIL_NONE_T_17SEP2003_HPP + +namespace boost { + +namespace detail { + +struct none_helper{}; + +typedef int none_helper::*none_t ; + +} // namespace detail + +} // namespace boost + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/numeric_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/numeric_traits.hpp new file mode 100644 index 0000000000..6325d70cb0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/numeric_traits.hpp @@ -0,0 +1,191 @@ +// (C) Copyright David Abrahams 2001, Howard Hinnant 2001. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Template class numeric_traits -- +// +// Supplies: +// +// typedef difference_type -- a type used to represent the difference +// between any two values of Number. +// +// Support: +// 1. Not all specializations are supplied +// +// 2. Use of specializations that are not supplied will cause a +// compile-time error +// +// 3. Users are free to specialize numeric_traits for any type. +// +// 4. Right now, specializations are only supplied for integer types. +// +// 5. On implementations which do not supply compile-time constants in +// std::numeric_limits<>, only specializations for built-in integer types +// are supplied. +// +// 6. Handling of numbers whose range of representation is at least as +// great as boost::intmax_t can cause some differences to be +// unrepresentable in difference_type: +// +// Number difference_type +// ------ --------------- +// signed Number +// unsigned intmax_t +// +// template typename numeric_traits::difference_type +// numeric_distance(Number x, Number y) +// computes (y - x), attempting to avoid overflows. +// + +// See http://www.boost.org for most recent version including documentation. + +// Revision History +// 11 Feb 2001 - Use BOOST_STATIC_CONSTANT (David Abrahams) +// 11 Feb 2001 - Rolled back ineffective Borland-specific code +// (David Abrahams) +// 10 Feb 2001 - Rolled in supposed Borland fixes from John Maddock, but +// not seeing any improvement yet (David Abrahams) +// 06 Feb 2001 - Factored if_true out into boost/detail/select_type.hpp +// (David Abrahams) +// 23 Jan 2001 - Fixed logic of difference_type selection, which was +// completely wack. In the process, added digit_traits<> +// to compute the number of digits in intmax_t even when +// not supplied by numeric_limits<>. (David Abrahams) +// 21 Jan 2001 - Created (David Abrahams) + +#ifndef BOOST_NUMERIC_TRAITS_HPP_DWA20001901 +# define BOOST_NUMERIC_TRAITS_HPP_DWA20001901 + +# include +# include +# include +# include +# include +# include + +namespace boost { namespace detail { + + // Template class is_signed -- determine whether a numeric type is signed + // Requires that T is constructable from the literals -1 and 0. Compile-time + // error results if that requirement is not met (and thus signedness is not + // likely to have meaning for that type). + template + struct is_signed + { +#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_MSVC) && BOOST_MSVC <= 1300 + BOOST_STATIC_CONSTANT(bool, value = (Number(-1) < Number(0))); +#else + BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits::is_signed); +#endif + }; + +# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + // digit_traits - compute the number of digits in a built-in integer + // type. Needed for implementations on which numeric_limits is not specialized + // for intmax_t (e.g. VC6). + template struct digit_traits_select; + + // numeric_limits is specialized; just select that version of digits + template <> struct digit_traits_select + { + template struct traits + { + BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits::digits); + }; + }; + + // numeric_limits is not specialized; compute digits from sizeof(T) + template <> struct digit_traits_select + { + template struct traits + { + BOOST_STATIC_CONSTANT(int, digits = ( + sizeof(T) * std::numeric_limits::digits + - (is_signed::value ? 1 : 0)) + ); + }; + }; + + // here's the "usable" template + template struct digit_traits + { + typedef digit_traits_select< + ::std::numeric_limits::is_specialized> selector; + typedef typename selector::template traits traits; + BOOST_STATIC_CONSTANT(int, digits = traits::digits); + }; +#endif + + // Template class integer_traits -- traits of various integer types + // This should probably be rolled into boost::integer_traits one day, but I + // need it to work without + template + struct integer_traits + { +# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + private: + typedef Integer integer_type; + typedef std::numeric_limits x; +# if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 + // for some reason, MSVC asserts when it shouldn't unless we make these + // local definitions + BOOST_STATIC_CONSTANT(bool, is_integer = x::is_integer); + BOOST_STATIC_CONSTANT(bool, is_specialized = x::is_specialized); + + BOOST_STATIC_ASSERT(is_integer); + BOOST_STATIC_ASSERT(is_specialized); +# endif + public: + typedef typename + if_true<(int(x::is_signed) + && (!int(x::is_bounded) + // digits is the number of no-sign bits + || (int(x::digits) + 1 >= digit_traits::digits)))>::template then< + Integer, + + typename if_true<(int(x::digits) + 1 < digit_traits::digits)>::template then< + signed int, + + typename if_true<(int(x::digits) + 1 < digit_traits::digits)>::template then< + signed long, + + // else + intmax_t + >::type>::type>::type difference_type; +#else + BOOST_STATIC_ASSERT(boost::is_integral::value); + + typedef typename + if_true<(sizeof(Integer) >= sizeof(intmax_t))>::template then< + + typename if_true<(is_signed::value)>::template then< + Integer, + intmax_t + >::type, + + typename if_true<(sizeof(Integer) < sizeof(std::ptrdiff_t))>::template then< + std::ptrdiff_t, + intmax_t + >::type + >::type difference_type; +# endif + }; + + // Right now, only supports integers, but should be expanded. + template + struct numeric_traits + { + typedef typename integer_traits::difference_type difference_type; + }; + + template + typename numeric_traits::difference_type numeric_distance(Number x, Number y) + { + typedef typename numeric_traits::difference_type difference_type; + return difference_type(y) - difference_type(x); + } +}} + +#endif // BOOST_NUMERIC_TRAITS_HPP_DWA20001901 diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/ob_call_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/ob_call_traits.hpp new file mode 100644 index 0000000000..eb4df7a30f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/ob_call_traits.hpp @@ -0,0 +1,168 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. +// +// Crippled version for crippled compilers: +// see libs/utility/call_traits.htm +// + +/* Release notes: + 01st October 2000: + Fixed call_traits on VC6, using "poor man's partial specialisation", + using ideas taken from "Generative programming" by Krzysztof Czarnecki + & Ulrich Eisenecker. +*/ + +#ifndef BOOST_OB_CALL_TRAITS_HPP +#define BOOST_OB_CALL_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP +#include +#endif +#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP +#include +#endif + +namespace boost{ + +#ifdef BOOST_MSVC6_MEMBER_TEMPLATES +// +// use member templates to emulate +// partial specialisation: +// +namespace detail{ + +template +struct standard_call_traits +{ + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef const T& param_type; +}; +template +struct simple_call_traits +{ + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef const T param_type; +}; +template +struct reference_call_traits +{ + typedef T value_type; + typedef T reference; + typedef T const_reference; + typedef T param_type; +}; + +template +struct call_traits_chooser +{ + template + struct rebind + { + typedef standard_call_traits type; + }; +}; + +template <> +struct call_traits_chooser +{ + template + struct rebind + { + typedef simple_call_traits type; + }; +}; + +template <> +struct call_traits_chooser +{ + template + struct rebind + { + typedef reference_call_traits type; + }; +}; + +template +struct call_traits_sizeof_chooser2 +{ + template + struct small_rebind + { + typedef simple_call_traits small_type; + }; +}; + +template<> +struct call_traits_sizeof_chooser2 +{ + template + struct small_rebind + { + typedef standard_call_traits small_type; + }; +}; + +template <> +struct call_traits_chooser +{ + template + struct rebind + { + enum { sizeof_choice = (sizeof(T) <= sizeof(void*)) }; + typedef call_traits_sizeof_chooser2<(sizeof(T) <= sizeof(void*))> chooser; + typedef typename chooser::template small_rebind bound_type; + typedef typename bound_type::small_type type; + }; +}; + +} // namespace detail +template +struct call_traits +{ +private: + typedef detail::call_traits_chooser< + ::boost::is_pointer::value, + ::boost::is_arithmetic::value, + ::boost::is_reference::value + > chooser; + typedef typename chooser::template rebind bound_type; + typedef typename bound_type::type call_traits_type; +public: + typedef typename call_traits_type::value_type value_type; + typedef typename call_traits_type::reference reference; + typedef typename call_traits_type::const_reference const_reference; + typedef typename call_traits_type::param_type param_type; +}; + +#else +// +// sorry call_traits is completely non-functional +// blame your broken compiler: +// + +template +struct call_traits +{ + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef const T& param_type; +}; + +#endif // member templates + +} + +#endif // BOOST_OB_CALL_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/ob_compressed_pair.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/ob_compressed_pair.hpp new file mode 100644 index 0000000000..727acab6da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/ob_compressed_pair.hpp @@ -0,0 +1,510 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. +// see libs/utility/compressed_pair.hpp +// +/* Release notes: + 20 Jan 2001: + Fixed obvious bugs (David Abrahams) + 07 Oct 2000: + Added better single argument constructor support. + 03 Oct 2000: + Added VC6 support (JM). + 23rd July 2000: + Additional comments added. (JM) + Jan 2000: + Original version: this version crippled for use with crippled compilers + - John Maddock Jan 2000. +*/ + + +#ifndef BOOST_OB_COMPRESSED_PAIR_HPP +#define BOOST_OB_COMPRESSED_PAIR_HPP + +#include +#ifndef BOOST_OBJECT_TYPE_TRAITS_HPP +#include +#endif +#ifndef BOOST_SAME_TRAITS_HPP +#include +#endif +#ifndef BOOST_CALL_TRAITS_HPP +#include +#endif + +namespace boost +{ +#ifdef BOOST_MSVC6_MEMBER_TEMPLATES +// +// use member templates to emulate +// partial specialisation. Note that due to +// problems with overload resolution with VC6 +// each of the compressed_pair versions that follow +// have one template single-argument constructor +// in place of two specific constructors: +// + +template +class compressed_pair; + +namespace detail{ + +template +struct best_conversion_traits +{ + typedef char one; + typedef char (&two)[2]; + static A a; + static one test(T1); + static two test(T2); + + enum { value = sizeof(test(a)) }; +}; + +template +struct init_one; + +template <> +struct init_one<1> +{ + template + static void init(const A& a, T1* p1, T2*) + { + *p1 = a; + } +}; + +template <> +struct init_one<2> +{ + template + static void init(const A& a, T1*, T2* p2) + { + *p2 = a; + } +}; + + +// T1 != T2, both non-empty +template +class compressed_pair_0 +{ +private: + T1 _first; + T2 _second; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_0() : _first(), _second() {} + compressed_pair_0(first_param_type x, second_param_type y) : _first(x), _second(y) {} + template + explicit compressed_pair_0(const A& val) + { + init_one::value>::init(val, &_first, &_second); + } + compressed_pair_0(const ::boost::compressed_pair& x) + : _first(x.first()), _second(x.second()) {} + +#if 0 + compressed_pair_0& operator=(const compressed_pair_0& x) { + cout << "assigning compressed pair 0" << endl; + _first = x._first; + _second = x._second; + cout << "finished assigning compressed pair 0" << endl; + return *this; + } +#endif + + first_reference first() { return _first; } + first_const_reference first() const { return _first; } + + second_reference second() { return _second; } + second_const_reference second() const { return _second; } + + void swap(compressed_pair_0& y) + { + using std::swap; + swap(_first, y._first); + swap(_second, y._second); + } +}; + +// T1 != T2, T2 empty +template +class compressed_pair_1 : T2 +{ +private: + T1 _first; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_1() : T2(), _first() {} + compressed_pair_1(first_param_type x, second_param_type y) : T2(y), _first(x) {} + + template + explicit compressed_pair_1(const A& val) + { + init_one::value>::init(val, &_first, static_cast(this)); + } + + compressed_pair_1(const ::boost::compressed_pair& x) + : T2(x.second()), _first(x.first()) {} + +#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 + // Total weirdness. If the assignment to _first is moved after + // the call to the inherited operator=, then this breaks graph/test/graph.cpp + // by way of iterator_adaptor. + compressed_pair_1& operator=(const compressed_pair_1& x) { + _first = x._first; + T2::operator=(x); + return *this; + } +#endif + + first_reference first() { return _first; } + first_const_reference first() const { return _first; } + + second_reference second() { return *this; } + second_const_reference second() const { return *this; } + + void swap(compressed_pair_1& y) + { + // no need to swap empty base class: + using std::swap; + swap(_first, y._first); + } +}; + +// T1 != T2, T1 empty +template +class compressed_pair_2 : T1 +{ +private: + T2 _second; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_2() : T1(), _second() {} + compressed_pair_2(first_param_type x, second_param_type y) : T1(x), _second(y) {} + template + explicit compressed_pair_2(const A& val) + { + init_one::value>::init(val, static_cast(this), &_second); + } + compressed_pair_2(const ::boost::compressed_pair& x) + : T1(x.first()), _second(x.second()) {} + +#if 0 + compressed_pair_2& operator=(const compressed_pair_2& x) { + cout << "assigning compressed pair 2" << endl; + T1::operator=(x); + _second = x._second; + cout << "finished assigning compressed pair 2" << endl; + return *this; + } +#endif + first_reference first() { return *this; } + first_const_reference first() const { return *this; } + + second_reference second() { return _second; } + second_const_reference second() const { return _second; } + + void swap(compressed_pair_2& y) + { + // no need to swap empty base class: + using std::swap; + swap(_second, y._second); + } +}; + +// T1 != T2, both empty +template +class compressed_pair_3 : T1, T2 +{ +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_3() : T1(), T2() {} + compressed_pair_3(first_param_type x, second_param_type y) : T1(x), T2(y) {} + template + explicit compressed_pair_3(const A& val) + { + init_one::value>::init(val, static_cast(this), static_cast(this)); + } + compressed_pair_3(const ::boost::compressed_pair& x) + : T1(x.first()), T2(x.second()) {} + + first_reference first() { return *this; } + first_const_reference first() const { return *this; } + + second_reference second() { return *this; } + second_const_reference second() const { return *this; } + + void swap(compressed_pair_3& y) + { + // no need to swap empty base classes: + } +}; + +// T1 == T2, and empty +template +class compressed_pair_4 : T1 +{ +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_4() : T1() {} + compressed_pair_4(first_param_type x, second_param_type y) : T1(x), m_second(y) {} + // only one single argument constructor since T1 == T2 + explicit compressed_pair_4(first_param_type x) : T1(x), m_second(x) {} + compressed_pair_4(const ::boost::compressed_pair& x) + : T1(x.first()), m_second(x.second()) {} + + first_reference first() { return *this; } + first_const_reference first() const { return *this; } + + second_reference second() { return m_second; } + second_const_reference second() const { return m_second; } + + void swap(compressed_pair_4& y) + { + // no need to swap empty base classes: + } +private: + T2 m_second; +}; + +// T1 == T2, not empty +template +class compressed_pair_5 +{ +private: + T1 _first; + T2 _second; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_5() : _first(), _second() {} + compressed_pair_5(first_param_type x, second_param_type y) : _first(x), _second(y) {} + // only one single argument constructor since T1 == T2 + explicit compressed_pair_5(first_param_type x) : _first(x), _second(x) {} + compressed_pair_5(const ::boost::compressed_pair& c) + : _first(c.first()), _second(c.second()) {} + + first_reference first() { return _first; } + first_const_reference first() const { return _first; } + + second_reference second() { return _second; } + second_const_reference second() const { return _second; } + + void swap(compressed_pair_5& y) + { + using std::swap; + swap(_first, y._first); + swap(_second, y._second); + } +}; + +template +struct compressed_pair_chooser +{ + template + struct rebind + { + typedef compressed_pair_0 type; + }; +}; + +template <> +struct compressed_pair_chooser +{ + template + struct rebind + { + typedef compressed_pair_1 type; + }; +}; + +template <> +struct compressed_pair_chooser +{ + template + struct rebind + { + typedef compressed_pair_2 type; + }; +}; + +template <> +struct compressed_pair_chooser +{ + template + struct rebind + { + typedef compressed_pair_3 type; + }; +}; + +template <> +struct compressed_pair_chooser +{ + template + struct rebind + { + typedef compressed_pair_4 type; + }; +}; + +template <> +struct compressed_pair_chooser +{ + template + struct rebind + { + typedef compressed_pair_5 type; + }; +}; + +template +struct compressed_pair_traits +{ +private: + typedef compressed_pair_chooser::value, is_empty::value, is_same::value> chooser; + typedef typename chooser::template rebind bound_type; +public: + typedef typename bound_type::type type; +}; + +} // namespace detail + +template +class compressed_pair : public detail::compressed_pair_traits::type +{ +private: + typedef typename detail::compressed_pair_traits::type base_type; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair() : base_type() {} + compressed_pair(first_param_type x, second_param_type y) : base_type(x, y) {} + template + explicit compressed_pair(const A& x) : base_type(x){} + + first_reference first() { return base_type::first(); } + first_const_reference first() const { return base_type::first(); } + + second_reference second() { return base_type::second(); } + second_const_reference second() const { return base_type::second(); } +}; + +template +inline void swap(compressed_pair& x, compressed_pair& y) +{ + x.swap(y); +} + +#else +// no partial specialisation, no member templates: + +template +class compressed_pair +{ +private: + T1 _first; + T2 _second; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair() : _first(), _second() {} + compressed_pair(first_param_type x, second_param_type y) : _first(x), _second(y) {} + explicit compressed_pair(first_param_type x) : _first(x), _second() {} + // can't define this in case T1 == T2: + // explicit compressed_pair(second_param_type y) : _first(), _second(y) {} + + first_reference first() { return _first; } + first_const_reference first() const { return _first; } + + second_reference second() { return _second; } + second_const_reference second() const { return _second; } + + void swap(compressed_pair& y) + { + using std::swap; + swap(_first, y._first); + swap(_second, y._second); + } +}; + +template +inline void swap(compressed_pair& x, compressed_pair& y) +{ + x.swap(y); +} + +#endif + +} // boost + +#endif // BOOST_OB_COMPRESSED_PAIR_HPP + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/quick_allocator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/quick_allocator.hpp new file mode 100644 index 0000000000..d54b3a792d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/quick_allocator.hpp @@ -0,0 +1,23 @@ +#ifndef BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED +#define BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// detail/quick_allocator.hpp +// +// Copyright (c) 2003 David Abrahams +// Copyright (c) 2003 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include + +#endif // #ifndef BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/reference_content.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/reference_content.hpp new file mode 100644 index 0000000000..daf56a8b19 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/reference_content.hpp @@ -0,0 +1,141 @@ +//----------------------------------------------------------------------------- +// boost detail/reference_content.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_DETAIL_REFERENCE_CONTENT_HPP +#define BOOST_DETAIL_REFERENCE_CONTENT_HPP + +#include "boost/config.hpp" + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include "boost/mpl/bool.hpp" +# include "boost/type_traits/has_nothrow_copy.hpp" +#else +# include "boost/mpl/if.hpp" +# include "boost/type_traits/is_reference.hpp" +#endif + +#include "boost/mpl/void.hpp" + +namespace boost { + +namespace detail { + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class template reference_content +// +// Non-Assignable wrapper for references. +// +template +class reference_content +{ +private: // representation + + RefT content_; + +public: // structors + + ~reference_content() + { + } + + reference_content(RefT r) + : content_( r ) + { + } + + reference_content(const reference_content& operand) + : content_( operand.content_ ) + { + } + +private: // non-Assignable + + reference_content& operator=(const reference_content&); + +public: // queries + + RefT get() const + { + return content_; + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) metafunction make_reference_content +// +// Wraps with reference_content if specified type is reference. +// + +template struct make_reference_content; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template +struct make_reference_content +{ + typedef T type; +}; + +template +struct make_reference_content< T& > +{ + typedef reference_content type; +}; + +#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template +struct make_reference_content + : mpl::if_< + is_reference + , reference_content + , T + > +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround + +template <> +struct make_reference_content< mpl::void_ > +{ + template + struct apply + : make_reference_content + { + }; + + typedef mpl::void_ type; +}; + +} // namespace detail + +/////////////////////////////////////////////////////////////////////////////// +// reference_content type traits specializations +// + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template +struct has_nothrow_copy< + ::boost::detail::reference_content< T& > + > + : mpl::true_ +{ +}; + +#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +} // namespace boost + +#endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/scoped_enum_emulation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/scoped_enum_emulation.hpp new file mode 100644 index 0000000000..e695a20857 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/scoped_enum_emulation.hpp @@ -0,0 +1,56 @@ +// scoped_enum_emulation.hpp ---------------------------------------------------------// + +// Copyright Beman Dawes, 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Generates C++0x scoped enums if the feature is present, otherwise emulates C++0x +// scoped enums with C++03 namespaces and enums. The Boost.Config BOOST_NO_SCOPED_ENUMS +// macro is used to detect feature support. +// +// See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf for a +// description of the scoped enum feature. Note that the committee changed the name +// from strongly typed enum to scoped enum. +// +// Caution: only the syntax is emulated; the semantics are not emulated and +// the syntax emulation doesn't include being able to specify the underlying +// representation type. +// +// The emulation is via struct rather than namespace to allow use within classes. +// Thanks to Andrey Semashev for pointing that out. +// +// Helpful comments and suggestions were also made by Kjell Elster, Phil Endecott, +// Joel Falcou, Mathias Gaunard, Felipe Magno de Almeida, Matt Calabrese, Vincente +// Botet, and Daniel James. +// +// Sample usage: +// +// BOOST_SCOPED_ENUM_START(algae) { green, red, cyan }; BOOST_SCOPED_ENUM_END +// ... +// BOOST_SCOPED_ENUM(algae) sample( algae::red ); +// void foo( BOOST_SCOPED_ENUM(algae) color ); +// ... +// sample = algae::green; +// foo( algae::cyan ); + +#ifndef BOOST_SCOPED_ENUM_EMULATION_HPP +#define BOOST_SCOPED_ENUM_EMULATION_HPP + +#include + +#ifdef BOOST_NO_SCOPED_ENUMS + +# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type +# define BOOST_SCOPED_ENUM_END }; +# define BOOST_SCOPED_ENUM(name) name::enum_type + +#else + +# define BOOST_SCOPED_ENUM_START(name) enum class name +# define BOOST_SCOPED_ENUM_END +# define BOOST_SCOPED_ENUM(name) name + +#endif + +#endif // BOOST_SCOPED_ENUM_EMULATION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/select_type.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/select_type.hpp new file mode 100644 index 0000000000..c13946f338 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/select_type.hpp @@ -0,0 +1,36 @@ +// (C) Copyright David Abrahams 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for most recent version including documentation. + +// Revision History +// 09 Feb 01 Applied John Maddock's Borland patch Moving +// specialization to unspecialized template (David Abrahams) +// 06 Feb 01 Created (David Abrahams) + +#ifndef SELECT_TYPE_DWA20010206_HPP +# define SELECT_TYPE_DWA20010206_HPP + +namespace boost { namespace detail { + + // Template class if_true -- select among 2 types based on a bool constant expression + // Usage: + // typename if_true<(bool_const_expression)>::template then::type + + // HP aCC cannot deal with missing names for template value parameters + template struct if_true + { + template + struct then { typedef T type; }; + }; + + template <> + struct if_true + { + template + struct then { typedef F type; }; + }; +}} +#endif // SELECT_TYPE_DWA20010206_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/sp_typeinfo.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/sp_typeinfo.hpp new file mode 100644 index 0000000000..43fae78ef1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/sp_typeinfo.hpp @@ -0,0 +1,135 @@ +#ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED +#define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_typeinfo.hpp +// +// Copyright 2007 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include + +#if defined( BOOST_NO_TYPEID ) + +#include +#include + +namespace boost +{ + +namespace detail +{ + +class sp_typeinfo +{ +private: + + sp_typeinfo( sp_typeinfo const& ); + sp_typeinfo& operator=( sp_typeinfo const& ); + + char const * name_; + +public: + + explicit sp_typeinfo( char const * name ): name_( name ) + { + } + + bool operator==( sp_typeinfo const& rhs ) const + { + return this == &rhs; + } + + bool operator!=( sp_typeinfo const& rhs ) const + { + return this != &rhs; + } + + bool before( sp_typeinfo const& rhs ) const + { + return std::less< sp_typeinfo const* >()( this, &rhs ); + } + + char const* name() const + { + return name_; + } +}; + +template struct sp_typeid_ +{ + static sp_typeinfo ti_; + + static char const * name() + { + return BOOST_CURRENT_FUNCTION; + } +}; + +#if defined(__SUNPRO_CC) +// see #4199, the Sun Studio compiler gets confused about static initialization +// constructor arguments. But an assignment works just fine. +template sp_typeinfo sp_typeid_< T >::ti_ = sp_typeid_< T >::name(); +#else +template sp_typeinfo sp_typeid_< T >::ti_(sp_typeid_< T >::name()); +#endif + +template struct sp_typeid_< T & >: sp_typeid_< T > +{ +}; + +template struct sp_typeid_< T const >: sp_typeid_< T > +{ +}; + +template struct sp_typeid_< T volatile >: sp_typeid_< T > +{ +}; + +template struct sp_typeid_< T const volatile >: sp_typeid_< T > +{ +}; + +} // namespace detail + +} // namespace boost + +#define BOOST_SP_TYPEID(T) (boost::detail::sp_typeid_::ti_) + +#else + +#include + +namespace boost +{ + +namespace detail +{ + +#if defined( BOOST_NO_STD_TYPEINFO ) + +typedef ::type_info sp_typeinfo; + +#else + +typedef std::type_info sp_typeinfo; + +#endif + +} // namespace detail + +} // namespace boost + +#define BOOST_SP_TYPEID(T) typeid(T) + +#endif + +#endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/templated_streams.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/templated_streams.hpp new file mode 100644 index 0000000000..1fa6ee3534 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/templated_streams.hpp @@ -0,0 +1,74 @@ +//----------------------------------------------------------------------------- +// boost detail/templated_streams.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_DETAIL_TEMPLATED_STREAMS_HPP +#define BOOST_DETAIL_TEMPLATED_STREAMS_HPP + +#include "boost/config.hpp" + +/////////////////////////////////////////////////////////////////////////////// +// (detail) BOOST_TEMPLATED_STREAM_* macros +// +// Provides workaround platforms without stream class templates. +// + +#if !defined(BOOST_NO_STD_LOCALE) + +#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) \ + template < typename E , typename T > + +#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) \ + template < typename E , typename T , typename A > + +#define BOOST_TEMPLATED_STREAM_ARGS(E,T) \ + typename E , typename T + +#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) \ + typename E , typename T , typename A + +#define BOOST_TEMPLATED_STREAM_COMMA , + +#define BOOST_TEMPLATED_STREAM_ELEM(E) E +#define BOOST_TEMPLATED_STREAM_TRAITS(T) T +#define BOOST_TEMPLATED_STREAM_ALLOC(A) A + +#define BOOST_TEMPLATED_STREAM(X,E,T) \ + BOOST_JOIN(std::basic_,X)< E , T > + +#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \ + BOOST_JOIN(std::basic_,X)< E , T , A > + +#else // defined(BOOST_NO_STD_LOCALE) + +#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) /**/ + +#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) /**/ + +#define BOOST_TEMPLATED_STREAM_ARGS(E,T) /**/ + +#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) /**/ + +#define BOOST_TEMPLATED_STREAM_COMMA /**/ + +#define BOOST_TEMPLATED_STREAM_ELEM(E) char +#define BOOST_TEMPLATED_STREAM_TRAITS(T) std::char_traits +#define BOOST_TEMPLATED_STREAM_ALLOC(A) std::allocator + +#define BOOST_TEMPLATED_STREAM(X,E,T) \ + std::X + +#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \ + std::X + +#endif // BOOST_NO_STD_LOCALE + +#endif // BOOST_DETAIL_TEMPLATED_STREAMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/utf8_codecvt_facet.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/utf8_codecvt_facet.hpp new file mode 100644 index 0000000000..b777ff934e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/utf8_codecvt_facet.hpp @@ -0,0 +1,190 @@ +// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UTF8_CODECVT_FACET_HPP +#define BOOST_UTF8_CODECVT_FACET_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// utf8_codecvt_facet.hpp + +// This header defines class utf8_codecvt_facet, derived fro +// std::codecvt, which can be used to convert utf8 data in +// files into wchar_t strings in the application. +// +// The header is NOT STANDALONE, and is not to be included by the USER. +// There are at least two libraries which want to use this functionality, and +// we want to avoid code duplication. It would be possible to create utf8 +// library, but: +// - this requires review process first +// - in the case, when linking the a library which uses utf8 +// (say 'program_options'), user should also link to the utf8 library. +// This seems inconvenient, and asking a user to link to an unrevieved +// library is strange. +// Until the above points are fixed, a library which wants to use utf8 must: +// - include this header from one of it's headers or sources +// - include the corresponding .cpp file from one of the sources +// - before including either file, the library must define +// - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used +// - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace +// - declaration. +// - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable' +// symbols. +// +// For example, program_options library might contain: +// #define BOOST_UTF8_BEGIN_NAMESPACE +// namespace boost { namespace program_options { +// #define BOOST_UTF8_END_NAMESPACE }} +// #define BOOST_UTF8_DECL BOOST_PROGRAM_OPTIONS_DECL +// #include "../../detail/utf8/utf8_codecvt.cpp" +// +// Essentially, each library will have its own copy of utf8 code, in +// different namespaces. + +// Note:(Robert Ramey). I have made the following alterations in the original +// code. +// a) Rendered utf8_codecvt with using templates +// b) Move longer functions outside class definition to prevent inlining +// and make code smaller +// c) added on a derived class to permit translation to/from current +// locale to utf8 + +// See http://www.boost.org for updates, documentation, and revision history. + +// archives stored as text - note these ar templated on the basic +// stream templates to accommodate wide (and other?) kind of characters +// +// note the fact that on libraries without wide characters, ostream is +// is not a specialization of basic_ostream which in fact is not defined +// in such cases. So we can't use basic_ostream but rather +// use two template parameters +// +// utf8_codecvt_facet +// This is an implementation of a std::codecvt facet for translating +// from UTF-8 externally to UCS-4. Note that this is not tied to +// any specific types in order to allow customization on platforms +// where wchar_t is not big enough. +// +// NOTES: The current implementation jumps through some unpleasant hoops in +// order to deal with signed character types. As a std::codecvt_base::result, +// it is necessary for the ExternType to be convertible to unsigned char. +// I chose not to tie the extern_type explicitly to char. But if any combination +// of types other than is used, then std::codecvt must be +// specialized on those types for this to work. + +#include +#include // for mbstate_t +#include // for std::size_t + +#include +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std { + using ::mbstate_t; + using ::size_t; +} +#endif + +#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) + #define BOOST_CODECVT_DO_LENGTH_CONST const +#else + #define BOOST_CODECVT_DO_LENGTH_CONST +#endif + +// maximum lenght of a multibyte string +#define MB_LENGTH_MAX 8 + +BOOST_UTF8_BEGIN_NAMESPACE + +struct BOOST_UTF8_DECL utf8_codecvt_facet : + public std::codecvt +{ +public: + explicit utf8_codecvt_facet(std::size_t no_locale_manage=0) + : std::codecvt(no_locale_manage) + {} +protected: + virtual std::codecvt_base::result do_in( + std::mbstate_t& state, + const char * from, + const char * from_end, + const char * & from_next, + wchar_t * to, + wchar_t * to_end, + wchar_t*& to_next + ) const; + + virtual std::codecvt_base::result do_out( + std::mbstate_t & state, const wchar_t * from, + const wchar_t * from_end, const wchar_t* & from_next, + char * to, char * to_end, char * & to_next + ) const; + + bool invalid_continuing_octet(unsigned char octet_1) const { + return (octet_1 < 0x80|| 0xbf< octet_1); + } + + bool invalid_leading_octet(unsigned char octet_1) const { + return (0x7f < octet_1 && octet_1 < 0xc0) || + (octet_1 > 0xfd); + } + + // continuing octets = octets except for the leading octet + static unsigned int get_cont_octet_count(unsigned char lead_octet) { + return get_octet_count(lead_octet) - 1; + } + + static unsigned int get_octet_count(unsigned char lead_octet); + + // How many "continuing octets" will be needed for this word + // == total octets - 1. + int get_cont_octet_out_count(wchar_t word) const ; + + virtual bool do_always_noconv() const throw() { return false; } + + // UTF-8 isn't really stateful since we rewind on partial conversions + virtual std::codecvt_base::result do_unshift( + std::mbstate_t&, + char * from, + char * /*to*/, + char * & next + ) const + { + next = from; + return ok; + } + + virtual int do_encoding() const throw() { + const int variable_byte_external_encoding=0; + return variable_byte_external_encoding; + } + + // How many char objects can I process to get <= max_limit + // wchar_t objects? + virtual int do_length( + BOOST_CODECVT_DO_LENGTH_CONST std::mbstate_t &, + const char * from, + const char * from_end, + std::size_t max_limit +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) + ) const throw(); +#else + ) const; +#endif + + // Largest possible value do_length(state,from,from_end,1) could return. + virtual int do_max_length() const throw () { + return 6; // largest UTF-8 encoding of a UCS-4 character + } +}; + +BOOST_UTF8_END_NAMESPACE + +#endif // BOOST_UTF8_CODECVT_FACET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/detail/workaround.hpp b/deal.II/contrib/boost-1.45.0/include/boost/detail/workaround.hpp new file mode 100644 index 0000000000..40b3423b37 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/detail/workaround.hpp @@ -0,0 +1,267 @@ +// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef WORKAROUND_DWA2002126_HPP +# define WORKAROUND_DWA2002126_HPP + +// Compiler/library version workaround macro +// +// Usage: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// // workaround for eVC4 and VC6 +// ... // workaround code here +// #endif +// +// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the +// first argument must be undefined or expand to a numeric +// value. The above expands to: +// +// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 +// +// When used for workarounds that apply to the latest known version +// and all earlier versions of a compiler, the following convention +// should be observed: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) +// +// The version number in this case corresponds to the last version in +// which the workaround was known to have been required. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro +// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates +// the workaround for any version of the compiler. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or +// error will be issued if the compiler version exceeds the argument +// to BOOST_TESTED_AT(). This can be used to locate workarounds which +// may be obsoleted by newer versions. + +# ifndef BOOST_STRICT_CONFIG + +#include + +#ifndef __BORLANDC__ +#define __BORLANDC___WORKAROUND_GUARD 1 +#else +#define __BORLANDC___WORKAROUND_GUARD 0 +#endif +#ifndef __CODEGEARC__ +#define __CODEGEARC___WORKAROUND_GUARD 1 +#else +#define __CODEGEARC___WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_VER +#define _MSC_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_VER_WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_FULL_VER +#define _MSC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC +#define BOOST_MSVC_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC_FULL_VER +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC__ +#define __GNUC___WORKAROUND_GUARD 1 +#else +#define __GNUC___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_MINOR__ +#define __GNUC_MINOR___WORKAROUND_GUARD 1 +#else +#define __GNUC_MINOR___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_PATCHLEVEL__ +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 +#else +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 +#endif +#ifndef __IBMCPP__ +#define __IBMCPP___WORKAROUND_GUARD 1 +#else +#define __IBMCPP___WORKAROUND_GUARD 0 +#endif +#ifndef __SUNPRO_CC +#define __SUNPRO_CC_WORKAROUND_GUARD 1 +#else +#define __SUNPRO_CC_WORKAROUND_GUARD 0 +#endif +#ifndef __DECCXX_VER +#define __DECCXX_VER_WORKAROUND_GUARD 1 +#else +#define __DECCXX_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __MWERKS__ +#define __MWERKS___WORKAROUND_GUARD 1 +#else +#define __MWERKS___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG__ +#define __EDG___WORKAROUND_GUARD 1 +#else +#define __EDG___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG_VERSION__ +#define __EDG_VERSION___WORKAROUND_GUARD 1 +#else +#define __EDG_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __HP_aCC +#define __HP_aCC_WORKAROUND_GUARD 1 +#else +#define __HP_aCC_WORKAROUND_GUARD 0 +#endif +#ifndef __hpxstd98 +#define __hpxstd98_WORKAROUND_GUARD 1 +#else +#define __hpxstd98_WORKAROUND_GUARD 0 +#endif +#ifndef _CRAYC +#define _CRAYC_WORKAROUND_GUARD 1 +#else +#define _CRAYC_WORKAROUND_GUARD 0 +#endif +#ifndef __DMC__ +#define __DMC___WORKAROUND_GUARD 1 +#else +#define __DMC___WORKAROUND_GUARD 0 +#endif +#ifndef MPW_CPLUS +#define MPW_CPLUS_WORKAROUND_GUARD 1 +#else +#define MPW_CPLUS_WORKAROUND_GUARD 0 +#endif +#ifndef __COMO__ +#define __COMO___WORKAROUND_GUARD 1 +#else +#define __COMO___WORKAROUND_GUARD 0 +#endif +#ifndef __COMO_VERSION__ +#define __COMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __COMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __INTEL_COMPILER +#define __INTEL_COMPILER_WORKAROUND_GUARD 1 +#else +#define __INTEL_COMPILER_WORKAROUND_GUARD 0 +#endif +#ifndef __ICL +#define __ICL_WORKAROUND_GUARD 1 +#else +#define __ICL_WORKAROUND_GUARD 0 +#endif +#ifndef _COMPILER_VERSION +#define _COMPILER_VERSION_WORKAROUND_GUARD 1 +#else +#define _COMPILER_VERSION_WORKAROUND_GUARD 0 +#endif + +#ifndef _RWSTD_VER +#define _RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define _RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_RWSTD_VER +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GLIBCPP__ +#define __GLIBCPP___WORKAROUND_GUARD 1 +#else +#define __GLIBCPP___WORKAROUND_GUARD 0 +#endif +#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 +#else +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 +#endif +#ifndef __SGI_STL_PORT +#define __SGI_STL_PORT_WORKAROUND_GUARD 1 +#else +#define __SGI_STL_PORT_WORKAROUND_GUARD 0 +#endif +#ifndef _STLPORT_VERSION +#define _STLPORT_VERSION_WORKAROUND_GUARD 1 +#else +#define _STLPORT_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef __LIBCOMO_VERSION__ +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef _CPPLIB_VER +#define _CPPLIB_VER_WORKAROUND_GUARD 1 +#else +#define _CPPLIB_VER_WORKAROUND_GUARD 0 +#endif + +#ifndef BOOST_INTEL_CXX_VERSION +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL_WIN +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_DINKUMWARE_STDLIB +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 +#else +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL +#define BOOST_INTEL_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WORKAROUND_GUARD 0 +#endif +// Always define to zero, if it's used it'll be defined my MPL: +#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 + +# define BOOST_WORKAROUND(symbol, test) \ + ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ + (symbol != 0) && (1 % (( (symbol test) ) + 1))) +// ^ ^ ^ ^ +// The extra level of parenthesis nesting above, along with the +// BOOST_OPEN_PAREN indirection below, is required to satisfy the +// broken preprocessor in MWCW 8.3 and earlier. +// +// The basic mechanism works as follows: +// (symbol test) + 1 => if (symbol test) then 2 else 1 +// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 +// +// The complication with % is for cooperation with BOOST_TESTED_AT(). +// When "test" is BOOST_TESTED_AT(x) and +// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, +// +// symbol test => if (symbol <= x) then 1 else -1 +// (symbol test) + 1 => if (symbol <= x) then 2 else 0 +// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero +// + +# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS +# define BOOST_OPEN_PAREN ( +# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 +# else +# define BOOST_TESTED_AT(value) != ((value)-(value)) +# endif + +# else + +# define BOOST_WORKAROUND(symbol, test) 0 + +# endif + +#endif // WORKAROUND_DWA2002126_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/dynamic_bitset.hpp b/deal.II/contrib/boost-1.45.0/include/boost/dynamic_bitset.hpp new file mode 100644 index 0000000000..29e103862e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/dynamic_bitset.hpp @@ -0,0 +1,17 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2004, 2008 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DYNAMIC_BITSET_HPP +#define BOOST_DYNAMIC_BITSET_HPP + +#include "boost/dynamic_bitset/dynamic_bitset.hpp" + +#endif // include guard diff --git a/deal.II/contrib/boost-1.45.0/include/boost/dynamic_bitset_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/dynamic_bitset_fwd.hpp new file mode 100644 index 0000000000..7bb6e89743 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/dynamic_bitset_fwd.hpp @@ -0,0 +1,25 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2004 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DYNAMIC_BITSET_FWD_HPP +#define BOOST_DYNAMIC_BITSET_FWD_HPP + +#include + +namespace boost { + +template > +class dynamic_bitset; + +} + +#endif // include guard diff --git a/deal.II/contrib/boost-1.45.0/include/boost/enable_shared_from_this.hpp b/deal.II/contrib/boost-1.45.0/include/boost/enable_shared_from_this.hpp new file mode 100644 index 0000000000..b1bb63d9a2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/enable_shared_from_this.hpp @@ -0,0 +1,18 @@ +#ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED +#define BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED + +// +// enable_shared_from_this.hpp +// +// Copyright (c) 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html +// + +#include + +#endif // #ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception.hpp new file mode 100644 index 0000000000..6424159c6d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception.hpp @@ -0,0 +1,11 @@ +//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_1D94A7C6054E11DB9804B622A1EF5492 +#define UUID_1D94A7C6054E11DB9804B622A1EF5492 + +#error The header has been deprecated. Please #include instead. + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/all.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/all.hpp new file mode 100644 index 0000000000..9ffe42a9d0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/all.hpp @@ -0,0 +1,36 @@ +//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_316FDA946C0D11DEA9CBAE5255D89593 +#define UUID_316FDA946C0D11DEA9CBAE5255D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef BOOST_NO_EXCEPTIONS +#include +#include +#endif + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/current_exception_cast.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/current_exception_cast.hpp new file mode 100644 index 0000000000..af2f153113 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/current_exception_cast.hpp @@ -0,0 +1,43 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_7E83C166200811DE885E826156D89593 +#define UUID_7E83C166200811DE885E826156D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +namespace +boost + { + template + inline + E * + current_exception_cast() + { + try + { + throw; + } + catch( + E & e ) + { + return &e; + } + catch( + ...) + { + return 0; + } + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/attribute_noreturn.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/attribute_noreturn.hpp new file mode 100644 index 0000000000..f6a0b5903e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/attribute_noreturn.hpp @@ -0,0 +1,17 @@ +//Copyright (c) 2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_61531AB0680611DEADD5846855D89593 +#define UUID_61531AB0680611DEADD5846855D89593 + +#if defined(_MSC_VER) +#define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn) +#elif defined(__GNUC__) +#define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn)) +#else +#define BOOST_ATTRIBUTE_NORETURN +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/error_info_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/error_info_impl.hpp new file mode 100644 index 0000000000..883d313a98 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/error_info_impl.hpp @@ -0,0 +1,75 @@ +//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_CE6983AC753411DDA764247956D89593 +#define UUID_CE6983AC753411DDA764247956D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include + +namespace +boost + { + namespace + exception_detail + { + class + error_info_base + { + public: + + virtual std::string tag_typeid_name() const = 0; + virtual std::string value_as_string() const = 0; + + protected: + + ~error_info_base() throw() + { + } + }; + } + + template + class + error_info: + public exception_detail::error_info_base + { + public: + + typedef T value_type; + + error_info( value_type const & value ); + ~error_info() throw(); + + value_type const & + value() const + { + return value_; + } + + value_type & + value() + { + return value_; + } + + private: + + std::string tag_typeid_name() const; + std::string value_as_string() const; + + value_type value_; + }; + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/exception_ptr.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/exception_ptr.hpp new file mode 100644 index 0000000000..0510fe2dfd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/exception_ptr.hpp @@ -0,0 +1,431 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_618474C2DE1511DEB74A388C56D89593 +#define UUID_618474C2DE1511DEB74A388C56D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#ifdef BOOST_NO_EXCEPTIONS +#error This header requires exception handling to be enabled. +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +namespace +boost + { + typedef shared_ptr exception_ptr; + + exception_ptr current_exception(); + + template + inline + exception_ptr + copy_exception( T const & e ) + { + try + { + throw enable_current_exception(e); + } + catch( + ... ) + { + return current_exception(); + } + } + +#ifndef BOOST_NO_RTTI + typedef error_info original_exception_type; + + inline + std::string + to_string( original_exception_type const & x ) + { + return x.value()->name(); + } +#endif + + namespace + exception_detail + { + struct + bad_alloc_: + boost::exception, + std::bad_alloc + { + }; + + template + exception_ptr + get_bad_alloc() + { + bad_alloc_ ba; + exception_detail::clone_impl c(ba); + c << + throw_function(BOOST_CURRENT_FUNCTION) << + throw_file(__FILE__) << + throw_line(__LINE__); + static exception_ptr ep(new exception_detail::clone_impl(c)); + return ep; + } + + template + struct + exception_ptr_bad_alloc + { + static exception_ptr const e; + }; + + template + exception_ptr const + exception_ptr_bad_alloc:: + e = get_bad_alloc(); + } + + class + unknown_exception: + public boost::exception, + public std::exception + { + public: + + unknown_exception() + { + } + + explicit + unknown_exception( std::exception const & e ) + { + add_original_type(e); + } + + explicit + unknown_exception( boost::exception const & e ): + boost::exception(e) + { + add_original_type(e); + } + + ~unknown_exception() throw() + { + } + + private: + + template + void + add_original_type( E const & e ) + { +#ifndef BOOST_NO_RTTI + (*this) << original_exception_type(&typeid(e)); +#endif + } + }; + + namespace + exception_detail + { + template + class + current_exception_std_exception_wrapper: + public T, + public boost::exception + { + public: + + explicit + current_exception_std_exception_wrapper( T const & e1 ): + T(e1) + { + add_original_type(e1); + } + + current_exception_std_exception_wrapper( T const & e1, boost::exception const & e2 ): + T(e1), + boost::exception(e2) + { + add_original_type(e1); + } + + ~current_exception_std_exception_wrapper() throw() + { + } + + private: + + template + void + add_original_type( E const & e ) + { +#ifndef BOOST_NO_RTTI + (*this) << original_exception_type(&typeid(e)); +#endif + } + }; + +#ifdef BOOST_NO_RTTI + template + boost::exception const * + get_boost_exception( T const * ) + { + try + { + throw; + } + catch( + boost::exception & x ) + { + return &x; + } + catch(...) + { + return 0; + } + } +#else + template + boost::exception const * + get_boost_exception( T const * x ) + { + return dynamic_cast(x); + } +#endif + + template + inline + exception_ptr + current_exception_std_exception( T const & e1 ) + { + if( boost::exception const * e2 = get_boost_exception(&e1) ) + return boost::copy_exception(current_exception_std_exception_wrapper(e1,*e2)); + else + return boost::copy_exception(current_exception_std_exception_wrapper(e1)); + } + + inline + exception_ptr + current_exception_unknown_exception() + { + return boost::copy_exception(unknown_exception()); + } + + inline + exception_ptr + current_exception_unknown_boost_exception( boost::exception const & e ) + { + return boost::copy_exception(unknown_exception(e)); + } + + inline + exception_ptr + current_exception_unknown_std_exception( std::exception const & e ) + { + if( boost::exception const * be = get_boost_exception(&e) ) + return current_exception_unknown_boost_exception(*be); + else + return boost::copy_exception(unknown_exception(e)); + } + + inline + exception_ptr + current_exception_impl() + { + try + { + throw; + } + catch( + exception_detail::clone_base & e ) + { + return exception_ptr(e.clone()); + } + catch( + std::domain_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::invalid_argument & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::length_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::out_of_range & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::logic_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::range_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::overflow_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::underflow_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::ios_base::failure & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::runtime_error & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::bad_alloc & e ) + { + return exception_detail::current_exception_std_exception(e); + } +#ifndef BOOST_NO_TYPEID + catch( + std::bad_cast & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::bad_typeid & e ) + { + return exception_detail::current_exception_std_exception(e); + } +#endif + catch( + std::bad_exception & e ) + { + return exception_detail::current_exception_std_exception(e); + } + catch( + std::exception & e ) + { + return exception_detail::current_exception_unknown_std_exception(e); + } + catch( + boost::exception & e ) + { + return exception_detail::current_exception_unknown_boost_exception(e); + } + catch( + ... ) + { + return exception_detail::current_exception_unknown_exception(); + } + } + } + + inline + exception_ptr + current_exception() + { + exception_ptr ret; + BOOST_ASSERT(!ret); + try + { + ret=exception_detail::current_exception_impl(); + } + catch( + std::bad_alloc & ) + { + ret=exception_detail::exception_ptr_bad_alloc<42>::e; + } + catch( + ... ) + { + try + { + ret=exception_detail::current_exception_std_exception(std::bad_exception()); + } + catch( + std::bad_alloc & ) + { + ret=exception_detail::exception_ptr_bad_alloc<42>::e; + } + catch( + ... ) + { + BOOST_ASSERT(0); + } + } + BOOST_ASSERT(ret); + return ret; + } + + inline + void + rethrow_exception( exception_ptr const & p ) + { + BOOST_ASSERT(p); + p->rethrow(); + } + + inline + std::string + diagnostic_information( exception_ptr const & p ) + { + if( p ) + try + { + rethrow_exception(p); + } + catch( + ... ) + { + return current_exception_diagnostic_information(); + } + return ""; + } + + inline + std::string + to_string( exception_ptr const & p ) + { + std::string s='\n'+diagnostic_information(p); + std::string padding(" "); + std::string r; + bool f=false; + for( std::string::const_iterator i=s.begin(),e=s.end(); i!=e; ++i ) + { + if( f ) + r+=padding; + char c=*i; + r+=c; + f=(c=='\n'); + } + return r; + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/is_output_streamable.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/is_output_streamable.hpp new file mode 100644 index 0000000000..743313c1ec --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/is_output_streamable.hpp @@ -0,0 +1,60 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_898984B4076411DD973EDFA055D89593 +#define UUID_898984B4076411DD973EDFA055D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include + +namespace +boost + { + namespace + to_string_detail + { + struct + partial_ordering_helper1 + { + template + partial_ordering_helper1( std::basic_ostream & ); + }; + + struct + partial_ordering_helper2 + { + template + partial_ordering_helper2( T const & ); + }; + + char operator<<( partial_ordering_helper1, partial_ordering_helper2 ); + + template + struct + is_output_streamable_impl + { + static std::basic_ostream & f(); + static T const & g(); + enum e { value=1!=(sizeof(f()< > + struct + is_output_streamable + { + enum e { value=to_string_detail::is_output_streamable_impl::value }; + }; + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/object_hex_dump.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/object_hex_dump.hpp new file mode 100644 index 0000000000..ccf1bac3f7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/object_hex_dump.hpp @@ -0,0 +1,50 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_6F463AC838DF11DDA3E6909F56D89593 +#define UUID_6F463AC838DF11DDA3E6909F56D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include +#include +#include +#include + +namespace +boost + { + namespace + exception_detail + { + template + inline + std::string + object_hex_dump( T const & x, std::size_t max_size=16 ) + { + std::ostringstream s; + s << "type: " << type_name() << ", size: " << sizeof(T) << ", dump: "; + std::size_t n=sizeof(T)>max_size?max_size:sizeof(T); + s.fill('0'); + s.width(2); + unsigned char const * b=reinterpret_cast(&x); + s << std::setw(2) << std::hex << (unsigned int)*b; + for( unsigned char const * e=b+n; ++b!=e; ) + s << " " << std::setw(2) << std::hex << (unsigned int)*b; + return s.str(); + } + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/type_info.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/type_info.hpp new file mode 100644 index 0000000000..9ab1c57f53 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/detail/type_info.hpp @@ -0,0 +1,83 @@ +//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_C3E1741C754311DDB2834CCA55D89593 +#define UUID_C3E1741C754311DDB2834CCA55D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include +#ifndef BOOST_NO_TYPEID +#include +#endif +#include + +namespace +boost + { + template + inline + std::string + tag_type_name() + { +#ifdef BOOST_NO_TYPEID + return BOOST_CURRENT_FUNCTION; +#else + return units::detail::demangle(typeid(T*).name()); +#endif + } + + template + inline + std::string + type_name() + { +#ifdef BOOST_NO_TYPEID + return BOOST_CURRENT_FUNCTION; +#else + return units::detail::demangle(typeid(T).name()); +#endif + } + + namespace + exception_detail + { + struct + type_info_ + { + detail::sp_typeinfo const & type_; + + explicit + type_info_( detail::sp_typeinfo const & type ): + type_(type) + { + } + + friend + bool + operator<( type_info_ const & a, type_info_ const & b ) + { + return 0!=(a.type_.before(b.type_)); + } + }; + } + } + +#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T)) + +#ifndef BOOST_NO_RTTI +#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x)) +#endif + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/diagnostic_information.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/diagnostic_information.hpp new file mode 100644 index 0000000000..1d6bc2cc98 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/diagnostic_information.hpp @@ -0,0 +1,184 @@ +//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_0552D49838DD11DD90146B8956D89593 +#define UUID_0552D49838DD11DD90146B8956D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include +#ifndef BOOST_NO_RTTI +#include +#endif +#include +#include +#include + +#ifndef BOOST_NO_EXCEPTIONS +#include +namespace +boost + { + namespace + exception_detail + { + std::string diagnostic_information_impl( boost::exception const *, std::exception const *, bool ); + } + + inline + std::string + current_exception_diagnostic_information() + { + boost::exception const * be=current_exception_cast(); + std::exception const * se=current_exception_cast(); + if( be || se ) + return exception_detail::diagnostic_information_impl(be,se,true); + else + return "No diagnostic information available."; + } + } +#endif + +namespace +boost + { + namespace + exception_detail + { + inline + exception const * + get_boost_exception( exception const * e ) + { + return e; + } + + inline + exception const * + get_boost_exception( ... ) + { + return 0; + } + + inline + std::exception const * + get_std_exception( std::exception const * e ) + { + return e; + } + + inline + std::exception const * + get_std_exception( ... ) + { + return 0; + } + + inline + char const * + get_diagnostic_information( exception const & x, char const * header ) + { + if( error_info_container * c=x.data_.get() ) +#ifndef BOOST_NO_EXCEPTIONS + try + { +#endif + return c->diagnostic_information(header); +#ifndef BOOST_NO_EXCEPTIONS + } + catch(...) + { + } +#endif + return 0; + } + + inline + std::string + diagnostic_information_impl( boost::exception const * be, std::exception const * se, bool with_what ) + { + if( !be && !se ) + return "Unknown exception."; +#ifndef BOOST_NO_RTTI + if( !be ) + be=dynamic_cast(se); + if( !se ) + se=dynamic_cast(be); +#endif + char const * wh=0; + if( with_what && se ) + { + wh=se->what(); + if( be && exception_detail::get_diagnostic_information(*be,0)==wh ) + return wh; + } + std::ostringstream tmp; + if( be ) + { + if( char const * const * f=get_error_info(*be) ) + { + tmp << *f; + if( int const * l=get_error_info(*be) ) + tmp << '(' << *l << "): "; + } + tmp << "Throw in function "; + if( char const * const * fn=get_error_info(*be) ) + tmp << *fn; + else + tmp << "(unknown)"; + tmp << '\n'; + } +#ifndef BOOST_NO_RTTI + tmp << std::string("Dynamic exception type: ") << + units::detail::demangle((be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name()) << '\n'; +#endif + if( with_what && se ) + tmp << "std::exception::what: " << wh << '\n'; + if( be ) + if( char const * s=exception_detail::get_diagnostic_information(*be,tmp.str().c_str()) ) + if( *s ) + return s; + return tmp.str(); + } + } + + template + std::string + diagnostic_information( T const & e ) + { + return exception_detail::diagnostic_information_impl(exception_detail::get_boost_exception(&e),exception_detail::get_std_exception(&e),true); + } + + inline + char const * + diagnostic_information_what( exception const & e ) throw() + { + char const * w=0; +#ifndef BOOST_NO_EXCEPTIONS + try + { +#endif + (void) exception_detail::diagnostic_information_impl(&e,0,false); + return exception_detail::get_diagnostic_information(e,0); +#ifndef BOOST_NO_EXCEPTIONS + } + catch( + ... ) + { + } +#endif + return w; + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/enable_current_exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/enable_current_exception.hpp new file mode 100644 index 0000000000..988105378c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/enable_current_exception.hpp @@ -0,0 +1,6 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/enable_error_info.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/enable_error_info.hpp new file mode 100644 index 0000000000..988105378c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/enable_error_info.hpp @@ -0,0 +1,6 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_api_function.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_api_function.hpp new file mode 100644 index 0000000000..481c61314e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_api_function.hpp @@ -0,0 +1,22 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_DDFBB4546C1211DEA4659E9055D89593 +#define UUID_DDFBB4546C1211DEA4659E9055D89593 + +#include "boost/exception/error_info.hpp" + +namespace +boost + { + //Usage hint: + //if( api_function(....)!=0 ) + // BOOST_THROW_EXCEPTION( + // failure() << + // errinfo_api_function("api_function") ); + typedef error_info errinfo_api_function; + } + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_at_line.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_at_line.hpp new file mode 100644 index 0000000000..cbd5ccefba --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_at_line.hpp @@ -0,0 +1,18 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_E7255CE26C1211DE85800C9155D89593 +#define UUID_E7255CE26C1211DE85800C9155D89593 + +namespace +boost + { + template class error_info; + + //Use with parsing errors exceptions, for example in a XML file parser. + typedef error_info errinfo_at_line; + } + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_errno.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_errno.hpp new file mode 100644 index 0000000000..ea74010c94 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_errno.hpp @@ -0,0 +1,44 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_F0EE17BE6C1211DE87FF459155D89593 +#define UUID_F0EE17BE6C1211DE87FF459155D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include "boost/exception/info.hpp" +#include +#include + +namespace +boost + { + typedef error_info errinfo_errno; + + //Usage hint: + //if( c_function(....)!=0 ) + // BOOST_THROW_EXCEPTION( + // failure() << + // errinfo_errno(errno) << + // errinfo_api_function("c_function") ); + inline + std::string + to_string( errinfo_errno const & e ) + { + std::ostringstream tmp; + int v=e.value(); + tmp << v << ", \"" << strerror(v) << "\""; + return tmp.str(); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_handle.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_handle.hpp new file mode 100644 index 0000000000..8e6cff8fd8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_handle.hpp @@ -0,0 +1,20 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_F79E6EE26C1211DEB26E929155D89593 +#define UUID_F79E6EE26C1211DEB26E929155D89593 + +#include + +namespace +boost + { + template class weak_ptr; + template class error_info; + + typedef error_info > errinfo_file_handle; + } + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_name.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_name.hpp new file mode 100644 index 0000000000..d3cce4d356 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_name.hpp @@ -0,0 +1,26 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_FEE5120A6C1211DE94E8BC9155D89593 +#define UUID_FEE5120A6C1211DE94E8BC9155D89593 + +#include + +namespace +boost + { + template class error_info; + + //Usage hint: + //FILE * f=fopen(name,mode); + //if( !f ) + // BOOST_THROW_EXCEPTION( + // file_open_error() << + // errinfo_file_name(name) << + // errinfo_file_open_mode(mode) ); + typedef error_info errinfo_file_name; + } + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_open_mode.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_open_mode.hpp new file mode 100644 index 0000000000..f4fba0d5cc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_file_open_mode.hpp @@ -0,0 +1,26 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_056F1F266C1311DE8E74299255D89593 +#define UUID_056F1F266C1311DE8E74299255D89593 + +#include + +namespace +boost + { + template class error_info; + + //Usage hint: + //FILE * f=fopen(name,mode); + //if( !f ) + // BOOST_THROW_EXCEPTION( + // file_open_error() << + // errinfo_file_name(name) << + // errinfo_file_open_mode(mode) ); + typedef error_info errinfo_file_open_mode; + } + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_nested_exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_nested_exception.hpp new file mode 100644 index 0000000000..e4e75d9eef --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_nested_exception.hpp @@ -0,0 +1,19 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_45CC9A82B77511DEB330FC4956D89593 +#define UUID_45CC9A82B77511DEB330FC4956D89593 + +namespace +boost + { + namespace exception_detail { class clone_base; }; + template class error_info; + template class shared_ptr; + typedef shared_ptr exception_ptr; + typedef error_info errinfo_nested_exception; + } + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_type_info_name.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_type_info_name.hpp new file mode 100644 index 0000000000..0b060e2e11 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/errinfo_type_info_name.hpp @@ -0,0 +1,23 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_0E11109E6C1311DEB7EA649255D89593 +#define UUID_0E11109E6C1311DEB7EA649255D89593 + +#include + +namespace +boost + { + template class error_info; + + //Usage hint: + //BOOST_THROW_EXCEPTION( + // bad_type() << + // errinfo_type_info_name(typeid(x).name()) ); + typedef error_info errinfo_type_info_name; + } + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/error_info.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/error_info.hpp new file mode 100644 index 0000000000..2e6832a338 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/error_info.hpp @@ -0,0 +1,6 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +namespace boost { template class error_info; } diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/exception.hpp new file mode 100644 index 0000000000..adaac687bb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/exception.hpp @@ -0,0 +1,436 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 +#define UUID_274DA366004E11DCB1DDFE2E56D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +namespace +boost + { + namespace + exception_detail + { + template + class + refcount_ptr + { + public: + + refcount_ptr(): + px_(0) + { + } + + ~refcount_ptr() + { + release(); + } + + refcount_ptr( refcount_ptr const & x ): + px_(x.px_) + { + add_ref(); + } + + refcount_ptr & + operator=( refcount_ptr const & x ) + { + adopt(x.px_); + return *this; + } + + void + adopt( T * px ) + { + release(); + px_=px; + add_ref(); + } + + T * + get() const + { + return px_; + } + + private: + + T * px_; + + void + add_ref() + { + if( px_ ) + px_->add_ref(); + } + + void + release() + { + if( px_ && px_->release() ) + px_=0; + } + }; + } + + //////////////////////////////////////////////////////////////////////// + + template + class error_info; + + typedef error_info throw_function; + typedef error_info throw_file; + typedef error_info throw_line; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef int value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + class exception; + + template + class shared_ptr; + + namespace + exception_detail + { + class error_info_base; + struct type_info_; + + struct + error_info_container + { + virtual char const * diagnostic_information( char const * ) const = 0; + virtual shared_ptr get( type_info_ const & ) const = 0; + virtual void set( shared_ptr const &, type_info_ const & ) = 0; + virtual void add_ref() const = 0; + virtual bool release() const = 0; + virtual refcount_ptr clone() const = 0; + + protected: + + ~error_info_container() throw() + { + } + }; + + template + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + char const * get_diagnostic_information( exception const &, char const * ); + + void copy_boost_exception( exception *, exception const * ); + + template + E const & set_info( E const &, error_info const & ); + + template + E const & set_info( E const &, throw_function const & ); + + template + E const & set_info( E const &, throw_file const & ); + + template + E const & set_info( E const &, throw_line const & ); + } + + class + exception + { + protected: + + exception(): + throw_function_(0), + throw_file_(0), + throw_line_(-1) + { + } + +#ifdef __HP_aCC + //On HP aCC, this protected copy constructor prevents throwing boost::exception. + //On all other platforms, the same effect is achieved by the pure virtual destructor. + exception( exception const & x ) throw(): + data_(x.data_), + throw_function_(x.throw_function_), + throw_file_(x.throw_file_), + throw_line_(x.throw_line_) + { + } +#endif + + virtual ~exception() throw() +#ifndef __HP_aCC + = 0 //Workaround for HP aCC, =0 incorrectly leads to link errors. +#endif + ; + +#if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310) + public: +#else + private: + + template + friend E const & exception_detail::set_info( E const &, throw_function const & ); + + template + friend E const & exception_detail::set_info( E const &, throw_file const & ); + + template + friend E const & exception_detail::set_info( E const &, throw_line const & ); + + template + friend E const & exception_detail::set_info( E const &, error_info const & ); + + friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); + + template + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend void exception_detail::copy_boost_exception( exception *, exception const * ); +#endif + mutable exception_detail::refcount_ptr data_; + mutable char const * throw_function_; + mutable char const * throw_file_; + mutable int throw_line_; + }; + + inline + exception:: + ~exception() throw() + { + } + + namespace + exception_detail + { + template + E const & + set_info( E const & x, throw_function const & y ) + { + x.throw_function_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_file const & y ) + { + x.throw_file_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_line const & y ) + { + x.throw_line_=y.v_; + return x; + } + } + + //////////////////////////////////////////////////////////////////////// + + namespace + exception_detail + { + template + struct + error_info_injector: + public T, + public exception + { + explicit + error_info_injector( T const & x ): + T(x) + { + } + + ~error_info_injector() throw() + { + } + }; + + struct large_size { char c[256]; }; + large_size dispatch_boost_exception( exception const * ); + + struct small_size { }; + small_size dispatch_boost_exception( void const * ); + + template + struct enable_error_info_helper; + + template + struct + enable_error_info_helper + { + typedef T type; + }; + + template + struct + enable_error_info_helper + { + typedef error_info_injector type; + }; + + template + struct + enable_error_info_return_type + { + typedef typename enable_error_info_helper::type type; + }; + } + + template + inline + typename + exception_detail::enable_error_info_return_type::type + enable_error_info( T const & x ) + { + typedef typename exception_detail::enable_error_info_return_type::type rt; + return rt(x); + } + + //////////////////////////////////////////////////////////////////////// + + namespace + exception_detail + { + class + clone_base + { + public: + + virtual clone_base const * clone() const = 0; + virtual void rethrow() const = 0; + + virtual + ~clone_base() throw() + { + } + }; + + inline + void + copy_boost_exception( exception * a, exception const * b ) + { + refcount_ptr data; + if( error_info_container * d=b->data_.get() ) + data = d->clone(); + a->throw_file_ = b->throw_file_; + a->throw_line_ = b->throw_line_; + a->throw_function_ = b->throw_function_; + a->data_ = data; + } + + inline + void + copy_boost_exception( void *, void const * ) + { + } + + template + class + clone_impl: + public T, + public clone_base + { + public: + + explicit + clone_impl( T const & x ): + T(x) + { + copy_boost_exception(this,&x); + } + + ~clone_impl() throw() + { + } + + private: + + clone_base const * + clone() const + { + return new clone_impl(*this); + } + + void + rethrow() const + { + throw*this; + } + }; + } + + template + inline + exception_detail::clone_impl + enable_current_exception( T const & x ) + { + return exception_detail::clone_impl(x); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/get_error_info.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/get_error_info.hpp new file mode 100644 index 0000000000..046f05aeef --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/get_error_info.hpp @@ -0,0 +1,130 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_1A590226753311DD9E4CCF6156D89593 +#define UUID_1A590226753311DD9E4CCF6156D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include +#include + +namespace +boost + { + namespace + exception_detail + { + template + struct + get_info + { + static + typename ErrorInfo::value_type * + get( exception const & x ) + { + if( exception_detail::error_info_container * c=x.data_.get() ) + if( shared_ptr eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) ) + { +#ifndef BOOST_NO_RTTI + BOOST_ASSERT( 0!=dynamic_cast(eib.get()) ); +#endif + ErrorInfo * w = static_cast(eib.get()); + return &w->value(); + } + return 0; + } + }; + + template <> + struct + get_info + { + static + char const * * + get( exception const & x ) + { + return x.throw_function_ ? &x.throw_function_ : 0; + } + }; + + template <> + struct + get_info + { + static + char const * * + get( exception const & x ) + { + return x.throw_file_ ? &x.throw_file_ : 0; + } + }; + + template <> + struct + get_info + { + static + int * + get( exception const & x ) + { + return x.throw_line_!=-1 ? &x.throw_line_ : 0; + } + }; + + template + struct + get_error_info_return_type + { + typedef R * type; + }; + + template + struct + get_error_info_return_type + { + typedef R const * type; + }; + } + +#ifdef BOOST_NO_RTTI + template + inline + typename ErrorInfo::value_type const * + get_error_info( boost::exception const & x ) + { + return exception_detail::get_info::get(x); + } + template + inline + typename ErrorInfo::value_type * + get_error_info( boost::exception & x ) + { + return exception_detail::get_info::get(x); + } +#else + template + inline + typename exception_detail::get_error_info_return_type::type + get_error_info( E & some_exception ) + { + if( exception const * x = dynamic_cast(&some_exception) ) + return exception_detail::get_info::get(*x); + else + return 0; + } +#endif + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/info.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/info.hpp new file mode 100644 index 0000000000..c918dbd341 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/info.hpp @@ -0,0 +1,200 @@ +//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_8D22C4CA9CC811DCAA9133D256D89593 +#define UUID_8D22C4CA9CC811DCAA9133D256D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include +#include +#include +#include + +namespace +boost + { + template + inline + typename enable_if,std::string>::type + to_string( error_info const & x ) + { + return to_string(x.value()); + } + + template + inline + error_info:: + error_info( value_type const & value ): + value_(value) + { + } + + template + inline + error_info:: + ~error_info() throw() + { + } + + template + inline + std::string + error_info:: + tag_typeid_name() const + { + return tag_type_name(); + } + + template + inline + std::string + error_info:: + value_as_string() const + { + return to_string_stub(*this); + } + + namespace + exception_detail + { + class + error_info_container_impl: + public error_info_container + { + public: + + error_info_container_impl(): + count_(0) + { + } + + ~error_info_container_impl() throw() + { + } + + void + set( shared_ptr const & x, type_info_ const & typeid_ ) + { + BOOST_ASSERT(x); + info_[typeid_] = x; + diagnostic_info_str_.clear(); + } + + shared_ptr + get( type_info_ const & ti ) const + { + error_info_map::const_iterator i=info_.find(ti); + if( info_.end()!=i ) + { + shared_ptr const & p = i->second; +#ifndef BOOST_NO_RTTI + BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==ti.type_ ); +#endif + return p; + } + return shared_ptr(); + } + + char const * + diagnostic_information( char const * header ) const + { + if( header ) + { + BOOST_ASSERT(*header!=0); + std::ostringstream tmp; + tmp << header; + for( error_info_map::const_iterator i=info_.begin(),end=info_.end(); i!=end; ++i ) + { + error_info_base const & x = *i->second; + tmp << '[' << x.tag_typeid_name() << "] = " << x.value_as_string() << '\n'; + } + tmp.str().swap(diagnostic_info_str_); + } + return diagnostic_info_str_.c_str(); + } + + private: + + friend class boost::exception; + + typedef std::map< type_info_, shared_ptr > error_info_map; + error_info_map info_; + mutable std::string diagnostic_info_str_; + mutable int count_; + + error_info_container_impl( error_info_container_impl const & ); + error_info_container_impl & operator=( error_info_container const & ); + + void + add_ref() const + { + ++count_; + } + + bool + release() const + { + if( --count_ ) + return false; + else + { + delete this; + return true; + } + } + + refcount_ptr + clone() const + { + refcount_ptr p; + error_info_container_impl * c=new error_info_container_impl; + p.adopt(c); + c->info_ = info_; + return p; + } + }; + + template + inline + E const & + set_info( E const & x, error_info const & v ) + { + typedef error_info error_info_tag_t; + shared_ptr p( new error_info_tag_t(v) ); + exception_detail::error_info_container * c=x.data_.get(); + if( !c ) + x.data_.adopt(c=new exception_detail::error_info_container_impl); + c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t)); + return x; + } + + template + struct + derives_boost_exception + { + enum e { value = (sizeof(dispatch_boost_exception((T*)0))==sizeof(large_size)) }; + }; + } + + template + inline + typename enable_if,E const &>::type + operator<<( E const & x, error_info const & v ) + { + return exception_detail::set_info(x,v); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/info_tuple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/info_tuple.hpp new file mode 100644 index 0000000000..34afe421b1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/info_tuple.hpp @@ -0,0 +1,76 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_63EE924290FB11DC87BB856555D89593 +#define UUID_63EE924290FB11DC87BB856555D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include + +namespace +boost + { + template < + class E, + class Tag1,class T1, + class Tag2,class T2 > + inline + E const & + operator<<( + E const & x, + tuple< + error_info, + error_info > const & v ) + { + return x << v.template get<0>() << v.template get<1>(); + } + + template < + class E, + class Tag1,class T1, + class Tag2,class T2, + class Tag3,class T3 > + inline + E const & + operator<<( + E const & x, + tuple< + error_info, + error_info, + error_info > const & v ) + { + return x << v.template get<0>() << v.template get<1>() << v.template get<2>(); + } + + template < + class E, + class Tag1,class T1, + class Tag2,class T2, + class Tag3,class T3, + class Tag4,class T4 > + inline + E const & + operator<<( + E const & x, + tuple< + error_info, + error_info, + error_info, + error_info > const & v ) + { + return x << v.template get<0>() << v.template get<1>() << v.template get<2>() << v.template get<3>(); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/to_string.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/to_string.hpp new file mode 100644 index 0000000000..59bf83d4c0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/to_string.hpp @@ -0,0 +1,83 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_7E48761AD92811DC9011477D56D89593 +#define UUID_7E48761AD92811DC9011477D56D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include + +namespace +boost + { + namespace + to_string_detail + { + template + typename disable_if,char>::type to_string( T const & ); + + template + struct has_to_string_impl; + + template + struct + has_to_string_impl + { + enum e { value=1 }; + }; + + template + struct + has_to_string_impl + { + static T const & f(); + enum e { value=1!=sizeof(to_string(f())) }; + }; + } + + template + inline + typename enable_if,std::string>::type + to_string( T const & x ) + { + std::ostringstream out; + out << x; + return out.str(); + } + + template + struct + has_to_string + { + enum e { value=to_string_detail::has_to_string_impl::value>::value }; + }; + + template + inline + std::string + to_string( std::pair const & x ) + { + return std::string("(") + to_string(x.first) + ',' + to_string(x.second) + ')'; + } + + inline + std::string + to_string( std::exception const & x ) + { + return x.what(); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception/to_string_stub.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception/to_string_stub.hpp new file mode 100644 index 0000000000..e41d369775 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception/to_string_stub.hpp @@ -0,0 +1,109 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_E788439ED9F011DCB181F25B55D89593 +#define UUID_E788439ED9F011DCB181F25B55D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif + +#include +#include +#include + +namespace +boost + { + namespace + exception_detail + { + template + struct + to_string_dispatcher + { + template + static + std::string + convert( T const & x, Stub ) + { + return to_string(x); + } + }; + + template <> + struct + to_string_dispatcher + { + template + static + std::string + convert( T const & x, Stub s ) + { + return s(x); + } + + template + static + std::string + convert( T const & x, std::string s ) + { + return s; + } + + template + static + std::string + convert( T const & x, char const * s ) + { + BOOST_ASSERT(s!=0); + return s; + } + }; + + namespace + to_string_dispatch + { + template + inline + std::string + dispatch( T const & x, Stub s ) + { + return to_string_dispatcher::value>::convert(x,s); + } + } + + template + inline + std::string + string_stub_dump( T const & x ) + { + return "[ " + exception_detail::object_hex_dump(x) + " ]"; + } + } + + template + inline + std::string + to_string_stub( T const & x ) + { + return exception_detail::to_string_dispatch::dispatch(x,&exception_detail::string_stub_dump); + } + + template + inline + std::string + to_string_stub( T const & x, Stub s ) + { + return exception_detail::to_string_dispatch::dispatch(x,s); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/exception_ptr.hpp b/deal.II/contrib/boost-1.45.0/include/boost/exception_ptr.hpp new file mode 100644 index 0000000000..d48cce9dc6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/exception_ptr.hpp @@ -0,0 +1,11 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593 +#define UUID_FA5836A2CADA11DC8CD47C8555D89593 + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/filesystem.hpp b/deal.II/contrib/boost-1.45.0/include/boost/filesystem.hpp new file mode 100644 index 0000000000..f8b9353a7b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/filesystem.hpp @@ -0,0 +1,38 @@ +// boost/filesystem.hpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM_FILESYSTEM_HPP +#define BOOST_FILESYSTEM_FILESYSTEM_HPP + +# if defined(BOOST_FILESYSTEM_VERSION) \ + && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 +# error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 +# endif + +# if !defined(BOOST_FILESYSTEM_VERSION) +# define BOOST_FILESYSTEM_VERSION 2 +# endif + +#if BOOST_FILESYSTEM_VERSION == 2 +# include +# include +# include +# include + +# else +# include +# include +# include +# include + +# endif + +#endif // BOOST_FILESYSTEM_FILESYSTEM_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/flyweight.hpp b/deal.II/contrib/boost-1.45.0/include/boost/flyweight.hpp new file mode 100644 index 0000000000..6fe3042681 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/flyweight.hpp @@ -0,0 +1,22 @@ +/* Copyright 2006-2008 Joaquin M Lopez Munoz. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org/libs/flyweight for library home page. + */ + +#ifndef BOOST_FLYWEIGHT_HPP +#define BOOST_FLYWEIGHT_HPP + +#if defined(_MSC_VER)&&(_MSC_VER>=1200) +#pragma once +#endif + +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/foreach.hpp b/deal.II/contrib/boost-1.45.0/include/boost/foreach.hpp new file mode 100644 index 0000000000..db5b2035c2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/foreach.hpp @@ -0,0 +1,1104 @@ +/////////////////////////////////////////////////////////////////////////////// +// foreach.hpp header file +// +// Copyright 2004 Eric Niebler. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// See http://www.boost.org/libs/foreach for documentation +// +// Credits: +// Anson Tsao - for the initial inspiration and several good suggestions. +// Thorsten Ottosen - for Boost.Range, and for suggesting a way to detect +// const-qualified rvalues at compile time on VC7.1+ +// Russell Hind - For help porting to Borland +// Alisdair Meredith - For help porting to Borland +// Stefan Slapeta - For help porting to Intel +// David Jenkins - For help finding a Microsoft Code Analysis bug + +#ifndef BOOST_FOREACH + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // for std::pair + +#include +#include + +// Some compilers let us detect even const-qualified rvalues at compile-time +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) && !defined(_PREFAST_) \ + || (BOOST_WORKAROUND(__GNUC__, >= 4) && !defined(BOOST_INTEL) && !defined(BOOST_CLANG)) \ + || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4) && !defined(BOOST_INTEL) && \ + !defined(BOOST_CLANG)) +# define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION +#else +// Some compilers allow temporaries to be bound to non-const references. +// These compilers make it impossible to for BOOST_FOREACH to detect +// temporaries and avoid reevaluation of the collection expression. +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x593) \ + || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) \ + || BOOST_WORKAROUND(__DECCXX_VER, <= 60590042) +# define BOOST_FOREACH_NO_RVALUE_DETECTION +# endif +// Some compilers do not correctly implement the lvalue/rvalue conversion +// rules of the ternary conditional operator. +# if defined(BOOST_FOREACH_NO_RVALUE_DETECTION) \ + || defined(BOOST_NO_SFINAE) \ + || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(__GNUC__, < 3) \ + || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 2)) \ + || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 3) && defined(__APPLE_CC__)) \ + || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, >= 0x5100) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) +# define BOOST_FOREACH_NO_CONST_RVALUE_DETECTION +# else +# define BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +# endif +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +# include +# include +# include +# include +#endif + +namespace boost +{ + +// forward declarations for iterator_range +template +class iterator_range; + +// forward declarations for sub_range +template +class sub_range; + +namespace foreach +{ + /////////////////////////////////////////////////////////////////////////////// + // in_range + // + template + inline std::pair in_range(T begin, T end) + { + return std::make_pair(begin, end); + } + + /////////////////////////////////////////////////////////////////////////////// + // boost::foreach::is_lightweight_proxy + // Specialize this for user-defined collection types if they are inexpensive to copy. + // This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff. + template + struct is_lightweight_proxy + : boost::mpl::false_ + { + }; + + /////////////////////////////////////////////////////////////////////////////// + // boost::foreach::is_noncopyable + // Specialize this for user-defined collection types if they cannot be copied. + // This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff. + template + struct is_noncopyable + #if !defined(BOOST_BROKEN_IS_BASE_AND_DERIVED) && !defined(BOOST_NO_IS_ABSTRACT) + : boost::mpl::or_< + boost::is_abstract + , boost::is_base_and_derived + > + #elif !defined(BOOST_BROKEN_IS_BASE_AND_DERIVED) + : boost::is_base_and_derived + #elif !defined(BOOST_NO_IS_ABSTRACT) + : boost::is_abstract + #else + : boost::mpl::false_ + #endif + { + }; + +} // namespace foreach + +} // namespace boost + +// vc6/7 needs help ordering the following overloads +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# define BOOST_FOREACH_TAG_DEFAULT ... +#else +# define BOOST_FOREACH_TAG_DEFAULT boost::foreach::tag +#endif + +/////////////////////////////////////////////////////////////////////////////// +// boost_foreach_is_lightweight_proxy +// Another customization point for the is_lightweight_proxy optimization, +// this one works on legacy compilers. Overload boost_foreach_is_lightweight_proxy +// at the global namespace for your type. +template +inline boost::foreach::is_lightweight_proxy * +boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(std::pair *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::iterator_range *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::sub_range *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(T **&, boost::foreach::tag) { return 0; } + +/////////////////////////////////////////////////////////////////////////////// +// boost_foreach_is_noncopyable +// Another customization point for the is_noncopyable trait, +// this one works on legacy compilers. Overload boost_foreach_is_noncopyable +// at the global namespace for your type. +template +inline boost::foreach::is_noncopyable * +boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; } + +namespace boost +{ + +namespace foreach_detail_ +{ + +/////////////////////////////////////////////////////////////////////////////// +// Define some utilities for assessing the properties of expressions +// +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *) { return 0; } + +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *, Bool3 *) { return 0; } + +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *) { return 0; } + +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *, Bool3 *) { return 0; } + +template +inline boost::mpl::not_ *not_(Bool1 *) { return 0; } + +template +inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; } + +template +inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; } + +template +inline boost::is_array *is_array_(T const &) { return 0; } + +template +inline boost::is_const *is_const_(T &) { return 0; } + +#ifndef BOOST_FOREACH_NO_RVALUE_DETECTION +template +inline boost::mpl::true_ *is_const_(T const &) { return 0; } +#endif + +/////////////////////////////////////////////////////////////////////////////// +// auto_any_t/auto_any +// General utility for putting an object of any type into automatic storage +struct auto_any_base +{ + // auto_any_base must evaluate to false in boolean context so that + // they can be declared in if() statements. + operator bool() const + { + return false; + } +}; + +template +struct auto_any : auto_any_base +{ + explicit auto_any(T const &t) + : item(t) + { + } + + // temporaries of type auto_any will be bound to const auto_any_base + // references, but we still want to be able to mutate the stored + // data, so declare it as mutable. + mutable T item; +}; + +typedef auto_any_base const &auto_any_t; + +template +inline BOOST_DEDUCED_TYPENAME boost::mpl::if_::type &auto_any_cast(auto_any_t a) +{ + return static_cast const &>(a).item; +} + +typedef boost::mpl::true_ const_; + +/////////////////////////////////////////////////////////////////////////////// +// type2type +// +template +struct type2type + : boost::mpl::if_ +{ +}; + +template +struct wrap_cstr +{ + typedef T type; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char *iterator; + typedef char *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char const *iterator; + typedef char const *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t *iterator; + typedef wchar_t *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t const *iterator; + typedef wchar_t const *const_iterator; +}; + +template +struct is_char_array + : mpl::and_< + is_array + , mpl::or_< + is_convertible + , is_convertible + > + > +{}; + +template +struct foreach_iterator +{ + // **** READ THIS IF YOUR COMPILE BREAKS HERE **** + // + // There is an ambiguity about how to iterate over arrays of char and wchar_t. + // Should the last array element be treated as a null terminator to be skipped, or + // is it just like any other element in the array? To fix the problem, you must + // say which behavior you want. + // + // To treat the container as a null-terminated string, merely cast it to a + // char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ... + // + // To treat the container as an array, use boost::as_array() in , + // as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ... + #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 + BOOST_MPL_ASSERT_MSG( (!is_char_array::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) ); + #endif + + // If the type is a pointer to a null terminated string (as opposed + // to an array type), there is no ambiguity. + typedef BOOST_DEDUCED_TYPENAME wrap_cstr::type container; + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< + C + , range_const_iterator + , range_mutable_iterator + >::type type; +}; + + +template +struct foreach_reverse_iterator +{ + // **** READ THIS IF YOUR COMPILE BREAKS HERE **** + // + // There is an ambiguity about how to iterate over arrays of char and wchar_t. + // Should the last array element be treated as a null terminator to be skipped, or + // is it just like any other element in the array? To fix the problem, you must + // say which behavior you want. + // + // To treat the container as a null-terminated string, merely cast it to a + // char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ... + // + // To treat the container as an array, use boost::as_array() in , + // as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ... + #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 + BOOST_MPL_ASSERT_MSG( (!is_char_array::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) ); + #endif + + // If the type is a pointer to a null terminated string (as opposed + // to an array type), there is no ambiguity. + typedef BOOST_DEDUCED_TYPENAME wrap_cstr::type container; + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< + C + , range_reverse_iterator + , range_reverse_iterator + >::type type; +}; + +template +struct foreach_reference + : iterator_reference::type> +{ +}; + +/////////////////////////////////////////////////////////////////////////////// +// encode_type +// +template +inline type2type *encode_type(T &, boost::mpl::false_ *) { return 0; } + +template +inline type2type *encode_type(T const &, boost::mpl::true_ *) { return 0; } + +/////////////////////////////////////////////////////////////////////////////// +// set_false +// +inline bool set_false(bool &b) +{ + b = false; + return false; +} + +/////////////////////////////////////////////////////////////////////////////// +// to_ptr +// +template +inline T *&to_ptr(T const &) +{ + static T *t = 0; + return t; +} + +// Borland needs a little extra help with arrays +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template +inline T (*&to_ptr(T (&)[N]))[N] +{ + static T (*t)[N] = 0; + return t; +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// derefof +// +template +inline T &derefof(T *t) +{ + // This is a work-around for a compiler bug in Borland. If T* is a pointer to array type U(*)[N], + // then dereferencing it results in a U* instead of U(&)[N]. The cast forces the issue. + return reinterpret_cast( + *const_cast( + reinterpret_cast(t) + ) + ); +} + +#ifdef BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION +/////////////////////////////////////////////////////////////////////////////// +// Detect at compile-time whether an expression yields an rvalue or +// an lvalue. This is rather non-standard, but some popular compilers +// accept it. +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// rvalue_probe +// +template +struct rvalue_probe +{ + struct private_type_ {}; + // can't ever return an array by value + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::mpl::or_, boost::is_array >, private_type_, T + >::type value_type; + operator value_type() { return *reinterpret_cast(this); } // never called + operator T &() const { return *reinterpret_cast(const_cast(this)); } // never called +}; + +template +rvalue_probe const make_probe(T const &) +{ + return rvalue_probe(); +} + +# define BOOST_FOREACH_IS_RVALUE(COL) \ + boost::foreach_detail_::and_( \ + boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(COL)) \ + , (true ? 0 : boost::foreach_detail_::is_rvalue_( \ + (true ? boost::foreach_detail_::make_probe(COL) : (COL)), 0))) + +#elif defined(BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION) +/////////////////////////////////////////////////////////////////////////////// +// Detect at run-time whether an expression yields an rvalue +// or an lvalue. This is 100% standard C++, but not all compilers +// accept it. Also, it causes FOREACH to break when used with non- +// copyable collection types. +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// rvalue_probe +// +template +struct rvalue_probe +{ + rvalue_probe(T &t, bool &b) + : value(t) + , is_rvalue(b) + { + } + + struct private_type_ {}; + // can't ever return an array or an abstract type by value + #ifdef BOOST_NO_IS_ABSTRACT + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::is_array, private_type_, T + >::type value_type; + #else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::mpl::or_, boost::is_array >, private_type_, T + >::type value_type; + #endif + + operator value_type() + { + this->is_rvalue = true; + return this->value; + } + + operator T &() const + { + return this->value; + } + +private: + T &value; + bool &is_rvalue; +}; + +template +rvalue_probe make_probe(T &t, bool &b) { return rvalue_probe(t, b); } + +template +rvalue_probe make_probe(T const &t, bool &b) { return rvalue_probe(t, b); } + +/////////////////////////////////////////////////////////////////////////////// +// simple_variant +// holds either a T or a T const* +template +struct simple_variant +{ + simple_variant(T const *t) + : is_rvalue(false) + { + *static_cast(this->data.address()) = t; + } + + simple_variant(T const &t) + : is_rvalue(true) + { + ::new(this->data.address()) T(t); + } + + simple_variant(simple_variant const &that) + : is_rvalue(that.is_rvalue) + { + if(this->is_rvalue) + ::new(this->data.address()) T(*that.get()); + else + *static_cast(this->data.address()) = that.get(); + } + + ~simple_variant() + { + if(this->is_rvalue) + this->get()->~T(); + } + + T const *get() const + { + if(this->is_rvalue) + return static_cast(this->data.address()); + else + return *static_cast(this->data.address()); + } + +private: + enum size_type { size = sizeof(T) > sizeof(T*) ? sizeof(T) : sizeof(T*) }; + simple_variant &operator =(simple_variant const &); + bool const is_rvalue; + aligned_storage data; +}; + +// If the collection is an array or is noncopyable, it must be an lvalue. +// If the collection is a lightweight proxy, treat it as an rvalue +// BUGBUG what about a noncopyable proxy? +template +inline BOOST_DEDUCED_TYPENAME boost::enable_if, IsProxy>::type * +should_copy_impl(LValue *, IsProxy *, bool *) +{ + return 0; +} + +// Otherwise, we must determine at runtime whether it's an lvalue or rvalue +inline bool * +should_copy_impl(boost::mpl::false_ *, boost::mpl::false_ *, bool *is_rvalue) +{ + return is_rvalue; +} + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// contain +// +template +inline auto_any contain(T const &t, boost::mpl::true_ *) // rvalue +{ + return auto_any(t); +} + +template +inline auto_any contain(T &t, boost::mpl::false_ *) // lvalue +{ + // Cannot seem to get sunpro to handle addressof() with array types. + #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x570)) + return auto_any(&t); + #else + return auto_any(boost::addressof(t)); + #endif +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any > +contain(T const &t, bool *rvalue) +{ + return auto_any >(*rvalue ? simple_variant(t) : simple_variant(&t)); +} +#endif + +///////////////////////////////////////////////////////////////////////////// +// begin +// +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue +{ + return auto_any::type>( + boost::begin(auto_any_cast(col))); +} + +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue +{ + typedef BOOST_DEDUCED_TYPENAME type2type::type type; + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iterator; + return auto_any::type>( + iterator(boost::begin(derefof(auto_any_cast(col))))); +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any::type> +begin(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::begin(*auto_any_cast, boost::mpl::false_>(col).get())); +} +#endif + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline auto_any +begin(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings +{ + return auto_any(auto_any_cast(col)); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// end +// +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue +{ + return auto_any::type>( + boost::end(auto_any_cast(col))); +} + +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue +{ + typedef BOOST_DEDUCED_TYPENAME type2type::type type; + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iterator; + return auto_any::type>( + iterator(boost::end(derefof(auto_any_cast(col))))); +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any::type> +end(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::end(*auto_any_cast, boost::mpl::false_>(col).get())); +} +#endif + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline auto_any +end(auto_any_t, type2type *, boost::mpl::true_ *) // null-terminated C-style strings +{ + return auto_any(0); // not used +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// done +// +template +inline bool done(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline bool done(auto_any_t cur, auto_any_t, type2type *) // null-terminated C-style strings +{ + return ! *auto_any_cast(cur); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// next +// +template +inline void next(auto_any_t cur, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; + ++auto_any_cast(cur); +} + +/////////////////////////////////////////////////////////////////////////////// +// deref +// +template +inline BOOST_DEDUCED_TYPENAME foreach_reference::type +deref(auto_any_t cur, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; + return *auto_any_cast(cur); +} + +///////////////////////////////////////////////////////////////////////////// +// rbegin +// +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue +{ + return auto_any::type>( + boost::rbegin(auto_any_cast(col))); +} + +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue +{ + typedef BOOST_DEDUCED_TYPENAME type2type::type type; + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iterator; + return auto_any::type>( + iterator(boost::rbegin(derefof(auto_any_cast(col))))); +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::rbegin(*auto_any_cast, boost::mpl::false_>(col).get())); +} +#endif + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline auto_any > +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings +{ + T *p = auto_any_cast(col); + while(0 != *p) + ++p; + return auto_any >(reverse_iterator(p)); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// rend +// +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue +{ + return auto_any::type>( + boost::rend(auto_any_cast(col))); +} + +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue +{ + typedef BOOST_DEDUCED_TYPENAME type2type::type type; + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iterator; + return auto_any::type>( + iterator(boost::rend(derefof(auto_any_cast(col))))); +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any::type> +rend(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::rend(*auto_any_cast, boost::mpl::false_>(col).get())); +} +#endif + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline auto_any > +rend(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings +{ + return auto_any >( + reverse_iterator(auto_any_cast(col))); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// rdone +// +template +inline bool rdone(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} + +/////////////////////////////////////////////////////////////////////////////// +// rnext +// +template +inline void rnext(auto_any_t cur, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; + ++auto_any_cast(cur); +} + +/////////////////////////////////////////////////////////////////////////////// +// rderef +// +template +inline BOOST_DEDUCED_TYPENAME foreach_reference::type +rderef(auto_any_t cur, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; + return *auto_any_cast(cur); +} + +} // namespace foreach_detail_ +} // namespace boost + +// Suppress a bogus code analysis warning on vc8+ +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# define BOOST_FOREACH_SUPPRESS_WARNINGS() __pragma(warning(suppress:6001)) +#else +# define BOOST_FOREACH_SUPPRESS_WARNINGS() +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Define a macro for giving hidden variables a unique name. Not strictly +// needed, but eliminates some warnings on some compilers. +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) +// With some versions of MSVC, use of __LINE__ to create unique identifiers +// can fail when the Edit-and-Continue debug flag is used. +# define BOOST_FOREACH_ID(x) x +#else +# define BOOST_FOREACH_ID(x) BOOST_PP_CAT(x, __LINE__) +#endif + +// A sneaky way to get the type of the collection without evaluating the expression +#define BOOST_FOREACH_TYPEOF(COL) \ + (true ? 0 : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL))) + +// returns true_* if the type is noncopyable +#define BOOST_FOREACH_IS_NONCOPYABLE(COL) \ + boost_foreach_is_noncopyable( \ + boost::foreach_detail_::to_ptr(COL) \ + , boost_foreach_argument_dependent_lookup_hack_value) + +// returns true_* if the type is a lightweight proxy (and is not noncopyable) +#define BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL) \ + boost::foreach_detail_::and_( \ + boost::foreach_detail_::not_(BOOST_FOREACH_IS_NONCOPYABLE(COL)) \ + , boost_foreach_is_lightweight_proxy( \ + boost::foreach_detail_::to_ptr(COL) \ + , boost_foreach_argument_dependent_lookup_hack_value)) + +#ifdef BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION +/////////////////////////////////////////////////////////////////////////////// +// R-values and const R-values supported here with zero runtime overhead +/////////////////////////////////////////////////////////////////////////////// + +// No variable is needed to track the rvalue-ness of the collection expression +# define BOOST_FOREACH_PREAMBLE() \ + BOOST_FOREACH_SUPPRESS_WARNINGS() + +// Evaluate the collection expression +# define BOOST_FOREACH_EVALUATE(COL) \ + (COL) + +# define BOOST_FOREACH_SHOULD_COPY(COL) \ + (true ? 0 : boost::foreach_detail_::or_( \ + BOOST_FOREACH_IS_RVALUE(COL) \ + , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))) + +#elif defined(BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION) +/////////////////////////////////////////////////////////////////////////////// +// R-values and const R-values supported here +/////////////////////////////////////////////////////////////////////////////// + +// Declare a variable to track the rvalue-ness of the collection expression +# define BOOST_FOREACH_PREAMBLE() \ + BOOST_FOREACH_SUPPRESS_WARNINGS() \ + if (bool BOOST_FOREACH_ID(_foreach_is_rvalue) = false) {} else + +// Evaluate the collection expression, and detect if it is an lvalue or and rvalue +# define BOOST_FOREACH_EVALUATE(COL) \ + (true ? boost::foreach_detail_::make_probe((COL), BOOST_FOREACH_ID(_foreach_is_rvalue)) : (COL)) + +// The rvalue/lvalue-ness of the collection expression is determined dynamically, unless +// type type is an array or is noncopyable or is non-const, in which case we know it's an lvalue. +// If the type happens to be a lightweight proxy, always make a copy. +# define BOOST_FOREACH_SHOULD_COPY(COL) \ + (boost::foreach_detail_::should_copy_impl( \ + true ? 0 : boost::foreach_detail_::or_( \ + boost::foreach_detail_::is_array_(COL) \ + , BOOST_FOREACH_IS_NONCOPYABLE(COL) \ + , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(COL))) \ + , true ? 0 : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL) \ + , &BOOST_FOREACH_ID(_foreach_is_rvalue))) + +#elif !defined(BOOST_FOREACH_NO_RVALUE_DETECTION) +/////////////////////////////////////////////////////////////////////////////// +// R-values supported here, const R-values NOT supported here +/////////////////////////////////////////////////////////////////////////////// + +// No variable is needed to track the rvalue-ness of the collection expression +# define BOOST_FOREACH_PREAMBLE() \ + BOOST_FOREACH_SUPPRESS_WARNINGS() + +// Evaluate the collection expression +# define BOOST_FOREACH_EVALUATE(COL) \ + (COL) + +// Determine whether the collection expression is an lvalue or an rvalue. +// NOTE: this gets the answer wrong for const rvalues. +# define BOOST_FOREACH_SHOULD_COPY(COL) \ + (true ? 0 : boost::foreach_detail_::or_( \ + boost::foreach_detail_::is_rvalue_((COL), 0) \ + , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))) + +#else +/////////////////////////////////////////////////////////////////////////////// +// R-values NOT supported here +/////////////////////////////////////////////////////////////////////////////// + +// No variable is needed to track the rvalue-ness of the collection expression +# define BOOST_FOREACH_PREAMBLE() \ + BOOST_FOREACH_SUPPRESS_WARNINGS() + +// Evaluate the collection expression +# define BOOST_FOREACH_EVALUATE(COL) \ + (COL) + +// Can't use rvalues with BOOST_FOREACH (unless they are lightweight proxies) +# define BOOST_FOREACH_SHOULD_COPY(COL) \ + (true ? 0 : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)) + +#endif + +#define BOOST_FOREACH_CONTAIN(COL) \ + boost::foreach_detail_::contain( \ + BOOST_FOREACH_EVALUATE(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_BEGIN(COL) \ + boost::foreach_detail_::begin( \ + BOOST_FOREACH_ID(_foreach_col) \ + , BOOST_FOREACH_TYPEOF(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_END(COL) \ + boost::foreach_detail_::end( \ + BOOST_FOREACH_ID(_foreach_col) \ + , BOOST_FOREACH_TYPEOF(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_DONE(COL) \ + boost::foreach_detail_::done( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_ID(_foreach_end) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_NEXT(COL) \ + boost::foreach_detail_::next( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_DEREF(COL) \ + boost::foreach_detail_::deref( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_RBEGIN(COL) \ + boost::foreach_detail_::rbegin( \ + BOOST_FOREACH_ID(_foreach_col) \ + , BOOST_FOREACH_TYPEOF(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_REND(COL) \ + boost::foreach_detail_::rend( \ + BOOST_FOREACH_ID(_foreach_col) \ + , BOOST_FOREACH_TYPEOF(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_RDONE(COL) \ + boost::foreach_detail_::rdone( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_ID(_foreach_end) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_RNEXT(COL) \ + boost::foreach_detail_::rnext( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_RDEREF(COL) \ + boost::foreach_detail_::rderef( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_TYPEOF(COL)) + +/////////////////////////////////////////////////////////////////////////////// +// BOOST_FOREACH +// +// For iterating over collections. Collections can be +// arrays, null-terminated strings, or STL containers. +// The loop variable can be a value or reference. For +// example: +// +// std::list int_list(/*stuff*/); +// BOOST_FOREACH(int &i, int_list) +// { +// /* +// * loop body goes here. +// * i is a reference to the int in int_list. +// */ +// } +// +// Alternately, you can declare the loop variable first, +// so you can access it after the loop finishes. Obviously, +// if you do it this way, then the loop variable cannot be +// a reference. +// +// int i; +// BOOST_FOREACH(i, int_list) +// { ... } +// +#define BOOST_FOREACH(VAR, COL) \ + BOOST_FOREACH_PREAMBLE() \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_BEGIN(COL)) {} else \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_END(COL)) {} else \ + for (bool BOOST_FOREACH_ID(_foreach_continue) = true; \ + BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_DONE(COL); \ + BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_NEXT(COL) : (void)0) \ + if (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else \ + for (VAR = BOOST_FOREACH_DEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true) + +/////////////////////////////////////////////////////////////////////////////// +// BOOST_REVERSE_FOREACH +// +// For iterating over collections in reverse order. In +// all other respects, BOOST_REVERSE_FOREACH is like +// BOOST_FOREACH. +// +#define BOOST_REVERSE_FOREACH(VAR, COL) \ + BOOST_FOREACH_PREAMBLE() \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_RBEGIN(COL)) {} else \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_REND(COL)) {} else \ + for (bool BOOST_FOREACH_ID(_foreach_continue) = true; \ + BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_RDONE(COL); \ + BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_RNEXT(COL) : (void)0) \ + if (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else \ + for (VAR = BOOST_FOREACH_RDEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format.hpp new file mode 100644 index 0000000000..73464a819f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format.hpp @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------- +// format.hpp : primary header +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_HPP +#define BOOST_FORMAT_HPP + +#include +#include +#include +#include + +#ifndef BOOST_NO_STD_LOCALE +#include +#endif + +// *** Compatibility framework +#include + +#ifdef BOOST_NO_LOCALE_ISIDIGIT +#include // we'll use the non-locale 's std::isdigit(int) +#endif + +// **** Forward declarations ---------------------------------- +#include // basic_format, and other frontends +#include // misc forward declarations for internal use + +// **** Auxiliary structs (stream_format_state , and format_item ) +#include + +// **** Format class interface -------------------------------- +#include + +// **** Exceptions ----------------------------------------------- +#include + +// **** Implementation ------------------------------------------- +#include // member functions +#include // class for grouping arguments +#include // argument-feeding functions +#include // format-string parsing (member-)functions + +// **** Implementation of the free functions ---------------------- +#include + + +// *** Undefine 'local' macros : +#include + +#endif // BOOST_FORMAT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/alt_sstream.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/alt_sstream.hpp new file mode 100644 index 0000000000..e236be3526 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/alt_sstream.hpp @@ -0,0 +1,176 @@ +// ---------------------------------------------------------------------------- +// alt_sstream.hpp : alternative stringstream +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + + + +#ifndef BOOST_SK_ALT_SSTREAM_HPP +#define BOOST_SK_ALT_SSTREAM_HPP + +#include +#include +#include +#include +#include + +namespace boost { + namespace io { + + template, + class Alloc=::std::allocator > + class basic_altstringbuf; + + template, + class Alloc=::std::allocator > + class basic_oaltstringstream; + + + template + class basic_altstringbuf + : public ::std::basic_streambuf + { + typedef ::std::basic_streambuf streambuf_t; + typedef typename CompatAlloc::compatible_type compat_allocator_type; + typedef typename CompatTraits::compatible_type compat_traits_type; + public: + typedef Ch char_type; + typedef Tr traits_type; + typedef typename compat_traits_type::int_type int_type; + typedef typename compat_traits_type::pos_type pos_type; + typedef typename compat_traits_type::off_type off_type; + typedef Alloc allocator_type; + typedef ::std::basic_string string_type; + typedef typename string_type::size_type size_type; + + typedef ::std::streamsize streamsize; + + + explicit basic_altstringbuf(std::ios_base::openmode mode + = std::ios_base::in | std::ios_base::out) + : putend_(NULL), is_allocated_(false), mode_(mode) + {} + explicit basic_altstringbuf(const string_type& s, + ::std::ios_base::openmode mode + = ::std::ios_base::in | ::std::ios_base::out) + : putend_(NULL), is_allocated_(false), mode_(mode) + { dealloc(); str(s); } + virtual ~basic_altstringbuf() + { dealloc(); } + using streambuf_t::pbase; + using streambuf_t::pptr; + using streambuf_t::epptr; + using streambuf_t::eback; + using streambuf_t::gptr; + using streambuf_t::egptr; + + void clear_buffer(); + void str(const string_type& s); + + // 0-copy access : + Ch * begin() const; + size_type size() const; + size_type cur_size() const; // stop at current pointer + Ch * pend() const // the highest position reached by pptr() since creation + { return ((putend_ < pptr()) ? pptr() : putend_); } + size_type pcount() const + { return static_cast( pptr() - pbase()) ;} + + // copy buffer to string : + string_type str() const + { return string_type(begin(), size()); } + string_type cur_str() const + { return string_type(begin(), cur_size()); } + protected: + explicit basic_altstringbuf (basic_altstringbuf * s, + ::std::ios_base::openmode mode + = ::std::ios_base::in | ::std::ios_base::out) + : putend_(NULL), is_allocated_(false), mode_(mode) + { dealloc(); str(s); } + + virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, + ::std::ios_base::openmode which + = ::std::ios_base::in | ::std::ios_base::out); + virtual pos_type seekpos (pos_type pos, + ::std::ios_base::openmode which + = ::std::ios_base::in | ::std::ios_base::out); + virtual int_type underflow(); + virtual int_type pbackfail(int_type meta = compat_traits_type::eof()); + virtual int_type overflow(int_type meta = compat_traits_type::eof()); + void dealloc(); + private: + enum { alloc_min = 256}; // minimum size of allocations + + Ch *putend_; // remembers (over seeks) the highest value of pptr() + bool is_allocated_; + ::std::ios_base::openmode mode_; + compat_allocator_type alloc_; // the allocator object + }; + + +// --- class basic_oaltstringstream ---------------------------------------- + template + class basic_oaltstringstream + : private base_from_member< shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, + public ::std::basic_ostream + { + class No_Op { + // used as no-op deleter for (not-owner) shared_pointers + public: + template + const T & operator()(const T & arg) { return arg; } + }; + typedef ::std::basic_ostream stream_t; + typedef boost::base_from_member > > + pbase_type; + typedef ::std::basic_string string_type; + typedef typename string_type::size_type size_type; + typedef basic_altstringbuf stringbuf_t; + public: + typedef Alloc allocator_type; + basic_oaltstringstream() + : pbase_type(new stringbuf_t), stream_t(rdbuf()) + { } + basic_oaltstringstream(::boost::shared_ptr buf) + : pbase_type(buf), stream_t(rdbuf()) + { } + basic_oaltstringstream(stringbuf_t * buf) + : pbase_type(buf, No_Op() ), stream_t(rdbuf()) + { } + stringbuf_t * rdbuf() const + { return pbase_type::member.get(); } + void clear_buffer() + { rdbuf()->clear_buffer(); } + + // 0-copy access : + Ch * begin() const + { return rdbuf()->begin(); } + size_type size() const + { return rdbuf()->size(); } + size_type cur_size() const // stops at current position + { return rdbuf()->cur_size(); } + + // copy buffer to string : + string_type str() const // [pbase, epptr[ + { return rdbuf()->str(); } + string_type cur_str() const // [pbase, pptr[ + { return rdbuf()->cur_str(); } + void str(const string_type& s) + { rdbuf()->str(s); } + }; + + } // N.S. io +} // N.S. boost + +#include + +#endif // include guard + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/alt_sstream_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/alt_sstream_impl.hpp new file mode 100644 index 0000000000..9975e4f96b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/alt_sstream_impl.hpp @@ -0,0 +1,313 @@ +// ---------------------------------------------------------------------------- +// alt_sstream_impl.hpp : alternative stringstream, templates implementation +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_SK_ALT_SSTREAM_IMPL_HPP +#define BOOST_SK_ALT_SSTREAM_IMPL_HPP + +namespace boost { + namespace io { +// --- Implementation ------------------------------------------------------// + + template + void basic_altstringbuf:: + clear_buffer () { + const Ch * p = pptr(); + const Ch * b = pbase(); + if(p != NULL && p != b) { + seekpos(0, ::std::ios_base::out); + } + p = gptr(); + b = eback(); + if(p != NULL && p != b) { + seekpos(0, ::std::ios_base::in); + } + } + + template + void basic_altstringbuf:: + str (const string_type& s) { + size_type sz=s.size(); + if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) { +#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC + void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); + Ch *new_ptr = static_cast(vd_ptr); +#else + Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); +#endif + // if this didnt throw, we're safe, update the buffer + dealloc(); + sz = s.copy(new_ptr, sz); + putend_ = new_ptr + sz; + if(mode_ & ::std::ios_base::in) + streambuf_t::setg(new_ptr, new_ptr, new_ptr + sz); + if(mode_ & ::std::ios_base::out) { + streambuf_t::setp(new_ptr, new_ptr + sz); + if(mode_ & (::std::ios_base::app | ::std::ios_base::ate)) + streambuf_t::pbump(static_cast(sz)); + if(gptr() == NULL) + streambuf_t::setg(new_ptr, NULL, new_ptr); + } + is_allocated_ = true; + } + else + dealloc(); + } + template + Ch* basic_altstringbuf:: + begin () const { + if(mode_ & ::std::ios_base::out && pptr() != NULL) + return pbase(); + else if(mode_ & ::std::ios_base::in && gptr() != NULL) + return eback(); + return NULL; + } + + template + typename std::basic_string::size_type + basic_altstringbuf:: + size () const { + if(mode_ & ::std::ios_base::out && pptr()) + return static_cast(pend() - pbase()); + else if(mode_ & ::std::ios_base::in && gptr()) + return static_cast(egptr() - eback()); + else + return 0; + } + + template + typename std::basic_string::size_type + basic_altstringbuf:: + cur_size () const { + if(mode_ & ::std::ios_base::out && pptr()) + return static_cast( pptr() - pbase()); + else if(mode_ & ::std::ios_base::in && gptr()) + return static_cast( gptr() - eback()); + else + return 0; + } + + template + typename basic_altstringbuf::pos_type + basic_altstringbuf:: + seekoff (off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { + if(pptr() != NULL && putend_ < pptr()) + putend_ = pptr(); + if(which & ::std::ios_base::in && gptr() != NULL) { + // get area + if(way == ::std::ios_base::end) + off += static_cast(putend_ - gptr()); + else if(way == ::std::ios_base::beg) + off += static_cast(eback() - gptr()); + else if(way != ::std::ios_base::cur || (which & ::std::ios_base::out) ) + // (altering in&out is only supported if way is beg or end, not cur) + return pos_type(off_type(-1)); + if(eback() <= off+gptr() && off+gptr() <= putend_ ) { + // set gptr + streambuf_t::gbump(static_cast(off)); + if(which & ::std::ios_base::out && pptr() != NULL) + // update pptr to match gptr + streambuf_t::pbump(static_cast(gptr()-pptr())); + } + else + off = off_type(-1); + } + else if(which & ::std::ios_base::out && pptr() != NULL) { + // put area + if(way == ::std::ios_base::end) + off += static_cast(putend_ - pptr()); + else if(way == ::std::ios_base::beg) + off += static_cast(pbase() - pptr()); + else if(way != ::std::ios_base::beg) + return pos_type(off_type(-1)); + if(pbase() <= off+pptr() && off+pptr() <= putend_) + // set pptr + streambuf_t::pbump(static_cast(off)); + else + off = off_type(-1); + } + else // neither in nor out + off = off_type(-1); + return (pos_type(off)); + } + //- end seekoff(..) + + + template + typename basic_altstringbuf::pos_type + basic_altstringbuf:: + seekpos (pos_type pos, ::std::ios_base::openmode which) { + off_type off = off_type(pos); // operation guaranteed by 27.4.3.2 table 88 + if(pptr() != NULL && putend_ < pptr()) + putend_ = pptr(); + if(off != off_type(-1)) { + if(which & ::std::ios_base::in && gptr() != NULL) { + // get area + if(0 <= off && off <= putend_ - eback()) { + streambuf_t::gbump(static_cast(eback() - gptr() + off)); + if(which & ::std::ios_base::out && pptr() != NULL) { + // update pptr to match gptr + streambuf_t::pbump(static_cast(gptr()-pptr())); + } + } + else + off = off_type(-1); + } + else if(which & ::std::ios_base::out && pptr() != NULL) { + // put area + if(0 <= off && off <= putend_ - eback()) + streambuf_t::pbump(static_cast(eback() - pptr() + off)); + else + off = off_type(-1); + } + else // neither in nor out + off = off_type(-1); + return (pos_type(off)); + } + else { + BOOST_ASSERT(0); // §27.4.3.2 allows undefined-behaviour here + return pos_type(off_type(-1)); + } + } + // -end seekpos(..) + + + template + typename basic_altstringbuf::int_type + basic_altstringbuf:: + underflow () { + if(gptr() == NULL) // no get area -> nothing to get. + return (compat_traits_type::eof()); + else if(gptr() < egptr()) // ok, in buffer + return (compat_traits_type::to_int_type(*gptr())); + else if(mode_ & ::std::ios_base::in && pptr() != NULL + && (gptr() < pptr() || gptr() < putend_) ) + { // expand get area + if(putend_ < pptr()) + putend_ = pptr(); // remember pptr reached this far + streambuf_t::setg(eback(), gptr(), putend_); + return (compat_traits_type::to_int_type(*gptr())); + } + else // couldnt get anything. EOF. + return (compat_traits_type::eof()); + } + // -end underflow(..) + + + template + typename basic_altstringbuf::int_type + basic_altstringbuf:: + pbackfail (int_type meta) { + if(gptr() != NULL && (eback() < gptr()) + && (mode_ & (::std::ios_base::out) + || compat_traits_type::eq_int_type(compat_traits_type::eof(), meta) + || compat_traits_type::eq(compat_traits_type::to_char_type(meta), gptr()[-1]) ) ) { + streambuf_t::gbump(-1); // back one character + if(!compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) + // put-back meta into get area + *gptr() = compat_traits_type::to_char_type(meta); + return (compat_traits_type::not_eof(meta)); + } + else + return (compat_traits_type::eof()); // failed putback + } + // -end pbackfail(..) + + + template + typename basic_altstringbuf::int_type + basic_altstringbuf:: + overflow (int_type meta) { +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4996) +#endif + if(compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) + return compat_traits_type::not_eof(meta); // nothing to do + else if(pptr() != NULL && pptr() < epptr()) { + streambuf_t::sputc(compat_traits_type::to_char_type(meta)); + return meta; + } + else if(! (mode_ & ::std::ios_base::out)) + // no write position, and cant make one + return compat_traits_type::eof(); + else { // make a write position available + std::size_t prev_size = pptr() == NULL ? 0 : epptr() - eback(); + std::size_t new_size = prev_size; + // exponential growth : size *= 1.5 + std::size_t add_size = new_size / 2; + if(add_size < alloc_min) + add_size = alloc_min; + Ch * newptr = NULL, *oldptr = eback(); + + // make sure adding add_size wont overflow size_t + while (0 < add_size && ((std::numeric_limits::max)() + - add_size < new_size) ) + add_size /= 2; + if(0 < add_size) { + new_size += add_size; +#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC + void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); + newptr = static_cast(vdptr); +#else + newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); +#endif + } + + if(0 < prev_size) + compat_traits_type::copy(newptr, oldptr, prev_size); + if(is_allocated_) + alloc_.deallocate(oldptr, prev_size); + is_allocated_=true; + + if(prev_size == 0) { // first allocation + putend_ = newptr; + streambuf_t::setp(newptr, newptr + new_size); + if(mode_ & ::std::ios_base::in) + streambuf_t::setg(newptr, newptr, newptr + 1); + else + streambuf_t::setg(newptr, 0, newptr); + } + else { // update pointers + putend_ = putend_ - oldptr + newptr; + int pptr_count = static_cast(pptr()-pbase()); + int gptr_count = static_cast(gptr()-eback()); + streambuf_t::setp(pbase() - oldptr + newptr, newptr + new_size); + streambuf_t::pbump(pptr_count); + if(mode_ & ::std::ios_base::in) + streambuf_t::setg(newptr, newptr + gptr_count, pptr() + 1); + else + streambuf_t::setg(newptr, 0, newptr); + } + streambuf_t::sputc(compat_traits_type::to_char_type(meta)); + return meta; + } +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + } + // -end overflow(..) + + template + void basic_altstringbuf:: dealloc() { + if(is_allocated_) + alloc_.deallocate(eback(), (pptr() != NULL ? epptr() : egptr()) - eback()); + is_allocated_ = false; + streambuf_t::setg(0, 0, 0); + streambuf_t::setp(0, 0); + putend_ = NULL; + } + + }// N.S. io +} // N.S. boost + +#endif // include guard + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/detail/compat_workarounds.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/compat_workarounds.hpp new file mode 100644 index 0000000000..8e51514f3e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/compat_workarounds.hpp @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------- +// compat_workarounds : general framework for non-conformance workarounds +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// see http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + + +// this file defines wrapper classes to hide non-conforming +// std::char_traits<> and std::allocator<> traits +// and Includes : config_macros.hpp (defines config macros +// and compiler-specific switches) + +// Non-conformant Std-libs fail to supply conformant traits (std::char_traits, +// std::allocator) and/or the std::string doesnt support them. +// We don't want to have hundreds of #ifdef workarounds, so we define +// replacement traits. +// But both char_traits and allocator traits are visible in the interface, +// (inside the final string type), thus we need to keep both +// the replacement type (typedefed to 'compatible_type') for real use, +// and the original stdlib type (typedef to 'type_for_string') for interface +// visibility. This is what Compat* classes do (as well as be transparent +// when good allocator and char traits are present) + +#ifndef BOOST_FORMAT_COMPAT_WORKAROUNDS_HPP +#define BOOST_FORMAT_COMPAT_WORKAROUNDS_HPP + +namespace boost { + namespace io { + + // gcc-2.95 char traits (non-conformantly named string_char_traits) + // lack several functions so we extend them in a replacement class. + template + class CompatTraits; + + // std::allocator in gcc-2.95 is ok, but basic_string only works + // with plain 'std::alloc' still, alt_stringbuf requires a functionnal + // alloc template argument, so we need a replacement allocator + template + class CompatAlloc; + } // N.S. io +}// N.S. boost + + +#include + // sets-up macros and load compiler-specific workarounds headers. + +#if !defined(BOOST_FORMAT_STREAMBUF_DEFINED) +// workarounds-gcc-2.95 might have defined own streambuf +#include +#endif + +#if !defined(BOOST_FORMAT_OSTREAM_DEFINED) +// workarounds-gcc-2.95 might already have included +#include +#endif + + + +namespace boost { + namespace io { + + // **** CompatTraits general definitions : ---------------------------- + template + class CompatTraits + { // general case : be transparent + public: + typedef Tr compatible_type; + }; + + // **** CompatAlloc general definitions : ----------------------------- + template + class CompatAlloc + { // general case : be transparent + public: + typedef Alloc compatible_type; + }; + + } //N.S. io +} // N.S. boost +#endif // include guard diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/detail/config_macros.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/config_macros.hpp new file mode 100644 index 0000000000..1f01b1789b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/config_macros.hpp @@ -0,0 +1,97 @@ +// -*- C++ -*- +// ---------------------------------------------------------------------------- +// config_macros.hpp : configuration macros for the format library +// only BOOST_IO_STD is absolutely needed (it should be 'std::' in general) +// others are compiler-specific workaround macros used in #ifdef switches +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// see http://www.boost.org/libs/format for library home page + + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_CONFIG_MACROS_HPP +#define BOOST_FORMAT_CONFIG_MACROS_HPP + +#include +#include + +// make sure our local macros wont override something : +#if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \ + || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION ) \ + || defined(BOOST_NO_TEMPLATE_STD_STREAM) \ + || defined(BOOST_FORMAT_STREAMBUF_DEFINED) || defined(BOOST_FORMAT_OSTREAM_DEFINED) +#error "boost::format uses a local macro that is already defined." +#endif + +// specific workarounds. each header can define BOOS_IO_STD if it +// needs. (e.g. because of IO_NEEDS_USING_DECLARATION) +#include +#include + +#ifndef BOOST_IO_STD +# define BOOST_IO_STD ::std:: +#endif + +#if defined(BOOST_NO_STD_LOCALE) || \ + ( BOOST_WORKAROUND(__BORLANDC__, <= 0x564) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) ) ) +// some future __BORLANDC__ >0x564 versions might not need this +// 0x570 is Borland's kylix branch +#define BOOST_NO_LOCALE_ISDIGIT +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300)) +#define BOOST_NO_OVERLOAD_FOR_NON_CONST +#endif + +// gcc-2.95's native stringstream is not usable +#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +#define BOOST_FORMAT_IGNORE_STRINGSTREAM +#endif + + +// **** Workaround for io streams, stlport and msvc. +#ifdef BOOST_IO_NEEDS_USING_DECLARATION +namespace boost { + using std::char_traits; + using std::basic_ostream; + namespace io { + using std::basic_ostream; + namespace detail { + using std::basic_ios; + using std::basic_ostream; + } + } +#if ! defined(BOOST_NO_STD_LOCALE) + using std::locale; + namespace io { + using std::locale; + namespace detail { + using std::locale; + } + } +#endif // locale +} + // -end N.S. boost +#endif // needs_using_declaration + + +// *** hide std::locale if it doesnt exist. +// this typedef is either std::locale or int, avoids placing ifdefs everywhere +namespace boost { namespace io { namespace detail { +#if ! defined(BOOST_NO_STD_LOCALE) + typedef BOOST_IO_STD locale locale_t; +#else + typedef int locale_t; +#endif +} } } + + +// ---------------------------------------------------------------------------- + +#endif // BOOST_FORMAT_MACROS_DEFAULT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/detail/msvc_disambiguater.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/msvc_disambiguater.hpp new file mode 100644 index 0000000000..f12e5e97b2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/msvc_disambiguater.hpp @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------- +// msvc_disambiguater.hpp : msvc workarounds. (for put_{head|last} overloads) +// the trick was described in boost's list by Aleksey Gurtovoy +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// see http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_MSVC_DISAMBIGUATER_HPP +#define BOOST_MSVC_DISAMBIGUATER_HPP + +#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) || \ + BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) + // this whole header is specifically for msvc up to 7.0 + +#include +#include + +namespace boost { +namespace io { +namespace detail { + +template< class Ch, class Tr, class T > +struct disambiguater +{ + template< typename U > + static void put_head(BOOST_IO_STD basic_ostream& os, group1 const& x, long) + { + os << group_head(x.a1_); + } + static void put_head(BOOST_IO_STD basic_ostream& os, T const& x, int) + { + } + template< typename U > + static void put_last(BOOST_IO_STD basic_ostream& os, group1 const& x, long) + { + os << group_last(x.a1_); + } + static void put_last(BOOST_IO_STD basic_ostream& os, T const& x, int) + { + os << x; + } +}; + +} // namespace detail +} // namespace io +} // namespace boost + +#endif // -BOOST_MSVC + +#endif // -BOOST_MSVC_DISAMBIGUATER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/detail/unset_macros.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/unset_macros.hpp new file mode 100644 index 0000000000..b3ac47b42b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/unset_macros.hpp @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------- +// unset_macros.hpp +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +// *** Undefine 'local' macros : +#ifdef BOOST_NO_OVERLOAD_FOR_NON_CONST +#undef BOOST_NO_OVERLOAD_FOR_NON_CONST +#endif +#ifdef BOOST_NO_LOCALE_ISDIGIT +#undef BOOST_NO_LOCALE_ISDIGIT +#endif +#ifdef BOOST_IO_STD +#undef BOOST_IO_STD +#endif +#ifdef BOOST_IO_NEEDS_USING_DECLARATION +#undef BOOST_IO_NEEDS_USING_DECLARATION +#endif +#ifdef BOOST_NO_TEMPLATE_STD_STREAM +#undef BOOST_NO_TEMPLATE_STD_STREAM +#endif +#ifdef BOOST_FORMAT_STREAMBUF_DEFINED +#undef BOOST_FORMAT_STREAMBUF_DEFINED +#endif +#ifdef BOOST_FORMAT_OSTREAM_DEFINED +#undef BOOST_FORMAT_OSTREAM_DEFINED +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/detail/workarounds_gcc-2_95.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/workarounds_gcc-2_95.hpp new file mode 100644 index 0000000000..8c49d42d02 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/workarounds_gcc-2_95.hpp @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------- +// workarounds for gcc < 3.0. +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + + +// ---------------------------------------------------------------------------- + +// There's a lot to do, the stdlib shipped with gcc prior to 3.x +// was terribly non-conforming. +// . defines macros switches +// . supplies template classes basic_foo where gcc only supplies foo. +// i.e : +// - basic_ios from ios +// - basic_ostream from ostream +// - basic_srteambuf from streambuf +// these can be used transparently. (it obviously does not work for wchar_t) +// . specialise CompatAlloc and CompatTraits to wrap gcc-2.95's +// string_char_traits and std::alloc + +#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + // only for gcc-2.95's native stdlib + +#ifndef BOOST_FORMAT_WORKAROUNDS_GCC295_H +#define BOOST_FORMAT_WORKAROUNDS_GCC295_H + +// SGI STL doesnt have and others, so we need iostream. +#include +#define BOOST_FORMAT_OSTREAM_DEFINED + +#include +#define BOOST_FORMAT_STREAMBUF_DEFINED + +#define BOOST_NO_TEMPLATE_STD_STREAM + +#ifndef BOOST_IO_STD +# define BOOST_IO_STD std:: +#endif + + + +// *** +// gcc's simple classes turned into standard-like template classes : + +namespace std { + + + // gcc has string_char_traits, it's incomplete. + // we declare a std::char_traits, and specialize CompatTraits<..> on it + // to do what is required + template + class char_traits; // no definition here, we will just use it as a tag. + + template + class basic_streambuf; + + template + class basic_streambuf : public streambuf { + }; + + template > + class basic_ios; + + template + class basic_ios : public ostream { + public: + basic_ios(streambuf * p) : ostream(p) {}; + char fill() const { return ios::fill(); } // gcc returns wchar.. + char fill(char c) { return ios::fill(c); } // gcc takes wchar.. + char widen(char c) { return c; } + char narrow(char c, char def) { return c; } + basic_ios& copyfmt(const ios& right) { + fill(right.fill()); + flags(right.flags() ); + exceptions(right.exceptions()); + width(right.width()); + precision(right.precision()); + return *this; + } + }; + + + typedef ios ios_base; + + template + class basic_ostream; + + template + class basic_ostream : public basic_ios + { + public: + basic_ostream(streambuf * p) : basic_ios (p) {} + }; + +} // namespace std + + +namespace boost { + namespace io { + + + // ** CompatTraits gcc2.95 specialisations ---------------------------- + template + class CompatTraits< ::std::string_char_traits > + : public ::std::string_char_traits + { + public: + typedef CompatTraits compatible_type; + + typedef Ch char_type; + typedef int int_type; + typedef ::std::streampos pos_type; + typedef ::std::streamoff off_type; + + static char_type + to_char_type(const int_type& meta) { + return static_cast(meta); } + static int_type + to_int_type(const char_type& ch) { + return static_cast(static_cast(ch) );} + static bool + eq_int_type(const int_type& left, const int_type& right) { + return left == right; } + static int_type + eof() { + return static_cast(EOF); + } + static int_type + not_eof(const int_type& meta) { + return (meta == eof()) ? 0 : meta; + } + }; + + template + class CompatTraits< ::std::char_traits > { + public: + typedef CompatTraits< ::std::string_char_traits > compatible_type; + }; + + // ** CompatAlloc gcc-2.95 specialisations --------------------------- + template<> + class CompatAlloc< ::std::alloc> + { + public: + typedef ::std::allocator compatible_type; + }; + + } // N.S. io +} // N.S. boost + + + + + +#endif // include guard + +#endif // if workaround diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/detail/workarounds_stlport.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/workarounds_stlport.hpp new file mode 100644 index 0000000000..eb35dc1708 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/detail/workarounds_stlport.hpp @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------- +// workarounds_stlport.hpp : workaround STLport issues +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// see http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_MACROS_STLPORT_HPP +#define BOOST_MACROS_STLPORT_HPP + +#if defined(_STLPORT_VERSION) && BOOST_WORKAROUND( BOOST_MSVC, <= 1300) +// msvc-6-stlport fails to find basic_string::append( iterator, iterator) when linking +// might affect other MSwindows compilers +#define BOOST_NO_STRING_APPEND +#endif + +// *** This should go to "boost/config/stdlib/stlport.hpp". + +// If the streams are not native and there are problems with using templates +// accross namespaces, we define some macros to enable a workaround for this. + +// STLport 4.5 +#if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) +# define BOOST_IO_STD +# define BOOST_IO_NEEDS_USING_DECLARATION +#endif + +// STLport 4.0 +#if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_OWN_NAMESPACE) && defined(BOOST_NO_USING_TEMPLATE) +# define BOOST_IO_STD +# define BOOST_IO_NEEDS_USING_DECLARATION +#endif + + +// ---------------------------------------------------------------------------- + +#endif // BOOST_MACROS_STLPORT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/exceptions.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/exceptions.hpp new file mode 100644 index 0000000000..9b2de834cf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/exceptions.hpp @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------- +// boost/format/exceptions.hpp +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// See http://www.boost.org/libs/format/ for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_EXCEPTIONS_HPP +#define BOOST_FORMAT_EXCEPTIONS_HPP + + +#include + + +namespace boost { + + namespace io { + +// **** exceptions ----------------------------------------------- + + class format_error : public std::exception + { + public: + format_error() {} + virtual const char *what() const throw() { + return "boost::format_error: " + "format generic failure"; + } + }; + + class bad_format_string : public format_error + { + std::size_t pos_, next_; + public: + bad_format_string(std::size_t pos, std::size_t size) + : pos_(pos), next_(size) {} + std::size_t get_pos() const { return pos_; } + std::size_t get_next() const { return next_; } + virtual const char *what() const throw() { + return "boost::bad_format_string: format-string is ill-formed"; + } + }; + + class too_few_args : public format_error + { + std::size_t cur_, expected_; + public: + too_few_args(std::size_t cur, std::size_t expected) + : cur_(cur), expected_(expected) {} + std::size_t get_cur() const { return cur_; } + std::size_t get_expected() const { return expected_; } + virtual const char *what() const throw() { + return "boost::too_few_args: " + "format-string referred to more arguments than were passed"; + } + }; + + class too_many_args : public format_error + { + std::size_t cur_, expected_; + public: + too_many_args(std::size_t cur, std::size_t expected) + : cur_(cur), expected_(expected) {} + std::size_t get_cur() const { return cur_; } + std::size_t get_expected() const { return expected_; } + virtual const char *what() const throw() { + return "boost::too_many_args: " + "format-string referred to less arguments than were passed"; + } + }; + + + class out_of_range : public format_error + { + int index_, beg_, end_; // range is [ beg, end [ + public: + out_of_range(int index, int beg, int end) + : index_(index), beg_(beg), end_(end) {} + int get_index() const { return index_; } + int get_beg() const { return beg_; } + int get_end() const { return end_; } + virtual const char *what() const throw() { + return "boost::out_of_range: " + "tried to refer to an argument (or item) number which" + " is out of range, according to the format string"; + } + }; + + + } // namespace io + +} // namespace boost + + +#endif // BOOST_FORMAT_EXCEPTIONS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/feed_args.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/feed_args.hpp new file mode 100644 index 0000000000..53243dccc8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/feed_args.hpp @@ -0,0 +1,277 @@ +// ---------------------------------------------------------------------------- +// feed_args.hpp : functions for processing each argument +// (feed, feed_manip, and distribute) +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_FEED_ARGS_HPP +#define BOOST_FORMAT_FEED_ARGS_HPP + +#include +#include +#include + +#include +#include +#include + +namespace boost { +namespace io { +namespace detail { + + template + void mk_str( std::basic_string & res, + const Ch * beg, + typename std::basic_string::size_type size, + std::streamsize w, + const Ch fill_char, + std::ios_base::fmtflags f, + const Ch prefix_space, // 0 if no space-padding + bool center) + // applies centered/left/right padding to the string [beg, beg+size[ + // Effects : the result is placed in res. + { + typedef typename std::basic_string::size_type size_type; + res.resize(0); + if(w<=0 || static_cast(w) <=size) { + // no need to pad. + res.reserve(size + !!prefix_space); + if(prefix_space) + res.append(1, prefix_space); + if (size) + res.append(beg, size); + } + else { + std::streamsize n=static_cast(w-size-!!prefix_space); + std::streamsize n_after = 0, n_before = 0; + res.reserve(static_cast(w)); // allocate once for the 2 inserts + if(center) + n_after = n/2, n_before = n - n_after; + else + if(f & std::ios_base::left) + n_after = n; + else + n_before = n; + // now make the res string : + if(n_before) res.append(static_cast(n_before), fill_char); + if(prefix_space) + res.append(1, prefix_space); + if (size) + res.append(beg, size); + if(n_after) res.append(static_cast(n_after), fill_char); + } + } // -mk_str(..) + + +#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) || \ + BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) +// MSVC needs to be tricked to disambiguate this simple overload.. +// the trick is in "boost/format/msvc_disambiguater.hpp" + + template< class Ch, class Tr, class T> inline + void put_head (BOOST_IO_STD basic_ostream & os, const T& x ) { + disambiguater::put_head(os, x, 1L); + } + template< class Ch, class Tr, class T> inline + void put_last (BOOST_IO_STD basic_ostream & os, const T& x ) { + disambiguater::put_last(os, x, 1L); + } + +#else + + template< class Ch, class Tr, class T> inline + void put_head (BOOST_IO_STD basic_ostream &, const T& ) { + } + + template< class Ch, class Tr, class T> inline + void put_head( BOOST_IO_STD basic_ostream & os, const group1& x ) { + os << group_head(x.a1_); // send the first N-1 items, not the last + } + + template< class Ch, class Tr, class T> inline + void put_last( BOOST_IO_STD basic_ostream & os, const T& x ) { + os << x ; + } + + template< class Ch, class Tr, class T> inline + void put_last( BOOST_IO_STD basic_ostream & os, const group1& x ) { + os << group_last(x.a1_); // this selects the last element + } + +#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST + template< class Ch, class Tr, class T> inline + void put_head( BOOST_IO_STD basic_ostream &, T& ) { + } + + template< class Ch, class Tr, class T> inline + void put_last( BOOST_IO_STD basic_ostream & os, T& x) { + os << x ; + } +#endif +#endif // -msvc workaround + + + template< class Ch, class Tr, class Alloc, class T> + void put( T x, + const format_item& specs, + typename basic_format::string_type& res, + typename basic_format::internal_streambuf_t & buf, + io::detail::locale_t *loc_p = NULL) + { +#ifdef BOOST_MSVC + // If std::min or std::max are already instantiated + // at this point then we get a blizzard of warning messages when we call + // those templates with std::size_t as arguments. Weird and very annoyning... +#pragma warning(push) +#pragma warning(disable:4267) +#endif + // does the actual conversion of x, with given params, into a string + // using the supplied stringbuf. + + typedef typename basic_format::string_type string_type; + typedef typename basic_format::format_item_t format_item_t; + typedef typename string_type::size_type size_type; + + basic_oaltstringstream oss( &buf); + specs.fmtstate_.apply_on(oss, loc_p); + + // the stream format state can be modified by manipulators in the argument : + put_head( oss, x ); + // in case x is a group, apply the manip part of it, + // in order to find width + + const std::ios_base::fmtflags fl=oss.flags(); + const bool internal = (fl & std::ios_base::internal) != 0; + const std::streamsize w = oss.width(); + const bool two_stepped_padding= internal && (w!=0); + + res.resize(0); + if(! two_stepped_padding) { + if(w>0) // handle padding via mk_str, not natively in stream + oss.width(0); + put_last( oss, x); + const Ch * res_beg = buf.pbase(); + Ch prefix_space = 0; + if(specs.pad_scheme_ & format_item_t::spacepad) + if(buf.pcount()== 0 || + (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) + prefix_space = oss.widen(' '); + size_type res_size = (std::min)( + static_cast(specs.truncate_ - !!prefix_space), + buf.pcount() ); + mk_str(res, res_beg, res_size, w, oss.fill(), fl, + prefix_space, (specs.pad_scheme_ & format_item_t::centered) !=0 ); + } + else { // 2-stepped padding + // internal can be implied by zeropad, or user-set. + // left, right, and centered alignment overrule internal, + // but spacepad or truncate might be mixed with internal (using manipulator) + put_last( oss, x); // may pad + const Ch * res_beg = buf.pbase(); + size_type res_size = buf.pcount(); + bool prefix_space=false; + if(specs.pad_scheme_ & format_item_t::spacepad) + if(buf.pcount()== 0 || + (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) + prefix_space = true; + if(res_size == static_cast(w) && w<=specs.truncate_ && !prefix_space) { + // okay, only one thing was printed and padded, so res is fine + res.assign(res_beg, res_size); + } + else { // length w exceeded + // either it was multi-output with first output padding up all width.. + // either it was one big arg and we are fine. + // Note that res_size oss2( &buf); + specs.fmtstate_.apply_on(oss2, loc_p); + put_head( oss2, x ); + + oss2.width(0); + if(prefix_space) + oss2 << ' '; + put_last(oss2, x ); + if(buf.pcount()==0 && specs.pad_scheme_ & format_item_t::spacepad) { + prefix_space =true; + oss2 << ' '; + } + // we now have the minimal-length output + const Ch * tmp_beg = buf.pbase(); + size_type tmp_size = (std::min)(static_cast(specs.truncate_), + buf.pcount() ); + + + if(static_cast(w) <= tmp_size) { + // minimal length is already >= w, so no padding (cool!) + res.assign(tmp_beg, tmp_size); + } + else { // hum.. we need to pad (multi_output, or spacepad present) + //find where we should pad + size_type sz = (std::min)(res_size + (prefix_space ? 1 : 0), tmp_size); + size_type i = prefix_space; + for(; i=tmp_size) i=prefix_space; + res.assign(tmp_beg, i); + std::streamsize d = w - static_cast(tmp_size); + BOOST_ASSERT(d>0); + res.append(static_cast( d ), oss2.fill()); + res.append(tmp_beg+i, tmp_size-i); + BOOST_ASSERT(i+(tmp_size-i)+(std::max)(d,(std::streamsize)0) + == static_cast(w)); + BOOST_ASSERT(res.size() == static_cast(w)); + } + } + } + buf.clear_buffer(); +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + } // end- put(..) + + + template< class Ch, class Tr, class Alloc, class T> + void distribute (basic_format& self, T x) { + // call put(x, ..) on every occurence of the current argument : + if(self.cur_arg_ >= self.num_args_) { + if( self.exceptions() & too_many_args_bit ) + boost::throw_exception(too_many_args(self.cur_arg_, self.num_args_)); + else return; + } + for(unsigned long i=0; i < self.items_.size(); ++i) { + if(self.items_[i].argN_ == self.cur_arg_) { + put (x, self.items_[i], self.items_[i].res_, + self.buf_, boost::get_pointer(self.loc_) ); + } + } + } + + template + basic_format& + feed (basic_format& self, T x) { + if(self.dumped_) self.clear(); + distribute (self, x); + ++self.cur_arg_; + if(self.bound_.size() != 0) { + while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] ) + ++self.cur_arg_; + } + return self; + } + +} // namespace detail +} // namespace io +} // namespace boost + + +#endif // BOOST_FORMAT_FEED_ARGS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/format_class.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/format_class.hpp new file mode 100644 index 0000000000..4555e56ec3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/format_class.hpp @@ -0,0 +1,168 @@ +// ---------------------------------------------------------------------------- +// format_class.hpp : class interface +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_CLASS_HPP +#define BOOST_FORMAT_CLASS_HPP + + +#include +#include + +#include // to store locale when needed + +#include +#include +#include +#include + +namespace boost { + + template + class basic_format + { + typedef typename io::CompatTraits::compatible_type compat_traits; + public: + typedef Ch CharT; // borland fails in operator% if we use Ch and Tr directly + typedef std::basic_string string_type; + typedef typename string_type::size_type size_type; + typedef io::detail::format_item format_item_t; + typedef io::basic_altstringbuf internal_streambuf_t; + + + explicit basic_format(const Ch* str=NULL); + explicit basic_format(const string_type& s); + basic_format(const basic_format& x); + basic_format& operator= (const basic_format& x); + void swap(basic_format& x); + +#if !defined(BOOST_NO_STD_LOCALE) + explicit basic_format(const Ch* str, const std::locale & loc); + explicit basic_format(const string_type& s, const std::locale & loc); +#endif + io::detail::locale_t getloc() const; + + basic_format& clear(); // empty all converted string buffers (except bound items) + basic_format& clear_binds(); // unbind all bound items, and call clear() + basic_format& parse(const string_type&); // resets buffers and parse a new format string + + // ** formatted result ** // + size_type size() const; // sum of the current string pieces sizes + string_type str() const; // final string + + // ** arguments passing ** // + template + basic_format& operator%(const T& x) + { return io::detail::feed(*this,x); } + +#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST + template basic_format& operator%(T& x) + { return io::detail::feed(*this,x); } +#endif + +#if defined(__GNUC__) + // GCC can't handle anonymous enums without some help + // ** arguments passing ** // + basic_format& operator%(const int& x) + { return io::detail::feed(*this,x); } + +#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST + basic_format& operator%(int& x) + { return io::detail::feed(*this,x); } +#endif +#endif + + // The total number of arguments expected to be passed to the format objectt + int expected_args() const + { return num_args_; } + // The number of arguments currently bound (see bind_arg(..) ) + int bound_args() const; + // The number of arguments currently fed to the format object + int fed_args() const; + // The index (1-based) of the current argument (i.e. next to be formatted) + int cur_arg() const; + // The number of arguments still required to be fed + int remaining_args() const; // same as expected_args() - bound_args() - fed_args() + + + // ** object modifying **// + template + basic_format& bind_arg(int argN, const T& val) + { return io::detail::bind_arg_body(*this, argN, val); } + basic_format& clear_bind(int argN); + template + basic_format& modify_item(int itemN, T manipulator) + { return io::detail::modify_item_body (*this, itemN, manipulator);} + + // Choosing which errors will throw exceptions : + unsigned char exceptions() const; + unsigned char exceptions(unsigned char newexcept); + +#if !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS ) \ + && !BOOST_WORKAROUND(__BORLANDC__, <= 0x570) \ + && !BOOST_WORKAROUND( _CRAYC, != 0) \ + && !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) + // use friend templates and private members only if supported + +#ifndef BOOST_NO_TEMPLATE_STD_STREAM + template + friend std::basic_ostream & + operator<<( std::basic_ostream & , + const basic_format& ); +#else + template + friend std::ostream & + operator<<( std::ostream & , + const basic_format& ); +#endif + + template + friend basic_format& + io::detail::feed (basic_format&, T); + + template friend + void io::detail::distribute (basic_format&, T); + + template friend + basic_format& + io::detail::modify_item_body (basic_format&, int, T); + + template friend + basic_format& + io::detail::bind_arg_body (basic_format&, int, const T&); + + private: +#endif + typedef io::detail::stream_format_state stream_format_state; + // flag bits, used for style_ + enum style_values { ordered = 1, // set only if all directives are positional + special_needs = 4 }; + + void make_or_reuse_data(std::size_t nbitems);// used for (re-)initialisation + + // member data --------------------------------------------// + std::vector items_; // each '%..' directive leads to a format_item + std::vector bound_; // stores which arguments were bound. size() == 0 || num_args + + int style_; // style of format-string : positional or not, etc + int cur_arg_; // keep track of wich argument is current + int num_args_; // number of expected arguments + mutable bool dumped_; // true only after call to str() or << + string_type prefix_; // piece of string to insert before first item + unsigned char exceptions_; + internal_streambuf_t buf_; // the internal stream buffer. + boost::optional loc_; + }; // class basic_format + +} // namespace boost + + +#endif // BOOST_FORMAT_CLASS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/format_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/format_fwd.hpp new file mode 100644 index 0000000000..be3228af3c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/format_fwd.hpp @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------- +// format_fwd.hpp : forward declarations +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_FWD_HPP +#define BOOST_FORMAT_FWD_HPP + +#include +#include + +#include + +namespace boost { + + template , class Alloc = std::allocator > +#else + class Tr = std::string_char_traits, class Alloc = std::alloc > +#endif + class basic_format; + + typedef basic_format format; + +#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF) \ + && !defined(BOOST_FORMAT_IGNORE_STRINGSTREAM) + typedef basic_format wformat; +#endif + + namespace io { + enum format_error_bits { bad_format_string_bit = 1, + too_few_args_bit = 2, too_many_args_bit = 4, + out_of_range_bit = 8, + all_error_bits = 255, no_error_bits=0 }; + + } // namespace io + +} // namespace boost + +#endif // BOOST_FORMAT_FWD_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/format_implementation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/format_implementation.hpp new file mode 100644 index 0000000000..2abb5c4b03 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/format_implementation.hpp @@ -0,0 +1,329 @@ +// ---------------------------------------------------------------------------- +// format_implementation.hpp Implementation of the basic_format class +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_IMPLEMENTATION_HPP +#define BOOST_FORMAT_IMPLEMENTATION_HPP + +#include +#include +#include +#include +#include // std::swap + +namespace boost { + +// --- basic_format implementation -----------------------------------------// + + template< class Ch, class Tr, class Alloc> + basic_format:: basic_format(const Ch* s) + : style_(0), cur_arg_(0), num_args_(0), dumped_(false), + exceptions_(io::all_error_bits) + { + if( s) + parse( s ); + } + +#if !defined(BOOST_NO_STD_LOCALE) + template< class Ch, class Tr, class Alloc> + basic_format:: basic_format(const Ch* s, const std::locale & loc) + : style_(0), cur_arg_(0), num_args_(0), dumped_(false), + exceptions_(io::all_error_bits), loc_(loc) + { + if(s) parse( s ); + } + + template< class Ch, class Tr, class Alloc> + basic_format:: basic_format(const string_type& s, const std::locale & loc) + : style_(0), cur_arg_(0), num_args_(0), dumped_(false), + exceptions_(io::all_error_bits), loc_(loc) + { + parse(s); + } +#endif // ! BOOST_NO_STD_LOCALE + template< class Ch, class Tr, class Alloc> + io::detail::locale_t basic_format:: + getloc() const { + return loc_ ? loc_.get() : io::detail::locale_t(); + } + + template< class Ch, class Tr, class Alloc> + basic_format:: basic_format(const string_type& s) + : style_(0), cur_arg_(0), num_args_(0), dumped_(false), + exceptions_(io::all_error_bits) + { + parse(s); + } + + template< class Ch, class Tr, class Alloc> // just don't copy the buf_ member + basic_format:: basic_format(const basic_format& x) + : items_(x.items_), bound_(x.bound_), style_(x.style_), + cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(x.dumped_), + prefix_(x.prefix_), exceptions_(x.exceptions_), loc_(x.loc_) + { + } + + template< class Ch, class Tr, class Alloc> // just don't copy the buf_ member + basic_format& basic_format:: + operator= (const basic_format& x) { + if(this == &x) + return *this; + (basic_format(x)).swap(*this); + return *this; + } + template< class Ch, class Tr, class Alloc> + void basic_format:: + swap (basic_format & x) { + std::swap(exceptions_, x.exceptions_); + std::swap(style_, x.style_); + std::swap(cur_arg_, x.cur_arg_); + std::swap(num_args_, x.num_args_); + std::swap(dumped_, x.dumped_); + + items_.swap(x.items_); + prefix_.swap(x.prefix_); + bound_.swap(x.bound_); + } + + template< class Ch, class Tr, class Alloc> + unsigned char basic_format:: exceptions() const { + return exceptions_; + } + + template< class Ch, class Tr, class Alloc> + unsigned char basic_format:: exceptions(unsigned char newexcept) { + unsigned char swp = exceptions_; + exceptions_ = newexcept; + return swp; + } + + template + void basic_format:: + make_or_reuse_data (std::size_t nbitems) { +#if !defined(BOOST_NO_STD_LOCALE) + Ch fill = ( BOOST_USE_FACET(std::ctype, getloc()) ). widen(' '); +#else + Ch fill = ' '; +#endif + if(items_.size() == 0) + items_.assign( nbitems, format_item_t(fill) ); + else { + if(nbitems>items_.size()) + items_.resize(nbitems, format_item_t(fill)); + bound_.resize(0); + for(std::size_t i=0; i < nbitems; ++i) + items_[i].reset(fill); // strings are resized, instead of reallocated + } + prefix_.resize(0); + } + + template< class Ch, class Tr, class Alloc> + basic_format& basic_format:: + clear () { + // empty the string buffers (except bound arguments) + // and make the format object ready for formatting a new set of arguments + + BOOST_ASSERT( bound_.size()==0 || num_args_ == static_cast(bound_.size()) ); + + for(unsigned long i=0; i + basic_format& basic_format:: + clear_binds () { + // remove all binds, then clear() + bound_.resize(0); + clear(); + return *this; + } + + template< class Ch, class Tr, class Alloc> + basic_format& basic_format:: + clear_bind (int argN) { + // remove the bind of ONE argument then clear() + if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] ) { + if( exceptions() & io::out_of_range_bit) + boost::throw_exception(io::out_of_range(argN, 1, num_args_+1 ) ); + else return *this; + } + bound_[argN-1]=false; + clear(); + return *this; + } + + template< class Ch, class Tr, class Alloc> + int basic_format:: + bound_args() const { + if(bound_.size()==0) + return 0; + int n=0; + for(int i=0; i + int basic_format:: + fed_args() const { + if(bound_.size()==0) + return cur_arg_; + int n=0; + for(int i=0; i + int basic_format:: + cur_arg() const { + return cur_arg_+1; } + + template< class Ch, class Tr, class Alloc> + int basic_format:: + remaining_args() const { + if(bound_.size()==0) + return num_args_-cur_arg_; + int n=0; + for(int i=cur_arg_; i + typename basic_format::string_type + basic_format:: + str () const { + if(items_.size()==0) + return prefix_; + if( cur_arg_ < num_args_) + if( exceptions() & io::too_few_args_bit ) + // not enough variables supplied + boost::throw_exception(io::too_few_args(cur_arg_, num_args_)); + + unsigned long i; + string_type res; + res.reserve(size()); + res += prefix_; + for(i=0; i < items_.size(); ++i) { + const format_item_t& item = items_[i]; + res += item.res_; + if( item.argN_ == format_item_t::argN_tabulation) { + BOOST_ASSERT( item.pad_scheme_ & format_item_t::tabulation); + if( static_cast(item.fmtstate_.width_) > res.size() ) + res.append( static_cast(item.fmtstate_.width_) - res.size(), + item.fmtstate_.fill_ ); + } + res += item.appendix_; + } + dumped_=true; + return res; + } + template< class Ch, class Tr, class Alloc> + typename std::basic_string::size_type basic_format:: + size () const { +#ifdef BOOST_MSVC + // If std::min or std::max are already instantiated + // at this point then we get a blizzard of warning messages when we call + // those templates with std::size_t as arguments. Weird and very annoyning... +#pragma warning(push) +#pragma warning(disable:4267) +#endif + BOOST_USING_STD_MAX(); + size_type sz = prefix_.size(); + unsigned long i; + for(i=0; i < items_.size(); ++i) { + const format_item_t& item = items_[i]; + sz += item.res_.size(); + if( item.argN_ == format_item_t::argN_tabulation) + sz = max BOOST_PREVENT_MACRO_SUBSTITUTION (sz, + static_cast(item.fmtstate_.width_) ); + sz += item.appendix_.size(); + } + return sz; +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + } + +namespace io { +namespace detail { + + template + basic_format& + bind_arg_body (basic_format& self, int argN, const T& val) { + // bind one argument to a fixed value + // this is persistent over clear() calls, thus also over str() and << + if(self.dumped_) + self.clear(); // needed because we will modify cur_arg_ + if(argN<1 || argN > self.num_args_) { + if( self.exceptions() & io::out_of_range_bit ) + boost::throw_exception(io::out_of_range(argN, 1, self.num_args_+1 ) ); + else return self; + } + if(self.bound_.size()==0) + self.bound_.assign(self.num_args_,false); + else + BOOST_ASSERT( self.num_args_ == static_cast(self.bound_.size()) ); + int o_cur_arg = self.cur_arg_; + self.cur_arg_ = argN-1; // arrays begin at 0 + + self.bound_[self.cur_arg_]=false; // if already set, we unset and re-sets.. + self.operator%(val); // put val at the right place, because cur_arg is set + + + // Now re-position cur_arg before leaving : + self.cur_arg_ = o_cur_arg; + self.bound_[argN-1]=true; + if(self.cur_arg_ == argN-1 ) { + // hum, now this arg is bound, so move to next free arg + while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_]) + ++self.cur_arg_; + } + // In any case, we either have all args, or are on an unbound arg : + BOOST_ASSERT( self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]); + return self; + } + + template basic_format& + modify_item_body (basic_format& self, int itemN, T manipulator) { + // applies a manipulator to the format_item describing a given directive. + // this is a permanent change, clear or reset won't cancel that. + if(itemN<1 || itemN > static_cast(self.items_.size() )) { + if( self.exceptions() & io::out_of_range_bit ) + boost::throw_exception(io::out_of_range(itemN, 1, static_cast(self.items_.size()) )); + else return self; + } + self.items_[itemN-1].fmtstate_. template apply_manip ( manipulator ); + return self; + } + +} // namespace detail +} // namespace io +} // namespace boost + + + +#endif // BOOST_FORMAT_IMPLEMENTATION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/free_funcs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/free_funcs.hpp new file mode 100644 index 0000000000..3a51545526 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/free_funcs.hpp @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------- +// free_funcs.hpp : implementation of the free functions of boost::format +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_FUNCS_HPP +#define BOOST_FORMAT_FUNCS_HPP + +#include +#include + +namespace boost { + + template inline + std::basic_string str(const basic_format& f) { + // adds up all pieces of strings and converted items, and return the formatted string + return f.str(); + } + namespace io { + using ::boost::str; // keep compatibility with when it was defined in this N.S. + } // - namespace io + +#ifndef BOOST_NO_TEMPLATE_STD_STREAM + template + std::basic_ostream & + operator<<( std::basic_ostream & os, + const basic_format& f) +#else + template + std::ostream & + operator<<( std::ostream & os, + const basic_format& f) +#endif + // effect: "return os << str(f);" but we can do it faster + { + typedef boost::basic_format format_t; + if(f.items_.size()==0) + os << f.prefix_; + else { + if(f.cur_arg_ < f.num_args_) + if( f.exceptions() & io::too_few_args_bit ) + // not enough variables supplied + boost::throw_exception(io::too_few_args(f.cur_arg_, f.num_args_)); + if(f.style_ & format_t::special_needs) + os << f.str(); + else { + // else we dont have to count chars output, so we dump directly to os : + os << f.prefix_; + for(unsigned long i=0; i + + +namespace boost { +namespace io { + + +namespace detail { + + +// empty group, but useful even though. +struct group0 +{ + group0() {} +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << ( BOOST_IO_STD basic_ostream& os, + const group0& ) +{ + return os; +} + +template +struct group1 +{ + T1 a1_; + group1(T1 a1) + : a1_(a1) + {} +private: + group1& operator=(const group1&); +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group1& x) +{ + os << x.a1_; + return os; +} + + + + +template +struct group2 +{ + T1 a1_; + T2 a2_; + group2(T1 a1,T2 a2) + : a1_(a1),a2_(a2) + {} +private: + group2& operator=(const group2&); +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group2& x) +{ + os << x.a1_<< x.a2_; + return os; +} + +template +struct group3 +{ + T1 a1_; + T2 a2_; + T3 a3_; + group3(T1 a1,T2 a2,T3 a3) + : a1_(a1),a2_(a2),a3_(a3) + {} +private: + group3& operator=(const group3&); +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group3& x) +{ + os << x.a1_<< x.a2_<< x.a3_; + return os; +} + +template +struct group4 +{ + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; + group4(T1 a1,T2 a2,T3 a3,T4 a4) + : a1_(a1),a2_(a2),a3_(a3),a4_(a4) + {} +private: + group4& operator=(const group4&); +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group4& x) +{ + os << x.a1_<< x.a2_<< x.a3_<< x.a4_; + return os; +} + +template +struct group5 +{ + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; + T5 a5_; + group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) + : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5) + {} +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group5& x) +{ + os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_; + return os; +} + +template +struct group6 +{ + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; + T5 a5_; + T6 a6_; + group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) + : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6) + {} +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group6& x) +{ + os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_; + return os; +} + +template +struct group7 +{ + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; + T5 a5_; + T6 a6_; + T7 a7_; + group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) + : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7) + {} +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group7& x) +{ + os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_; + return os; +} + +template +struct group8 +{ + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; + T5 a5_; + T6 a6_; + T7 a7_; + T8 a8_; + group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) + : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8) + {} +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group8& x) +{ + os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_; + return os; +} + +template +struct group9 +{ + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; + T5 a5_; + T6 a6_; + T7 a7_; + T8 a8_; + T9 a9_; + group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) + : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9) + {} +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group9& x) +{ + os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_; + return os; +} + +template +struct group10 +{ + T1 a1_; + T2 a2_; + T3 a3_; + T4 a4_; + T5 a5_; + T6 a6_; + T7 a7_; + T8 a8_; + T9 a9_; + T10 a10_; + group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10) + : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10) + {} +}; + +template +inline +BOOST_IO_STD basic_ostream& +operator << (BOOST_IO_STD basic_ostream& os, + const group10& x) +{ + os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_; + return os; +} + + + + +template +inline +group1 +group_head( group2 const& x) +{ + return group1 (x.a1_); +} + +template +inline +group1 +group_last( group2 const& x) +{ + return group1 (x.a2_); +} + + + +template +inline +group2 +group_head( group3 const& x) +{ + return group2 (x.a1_,x.a2_); +} + +template +inline +group1 +group_last( group3 const& x) +{ + return group1 (x.a3_); +} + + + +template +inline +group3 +group_head( group4 const& x) +{ + return group3 (x.a1_,x.a2_,x.a3_); +} + +template +inline +group1 +group_last( group4 const& x) +{ + return group1 (x.a4_); +} + + + +template +inline +group4 +group_head( group5 const& x) +{ + return group4 (x.a1_,x.a2_,x.a3_,x.a4_); +} + +template +inline +group1 +group_last( group5 const& x) +{ + return group1 (x.a5_); +} + + + +template +inline +group5 +group_head( group6 const& x) +{ + return group5 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_); +} + +template +inline +group1 +group_last( group6 const& x) +{ + return group1 (x.a6_); +} + + + +template +inline +group6 +group_head( group7 const& x) +{ + return group6 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_); +} + +template +inline +group1 +group_last( group7 const& x) +{ + return group1 (x.a7_); +} + + + +template +inline +group7 +group_head( group8 const& x) +{ + return group7 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_); +} + +template +inline +group1 +group_last( group8 const& x) +{ + return group1 (x.a8_); +} + + + +template +inline +group8 +group_head( group9 const& x) +{ + return group8 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_); +} + +template +inline +group1 +group_last( group9 const& x) +{ + return group1 (x.a9_); +} + + + +template +inline +group9 +group_head( group10 const& x) +{ + return group9 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_,x.a9_); +} + +template +inline +group1 +group_last( group10 const& x) +{ + return group1 (x.a10_); +} + + + + + +} // namespace detail + + + +// helper functions + + +inline detail::group1< detail::group0 > +group() { return detail::group1< detail::group0 > ( detail::group0() ); } + +template +inline +detail::group1< detail::group2 > + group(T1 a1, Var const& var) +{ + return detail::group1< detail::group2 > + ( detail::group2 + (a1, var) + ); +} + +template +inline +detail::group1< detail::group3 > + group(T1 a1,T2 a2, Var const& var) +{ + return detail::group1< detail::group3 > + ( detail::group3 + (a1,a2, var) + ); +} + +template +inline +detail::group1< detail::group4 > + group(T1 a1,T2 a2,T3 a3, Var const& var) +{ + return detail::group1< detail::group4 > + ( detail::group4 + (a1,a2,a3, var) + ); +} + +template +inline +detail::group1< detail::group5 > + group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var) +{ + return detail::group1< detail::group5 > + ( detail::group5 + (a1,a2,a3,a4, var) + ); +} + +template +inline +detail::group1< detail::group6 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var) +{ + return detail::group1< detail::group6 > + ( detail::group6 + (a1,a2,a3,a4,a5, var) + ); +} + +template +inline +detail::group1< detail::group7 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var) +{ + return detail::group1< detail::group7 > + ( detail::group7 + (a1,a2,a3,a4,a5,a6, var) + ); +} + +template +inline +detail::group1< detail::group8 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var) +{ + return detail::group1< detail::group8 > + ( detail::group8 + (a1,a2,a3,a4,a5,a6,a7, var) + ); +} + +template +inline +detail::group1< detail::group9 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var) +{ + return detail::group1< detail::group9 > + ( detail::group9 + (a1,a2,a3,a4,a5,a6,a7,a8, var) + ); +} + +template +inline +detail::group1< detail::group10 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var) +{ + return detail::group1< detail::group10 > + ( detail::group10 + (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) + ); +} + + +#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST + +template +inline +detail::group1< detail::group2 > + group(T1 a1, Var& var) +{ + return detail::group1< detail::group2 > + ( detail::group2 + (a1, var) + ); +} + +template +inline +detail::group1< detail::group3 > + group(T1 a1,T2 a2, Var& var) +{ + return detail::group1< detail::group3 > + ( detail::group3 + (a1,a2, var) + ); +} + +template +inline +detail::group1< detail::group4 > + group(T1 a1,T2 a2,T3 a3, Var& var) +{ + return detail::group1< detail::group4 > + ( detail::group4 + (a1,a2,a3, var) + ); +} + +template +inline +detail::group1< detail::group5 > + group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var) +{ + return detail::group1< detail::group5 > + ( detail::group5 + (a1,a2,a3,a4, var) + ); +} + +template +inline +detail::group1< detail::group6 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var) +{ + return detail::group1< detail::group6 > + ( detail::group6 + (a1,a2,a3,a4,a5, var) + ); +} + +template +inline +detail::group1< detail::group7 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var) +{ + return detail::group1< detail::group7 > + ( detail::group7 + (a1,a2,a3,a4,a5,a6, var) + ); +} + +template +inline +detail::group1< detail::group8 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var) +{ + return detail::group1< detail::group8 > + ( detail::group8 + (a1,a2,a3,a4,a5,a6,a7, var) + ); +} + +template +inline +detail::group1< detail::group9 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var) +{ + return detail::group1< detail::group9 > + ( detail::group9 + (a1,a2,a3,a4,a5,a6,a7,a8, var) + ); +} + +template +inline +detail::group1< detail::group10 > + group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var) +{ + return detail::group1< detail::group10 > + ( detail::group10 + (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) + ); +} + + +#endif // - BOOST_NO_OVERLOAD_FOR_NON_CONST + + +} // namespace io + +} // namespace boost + + +#endif // BOOST_FORMAT_GROUP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/internals.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/internals.hpp new file mode 100644 index 0000000000..b0d874a1fb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/internals.hpp @@ -0,0 +1,201 @@ +// ---------------------------------------------------------------------------- +// internals.hpp : internal structs : stream_format_state, format_item. +// included by format.hpp +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_INTERNALS_HPP +#define BOOST_FORMAT_INTERNALS_HPP + + +#include +#include +#include +#include +#include +#include // used as a dummy stream + +namespace boost { +namespace io { +namespace detail { + + +//---- stream_format_state --------------------------------------------------// + +// set of params that define the format state of a stream + template + struct stream_format_state + { + typedef BOOST_IO_STD basic_ios basic_ios; + + stream_format_state(Ch fill) { reset(fill); } +// stream_format_state(const basic_ios& os) { set_by_stream(os); } + + void reset(Ch fill); //- sets to default state. + void set_by_stream(const basic_ios& os); //- sets to os's state. + void apply_on(basic_ios & os, //- applies format_state to the stream + boost::io::detail::locale_t * loc_default = 0) const; + template + void apply_manip(T manipulator) //- modifies state by applying manipulator + { apply_manip_body( *this, manipulator) ; } + + // --- data --- + std::streamsize width_; + std::streamsize precision_; + Ch fill_; + std::ios_base::fmtflags flags_; + std::ios_base::iostate rdstate_; + std::ios_base::iostate exceptions_; + boost::optional loc_; + }; + + +//---- format_item ---------------------------------------------------------// + +// stores all parameters that can be specified in format strings + template + struct format_item + { + enum pad_values { zeropad = 1, spacepad =2, centered=4, tabulation = 8 }; + // 1. if zeropad is set, all other bits are not, + // 2. if tabulation is set, all others are not. + // centered and spacepad can be mixed freely. + enum arg_values { argN_no_posit = -1, // non-positional directive. will set argN later + argN_tabulation = -2, // tabulation directive. (no argument read) + argN_ignored = -3 // ignored directive. (no argument read) + }; + typedef BOOST_IO_STD basic_ios basic_ios; + typedef detail::stream_format_state stream_format_state; + typedef ::std::basic_string string_type; + + format_item(Ch fill) :argN_(argN_no_posit), fmtstate_(fill), + truncate_(max_streamsize()), pad_scheme_(0) {} + void reset(Ch fill); + void compute_states(); // sets states according to truncate and pad_scheme. + + static std::streamsize max_streamsize() { + return (std::numeric_limits::max)(); + } + + // --- data --- + int argN_; //- argument number (starts at 0, eg : %1 => argN=0) + // negative values for items that don't process an argument + string_type res_; //- result of the formatting of this item + string_type appendix_; //- piece of string between this item and the next + + stream_format_state fmtstate_;// set by parsing, is only affected by modify_item + + std::streamsize truncate_;//- is set for directives like %.5s that ask truncation + unsigned int pad_scheme_;//- several possible padding schemes can mix. see pad_values + }; + + + +//--- Definitions ------------------------------------------------------------ + +// - stream_format_state:: ------------------------------------------------- + template + void stream_format_state:: apply_on (basic_ios & os, + boost::io::detail::locale_t * loc_default) const { + // set the state of this stream according to our params + if(width_ != -1) + os.width(width_); + if(precision_ != -1) + os.precision(precision_); + if(fill_ != 0) + os.fill(fill_); + os.flags(flags_); + os.clear(rdstate_); + os.exceptions(exceptions_); +#if !defined(BOOST_NO_STD_LOCALE) + if(loc_) + os.imbue(loc_.get()); + else if(loc_default) + os.imbue(*loc_default); +#else + (void) loc_default; // keep compiler quiet if we don't support locales +#endif + } + + template + void stream_format_state:: set_by_stream(const basic_ios& os) { + // set our params according to the state of this stream + flags_ = os.flags(); + width_ = os.width(); + precision_ = os.precision(); + fill_ = os.fill(); + rdstate_ = os.rdstate(); + exceptions_ = os.exceptions(); + } + + + template + void apply_manip_body( stream_format_state& self, + T manipulator) { + // modify our params according to the manipulator + basic_oaltstringstream ss; + self.apply_on( ss ); + ss << manipulator; + self.set_by_stream( ss ); + } + + template inline + void stream_format_state:: reset(Ch fill) { + // set our params to standard's default state. cf 27.4.4.1 of the C++ norm + width_=0; precision_=6; + fill_=fill; // default is widen(' '), but we cant compute it without the locale + flags_ = std::ios_base::dec | std::ios_base::skipws; + // the adjust_field part is left equal to 0, which means right. + exceptions_ = std::ios_base::goodbit; + rdstate_ = std::ios_base::goodbit; + } + + +// --- format_item:: -------------------------------------------------------- + + template + void format_item:: + reset (Ch fill) { + argN_=argN_no_posit; truncate_ = max_streamsize(); pad_scheme_ =0; + res_.resize(0); appendix_.resize(0); + fmtstate_.reset(fill); + } + + template + void format_item:: + compute_states() { + // reflect pad_scheme_ on fmt_state_ + // because some pad_schemes has complex consequences on several state params. + if(pad_scheme_ & zeropad) { + // ignore zeropad in left alignment : + if(fmtstate_.flags_ & std::ios_base::left) { + BOOST_ASSERT(!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left))); + // only left bit might be set. (not right, nor internal) + pad_scheme_ = pad_scheme_ & (~zeropad); + } + else { + pad_scheme_ &= ~spacepad; // printf ignores spacepad when zeropadding + fmtstate_.fill_='0'; + fmtstate_.flags_ = (fmtstate_.flags_ & ~std::ios_base::adjustfield) + | std::ios_base::internal; + // removes all adjustfield bits, and adds internal. + } + } + if(pad_scheme_ & spacepad) { + if(fmtstate_.flags_ & std::ios_base::showpos) + pad_scheme_ &= ~spacepad; + } + } + + +} } } // namespaces boost :: io :: detail + + +#endif // BOOST_FORMAT_INTERNALS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/internals_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/internals_fwd.hpp new file mode 100644 index 0000000000..e44eb3c132 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/internals_fwd.hpp @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------- +// internals_fwd.hpp : forward declarations, for internal headers +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_INTERNAL_FWD_HPP +#define BOOST_FORMAT_INTERNAL_FWD_HPP + +#include +#include + + +namespace boost { +namespace io { + +namespace detail { + template struct stream_format_state; + template struct format_item; + + + // these functions were intended as methods, + // but MSVC have problems with template member functions : + // defined in format_implementation.hpp : + template + basic_format& + modify_item_body (basic_format& self, + int itemN, T manipulator); + + template + basic_format& + bind_arg_body (basic_format& self, + int argN, const T& val); + + // in internals.hpp : + template + void apply_manip_body (stream_format_state& self, + T manipulator); + + // argument feeding (defined in feed_args.hpp ) : + template + void distribute (basic_format& self, T x); + + template + basic_format& + feed (basic_format& self, T x); + +} // namespace detail + +} // namespace io +} // namespace boost + + +#endif // BOOST_FORMAT_INTERNAL_FWD_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/format/parsing.hpp b/deal.II/contrib/boost-1.45.0/include/boost/format/parsing.hpp new file mode 100644 index 0000000000..b14ca82c98 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/format/parsing.hpp @@ -0,0 +1,504 @@ +// ---------------------------------------------------------------------------- +// parsing.hpp : implementation of the parsing member functions +// ( parse, parse_printf_directive) +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// see http://www.boost.org/libs/format for library home page + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_PARSING_HPP +#define BOOST_FORMAT_PARSING_HPP + + +#include +#include +#include +#include + + +namespace boost { +namespace io { +namespace detail { + +#if defined(BOOST_NO_STD_LOCALE) + // streams will be used for narrow / widen. but these methods are not const + template + T& const_or_not(const T& x) { + return const_cast (x); + } +#else + template + const T& const_or_not(const T& x) { + return x; + } +#endif + + template inline + char wrap_narrow(const Facet& fac, Ch c, char deflt) { + return const_or_not(fac).narrow(c, deflt); + } + + template inline + bool wrap_isdigit(const Facet& fac, Ch c) { +#if ! defined( BOOST_NO_LOCALE_ISDIGIT ) + return fac.is(std::ctype::digit, c); +# else + (void) fac; // remove "unused parameter" warning + using namespace std; + return isdigit(c); +#endif + } + + template + Iter wrap_scan_notdigit(const Facet & fac, Iter beg, Iter end) { + using namespace std; + for( ; beg!=end && wrap_isdigit(fac, *beg); ++beg) ; + return beg; + } + + + // Input : [start, last) iterators range and a + // a Facet to use its widen/narrow member function + // Effects : read sequence and convert digits into integral n, of type Res + // Returns : n + template + Iter str2int (const Iter & start, const Iter & last, Res & res, + const Facet& fac) + { + using namespace std; + Iter it; + res=0; + for(it=start; it != last && wrap_isdigit(fac, *it); ++it ) { + char cur_ch = wrap_narrow(fac, *it, 0); // cant fail. + res *= 10; + res += cur_ch - '0'; // 22.2.1.1.2.13 of the C++ standard + } + return it; + } + + // skip printf's "asterisk-fields" directives in the format-string buf + // Input : char string, with starting index *pos_p + // a Facet merely to use its widen/narrow member function + // Effects : advance *pos_p by skipping printf's asterisk fields. + // Returns : nothing + template + Iter skip_asterisk(Iter start, Iter last, const Facet& fac) + { + using namespace std; + ++ start; + start = wrap_scan_notdigit(fac, start, last); + if(start!=last && *start== const_or_not(fac).widen( '$') ) + ++start; + return start; + } + + + // auxiliary func called by parse_printf_directive + // for centralising error handling + // it either throws if user sets the corresponding flag, or does nothing. + inline void maybe_throw_exception(unsigned char exceptions, + std::size_t pos, std::size_t size) + { + if(exceptions & io::bad_format_string_bit) + boost::throw_exception(io::bad_format_string(pos, size) ); + } + + + // Input: the position of a printf-directive in the format-string + // a basic_ios& merely to use its widen/narrow member function + // a bitset'exceptions' telling whether to throw exceptions on errors. + // Returns: + // true if parse succeeded (ignore some errors if exceptions disabled) + // false if it failed so bad that the directive should be printed verbatim + // Effects: + // start is incremented so that *start is the first char after + // this directive + // *fpar is set with the parameters read in the directive + template + bool parse_printf_directive(Iter & start, const Iter& last, + detail::format_item * fpar, + const Facet& fac, + std::size_t offset, unsigned char exceptions) + { + typedef typename basic_format::format_item_t format_item_t; + + fpar->argN_ = format_item_t::argN_no_posit; // if no positional-directive + bool precision_set = false; + bool in_brackets=false; + Iter start0 = start; + std::size_t fstring_size = last-start0+offset; + + if(start>= last) { // empty directive : this is a trailing % + maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); + return false; + } + + if(*start== const_or_not(fac).widen( '|')) { + in_brackets=true; + if( ++start >= last ) { + maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); + return false; + } + } + + // the flag '0' would be picked as a digit for argument order, but here it's a flag : + if(*start== const_or_not(fac).widen( '0')) + goto parse_flags; + + // handle argument order (%2$d) or possibly width specification: %2d + if(wrap_isdigit(fac, *start)) { + int n; + start = str2int(start, last, n, fac); + if( start >= last ) { + maybe_throw_exception(exceptions, start-start0+offset, fstring_size); + return false; + } + + // %N% case : this is already the end of the directive + if( *start == const_or_not(fac).widen( '%') ) { + fpar->argN_ = n-1; + ++start; + if( in_brackets) + maybe_throw_exception(exceptions, start-start0+offset, fstring_size); + // but don't return. maybe "%" was used in lieu of '$', so we go on. + else + return true; + } + + if ( *start== const_or_not(fac).widen( '$') ) { + fpar->argN_ = n-1; + ++start; + } + else { + // non-positionnal directive + fpar->fmtstate_.width_ = n; + fpar->argN_ = format_item_t::argN_no_posit; + goto parse_precision; + } + } + + parse_flags: + // handle flags + while ( start != last) { // as long as char is one of + - = _ # 0 l h or ' ' + // misc switches + switch ( wrap_narrow(fac, *start, 0)) { + case '\'' : break; // no effect yet. (painful to implement) + case 'l': + case 'h': // short/long modifier : for printf-comaptibility (no action needed) + break; + case '-': + fpar->fmtstate_.flags_ |= std::ios_base::left; + break; + case '=': + fpar->pad_scheme_ |= format_item_t::centered; + break; + case '_': + fpar->fmtstate_.flags_ |= std::ios_base::internal; + break; + case ' ': + fpar->pad_scheme_ |= format_item_t::spacepad; + break; + case '+': + fpar->fmtstate_.flags_ |= std::ios_base::showpos; + break; + case '0': + fpar->pad_scheme_ |= format_item_t::zeropad; + // need to know alignment before really setting flags, + // so just add 'zeropad' flag for now, it will be processed later. + break; + case '#': + fpar->fmtstate_.flags_ |= std::ios_base::showpoint | std::ios_base::showbase; + break; + default: + goto parse_width; + } + ++start; + } // loop on flag. + + if( start>=last) { + maybe_throw_exception(exceptions, start-start0+offset, fstring_size); + return true; + } + parse_width: + // handle width spec + // first skip 'asterisk fields' : *, or *N$ + if(*start == const_or_not(fac).widen( '*') ) + start = skip_asterisk(start, last, fac); + if(start!=last && wrap_isdigit(fac, *start)) + start = str2int(start, last, fpar->fmtstate_.width_, fac); + + parse_precision: + if( start>= last) { + maybe_throw_exception(exceptions, start-start0+offset, fstring_size); + return true; + } + // handle precision spec + if (*start== const_or_not(fac).widen( '.')) { + ++start; + if(start != last && *start == const_or_not(fac).widen( '*') ) + start = skip_asterisk(start, last, fac); + if(start != last && wrap_isdigit(fac, *start)) { + start = str2int(start, last, fpar->fmtstate_.precision_, fac); + precision_set = true; + } + else + fpar->fmtstate_.precision_ =0; + } + + // handle formatting-type flags : + while( start != last && ( *start== const_or_not(fac).widen( 'l') + || *start== const_or_not(fac).widen( 'L') + || *start== const_or_not(fac).widen( 'h')) ) + ++start; + if( start>=last) { + maybe_throw_exception(exceptions, start-start0+offset, fstring_size); + return true; + } + + if( in_brackets && *start== const_or_not(fac).widen( '|') ) { + ++start; + return true; + } + switch ( wrap_narrow(fac, *start, 0) ) { + case 'X': + fpar->fmtstate_.flags_ |= std::ios_base::uppercase; + case 'p': // pointer => set hex. + case 'x': + fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; + fpar->fmtstate_.flags_ |= std::ios_base::hex; + break; + + case 'o': + fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; + fpar->fmtstate_.flags_ |= std::ios_base::oct; + break; + + case 'E': + fpar->fmtstate_.flags_ |= std::ios_base::uppercase; + case 'e': + fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; + fpar->fmtstate_.flags_ |= std::ios_base::scientific; + + fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; + fpar->fmtstate_.flags_ |= std::ios_base::dec; + break; + + case 'f': + fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; + fpar->fmtstate_.flags_ |= std::ios_base::fixed; + case 'u': + case 'd': + case 'i': + fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; + fpar->fmtstate_.flags_ |= std::ios_base::dec; + break; + + case 'T': + ++start; + if( start >= last) + maybe_throw_exception(exceptions, start-start0+offset, fstring_size); + else + fpar->fmtstate_.fill_ = *start; + fpar->pad_scheme_ |= format_item_t::tabulation; + fpar->argN_ = format_item_t::argN_tabulation; + break; + case 't': + fpar->fmtstate_.fill_ = const_or_not(fac).widen( ' '); + fpar->pad_scheme_ |= format_item_t::tabulation; + fpar->argN_ = format_item_t::argN_tabulation; + break; + + case 'G': + fpar->fmtstate_.flags_ |= std::ios_base::uppercase; + break; + case 'g': // 'g' conversion is default for floats. + fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; + fpar->fmtstate_.flags_ |= std::ios_base::dec; + + // CLEAR all floatield flags, so stream will CHOOSE + fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; + break; + + case 'C': + case 'c': + fpar->truncate_ = 1; + break; + case 'S': + case 's': + if(precision_set) // handle truncation manually, with own parameter. + fpar->truncate_ = fpar->fmtstate_.precision_; + fpar->fmtstate_.precision_ = 6; // default stream precision. + break; + case 'n' : + fpar->argN_ = format_item_t::argN_ignored; + break; + default: + maybe_throw_exception(exceptions, start-start0+offset, fstring_size); + } + ++start; + + if( in_brackets ) { + if( start != last && *start== const_or_not(fac).widen( '|') ) { + ++start; + return true; + } + else maybe_throw_exception(exceptions, start-start0+offset, fstring_size); + } + return true; + } + // -end parse_printf_directive() + + template + int upper_bound_from_fstring(const String& buf, + const typename String::value_type arg_mark, + const Facet& fac, + unsigned char exceptions) + { + // quick-parsing of the format-string to count arguments mark (arg_mark, '%') + // returns : upper bound on the number of format items in the format strings + using namespace boost::io; + typename String::size_type i1=0; + int num_items=0; + while( (i1=buf.find(arg_mark,i1)) != String::npos ) { + if( i1+1 >= buf.size() ) { + if(exceptions & bad_format_string_bit) + boost::throw_exception(bad_format_string(i1, buf.size() )); // must not end in ".. %" + else { + ++num_items; + break; + } + } + if(buf[i1+1] == buf[i1] ) {// escaped "%%" + i1+=2; continue; + } + + ++i1; + // in case of %N% directives, dont count it double (wastes allocations..) : + i1 = detail::wrap_scan_notdigit(fac, buf.begin()+i1, buf.end()) - buf.begin(); + if( i1 < buf.size() && buf[i1] == arg_mark ) + ++i1; + ++num_items; + } + return num_items; + } + template inline + void append_string(String& dst, const String& src, + const typename String::size_type beg, + const typename String::size_type end) { +#if !defined(BOOST_NO_STRING_APPEND) + dst.append(src.begin()+beg, src.begin()+end); +#else + dst += src.substr(beg, end-beg); +#endif + } + +} // detail namespace +} // io namespace + + + +// ----------------------------------------------- +// format :: parse(..) + + template + basic_format& basic_format:: + parse (const string_type& buf) { + // parse the format-string + using namespace std; +#if !defined(BOOST_NO_STD_LOCALE) + const std::ctype & fac = BOOST_USE_FACET( std::ctype, getloc()); +#else + io::basic_oaltstringstream fac; + //has widen and narrow even on compilers without locale +#endif + + const Ch arg_mark = io::detail::const_or_not(fac).widen( '%'); + bool ordered_args=true; + int max_argN=-1; + + // A: find upper_bound on num_items and allocates arrays + int num_items = io::detail::upper_bound_from_fstring(buf, arg_mark, fac, exceptions()); + make_or_reuse_data(num_items); + + // B: Now the real parsing of the format string : + num_items=0; + typename string_type::size_type i0=0, i1=0; + typename string_type::const_iterator it; + bool special_things=false; + int cur_item=0; + while( (i1=buf.find(arg_mark,i1)) != string_type::npos ) { + string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; + if( buf[i1+1] == buf[i1] ) { // escaped mark, '%%' + io::detail::append_string(piece, buf, i0, i1+1); + i1+=2; i0=i1; + continue; + } + BOOST_ASSERT( static_cast(cur_item) < items_.size() || cur_item==0); + + if(i1!=i0) { + io::detail::append_string(piece, buf, i0, i1); + i0=i1; + } + ++i1; + it = buf.begin()+i1; + bool parse_ok = io::detail::parse_printf_directive( + it, buf.end(), &items_[cur_item], fac, i1, exceptions()); + i1 = it - buf.begin(); + if( ! parse_ok ) // the directive will be printed verbatim + continue; + i0=i1; + items_[cur_item].compute_states(); // process complex options, like zeropad, into params + + int argN=items_[cur_item].argN_; + if(argN == format_item_t::argN_ignored) + continue; + if(argN ==format_item_t::argN_no_posit) + ordered_args=false; + else if(argN == format_item_t::argN_tabulation) special_things=true; + else if(argN > max_argN) max_argN = argN; + ++num_items; + ++cur_item; + } // loop on %'s + BOOST_ASSERT(cur_item == num_items); + + // store the final piece of string + { + string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; + io::detail::append_string(piece, buf, i0, buf.size()); + } + + if( !ordered_args) { + if(max_argN >= 0 ) { // dont mix positional with non-positionnal directives + if(exceptions() & io::bad_format_string_bit) + boost::throw_exception(io::bad_format_string(max_argN, 0)); + // else do nothing. => positionnal arguments are processed as non-positionnal + } + // set things like it would have been with positional directives : + int non_ordered_items = 0; + for(int i=0; i< num_items; ++i) + if(items_[i].argN_ == format_item_t::argN_no_posit) { + items_[i].argN_ = non_ordered_items; + ++non_ordered_items; + } + max_argN = non_ordered_items-1; + } + + // C: set some member data : + items_.resize(num_items, format_item_t(io::detail::const_or_not(fac).widen( ' ')) ); + + if(special_things) style_ |= special_needs; + num_args_ = max_argN + 1; + if(ordered_args) style_ |= ordered; + else style_ &= ~ordered; + return *this; + } + +} // namespace boost + + +#endif // BOOST_FORMAT_PARSING_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function.hpp new file mode 100644 index 0000000000..bdb27691df --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function.hpp @@ -0,0 +1,66 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org/libs/function + +// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the +// design of this library. + +#include // unary_function, binary_function + +#include +#include + +#ifndef BOOST_FUNCTION_MAX_ARGS +# define BOOST_FUNCTION_MAX_ARGS 10 +#endif // BOOST_FUNCTION_MAX_ARGS + +// Include the prologue here so that the use of file-level iteration +// in anything that may be included by function_template.hpp doesn't break +#include + +// Visual Age C++ doesn't handle the file iteration well +#if BOOST_WORKAROUND(__IBMCPP__, >= 500) +# if BOOST_FUNCTION_MAX_ARGS >= 0 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 1 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 2 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 3 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 4 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 5 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 6 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 7 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 8 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 9 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 10 +# include +# endif +#else +// What is the '3' for? +# define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,)) +# include BOOST_PP_ITERATE() +# undef BOOST_PP_ITERATION_PARAMS_1 +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/detail/function_iterate.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/detail/function_iterate.hpp new file mode 100644 index 0000000000..5370b36aac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/detail/function_iterate.hpp @@ -0,0 +1,16 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org +#if !defined(BOOST_PP_IS_ITERATING) +# error Boost.Function - do not include this file! +#endif + +#define BOOST_FUNCTION_NUM_ARGS BOOST_PP_ITERATION() +#include +#undef BOOST_FUNCTION_NUM_ARGS + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/detail/gen_maybe_include.pl b/deal.II/contrib/boost-1.45.0/include/boost/function/detail/gen_maybe_include.pl new file mode 100644 index 0000000000..d0629205e1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/detail/gen_maybe_include.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w +# +# Boost.Function library +# +# Copyright (C) 2001-2003 Douglas Gregor (gregod@cs.rpi.edu) +# +# Permission to copy, use, sell and distribute this software is granted +# provided this copyright notice appears in all copies. +# Permission to modify the code and to distribute modified code is granted +# provided this copyright notice appears in all copies, and a notice +# that the code was modified is included with the copyright notice. +# +# This software is provided "as is" without express or implied warranty, +# and with no claim as to its suitability for any purpose. +# +# For more information, see http://www.boost.org +use English; + +$max_args = $ARGV[0]; + +open (OUT, ">maybe_include.hpp") or die("Cannot write to maybe_include.hpp"); +for($on_arg = 0; $on_arg <= $max_args; ++$on_arg) { + if ($on_arg == 0) { + print OUT "#if"; + } + else { + print OUT "#elif"; + } + print OUT " BOOST_FUNCTION_NUM_ARGS == $on_arg\n"; + print OUT "# ifndef BOOST_FUNCTION_$on_arg\n"; + print OUT "# define BOOST_FUNCTION_$on_arg\n"; + print OUT "# include \n"; + print OUT "# endif\n"; +} +print OUT "#else\n"; +print OUT "# error Cannot handle Boost.Function objects that accept more than $max_args arguments!\n"; +print OUT "#endif\n"; diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/detail/maybe_include.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/detail/maybe_include.hpp new file mode 100644 index 0000000000..92f71bb227 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/detail/maybe_include.hpp @@ -0,0 +1,267 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#if BOOST_FUNCTION_NUM_ARGS == 0 +# ifndef BOOST_FUNCTION_0 +# define BOOST_FUNCTION_0 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 1 +# ifndef BOOST_FUNCTION_1 +# define BOOST_FUNCTION_1 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 2 +# ifndef BOOST_FUNCTION_2 +# define BOOST_FUNCTION_2 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 3 +# ifndef BOOST_FUNCTION_3 +# define BOOST_FUNCTION_3 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 4 +# ifndef BOOST_FUNCTION_4 +# define BOOST_FUNCTION_4 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 5 +# ifndef BOOST_FUNCTION_5 +# define BOOST_FUNCTION_5 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 6 +# ifndef BOOST_FUNCTION_6 +# define BOOST_FUNCTION_6 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 7 +# ifndef BOOST_FUNCTION_7 +# define BOOST_FUNCTION_7 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 8 +# ifndef BOOST_FUNCTION_8 +# define BOOST_FUNCTION_8 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 9 +# ifndef BOOST_FUNCTION_9 +# define BOOST_FUNCTION_9 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 10 +# ifndef BOOST_FUNCTION_10 +# define BOOST_FUNCTION_10 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 11 +# ifndef BOOST_FUNCTION_11 +# define BOOST_FUNCTION_11 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 12 +# ifndef BOOST_FUNCTION_12 +# define BOOST_FUNCTION_12 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 13 +# ifndef BOOST_FUNCTION_13 +# define BOOST_FUNCTION_13 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 14 +# ifndef BOOST_FUNCTION_14 +# define BOOST_FUNCTION_14 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 15 +# ifndef BOOST_FUNCTION_15 +# define BOOST_FUNCTION_15 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 16 +# ifndef BOOST_FUNCTION_16 +# define BOOST_FUNCTION_16 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 17 +# ifndef BOOST_FUNCTION_17 +# define BOOST_FUNCTION_17 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 18 +# ifndef BOOST_FUNCTION_18 +# define BOOST_FUNCTION_18 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 19 +# ifndef BOOST_FUNCTION_19 +# define BOOST_FUNCTION_19 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 20 +# ifndef BOOST_FUNCTION_20 +# define BOOST_FUNCTION_20 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 21 +# ifndef BOOST_FUNCTION_21 +# define BOOST_FUNCTION_21 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 22 +# ifndef BOOST_FUNCTION_22 +# define BOOST_FUNCTION_22 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 23 +# ifndef BOOST_FUNCTION_23 +# define BOOST_FUNCTION_23 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 24 +# ifndef BOOST_FUNCTION_24 +# define BOOST_FUNCTION_24 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 25 +# ifndef BOOST_FUNCTION_25 +# define BOOST_FUNCTION_25 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 26 +# ifndef BOOST_FUNCTION_26 +# define BOOST_FUNCTION_26 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 27 +# ifndef BOOST_FUNCTION_27 +# define BOOST_FUNCTION_27 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 28 +# ifndef BOOST_FUNCTION_28 +# define BOOST_FUNCTION_28 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 29 +# ifndef BOOST_FUNCTION_29 +# define BOOST_FUNCTION_29 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 30 +# ifndef BOOST_FUNCTION_30 +# define BOOST_FUNCTION_30 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 31 +# ifndef BOOST_FUNCTION_31 +# define BOOST_FUNCTION_31 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 32 +# ifndef BOOST_FUNCTION_32 +# define BOOST_FUNCTION_32 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 33 +# ifndef BOOST_FUNCTION_33 +# define BOOST_FUNCTION_33 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 34 +# ifndef BOOST_FUNCTION_34 +# define BOOST_FUNCTION_34 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 35 +# ifndef BOOST_FUNCTION_35 +# define BOOST_FUNCTION_35 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 36 +# ifndef BOOST_FUNCTION_36 +# define BOOST_FUNCTION_36 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 37 +# ifndef BOOST_FUNCTION_37 +# define BOOST_FUNCTION_37 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 38 +# ifndef BOOST_FUNCTION_38 +# define BOOST_FUNCTION_38 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 39 +# ifndef BOOST_FUNCTION_39 +# define BOOST_FUNCTION_39 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 40 +# ifndef BOOST_FUNCTION_40 +# define BOOST_FUNCTION_40 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 41 +# ifndef BOOST_FUNCTION_41 +# define BOOST_FUNCTION_41 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 42 +# ifndef BOOST_FUNCTION_42 +# define BOOST_FUNCTION_42 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 43 +# ifndef BOOST_FUNCTION_43 +# define BOOST_FUNCTION_43 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 44 +# ifndef BOOST_FUNCTION_44 +# define BOOST_FUNCTION_44 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 45 +# ifndef BOOST_FUNCTION_45 +# define BOOST_FUNCTION_45 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 46 +# ifndef BOOST_FUNCTION_46 +# define BOOST_FUNCTION_46 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 47 +# ifndef BOOST_FUNCTION_47 +# define BOOST_FUNCTION_47 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 48 +# ifndef BOOST_FUNCTION_48 +# define BOOST_FUNCTION_48 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 49 +# ifndef BOOST_FUNCTION_49 +# define BOOST_FUNCTION_49 +# include +# endif +#elif BOOST_FUNCTION_NUM_ARGS == 50 +# ifndef BOOST_FUNCTION_50 +# define BOOST_FUNCTION_50 +# include +# endif +#else +# error Cannot handle Boost.Function objects that accept more than 50 arguments! +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/detail/prologue.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/detail/prologue.hpp new file mode 100644 index 0000000000..53d0f05cd3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/detail/prologue.hpp @@ -0,0 +1,26 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#ifndef BOOST_FUNCTION_PROLOGUE_HPP +#define BOOST_FUNCTION_PROLOGUE_HPP +# include +# include +# include // unary_function, binary_function +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif // BOOST_FUNCTION_PROLOGUE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function0.hpp new file mode 100644 index 0000000000..65a02e5fac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function0.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 0 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function1.hpp new file mode 100644 index 0000000000..9089715155 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function1.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 1 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function10.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function10.hpp new file mode 100644 index 0000000000..6562724849 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function10.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 10 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function2.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function2.hpp new file mode 100644 index 0000000000..dc8bf97521 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function2.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 2 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function3.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function3.hpp new file mode 100644 index 0000000000..19d1a49dd5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function3.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 3 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function4.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function4.hpp new file mode 100644 index 0000000000..f3349e2dc9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function4.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 4 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function5.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function5.hpp new file mode 100644 index 0000000000..a1305eb5ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function5.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 5 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function6.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function6.hpp new file mode 100644 index 0000000000..1f60914919 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function6.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 6 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function7.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function7.hpp new file mode 100644 index 0000000000..68542ed46a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function7.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 7 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function8.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function8.hpp new file mode 100644 index 0000000000..cf2c37661f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function8.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 8 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function9.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function9.hpp new file mode 100644 index 0000000000..590e0883d7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function9.hpp @@ -0,0 +1,12 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2002-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#define BOOST_FUNCTION_NUM_ARGS 9 +#include +#undef BOOST_FUNCTION_NUM_ARGS diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function_base.hpp new file mode 100644 index 0000000000..fe9bbbe359 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function_base.hpp @@ -0,0 +1,904 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2006 +// Copyright Emil Dotchevski 2007 +// Use, modification and distribution is subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +#ifndef BOOST_FUNCTION_BASE_HEADER +#define BOOST_FUNCTION_BASE_HEADER + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef BOOST_NO_SFINAE +# include "boost/utility/enable_if.hpp" +#else +# include "boost/mpl/bool.hpp" +#endif +#include +#include + +#if defined(BOOST_MSVC) +# pragma warning( push ) +# pragma warning( disable : 4793 ) // complaint about native code generation +# pragma warning( disable : 4127 ) // "conditional expression is constant" +#endif + +// Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info. +#ifdef BOOST_NO_STD_TYPEINFO +// Embedded VC++ does not have type_info in namespace std +# define BOOST_FUNCTION_STD_NS +#else +# define BOOST_FUNCTION_STD_NS std +#endif + +// Borrowed from Boost.Python library: determines the cases where we +// need to use std::type_info::name to compare instead of operator==. +#if defined( BOOST_NO_TYPEID ) +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) +#elif (defined(__GNUC__) && __GNUC__ >= 3) \ + || defined(_AIX) \ + || ( defined(__sgi) && defined(__host_mips)) +# include +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \ + (std::strcmp((X).name(),(Y).name()) == 0) +# else +# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) +#endif + +#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) +# define BOOST_FUNCTION_TARGET_FIX(x) x +#else +# define BOOST_FUNCTION_TARGET_FIX(x) +#endif // not MSVC + +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) +# define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< \ + (::boost::is_integral::value)>::value), \ + Type>::type +#else +// BCC doesn't recognize this depends on a template argument and complains +// about the use of 'typename' +# define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ + ::boost::enable_if_c<(::boost::type_traits::ice_not< \ + (::boost::is_integral::value)>::value), \ + Type>::type +#endif + +namespace boost { + namespace detail { + namespace function { + class X; + + /** + * A buffer used to store small function objects in + * boost::function. It is a union containing function pointers, + * object pointers, and a structure that resembles a bound + * member function pointer. + */ + union function_buffer + { + // For pointers to function objects + mutable void* obj_ptr; + + // For pointers to std::type_info objects + struct type_t { + // (get_functor_type_tag, check_functor_type_tag). + const detail::sp_typeinfo* type; + + // Whether the type is const-qualified. + bool const_qualified; + // Whether the type is volatile-qualified. + bool volatile_qualified; + } type; + + // For function pointers of all kinds + mutable void (*func_ptr)(); + + // For bound member pointers + struct bound_memfunc_ptr_t { + void (X::*memfunc_ptr)(int); + void* obj_ptr; + } bound_memfunc_ptr; + + // For references to function objects. We explicitly keep + // track of the cv-qualifiers on the object referenced. + struct obj_ref_t { + mutable void* obj_ptr; + bool is_const_qualified; + bool is_volatile_qualified; + } obj_ref; + + // To relax aliasing constraints + mutable char data; + }; + + /** + * The unusable class is a placeholder for unused function arguments + * It is also completely unusable except that it constructable from + * anything. This helps compilers without partial specialization to + * handle Boost.Function objects returning void. + */ + struct unusable + { + unusable() {} + template unusable(const T&) {} + }; + + /* Determine the return type. This supports compilers that do not support + * void returns or partial specialization by silently changing the return + * type to "unusable". + */ + template struct function_return_type { typedef T type; }; + + template<> + struct function_return_type + { + typedef unusable type; + }; + + // The operation type to perform on the given functor/function pointer + enum functor_manager_operation_type { + clone_functor_tag, + move_functor_tag, + destroy_functor_tag, + check_functor_type_tag, + get_functor_type_tag + }; + + // Tags used to decide between different types of functions + struct function_ptr_tag {}; + struct function_obj_tag {}; + struct member_ptr_tag {}; + struct function_obj_ref_tag {}; + + template + class get_function_tag + { + typedef typename mpl::if_c<(is_pointer::value), + function_ptr_tag, + function_obj_tag>::type ptr_or_obj_tag; + + typedef typename mpl::if_c<(is_member_pointer::value), + member_ptr_tag, + ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag; + + typedef typename mpl::if_c<(is_reference_wrapper::value), + function_obj_ref_tag, + ptr_or_obj_or_mem_tag>::type or_ref_tag; + + public: + typedef or_ref_tag type; + }; + + // The trivial manager does nothing but return the same pointer (if we + // are cloning) or return the null pointer (if we are deleting). + template + struct reference_manager + { + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + switch (op) { + case clone_functor_tag: + out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr; + return; + + case move_functor_tag: + out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr; + in_buffer.obj_ref.obj_ptr = 0; + return; + + case destroy_functor_tag: + out_buffer.obj_ref.obj_ptr = 0; + return; + + case check_functor_type_tag: + { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + + // Check whether we have the same type. We can add + // cv-qualifiers, but we can't take them away. + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F)) + && (!in_buffer.obj_ref.is_const_qualified + || out_buffer.type.const_qualified) + && (!in_buffer.obj_ref.is_volatile_qualified + || out_buffer.type.volatile_qualified)) + out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr; + else + out_buffer.obj_ptr = 0; + } + return; + + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(F); + out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified; + out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified; + return; + } + } + }; + + /** + * Determine if boost::function can use the small-object + * optimization with the function object type F. + */ + template + struct function_allows_small_object_optimization + { + BOOST_STATIC_CONSTANT + (bool, + value = ((sizeof(F) <= sizeof(function_buffer) && + (alignment_of::value + % alignment_of::value == 0)))); + }; + + template + struct functor_wrapper: public F, public A + { + functor_wrapper( F f, A a ): + F(f), + A(a) + { + } + + functor_wrapper(const functor_wrapper& f) : + F(static_cast(f)), + A(static_cast(f)) + { + } + }; + + /** + * The functor_manager class contains a static function "manage" which + * can clone or destroy the given function/function object pointer. + */ + template + struct functor_manager_common + { + typedef Functor functor_type; + + // Function pointers + static inline void + manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag) + out_buffer.func_ptr = in_buffer.func_ptr; + else if (op == move_functor_tag) { + out_buffer.func_ptr = in_buffer.func_ptr; + in_buffer.func_ptr = 0; + } else if (op == destroy_functor_tag) + out_buffer.func_ptr = 0; + else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = &in_buffer.func_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // Function objects that fit in the small-object buffer. + static inline void + manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag || op == move_functor_tag) { + const functor_type* in_functor = + reinterpret_cast(&in_buffer.data); + new ((void*)&out_buffer.data) functor_type(*in_functor); + + if (op == move_functor_tag) { + reinterpret_cast(&in_buffer.data)->~Functor(); + } + } else if (op == destroy_functor_tag) { + // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. + reinterpret_cast(&out_buffer.data)->~Functor(); + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = &in_buffer.data; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + }; + + template + struct functor_manager + { + private: + typedef Functor functor_type; + + // Function pointers + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + + // Function objects that fit in the small-object buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + + // Function objects that require heap allocation + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + if (op == clone_functor_tag) { + // Clone the functor + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + const functor_type* f = + (const functor_type*)(in_buffer.obj_ptr); + functor_type* new_f = new functor_type(*f); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + /* Cast from the void pointer to the functor pointer type */ + functor_type* f = + static_cast(out_buffer.obj_ptr); + delete f; + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // For function objects, we determine whether the function + // object can use the small-object optimization buffer or + // whether we need to allocate it on the heap. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + + // For member pointers, we use the small-object optimization buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, member_ptr_tag) + { + manager(in_buffer, out_buffer, op, mpl::true_()); + } + + public: + /* Dispatch to an appropriate manager based on whether we have a + function pointer or a function object pointer. */ + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + + template + struct functor_manager_a + { + private: + typedef Functor functor_type; + + // Function pointers + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + + // Function objects that fit in the small-object buffer. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + + // Function objects that require heap allocation + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + + if (op == clone_functor_tag) { + // Clone the functor + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + const functor_wrapper_type* f = + (const functor_wrapper_type*)(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*f)); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, *f); + + // Get back to the original pointer type + functor_wrapper_type* new_f = static_cast(copy); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + /* Cast from the void pointer to the functor_wrapper_type */ + functor_wrapper_type* victim = + static_cast(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*victim)); + wrapper_allocator.destroy(victim); + wrapper_allocator.deallocate(victim,1); + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else /* op == get_functor_type_tag */ { + out_buffer.type.type = &BOOST_SP_TYPEID(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + // For function objects, we determine whether the function + // object can use the small-object optimization buffer or + // whether we need to allocate it on the heap. + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + + public: + /* Dispatch to an appropriate manager based on whether we have a + function pointer or a function object pointer. */ + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + + // A type that is only used for comparisons against zero + struct useless_clear_type {}; + +#ifdef BOOST_NO_SFINAE + // These routines perform comparisons between a Boost.Function + // object and an arbitrary function object (when the last + // parameter is mpl::bool_) or against zero (when the + // last parameter is mpl::bool_). They are only necessary + // for compilers that don't support SFINAE. + template + bool + compare_equal(const Function& f, const Functor&, int, mpl::bool_) + { return f.empty(); } + + template + bool + compare_not_equal(const Function& f, const Functor&, int, + mpl::bool_) + { return !f.empty(); } + + template + bool + compare_equal(const Function& f, const Functor& g, long, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return function_equal(*fp, g); + else return false; + } + + template + bool + compare_equal(const Function& f, const reference_wrapper& g, + int, mpl::bool_) + { + if (const Functor* fp = f.template target()) + return fp == g.get_pointer(); + else return false; + } + + template + bool + compare_not_equal(const Function& f, const Functor& g, long, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return !function_equal(*fp, g); + else return true; + } + + template + bool + compare_not_equal(const Function& f, + const reference_wrapper& g, int, + mpl::bool_) + { + if (const Functor* fp = f.template target()) + return fp != g.get_pointer(); + else return true; + } +#endif // BOOST_NO_SFINAE + + /** + * Stores the "manager" portion of the vtable for a + * boost::function object. + */ + struct vtable_base + { + void (*manager)(const function_buffer& in_buffer, + function_buffer& out_buffer, + functor_manager_operation_type op); + }; + } // end namespace function + } // end namespace detail + +/** + * The function_base class contains the basic elements needed for the + * function1, function2, function3, etc. classes. It is common to all + * functions (and as such can be used to tell if we have one of the + * functionN objects). + */ +class function_base +{ +public: + function_base() : vtable(0) { } + + /** Determine if the function is empty (i.e., has no target). */ + bool empty() const { return !vtable; } + + /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void) + if this is empty. */ + const detail::sp_typeinfo& target_type() const + { + if (!vtable) return BOOST_SP_TYPEID(void); + + detail::function::function_buffer type; + get_vtable()->manager(functor, type, detail::function::get_functor_type_tag); + return *type.type.type; + } + + template + Functor* target() + { + if (!vtable) return 0; + + detail::function::function_buffer type_result; + type_result.type.type = &BOOST_SP_TYPEID(Functor); + type_result.type.const_qualified = is_const::value; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + return static_cast(type_result.obj_ptr); + } + + template +#if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + const Functor* target( Functor * = 0 ) const +#else + const Functor* target() const +#endif + { + if (!vtable) return 0; + + detail::function::function_buffer type_result; + type_result.type.type = &BOOST_SP_TYPEID(Functor); + type_result.type.const_qualified = true; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + // GCC 2.95.3 gets the CV qualifiers wrong here, so we + // can't do the static_cast that we should do. + return (const Functor*)(type_result.obj_ptr); + } + + template + bool contains(const F& f) const + { +#if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + if (const F* fp = this->target( (F*)0 )) +#else + if (const F* fp = this->template target()) +#endif + { + return function_equal(*fp, f); + } else { + return false; + } + } + +#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3 + // GCC 3.3 and newer cannot copy with the global operator==, due to + // problems with instantiation of function return types before it + // has been verified that the argument types match up. + template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(Functor g) const + { + if (const Functor* fp = target()) + return function_equal(*fp, g); + else return false; + } + + template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(Functor g) const + { + if (const Functor* fp = target()) + return !function_equal(*fp, g); + else return true; + } +#endif + +public: // should be protected, but GCC 2.95.3 will fail to allow access + detail::function::vtable_base* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~(std::size_t)0x01); + } + + bool has_trivial_copy_and_destroy() const { + return reinterpret_cast(vtable) & 0x01; + } + + detail::function::vtable_base* vtable; + mutable detail::function::function_buffer functor; +}; + +/** + * The bad_function_call exception class is thrown when a boost::function + * object is invoked + */ +class bad_function_call : public std::runtime_error +{ +public: + bad_function_call() : std::runtime_error("call to empty boost::function") {} +}; + +#ifndef BOOST_NO_SFINAE +inline bool operator==(const function_base& f, + detail::function::useless_clear_type*) +{ + return f.empty(); +} + +inline bool operator!=(const function_base& f, + detail::function::useless_clear_type*) +{ + return !f.empty(); +} + +inline bool operator==(detail::function::useless_clear_type*, + const function_base& f) +{ + return f.empty(); +} + +inline bool operator!=(detail::function::useless_clear_type*, + const function_base& f) +{ + return !f.empty(); +} +#endif + +#ifdef BOOST_NO_SFINAE +// Comparisons between boost::function objects and arbitrary function objects +template + inline bool operator==(const function_base& f, Functor g) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_equal(f, g, 0, integral()); + } + +template + inline bool operator==(Functor g, const function_base& f) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_equal(f, g, 0, integral()); + } + +template + inline bool operator!=(const function_base& f, Functor g) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_not_equal(f, g, 0, integral()); + } + +template + inline bool operator!=(Functor g, const function_base& f) + { + typedef mpl::bool_<(is_integral::value)> integral; + return detail::function::compare_not_equal(f, g, 0, integral()); + } +#else + +# if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) +// Comparisons between boost::function objects and arbitrary function +// objects. GCC 3.3 and before has an obnoxious bug that prevents this +// from working. +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return function_equal(*fp, g); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return function_equal(g, *fp); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return !function_equal(*fp, g); + else return true; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return !function_equal(g, *fp); + else return true; + } +# endif + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp == g.get_pointer(); + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator==(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() == fp; + else return false; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp != g.get_pointer(); + else return true; + } + +template + BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) + operator!=(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() != fp; + else return true; + } + +#endif // Compiler supporting SFINAE + +namespace detail { + namespace function { + inline bool has_empty_target(const function_base* f) + { + return f->empty(); + } + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) + inline bool has_empty_target(const void*) + { + return false; + } +#else + inline bool has_empty_target(...) + { + return false; + } +#endif + } // end namespace function +} // end namespace detail +} // end namespace boost + +#undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL +#undef BOOST_FUNCTION_COMPARE_TYPE_ID + +#if defined(BOOST_MSVC) +# pragma warning( pop ) +#endif + +#endif // BOOST_FUNCTION_BASE_HEADER diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function_fwd.hpp new file mode 100644 index 0000000000..fb318c990a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function_fwd.hpp @@ -0,0 +1,70 @@ +// Boost.Function library +// Copyright (C) Douglas Gregor 2008 +// +// Use, modification and distribution is subject to the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org +#ifndef BOOST_FUNCTION_FWD_HPP +#define BOOST_FUNCTION_FWD_HPP +#include + +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG) +// Work around a compiler bug. +// boost::python::objects::function has to be seen by the compiler before the +// boost::function class template. +namespace boost { namespace python { namespace objects { + class function; +}}} +#endif + +#if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ + || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) +# define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX +#endif + +namespace boost { + class bad_function_call; + +#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) + // Preferred syntax + template class function; + + template + inline void swap(function& f1, function& f2) + { + f1.swap(f2); + } +#endif // have partial specialization + + // Portable syntax + template class function0; + template class function1; + template class function2; + template class function3; + template + class function4; + template + class function5; + template + class function6; + template + class function7; + template + class function8; + template + class function9; + template + class function10; +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function_template.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function_template.hpp new file mode 100644 index 0000000000..6a99109ab1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function_template.hpp @@ -0,0 +1,1158 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2006 +// Copyright Emil Dotchevski 2007 +// Use, modification and distribution is subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +// Note: this header is a header template and must NOT have multiple-inclusion +// protection. +#include +#include + +#if defined(BOOST_MSVC) +# pragma warning( push ) +# pragma warning( disable : 4127 ) // "conditional expression is constant" +#endif + +#define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T) + +#define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T) + +#define BOOST_FUNCTION_PARM(J,I,D) BOOST_PP_CAT(T,I) BOOST_PP_CAT(a,I) + +#define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY) + +#define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a) + +#define BOOST_FUNCTION_ARG_TYPE(J,I,D) \ + typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(I)),_type); + +#define BOOST_FUNCTION_ARG_TYPES BOOST_PP_REPEAT(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG_TYPE,BOOST_PP_EMPTY) + +// Comma if nonzero number of arguments +#if BOOST_FUNCTION_NUM_ARGS == 0 +# define BOOST_FUNCTION_COMMA +#else +# define BOOST_FUNCTION_COMMA , +#endif // BOOST_FUNCTION_NUM_ARGS > 0 + +// Class names used in this version of the code +#define BOOST_FUNCTION_FUNCTION BOOST_JOIN(function,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_INVOKER \ + BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \ + BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(void_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_FUNCTION_REF_INVOKER \ + BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \ + BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_MEMBER_INVOKER \ + BOOST_JOIN(function_mem_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \ + BOOST_JOIN(function_void_mem_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_INVOKER \ + BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \ + BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \ + BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_MEMBER_INVOKER \ + BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_GET_INVOKER \ + BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS) +#define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS) + +#ifndef BOOST_NO_VOID_RETURNS +# define BOOST_FUNCTION_VOID_RETURN_TYPE void +# define BOOST_FUNCTION_RETURN(X) X +#else +# define BOOST_FUNCTION_VOID_RETURN_TYPE boost::detail::function::unusable +# define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE () +#endif + +namespace boost { + namespace detail { + namespace function { + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_INVOKER + { + static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + return f(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS)); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_OBJ_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_FUNCTION_REF_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); + } + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Handle invocation of member pointers. */ + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_MEMBER_INVOKER + { + static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS); + } + }; + + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_VOID_MEMBER_INVOKER + { + static BOOST_FUNCTION_VOID_RETURN_TYPE + invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA + BOOST_FUNCTION_PARMS) + + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS)); + } + }; +#endif + + template< + typename FunctionPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + + template< + typename FunctionObj, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_FUNCTION_REF_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Retrieve the appropriate invoker for a member pointer. */ + template< + typename MemberPtr, + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + struct BOOST_FUNCTION_GET_MEMBER_INVOKER + { + typedef typename mpl::if_c<(is_void::value), + BOOST_FUNCTION_VOID_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >, + BOOST_FUNCTION_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + > + >::type type; + }; +#endif + + /* Given the tag returned by get_function_tag, retrieve the + actual invoker that will be used for the given function + object. + + Each specialization contains an "apply" nested class template + that accepts the function object, return type, function + argument types, and allocator. The resulting "apply" class + contains two typedefs, "invoker_type" and "manager_type", + which correspond to the invoker and manager types. */ + template + struct BOOST_FUNCTION_GET_INVOKER { }; + + /* Retrieve the invoker for a function pointer. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< + FunctionPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; + +#if BOOST_FUNCTION_NUM_ARGS > 0 + /* Retrieve the invoker for a member pointer. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< + MemberPtr, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; +#endif + + /* Retrieve the invoker for a function object. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< + FunctionObj, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef functor_manager_a manager_type; + }; + }; + + /* Retrieve the invoker for a reference to a function object. */ + template<> + struct BOOST_FUNCTION_GET_INVOKER + { + template + struct apply + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< + typename RefWrapper::type, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + + template + struct apply_a + { + typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< + typename RefWrapper::type, + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + }; + + + /** + * vtable for a specific boost::function instance. This + * structure must be an aggregate so that we can use static + * initialization in boost::function's assign_to and assign_to_a + * members. It therefore cannot have any constructors, + * destructors, base classes, etc. + */ + template + struct BOOST_FUNCTION_VTABLE + { +#ifndef BOOST_NO_VOID_RETURNS + typedef R result_type; +#else + typedef typename function_return_type::type result_type; +#endif // BOOST_NO_VOID_RETURNS + + typedef result_type (*invoker_type)(function_buffer& + BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS); + + template + bool assign_to(F f, function_buffer& functor) + { + typedef typename get_function_tag::type tag; + return assign_to(f, functor, tag()); + } + template + bool assign_to_a(F f, function_buffer& functor, Allocator a) + { + typedef typename get_function_tag::type tag; + return assign_to_a(f, functor, a, tag()); + } + + void clear(function_buffer& functor) + { + if (base.manager) + base.manager(functor, functor, destroy_functor_tag); + } + + private: + // Function pointers + template + bool + assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) + { + this->clear(functor); + if (f) { + // should be a reinterpret cast, but some compilers insist + // on giving cv-qualifiers to free functions + functor.func_ptr = (void (*)())(f); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) + { + return assign_to(f,functor,function_ptr_tag()); + } + + // Member pointers +#if BOOST_FUNCTION_NUM_ARGS > 0 + template + bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) + { + // DPG TBD: Add explicit support for member function + // objects, so we invoke through mem_fn() but we retain the + // right target_type() values. + if (f) { + this->assign_to(mem_fn(f), functor); + return true; + } else { + return false; + } + } + template + bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) + { + // DPG TBD: Add explicit support for member function + // objects, so we invoke through mem_fn() but we retain the + // right target_type() values. + if (f) { + this->assign_to_a(mem_fn(f), functor, a); + return true; + } else { + return false; + } + } +#endif // BOOST_FUNCTION_NUM_ARGS > 0 + + // Function objects + // Assign to a function object using the small object optimization + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) + { + new ((void*)&functor.data) FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) + { + assign_functor(f,functor,mpl::true_()); + } + + // Assign to a function object allocated on the heap. + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) + { + functor.obj_ptr = new FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + wrapper_allocator_type wrapper_allocator(a); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); + functor_wrapper_type* new_f = static_cast(copy); + functor.obj_ptr = new_f; + } + + template + bool + assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor(f, functor, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor_a(f, functor, a, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + + // Reference to a function object + template + bool + assign_to(const reference_wrapper& f, + function_buffer& functor, function_obj_ref_tag) + { + functor.obj_ref.obj_ptr = (void *)f.get_pointer(); + functor.obj_ref.is_const_qualified = is_const::value; + functor.obj_ref.is_volatile_qualified = is_volatile::value; + return true; + } + template + bool + assign_to_a(const reference_wrapper& f, + function_buffer& functor, Allocator, function_obj_ref_tag) + { + return assign_to(f,functor,function_obj_ref_tag()); + } + + public: + vtable_base base; + invoker_type invoker; + }; + } // end namespace function + } // end namespace detail + + template< + typename R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_PARMS + > + class BOOST_FUNCTION_FUNCTION : public function_base + +#if BOOST_FUNCTION_NUM_ARGS == 1 + + , public std::unary_function + +#elif BOOST_FUNCTION_NUM_ARGS == 2 + + , public std::binary_function + +#endif + + { + public: +#ifndef BOOST_NO_VOID_RETURNS + typedef R result_type; +#else + typedef typename boost::detail::function::function_return_type::type + result_type; +#endif // BOOST_NO_VOID_RETURNS + + private: + typedef boost::detail::function::BOOST_FUNCTION_VTABLE< + R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> + vtable_type; + + vtable_type* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~(std::size_t)0x01); + } + + struct clear_type {}; + + public: + BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS); + + // add signature for boost::lambda + template + struct sig + { + typedef result_type type; + }; + +#if BOOST_FUNCTION_NUM_ARGS == 1 + typedef T0 argument_type; +#elif BOOST_FUNCTION_NUM_ARGS == 2 + typedef T0 first_argument_type; + typedef T1 second_argument_type; +#endif + + BOOST_STATIC_CONSTANT(int, arity = BOOST_FUNCTION_NUM_ARGS); + BOOST_FUNCTION_ARG_TYPES + + typedef BOOST_FUNCTION_FUNCTION self_type; + + BOOST_FUNCTION_FUNCTION() : function_base() { } + + // MSVC chokes if the following two constructors are collapsed into + // one with a default parameter. + template + BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f +#ifndef BOOST_NO_SFINAE + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 +#endif // BOOST_NO_SFINAE + ) : + function_base() + { + this->assign_to(f); + } + template + BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a +#ifndef BOOST_NO_SFINAE + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 +#endif // BOOST_NO_SFINAE + ) : + function_base() + { + this->assign_to_a(f,a); + } + +#ifndef BOOST_NO_SFINAE + BOOST_FUNCTION_FUNCTION(clear_type*) : function_base() { } +#else + BOOST_FUNCTION_FUNCTION(int zero) : function_base() + { + BOOST_ASSERT(zero == 0); + } +#endif + + BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : function_base() + { + this->assign_to_own(f); + } + + ~BOOST_FUNCTION_FUNCTION() { clear(); } + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + // MSVC 6.0 and prior require all definitions to be inline, but + // these definitions can become very costly. + result_type operator()(BOOST_FUNCTION_PARMS) const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + + return get_vtable()->invoker + (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS); + } +#else + result_type operator()(BOOST_FUNCTION_PARMS) const; +#endif + + // The distinction between when to use BOOST_FUNCTION_FUNCTION and + // when to use self_type is obnoxious. MSVC cannot handle self_type as + // the return type of these assignment operators, but Borland C++ cannot + // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to + // construct. + template +#ifndef BOOST_NO_SFINAE + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + BOOST_FUNCTION_FUNCTION&>::type +#else + BOOST_FUNCTION_FUNCTION& +#endif + operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) + { + this->clear(); + BOOST_TRY { + this->assign_to(f); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + return *this; + } + template + void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a) + { + this->clear(); + BOOST_TRY{ + this->assign_to_a(f,a); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + } + +#ifndef BOOST_NO_SFINAE + BOOST_FUNCTION_FUNCTION& operator=(clear_type*) + { + this->clear(); + return *this; + } +#else + BOOST_FUNCTION_FUNCTION& operator=(int zero) + { + BOOST_ASSERT(zero == 0); + this->clear(); + return *this; + } +#endif + + // Assignment from another BOOST_FUNCTION_FUNCTION + BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f) + { + if (&f == this) + return *this; + + this->clear(); + BOOST_TRY { + this->assign_to_own(f); + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + return *this; + } + + void swap(BOOST_FUNCTION_FUNCTION& other) + { + if (&other == this) + return; + + BOOST_FUNCTION_FUNCTION tmp; + tmp.move_assign(*this); + this->move_assign(other); + other.move_assign(tmp); + } + + // Clear out a target, if there is one + void clear() + { + if (vtable) { + if (!this->has_trivial_copy_and_destroy()) + get_vtable()->clear(this->functor); + vtable = 0; + } + } + +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { return !this->empty(); } +#else + private: + struct dummy { + void nonnull() {}; + }; + + typedef void (dummy::*safe_bool)(); + + public: + operator safe_bool () const + { return (this->empty())? 0 : &dummy::nonnull; } + + bool operator!() const + { return this->empty(); } +#endif + + private: + void assign_to_own(const BOOST_FUNCTION_FUNCTION& f) + { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::clone_functor_tag); + } + } + + template + void assign_to(Functor f) + { + using detail::function::vtable_base; + + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; + typedef typename get_invoker:: + template apply + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + // Note: it is extremely important that this initialization use + // static initialization. Otherwise, we will have a race + // condition here in multi-threaded code. See + // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to(f, functor)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + template + void assign_to_a(Functor f,Allocator a) + { + using detail::function::vtable_base; + + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; + typedef typename get_invoker:: + template apply_a + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + // Note: it is extremely important that this initialization use + // static initialization. Otherwise, we will have a race + // condition here in multi-threaded code. See + // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to_a(f, functor, a)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + // Moves the value from the specified argument to *this. If the argument + // has its function object allocated on the heap, move_assign will pass + // its buffer to *this, and set the argument's buffer pointer to NULL. + void move_assign(BOOST_FUNCTION_FUNCTION& f) + { + if (&f == this) + return; + + BOOST_TRY { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::move_functor_tag); + f.vtable = 0; + } else { + clear(); + } + } BOOST_CATCH (...) { + vtable = 0; + BOOST_RETHROW; + } + BOOST_CATCH_END + } + }; + + template + inline void swap(BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >& f1, + BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS + >& f2) + { + f1.swap(f2); + } + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template + typename BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>::result_type + inline + BOOST_FUNCTION_FUNCTION + ::operator()(BOOST_FUNCTION_PARMS) const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + + return get_vtable()->invoker + (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS); + } +#endif + +// Poison comparisons between boost::function objects of the same type. +template + void operator==(const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&, + const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&); +template + void operator!=(const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>&, + const BOOST_FUNCTION_FUNCTION< + R BOOST_FUNCTION_COMMA + BOOST_FUNCTION_TEMPLATE_ARGS>& ); + +#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) + +#if BOOST_FUNCTION_NUM_ARGS == 0 +#define BOOST_FUNCTION_PARTIAL_SPEC R (void) +#else +#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS,T)) +#endif + +template +class function + : public BOOST_FUNCTION_FUNCTION +{ + typedef BOOST_FUNCTION_FUNCTION base_type; + typedef function self_type; + + struct clear_type {}; + +public: + + function() : base_type() {} + + template + function(Functor f +#ifndef BOOST_NO_SFINAE + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 +#endif + ) : + base_type(f) + { + } + template + function(Functor f, Allocator a +#ifndef BOOST_NO_SFINAE + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 +#endif + ) : + base_type(f,a) + { + } + +#ifndef BOOST_NO_SFINAE + function(clear_type*) : base_type() {} +#endif + + function(const self_type& f) : base_type(static_cast(f)){} + + function(const base_type& f) : base_type(static_cast(f)){} + + self_type& operator=(const self_type& f) + { + self_type(f).swap(*this); + return *this; + } + + template +#ifndef BOOST_NO_SFINAE + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + self_type&>::type +#else + self_type& +#endif + operator=(Functor f) + { + self_type(f).swap(*this); + return *this; + } + +#ifndef BOOST_NO_SFINAE + self_type& operator=(clear_type*) + { + this->clear(); + return *this; + } +#endif + + self_type& operator=(const base_type& f) + { + self_type(f).swap(*this); + return *this; + } +}; + +#undef BOOST_FUNCTION_PARTIAL_SPEC +#endif // have partial specialization + +} // end namespace boost + +// Cleanup after ourselves... +#undef BOOST_FUNCTION_VTABLE +#undef BOOST_FUNCTION_COMMA +#undef BOOST_FUNCTION_FUNCTION +#undef BOOST_FUNCTION_FUNCTION_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER +#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_MEMBER_INVOKER +#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER +#undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER +#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER +#undef BOOST_FUNCTION_GET_INVOKER +#undef BOOST_FUNCTION_TEMPLATE_PARMS +#undef BOOST_FUNCTION_TEMPLATE_ARGS +#undef BOOST_FUNCTION_PARMS +#undef BOOST_FUNCTION_PARM +#undef BOOST_FUNCTION_ARGS +#undef BOOST_FUNCTION_ARG_TYPE +#undef BOOST_FUNCTION_ARG_TYPES +#undef BOOST_FUNCTION_VOID_RETURN_TYPE +#undef BOOST_FUNCTION_RETURN + +#if defined(BOOST_MSVC) +# pragma warning( pop ) +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/function_typeof.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function/function_typeof.hpp new file mode 100644 index 0000000000..246dc15d09 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/function_typeof.hpp @@ -0,0 +1,45 @@ +// Boost.Function library - Typeof support +// Copyright (C) Douglas Gregor 2008 +// +// Use, modification and distribution is subject to the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org +#ifndef BOOST_FUNCTION_TYPEOF_HPP +#define BOOST_FUNCTION_TYPEOF_HPP +#include +#include + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::bad_function_call) + +#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function, (typename)) +#endif + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function0, (typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function1, (typename)(typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function2, (typename)(typename)(typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function3, + (typename)(typename)(typename)(typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function4, + (typename)(typename)(typename)(typename)(typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function5, + (typename)(typename)(typename)(typename)(typename)(typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function6, + (typename)(typename)(typename)(typename)(typename)(typename)(typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function7, + (typename)(typename)(typename)(typename)(typename)(typename)(typename) + (typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function8, + (typename)(typename)(typename)(typename)(typename)(typename)(typename) + (typename)(typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function9, + (typename)(typename)(typename)(typename)(typename)(typename)(typename) + (typename)(typename)(typename)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function10, + (typename)(typename)(typename)(typename)(typename)(typename)(typename) + (typename)(typename)(typename)(typename)) +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function/gen_function_N.pl b/deal.II/contrib/boost-1.45.0/include/boost/function/gen_function_N.pl new file mode 100644 index 0000000000..d8f1249b07 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function/gen_function_N.pl @@ -0,0 +1,26 @@ +#!/usr/bin/perl -w +# +# Boost.Function library +# +# Copyright Douglas Gregor 2001-2003. Use, modification and +# distribution is subject to the Boost Software License, Version +# 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# +# For more information, see http://www.boost.org +use English; + +if ($#ARGV < 0) { + print "Usage: perl gen_function_N \n"; + exit; +} + + +$totalNumArgs = $ARGV[0]; +for ($numArgs = 0; $numArgs <= $totalNumArgs; ++$numArgs) { + open OUT, ">function$numArgs.hpp"; + print OUT "#define BOOST_FUNCTION_NUM_ARGS $numArgs\n"; + print OUT "#include \n"; + print OUT "#undef BOOST_FUNCTION_NUM_ARGS\n"; + close OUT; +} diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_equal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_equal.hpp new file mode 100644 index 0000000000..2d76c75bc9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_equal.hpp @@ -0,0 +1,28 @@ +// Copyright Douglas Gregor 2004. +// Copyright 2005 Peter Dimov + +// Use, modification and distribution is subject to +// the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org +#ifndef BOOST_FUNCTION_EQUAL_HPP +#define BOOST_FUNCTION_EQUAL_HPP + +namespace boost { + +template + bool function_equal_impl(const F& f, const G& g, long) + { return f == g; } + +// function_equal_impl needs to be unqualified to pick +// user overloads on two-phase compilers + +template + bool function_equal(const F& f, const G& g) + { return function_equal_impl(f, g, 0); } + +} // end namespace boost + +#endif // BOOST_FUNCTION_EQUAL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_output_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_output_iterator.hpp new file mode 100644 index 0000000000..9720f3f3d1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_output_iterator.hpp @@ -0,0 +1,56 @@ +// (C) Copyright Jeremy Siek 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Revision History: + +// 27 Feb 2001 Jeremy Siek +// Initial checkin. + +#ifndef BOOST_FUNCTION_OUTPUT_ITERATOR_HPP +#define BOOST_FUNCTION_OUTPUT_ITERATOR_HPP + +#include + +namespace boost { + + template + class function_output_iterator { + typedef function_output_iterator self; + public: + typedef std::output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + explicit function_output_iterator() {} + + explicit function_output_iterator(const UnaryFunction& f) + : m_f(f) {} + + struct output_proxy { + output_proxy(UnaryFunction& f) : m_f(f) { } + template output_proxy& operator=(const T& value) { + m_f(value); + return *this; + } + UnaryFunction& m_f; + }; + output_proxy operator*() { return output_proxy(m_f); } + self& operator++() { return *this; } + self& operator++(int) { return *this; } + private: + UnaryFunction m_f; + }; + + template + inline function_output_iterator + make_function_output_iterator(const UnaryFunction& f = UnaryFunction()) { + return function_output_iterator(f); + } + +} // namespace boost + +#endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/components.hpp new file mode 100644 index 0000000000..a4432c558d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/components.hpp @@ -0,0 +1,431 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_COMPONENTS_HPP_INCLUDED +#define BOOST_FT_COMPONENTS_HPP_INCLUDED + +#include + +#include + +#include +#include +#include + +#include + +#include +#include +#include + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x656)) +# include + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +#endif + +#ifndef BOOST_FT_NO_CV_FUNC_SUPPORT +# include +#endif + +#include + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# if BOOST_FT_MAX_ARITY < 10 +# include +# elif BOOST_FT_MAX_ARITY < 20 +# include +# elif BOOST_FT_MAX_ARITY < 30 +# include +# elif BOOST_FT_MAX_ARITY < 40 +# include +# elif BOOST_FT_MAX_ARITY < 50 +# include +# endif +#else +# include +#endif + +#include +#include + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +namespace boost +{ + namespace function_types + { + + using mpl::placeholders::_; + + template< typename T, typename ClassTypeTransform = add_reference<_> > + struct components; + + namespace detail + { + template struct components_impl; +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x565)) + template struct components_bcc; +#endif + } + + template + struct components +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x565)) + : detail::components_impl +#else + : detail::components_bcc::type,T, + ClassTypeTransform> +#endif + { + typedef components type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,components,(T,ClassTypeTransform)) + }; + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + namespace detail { + + struct components_mpl_sequence_tag; + + struct components_non_func_base + { + typedef mpl::vector0<> types; + typedef void function_arity; + + typedef detail::constant<0> bits; + typedef detail::constant<0> mask; + + typedef components_mpl_sequence_tag tag; + }; + + template + < typename Components + , typename IfTagged + , typename ThenTag + , typename DefaultBase = components_non_func_base + > + struct retagged_if + : mpl::if_ + < detail::represents_impl + , detail::changed_tag + , DefaultBase + >::type + { }; + + // We detect plain function types and function references as function + // pointers by recursive instantiation of components_impl. + // The third specialization of components_impl makes sure the recursion + // terminates (when adding pointers). + template + struct components_impl + : detail::retagged_if + < detail::components_impl + , pointer_tag, /* --> */ function_tag > + { }; + template + struct components_impl + : detail::retagged_if + < detail::components_impl + , pointer_tag, /* --> */ reference_tag > + { }; + +#if !BOOST_FT_NO_CV_FUNC_SUPPORT + // Retry the type with a member pointer attached to detect cv functions + class a_class; + + template + struct cv_func_base + : detail::retagged_if + { + typedef typename + mpl::remove + < typename Base::types + , typename detail::class_transform::type>::type + types; + }; + + template + struct components_impl + : mpl::if_ + < detail::represents_impl< detail::components_impl + , member_pointer_tag > + , detail::cv_func_base< detail::components_impl, T, L> + , components_non_func_base + >::type + { }; + + template + struct components_impl + : components_non_func_base + { }; +#else + template + struct components_impl + : components_non_func_base + { }; +#endif + + template + struct components_impl + : components_impl + { }; + + template + struct components_impl + : components_impl + { }; + + template + struct components_impl + : components_impl + { }; + + template + struct components_impl + : components_impl + { }; + + template + struct components_impl + : components_impl + { }; + + template + struct components_impl + : components_impl + { }; + + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_result + { typedef T const & type; }; + + template + struct member_obj_ptr_result + { typedef T volatile & type; }; + + template + struct member_obj_ptr_result + { typedef T const volatile & type; }; + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_result + { typedef T & type; }; + + template + struct member_obj_ptr_components + : member_object_pointer_base + { + typedef function_types::components type; + typedef components_mpl_sequence_tag tag; + + typedef mpl::integral_c function_arity; + + typedef mpl::vector2< typename detail::member_obj_ptr_result::type, + typename detail::class_transform::type > types; + }; + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x565)) +# define BOOST_FT_variations BOOST_FT_pointer|BOOST_FT_member_pointer + + template + struct components_impl + : member_obj_ptr_components + { }; + +#else +# define BOOST_FT_variations BOOST_FT_pointer + + // This workaround removes the member pointer from the type to allow + // detection of member function pointers with BCC. + template + struct components_impl + : detail::retagged_if + < detail::components_impl::type *, L> + , pointer_tag, /* --> */ member_function_pointer_tag + , member_obj_ptr_components > + { }; + + // BCC lets us test the cv-qualification of a function type by template + // partial specialization - so we use this bug feature to find out the + // member function's cv-qualification (unfortunately there are some + // invisible modifiers that impose some limitations on these types even if + // we remove the qualifiers, So we cannot exploit the same bug to make the + // library work for cv-qualified function types). + template struct encode_cv + { typedef char (& type)[1]; BOOST_STATIC_CONSTANT(std::size_t, value = 1); }; + template struct encode_cv + { typedef char (& type)[2]; BOOST_STATIC_CONSTANT(std::size_t, value = 2); }; + template struct encode_cv + { typedef char (& type)[3]; BOOST_STATIC_CONSTANT(std::size_t, value = 3); }; + template struct encode_cv + { typedef char (& type)[4]; BOOST_STATIC_CONSTANT(std::size_t, value = 4); }; + + // For member function pointers we have to use a function template (partial + // template specialization for a member pointer drops the cv qualification + // of the function type). + template + typename encode_cv::type mfp_cv_tester(T C::*); + + template struct encode_mfp_cv + { + BOOST_STATIC_CONSTANT(std::size_t, value = + sizeof(detail::mfp_cv_tester((T)0L))); + }; + + // Associate bits with the CV codes above. + template struct cv_tag_mfp_impl; + + template struct cv_tag_mfp + : detail::cv_tag_mfp_impl + < ::boost::function_types::detail::encode_mfp_cv::value > + { }; + + template<> struct cv_tag_mfp_impl<1> : non_cv { }; + template<> struct cv_tag_mfp_impl<2> : const_non_volatile { }; + template<> struct cv_tag_mfp_impl<3> : volatile_non_const { }; + template<> struct cv_tag_mfp_impl<4> : cv_qualified { }; + + // Metafunction to decode the cv code and apply it to a type. + // We add a pointer, because otherwise cv-qualifiers won't stick (another bug). + template struct decode_cv; + + template struct decode_cv : mpl::identity {}; + template struct decode_cv : mpl::identity {}; + template struct decode_cv : mpl::identity {}; + template struct decode_cv + : mpl::identity {}; + + // The class type transformation comes after adding cv-qualifiers. We have + // wrap it to remove the pointer added in decode_cv_impl. + template struct bcc_class_transform_impl; + template struct bcc_class_transform_impl + : class_transform + { }; + + template struct bcc_class_transform + : bcc_class_transform_impl + < typename decode_cv + < T + , ::boost::function_types::detail::encode_mfp_cv::value + >::type + , L + > + { }; + + // After extracting the member pointee from the type the class type is still + // in the type (somewhere -- you won't see with RTTI, that is) and that type + // is flagged unusable and *not* identical to the nonmember function type. + // We can, however, decompose this type via components_impl but surprisingly + // a pointer to the const qualified class type pops up again as the first + // parameter type. + // We have to replace this type with the properly cv-qualified and + // transformed class type, integrate the cv qualification into the bits. + template + struct mfp_components; + + + template + struct mfp_components + { + private: + typedef typename mpl::front::type result_type; + typedef typename detail::bcc_class_transform::type class_type; + + typedef mpl::vector2 result_and_class_type; + + typedef typename + mpl::advance + < typename mpl::begin::type + , typename mpl::if_ + < mpl::equal_to< typename detail::classifier::function_arity + , typename Base::function_arity > + , mpl::integral_c , mpl::integral_c + >::type + >::type + from; + typedef typename mpl::end::type to; + + typedef mpl::iterator_range param_types; + + typedef mpl::joint_view< result_and_class_type, param_types> types_view; + public: + + typedef typename + mpl::reverse_copy > >::type + types; + + typedef typename + function_types::tag< Base, detail::cv_tag_mfp >::bits + bits; + + typedef typename Base::mask mask; + + typedef typename detail::classifier::function_arity function_arity; + + typedef components_mpl_sequence_tag tag; + }; + + // Now put it all together: detect cv-qualification of function types and do + // the weird transformations above for member function pointers. + template + struct components_bcc + : mpl::if_ + < detail::represents_impl< detail::components_impl + , member_function_pointer_tag> + , detail::mfp_components,T,OrigT,L> + , detail::components_impl + >::type + { }; + +#endif // end of BORLAND WORKAROUND + +#define BOOST_FT_al_path boost/function_types/detail/components_impl +#include + + } } // namespace function_types::detail + + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::components) + +} // namespace ::boost + +#include +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/cc_names.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/cc_names.hpp new file mode 100644 index 0000000000..ab69d64624 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/cc_names.hpp @@ -0,0 +1,31 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_CONFIG_CC_NAMES_HPP_INCLUDED +#define BOOST_FT_CONFIG_CC_NAMES_HPP_INCLUDED + +#define BOOST_FT_BUILTIN_CC_NAMES \ + (( IMPLICIT , implicit_cc , BOOST_PP_EMPTY ))\ + (( CDECL , cdecl_cc , BOOST_PP_IDENTITY(__cdecl ) ))\ + (( STDCALL , stdcall_cc , BOOST_PP_IDENTITY(__stdcall ) ))\ + (( PASCAL , pascal_cc , BOOST_PP_IDENTITY(pascal ) ))\ + (( FASTCALL , fastcall_cc , BOOST_PP_IDENTITY(__fastcall) ))\ + (( CLRCALL , clrcall_cc , BOOST_PP_IDENTITY(__clrcall ) ))\ + (( THISCALL , thiscall_cc , BOOST_PP_IDENTITY(__thiscall) ))\ + (( IMPLICIT_THISCALL , thiscall_cc , BOOST_PP_EMPTY )) + +// append user-defined cc names to builtin ones +#ifdef BOOST_FT_CC_NAMES +# define BOOST_FT_CC_NAMES_SEQ BOOST_FT_BUILTIN_CC_NAMES BOOST_FT_CC_NAMES +# define BOOST_FT_CC_PREPROCESSING 1 +#else +# define BOOST_FT_CC_NAMES_SEQ BOOST_FT_BUILTIN_CC_NAMES +#endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/compiler.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/compiler.hpp new file mode 100644 index 0000000000..151c856740 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/compiler.hpp @@ -0,0 +1,116 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_CONFIG_COMPILER_HPP_INCLUDED +#define BOOST_FT_CONFIG_COMPILER_HPP_INCLUDED + +#include +#include + +#if defined(BOOST_MSVC) + +# if BOOST_MSVC < 1310 +# error "unsupported compiler version" +# endif + +# ifdef BOOST_FT_AUTODETECT_CALLING_CONVENTIONS + + // enable clrcall calling covention (call to .NET managed code) when + // compiling with /clr +# if BOOST_MSVC >= 1400 && defined(__cplusplus_cli) +# ifndef BOOST_FT_CC_CLRCALL +# define BOOST_FT_CC_CLRCALL callable_builtin +# endif +# endif + + // Intel x86 architecture specific calling conventions +# ifdef _M_IX86 +# define BOOST_FT_COMMON_X86_CCs callable_builtin +# if BOOST_MSVC < 1400 + // version 7.1 is missing a keyword to specify the thiscall cc ... +# ifndef BOOST_FT_CC_IMPLICIT_THISCALL +# define BOOST_FT_CC_IMPLICIT_THISCALL non_variadic|member|callable_builtin +# ifndef BOOST_FT_CONFIG_OK +# pragma message("INFO| /Gd /Gr /Gz will compiler options will cause") +# pragma message("INFO| a compile error.") +# pragma message("INFO| Reconfigure Boost.FunctionTypes in this case.") +# pragma message("INFO| This message can be suppressed by defining") +# pragma message("INFO| BOOST_FT_CONFIG_OK.") +# endif +# endif +# else + // ...introduced in version 8 +# ifndef BOOST_FT_CC_THISCALL +# define BOOST_FT_CC_THISCALL non_variadic|member|callable_builtin +# endif +# endif +# endif +# endif + +#elif defined(__GNUC__) && !defined(BOOST_INTEL_LINUX) + +# if __GNUC__ < 3 +# error "unsupported compiler version" +# endif + +# ifdef BOOST_FT_AUTODETECT_CALLING_CONVENTIONS + +# if defined(__i386__) +# // see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20439 +# // see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29328 +# if BOOST_WORKAROUND(__GNUC__,BOOST_TESTED_AT(4)) +# ifndef BOOST_FT_CC_IMPLICIT +# define BOOST_FT_CC_IMPLICIT member|callable_builtin +# endif +# define BOOST_FT_COMMON_X86_CCs non_member|callable_builtin +# else +# define BOOST_FT_COMMON_X86_CCs callable_builtin +# endif +# else +# ifndef BOOST_FT_CC_IMPLICIT +# define BOOST_FT_CC_IMPLICIT callable_builtin +# endif +# endif +# endif + +# if (defined(BOOST_FT_CC_CDECL) || defined(BOOST_FT_COMMON_X86_CCs)) \ + && !defined(__cdecl) +# define __cdecl __attribute__((__cdecl__)) +# endif +# if (defined(BOOST_FT_CC_STDCALL) || defined(BOOST_FT_COMMON_X86_CCs)) \ + && !defined(__stdcall) +# define __stdcall __attribute__((__stdcall__)) +# endif +# if (defined(BOOST_FT_CC_FASTCALL) || defined(BOOST_FT_COMMON_X86_CCs)) \ + && !defined(__fastcall) +# define __fastcall __attribute__((__fastcall__)) +# endif + +#elif defined(__BORLANDC__) + +# if __BORLANDC__ < 0x550 +# error "unsupported compiler version" +# elif __BORLANDC__ > 0x565 +# pragma message("WARNING: library untested with this compiler version") +# endif + +# ifdef BOOST_FT_AUTODETECT_CALLING_CONVENTIONS +# define BOOST_FT_COMMON_X86_CCs callable_builtin +# endif + + // syntactic specialities of cc specifier +# define BOOST_FT_SYNTAX(result,lparen,cc_spec,type_mod,name,rparen) \ + result() cc_spec() lparen() type_mod() name() rparen() +#else + // only enable default calling convention +# define BOOST_FT_CC_IMPLICIT callable_builtin +#endif + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/config.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/config.hpp new file mode 100644 index 0000000000..7ec8e1e8fe --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/config/config.hpp @@ -0,0 +1,59 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_CONFIG_HPP_INCLUDED +#define BOOST_FT_CONFIG_HPP_INCLUDED + +#include +#include + +// maximum allowed arity +#ifndef BOOST_FT_MAX_ARITY +#define BOOST_FT_MAX_ARITY 20 +#endif + +// the most common calling conventions for x86 architecture can be enabled at +// once in the compiler config +#ifdef BOOST_FT_COMMON_X86_CCs +# ifndef BOOST_FT_CC_CDECL +# define BOOST_FT_CC_CDECL BOOST_FT_COMMON_X86_CCs +# endif +# ifndef BOOST_FT_CC_STDCALL +# define BOOST_FT_CC_STDCALL non_variadic|BOOST_FT_COMMON_X86_CCs +# endif +# ifndef BOOST_FT_CC_FASTCALL +# define BOOST_FT_CC_FASTCALL non_variadic|BOOST_FT_COMMON_X86_CCs +# endif +#endif + +// where to place the cc specifier (the common way) +#ifndef BOOST_FT_SYNTAX +# define BOOST_FT_SYNTAX(result,lparen,cc_spec,type_mod,name,rparen) \ + result() lparen() cc_spec() type_mod() name() rparen() +#endif + +// param for nullary functions +// set to "void" for compilers that require nullary functions to read +// "R (void)" in template partial specialization +#ifndef BOOST_FT_NULLARY_PARAM +#define BOOST_FT_NULLARY_PARAM +#endif + +// there is a pending defect report on cv qualified function types, so support +// for these types is disabled, unless for compilers where it's known to work +#ifndef BOOST_FT_NO_CV_FUNC_SUPPORT +#define BOOST_FT_NO_CV_FUNC_SUPPORT 1 +#endif + +// full preprocessing implies preprocessing of the ccs +#if defined(BOOST_FT_PREPROCESSING_MODE) && !defined(BOOST_FT_CC_PREPROCESSING) +# define BOOST_FT_CC_PREPROCESSING 1 +#endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/class_transform.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/class_transform.hpp new file mode 100644 index 0000000000..ef9a2253b3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/class_transform.hpp @@ -0,0 +1,62 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_DETAIL_CLASS_TRANSFORM_HPP_INCLUDED +#define BOOST_FT_DETAIL_CLASS_TRANSFORM_HPP_INCLUDED + +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace function_types { namespace detail { + +using mpl::placeholders::_; + +// Transformation metafunction for the class type of member function pointers. +template +struct class_transform +{ typedef typename mpl::apply1::type type; }; + + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +// We can short-circuit the mechanism implemented in the primary template for +// the most common lambda expression and save both the "un-lambdaing" and the +// type traits invocation (we know that T can only be a class type). + +template struct class_transform< T, mpl::identity<_> > +{ typedef T type; }; + +template struct class_transform< T, add_reference<_> > +{ typedef T & type; }; + +template struct class_transform< T, add_pointer<_> > +{ typedef T * type; }; + +template struct class_transform< T, remove_cv<_> > +{ typedef typename boost::remove_cv::type type; }; + +template struct class_transform< T, add_reference< remove_cv<_> > > +{ typedef typename boost::remove_cv::type & type; }; + +template struct class_transform< T, add_pointer< remove_cv<_> > > +{ typedef typename boost::remove_cv::type * type; }; + +template struct class_transform< T, mpl::always > +{ typedef U type; }; +#endif + + +} } } // namespace ::boost::function_types::detail + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier.hpp new file mode 100644 index 0000000000..03f3419b9f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier.hpp @@ -0,0 +1,82 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_DETAIL_CLASSIFIER_HPP_INCLUDED +#define BOOST_FT_DETAIL_CLASSIFIER_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { namespace function_types { namespace detail { + +template struct classifier; + +template struct char_array { typedef char (&type)[S]; }; + +template struct encode_charr +{ + typedef typename char_array< + ::boost::function_types::detail::encode_charr_impl::value + >::type type; +}; + +char BOOST_TT_DECL classifier_impl(...); + +#define BOOST_FT_variations BOOST_FT_function|BOOST_FT_pointer|\ + BOOST_FT_member_pointer + +#define BOOST_FT_type_function(cc,name) BOOST_FT_SYNTAX( \ + R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,* BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) + +#define BOOST_FT_type_function_pointer(cc,name) BOOST_FT_SYNTAX( \ + R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,** BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) + +#define BOOST_FT_type_member_function_pointer(cc,name) BOOST_FT_SYNTAX( \ + R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,T0::** BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) + +#define BOOST_FT_al_path boost/function_types/detail/classifier_impl +#include + +template struct classifier_bits +{ + static typename boost::add_reference::type tester; + + BOOST_STATIC_CONSTANT(bits_t,value = (bits_t)sizeof( + boost::function_types::detail::classifier_impl(& tester) + )-1); +}; + +template struct classifier +{ + typedef detail::constant< + ::boost::function_types::detail::decode_bits< + ::boost::function_types::detail::classifier_bits::value + >::tag_bits > + bits; + + typedef detail::full_mask mask; + + typedef detail::constant< + ::boost::function_types::detail::decode_bits< + ::boost::function_types::detail::classifier_bits::value + >::arity > + function_arity; +}; + + + +} } } // namespace ::boost::function_types::detail + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity10_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity10_0.hpp new file mode 100644 index 0000000000..e27f3c2d67 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity10_0.hpp @@ -0,0 +1,55 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +template< typename R > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (BOOST_FT_nullary_param BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity10_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity10_1.hpp new file mode 100644 index 0000000000..cca8027a00 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity10_1.hpp @@ -0,0 +1,52 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +template< typename R , typename T0 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) ( BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity20_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity20_0.hpp new file mode 100644 index 0000000000..f7a25169e4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity20_0.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity20_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity20_1.hpp new file mode 100644 index 0000000000..1cee2ba35a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity20_1.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity30_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity30_0.hpp new file mode 100644 index 0000000000..6bc60f86e8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity30_0.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity30_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity30_1.hpp new file mode 100644 index 0000000000..743c263bef --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity30_1.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity40_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity40_0.hpp new file mode 100644 index 0000000000..161ac1751e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity40_0.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity40_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity40_1.hpp new file mode 100644 index 0000000000..e3a99887d4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity40_1.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity50_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity50_0.hpp new file mode 100644 index 0000000000..d05719a3f9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity50_0.hpp @@ -0,0 +1,53 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49 BOOST_FT_ell) BOOST_FT_cv); + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity50_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity50_1.hpp new file mode 100644 index 0000000000..944eabaa06 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/arity50_1.hpp @@ -0,0 +1,52 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 BOOST_FT_ell) BOOST_FT_cv); +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49 > +typename encode_charr ::type +classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49 BOOST_FT_ell) BOOST_FT_cv); diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/master.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/master.hpp new file mode 100644 index 0000000000..00b722e345 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/classifier_impl/master.hpp @@ -0,0 +1,33 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +#if BOOST_FT_ARITY_LOOP_PREFIX + +# ifndef BOOST_FT_DETAIL_CLASSIFIER_IMPL_MASTER_HPP_INCLUDED +# define BOOST_FT_DETAIL_CLASSIFIER_IMPL_MASTER_HPP_INCLUDED +# include +# endif + +# define BOOST_FT_type_name + +#elif BOOST_FT_ARITY_LOOP_IS_ITERATING + +template< BOOST_FT_tplargs(BOOST_PP_IDENTITY(typename)) > +typename encode_charr::type +classifier_impl(BOOST_FT_type); + +#elif BOOST_FT_ARITY_LOOP_SUFFIX + +# undef BOOST_FT_type_name + +#else +# error "attempt to use arity loop master file without loop" +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_as_mpl_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_as_mpl_sequence.hpp new file mode 100644 index 0000000000..637b1b52bb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_as_mpl_sequence.hpp @@ -0,0 +1,138 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_DETAIL_COMPONENTS_AS_MPL_SEQUENCE_HPP_INCLUDED +#define BOOST_FT_DETAIL_COMPONENTS_AS_MPL_SEQUENCE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template<> struct size_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > struct apply + : mpl::size + { }; +}; +template<> struct empty_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > struct apply + : mpl::empty + { }; +}; +template<> struct front_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > struct apply + : mpl::front + { }; +}; +template<> struct back_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > struct apply + : mpl::back + { }; +}; +template<> struct at_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S, typename N > struct apply + : mpl::at + { }; +}; +template<> struct begin_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > struct apply + : mpl::begin + { }; +}; +template<> struct end_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > struct apply + : mpl::end + { }; +}; +template<> struct clear_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > + struct apply + : S + { + typedef apply type; + typedef typename mpl::clear< typename S::types >::type types; + }; +}; +template<> +struct push_front_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S, typename T > + struct apply + : S + { + typedef apply type; + typedef typename mpl::push_front< typename S::types, T >::type types; + }; +}; +template<> +struct pop_front_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > + struct apply + : S + { + typedef apply type; + typedef typename mpl::pop_front< typename S::types >::type types; + }; +}; +template<> +struct push_back_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S, typename T > + struct apply + : S + { + typedef apply type; + typedef typename mpl::push_back< typename S::types, T >::type types; + }; +}; +template<> +struct pop_back_impl +< function_types::detail::components_mpl_sequence_tag > +{ + template< typename S > + struct apply + : S + { + typedef apply type; + typedef typename mpl::pop_back< typename S::types >::type types; + }; +}; + +} } // namespace ::boost::mpl + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity10_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity10_0.hpp new file mode 100644 index 0000000000..f96c6a9f73 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity10_0.hpp @@ -0,0 +1,132 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +template< typename R, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector1< R BOOST_FT_nullary_param > types; +}; +template< typename R , typename T0, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector2< R , T0 > types; +}; +template< typename R , typename T0 , typename T1, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector3< R , T0 , T1 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector4< R , T0 , T1 , T2 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector5< R , T0 , T1 , T2 , T3 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector6< R , T0 , T1 , T2 , T3 , T4 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector7< R , T0 , T1 , T2 , T3 , T4 , T5 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector8< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector9< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector10< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector11< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity10_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity10_1.hpp new file mode 100644 index 0000000000..1b06a97a78 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity10_1.hpp @@ -0,0 +1,122 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +template< typename R , typename T0, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector2< R, typename class_transform ::type > types; +}; +template< typename R , typename T0 , typename T1, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector3< R, typename class_transform ::type , T1 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector4< R, typename class_transform ::type , T1 , T2 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector5< R, typename class_transform ::type , T1 , T2 , T3 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector6< R, typename class_transform ::type , T1 , T2 , T3 , T4 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector7< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector8< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector9< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector10< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector11< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity20_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity20_0.hpp new file mode 100644 index 0000000000..f6b2ca8a44 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity20_0.hpp @@ -0,0 +1,123 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector12< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector13< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector14< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector15< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector16< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector17< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector18< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector19< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector20< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector21< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity20_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity20_1.hpp new file mode 100644 index 0000000000..1688e6b3ed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity20_1.hpp @@ -0,0 +1,123 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector12< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector13< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector14< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector15< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector16< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector17< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector18< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector19< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector20< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector21< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity30_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity30_0.hpp new file mode 100644 index 0000000000..e85eb3a09c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity30_0.hpp @@ -0,0 +1,123 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector22< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector23< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector24< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector25< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector26< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector27< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector28< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector29< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector30< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector31< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity30_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity30_1.hpp new file mode 100644 index 0000000000..290d21efa7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity30_1.hpp @@ -0,0 +1,123 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector22< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector23< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector24< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector25< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector26< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector27< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector28< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector29< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector30< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector31< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity40_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity40_0.hpp new file mode 100644 index 0000000000..f1a2410173 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity40_0.hpp @@ -0,0 +1,123 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector32< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector33< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector34< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector35< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector36< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector37< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector38< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector39< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector40< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector41< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity40_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity40_1.hpp new file mode 100644 index 0000000000..e1741cbbac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity40_1.hpp @@ -0,0 +1,123 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector32< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector33< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector34< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector35< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector36< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector37< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector38< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector39< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector40< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector41< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity50_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity50_0.hpp new file mode 100644 index 0000000000..693a05dfe1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity50_0.hpp @@ -0,0 +1,123 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector42< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector43< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector44< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector45< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector46< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector47< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector48< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector49< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector50< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector51< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity50_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity50_1.hpp new file mode 100644 index 0000000000..9bc1616242 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/arity50_1.hpp @@ -0,0 +1,123 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector42< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector43< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector44< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector45< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector46< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector47< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector48< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector49< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector50< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 > types; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49, typename L> +struct components_impl +{ +typedef encode_bits bits; +typedef constant mask; +typedef function_types::components type; +typedef components_mpl_sequence_tag tag; +typedef mpl::integral_c function_arity; +typedef mpl::vector51< R, typename class_transform ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49 > types; +}; + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/master.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/master.hpp new file mode 100644 index 0000000000..cd83726231 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/components_impl/master.hpp @@ -0,0 +1,61 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +#if BOOST_FT_ARITY_LOOP_PREFIX + +# ifndef BOOST_FT_DETAIL_COMPONENTS_IMPL_MASTER_HPP_INCLUDED +# define BOOST_FT_DETAIL_COMPONENTS_IMPL_MASTER_HPP_INCLUDED +# include +# include +# include +# include +# include +# endif + +# define BOOST_FT_type_name + +# if !BOOST_FT_mfp + +# define BOOST_FT_types \ + R BOOST_PP_COMMA_IF(BOOST_FT_arity) BOOST_FT_params(BOOST_PP_EMPTY) +# else + +# define BOOST_FT_types \ + R, typename class_transform::type \ + BOOST_PP_COMMA_IF(BOOST_PP_DEC(BOOST_FT_arity)) \ + BOOST_FT_params(BOOST_PP_EMPTY) + +# endif + +#elif BOOST_FT_ARITY_LOOP_IS_ITERATING + +template< BOOST_FT_tplargs(BOOST_PP_IDENTITY(typename)), typename L> +struct components_impl +{ + typedef encode_bits bits; + typedef constant mask; + + typedef function_types::components type; + typedef components_mpl_sequence_tag tag; + + typedef mpl::integral_c function_arity; + + typedef BOOST_PP_CAT(mpl::vector,BOOST_FT_n)< BOOST_FT_types > types; +}; + +#elif BOOST_FT_ARITY_LOOP_SUFFIX + +# undef BOOST_FT_types +# undef BOOST_FT_type_name + +#else +# error "attempt to use arity loop master file without loop" +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/cv_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/cv_traits.hpp new file mode 100644 index 0000000000..242f45b3b1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/cv_traits.hpp @@ -0,0 +1,134 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_DETAIL_CV_TRAITS_HPP_INCLUDED +#define BOOST_FT_DETAIL_CV_TRAITS_HPP_INCLUDED + +#include +#include + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || BOOST_WORKAROUND(__BORLANDC__, <= 0x582) +# include +# include +# include +#endif + +#include + +namespace boost { namespace function_types { namespace detail { + +#if ! (defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || BOOST_WORKAROUND(__BORLANDC__, <= 0x582)) + +template struct cv_traits +{ typedef non_cv tag; typedef T type; }; +template struct cv_traits +{ typedef non_cv tag; typedef T type; }; +template struct cv_traits +{ typedef non_cv tag; typedef T type; }; +template struct cv_traits +{ typedef non_cv tag; typedef T type; }; +template struct cv_traits +{ typedef non_cv tag; typedef T type; }; +template struct cv_traits +{ typedef non_cv tag; typedef T type; }; + +template struct cv_traits +{ typedef const_non_volatile tag; typedef T type; }; +template struct cv_traits +{ typedef const_non_volatile tag; typedef T type; }; +template struct cv_traits +{ typedef const_non_volatile tag; typedef T type; }; +template struct cv_traits +{ typedef const_non_volatile tag; typedef T type; }; +template struct cv_traits +{ typedef const_non_volatile tag; typedef T type; }; +template struct cv_traits +{ typedef const_non_volatile tag; typedef T type; }; + +template struct cv_traits +{ typedef volatile_non_const tag; typedef T type; }; +template struct cv_traits +{ typedef volatile_non_const tag; typedef T type; }; +template struct cv_traits +{ typedef volatile_non_const tag; typedef T type; }; +template struct cv_traits +{ typedef volatile_non_const tag; typedef T type; }; +template struct cv_traits +{ typedef volatile_non_const tag; typedef T type; }; +template struct cv_traits +{ typedef volatile_non_const tag; typedef T type; }; + +template struct cv_traits +{ typedef cv_qualified tag; typedef T type; }; +template struct cv_traits +{ typedef cv_qualified tag; typedef T type; }; +template struct cv_traits +{ typedef cv_qualified tag; typedef T type; }; +template struct cv_traits +{ typedef cv_qualified tag; typedef T type; }; +template struct cv_traits +{ typedef cv_qualified tag; typedef T type; }; +template struct cv_traits +{ typedef cv_qualified tag; typedef T type; }; + +#else +template struct cv_tag_impl; + +template<> struct cv_tag_impl<1> { typedef non_cv type;}; +template<> struct cv_tag_impl<2> { typedef const_non_volatile type; }; +template<> struct cv_tag_impl<3> { typedef volatile_non_const type; }; +template<> struct cv_tag_impl<4> { typedef cv_qualified type; }; + +typedef char (& case_1)[1]; +typedef char (& case_2)[2]; +typedef char (& case_3)[3]; +typedef char (& case_4)[4]; + +template case_1 switch_cv(T *); +template case_2 switch_cv(T const *); +template case_3 switch_cv(T volatile *); +template case_4 switch_cv(T const volatile *); + +template T * ref_to_ptr(T &); +template T const * ref_to_ptr(T const &); +template T volatile * ref_to_ptr(T volatile &); +template T const volatile * ref_to_ptr(T const volatile &); + +template T * ref_to_ptr(T * const volatile &); + +template +struct cv_code +{ + static T _t; + BOOST_STATIC_CONSTANT(std::size_t, value = + sizeof(::boost::function_types::detail::switch_cv( + ::boost::function_types::detail::ref_to_ptr(_t) ) )); +}; + +template struct cv_traits +{ + typedef typename boost::function_types::detail::cv_tag_impl< + ::boost::function_types::detail::cv_code::value >::type + tag; + + // may require Boost.TypeTraits broken compiler specializations + // to work + typedef typename boost::remove_cv< + typename boost::remove_pointer< + typename boost::remove_reference::type + >::type + >::type type; +}; +#endif + +} } } // namespace boost::function_types::detail + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/aliases_def.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/aliases_def.hpp new file mode 100644 index 0000000000..4d4833179c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/aliases_def.hpp @@ -0,0 +1,16 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusions + +#define callable_builtin BOOST_FT_callable_builtin +#define member BOOST_FT_member_pointer +#define non_member BOOST_FT_non_member +#define variadic BOOST_FT_variadic +#define non_variadic BOOST_FT_non_variadic + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/aliases_undef.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/aliases_undef.hpp new file mode 100644 index 0000000000..1d4e577d80 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/aliases_undef.hpp @@ -0,0 +1,16 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusions + +#undef callable_builtin +#undef member +#undef non_member +#undef variadic +#undef non_variadic + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/def.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/def.hpp new file mode 100644 index 0000000000..08074fb38b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/def.hpp @@ -0,0 +1,51 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusions + +// Type encoding: +// +// bit 0: callable builtin +// bit 1: non member +// bit 2: naked function +// bit 3: pointer +// bit 4: reference +// bit 5: member pointer +// bit 6: member function pointer +// bit 7: member object pointer + +#define BOOST_FT_type_mask 0x000000ff // 1111 1111 +#define BOOST_FT_callable_builtin 0x00000001 // 0000 0001 +#define BOOST_FT_non_member 0x00000002 // 0000 0010 +#define BOOST_FT_function 0x00000007 // 0000 0111 +#define BOOST_FT_pointer 0x0000000b // 0000 1011 +#define BOOST_FT_reference 0x00000013 // 0001 0011 +#define BOOST_FT_non_member_callable_builtin 0x00000003 // 0000 0011 +#define BOOST_FT_member_pointer 0x00000020 // 0010 0000 +#define BOOST_FT_member_function_pointer 0x00000061 // 0110 0001 +#define BOOST_FT_member_object_pointer 0x000000a3 // 1010 0001 +#define BOOST_FT_member_object_pointer_flags 0x000002a3 + +#define BOOST_FT_variadic 0x00000100 +#define BOOST_FT_non_variadic 0x00000200 +#define BOOST_FT_variadic_mask 0x00000300 + +#define BOOST_FT_const 0x00000400 +#define BOOST_FT_volatile 0x00000800 + +#define BOOST_FT_default_cc 0x00008000 +#define BOOST_FT_cc_mask 0x00ff8000 + +#define BOOST_FT_kind_mask 0x000000fc + +#define BOOST_FT_flags_mask 0x00000fff +#define BOOST_FT_full_mask 0x00ff0fff + +#define BOOST_FT_arity_shift 24 +#define BOOST_FT_arity_mask 0x7f000000 + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/undef.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/undef.hpp new file mode 100644 index 0000000000..1920d6fcb1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/encoding/undef.hpp @@ -0,0 +1,38 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +#undef BOOST_FT_type_mask +#undef BOOST_FT_kind_mask +#undef BOOST_FT_callable_builtin +#undef BOOST_FT_non_member +#undef BOOST_FT_function +#undef BOOST_FT_pointer +#undef BOOST_FT_reference +#undef BOOST_FT_non_member_callable_builtin +#undef BOOST_FT_member_pointer +#undef BOOST_FT_member_function_pointer +#undef BOOST_FT_member_object_pointer +#undef BOOST_FT_member_object_pointer_flags + +#undef BOOST_FT_variadic +#undef BOOST_FT_non_variadic +#undef BOOST_FT_variadic_mask + +#undef BOOST_FT_const +#undef BOOST_FT_volatile + +#undef BOOST_FT_default_cc +#undef BOOST_FT_cc_mask + +#undef BOOST_FT_flags_mask +#undef BOOST_FT_full_mask + +#undef BOOST_FT_arity_mask + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_arity_loop.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_arity_loop.hpp new file mode 100644 index 0000000000..b6dbff59f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_arity_loop.hpp @@ -0,0 +1,149 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +#ifndef BOOST_FT_PREPROCESSING_MODE +// input: BOOST_FT_mfp 0 or 1 <=> member function pointer? +// input: BOOST_FT_type_name BOOST_FT_type --> "R (* ..._type_name)()" (pass2) +#endif +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +#ifdef __WAVE__ +# pragma wave option(preserve: 0) +#endif + +#ifndef BOOST_FT_ARITY_LOOP_IS_ITERATING + +# define BOOST_FT_AL_PREPROCESSED \ + BOOST_FT_AL_FILE(BOOST_FT_al_path,BOOST_FT_FROM_ARITY,BOOST_FT_mfp) + +# define BOOST_FT_AL_FILE(base_path,max_arity,mfp) \ + BOOST_FT_AL_FILE_I(base_path,max_arity,mfp) +# define BOOST_FT_AL_FILE_I(base_path,max_arity,mfp) \ + + +# if !defined(BOOST_FT_PREPROCESSING_MODE) + +# if BOOST_FT_MAX_ARITY < 10 +# define BOOST_FT_FROM_ARITY 0 +# elif BOOST_FT_MAX_ARITY < 20 +# define BOOST_FT_FROM_ARITY 10 +# elif BOOST_FT_MAX_ARITY < 30 +# define BOOST_FT_FROM_ARITY 20 +# elif BOOST_FT_MAX_ARITY < 40 +# define BOOST_FT_FROM_ARITY 30 +# endif + +# if BOOST_FT_FROM_ARITY +# include BOOST_FT_AL_PREPROCESSED +# endif + +# elif !defined(BOOST_FT_FROM_ARITY) // single pass preprocessing +# define BOOST_FT_FROM_ARITY 0 + +# elif BOOST_FT_FROM_ARITY > 0 // arity20 includes arity10 +BOOST_PP_EXPAND(#) include BOOST_FT_AL_PREPROCESSED +# endif + +# undef BOOST_FT_AL_PREPROCESSED + +# undef BOOST_FT_AL_FILE +# undef BOOST_FT_AL_FILE_I + +# if BOOST_FT_MAX_ARITY > BOOST_FT_FROM_ARITY + +# ifndef BOOST_FT_DETAIL_ARITY_LOOP_HPP_INCLUDED +# define BOOST_FT_DETAIL_ARITY_LOOP_HPP_INCLUDED +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# endif + +# define BOOST_FT_AL_INCLUDE_FILE + +# define BOOST_FT_ARITY_LOOP_PREFIX 1 +# include BOOST_FT_AL_INCLUDE_FILE +# undef BOOST_FT_ARITY_LOOP_PREFIX + +# if !BOOST_PP_IS_ITERATING +# define BOOST_PP_FILENAME_1 BOOST_FT_AL_INCLUDE_FILE +# elif BOOST_PP_ITERATION_DEPTH() == 1 +# define BOOST_PP_FILENAME_2 BOOST_FT_AL_INCLUDE_FILE +# else +# error "loops nested too deeply" +# endif + +# define BOOST_FT_arity BOOST_PP_ITERATION() +# define BOOST_FT_n BOOST_PP_INC(BOOST_FT_arity) + +# define BOOST_FT_type \ + BOOST_FT_syntax(BOOST_FT_cc,BOOST_FT_type_name BOOST_PP_EMPTY)\ + (BOOST_FT_params(BOOST_PP_EMPTY) BOOST_FT_ell) BOOST_FT_cv + +# define BOOST_FT_tplargs(prefx) \ + prefx() R BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_FT_arity,prefx() T) + +# if !BOOST_FT_mfp + +# define BOOST_FT_params(prefx) \ + BOOST_PP_IF(BOOST_FT_arity,BOOST_PP_ENUM_PARAMS, \ + BOOST_FT_nullary_param BOOST_PP_TUPLE_EAT(2))( \ + BOOST_FT_arity,prefx() T) +# else + +# define BOOST_FT_params(prefx) \ + BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_FT_arity,prefx() T) + +# endif + +# if !BOOST_FT_FROM_ARITY +# define BOOST_PP_ITERATION_LIMITS (BOOST_FT_mfp, BOOST_FT_MAX_ARITY) +# else +# define BOOST_PP_ITERATION_LIMITS \ + (BOOST_FT_FROM_ARITY+1, BOOST_FT_MAX_ARITY) +# endif + +# define BOOST_FT_ARITY_LOOP_IS_ITERATING 1 +# include BOOST_PP_ITERATE() +# undef BOOST_FT_ARITY_LOOP_IS_ITERATING + +# undef BOOST_FT_arity +# undef BOOST_FT_params +# undef BOOST_FT_tplargs +# undef BOOST_FT_type + +# define BOOST_FT_ARITY_LOOP_SUFFIX 1 +# include BOOST_FT_AL_INCLUDE_FILE +# undef BOOST_FT_ARITY_LOOP_SUFFIX + +# undef BOOST_FT_AL_INCLUDE_FILE +# endif + +# undef BOOST_FT_FROM_ARITY + +#else +# error "attempt to nest arity loops" +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_cc_loop/master.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_cc_loop/master.hpp new file mode 100644 index 0000000000..60e958cec7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_cc_loop/master.hpp @@ -0,0 +1,136 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusions + +#ifdef __WAVE__ +// this file has been generated from the master.hpp file in the same directory +# pragma wave option(preserve: 0) +#endif + + +#if !BOOST_PP_IS_ITERATING + +# ifndef BOOST_FT_DETAIL_CC_LOOP_MASTER_HPP_INCLUDED +# define BOOST_FT_DETAIL_CC_LOOP_MASTER_HPP_INCLUDED +# include + +# include +# include +# include +# include +# include +# include +# include +# endif + +# include +# include + +# define BOOST_PP_FILENAME_1 \ + +# define BOOST_PP_ITERATION_LIMITS \ + (0,BOOST_PP_SEQ_SIZE(BOOST_FT_CC_NAMES_SEQ)-1) +# include BOOST_PP_ITERATE() +# if !defined(BOOST_FT_config_valid) && BOOST_FT_CC_PREPROCESSING +# define BOOST_FT_cc_id 1 +# define BOOST_FT_cc_name implicit_cc +# define BOOST_FT_cc BOOST_PP_EMPTY +# define BOOST_FT_cond callable_builtin +# include BOOST_FT_cc_file +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# elif !defined(BOOST_FT_config_valid) // and generating preprocessed file +BOOST_PP_EXPAND(#) ifndef BOOST_FT_config_valid +BOOST_PP_EXPAND(#) define BOOST_FT_cc_id 1 +BOOST_PP_EXPAND(#) define BOOST_FT_cc_name implicit_cc +BOOST_PP_EXPAND(#) define BOOST_FT_cc BOOST_PP_EMPTY +BOOST_PP_EXPAND(#) define BOOST_FT_cond callable_builtin +#define _() +BOOST_PP_EXPAND(#) include BOOST_FT_cc_file +#undef _ +BOOST_PP_EXPAND(#) undef BOOST_FT_cond +BOOST_PP_EXPAND(#) undef BOOST_FT_cc_name +BOOST_PP_EXPAND(#) undef BOOST_FT_cc +BOOST_PP_EXPAND(#) undef BOOST_FT_cc_id +BOOST_PP_EXPAND(#) else +BOOST_PP_EXPAND(#) undef BOOST_FT_config_valid +BOOST_PP_EXPAND(#) endif + +# else +# undef BOOST_FT_config_valid +# endif + +# include +# include + +#elif BOOST_FT_CC_PREPROCESSING + +# define BOOST_FT_cc_id BOOST_PP_INC(BOOST_PP_FRAME_ITERATION(1)) +# define BOOST_FT_cc_inf \ + BOOST_PP_SEQ_ELEM(BOOST_PP_FRAME_ITERATION(1),BOOST_FT_CC_NAMES_SEQ) + +# define BOOST_FT_cc_pp_name BOOST_PP_TUPLE_ELEM(3,0,BOOST_FT_cc_inf) +# define BOOST_FT_cc_name BOOST_PP_TUPLE_ELEM(3,1,BOOST_FT_cc_inf) +# define BOOST_FT_cc BOOST_PP_TUPLE_ELEM(3,2,BOOST_FT_cc_inf) + +# define BOOST_FT_cond BOOST_PP_CAT(BOOST_FT_CC_,BOOST_FT_cc_pp_name) + +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif + +# undef BOOST_FT_cond + +# undef BOOST_FT_cc_pp_name +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc + +# undef BOOST_FT_cc_id +# undef BOOST_FT_cc_inf + +#else // if generating preprocessed file +BOOST_PP_EXPAND(#) define BOOST_FT_cc_id BOOST_PP_INC(BOOST_PP_ITERATION()) + +# define BOOST_FT_cc_inf \ + BOOST_PP_SEQ_ELEM(BOOST_PP_ITERATION(),BOOST_FT_CC_NAMES_SEQ) + +# define BOOST_FT_cc_pp_name BOOST_PP_TUPLE_ELEM(3,0,BOOST_FT_cc_inf) + +# define BOOST_FT_CC_DEF(name,index) \ + name BOOST_PP_TUPLE_ELEM(3,index,BOOST_FT_cc_inf) +BOOST_PP_EXPAND(#) define BOOST_FT_CC_DEF(BOOST_FT_cc_name,1) +BOOST_PP_EXPAND(#) define BOOST_FT_CC_DEF(BOOST_FT_cc,2) +# undef BOOST_FT_CC_DEF + +# define BOOST_FT_cc_cond_v BOOST_PP_CAT(BOOST_FT_CC_,BOOST_FT_cc_pp_name) +BOOST_PP_EXPAND(#) define BOOST_FT_cond BOOST_FT_cc_cond_v +# undef BOOST_FT_cc_cond_v + +# undef BOOST_FT_cc_pp_name +# undef BOOST_FT_cc_inf + +BOOST_PP_EXPAND(#) if BOOST_FT_cond +BOOST_PP_EXPAND(#) define BOOST_FT_config_valid 1 +#define _() +BOOST_PP_EXPAND(#) include BOOST_FT_cc_file +#undef _ +BOOST_PP_EXPAND(#) endif + +BOOST_PP_EXPAND(#) undef BOOST_FT_cond + +BOOST_PP_EXPAND(#) undef BOOST_FT_cc_name +BOOST_PP_EXPAND(#) undef BOOST_FT_cc + +BOOST_PP_EXPAND(#) undef BOOST_FT_cc_id + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp new file mode 100644 index 0000000000..da4079c6ad --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp @@ -0,0 +1,120 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusions + +// this file has been generated from the master.hpp file in the same directory +# define BOOST_FT_cc_id 1 +# define BOOST_FT_cc_name implicit_cc +# define BOOST_FT_cc BOOST_PP_EMPTY +# define BOOST_FT_cond BOOST_FT_CC_IMPLICIT +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# define BOOST_FT_cc_id 2 +# define BOOST_FT_cc_name cdecl_cc +# define BOOST_FT_cc BOOST_PP_IDENTITY(__cdecl ) +# define BOOST_FT_cond BOOST_FT_CC_CDECL +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# define BOOST_FT_cc_id 3 +# define BOOST_FT_cc_name stdcall_cc +# define BOOST_FT_cc BOOST_PP_IDENTITY(__stdcall ) +# define BOOST_FT_cond BOOST_FT_CC_STDCALL +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# define BOOST_FT_cc_id 4 +# define BOOST_FT_cc_name pascal_cc +# define BOOST_FT_cc BOOST_PP_IDENTITY(pascal ) +# define BOOST_FT_cond BOOST_FT_CC_PASCAL +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# define BOOST_FT_cc_id 5 +# define BOOST_FT_cc_name fastcall_cc +# define BOOST_FT_cc BOOST_PP_IDENTITY(__fastcall) +# define BOOST_FT_cond BOOST_FT_CC_FASTCALL +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# define BOOST_FT_cc_id 6 +# define BOOST_FT_cc_name clrcall_cc +# define BOOST_FT_cc BOOST_PP_IDENTITY(__clrcall ) +# define BOOST_FT_cond BOOST_FT_CC_CLRCALL +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# define BOOST_FT_cc_id 7 +# define BOOST_FT_cc_name thiscall_cc +# define BOOST_FT_cc BOOST_PP_IDENTITY(__thiscall) +# define BOOST_FT_cond BOOST_FT_CC_THISCALL +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# define BOOST_FT_cc_id 8 +# define BOOST_FT_cc_name thiscall_cc +# define BOOST_FT_cc BOOST_PP_EMPTY +# define BOOST_FT_cond BOOST_FT_CC_IMPLICIT_THISCALL +# if BOOST_FT_cond +# define BOOST_FT_config_valid 1 +# include BOOST_FT_cc_file +# endif +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# ifndef BOOST_FT_config_valid +# define BOOST_FT_cc_id 1 +# define BOOST_FT_cc_name implicit_cc +# define BOOST_FT_cc BOOST_PP_EMPTY +# define BOOST_FT_cond 0x00000001 +# include BOOST_FT_cc_file +# undef BOOST_FT_cond +# undef BOOST_FT_cc_name +# undef BOOST_FT_cc +# undef BOOST_FT_cc_id +# else +# undef BOOST_FT_config_valid +# endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_loop.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_loop.hpp new file mode 100644 index 0000000000..7d8c347c99 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_loop.hpp @@ -0,0 +1,80 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusions + +#ifndef BOOST_FT_DETAIL_PP_LOOP_HPP_INCLUDED +#define BOOST_FT_DETAIL_PP_LOOP_HPP_INCLUDED +# include +# include +# include +#endif + +#include +#include + +#if defined(BOOST_FT_PREPROCESSING_MODE) +# define BOOST_FT_loop +#else +# define BOOST_FT_loop \ + +#endif + +#if defined(BOOST_FT_al_path) + +# define BOOST_FT_cc_file \ + +# define BOOST_FT_variate_file \ + + +# ifndef BOOST_FT_type_function +# define BOOST_FT_type_function(cc,name) BOOST_FT_SYNTAX( \ + R BOOST_PP_EMPTY,BOOST_PP_EMPTY,cc,BOOST_PP_EMPTY,name,BOOST_PP_EMPTY) +# endif +# ifndef BOOST_FT_type_function_pointer +# define BOOST_FT_type_function_pointer(cc,name) BOOST_FT_SYNTAX( \ + R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,* BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) +# endif +# ifndef BOOST_FT_type_function_reference +# define BOOST_FT_type_function_reference(cc,name) BOOST_FT_SYNTAX( \ + R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,& BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) +# endif +# ifndef BOOST_FT_type_member_function_pointer +# define BOOST_FT_type_member_function_pointer(cc,name) BOOST_FT_SYNTAX( \ + R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,T0::* BOOST_PP_EMPTY,name,BOOST_PP_RPAREN) +# endif + +# include BOOST_FT_loop + +# undef BOOST_FT_type_function +# undef BOOST_FT_type_function_pointer +# undef BOOST_FT_type_function_reference +# undef BOOST_FT_type_member_function_pointer + +# undef BOOST_FT_variations +# undef BOOST_FT_variate_file +# undef BOOST_FT_cc_file +# undef BOOST_FT_al_path + +#elif defined(BOOST_FT_cc_file) + +# include BOOST_FT_loop +# undef BOOST_FT_cc_file + +#else + +# error "argument missing" + +#endif + +#undef BOOST_FT_loop + +#include +#include + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_retag_default_cc/master.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_retag_default_cc/master.hpp new file mode 100644 index 0000000000..865efce519 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_retag_default_cc/master.hpp @@ -0,0 +1,103 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is guarded externally + +#ifdef __WAVE__ +// this file has been generated from the master.hpp file in the same directory +# pragma wave option(preserve: 0) +#endif + +#if !defined(BOOST_PP_VALUE) +# include +# include + +# include +# include + +namespace boost { namespace function_types { + +namespace detail +{ + template struct selector_bits + { +# define BOOST_PP_VALUE non_member|member|non_variadic|variadic +# include BOOST_PP_ASSIGN_SLOT(1) + + BOOST_STATIC_CONSTANT(bits_t, value = ( + (::boost::function_types::detail::bits::value & BOOST_FT_default_cc) + | (::boost::function_types::detail::bits::value & BOOST_PP_SLOT(1)) + )); + }; + + template struct default_cc_tag; + + template struct retag_default_cc + : detail::compound_tag + < Tag, detail::default_cc_tag< + ::boost::function_types::detail::selector_bits::value > > + { }; + + template struct default_cc_tag + { + typedef null_tag::bits bits; + typedef null_tag::mask mask; + }; + + class test_class; + typedef constant cc_mask_constant; + +# define BOOST_FT_self \ + + +# define default_cc_ BOOST_FT_default_cc + +# define BOOST_PP_VALUE default_cc_|non_member|non_variadic +# define BOOST_FT_tester void (*tester)() +# define BOOST_PP_INDIRECT_SELF BOOST_FT_self +# include BOOST_PP_INCLUDE_SELF() + +# define BOOST_PP_VALUE default_cc_|non_member|variadic +# define BOOST_FT_tester void (*tester)(...) +# define BOOST_PP_INDIRECT_SELF BOOST_FT_self +# include BOOST_PP_INCLUDE_SELF() + +# define BOOST_PP_VALUE default_cc_|member|non_variadic +# define BOOST_FT_tester void (test_class::*tester)() +# define BOOST_PP_INDIRECT_SELF BOOST_FT_self +# include BOOST_PP_INCLUDE_SELF() + +# define BOOST_PP_VALUE default_cc_|member|variadic +# define BOOST_FT_tester void (test_class::*tester)(...) +# define BOOST_PP_INDIRECT_SELF BOOST_FT_self +# include BOOST_PP_INCLUDE_SELF() + +# undef default_cc_ + +# undef BOOST_FT_self + +} } } // namespace ::boost::function_types::detail + +# include +# include + +#else // if defined(BOOST_PP_VALUE) + +# include BOOST_PP_ASSIGN_SLOT(1) + + template<> struct default_cc_tag + { + typedef BOOST_FT_tester; + typedef mpl::bitand_::bits,cc_mask_constant> bits; + typedef cc_mask_constant mask; + }; + +# undef BOOST_FT_tester + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp new file mode 100644 index 0000000000..72666d0f27 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp @@ -0,0 +1,59 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is guarded externally + +// this file has been generated from the master.hpp file in the same directory +namespace boost { namespace function_types { +namespace detail +{ +template struct selector_bits +{ +BOOST_STATIC_CONSTANT(bits_t, value = ( +(::boost::function_types::detail::bits ::value & 0x00008000) +| (::boost::function_types::detail::bits ::value & 802) +)); +}; +template struct default_cc_tag; +template struct retag_default_cc +: detail::compound_tag +< Tag, detail::default_cc_tag< +::boost::function_types::detail::selector_bits ::value > > +{ }; +template struct default_cc_tag +{ +typedef null_tag::bits bits; +typedef null_tag::mask mask; +}; +class test_class; +typedef constant<0x00ff8000> cc_mask_constant; +template< > struct default_cc_tag<33282> +{ +typedef void ( *tester)(); +typedef mpl::bitand_ ::bits,cc_mask_constant> bits; +typedef cc_mask_constant mask; +}; +template< > struct default_cc_tag<33026> +{ +typedef void ( *tester)( ... ); +typedef mpl::bitand_ ::bits,cc_mask_constant> bits; +typedef cc_mask_constant mask; +}; +template< > struct default_cc_tag<33312> +{ +typedef void (test_class:: *tester)(); +typedef mpl::bitand_ ::bits,cc_mask_constant> bits; +typedef cc_mask_constant mask; +}; +template< > struct default_cc_tag<33056> +{ +typedef void (test_class:: *tester)( ... ); +typedef mpl::bitand_ ::bits,cc_mask_constant> bits; +typedef cc_mask_constant mask; +}; +} } } diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/cc_tag.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/cc_tag.hpp new file mode 100644 index 0000000000..81f1d89e74 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/cc_tag.hpp @@ -0,0 +1,17 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusions + + struct BOOST_FT_cc_name + { + typedef detail::encode_bits<0,BOOST_FT_cc_id> bits; + typedef detail::constant mask; + }; + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/master.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/master.hpp new file mode 100644 index 0000000000..9cce212fcd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/master.hpp @@ -0,0 +1,126 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is guarded externally + +#ifdef __WAVE__ +// this file has been generated from the master.hpp file in the same directory +# pragma wave option(preserve: 0) +#endif + +#if !defined(BOOST_FT_PREPROCESSING_MODE) || defined(BOOST_FT_CONFIG_HPP_INCLUDED) +# error "this file used with two-pass preprocessing, only" +#endif + +#include +#include + +namespace boost { namespace function_types { + +typedef detail::property_tag non_variadic; +typedef detail::property_tag variadic; + +typedef detail::property_tag<0,BOOST_FT_const> non_const; +typedef detail::property_tag const_qualified; + +typedef detail::property_tag<0,BOOST_FT_volatile> non_volatile; +typedef detail::property_tag volatile_qualified; + +typedef detail::property_tag default_cc; + +#define BOOST_PP_VALUE BOOST_FT_const|BOOST_FT_volatile +#include BOOST_PP_ASSIGN_SLOT(1) + +typedef detail::property_tag<0 , BOOST_PP_SLOT(1)> non_cv; +typedef detail::property_tag const_non_volatile; +typedef detail::property_tag volatile_non_const; +typedef detail::property_tag cv_qualified; + +namespace detail { + + typedef constant full_mask; + + template struct encode_bits_impl + { + BOOST_STATIC_CONSTANT( bits_t, value = + Flags | (BOOST_FT_default_cc * CCID) << 1 ); + }; + + template + struct encode_charr_impl + { + BOOST_STATIC_CONSTANT(std::size_t, value = (std::size_t)(1+ + Flags | (BOOST_FT_default_cc * CCID) << 1 | Arity << BOOST_FT_arity_shift + )); + }; + + template struct decode_bits + { + BOOST_STATIC_CONSTANT(bits_t, flags = Bits & BOOST_FT_flags_mask); + + BOOST_STATIC_CONSTANT(bits_t, cc_id = + ( (Bits & BOOST_FT_full_mask) / BOOST_FT_default_cc) >> 1 + ); + + BOOST_STATIC_CONSTANT(bits_t, tag_bits = (Bits & BOOST_FT_full_mask)); + + BOOST_STATIC_CONSTANT(std::size_t, arity = (std::size_t) + (Bits >> BOOST_FT_arity_shift) + ); + }; + + template + struct tag_ice + { + BOOST_STATIC_CONSTANT(bool, match = + RHS_bits == (LHS_bits & RHS_mask & (RHS_bits |~BOOST_FT_type_mask)) + ); + + BOOST_STATIC_CONSTANT(bits_t, combined_bits = + (LHS_bits & ~RHS_mask) | RHS_bits + ); + + BOOST_STATIC_CONSTANT(bits_t, combined_mask = + LHS_mask | RHS_mask + ); + + BOOST_STATIC_CONSTANT(bits_t, extracted_bits = + LHS_bits & RHS_mask + ); + + }; + +#define BOOST_FT_mask BOOST_FT_type_mask + typedef property_tag callable_builtin_tag; + typedef property_tag nonmember_callable_builtin_tag; + typedef property_tag function_tag; + typedef property_tag reference_tag; + typedef property_tag pointer_tag; + typedef property_tag member_function_pointer_tag; + typedef property_tag member_object_pointer_tag; + typedef property_tag member_object_pointer_base; + typedef property_tag member_pointer_tag; +#undef BOOST_FT_mask + +#define BOOST_PP_VALUE BOOST_FT_function|BOOST_FT_non_variadic|BOOST_FT_default_cc +#include BOOST_PP_ASSIGN_SLOT(1) +#define BOOST_PP_VALUE BOOST_FT_type_mask|BOOST_FT_variadic_mask|BOOST_FT_cc_mask +#include BOOST_PP_ASSIGN_SLOT(2) + + typedef property_tag< BOOST_PP_SLOT(1) , BOOST_PP_SLOT(2) > nv_dcc_func; + +#define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_non_variadic|BOOST_FT_default_cc +#include BOOST_PP_ASSIGN_SLOT(1) + + typedef property_tag< BOOST_PP_SLOT(1) , BOOST_PP_SLOT(2) > nv_dcc_mfp; + +} // namespace detail + +} } // namespace ::boost::function_types + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/preprocessed.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/preprocessed.hpp new file mode 100644 index 0000000000..823c3cc1cd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_tags/preprocessed.hpp @@ -0,0 +1,77 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is guarded externally + +// this file has been generated from the master.hpp file in the same directory +namespace boost { namespace function_types { +typedef detail::property_tag<0x00000200,0x00000300> non_variadic; +typedef detail::property_tag<0x00000100,0x00000300> variadic; +typedef detail::property_tag<0,0x00000400> non_const; +typedef detail::property_tag<0x00000400,0x00000400> const_qualified; +typedef detail::property_tag<0,0x00000800> non_volatile; +typedef detail::property_tag<0x00000800,0x00000800> volatile_qualified; +typedef detail::property_tag<0x00008000,0x00ff8000> default_cc; +typedef detail::property_tag<0 , 3072> non_cv; +typedef detail::property_tag<0x00000400 , 3072> const_non_volatile; +typedef detail::property_tag<0x00000800, 3072> volatile_non_const; +typedef detail::property_tag<3072 , 3072> cv_qualified; +namespace detail { +typedef constant<0x00ff0fff> full_mask; +template struct encode_bits_impl +{ +BOOST_STATIC_CONSTANT( bits_t, value = +Flags | (0x00008000 * CCID) << 1 ); +}; +template +struct encode_charr_impl +{ +BOOST_STATIC_CONSTANT(std::size_t, value = (std::size_t)(1+ +Flags | (0x00008000 * CCID) << 1 | Arity << 24 +)); +}; +template struct decode_bits +{ +BOOST_STATIC_CONSTANT(bits_t, flags = Bits & 0x00000fff); +BOOST_STATIC_CONSTANT(bits_t, cc_id = +( (Bits & 0x00ff0fff) / 0x00008000) >> 1 +); +BOOST_STATIC_CONSTANT(bits_t, tag_bits = (Bits & 0x00ff0fff)); +BOOST_STATIC_CONSTANT(std::size_t, arity = (std::size_t) +(Bits >> 24) +); +}; +template +struct tag_ice +{ +BOOST_STATIC_CONSTANT(bool, match = +RHS_bits == (LHS_bits & RHS_mask & (RHS_bits | ~0x000000ff)) +); +BOOST_STATIC_CONSTANT(bits_t, combined_bits = +(LHS_bits & ~RHS_mask) | RHS_bits +); +BOOST_STATIC_CONSTANT(bits_t, combined_mask = +LHS_mask | RHS_mask +); +BOOST_STATIC_CONSTANT(bits_t, extracted_bits = +LHS_bits & RHS_mask +); +}; +typedef property_tag<0x00000001,0x000000ff> callable_builtin_tag; +typedef property_tag<0x00000003,0x000000ff> nonmember_callable_builtin_tag; +typedef property_tag<0x00000007,0x000000ff> function_tag; +typedef property_tag<0x00000013,0x000000ff> reference_tag; +typedef property_tag<0x0000000b,0x000000ff> pointer_tag; +typedef property_tag<0x00000061,0x000000ff> member_function_pointer_tag; +typedef property_tag<0x000000a3,0x000000ff> member_object_pointer_tag; +typedef property_tag<0x000002a3,0x00ff0fff> member_object_pointer_base; +typedef property_tag<0x00000020,0x000000ff> member_pointer_tag; +typedef property_tag< 33287 , 16745471 > nv_dcc_func; +typedef property_tag< 33377 , 16745471 > nv_dcc_mfp; +} +} } diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_variate_loop/master.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_variate_loop/master.hpp new file mode 100644 index 0000000000..50263429d7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_variate_loop/master.hpp @@ -0,0 +1,152 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifdef __WAVE__ +// this file has been generated from the master.hpp file in the same directory +# pragma wave option(preserve: 0) +#endif + +#if !defined(BOOST_FT_PREPROCESSING_MODE) +# error "this file is only for two-pass preprocessing" +#endif + +#if !defined(BOOST_PP_VALUE) +# include +# include +# include +# include + +BOOST_PP_EXPAND(#) define BOOST_FT_mfp 0 +BOOST_PP_EXPAND(#) define BOOST_FT_syntax BOOST_FT_type_function + +# define BOOST_PP_VALUE \ + BOOST_FT_function|BOOST_FT_non_variadic +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_function|BOOST_FT_variadic +# include __FILE__ + +BOOST_PP_EXPAND(#) if !BOOST_FT_NO_CV_FUNC_SUPPORT +# define BOOST_PP_VALUE \ + BOOST_FT_function|BOOST_FT_non_variadic|BOOST_FT_const +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_function|BOOST_FT_variadic|BOOST_FT_const +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_function|BOOST_FT_non_variadic|BOOST_FT_volatile +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_function|BOOST_FT_variadic|BOOST_FT_volatile +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_function|BOOST_FT_non_variadic|BOOST_FT_const|BOOST_FT_volatile +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_function|BOOST_FT_variadic|BOOST_FT_const|BOOST_FT_volatile +# include __FILE__ +BOOST_PP_EXPAND(#) endif + + +BOOST_PP_EXPAND(#) undef BOOST_FT_syntax +BOOST_PP_EXPAND(#) define BOOST_FT_syntax BOOST_FT_type_function_pointer + +# define BOOST_PP_VALUE \ + BOOST_FT_pointer|BOOST_FT_non_variadic +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_pointer|BOOST_FT_variadic +# include __FILE__ + +BOOST_PP_EXPAND(#) undef BOOST_FT_syntax +BOOST_PP_EXPAND(#) define BOOST_FT_syntax BOOST_FT_type_function_reference + +# define BOOST_PP_VALUE \ + BOOST_FT_reference|BOOST_FT_non_variadic +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_reference|BOOST_FT_variadic +# include __FILE__ + +BOOST_PP_EXPAND(#) undef BOOST_FT_syntax +BOOST_PP_EXPAND(#) undef BOOST_FT_mfp + +BOOST_PP_EXPAND(#) define BOOST_FT_mfp 1 +BOOST_PP_EXPAND(#) define BOOST_FT_syntax BOOST_FT_type_member_function_pointer + +# define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_non_variadic +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_variadic +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_non_variadic|BOOST_FT_const +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_variadic|BOOST_FT_const +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_non_variadic|BOOST_FT_volatile +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_variadic|BOOST_FT_volatile +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_non_variadic|BOOST_FT_const|BOOST_FT_volatile +# include __FILE__ +# define BOOST_PP_VALUE \ + BOOST_FT_member_function_pointer|BOOST_FT_variadic|BOOST_FT_const|BOOST_FT_volatile +# include __FILE__ + +BOOST_PP_EXPAND(#) undef BOOST_FT_syntax +BOOST_PP_EXPAND(#) undef BOOST_FT_mfp + +# include +#else + +# include BOOST_PP_ASSIGN_SLOT(1) + +# define BOOST_PP_VALUE BOOST_PP_SLOT(1) & BOOST_FT_kind_mask +# include BOOST_PP_ASSIGN_SLOT(2) + +BOOST_PP_EXPAND(#) if !!(BOOST_PP_SLOT(2) & (BOOST_FT_variations)) +BOOST_PP_EXPAND(#) if (BOOST_PP_SLOT(1) & (BOOST_FT_cond)) == (BOOST_FT_cond) + +# if ( BOOST_PP_SLOT(1) & (BOOST_FT_variadic) ) +BOOST_PP_EXPAND(#) define BOOST_FT_ell ... +BOOST_PP_EXPAND(#) define BOOST_FT_nullary_param +# else +BOOST_PP_EXPAND(#) define BOOST_FT_ell +BOOST_PP_EXPAND(#) define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# endif + +# if !( BOOST_PP_SLOT(1) & (BOOST_FT_volatile) ) +# if !( BOOST_PP_SLOT(1) & (BOOST_FT_const) ) +BOOST_PP_EXPAND(#) define BOOST_FT_cv +# else +BOOST_PP_EXPAND(#) define BOOST_FT_cv const +# endif +# else +# if !( BOOST_PP_SLOT(1) & (BOOST_FT_const) ) +BOOST_PP_EXPAND(#) define BOOST_FT_cv volatile +# else +BOOST_PP_EXPAND(#) define BOOST_FT_cv const volatile +# endif +# endif +BOOST_PP_EXPAND(#) define BOOST_FT_flags BOOST_PP_SLOT(1) +BOOST_PP_EXPAND(#) include BOOST_FT_variate_file + +BOOST_PP_EXPAND(#) undef BOOST_FT_cv +BOOST_PP_EXPAND(#) undef BOOST_FT_ell +BOOST_PP_EXPAND(#) undef BOOST_FT_nullary_param +BOOST_PP_EXPAND(#) undef BOOST_FT_flags +BOOST_PP_EXPAND(#) endif +BOOST_PP_EXPAND(#) endif +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp new file mode 100644 index 0000000000..7e7c4f91fa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp @@ -0,0 +1,283 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// this file has been generated from the master.hpp file in the same directory +# define BOOST_FT_mfp 0 +# define BOOST_FT_syntax BOOST_FT_type_function +# if ! ! (4 & (BOOST_FT_variations)) +# if (519 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv +# define BOOST_FT_flags 519 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (4 & (BOOST_FT_variations)) +# if (263 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv +# define BOOST_FT_flags 263 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if !BOOST_FT_NO_CV_FUNC_SUPPORT +# if ! ! (4 & (BOOST_FT_variations)) +# if (1543 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv const +# define BOOST_FT_flags 1543 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (4 & (BOOST_FT_variations)) +# if (1287 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv const +# define BOOST_FT_flags 1287 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (4 & (BOOST_FT_variations)) +# if (2567 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv volatile +# define BOOST_FT_flags 2567 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (4 & (BOOST_FT_variations)) +# if (2311 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv volatile +# define BOOST_FT_flags 2311 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (4 & (BOOST_FT_variations)) +# if (3591 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv const volatile +# define BOOST_FT_flags 3591 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (4 & (BOOST_FT_variations)) +# if (3335 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv const volatile +# define BOOST_FT_flags 3335 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# endif +# undef BOOST_FT_syntax +# define BOOST_FT_syntax BOOST_FT_type_function_pointer +# if ! ! (8 & (BOOST_FT_variations)) +# if (523 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv +# define BOOST_FT_flags 523 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (8 & (BOOST_FT_variations)) +# if (267 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv +# define BOOST_FT_flags 267 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# undef BOOST_FT_syntax +# define BOOST_FT_syntax BOOST_FT_type_function_reference +# if ! ! (16 & (BOOST_FT_variations)) +# if (531 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv +# define BOOST_FT_flags 531 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (16 & (BOOST_FT_variations)) +# if (275 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv +# define BOOST_FT_flags 275 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# undef BOOST_FT_syntax +# undef BOOST_FT_mfp +# define BOOST_FT_mfp 1 +# define BOOST_FT_syntax BOOST_FT_type_member_function_pointer +# if ! ! (96 & (BOOST_FT_variations)) +# if (609 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv +# define BOOST_FT_flags 609 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (96 & (BOOST_FT_variations)) +# if (353 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv +# define BOOST_FT_flags 353 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (96 & (BOOST_FT_variations)) +# if (1633 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv const +# define BOOST_FT_flags 1633 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (96 & (BOOST_FT_variations)) +# if (1377 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv const +# define BOOST_FT_flags 1377 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (96 & (BOOST_FT_variations)) +# if (2657 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv volatile +# define BOOST_FT_flags 2657 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (96 & (BOOST_FT_variations)) +# if (2401 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv volatile +# define BOOST_FT_flags 2401 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (96 & (BOOST_FT_variations)) +# if (3681 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell +# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM +# define BOOST_FT_cv const volatile +# define BOOST_FT_flags 3681 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# if ! ! (96 & (BOOST_FT_variations)) +# if (3425 & (BOOST_FT_cond)) == (BOOST_FT_cond) +# define BOOST_FT_ell ... +# define BOOST_FT_nullary_param +# define BOOST_FT_cv const volatile +# define BOOST_FT_flags 3425 +# include BOOST_FT_variate_file +# undef BOOST_FT_cv +# undef BOOST_FT_ell +# undef BOOST_FT_nullary_param +# undef BOOST_FT_flags +# endif +# endif +# undef BOOST_FT_syntax +# undef BOOST_FT_mfp diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/retag_default_cc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/retag_default_cc.hpp new file mode 100644 index 0000000000..c8926f6dfc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/retag_default_cc.hpp @@ -0,0 +1,23 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_DETAIL_RETAG_DEFAULT_CC_HPP_INCLUDED +#define BOOST_FT_DETAIL_RETAG_DEFAULT_CC_HPP_INCLUDED + +#include + +#include + +#if defined(BOOST_FT_PREPROCESSING_MODE) +# include +#else +# include +#endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize.hpp new file mode 100644 index 0000000000..0b15cbbed2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize.hpp @@ -0,0 +1,79 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_DETAIL_SYNTHESIZE_HPP_INCLUDED +#define BOOST_FT_DETAIL_SYNTHESIZE_HPP_INCLUDED + +#include + +#include +#include + +#include +#include +#include +#include + +namespace boost { namespace function_types { namespace detail { + +template +struct synthesize_impl_o +{ + template struct synthesize_impl_i { }; +}; + +template +struct synthesize_impl + : detail::synthesize_impl_o + < ::boost::function_types::detail::decode_bits::flags + , ::boost::function_types::detail::decode_bits::cc_id + , ::boost::mpl::size::value + > + ::template synthesize_impl_i +{ }; + +template +struct synthesize_func + : detail::synthesize_impl + < Seq + , ::boost::function_types::detail::bits + < detail::retag_default_cc + < function_types::tag > + >::value + > +{ }; + +template +struct synthesize_mfp + : detail::synthesize_impl + < Seq + , ::boost::function_types::detail::bits + < detail::retag_default_cc + < function_types::tag + < typename detail::cv_traits< typename mpl::at_c::type >::tag + , nv_dcc_mfp, Tag + > > + >::value + > +{ }; + +template::type, + typename C = typename mpl::at_c::type> +struct synthesize_mop +{ + typedef R C::* type; +}; + +#define BOOST_FT_variations BOOST_FT_function|BOOST_FT_member_pointer +#define BOOST_FT_al_path boost/function_types/detail/synthesize_impl +#include + +} } } // namespace ::boost::function_types::detail + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity10_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity10_0.hpp new file mode 100644 index 0000000000..ad22e5047a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity10_0.hpp @@ -0,0 +1,334 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,0) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (BOOST_FT_nullary_param BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 1 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,0) +< typename mpl::deref< iter_0 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,1) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 2 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,1) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,2) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 3 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,2) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,3) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 4 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,3) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,4) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 5 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,4) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,5) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 6 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,5) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,6) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 7 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,6) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,7) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 8 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,7) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,8) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 9 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,8) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,9) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 10 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,9) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,10) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 11 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,10) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity10_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity10_1.hpp new file mode 100644 index 0000000000..bbd5963fa0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity10_1.hpp @@ -0,0 +1,326 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,1) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) ( BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 2 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,1) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,2) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 3 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,2) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,3) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 4 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,3) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,4) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 5 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,4) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,5) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 6 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,5) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,6) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 7 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,6) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,7) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 8 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,7) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,8) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 9 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,8) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,9) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 10 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,9) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,10) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 11 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,10) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity20_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity20_0.hpp new file mode 100644 index 0000000000..cb62e69115 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity20_0.hpp @@ -0,0 +1,517 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,11) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 12 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,11) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,12) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 13 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,12) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,13) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 14 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,13) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,14) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 15 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,14) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,15) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 16 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,15) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,16) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 17 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,16) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,17) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 18 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,17) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,18) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 19 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,18) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,19) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 20 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,19) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,20) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 21 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,20) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity20_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity20_1.hpp new file mode 100644 index 0000000000..1c5e1e747c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity20_1.hpp @@ -0,0 +1,527 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,11) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 12 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,11) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,12) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 13 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,12) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,13) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 14 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,13) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,14) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 15 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,14) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,15) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 16 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,15) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,16) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 17 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,16) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,17) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 18 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,17) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,18) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 19 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,18) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,19) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 20 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,19) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,20) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 21 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,20) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity30_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity30_0.hpp new file mode 100644 index 0000000000..63a64f0df5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity30_0.hpp @@ -0,0 +1,717 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,21) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 22 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,21) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,22) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 23 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,22) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,23) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 24 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,23) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,24) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 25 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,24) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,25) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 26 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,25) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,26) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 27 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,26) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,27) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 28 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,27) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,28) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 29 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,28) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,29) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 30 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,29) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,30) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 31 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,30) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity30_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity30_1.hpp new file mode 100644 index 0000000000..6cba73ea9a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity30_1.hpp @@ -0,0 +1,727 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,21) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 22 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,21) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,22) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 23 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,22) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,23) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 24 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,23) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,24) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 25 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,24) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,25) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 26 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,25) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,26) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 27 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,26) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,27) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 28 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,27) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,28) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 29 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,28) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,29) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 30 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,29) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,30) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 31 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,30) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity40_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity40_0.hpp new file mode 100644 index 0000000000..b065757024 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity40_0.hpp @@ -0,0 +1,917 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,31) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 32 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,31) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,32) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 33 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,32) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,33) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 34 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,33) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,34) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 35 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,34) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,35) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 36 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,35) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,36) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 37 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,36) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,37) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 38 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,37) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,38) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 39 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,38) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,39) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 40 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,39) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,40) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 41 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,40) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity40_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity40_1.hpp new file mode 100644 index 0000000000..c9f21941b8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity40_1.hpp @@ -0,0 +1,927 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,31) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 32 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,31) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,32) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 33 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,32) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,33) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 34 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,33) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,34) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 35 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,34) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,35) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 36 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,35) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,36) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 37 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,36) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,37) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 38 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,37) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,38) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 39 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,38) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,39) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 40 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,39) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,40) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 41 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,40) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity50_0.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity50_0.hpp new file mode 100644 index 0000000000..b1ad7b14c2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity50_0.hpp @@ -0,0 +1,1117 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,41) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 42 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,41) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,42) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 43 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,42) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,43) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 44 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,43) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,44) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 45 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,44) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,45) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 46 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,45) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,46) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 47 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,46) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,47) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 48 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +typedef typename mpl::next< iter_46 > ::type iter_47; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,47) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +, typename mpl::deref< iter_47 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,48) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 49 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +typedef typename mpl::next< iter_46 > ::type iter_47; +typedef typename mpl::next< iter_47 > ::type iter_48; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,48) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +, typename mpl::deref< iter_47 > ::type +, typename mpl::deref< iter_48 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,49) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 50 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +typedef typename mpl::next< iter_46 > ::type iter_47; +typedef typename mpl::next< iter_47 > ::type iter_48; +typedef typename mpl::next< iter_48 > ::type iter_49; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,49) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +, typename mpl::deref< iter_47 > ::type +, typename mpl::deref< iter_48 > ::type +, typename mpl::deref< iter_49 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,50) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 51 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +typedef typename mpl::next< iter_46 > ::type iter_47; +typedef typename mpl::next< iter_47 > ::type iter_48; +typedef typename mpl::next< iter_48 > ::type iter_49; +typedef typename mpl::next< iter_49 > ::type iter_50; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,50) +< typename mpl::deref< iter_0 > ::type +, typename mpl::deref< iter_1 > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +, typename mpl::deref< iter_47 > ::type +, typename mpl::deref< iter_48 > ::type +, typename mpl::deref< iter_49 > ::type +, typename mpl::deref< iter_50 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity50_1.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity50_1.hpp new file mode 100644 index 0000000000..2915c412d7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/arity50_1.hpp @@ -0,0 +1,1127 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +// input: BOOST_FT_syntax type macro to use +// input: BOOST_FT_cc empty or cc specifier +// input: BOOST_FT_ell empty or "..." +// input: BOOST_FT_cv empty or cv qualifiers +// input: BOOST_FT_flags single decimal integer encoding the flags +// output: BOOST_FT_n number of component types (arity+1) +// output: BOOST_FT_arity current arity +// output: BOOST_FT_type macro that expands to the type +// output: BOOST_FT_tplargs(p) template arguments with given prefix +// output: BOOST_FT_params(p) parameters with given prefix + +# include +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,41) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 42 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,41) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,42) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 43 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,42) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,43) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 44 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,43) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,44) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 45 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,44) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,45) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 46 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,45) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,46) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 47 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,46) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,47) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 48 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +typedef typename mpl::next< iter_46 > ::type iter_47; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,47) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +, typename mpl::deref< iter_47 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,48) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 49 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +typedef typename mpl::next< iter_46 > ::type iter_47; +typedef typename mpl::next< iter_47 > ::type iter_48; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,48) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +, typename mpl::deref< iter_47 > ::type +, typename mpl::deref< iter_48 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,49) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 50 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +typedef typename mpl::next< iter_46 > ::type iter_47; +typedef typename mpl::next< iter_47 > ::type iter_48; +typedef typename mpl::next< iter_48 > ::type iter_49; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,49) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +, typename mpl::deref< iter_47 > ::type +, typename mpl::deref< iter_48 > ::type +, typename mpl::deref< iter_49 > ::type +> ::type type; +}; +}; +template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49 > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,50) +{ +typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49 BOOST_FT_ell) BOOST_FT_cv ; +}; +template< > +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 51 > +{ +template struct synthesize_impl_i +{ +private: +typedef typename mpl::begin ::type iter_0; +typedef typename mpl::next< iter_0 > ::type iter_1; +typedef typename mpl::next< iter_1 > ::type iter_2; +typedef typename mpl::next< iter_2 > ::type iter_3; +typedef typename mpl::next< iter_3 > ::type iter_4; +typedef typename mpl::next< iter_4 > ::type iter_5; +typedef typename mpl::next< iter_5 > ::type iter_6; +typedef typename mpl::next< iter_6 > ::type iter_7; +typedef typename mpl::next< iter_7 > ::type iter_8; +typedef typename mpl::next< iter_8 > ::type iter_9; +typedef typename mpl::next< iter_9 > ::type iter_10; +typedef typename mpl::next< iter_10 > ::type iter_11; +typedef typename mpl::next< iter_11 > ::type iter_12; +typedef typename mpl::next< iter_12 > ::type iter_13; +typedef typename mpl::next< iter_13 > ::type iter_14; +typedef typename mpl::next< iter_14 > ::type iter_15; +typedef typename mpl::next< iter_15 > ::type iter_16; +typedef typename mpl::next< iter_16 > ::type iter_17; +typedef typename mpl::next< iter_17 > ::type iter_18; +typedef typename mpl::next< iter_18 > ::type iter_19; +typedef typename mpl::next< iter_19 > ::type iter_20; +typedef typename mpl::next< iter_20 > ::type iter_21; +typedef typename mpl::next< iter_21 > ::type iter_22; +typedef typename mpl::next< iter_22 > ::type iter_23; +typedef typename mpl::next< iter_23 > ::type iter_24; +typedef typename mpl::next< iter_24 > ::type iter_25; +typedef typename mpl::next< iter_25 > ::type iter_26; +typedef typename mpl::next< iter_26 > ::type iter_27; +typedef typename mpl::next< iter_27 > ::type iter_28; +typedef typename mpl::next< iter_28 > ::type iter_29; +typedef typename mpl::next< iter_29 > ::type iter_30; +typedef typename mpl::next< iter_30 > ::type iter_31; +typedef typename mpl::next< iter_31 > ::type iter_32; +typedef typename mpl::next< iter_32 > ::type iter_33; +typedef typename mpl::next< iter_33 > ::type iter_34; +typedef typename mpl::next< iter_34 > ::type iter_35; +typedef typename mpl::next< iter_35 > ::type iter_36; +typedef typename mpl::next< iter_36 > ::type iter_37; +typedef typename mpl::next< iter_37 > ::type iter_38; +typedef typename mpl::next< iter_38 > ::type iter_39; +typedef typename mpl::next< iter_39 > ::type iter_40; +typedef typename mpl::next< iter_40 > ::type iter_41; +typedef typename mpl::next< iter_41 > ::type iter_42; +typedef typename mpl::next< iter_42 > ::type iter_43; +typedef typename mpl::next< iter_43 > ::type iter_44; +typedef typename mpl::next< iter_44 > ::type iter_45; +typedef typename mpl::next< iter_45 > ::type iter_46; +typedef typename mpl::next< iter_46 > ::type iter_47; +typedef typename mpl::next< iter_47 > ::type iter_48; +typedef typename mpl::next< iter_48 > ::type iter_49; +typedef typename mpl::next< iter_49 > ::type iter_50; +public: +typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,50) +< typename mpl::deref< iter_0 > ::type +, typename detail::cv_traits< +typename mpl::deref< iter_1 > ::type > ::type +, typename mpl::deref< iter_2 > ::type +, typename mpl::deref< iter_3 > ::type +, typename mpl::deref< iter_4 > ::type +, typename mpl::deref< iter_5 > ::type +, typename mpl::deref< iter_6 > ::type +, typename mpl::deref< iter_7 > ::type +, typename mpl::deref< iter_8 > ::type +, typename mpl::deref< iter_9 > ::type +, typename mpl::deref< iter_10 > ::type +, typename mpl::deref< iter_11 > ::type +, typename mpl::deref< iter_12 > ::type +, typename mpl::deref< iter_13 > ::type +, typename mpl::deref< iter_14 > ::type +, typename mpl::deref< iter_15 > ::type +, typename mpl::deref< iter_16 > ::type +, typename mpl::deref< iter_17 > ::type +, typename mpl::deref< iter_18 > ::type +, typename mpl::deref< iter_19 > ::type +, typename mpl::deref< iter_20 > ::type +, typename mpl::deref< iter_21 > ::type +, typename mpl::deref< iter_22 > ::type +, typename mpl::deref< iter_23 > ::type +, typename mpl::deref< iter_24 > ::type +, typename mpl::deref< iter_25 > ::type +, typename mpl::deref< iter_26 > ::type +, typename mpl::deref< iter_27 > ::type +, typename mpl::deref< iter_28 > ::type +, typename mpl::deref< iter_29 > ::type +, typename mpl::deref< iter_30 > ::type +, typename mpl::deref< iter_31 > ::type +, typename mpl::deref< iter_32 > ::type +, typename mpl::deref< iter_33 > ::type +, typename mpl::deref< iter_34 > ::type +, typename mpl::deref< iter_35 > ::type +, typename mpl::deref< iter_36 > ::type +, typename mpl::deref< iter_37 > ::type +, typename mpl::deref< iter_38 > ::type +, typename mpl::deref< iter_39 > ::type +, typename mpl::deref< iter_40 > ::type +, typename mpl::deref< iter_41 > ::type +, typename mpl::deref< iter_42 > ::type +, typename mpl::deref< iter_43 > ::type +, typename mpl::deref< iter_44 > ::type +, typename mpl::deref< iter_45 > ::type +, typename mpl::deref< iter_46 > ::type +, typename mpl::deref< iter_47 > ::type +, typename mpl::deref< iter_48 > ::type +, typename mpl::deref< iter_49 > ::type +, typename mpl::deref< iter_50 > ::type +> ::type type; +}; +}; +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/master.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/master.hpp new file mode 100644 index 0000000000..49d38ef4d4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/synthesize_impl/master.hpp @@ -0,0 +1,87 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +// no include guards, this file is intended for multiple inclusion + +#if BOOST_FT_ARITY_LOOP_PREFIX + +# ifndef BOOST_FT_DETAIL_SYNTHESIZE_IMPL_MASTER_HPP_INCLUDED +# define BOOST_FT_DETAIL_SYNTHESIZE_IMPL_MASTER_HPP_INCLUDED +# include +# include +# include +# include +# include +# endif + +# define BOOST_FT_type_name type + +# ifdef BOOST_FT_flags +# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +# else +BOOST_PP_EXPAND(#) define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity) +BOOST_PP_EXPAND(#) define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity +# endif + +# define BOOST_FT_iter(i) BOOST_PP_CAT(iter_,i) + +#elif BOOST_FT_ARITY_LOOP_IS_ITERATING + +template< BOOST_FT_tplargs(BOOST_PP_IDENTITY(typename)) > +struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,BOOST_FT_arity) +{ + typedef BOOST_FT_type ; +}; + +template<> +struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, BOOST_FT_n > +{ + template struct synthesize_impl_i + { + private: + typedef typename mpl::begin::type BOOST_FT_iter(0); +# if BOOST_FT_n > 1 +# define BOOST_PP_LOCAL_MACRO(i) typedef typename mpl::next< \ + BOOST_FT_iter(BOOST_PP_DEC(i)) >::type BOOST_FT_iter(i); +# define BOOST_PP_LOCAL_LIMITS (1,BOOST_FT_n-1) +# include BOOST_PP_LOCAL_ITERATE() +# endif + public: + typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,BOOST_FT_arity) + < typename mpl::deref< BOOST_FT_iter(0) >::type +# if BOOST_FT_mfp + , typename detail::cv_traits< + typename mpl::deref< BOOST_FT_iter(1) >::type >::type +# endif +# if BOOST_FT_n > (BOOST_FT_mfp+1) +# define BOOST_PP_LOCAL_LIMITS (BOOST_FT_mfp+1,BOOST_FT_n-1) +# define BOOST_PP_LOCAL_MACRO(i) \ + , typename mpl::deref< BOOST_FT_iter(i) >::type +# include BOOST_PP_LOCAL_ITERATE() +# endif + >::type type; + }; +}; + +#elif BOOST_FT_ARITY_LOOP_SUFFIX + +# ifdef BOOST_FT_flags +# undef BOOST_FT_make_type +# undef BOOST_FT_make_type_impl +# else +BOOST_PP_EXPAND(#) undef BOOST_FT_make_type +BOOST_PP_EXPAND(#) undef BOOST_FT_make_type_impl +# endif +# undef BOOST_FT_iter +# undef BOOST_FT_type_name + +#else +# error "attempt to use arity loop master file without loop" +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/to_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/to_sequence.hpp new file mode 100644 index 0000000000..828acd9af2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/detail/to_sequence.hpp @@ -0,0 +1,47 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_DETAIL_TO_SEQUENCE_HPP_INCLUDED +#define BOOST_FT_DETAIL_TO_SEQUENCE_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#include + +namespace boost { namespace function_types { namespace detail { + +// wrap first arguments in components, if callable builtin type +template +struct to_sequence +{ + typedef typename + mpl::eval_if + < is_callable_builtin + , to_sequence< components > + , mpl::identity< T > + >::type + type; +}; + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +// reduce template instantiations, if possible +template +struct to_sequence< components > +{ + typedef typename components::types type; +}; +#endif + +} } } // namespace ::boost::function_types::detail + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_arity.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_arity.hpp new file mode 100644 index 0000000000..40f0f653cc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_arity.hpp @@ -0,0 +1,38 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_FUNCTION_ARITY_HPP_INCLUDED +#define BOOST_FT_FUNCTION_ARITY_HPP_INCLUDED + +#include +#include + +#include +#include + +#include +#include + +namespace boost +{ + namespace function_types + { + template struct function_arity + : mpl::if_ + < function_types::is_callable_builtin + , typename components::function_arity, boost::blank + >::type + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,function_arity,(T)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::function_arity) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_pointer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_pointer.hpp new file mode 100644 index 0000000000..a8b832f32b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_pointer.hpp @@ -0,0 +1,32 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_FUNCTION_POINTER_HPP_INCLUDED +#define BOOST_FT_FUNCTION_POINTER_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template struct function_pointer + { + typedef typename function_types::function_type::type * type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,function_pointer,(Types,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::function_pointer) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_reference.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_reference.hpp new file mode 100644 index 0000000000..5fe7e3cc8b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_reference.hpp @@ -0,0 +1,32 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_FUNCTION_REFERENCE_HPP_INCLUDED +#define BOOST_FT_FUNCTION_REFERENCE_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template struct function_reference + { + typedef typename function_types::function_type::type & type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,function_reference,(Types,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::function_reference) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_type.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_type.hpp new file mode 100644 index 0000000000..c3b2c96b94 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/function_type.hpp @@ -0,0 +1,29 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_FUNCTION_TYPE_HPP_INCLUDED +#define BOOST_FT_FUNCTION_TYPE_HPP_INCLUDED + +#include +#include + +namespace boost +{ + namespace function_types + { + template struct function_type + : detail::synthesize_func::type, Tag> + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,function_type,(Types,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::function_type) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_callable_builtin.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_callable_builtin.hpp new file mode 100644 index 0000000000..b1a7c833ba --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_callable_builtin.hpp @@ -0,0 +1,35 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_IS_CALLABLE_BUILTIN_HPP_INCLUDED +#define BOOST_FT_IS_CALLABLE_BUILTIN_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template< typename T, typename Tag = null_tag > + struct is_callable_builtin + : function_types::represents + < function_types::components + , function_types::tag + > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_callable_builtin,(T,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_callable_builtin) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function.hpp new file mode 100644 index 0000000000..d29229bb69 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function.hpp @@ -0,0 +1,34 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_IS_FUNCTION_HPP_INCLUDED +#define BOOST_FT_IS_FUNCTION_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template< typename T, typename Tag = null_tag > + struct is_function + : function_types::represents + < function_types::components + , function_types::tag + > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_function,(T,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_function) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function_pointer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function_pointer.hpp new file mode 100644 index 0000000000..5bff6d36d9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function_pointer.hpp @@ -0,0 +1,34 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_IS_FUNCTION_POINTER_HPP_INCLUDED +#define BOOST_FT_IS_FUNCTION_POINTER_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template< typename T, typename Tag = null_tag > + struct is_function_pointer + : function_types::represents + < function_types::components + , function_types::tag + > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_function_pointer,(T,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_function_pointer) +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function_reference.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function_reference.hpp new file mode 100644 index 0000000000..f2e4c1c605 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_function_reference.hpp @@ -0,0 +1,34 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_IS_FUNCTION_REFERENCE_HPP_INCLUDED +#define BOOST_FT_IS_FUNCTION_REFERENCE_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template< typename T, typename Tag = null_tag > + struct is_function_reference + : function_types::represents + < function_types::components + , function_types::tag > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_function_reference,(T,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_function_reference) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_function_pointer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_function_pointer.hpp new file mode 100644 index 0000000000..a51903520b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_function_pointer.hpp @@ -0,0 +1,33 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED +#define BOOST_FT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template< typename T, typename Tag = null_tag > + struct is_member_function_pointer + : function_types::represents + < function_types::components + , function_types::tag > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_member_function_pointer,(T,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_member_function_pointer) +} +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_object_pointer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_object_pointer.hpp new file mode 100644 index 0000000000..77527d9a3d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_object_pointer.hpp @@ -0,0 +1,34 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_IS_MEMBER_OBJECT_POINTER_HPP_INCLUDED +#define BOOST_FT_IS_MEMBER_OBJECT_POINTER_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template< typename T > + struct is_member_object_pointer + : function_types::detail::represents_impl + < function_types::components + , detail::member_object_pointer_tag > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_member_object_pointer,(T)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::is_member_object_pointer) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_pointer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_pointer.hpp new file mode 100644 index 0000000000..f53e0beb71 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_member_pointer.hpp @@ -0,0 +1,34 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_IS_MEMBER_POINTER_HPP_INCLUDED +#define BOOST_FT_IS_MEMBER_POINTER_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template< typename T, typename Tag = null_tag > + struct is_member_pointer + : function_types::represents + < function_types::components + , function_types::tag + > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_member_pointer,(T,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_member_pointer) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_nonmember_callable_builtin.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_nonmember_callable_builtin.hpp new file mode 100644 index 0000000000..3a27a2e7f7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/is_nonmember_callable_builtin.hpp @@ -0,0 +1,35 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_IS_NONMEMBER_CALLABLE_BUILTIN_HPP_INCLUDED +#define BOOST_FT_IS_NONMEMBER_CALLABLE_BUILTIN_HPP_INCLUDED + +#include +#include + +#include + +namespace boost +{ + namespace function_types + { + template< typename T, typename Tag = null_tag > + struct is_nonmember_callable_builtin + : function_types::represents + < function_types::components + , function_types::tag + > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_nonmember_callable_builtin,(T,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_nonmember_callable_builtin) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/member_function_pointer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/member_function_pointer.hpp new file mode 100644 index 0000000000..eab61118cb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/member_function_pointer.hpp @@ -0,0 +1,33 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_MEMBER_FUNCTION_POINTER_HPP_INCLUDED +#define BOOST_FT_MEMBER_FUNCTION_POINTER_HPP_INCLUDED + +#include +#include + +#include +#include + +namespace boost +{ + namespace function_types + { + template + struct member_function_pointer + : detail::synthesize_mfp< typename detail::to_sequence::type, Tag > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,member_function_pointer,(Types,Tag)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::member_function_pointer) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/member_object_pointer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/member_object_pointer.hpp new file mode 100644 index 0000000000..d0aa3f3418 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/member_object_pointer.hpp @@ -0,0 +1,34 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_MEMBER_OBJECT_POINTER_HPP_INCLUDED +#define BOOST_FT_MEMBER_OBJECT_POINTER_HPP_INCLUDED + +#include +#include + +#include +#include + +namespace boost +{ + namespace function_types + { + template + struct member_object_pointer + : detail::synthesize_mop< typename detail::to_sequence::type > + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,member_object_pointer,(Types)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::member_object_pointer) +} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/parameter_types.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/parameter_types.hpp new file mode 100644 index 0000000000..5e049bf59c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/parameter_types.hpp @@ -0,0 +1,55 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_PARAMETER_TYPES_HPP_INCLUDED +#define BOOST_FT_PARAMETER_TYPES_HPP_INCLUDED + +#include +#include + +#include +#include + +#include + +#include +#include + +namespace boost +{ + namespace function_types + { + using mpl::placeholders::_; + + template< typename T, typename ClassTypeTransform = add_reference<_> > + struct parameter_types; + + namespace detail + { + template + struct parameter_types_impl + : mpl::pop_front + < typename function_types::components::types + >::type + { }; + } + + template struct parameter_types + : mpl::if_ + < function_types::is_callable_builtin + , detail::parameter_types_impl, boost::blank + >::type + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,parameter_types,(T,ClassTypeTransform)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::parameter_types) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/property_tags.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/property_tags.hpp new file mode 100644 index 0000000000..bbc64d53a3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/property_tags.hpp @@ -0,0 +1,149 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_DETAIL_TAGS_HPP_INCLUDED +#define BOOST_FT_DETAIL_TAGS_HPP_INCLUDED + +#include + +#include +#include + + +namespace boost { namespace function_types { + +namespace detail +{ + typedef long bits_t; + + template struct constant + : boost::integral_constant + { }; + + template struct property_tag + { + typedef constant bits; + typedef constant mask; + }; + + template struct bits : T::bits { }; + template struct mask : T::mask { }; + + // forward declaration, defined in pp_tags + template struct encode_bits_impl; + + // forward declaration, defined in pp_tags + template + struct tag_ice; + + // forward declaration, defined in retag_default_cc + template struct retag_default_cc; + + template struct encode_bits + : constant< + ::boost::function_types::detail::encode_bits_impl::value + > + { }; + + template struct compound_tag + { + typedef constant< + ::boost::function_types::detail::tag_ice + < ::boost::function_types::detail::bits::value + , ::boost::function_types::detail::mask::value + , ::boost::function_types::detail::bits::value + , ::boost::function_types::detail::mask::value + >::combined_bits + > bits; + + typedef constant< + ::boost::function_types::detail::tag_ice + < ::boost::function_types::detail::bits::value + , ::boost::function_types::detail::mask::value + , ::boost::function_types::detail::bits::value + , ::boost::function_types::detail::mask::value + >::combined_mask + > mask; + }; + + template + struct changed_tag + : Base + { + typedef mpl::bitxor_ + + bits; + }; + + template struct represents_impl + : boost::integral_constant::value + , ::boost::function_types::detail::mask::value + , ::boost::function_types::detail::bits::value + , ::boost::function_types::detail::mask::value + >::match + > + { }; + +} // namespace detail + +typedef detail::property_tag<0,0> null_tag; + +template +struct tag + : detail::compound_tag< detail::compound_tag, + detail::compound_tag > +{ }; + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +template struct tag + : detail::compound_tag,Tag3> +{ }; +template struct tag + : detail::compound_tag +{ }; +template struct tag + : Tag1 +{ }; +#endif + + +template struct represents + : detail::represents_impl > +{ }; + + +template struct extract +{ + typedef detail::constant< + ::boost::function_types::detail::tag_ice + < ::boost::function_types::detail::bits::value + , ::boost::function_types::detail::mask::value + , ::boost::function_types::detail::bits::value + , ::boost::function_types::detail::mask::value + >::extracted_bits + > bits; + + typedef detail::constant< + ::boost::function_types::detail::mask::value + > mask; +}; + +} } // namespace ::boost::function_types + +#include + +namespace boost { namespace function_types { +#define BOOST_FT_cc_file +#include +} } // namespace boost::function_types + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/function_types/result_type.hpp b/deal.II/contrib/boost-1.45.0/include/boost/function_types/result_type.hpp new file mode 100644 index 0000000000..1fcaba6622 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/function_types/result_type.hpp @@ -0,0 +1,50 @@ + +// (C) Copyright Tobias Schwinger +// +// Use modification and distribution are subject to the boost Software License, +// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). + +//------------------------------------------------------------------------------ + +#ifndef BOOST_FT_RESULT_TYPE_HPP_INCLUDED +#define BOOST_FT_RESULT_TYPE_HPP_INCLUDED + +#include +#include + +#include +#include + +#include + +#include +#include + +namespace boost +{ + namespace function_types + { + template< typename T > struct result_type; + + namespace detail + { + template struct result_type_impl + : mpl::at_c + < typename function_types::components::types, 0 > + { }; + } + + template struct result_type + : mpl::if_ + < function_types::is_callable_builtin + , detail::result_type_impl, boost::blank + >::type + { + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,result_type,(T)) + }; + } + BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::result_type) +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional.hpp new file mode 100644 index 0000000000..3e0588e00f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional.hpp @@ -0,0 +1,548 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2000 Cadenza New Zealand Ltd +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// ------------------------------------------------------------------------------ +// Boost functional.hpp header file +// See http://www.boost.org/libs/functional for documentation. +// ------------------------------------------------------------------------------ +// $Id: functional.hpp 36246 2006-12-02 14:17:26Z andreas_huber69 $ +// ------------------------------------------------------------------------------ + +#ifndef BOOST_FUNCTIONAL_HPP +#define BOOST_FUNCTIONAL_HPP + +#include +#include +#include + +namespace boost +{ +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // -------------------------------------------------------------------------- + // The following traits classes allow us to avoid the need for ptr_fun + // because the types of arguments and the result of a function can be + // deduced. + // + // In addition to the standard types defined in unary_function and + // binary_function, we add + // + // - function_type, the type of the function or function object itself. + // + // - param_type, the type that should be used for passing the function or + // function object as an argument. + // -------------------------------------------------------------------------- + namespace detail + { + template + struct unary_traits_imp; + + template + struct unary_traits_imp + { + typedef Operation function_type; + typedef const function_type & param_type; + typedef typename Operation::result_type result_type; + typedef typename Operation::argument_type argument_type; + }; + + template + struct unary_traits_imp + { + typedef R (*function_type)(A); + typedef R (*param_type)(A); + typedef R result_type; + typedef A argument_type; + }; + + template + struct binary_traits_imp; + + template + struct binary_traits_imp + { + typedef Operation function_type; + typedef const function_type & param_type; + typedef typename Operation::result_type result_type; + typedef typename Operation::first_argument_type first_argument_type; + typedef typename Operation::second_argument_type second_argument_type; + }; + + template + struct binary_traits_imp + { + typedef R (*function_type)(A1,A2); + typedef R (*param_type)(A1,A2); + typedef R result_type; + typedef A1 first_argument_type; + typedef A2 second_argument_type; + }; + } // namespace detail + + template + struct unary_traits + { + typedef typename detail::unary_traits_imp::function_type function_type; + typedef typename detail::unary_traits_imp::param_type param_type; + typedef typename detail::unary_traits_imp::result_type result_type; + typedef typename detail::unary_traits_imp::argument_type argument_type; + }; + + template + struct unary_traits + { + typedef R (*function_type)(A); + typedef R (*param_type)(A); + typedef R result_type; + typedef A argument_type; + }; + + template + struct binary_traits + { + typedef typename detail::binary_traits_imp::function_type function_type; + typedef typename detail::binary_traits_imp::param_type param_type; + typedef typename detail::binary_traits_imp::result_type result_type; + typedef typename detail::binary_traits_imp::first_argument_type first_argument_type; + typedef typename detail::binary_traits_imp::second_argument_type second_argument_type; + }; + + template + struct binary_traits + { + typedef R (*function_type)(A1,A2); + typedef R (*param_type)(A1,A2); + typedef R result_type; + typedef A1 first_argument_type; + typedef A2 second_argument_type; + }; +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // -------------------------------------------------------------------------- + // If we have no partial specialisation available, decay to a situation + // that is no worse than in the Standard, i.e., ptr_fun will be required. + // -------------------------------------------------------------------------- + + template + struct unary_traits + { + typedef Operation function_type; + typedef const Operation& param_type; + typedef typename Operation::result_type result_type; + typedef typename Operation::argument_type argument_type; + }; + + template + struct binary_traits + { + typedef Operation function_type; + typedef const Operation & param_type; + typedef typename Operation::result_type result_type; + typedef typename Operation::first_argument_type first_argument_type; + typedef typename Operation::second_argument_type second_argument_type; + }; +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // -------------------------------------------------------------------------- + // unary_negate, not1 + // -------------------------------------------------------------------------- + template + class unary_negate + : public std::unary_function::argument_type,bool> + { + public: + explicit unary_negate(typename unary_traits::param_type x) + : + pred(x) + {} + bool operator()(typename call_traits::argument_type>::param_type x) const + { + return !pred(x); + } + private: + typename unary_traits::function_type pred; + }; + + template + unary_negate not1(const Predicate &pred) + { + // The cast is to placate Borland C++Builder in certain circumstances. + // I don't think it should be necessary. + return unary_negate((typename unary_traits::param_type)pred); + } + + template + unary_negate not1(Predicate &pred) + { + return unary_negate(pred); + } + + // -------------------------------------------------------------------------- + // binary_negate, not2 + // -------------------------------------------------------------------------- + template + class binary_negate + : public std::binary_function::first_argument_type, + typename binary_traits::second_argument_type, + bool> + { + public: + explicit binary_negate(typename binary_traits::param_type x) + : + pred(x) + {} + bool operator()(typename call_traits::first_argument_type>::param_type x, + typename call_traits::second_argument_type>::param_type y) const + { + return !pred(x,y); + } + private: + typename binary_traits::function_type pred; + }; + + template + binary_negate not2(const Predicate &pred) + { + // The cast is to placate Borland C++Builder in certain circumstances. + // I don't think it should be necessary. + return binary_negate((typename binary_traits::param_type)pred); + } + + template + binary_negate not2(Predicate &pred) + { + return binary_negate(pred); + } + + // -------------------------------------------------------------------------- + // binder1st, bind1st + // -------------------------------------------------------------------------- + template + class binder1st + : public std::unary_function::second_argument_type, + typename binary_traits::result_type> + { + public: + binder1st(typename binary_traits::param_type x, + typename call_traits::first_argument_type>::param_type y) + : + op(x), value(y) + {} + + typename binary_traits::result_type + operator()(typename call_traits::second_argument_type>::param_type x) const + { + return op(value, x); + } + + protected: + typename binary_traits::function_type op; + typename binary_traits::first_argument_type value; + }; + + template + inline binder1st bind1st(const Operation &op, + typename call_traits< + typename binary_traits::first_argument_type + >::param_type x) + { + // The cast is to placate Borland C++Builder in certain circumstances. + // I don't think it should be necessary. + return binder1st((typename binary_traits::param_type)op, x); + } + + template + inline binder1st bind1st(Operation &op, + typename call_traits< + typename binary_traits::first_argument_type + >::param_type x) + { + return binder1st(op, x); + } + + // -------------------------------------------------------------------------- + // binder2nd, bind2nd + // -------------------------------------------------------------------------- + template + class binder2nd + : public std::unary_function::first_argument_type, + typename binary_traits::result_type> + { + public: + binder2nd(typename binary_traits::param_type x, + typename call_traits::second_argument_type>::param_type y) + : + op(x), value(y) + {} + + typename binary_traits::result_type + operator()(typename call_traits::first_argument_type>::param_type x) const + { + return op(x, value); + } + + protected: + typename binary_traits::function_type op; + typename binary_traits::second_argument_type value; + }; + + template + inline binder2nd bind2nd(const Operation &op, + typename call_traits< + typename binary_traits::second_argument_type + >::param_type x) + { + // The cast is to placate Borland C++Builder in certain circumstances. + // I don't think it should be necessary. + return binder2nd((typename binary_traits::param_type)op, x); + } + + template + inline binder2nd bind2nd(Operation &op, + typename call_traits< + typename binary_traits::second_argument_type + >::param_type x) + { + return binder2nd(op, x); + } + + // -------------------------------------------------------------------------- + // mem_fun, etc + // -------------------------------------------------------------------------- + template + class mem_fun_t : public std::unary_function + { + public: + explicit mem_fun_t(S (T::*p)()) + : + ptr(p) + {} + S operator()(T* p) const + { + return (p->*ptr)(); + } + private: + S (T::*ptr)(); + }; + + template + class mem_fun1_t : public std::binary_function + { + public: + explicit mem_fun1_t(S (T::*p)(A)) + : + ptr(p) + {} + S operator()(T* p, typename call_traits::param_type x) const + { + return (p->*ptr)(x); + } + private: + S (T::*ptr)(A); + }; + + template + class const_mem_fun_t : public std::unary_function + { + public: + explicit const_mem_fun_t(S (T::*p)() const) + : + ptr(p) + {} + S operator()(const T* p) const + { + return (p->*ptr)(); + } + private: + S (T::*ptr)() const; + }; + + template + class const_mem_fun1_t : public std::binary_function + { + public: + explicit const_mem_fun1_t(S (T::*p)(A) const) + : + ptr(p) + {} + S operator()(const T* p, typename call_traits::param_type x) const + { + return (p->*ptr)(x); + } + private: + S (T::*ptr)(A) const; + }; + + template + inline mem_fun_t mem_fun(S (T::*f)()) + { + return mem_fun_t(f); + } + + template + inline mem_fun1_t mem_fun(S (T::*f)(A)) + { + return mem_fun1_t(f); + } + +#ifndef BOOST_NO_POINTER_TO_MEMBER_CONST + template + inline const_mem_fun_t mem_fun(S (T::*f)() const) + { + return const_mem_fun_t(f); + } + + template + inline const_mem_fun1_t mem_fun(S (T::*f)(A) const) + { + return const_mem_fun1_t(f); + } +#endif // BOOST_NO_POINTER_TO_MEMBER_CONST + + // -------------------------------------------------------------------------- + // mem_fun_ref, etc + // -------------------------------------------------------------------------- + template + class mem_fun_ref_t : public std::unary_function + { + public: + explicit mem_fun_ref_t(S (T::*p)()) + : + ptr(p) + {} + S operator()(T& p) const + { + return (p.*ptr)(); + } + private: + S (T::*ptr)(); + }; + + template + class mem_fun1_ref_t : public std::binary_function + { + public: + explicit mem_fun1_ref_t(S (T::*p)(A)) + : + ptr(p) + {} + S operator()(T& p, typename call_traits::param_type x) const + { + return (p.*ptr)(x); + } + private: + S (T::*ptr)(A); + }; + + template + class const_mem_fun_ref_t : public std::unary_function + { + public: + explicit const_mem_fun_ref_t(S (T::*p)() const) + : + ptr(p) + {} + + S operator()(const T &p) const + { + return (p.*ptr)(); + } + private: + S (T::*ptr)() const; + }; + + template + class const_mem_fun1_ref_t : public std::binary_function + { + public: + explicit const_mem_fun1_ref_t(S (T::*p)(A) const) + : + ptr(p) + {} + + S operator()(const T& p, typename call_traits::param_type x) const + { + return (p.*ptr)(x); + } + private: + S (T::*ptr)(A) const; + }; + + template + inline mem_fun_ref_t mem_fun_ref(S (T::*f)()) + { + return mem_fun_ref_t(f); + } + + template + inline mem_fun1_ref_t mem_fun_ref(S (T::*f)(A)) + { + return mem_fun1_ref_t(f); + } + +#ifndef BOOST_NO_POINTER_TO_MEMBER_CONST + template + inline const_mem_fun_ref_t mem_fun_ref(S (T::*f)() const) + { + return const_mem_fun_ref_t(f); + } + + template + inline const_mem_fun1_ref_t mem_fun_ref(S (T::*f)(A) const) + { + return const_mem_fun1_ref_t(f); + } +#endif // BOOST_NO_POINTER_TO_MEMBER_CONST + + // -------------------------------------------------------------------------- + // ptr_fun + // -------------------------------------------------------------------------- + template + class pointer_to_unary_function : public std::unary_function + { + public: + explicit pointer_to_unary_function(Result (*f)(Arg)) + : + func(f) + {} + + Result operator()(typename call_traits::param_type x) const + { + return func(x); + } + + private: + Result (*func)(Arg); + }; + + template + inline pointer_to_unary_function ptr_fun(Result (*f)(Arg)) + { + return pointer_to_unary_function(f); + } + + template + class pointer_to_binary_function : public std::binary_function + { + public: + explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2)) + : + func(f) + {} + + Result operator()(typename call_traits::param_type x, typename call_traits::param_type y) const + { + return func(x,y); + } + + private: + Result (*func)(Arg1, Arg2); + }; + + template + inline pointer_to_binary_function ptr_fun(Result (*f)(Arg1, Arg2)) + { + return pointer_to_binary_function(f); + } +} // namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/detail/container_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/detail/container_fwd.hpp new file mode 100644 index 0000000000..9a69d155b2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/detail/container_fwd.hpp @@ -0,0 +1,19 @@ + +// Copyright 2005-2008 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Forwarding header for container_fwd.hpp's new location. +// This header is deprecated, I'll be adding a warning in a future release, +// then converting it to an error and finally removing this header completely. + +#if !defined(BOOST_FUNCTIONAL_DETAIL_CONTAINER_FWD_HPP) +#define BOOST_FUNCTIONAL_DETAIL_CONTAINER_FWD_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/factory.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/factory.hpp new file mode 100644 index 0000000000..4aa4267b6a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/factory.hpp @@ -0,0 +1,163 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#ifndef BOOST_FUNCTIONAL_FACTORY_HPP_INCLUDED +# ifndef BOOST_PP_IS_ITERATING + +# include +# include +# include + +# include +# include +# include +# include +# include +# include + +# ifndef BOOST_FUNCTIONAL_FACTORY_MAX_ARITY +# define BOOST_FUNCTIONAL_FACTORY_MAX_ARITY 10 +# elif BOOST_FUNCTIONAL_FACTORY_MAX_ARITY < 3 +# undef BOOST_FUNCTIONAL_FACTORY_MAX_ARITY +# define BOOST_FUNCTIONAL_FACTORY_MAX_ARITY 3 +# endif + +namespace boost +{ + enum factory_alloc_propagation + { + factory_alloc_for_pointee_and_deleter, + factory_passes_alloc_to_smart_pointer + }; + + template< typename Pointer, class Allocator = boost::none_t, + factory_alloc_propagation AP = factory_alloc_for_pointee_and_deleter > + class factory; + + //----- ---- --- -- - - - - + + template< typename Pointer, factory_alloc_propagation AP > + class factory + { + public: + typedef typename boost::remove_cv::type result_type; + typedef typename boost::pointee::type value_type; + + factory() + { } + +# define BOOST_PP_FILENAME_1 +# define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_FACTORY_MAX_ARITY) +# include BOOST_PP_ITERATE() + }; + + template< class Pointer, class Allocator, factory_alloc_propagation AP > + class factory + : private Allocator::template rebind< typename boost::pointee< + typename boost::remove_cv::type >::type >::other + { + public: + typedef typename boost::remove_cv::type result_type; + typedef typename boost::pointee::type value_type; + + typedef typename Allocator::template rebind::other + allocator_type; + + explicit factory(allocator_type const & a = allocator_type()) + : allocator_type(a) + { } + + private: + + struct deleter + : allocator_type + { + inline deleter(allocator_type const& that) + : allocator_type(that) + { } + + allocator_type& get_allocator() const + { + return *const_cast( + static_cast(this)); + } + + void operator()(value_type* ptr) const + { + if (!! ptr) ptr->~value_type(); + const_cast(static_cast( + this))->deallocate(ptr,1); + } + }; + + inline allocator_type& get_allocator() const + { + return *const_cast( + static_cast(this)); + } + + inline result_type make_pointer(value_type* ptr, boost::non_type< + factory_alloc_propagation,factory_passes_alloc_to_smart_pointer>) + const + { + return result_type(ptr,deleter(this->get_allocator())); + } + inline result_type make_pointer(value_type* ptr, boost::non_type< + factory_alloc_propagation,factory_alloc_for_pointee_and_deleter>) + const + { + return result_type(ptr,deleter(this->get_allocator()), + this->get_allocator()); + } + + public: + +# define BOOST_TMP_MACRO +# define BOOST_PP_FILENAME_1 +# define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_FACTORY_MAX_ARITY) +# include BOOST_PP_ITERATE() +# undef BOOST_TMP_MACRO + }; + + template< typename Pointer, class Allocator, factory_alloc_propagation AP > + class factory; + // forbidden, would create a dangling reference +} + +# define BOOST_FUNCTIONAL_FACTORY_HPP_INCLUDED +# else // defined(BOOST_PP_IS_ITERATING) +# define N BOOST_PP_ITERATION() +# if !defined(BOOST_TMP_MACRO) +# if N > 0 + template< BOOST_PP_ENUM_PARAMS(N, typename T) > +# endif + inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const + { + return result_type( new value_type(BOOST_PP_ENUM_PARAMS(N,a)) ); + } +# else // defined(BOOST_TMP_MACRO) +# if N > 0 + template< BOOST_PP_ENUM_PARAMS(N, typename T) > +# endif + inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const + { + value_type* memory = this->get_allocator().allocate(1); + try + { + return make_pointer( + new(memory) value_type(BOOST_PP_ENUM_PARAMS(N,a)), + boost::non_type() ); + } + catch (...) { this->get_allocator().deallocate(memory,1); throw; } + } +# endif +# undef N +# endif // defined(BOOST_PP_IS_ITERATING) + +#endif // include guard + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/forward_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/forward_adapter.hpp new file mode 100644 index 0000000000..c6e61a98df --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/forward_adapter.hpp @@ -0,0 +1,472 @@ +/*============================================================================= + Copyright (c) 2007-2008 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#ifndef BOOST_FUNCTIONAL_FORWARD_ADAPTER_HPP_INCLUDED +# ifndef BOOST_PP_IS_ITERATING + +# include +# include + +# include +# include +# include +# include +# include + +# include + +# ifndef BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY +# define BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY 6 +# elif BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY < 3 +# undef BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY +# define BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY 3 +# endif + + +namespace boost +{ + template< typename Function, int Arity_Or_MinArity = -1, int MaxArity = -1 > + class forward_adapter; + + //----- ---- --- -- - - - - + + namespace detail + { + template< class MostDerived, typename Function, typename FunctionConst, + int Arity, int MinArity > + struct forward_adapter_impl; + + struct forward_adapter_result + { + template< typename Sig > struct apply; + + // Utility metafunction for qualification adjustment on arguments + template< typename T > struct q { typedef T const t; }; + template< typename T > struct q { typedef T const t; }; + template< typename T > struct q { typedef T t; }; + + // Utility metafunction to choose target function qualification + template< typename T > struct c + { typedef typename T::target_function_t t; }; + template< typename T > struct c + { typedef typename T::target_function_t t; }; + template< typename T > struct c + { typedef typename T::target_function_const_t t; }; + template< typename T > struct c + { typedef typename T::target_function_const_t t; }; + }; + } + +# define BOOST_TMP_MACRO(f,fn,fc) \ + boost::detail::forward_adapter_impl< \ + forward_adapter, fn, fc, \ + (MaxArity!=-1? MaxArity :Arity_Or_MinArity!=-1? Arity_Or_MinArity \ + :BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY), \ + (Arity_Or_MinArity!=-1? Arity_Or_MinArity : 0) > + + template< typename Function, int Arity_Or_MinArity, int MaxArity > + class forward_adapter + : public BOOST_TMP_MACRO(Function,Function,Function const) + , private Function + { + public: + forward_adapter(Function const& f = Function()) + : Function(f) + { } + + typedef Function target_function_t; + typedef Function const target_function_const_t; + + Function & target_function() { return *this; } + Function const & target_function() const { return *this; } + + template< typename Sig > struct result + : detail::forward_adapter_result::template apply + { }; + + using BOOST_TMP_MACRO(Function,Function, Function const)::operator(); + }; + template< typename Function, int Arity_Or_MinArity, int MaxArity > + class forward_adapter< Function const, Arity_Or_MinArity, MaxArity > + : public BOOST_TMP_MACRO(Function const, Function const, Function const) + , private Function + { + public: + forward_adapter(Function const& f = Function()) + : Function(f) + { } + + typedef Function const target_function_t; + typedef Function const target_function_const_t; + + Function const & target_function() const { return *this; } + + template< typename Sig > struct result + : detail::forward_adapter_result::template apply + { }; + + using BOOST_TMP_MACRO(Function const,Function const, Function const) + ::operator(); + }; + template< typename Function, int Arity_Or_MinArity, int MaxArity > + class forward_adapter< Function &, Arity_Or_MinArity, MaxArity > + : public BOOST_TMP_MACRO(Function&, Function, Function) + { + Function& ref_function; + public: + forward_adapter(Function& f) + : ref_function(f) + { } + + typedef Function target_function_t; + typedef Function target_function_const_t; + + Function & target_function() const { return this->ref_function; } + + template< typename Sig > struct result + : detail::forward_adapter_result::template apply + { }; + + using BOOST_TMP_MACRO(Function&, Function, Function)::operator(); + }; + + #undef BOOST_TMP_MACRO + + namespace detail + { + template< class Self > + struct forward_adapter_result::apply< Self() > + : boost::result_of< typename c::t() > + { }; + + template< class MD, class F, class FC > + struct forward_adapter_impl + { + inline typename boost::result_of< FC() >::type + operator()() const + { + return static_cast(this)->target_function()(); + } + + inline typename boost::result_of< F() >::type + operator()() + { + return static_cast(this)->target_function()(); + } + + // closing brace gets generated by preprocessing code, below + +# define BOOST_TMP_MACRO(tpl_params,arg_types,params,args) \ + template< tpl_params > \ + inline typename boost::result_of< FC(arg_types) >::type \ + operator()(params) const \ + { \ + return static_cast(this)->target_function()(args); \ + } \ + template< tpl_params > \ + inline typename boost::result_of< F(arg_types)>::type \ + operator()(params) \ + { \ + return static_cast(this)->target_function()(args); \ + } + +# // This is the total number of iterations we need +# define count ((1 << BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY+1)-2) + +# // Chain file iteration to virtually one loop +# if BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY <= 7 +# define limit1 count +# define limit2 0 +# define limit3 0 +# else +# if BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY <= 15 +# define limit1 (count >> 8) +# define limit2 255 +# define limit3 0 +# else +# define limit1 (count >> 16) +# define limit2 255 +# define limit3 255 +# endif +# endif + +# define N 0 + +# define BOOST_PP_FILENAME_1 +# define BOOST_PP_ITERATION_LIMITS (0,limit1) +# include BOOST_PP_ITERATE() + +# undef N +# undef limit3 +# undef limit2 +# undef limit1 +# undef count +# undef BOOST_TMP_MACRO + + }; + + } // namespace detail + + template + struct result_of const ()> + : boost::detail::forward_adapter_result::template apply< + boost::forward_adapter const () > + { }; + template + struct result_of()> + : boost::detail::forward_adapter_result::template apply< + boost::forward_adapter() > + { }; + template + struct result_of const& ()> + : boost::detail::forward_adapter_result::template apply< + boost::forward_adapter const () > + { }; + template + struct result_of& ()> + : boost::detail::forward_adapter_result::template apply< + boost::forward_adapter() > + { }; +} + +# define BOOST_FUNCTIONAL_FORWARD_ADAPTER_HPP_INCLUDED + +# elif BOOST_PP_ITERATION_DEPTH() == 1 && limit2 +# define BOOST_PP_FILENAME_2 +# define BOOST_PP_ITERATION_LIMITS (0,limit2) +# include BOOST_PP_ITERATE() +# elif BOOST_PP_ITERATION_DEPTH() == 2 && limit3 +# define BOOST_PP_FILENAME_3 +# define BOOST_PP_ITERATION_LIMITS (0,limit3) +# include BOOST_PP_ITERATE() + +# else + +# // I is the loop counter +# if limit2 && limit3 +# define I (BOOST_PP_ITERATION_1 << 16 | BOOST_PP_ITERATION_2 << 8 | \ + BOOST_PP_ITERATION_3) +# elif limit2 +# define I (BOOST_PP_ITERATION_1 << 8 | BOOST_PP_ITERATION_2) +# else +# define I BOOST_PP_ITERATION_1 +# endif + +# if I < count + +# // Done for this arity? Increment N +# if (I+2 >> N+1) +# if N == 0 +# undef N +# define N 1 +# elif N == 1 +# undef N +# define N 2 +# elif N == 2 +# undef N +# define N 3 +# elif N == 3 +# undef N +# define N 4 +# elif N == 4 +# undef N +# define N 5 +# elif N == 5 +# undef N +# define N 6 +# elif N == 6 +# undef N +# define N 7 +# elif N == 7 +# undef N +# define N 8 +# elif N == 8 +# undef N +# define N 9 +# elif N == 9 +# undef N +# define N 10 +# elif N == 10 +# undef N +# define N 11 +# elif N == 11 +# undef N +# define N 12 +# elif N == 12 +# undef N +# define N 13 +# elif N == 13 +# undef N +# define N 14 +# elif N == 14 +# undef N +# define N 15 +# elif N == 15 +# undef N +# define N 16 +# endif + + }; + + template< class Self, BOOST_PP_ENUM_PARAMS(N,typename T) > + struct forward_adapter_result::apply< Self(BOOST_PP_ENUM_PARAMS(N,T)) > + : boost::result_of< + typename c::t(BOOST_PP_ENUM_BINARY_PARAMS(N, + typename q::t& BOOST_PP_INTERCEPT)) > + { }; + + template< class MD, class F, class FC > + struct forward_adapter_impl + { + template< BOOST_PP_ENUM_PARAMS(N,typename T) > + inline typename boost::result_of< F( + BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)) >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)); + }; + + template< class MD, class F, class FC, int MinArity > + struct forward_adapter_impl + : forward_adapter_impl + { + using forward_adapter_impl::operator(); + +# endif + +# // Zero based count for each arity would be I-(1< + inline typename boost::result_of< FC(BOOST_PP_ENUM_PARAMS(N,PT)) + >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const + { + return static_cast(this) + ->target_function()(BOOST_PP_ENUM_PARAMS(N,a)); + } + template< BOOST_PP_ENUM_PARAMS(N,typename T) > + inline typename boost::result_of< F(BOOST_PP_ENUM_PARAMS(N,PT)) + >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) + { + return static_cast(this) + ->target_function()(BOOST_PP_ENUM_PARAMS(N,a)); + } +# else + BOOST_TMP_MACRO(BOOST_PP_ENUM_PARAMS(N,typename T), + BOOST_PP_ENUM_PARAMS(N,PT), BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a), + BOOST_PP_ENUM_PARAMS(N,a) ) + // ...generates uglier code but is faster - it caches ENUM_* +# endif + +# undef PT0 +# undef PT1 +# undef PT2 +# undef PT3 +# undef PT4 +# undef PT5 +# undef PT6 +# undef PT7 +# undef PT8 +# undef PT9 +# undef PT10 +# undef PT11 +# undef PT12 +# undef PT13 +# undef PT14 +# undef PT15 + +# endif // I < count + +# undef I +# endif // defined(BOOST_PP_IS_ITERATING) + +#endif // include guard + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash.hpp new file mode 100644 index 0000000000..44983f19b2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash.hpp @@ -0,0 +1,7 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/float_functions.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/float_functions.hpp new file mode 100644 index 0000000000..ae03ff091e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/float_functions.hpp @@ -0,0 +1,246 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP) +#define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP + +#include +#include + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// The C++ standard requires that the C float functions are overloarded +// for float, double and long double in the std namespace, but some of the older +// library implementations don't support this. On some that don't, the C99 +// float functions (frexpf, frexpl, etc.) are available. +// +// The following tries to automatically detect which are available. + +namespace boost { + namespace hash_detail { + + // Returned by dummy versions of the float functions. + + struct not_found { + // Implicitly convertible to float and long double in order to avoid + // a compile error when the dummy float functions are used. + + inline operator float() const { return 0; } + inline operator long double() const { return 0; } + }; + + // A type for detecting the return type of functions. + + template struct is; + template <> struct is { char x[10]; }; + template <> struct is { char x[20]; }; + template <> struct is { char x[30]; }; + template <> struct is { char x[40]; }; + + // Used to convert the return type of a function to a type for sizeof. + + template is float_type(T); + + // call_ldexp + // + // This will get specialized for float and long double + + template struct call_ldexp + { + typedef double float_type; + + inline double operator()(double a, int b) const + { + using namespace std; + return ldexp(a, b); + } + }; + + // call_frexp + // + // This will get specialized for float and long double + + template struct call_frexp + { + typedef double float_type; + + inline double operator()(double a, int* b) const + { + using namespace std; + return frexp(a, b); + } + }; + } +} + +// A namespace for dummy functions to detect when the actual function we want +// isn't available. ldexpl, ldexpf etc. might be added tby the macros below. +// +// AFAICT these have to be outside of the boost namespace, as if they're in +// the boost namespace they'll always be preferable to any other function +// (since the arguments are built in types, ADL can't be used). + +namespace boost_hash_detect_float_functions { + template boost::hash_detail::not_found ldexp(Float, int); + template boost::hash_detail::not_found frexp(Float, int*); +} + +// Macros for generating specializations of call_ldexp and call_frexp. +// +// check_cpp and check_c99 check if the C++ or C99 functions are available. +// +// Then the call_* functions select an appropriate implementation. +// +// I used c99_func in a few places just to get a unique name. +// +// Important: when using 'using namespace' at namespace level, include as +// little as possible in that namespace, as Visual C++ has an odd bug which +// can cause the namespace to be imported at the global level. This seems to +// happen mainly when there's a template in the same namesapce. + +#define BOOST_HASH_CALL_FLOAT_FUNC(cpp_func, c99_func, type1, type2) \ +namespace boost_hash_detect_float_functions { \ + template \ + boost::hash_detail::not_found c99_func(Float, type2); \ +} \ + \ +namespace boost { \ + namespace hash_detail { \ + namespace c99_func##_detect { \ + using namespace std; \ + using namespace boost_hash_detect_float_functions; \ + \ + struct check { \ + static type1 x; \ + static type2 y; \ + BOOST_STATIC_CONSTANT(bool, cpp = \ + sizeof(float_type(cpp_func(x,y))) \ + == sizeof(is)); \ + BOOST_STATIC_CONSTANT(bool, c99 = \ + sizeof(float_type(c99_func(x,y))) \ + == sizeof(is)); \ + }; \ + } \ + \ + template \ + struct call_c99_##c99_func : \ + boost::hash_detail::call_##cpp_func {}; \ + \ + template <> \ + struct call_c99_##c99_func { \ + typedef type1 float_type; \ + \ + template \ + inline type1 operator()(type1 a, T b) const \ + { \ + using namespace std; \ + return c99_func(a, b); \ + } \ + }; \ + \ + template \ + struct call_cpp_##c99_func : \ + call_c99_##c99_func< \ + ::boost::hash_detail::c99_func##_detect::check::c99 \ + > {}; \ + \ + template <> \ + struct call_cpp_##c99_func { \ + typedef type1 float_type; \ + \ + template \ + inline type1 operator()(type1 a, T b) const \ + { \ + using namespace std; \ + return cpp_func(a, b); \ + } \ + }; \ + \ + template <> \ + struct call_##cpp_func : \ + call_cpp_##c99_func< \ + ::boost::hash_detail::c99_func##_detect::check::cpp \ + > {}; \ + } \ +} + +#define BOOST_HASH_CALL_FLOAT_MACRO(cpp_func, c99_func, type1, type2) \ +namespace boost { \ + namespace hash_detail { \ + \ + template <> \ + struct call_##cpp_func { \ + typedef type1 float_type; \ + inline type1 operator()(type1 x, type2 y) const { \ + return c99_func(x, y); \ + } \ + }; \ + } \ +} + +#if defined(ldexpf) +BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpf, float, int) +#else +BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpf, float, int) +#endif + +#if defined(ldexpl) +BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpl, long double, int) +#else +BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpl, long double, int) +#endif + +#if defined(frexpf) +BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpf, float, int*) +#else +BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpf, float, int*) +#endif + +#if defined(frexpl) +BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpl, long double, int*) +#else +BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpl, long double, int*) +#endif + +#undef BOOST_HASH_CALL_FLOAT_MACRO +#undef BOOST_HASH_CALL_FLOAT_FUNC + + +namespace boost +{ + namespace hash_detail + { + template + struct select_hash_type_impl { + typedef double type; + }; + + template <> + struct select_hash_type_impl { + typedef float type; + }; + + template <> + struct select_hash_type_impl { + typedef long double type; + }; + + + // select_hash_type + // + // If there is support for a particular floating point type, use that + // otherwise use double (there's always support for double). + + template + struct select_hash_type : select_hash_type_impl< + BOOST_DEDUCED_TYPENAME call_ldexp::float_type, + BOOST_DEDUCED_TYPENAME call_frexp::float_type + > {}; + } +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float.hpp new file mode 100644 index 0000000000..ea1bc25f48 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float.hpp @@ -0,0 +1,101 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER) +#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include + +// Include hash implementation for the current platform. + +// Cygwn +#if defined(__CYGWIN__) +# if defined(__i386__) || defined(_M_IX86) +# include +# else +# include +# endif +#else +# include +#endif + +// Can we use fpclassify? + +// STLport +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +#define BOOST_HASH_USE_FPCLASSIFY 0 + +// GNU libstdc++ 3 +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +# if (defined(__USE_ISOC99) || defined(_GLIBCXX_USE_C99_MATH)) && \ + !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) +# define BOOST_HASH_USE_FPCLASSIFY 1 +# else +# define BOOST_HASH_USE_FPCLASSIFY 0 +# endif + +// Everything else +#else +# define BOOST_HASH_USE_FPCLASSIFY 0 +#endif + +#if BOOST_HASH_USE_FPCLASSIFY + +#include + +namespace boost +{ + namespace hash_detail + { + template + inline std::size_t float_hash_value(T v) + { + using namespace std; + switch (fpclassify(v)) { + case FP_ZERO: + return 0; + case FP_INFINITE: + return (std::size_t)(v > 0 ? -1 : -2); + case FP_NAN: + return (std::size_t)(-3); + case FP_NORMAL: + case FP_SUBNORMAL: + return float_hash_impl(v); + default: + BOOST_ASSERT(0); + return 0; + } + } + } +} + +#else // !BOOST_HASH_USE_FPCLASSIFY + +namespace boost +{ + namespace hash_detail + { + template + inline std::size_t float_hash_value(T v) + { + return v == 0 ? 0 : float_hash_impl(v); + } + } +} + +#endif // BOOST_HASH_USE_FPCLASSIFY + +#undef BOOST_HASH_USE_FPCLASSIFY + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float_generic.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float_generic.hpp new file mode 100644 index 0000000000..fdbf53fe57 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float_generic.hpp @@ -0,0 +1,91 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// A general purpose hash function for non-zero floating point values. + +#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_GENERIC_HEADER) +#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_GENERIC_HEADER + +#include +#include +#include + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#if defined(BOOST_MSVC) +#pragma warning(push) +#if BOOST_MSVC >= 1400 +#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does + // not satisfy test. Loop body not executed +#endif +#endif + +namespace boost +{ + namespace hash_detail + { + inline void hash_float_combine(std::size_t& seed, std::size_t value) + { + seed ^= value + (seed<<6) + (seed>>2); + } + + template + inline std::size_t float_hash_impl2(T v) + { + boost::hash_detail::call_frexp frexp; + boost::hash_detail::call_ldexp ldexp; + + int exp = 0; + + v = frexp(v, &exp); + + // A postive value is easier to hash, so combine the + // sign with the exponent and use the absolute value. + if(v < 0) { + v = -v; + exp += limits::max_exponent - + limits::min_exponent; + } + + v = ldexp(v, limits::digits); + std::size_t seed = static_cast(v); + v -= seed; + + // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1; + std::size_t const length + = (limits::digits * + boost::static_log2::radix>::value + + limits::digits - 1) + / limits::digits; + + for(std::size_t i = 0; i != length; ++i) + { + v = ldexp(v, limits::digits); + std::size_t part = static_cast(v); + v -= part; + hash_float_combine(seed, part); + } + + hash_float_combine(seed, exp); + + return seed; + } + + template + inline std::size_t float_hash_impl(T v) + { + typedef BOOST_DEDUCED_TYPENAME select_hash_type::type type; + return float_hash_impl2(static_cast(v)); + } + } +} + +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float_x86.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float_x86.hpp new file mode 100644 index 0000000000..b39bb0d081 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/hash_float_x86.hpp @@ -0,0 +1,56 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// A non-portable hash function form non-zero floats on x86. +// +// Even if you're on an x86 platform, this might not work if their floating +// point isn't set up as this expects. So this should only be used if it's +// absolutely certain that it will work. + +#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_X86_HEADER) +#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_X86_HEADER + +#include + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +namespace boost +{ + namespace hash_detail + { + inline void hash_float_combine(std::size_t& seed, std::size_t value) + { + seed ^= value + (seed<<6) + (seed>>2); + } + + inline std::size_t float_hash_impl(float v) + { + boost::uint32_t* ptr = (boost::uint32_t*)&v; + std::size_t seed = *ptr; + return seed; + } + + inline std::size_t float_hash_impl(double v) + { + boost::uint32_t* ptr = (boost::uint32_t*)&v; + std::size_t seed = *ptr++; + hash_float_combine(seed, *ptr); + return seed; + } + + inline std::size_t float_hash_impl(long double v) + { + boost::uint32_t* ptr = (boost::uint32_t*)&v; + std::size_t seed = *ptr++; + hash_float_combine(seed, *ptr++); + hash_float_combine(seed, *(boost::uint16_t*)ptr); + return seed; + } + } +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/limits.hpp new file mode 100644 index 0000000000..f5b520ea9d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/detail/limits.hpp @@ -0,0 +1,61 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// On some platforms std::limits gives incorrect values for long double. +// This tries to work around them. + +#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER) +#define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +// On OpenBSD, numeric_limits is not reliable for long doubles, but +// the macros defined in are and support long double when STLport +// doesn't. + +#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) +#include +#endif + +namespace boost +{ + namespace hash_detail + { + template + struct limits : std::numeric_limits {}; + +#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) + template <> + struct limits + : std::numeric_limits + { + static long double epsilon() { + return LDBL_EPSILON; + } + + static long double (max)() { + return LDBL_MAX; + } + + static long double (min)() { + return LDBL_MIN; + } + + BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG); + BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP); + BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP); +#if defined(_STLP_NO_LONG_DOUBLE) + BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX); +#endif + }; +#endif // __OpenBSD__ + } +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/extensions.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/extensions.hpp new file mode 100644 index 0000000000..3c587a3bf5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/extensions.hpp @@ -0,0 +1,286 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Based on Peter Dimov's proposal +// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf +// issue 6.18. + +// This implements the extensions to the standard. +// It's undocumented, so you shouldn't use it.... + +#if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) +#define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP + +#include +#include + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) +#include +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +#include +#endif + +namespace boost +{ + template + std::size_t hash_value(std::pair const&); + template + std::size_t hash_value(std::vector const&); + template + std::size_t hash_value(std::list const& v); + template + std::size_t hash_value(std::deque const& v); + template + std::size_t hash_value(std::set const& v); + template + std::size_t hash_value(std::multiset const& v); + template + std::size_t hash_value(std::map const& v); + template + std::size_t hash_value(std::multimap const& v); + + template + std::size_t hash_value(std::complex const&); + + template + std::size_t hash_value(std::pair const& v) + { + std::size_t seed = 0; + hash_combine(seed, v.first); + hash_combine(seed, v.second); + return seed; + } + + template + std::size_t hash_value(std::vector const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::list const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::deque const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::set const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::multiset const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::map const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::multimap const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::complex const& v) + { + boost::hash hasher; + std::size_t seed = hasher(v.imag()); + seed ^= hasher(v.real()) + (seed<<6) + (seed>>2); + return seed; + } + + // + // call_hash_impl + // + + // On compilers without function template ordering, this deals with arrays. + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + namespace hash_detail + { + template + struct call_hash_impl + { + template + struct inner + { + static std::size_t call(T const& v) + { + using namespace boost; + return hash_value(v); + } + }; + }; + + template <> + struct call_hash_impl + { + template + struct inner + { +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + static std::size_t call(Array const& v) +#else + static std::size_t call(Array& v) +#endif + { + const int size = sizeof(v) / sizeof(*v); + return boost::hash_range(v, v + size); + } + }; + }; + + template + struct call_hash + : public call_hash_impl::value> + ::BOOST_NESTED_TEMPLATE inner + { + }; + } +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + // + // boost::hash + // + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + + template struct hash + : std::unary_function + { +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + std::size_t operator()(T const& val) const + { + return hash_value(val); + } +#else + std::size_t operator()(T const& val) const + { + return hash_detail::call_hash::call(val); + } +#endif + }; + +#if BOOST_WORKAROUND(__DMC__, <= 0x848) + template struct hash + : std::unary_function + { + std::size_t operator()(const T* val) const + { + return boost::hash_range(val, val+n); + } + }; +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // On compilers without partial specialization, boost::hash + // has already been declared to deal with pointers, so just + // need to supply the non-pointer version of hash_impl. + + namespace hash_detail + { + template + struct hash_impl; + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + + template <> + struct hash_impl + { + template + struct inner + : std::unary_function + { +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + std::size_t operator()(T const& val) const + { + return hash_value(val); + } +#else + std::size_t operator()(T const& val) const + { + return hash_detail::call_hash::call(val); + } +#endif + }; + }; + +#else // Visual C++ 6.5 + + // Visual C++ 6.5 has problems with nested member functions and + // applying const to const types in templates. So we get this: + + template + struct hash_impl_msvc + { + template + struct inner + : public std::unary_function + { + std::size_t operator()(T const& val) const + { + return hash_detail::call_hash::call(val); + } + + std::size_t operator()(T& val) const + { + return hash_detail::call_hash::call(val); + } + }; + }; + + template <> + struct hash_impl_msvc + { + template + struct inner + : public std::unary_function + { + std::size_t operator()(T& val) const + { + return hash_detail::call_hash::call(val); + } + }; + }; + + template + struct hash_impl_msvc2 + : public hash_impl_msvc::value> + ::BOOST_NESTED_TEMPLATE inner {}; + + template <> + struct hash_impl + { + template + struct inner : public hash_impl_msvc2 {}; + }; + +#endif // Visual C++ 6.5 + } +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/hash.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/hash.hpp new file mode 100644 index 0000000000..0eedf7f7f9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/hash.hpp @@ -0,0 +1,517 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Based on Peter Dimov's proposal +// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf +// issue 6.18. + +#if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP) +#define BOOST_FUNCTIONAL_HASH_HASH_HPP + +#include +#include +#include +#include +#include + +#if defined(BOOST_HASH_NO_IMPLICIT_CASTS) +#include +#endif + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#include +#endif + +#if BOOST_WORKAROUND(__GNUC__, < 3) \ + && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +#define BOOST_HASH_CHAR_TRAITS string_char_traits +#else +#define BOOST_HASH_CHAR_TRAITS char_traits +#endif + +namespace boost +{ +#if defined(BOOST_HASH_NO_IMPLICIT_CASTS) + + // If you get a static assertion here, it's because hash_value + // isn't declared for your type. + template + std::size_t hash_value(T const&) { + BOOST_STATIC_ASSERT((T*) 0 && false); + return 0; + } + +#endif + + std::size_t hash_value(bool); + std::size_t hash_value(char); + std::size_t hash_value(unsigned char); + std::size_t hash_value(signed char); + std::size_t hash_value(short); + std::size_t hash_value(unsigned short); + std::size_t hash_value(int); + std::size_t hash_value(unsigned int); + std::size_t hash_value(long); + std::size_t hash_value(unsigned long); + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + std::size_t hash_value(wchar_t); +#endif + +#if !defined(BOOST_NO_LONG_LONG) + std::size_t hash_value(boost::long_long_type); + std::size_t hash_value(boost::ulong_long_type); +#endif + +#if !BOOST_WORKAROUND(__DMC__, <= 0x848) + template std::size_t hash_value(T* const&); +#else + template std::size_t hash_value(T*); +#endif + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + template< class T, unsigned N > + std::size_t hash_value(const T (&x)[N]); + + template< class T, unsigned N > + std::size_t hash_value(T (&x)[N]); +#endif + + std::size_t hash_value(float v); + std::size_t hash_value(double v); + std::size_t hash_value(long double v); + + template + std::size_t hash_value( + std::basic_string, A> const&); + + // Implementation + + namespace hash_detail + { + template + inline std::size_t hash_value_signed(T val) + { + const int size_t_bits = std::numeric_limits::digits; + // ceiling(std::numeric_limits::digits / size_t_bits) - 1 + const int length = (std::numeric_limits::digits - 1) + / size_t_bits; + + std::size_t seed = 0; + T positive = val < 0 ? -1 - val : val; + + // Hopefully, this loop can be unrolled. + for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) + { + seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); + } + seed ^= (std::size_t) val + (seed<<6) + (seed>>2); + + return seed; + } + + template + inline std::size_t hash_value_unsigned(T val) + { + const int size_t_bits = std::numeric_limits::digits; + // ceiling(std::numeric_limits::digits / size_t_bits) - 1 + const int length = (std::numeric_limits::digits - 1) + / size_t_bits; + + std::size_t seed = 0; + + // Hopefully, this loop can be unrolled. + for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) + { + seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); + } + seed ^= (std::size_t) val + (seed<<6) + (seed>>2); + + return seed; + } + } + + inline std::size_t hash_value(bool v) + { + return static_cast(v); + } + + inline std::size_t hash_value(char v) + { + return static_cast(v); + } + + inline std::size_t hash_value(unsigned char v) + { + return static_cast(v); + } + + inline std::size_t hash_value(signed char v) + { + return static_cast(v); + } + + inline std::size_t hash_value(short v) + { + return static_cast(v); + } + + inline std::size_t hash_value(unsigned short v) + { + return static_cast(v); + } + + inline std::size_t hash_value(int v) + { + return static_cast(v); + } + + inline std::size_t hash_value(unsigned int v) + { + return static_cast(v); + } + + inline std::size_t hash_value(long v) + { + return static_cast(v); + } + + inline std::size_t hash_value(unsigned long v) + { + return static_cast(v); + } + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + inline std::size_t hash_value(wchar_t v) + { + return static_cast(v); + } +#endif + +#if !defined(BOOST_NO_LONG_LONG) + inline std::size_t hash_value(boost::long_long_type v) + { + return hash_detail::hash_value_signed(v); + } + + inline std::size_t hash_value(boost::ulong_long_type v) + { + return hash_detail::hash_value_unsigned(v); + } +#endif + + // Implementation by Alberto Barbati and Dave Harris. +#if !BOOST_WORKAROUND(__DMC__, <= 0x848) + template std::size_t hash_value(T* const& v) +#else + template std::size_t hash_value(T* v) +#endif + { +#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 + // for some reason ptrdiff_t on OpenVMS compiler with + // 64 bit is not 64 bit !!! + std::size_t x = static_cast( + reinterpret_cast(v)); +#else + std::size_t x = static_cast( + reinterpret_cast(v)); +#endif + return x + (x >> 3); + } + +#if defined(BOOST_MSVC) +#pragma warning(push) +#if BOOST_MSVC <= 1400 +#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' to + // 'unsigned int', possible loss of data + // A misguided attempt to detect 64-bit + // incompatability. +#endif +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template + inline void hash_combine(std::size_t& seed, T& v) +#else + template + inline void hash_combine(std::size_t& seed, T const& v) +#endif + { + boost::hash hasher; + seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + + template + inline std::size_t hash_range(It first, It last) + { + std::size_t seed = 0; + + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + + return seed; + } + + template + inline void hash_range(std::size_t& seed, It first, It last) + { + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + } + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) + template + inline std::size_t hash_range(T* first, T* last) + { + std::size_t seed = 0; + + for(; first != last; ++first) + { + boost::hash hasher; + seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + + return seed; + } + + template + inline void hash_range(std::size_t& seed, T* first, T* last) + { + for(; first != last; ++first) + { + boost::hash hasher; + seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + } +#endif + +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + template< class T, unsigned N > + inline std::size_t hash_value(const T (&x)[N]) + { + return hash_range(x, x + N); + } + + template< class T, unsigned N > + inline std::size_t hash_value(T (&x)[N]) + { + return hash_range(x, x + N); + } +#endif + + template + inline std::size_t hash_value( + std::basic_string, A> const& v) + { + return hash_range(v.begin(), v.end()); + } + + inline std::size_t hash_value(float v) + { + return boost::hash_detail::float_hash_value(v); + } + + inline std::size_t hash_value(double v) + { + return boost::hash_detail::float_hash_value(v); + } + + inline std::size_t hash_value(long double v) + { + return boost::hash_detail::float_hash_value(v); + } + + // + // boost::hash + // + + // Define the specializations required by the standard. The general purpose + // boost::hash is defined later in extensions.hpp if + // BOOST_HASH_NO_EXTENSIONS is not defined. + + // BOOST_HASH_SPECIALIZE - define a specialization for a type which is + // passed by copy. + // + // BOOST_HASH_SPECIALIZE_REF - define a specialization for a type which is + // passed by copy. + // + // These are undefined later. + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +#define BOOST_HASH_SPECIALIZE(type) \ + template <> struct hash \ + : public std::unary_function \ + { \ + std::size_t operator()(type v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; + +#define BOOST_HASH_SPECIALIZE_REF(type) \ + template <> struct hash \ + : public std::unary_function \ + { \ + std::size_t operator()(type const& v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; +#else +#define BOOST_HASH_SPECIALIZE(type) \ + template <> struct hash \ + : public std::unary_function \ + { \ + std::size_t operator()(type v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; \ + \ + template <> struct hash \ + : public std::unary_function \ + { \ + std::size_t operator()(const type v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; + +#define BOOST_HASH_SPECIALIZE_REF(type) \ + template <> struct hash \ + : public std::unary_function \ + { \ + std::size_t operator()(type const& v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; \ + \ + template <> struct hash \ + : public std::unary_function \ + { \ + std::size_t operator()(type const& v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; +#endif + + BOOST_HASH_SPECIALIZE(bool) + BOOST_HASH_SPECIALIZE(char) + BOOST_HASH_SPECIALIZE(signed char) + BOOST_HASH_SPECIALIZE(unsigned char) +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + BOOST_HASH_SPECIALIZE(wchar_t) +#endif + BOOST_HASH_SPECIALIZE(short) + BOOST_HASH_SPECIALIZE(unsigned short) + BOOST_HASH_SPECIALIZE(int) + BOOST_HASH_SPECIALIZE(unsigned int) + BOOST_HASH_SPECIALIZE(long) + BOOST_HASH_SPECIALIZE(unsigned long) + + BOOST_HASH_SPECIALIZE(float) + BOOST_HASH_SPECIALIZE(double) + BOOST_HASH_SPECIALIZE(long double) + + BOOST_HASH_SPECIALIZE_REF(std::string) +#if !defined(BOOST_NO_STD_WSTRING) + BOOST_HASH_SPECIALIZE_REF(std::wstring) +#endif + +#if !defined(BOOST_NO_LONG_LONG) + BOOST_HASH_SPECIALIZE(boost::long_long_type) + BOOST_HASH_SPECIALIZE(boost::ulong_long_type) +#endif + +#undef BOOST_HASH_SPECIALIZE +#undef BOOST_HASH_SPECIALIZE_REF + +// Specializing boost::hash for pointers. + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + + template + struct hash + : public std::unary_function + { + std::size_t operator()(T* v) const + { +#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) + return boost::hash_value(v); +#else + std::size_t x = static_cast( + reinterpret_cast(v)); + + return x + (x >> 3); +#endif + } + }; + +#else + + // For compilers without partial specialization, we define a + // boost::hash for all remaining types. But hash_impl is only defined + // for pointers in 'extensions.hpp' - so when BOOST_HASH_NO_EXTENSIONS + // is defined there will still be a compile error for types not supported + // in the standard. + + namespace hash_detail + { + template + struct hash_impl; + + template <> + struct hash_impl + { + template + struct inner + : public std::unary_function + { + std::size_t operator()(T val) const + { +#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590) + return boost::hash_value(val); +#else + std::size_t x = static_cast( + reinterpret_cast(val)); + + return x + (x >> 3); +#endif + } + }; + }; + } + + template struct hash + : public boost::hash_detail::hash_impl::value> + ::BOOST_NESTED_TEMPLATE inner + { + }; + +#endif +} + +#undef BOOST_HASH_CHAR_TRAITS + +#endif // BOOST_FUNCTIONAL_HASH_HASH_HPP + +// Include this outside of the include guards in case the file is included +// twice - once with BOOST_HASH_NO_EXTENSIONS defined, and then with it +// undefined. + +#if !defined(BOOST_HASH_NO_EXTENSIONS) \ + && !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) +#include +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/hash_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/hash_fwd.hpp new file mode 100644 index 0000000000..1d51b07f2d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash/hash_fwd.hpp @@ -0,0 +1,40 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Based on Peter Dimov's proposal +// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf +// issue 6.18. + +#if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) +#define BOOST_FUNCTIONAL_HASH_FWD_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include + +namespace boost +{ + template struct hash; + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template void hash_combine(std::size_t& seed, T& v); +#else + template void hash_combine(std::size_t& seed, T const& v); +#endif + + template std::size_t hash_range(It, It); + template void hash_range(std::size_t&, It, It); + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) + template inline std::size_t hash_range(T*, T*); + template inline void hash_range(std::size_t&, T*, T*); +#endif +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/hash_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash_fwd.hpp new file mode 100644 index 0000000000..b640988618 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/hash_fwd.hpp @@ -0,0 +1,7 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/lightweight_forward_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/lightweight_forward_adapter.hpp new file mode 100644 index 0000000000..d21ac421b7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/lightweight_forward_adapter.hpp @@ -0,0 +1,259 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#ifndef BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_HPP_INCLUDED +# ifndef BOOST_PP_IS_ITERATING + +# include +# include + +# include +# include +# include +# include +# include +# include + +# include +# include + +# ifndef BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY +# define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY 10 +# elif BOOST_FUNCTIONAL_FORDWARD_ADAPTER_MAX_ARITY < 3 +# undef BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY +# define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY 3 +# endif + +namespace boost +{ + template< typename Function, int Arity_Or_MinArity = -1, int MaxArity = -1 > + class lightweight_forward_adapter; + + //----- ---- --- -- - - - - + + namespace detail + { + template< class MostDerived, typename Function, typename FunctionConst, + int Arity, int MinArity > + struct lightweight_forward_adapter_impl; + + struct lightweight_forward_adapter_result + { + template< typename Sig > struct apply; + + // Utility metafunction for argument transform + template< typename T > struct x { typedef T const& t; }; + template< typename T > struct x< boost::reference_wrapper > + { typedef T& t; }; + template< typename T > struct x : x { }; + template< typename T > struct x : x { }; + template< typename T > struct x : x { }; + + // Utility metafunction to choose target function qualification + template< typename T > struct c + { typedef typename T::target_function_t t; }; + template< typename T > struct c + { typedef typename T::target_function_t t; }; + template< typename T > struct c + { typedef typename T::target_function_const_t t; }; + template< typename T > struct c + { typedef typename T::target_function_const_t t; }; + }; + } + +# define BOOST_TMP_MACRO(f,fn,fc) \ + boost::detail::lightweight_forward_adapter_impl< \ + lightweight_forward_adapter, fn, fc, \ + (MaxArity!=-1? MaxArity :Arity_Or_MinArity!=-1? Arity_Or_MinArity \ + :BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY), \ + (Arity_Or_MinArity!=-1? Arity_Or_MinArity : 0) > + + template< typename Function, int Arity_Or_MinArity, int MaxArity > + class lightweight_forward_adapter + : public BOOST_TMP_MACRO(Function,Function,Function const) + , private Function + { + public: + lightweight_forward_adapter(Function const& f = Function()) + : Function(f) + { } + + typedef Function target_function_t; + typedef Function const target_function_const_t; + + Function & target_function() { return *this; } + Function const & target_function() const { return *this; } + + template< typename Sig > struct result + : detail::lightweight_forward_adapter_result::template apply + { }; + + using BOOST_TMP_MACRO(Function,Function, Function const)::operator(); + }; + template< typename Function, int Arity_Or_MinArity, int MaxArity > + class lightweight_forward_adapter< Function const, Arity_Or_MinArity, + MaxArity > + : public BOOST_TMP_MACRO(Function const, Function const, Function const) + , private Function + { + public: + lightweight_forward_adapter(Function const& f = Function()) + : Function(f) + { } + + typedef Function const target_function_t; + typedef Function const target_function_const_t; + + Function const & target_function() const { return *this; } + + template< typename Sig > struct result + : detail::lightweight_forward_adapter_result::template apply + { }; + + using BOOST_TMP_MACRO(Function const,Function const, Function const) + ::operator(); + }; + template< typename Function, int Arity_Or_MinArity, int MaxArity > + class lightweight_forward_adapter< Function &, Arity_Or_MinArity, MaxArity > + : public BOOST_TMP_MACRO(Function&, Function, Function) + { + Function& ref_function; + public: + lightweight_forward_adapter(Function& f) + : ref_function(f) + { } + + typedef Function target_function_t; + typedef Function target_function_const_t; + + Function & target_function() const { return this->ref_function; } + + template< typename Sig > struct result + : detail::lightweight_forward_adapter_result::template apply + { }; + + using BOOST_TMP_MACRO(Function&, Function, Function)::operator(); + }; + + #undef BOOST_TMP_MACRO + + namespace detail + { + template< class Self > + struct lightweight_forward_adapter_result::apply< Self() > + : boost::result_of< typename c::t() > + { }; + + template< class MD, class F, class FC > + struct lightweight_forward_adapter_impl + : lightweight_forward_adapter_result + { + inline typename boost::result_of< FC() >::type + operator()() const + { + return static_cast(this)->target_function()(); + } + + inline typename boost::result_of< F() >::type + operator()() + { + return static_cast(this)->target_function()(); + } + }; + +# define BOOST_PP_FILENAME_1 \ + +# define BOOST_PP_ITERATION_LIMITS \ + (1,BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY) +# include BOOST_PP_ITERATE() + + } // namespace detail + + template + struct result_of const ()> + : boost::detail::lightweight_forward_adapter_result::template apply< + boost::lightweight_forward_adapter const () > + { }; + template + struct result_of()> + : boost::detail::lightweight_forward_adapter_result::template apply< + boost::lightweight_forward_adapter() > + { }; + template + struct result_of const& ()> + : boost::detail::lightweight_forward_adapter_result::template apply< + boost::lightweight_forward_adapter const () > + { }; + template + struct result_of& ()> + : boost::detail::lightweight_forward_adapter_result::template apply< + boost::lightweight_forward_adapter() > + { }; +} + +# define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_HPP_INCLUDED + +# else // defined(BOOST_PP_IS_ITERATING) +# define N BOOST_PP_ITERATION() + + template< class Self, BOOST_PP_ENUM_PARAMS(N,typename T) > + struct lightweight_forward_adapter_result::apply< + Self (BOOST_PP_ENUM_PARAMS(N,T)) > + : boost::result_of< + typename c::t (BOOST_PP_ENUM_BINARY_PARAMS(N, + typename x::t BOOST_PP_INTERCEPT)) > + { }; + + template< class MD, class F, class FC > + struct lightweight_forward_adapter_impl + : lightweight_forward_adapter_result + { + template< BOOST_PP_ENUM_PARAMS(N,typename T) > + inline typename boost::result_of< F(BOOST_PP_ENUM_BINARY_PARAMS(N, + T,const& BOOST_PP_INTERCEPT)) >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)); + }; + + template< class MD, class F, class FC, int MinArity > + struct lightweight_forward_adapter_impl + : lightweight_forward_adapter_impl + { + using lightweight_forward_adapter_impl::operator(); + +# define M(z,i,d) \ + static_cast::t>(a##i) + + template< BOOST_PP_ENUM_PARAMS(N,typename T) > + inline typename lightweight_forward_adapter_result::template apply< + MD const (BOOST_PP_ENUM_BINARY_PARAMS(N, + T,const& BOOST_PP_INTERCEPT)) >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a)) const + { + typedef lightweight_forward_adapter_result _; + return static_cast(this)->target_function()( + BOOST_PP_ENUM(N,M,_)); + } + template< BOOST_PP_ENUM_PARAMS(N,typename T) > + inline typename lightweight_forward_adapter_result::template apply< + MD (BOOST_PP_ENUM_BINARY_PARAMS(N, + T,const& BOOST_PP_INTERCEPT)) >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a)) + { + typedef lightweight_forward_adapter_result _; + return static_cast(this)->target_function()( + BOOST_PP_ENUM(N,M,_)); + } +# undef M + }; + +# undef N +# endif // defined(BOOST_PP_IS_ITERATING) + +#endif // include guard + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/functional/value_factory.hpp b/deal.II/contrib/boost-1.45.0/include/boost/functional/value_factory.hpp new file mode 100644 index 0000000000..6047908ac3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/functional/value_factory.hpp @@ -0,0 +1,70 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#ifndef BOOST_FUNCTIONAL_VALUE_FACTORY_HPP_INCLUDED +# ifndef BOOST_PP_IS_ITERATING + +# include +# include +# include + +# include +# include +# include +# include +# include +# include + +# ifndef BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY +# define BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY 10 +# elif BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY < 3 +# undef BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY +# define BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY 3 +# endif + +namespace boost +{ + template< typename T > + class value_factory; + + //----- ---- --- -- - - - - + + template< typename T > + class value_factory + { + public: + typedef T result_type; + + value_factory() + { } + +# define BOOST_PP_FILENAME_1 +# define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY) +# include BOOST_PP_ITERATE() + }; + + template< typename T > class value_factory; + // forbidden, would create a dangling reference +} +# define BOOST_FUNCTIONAL_VALUE_FACTORY_HPP_INCLUDED +# else // defined(BOOST_PP_IS_ITERATING) + +# define N BOOST_PP_ITERATION() +# if N > 0 + template< BOOST_PP_ENUM_PARAMS(N, typename T) > +# endif + inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const + { + return result_type(BOOST_PP_ENUM_PARAMS(N,a)); + } +# undef N + +# endif // defined(BOOST_PP_IS_ITERATING) + +#endif // include guard + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted.hpp new file mode 100644 index 0000000000..bdd7b8ccfb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_ADAPTED_30122005_1420) +#define BOOST_FUSION_ADAPTED_30122005_1420 + +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt.hpp new file mode 100644 index 0000000000..c9d9f279df --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ADT_HPP +#define BOOST_FUSION_ADAPTED_ADT_HPP + +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_adt.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_adt.hpp new file mode 100644 index 0000000000..0508a67397 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_adt.hpp @@ -0,0 +1,73 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + Copyright (c) 2009-2010 Hartmut Kaiser + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_HPP +#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_HPP + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_FUSION_ADAPT_ADT_FILLER_0(A, B, C, D)\ + ((A, B, C, D)) BOOST_FUSION_ADAPT_ADT_FILLER_1 +#define BOOST_FUSION_ADAPT_ADT_FILLER_1(A, B, C, D)\ + ((A, B, C, D)) BOOST_FUSION_ADAPT_ADT_FILLER_0 +#define BOOST_FUSION_ADAPT_ADT_FILLER_0_END +#define BOOST_FUSION_ADAPT_ADT_FILLER_1_END + +#define BOOST_FUSION_ADAPT_ADT_C(TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \ + BOOST_FUSION_ADAPT_ADT_C_BASE( \ + TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE, 4) + +#define BOOST_FUSION_ADAPT_TPL_ADT(TEMPLATE_PARAMS_SEQ, NAME_SEQ , ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (1)TEMPLATE_PARAMS_SEQ, \ + (1)NAME_SEQ, \ + struct_tag, \ + 0, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ADT_C) + +#define BOOST_FUSION_ADAPT_ADT(NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (0), \ + (0)(NAME), \ + struct_tag, \ + 0, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ADT_C) + +#define BOOST_FUSION_ADAPT_ADT_AS_VIEW(NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (0), \ + (0)(NAME), \ + struct_tag, \ + 1, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ADT_C) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_adt_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_adt_named.hpp new file mode 100644 index 0000000000..c2ace0130c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_adt_named.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + Copyright (c) 2009-2010 Hartmut Kaiser + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_NAMED_HPP +#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_NAMED_HPP + +#include +#include + +#define BOOST_FUSION_ADAPT_ADT_NAMED_NS( \ + WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ + \ + BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \ + WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \ + \ + BOOST_FUSION_ADAPT_ADT_AS_VIEW( \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \ + ATTRIBUTES) + +#define BOOST_FUSION_ADAPT_ADT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_ADT_NAMED_NS( \ + WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp new file mode 100644 index 0000000000..b67ba2c5a6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp @@ -0,0 +1,87 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + Copyright (c) 2007 Dan Marsden + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_HPP +#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_HPP + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(A, B, C, D, E)\ + ((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1 +#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1(A, B, C, D, E)\ + ((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 +#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0_END +#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1_END + +#define BOOST_FUSION_ADAPT_ASSOC_ADT_C( \ + TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \ + \ + BOOST_FUSION_ADAPT_ADT_C_BASE(TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,5) \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct struct_assoc_key \ + { \ + typedef BOOST_PP_TUPLE_ELEM(5, 4, ATTRIBUTE) type; \ + }; + +#define BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( \ + TEMPLATE_PARAMS_SEQ, NAME_SEQ, ATTRIBUTES) \ + \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (1)TEMPLATE_PARAMS_SEQ, \ + (1)NAME_SEQ, \ + assoc_struct_tag, \ + 0, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ASSOC_ADT_C) + +#define BOOST_FUSION_ADAPT_ASSOC_ADT(NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (0), \ + (0)(NAME), \ + assoc_struct_tag, \ + 0, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ASSOC_ADT_C) + +#define BOOST_FUSION_ADAPT_ASSOC_ADT_AS_VIEW(NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (0), \ + (0)(NAME), \ + assoc_struct_tag, \ + 1, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ASSOC_ADT_C) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp new file mode 100644 index 0000000000..b875982533 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_NAMED_HPP +#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_NAMED_HPP + +#include +#include + +#define BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED_NS( \ + WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ + \ + BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \ + WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \ + \ + BOOST_FUSION_ADAPT_ASSOC_ADT_AS_VIEW( \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \ + ATTRIBUTES) + +#define BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED_NS( \ + WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/detail/adapt_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/detail/adapt_base.hpp new file mode 100644 index 0000000000..bddc79de7e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/detail/adapt_base.hpp @@ -0,0 +1,181 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_HPP +#define BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_HPP + +#include +#include +#include +#include +#include + +#define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_TEMPLATE_IMPL(TEMPLATE_PARAMS_SEQ) \ + typename detail::get_identity< \ + lvalue \ + , BOOST_PP_SEQ_ELEM(1,TEMPLATE_PARAMS_SEQ) \ + >::type + +#define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL( \ + TEMPLATE_PARAMS_SEQ) \ + \ + boost::remove_const::type>::type + +#define BOOST_FUSION_ADAPT_ADT_C_BASE( \ + TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct access::adt_attribute_access< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + > \ + { \ + template \ + static void \ + boost_fusion_adapt_adt_impl_set( \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj, \ + Val const& val) \ + { \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 3, ATTRIBUTE); \ + } \ + \ + static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \ + boost_fusion_adapt_adt_impl_get( \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \ + { \ + return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \ + } \ + \ + static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \ + boost_fusion_adapt_adt_impl_get( \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \ + { \ + return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \ + } \ + }; \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct adt_attribute_proxy< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + , true \ + > \ + { \ + typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) type; \ + \ + explicit \ + adt_attribute_proxy( \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& o) \ + : obj(&o) \ + {} \ + \ + type get() const \ + { \ + return access::adt_attribute_access< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + >::boost_fusion_adapt_adt_impl_get(*obj); \ + } \ + \ + operator type() const \ + { \ + return get(); \ + } \ + \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const* obj; \ + }; \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct adt_attribute_proxy< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + , false \ + > \ + { \ + typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type; \ + \ + explicit \ + adt_attribute_proxy( \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& o) \ + : obj(&o) \ + {} \ + \ + template \ + adt_attribute_proxy& \ + operator=(Val const& val) \ + { \ + access::adt_attribute_access< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + >::boost_fusion_adapt_adt_impl_set(*obj, val); \ + return *this; \ + } \ + \ + type get() const \ + { \ + return access::adt_attribute_access< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + >::boost_fusion_adapt_adt_impl_get(*obj); \ + } \ + \ + operator type() const \ + { \ + return get(); \ + } \ + \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)* obj; \ + }; \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct access::struct_member< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + > \ + { \ + typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \ + BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \ + TEMPLATE_PARAMS_SEQ) \ + \ + typedef \ + BOOST_PP_IF( \ + BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), \ + BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_TEMPLATE_IMPL, \ + BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL)( \ + TEMPLATE_PARAMS_SEQ) \ + type; \ + \ + template \ + struct apply \ + { \ + typedef \ + adt_attribute_proxy< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + , is_const::value \ + > \ + type; \ + \ + static type \ + call(Seq& obj) \ + { \ + return type(obj); \ + } \ + }; \ + }; + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/detail/extension.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/detail/extension.hpp new file mode 100644 index 0000000000..50c40cf34e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/adt/detail/extension.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ADT_DETAIL_EXTENSION_HPP +#define BOOST_FUSION_ADAPTED_ADT_DETAIL_EXTENSION_HPP + +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct get_identity + : remove_const::type> + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array.hpp new file mode 100644 index 0000000000..cb82809037 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_ARRAY_27122005_1035) +#define BOOST_FUSION_ARRAY_27122005_1035 + +//For backwards compatibility +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/at_impl.hpp new file mode 100644 index 0000000000..12f0372670 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/at_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_AT_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_AT_IMPL_HPP + +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct at_impl; + + template<> + struct at_impl + { + template + struct apply + { + typedef typename + add_reference::type>::type + type; + + static type + call(Seq& seq) + { + return seq[N::value]; + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/begin_impl.hpp new file mode 100644 index 0000000000..2ee4d707b1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/begin_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_BEGIN_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_BEGIN_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef + basic_iterator< + po_array_iterator_tag + , random_access_traversal_tag + , Seq + , 0 + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/category_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/category_of_impl.hpp new file mode 100644 index 0000000000..0a633a455d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/category_of_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_CATEGORY_OF_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_CATEGORY_OF_IMPL_HPP + +namespace boost { namespace fusion +{ + struct random_access_traversal_tag; + + namespace extension + { + template + struct category_of_impl; + + template<> + struct category_of_impl + { + template + struct apply + { + typedef random_access_traversal_tag type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/deref_impl.hpp new file mode 100644 index 0000000000..a58cf99001 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/deref_impl.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_DEREF_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_DEREF_IMPL_HPP + +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename + add_reference< + typename remove_extent::type + >::type + type; + + static type + call(It const& it) + { + return (*it.seq)[It::index::value]; + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/end_impl.hpp new file mode 100644 index 0000000000..5b367f9c00 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/end_impl.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_END_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_END_IMPL_HPP + +#include +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef + basic_iterator< + po_array_iterator_tag + , random_access_traversal_tag + , Seq + , extent::value-1>::value + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/is_sequence_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/is_sequence_impl.hpp new file mode 100644 index 0000000000..d6de858561 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/is_sequence_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_IS_SEQUENCE_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_IS_SEQUENCE_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct is_sequence_impl; + + template<> + struct is_sequence_impl + { + template + struct apply + : mpl::true_ + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/is_view_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/is_view_impl.hpp new file mode 100644 index 0000000000..238eac0e58 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/is_view_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_IS_VIEW_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_IS_VIEW_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct is_view_impl; + + template<> + struct is_view_impl + { + template + struct apply + : mpl::false_ + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/size_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/size_impl.hpp new file mode 100644 index 0000000000..8be5a29d81 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/size_impl.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_SIZE_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_SIZE_IMPL_HPP + +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct size_impl; + + template<> + struct size_impl + { + template + struct apply + : extent::value-1> + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/tag_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/tag_of.hpp new file mode 100644 index 0000000000..7c732a7021 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/tag_of.hpp @@ -0,0 +1,72 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_TAG_OF_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_TAG_OF_HPP + +#include +#include + +namespace boost +{ + namespace fusion + { + struct po_array_tag; + struct po_array_iterator_tag; + struct random_access_traversal_tag; + struct fusion_sequence_tag; + + namespace traits + { +#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS + template + struct tag_of + { + typedef po_array_tag type; + }; + + template + struct tag_of + { + typedef po_array_tag type; + }; +#else + template + struct tag_of + { + typedef po_array_tag type; + }; + + template + struct tag_of + { + typedef po_array_tag type; + }; +#endif + } + } + + namespace mpl + { + template + struct sequence_tag; + + template + struct sequence_tag + { + typedef fusion::po_array_tag type; + }; + + template + struct sequence_tag + { + typedef fusion::po_array_tag type; + }; + } +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/value_at_impl.hpp new file mode 100644 index 0000000000..4e04c37a8f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/value_at_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_VALUE_AT_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_VALUE_AT_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + : remove_extent + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/value_of_impl.hpp new file mode 100644 index 0000000000..2bbddf235e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/array/value_of_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_ARRAY_VALUE_OF_IMPL_HPP +#define BOOST_FUSION_ADAPTED_ARRAY_VALUE_OF_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + : remove_extent + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array.hpp new file mode 100644 index 0000000000..835135b9b2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_BOOST_ARRAY_27122005_1035) +#define BOOST_FUSION_BOOST_ARRAY_27122005_1035 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/array_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/array_iterator.hpp new file mode 100644 index 0000000000..5453a6396c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/array_iterator.hpp @@ -0,0 +1,107 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_ARRAY_ITERATOR_26122005_2250) +#define BOOST_FUSION_ARRAY_ITERATOR_26122005_2250 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct random_access_traversal_tag; + + template + struct array_iterator + : iterator_facade, random_access_traversal_tag> + { + BOOST_MPL_ASSERT_RELATION(Pos, >=, 0); + BOOST_MPL_ASSERT_RELATION(Pos, <=, static_cast(Array::static_size)); + + typedef mpl::int_ index; + typedef Array array_type; + + array_iterator(Array& a) + : array(a) {} + + Array& array; + + template + struct value_of + { + typedef typename Iterator::array_type array_type; + typedef typename array_type::value_type type; + }; + + template + struct deref + { + typedef typename Iterator::array_type array_type; + typedef typename + mpl::if_< + is_const + , typename array_type::const_reference + , typename array_type::reference + >::type + type; + + static type + call(Iterator const & it) + { + return it.array[Iterator::index::value]; + } + }; + + template + struct advance + { + typedef typename Iterator::index index; + typedef typename Iterator::array_type array_type; + typedef array_iterator type; + + static type + call(Iterator const& i) + { + return type(i.array); + } + }; + + template + struct next : advance > {}; + + template + struct prior : advance > {}; + + template + struct distance : mpl::minus + { + typedef typename + mpl::minus< + typename I2::index, typename I1::index + >::type + type; + + static type + call(I1 const&, I2 const&) + { + return type(); + } + }; + + private: + + array_iterator& operator=(array_iterator const&); + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/at_impl.hpp new file mode 100644 index 0000000000..16557a114f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/at_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_IMPL_27122005_1241) +#define BOOST_FUSION_AT_IMPL_27122005_1241 + +#include + +#include + +namespace boost { namespace fusion { + + struct boost_array_tag; + + namespace extension + { + template + struct at_impl; + + template<> + struct at_impl + { + template + struct apply + { + typedef typename mpl::if_< + is_const, + typename Sequence::const_reference, + typename Sequence::reference>::type type; + + static type + call(Sequence& seq) + { + return seq[N::value]; + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/begin_impl.hpp new file mode 100644 index 0000000000..0798659ba7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/begin_impl.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_BEGIN_IMPL_27122005_1117) +#define BOOST_FUSION_BEGIN_IMPL_27122005_1117 + +#include + +namespace boost { namespace fusion { + + struct boost_array_tag; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef array_iterator type; + + static type + call(Sequence& v) + { + return type(v); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/category_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/category_of_impl.hpp new file mode 100644 index 0000000000..35762a0306 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/category_of_impl.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_27122005_1044) +#define BOOST_FUSION_CATEGORY_OF_IMPL_27122005_1044 + +#include + +namespace boost { namespace fusion { + + struct boost_array_tag; + struct random_access_traversal_tag; + + namespace extension + { + template + struct category_of_impl; + + template<> + struct category_of_impl + { + template + struct apply + { + typedef random_access_traversal_tag type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/end_impl.hpp new file mode 100644 index 0000000000..35b1fdbc71 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/end_impl.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_END_IMPL_27122005_1120) +#define BOOST_FUSION_END_IMPL_27122005_1120 + +#include + +namespace boost { namespace fusion { + + struct boost_array_tag; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef array_iterator type; + + static type + call(Sequence& v) + { + return type(v); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/is_sequence_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/is_sequence_impl.hpp new file mode 100644 index 0000000000..9301e81e6c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/is_sequence_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1648) +#define BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1648 + +#include + +namespace boost { namespace fusion { + + struct boost_array_tag; + + namespace extension + { + template + struct is_sequence_impl; + + template<> + struct is_sequence_impl + { + template + struct apply : mpl::true_ {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/is_view_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/is_view_impl.hpp new file mode 100644 index 0000000000..6cb6b36ac7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/is_view_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_VIEW_IMPL_27042006_2221) +#define BOOST_FUSION_IS_VIEW_IMPL_27042006_2221 + +#include + +namespace boost { namespace fusion +{ + struct boost_array_tag; + + namespace extension + { + template + struct is_view_impl; + + template<> + struct is_view_impl + { + template + struct apply : mpl::false_ + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/size_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/size_impl.hpp new file mode 100644 index 0000000000..87cafdacd1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/size_impl.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_SIZE_IMPL_27122005_1251) +#define BOOST_FUSION_SIZE_IMPL_27122005_1251 + +namespace boost { namespace fusion { + + struct boost_array_tag; + + namespace extension + { + template + struct size_impl; + + template<> + struct size_impl + { + template + struct apply : mpl::int_ {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/value_at_impl.hpp new file mode 100644 index 0000000000..a35abc687f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/detail/value_at_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_AT_IMPL_27122005_1256) +#define BOOST_FUSION_VALUE_AT_IMPL_27122005_1256 + +namespace boost { namespace fusion { + + struct boost_array_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + { + typedef typename Sequence::value_type type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/tag_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/tag_of.hpp new file mode 100644 index 0000000000..d38cc80471 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_array/tag_of.hpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_TAG_OF_27122005_1030) +#define FUSION_SEQUENCE_TAG_OF_27122005_1030 + +#include + +#include + +namespace boost +{ + template + class array; +} + +namespace boost { namespace fusion +{ + struct boost_array_tag; + struct fusion_sequence_tag; + + namespace traits + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + struct tag_of, void > +#else + struct tag_of > +#endif + { + typedef boost_array_tag type; + }; + } +}} + +namespace boost { namespace mpl +{ + template + struct sequence_tag; + + template + struct sequence_tag > + { + typedef fusion::fusion_sequence_tag type; + }; + + template + struct sequence_tag const> + { + typedef fusion::fusion_sequence_tag type; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple.hpp new file mode 100644 index 0000000000..2924df076a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_BOOST_TUPLE_09272006_0732) +#define BOOST_FUSION_BOOST_TUPLE_09272006_0732 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp new file mode 100644 index 0000000000..553429e38b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp @@ -0,0 +1,189 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BOOST_TUPLE_ITERATOR_09262006_1851) +#define FUSION_BOOST_TUPLE_ITERATOR_09262006_1851 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct forward_traversal_tag; + + namespace detail + { + template + struct boost_tuple_is_empty : mpl::false_ {}; + + template <> + struct boost_tuple_is_empty : mpl::true_ {}; + + template <> + struct boost_tuple_is_empty : mpl::true_ {}; + + template <> + struct boost_tuple_is_empty > : mpl::true_ {}; + + template <> + struct boost_tuple_is_empty const> : mpl::true_ {}; + } + + template + struct boost_tuple_iterator + : iterator_facade, forward_traversal_tag> + { + typedef Cons cons_type; + + explicit boost_tuple_iterator(Cons& in_cons) + : cons(in_cons) {} + Cons& cons; + + template + struct value_of : mpl::identity {}; + + template + struct deref + { + typedef typename value_of::type element; + + typedef typename + mpl::if_< + is_const + , typename tuples::access_traits::const_type + , typename tuples::access_traits::non_const_type + >::type + type; + + static type + call(Iterator const& iter) + { + return iter.cons.get_head(); + } + }; + + template + struct next + { + typedef typename Iterator::cons_type cons_type; + typedef typename cons_type::tail_type tail_type; + + typedef boost_tuple_iterator< + typename mpl::eval_if< + is_const + , add_const + , mpl::identity + >::type> + type; + + static type + call(Iterator const& iter) + { + return type(iter.cons.get_tail()); + } + }; + + template + struct distance; + + // detail + template + struct lazy_next_distance + { + typedef + typename mpl::plus< + mpl::int_<1>, + typename distance< + typename next::type, + I2 + >::type + >::type type; + }; + + template + struct distance + { + typedef typename mpl::eval_if< + boost::is_same, + mpl::int_<0>, + lazy_next_distance + >::type type; + + static type + call(I1 const&, I2 const&) + { + return type(); + } + }; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + boost_tuple_iterator& operator= (boost_tuple_iterator const&); + }; + + template + struct boost_tuple_null_iterator + : iterator_facade, forward_traversal_tag> + { + typedef Null cons_type; + + template + struct equal_to + : mpl::or_< + is_same + , mpl::and_< + detail::boost_tuple_is_empty + , detail::boost_tuple_is_empty + > + > + {}; + }; + + template <> + struct boost_tuple_iterator + : boost_tuple_null_iterator + { + template + explicit boost_tuple_iterator(Cons const&) {} + }; + + template <> + struct boost_tuple_iterator + : boost_tuple_null_iterator + { + template + explicit boost_tuple_iterator(Cons const&) {} + }; + + template <> + struct boost_tuple_iterator > + : boost_tuple_null_iterator > + { + template + explicit boost_tuple_iterator(Cons const&) {} + }; + + template <> + struct boost_tuple_iterator const> + : boost_tuple_null_iterator const> + { + template + explicit boost_tuple_iterator(Cons const&) {} + }; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/at_impl.hpp new file mode 100644 index 0000000000..b594dfd814 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/at_impl.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_IMPL_09262006_1920) +#define BOOST_FUSION_AT_IMPL_09262006_1920 + +#include +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef typename + tuples::element::type + element; + + typedef typename + mpl::if_< + is_const + , typename tuples::access_traits::const_type + , typename tuples::access_traits::non_const_type + >::type + type; + + static type + call(Sequence& seq) + { + return tuples::get(seq); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/begin_impl.hpp new file mode 100644 index 0000000000..ee9a89ebbe --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/begin_impl.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_BEGIN_IMPL_09272006_0719) +#define BOOST_FUSION_BEGIN_IMPL_09272006_0719 + +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef boost_tuple_iterator type; + + static type + call(Sequence& v) + { + return type(v); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/category_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/category_of_impl.hpp new file mode 100644 index 0000000000..34f48b1e73 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/category_of_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726) +#define BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726 + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + struct forward_traversal_tag; + + namespace extension + { + template + struct category_of_impl; + + template<> + struct category_of_impl + { + template + struct apply + { + typedef forward_traversal_tag type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/end_impl.hpp new file mode 100644 index 0000000000..2fb27a7a2c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/end_impl.hpp @@ -0,0 +1,54 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_END_IMPL_09272006_0721) +#define BOOST_FUSION_END_IMPL_09272006_0721 + +#include +#include +#include + +namespace boost { namespace tuples +{ + struct null_type; +}} + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef + boost_tuple_iterator< + typename mpl::if_< + is_const + , tuples::null_type const + , tuples::null_type + >::type + > + type; + + static type + call(Sequence& seq) + { + return type(seq); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/is_sequence_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/is_sequence_impl.hpp new file mode 100644 index 0000000000..43d731158e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/is_sequence_impl.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_09272006_0726) +#define BOOST_FUSION_IS_SEQUENCE_IMPL_09272006_0726 + +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct is_sequence_impl; + + template<> + struct is_sequence_impl + { + template + struct apply : mpl::true_ {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/is_view_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/is_view_impl.hpp new file mode 100644 index 0000000000..2927df7b9b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/is_view_impl.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_VIEW_IMPL_09272006_0725) +#define BOOST_FUSION_IS_VIEW_IMPL_09272006_0725 + +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct is_view_impl; + + template<> + struct is_view_impl + { + template + struct apply : mpl::false_ {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/size_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/size_impl.hpp new file mode 100644 index 0000000000..167a5035b3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/size_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_SIZE_IMPL_09272006_0724) +#define BOOST_FUSION_SIZE_IMPL_09272006_0724 + +#include +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct size_impl; + + template <> + struct size_impl + { + template + struct apply : mpl::int_::value> {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/value_at_impl.hpp new file mode 100644 index 0000000000..d46d51e52b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/detail/value_at_impl.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_AT_IMPL_09262006_1926) +#define BOOST_FUSION_VALUE_AT_IMPL_09262006_1926 + +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply : tuples::element {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/tag_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/tag_of.hpp new file mode 100644 index 0000000000..1183082d44 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/boost_tuple/tag_of.hpp @@ -0,0 +1,114 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_TAG_OF_09262006_1900) +#define BOOST_FUSION_TAG_OF_09262006_1900 + +#include + +namespace boost { namespace tuples +{ + struct null_type; + + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > + class tuple; + + template + struct cons; +}} + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + struct fusion_sequence_tag; + + namespace traits + { + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + struct tag_of, void > +#else + struct tag_of > +#endif + { + typedef boost_tuple_tag type; + }; + + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + struct tag_of, void > +#else + struct tag_of > +#endif + { + typedef boost_tuple_tag type; + }; + + template <> + struct tag_of + { + typedef boost_tuple_tag type; + }; + } +}} + +namespace boost { namespace mpl +{ + template + struct sequence_tag; + + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > + struct sequence_tag > + { + typedef fusion::fusion_sequence_tag type; + }; + + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > + struct sequence_tag< + tuples::tuple const + > + { + typedef fusion::fusion_sequence_tag type; + }; + + template + struct sequence_tag > + { + typedef fusion::fusion_sequence_tag type; + }; + + template + struct sequence_tag const> + { + typedef fusion::fusion_sequence_tag type; + }; + + template <> + struct sequence_tag + { + typedef fusion::fusion_sequence_tag type; + }; + + template <> + struct sequence_tag + { + typedef fusion::fusion_sequence_tag type; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl.hpp new file mode 100644 index 0000000000..f82578465b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl.hpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_MPL_31122005_1152) +#define BOOST_FUSION_MPL_31122005_1152 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/at_impl.hpp new file mode 100644 index 0000000000..6f3be1c639 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/at_impl.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_IMPL_31122005_1642) +#define BOOST_FUSION_AT_IMPL_31122005_1642 + +#include + +namespace boost { namespace fusion +{ + struct mpl_sequence_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef typename mpl::at::type type; + + static type + call(Sequence) + { + return type(); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp new file mode 100644 index 0000000000..1ec77d8b14 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_BEGIN_IMPL_31122005_1209) +#define BOOST_FUSION_BEGIN_IMPL_31122005_1209 + +#include +#include +#include + +namespace boost { namespace fusion { + + struct mpl_sequence_tag; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef typename mpl::begin< + typename remove_const::type + >::type iterator; + typedef mpl_iterator type; + + static type + call(Sequence) + { + return type(); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/category_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/category_of_impl.hpp new file mode 100644 index 0000000000..ad68fcc957 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/category_of_impl.hpp @@ -0,0 +1,54 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141) +#define BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141 + +#include +#include +#include +#include + +namespace boost { namespace fusion { + + namespace detail + { + template + struct mpl_sequence_category_of + { + // assumes T is an mpl sequence + // there should be no way this will ever be + // called where T is an mpl iterator + + BOOST_STATIC_ASSERT(mpl::is_sequence::value); + typedef typename + mpl_iterator_category< + typename mpl::begin::type::category + >::type + type; + }; + } + + struct mpl_sequence_tag; + + namespace extension + { + template + struct category_of_impl; + + template<> + struct category_of_impl + { + template + struct apply + : detail::mpl_sequence_category_of + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/empty_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/empty_impl.hpp new file mode 100644 index 0000000000..14e8dfa2f8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/empty_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_EMPTY_IMPL_31122005_1554) +#define BOOST_FUSION_EMPTY_IMPL_31122005_1554 + +#include + +namespace boost { namespace fusion +{ + struct mpl_sequence_tag; + + namespace extension + { + template <> + struct empty_impl + { + template + struct apply : mpl::empty {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/end_impl.hpp new file mode 100644 index 0000000000..e34669566a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/end_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_END_IMPL_31122005_1237) +#define BOOST_FUSION_END_IMPL_31122005_1237 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct mpl_sequence_tag; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef typename mpl::end< + typename remove_const::type + >::type iterator; + typedef mpl_iterator type; + + static type + call(Sequence) + { + return type(); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/has_key_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/has_key_impl.hpp new file mode 100644 index 0000000000..bfecbc73c8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/has_key_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_HAS_KEY_IMPL_31122005_1647) +#define BOOST_FUSION_HAS_KEY_IMPL_31122005_1647 + +#include + +namespace boost { namespace fusion +{ + struct mpl_sequence_tag; + + namespace extension + { + template + struct has_key_impl; + + template <> + struct has_key_impl + { + template + struct apply : mpl::has_key {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/is_sequence_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/is_sequence_impl.hpp new file mode 100644 index 0000000000..bf9b349c09 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/is_sequence_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_31122005_1505) +#define BOOST_FUSION_IS_SEQUENCE_IMPL_31122005_1505 + +#include + +namespace boost { namespace fusion +{ + struct mpl_sequence_tag; + + namespace extension + { + template + struct is_sequence_impl; + + template<> + struct is_sequence_impl + { + template + struct apply : mpl::true_ {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/is_view_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/is_view_impl.hpp new file mode 100644 index 0000000000..5ae48c909e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/is_view_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_VIEW_IMPL_03202006_0048) +#define BOOST_FUSION_IS_VIEW_IMPL_03202006_0048 + +#include + +namespace boost { namespace fusion +{ + struct mpl_sequence_tag; + + namespace extension + { + template + struct is_view_impl; + + template<> + struct is_view_impl + { + template + struct apply : mpl::true_ + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/size_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/size_impl.hpp new file mode 100644 index 0000000000..628935173d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/size_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_SIZE_IMPL_31122005_1508) +#define BOOST_FUSION_SIZE_IMPL_31122005_1508 + +#include + +namespace boost { namespace fusion +{ + struct mpl_sequence_tag; + + namespace extension + { + template + struct size_impl; + + template <> + struct size_impl + { + template + struct apply : mpl::size {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/value_at_impl.hpp new file mode 100644 index 0000000000..5f39e4eb42 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/detail/value_at_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_AT_IMPL_31122005_1621) +#define BOOST_FUSION_VALUE_AT_IMPL_31122005_1621 + +#include + +namespace boost { namespace fusion +{ + struct mpl_sequence_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply : mpl::at {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/mpl_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/mpl_iterator.hpp new file mode 100644 index 0000000000..9c82028a3b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/mpl/mpl_iterator.hpp @@ -0,0 +1,113 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MPL_ITERATOR_05052005_0731) +#define FUSION_MPL_ITERATOR_05052005_0731 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + template + struct mpl_iterator + : iterator_facade< + mpl_iterator + , typename detail::mpl_iterator_category::type + > + { + typedef typename remove_const::type iterator_type; + + template + struct value_of : mpl::deref {}; + + template + struct deref + { + typedef typename mpl::deref< + typename Iterator::iterator_type>::type + type; + + static type + call(Iterator) + { + return type(); + } + }; + + template + struct next + { + typedef mpl_iterator< + typename mpl::next::type> + type; + + static type + call(Iterator) + { + return type(); + } + }; + + template + struct prior + { + typedef mpl_iterator< + typename mpl::prior::type> + type; + + static type + call(Iterator) + { + return type(); + } + }; + + template + struct advance + { + typedef mpl_iterator< + typename mpl::advance::type> + type; + + static type + call(Iterator const& /*i*/) + { + return type(); + } + }; + + template + struct distance : + mpl::distance< + typename I1::iterator_type + , typename I2::iterator_type> + { + typedef typename + mpl::distance< + typename I1::iterator_type + , typename I2::iterator_type + >::type + type; + + static type + call(I1 const&, I2 const&) + { + return type(); + } + }; + }; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/std_pair.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/std_pair.hpp new file mode 100644 index 0000000000..5792dd4450 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/std_pair.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STD_PAIR_HPP +#define BOOST_FUSION_ADAPTED_STD_PAIR_HPP + +#include + +namespace std +{ + template + struct pair; +} + +BOOST_FUSION_ADAPT_TPL_STRUCT( + (T1)(T2),(std::pair)(T1)(T2),(T1, first)(T2, second)) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct.hpp new file mode 100644 index 0000000000..f184a0d3a1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_HPP + +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp new file mode 100644 index 0000000000..865d9284bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp @@ -0,0 +1,93 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2007 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(X, Y, Z) \ + ((X, Y, Z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1 +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1(X, Y, Z) \ + ((X, Y, Z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0_END +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1_END + +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE( \ + TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX,ATTRIBUTE) \ + \ + BOOST_FUSION_ADAPT_STRUCT_C_BASE( \ + TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, PREFIX, ATTRIBUTE, 3) \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct struct_assoc_key \ + { \ + typedef BOOST_PP_TUPLE_ELEM(3, 2, ATTRIBUTE) type; \ + }; + +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C( \ + TEMPLATE_PARAMS_SEQ,NAME_SEQ, I, ATTRIBUTE) \ + \ + BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE( \ + TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,BOOST_PP_EMPTY,ATTRIBUTE) + +#define BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( \ + TEMPLATE_PARAMS_SEQ, NAME_SEQ, ATTRIBUTES) \ + \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (1)TEMPLATE_PARAMS_SEQ, \ + (1)NAME_SEQ, \ + assoc_struct_tag, \ + 0, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ASSOC_STRUCT_C) + +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT(NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (0), \ + (0)(NAME), \ + assoc_struct_tag, \ + 0, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ASSOC_STRUCT_C) + +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (0), \ + (0)(NAME), \ + assoc_struct_tag, \ + 1, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_ASSOC_STRUCT_C) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp new file mode 100644 index 0000000000..996c9f4788 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_NAMED_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_NAMED_HPP + +#include +#include + +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0(X, Y, Z) \ + (X, obj.Y, Z) BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_1 +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_1(X, Y, Z) \ + (X, obj.Y, Z) BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0 +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0_END +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_1_END + +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS( \ + WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ + \ + BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \ + WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \ + \ + BOOST_FUSION_ADAPT_ASSOC_STRUCT_AS_VIEW( \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \ + BOOST_PP_CAT( \ + BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0 ATTRIBUTES,_END)) + +#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS( \ + WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_struct.hpp new file mode 100644 index 0000000000..066da8aa19 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_struct.hpp @@ -0,0 +1,70 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0(X, Y) \ + ((X, Y)) BOOST_FUSION_ADAPT_STRUCT_FILLER_1 +#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1(X, Y) \ + ((X, Y)) BOOST_FUSION_ADAPT_STRUCT_FILLER_0 +#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0_END +#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1_END + +#define BOOST_FUSION_ADAPT_STRUCT_C(TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE)\ + BOOST_FUSION_ADAPT_STRUCT_C_BASE( \ + TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,BOOST_PP_EMPTY,ATTRIBUTE,2) + +#define BOOST_FUSION_ADAPT_TPL_STRUCT(TEMPLATE_PARAMS_SEQ,NAME_SEQ, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (1)TEMPLATE_PARAMS_SEQ, \ + (1)NAME_SEQ, \ + struct_tag, \ + 0, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_STRUCT_C) + +#define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (0), \ + (0)(NAME), \ + struct_tag, \ + 0, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_STRUCT_C) + +#define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_BASE( \ + (0), \ + (0)(NAME), \ + struct_tag, \ + 1, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + BOOST_FUSION_ADAPT_STRUCT_C) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_struct_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_struct_named.hpp new file mode 100644 index 0000000000..ef13be0232 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/adapt_struct_named.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2009-2010 Hartmut Kaiser + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_NAMED_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_NAMED_HPP + +#include +#include +#include + +#define BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0(X, Y) \ + (X, obj.Y) BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_1 +#define BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_1(X, Y) \ + (X, obj.Y) BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0 +#define BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0_END +#define BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_1_END + +#define BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \ + WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ + \ + BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \ + WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \ + \ + BOOST_FUSION_ADAPT_STRUCT_AS_VIEW( \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0 ATTRIBUTES,_END)) + +#define BOOST_FUSION_ADAPT_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \ + BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \ + WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/define_assoc_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/define_assoc_struct.hpp new file mode 100644 index 0000000000..d69ed461ec --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/define_assoc_struct.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DEFINE_ASSOC_STRUCT_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DEFINE_ASSOC_STRUCT_HPP + +#include +#include + +#define BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT( \ + TEMPLATE_PARAMS_SEQ, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ + \ + BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL( \ + TEMPLATE_PARAMS_SEQ, \ + (0)NAMESPACE_SEQ, \ + NAME, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + 3) \ + \ + BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( \ + TEMPLATE_PARAMS_SEQ, \ + (BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ) NAME)\ + TEMPLATE_PARAMS_SEQ, \ + ATTRIBUTES) + +#define BOOST_FUSION_DEFINE_ASSOC_STRUCT(NAMESPACE_SEQ, NAME, ATTRIBUTES) \ + BOOST_FUSION_DEFINE_STRUCT_IMPL( \ + (0)NAMESPACE_SEQ, \ + NAME, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + 3) \ + \ + BOOST_FUSION_ADAPT_ASSOC_STRUCT( \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ) NAME, \ + ATTRIBUTES) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/define_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/define_struct.hpp new file mode 100644 index 0000000000..11a393b7b7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/define_struct.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DEFINE_STRUCT_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DEFINE_STRUCT_HPP + +#include +#include + +#define BOOST_FUSION_DEFINE_TPL_STRUCT( \ + TEMPLATE_PARAMS_SEQ, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ + \ + BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL( \ + TEMPLATE_PARAMS_SEQ, \ + (0)NAMESPACE_SEQ, \ + NAME, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + 2) \ + \ + BOOST_FUSION_ADAPT_TPL_STRUCT( \ + TEMPLATE_PARAMS_SEQ, \ + (BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ) NAME)\ + TEMPLATE_PARAMS_SEQ, \ + ATTRIBUTES) + +#define BOOST_FUSION_DEFINE_STRUCT(NAMESPACE_SEQ, NAME, ATTRIBUTES) \ + BOOST_FUSION_DEFINE_STRUCT_IMPL( \ + (0)NAMESPACE_SEQ, \ + NAME, \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \ + 2) \ + \ + BOOST_FUSION_ADAPT_STRUCT( \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ) NAME, \ + ATTRIBUTES) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/adapt_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/adapt_base.hpp new file mode 100644 index 0000000000..503fc2361c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/adapt_base.hpp @@ -0,0 +1,241 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS(SEQ) \ + BOOST_PP_SEQ_HEAD(SEQ) \ + BOOST_PP_EMPTY() + +#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(SEQ) \ + BOOST_PP_IF( \ + BOOST_PP_SEQ_HEAD(SEQ), \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS, \ + BOOST_PP_SEQ_HEAD)(BOOST_PP_SEQ_TAIL(SEQ)) + +#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL_C(R, _, ELEM) \ + (typename ELEM) +#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL(SEQ) \ + BOOST_PP_SEQ_ENUM( \ + BOOST_PP_SEQ_FOR_EACH( \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL_C, \ + _, \ + BOOST_PP_SEQ_TAIL(SEQ))) +#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(SEQ) \ + BOOST_PP_IF( \ + BOOST_PP_SEQ_HEAD(SEQ), \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL, \ + BOOST_PP_TUPLE_EAT(1))(SEQ) + +#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS +# define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \ + MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct tag_of< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) MODIFIER \ + , void \ + > \ + { \ + typedef TAG type; \ + }; +#else +# define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \ + MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct tag_of \ + { \ + typedef TAG type; \ + }; +#endif + +#define BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL(R,DATA,I,ATTRIBUTE) \ + BOOST_PP_TUPLE_ELEM(3,0,DATA)( \ + BOOST_PP_TUPLE_ELEM(3,1,DATA), \ + BOOST_PP_TUPLE_ELEM(3,2,DATA), \ + I, \ + ATTRIBUTE) + +#ifdef BOOST_MSVC +# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM(R,_,ELEM) \ + typedef ELEM ELEM; +# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL(SEQ) \ + BOOST_PP_SEQ_FOR_EACH( \ + BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM, \ + _, \ + BOOST_PP_SEQ_TAIL(SEQ)) +# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ) \ + BOOST_PP_IF( \ + BOOST_PP_SEQ_HEAD(SEQ), \ + BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL, \ + BOOST_PP_TUPLE_EAT(1))(SEQ) +#else +# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ) +#endif + +#define BOOST_FUSION_ADAPT_STRUCT_C_BASE( \ + TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct access::struct_member< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + > \ + { \ + typedef \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \ + attribute_type; \ + BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \ + TEMPLATE_PARAMS_SEQ) \ + \ + typedef attribute_type type; \ + \ + template \ + struct apply \ + { \ + typedef typename \ + add_reference< \ + typename mpl::eval_if< \ + is_const \ + , add_const \ + , mpl::identity \ + >::type \ + >::type \ + type; \ + \ + static type \ + call(Seq& seq) \ + { \ + return seq.PREFIX() \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE); \ + } \ + }; \ + }; \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct struct_member_name< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + , I \ + > \ + { \ + typedef char const* type; \ + \ + static type \ + call() \ + { \ + return BOOST_PP_STRINGIZE( \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)); \ + } \ + }; + +#define BOOST_FUSION_ADAPT_STRUCT_BASE( \ + TEMPLATE_PARAMS_SEQ, \ + NAME_SEQ, \ + TAG, \ + IS_VIEW, \ + ATTRIBUTES_SEQ, \ + ATTRIBUTES_CALLBACK) \ + \ +namespace boost \ +{ \ + namespace fusion \ + { \ + namespace traits \ + { \ + BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \ + BOOST_PP_EMPTY(), TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \ + BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \ + const, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \ + } \ + \ + namespace extension \ + { \ + BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL, \ + (ATTRIBUTES_CALLBACK,TEMPLATE_PARAMS_SEQ,NAME_SEQ), \ + ATTRIBUTES_SEQ) \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \ + TEMPLATE_PARAMS_SEQ) \ + > \ + struct struct_size \ + : mpl::int_ \ + {}; \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \ + TEMPLATE_PARAMS_SEQ) \ + > \ + struct struct_is_view< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ + > \ + : mpl::BOOST_PP_IF(IS_VIEW,true_,false_) \ + {}; \ + } \ + } \ + \ + namespace mpl \ + { \ + template \ + struct sequence_tag; \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \ + TEMPLATE_PARAMS_SEQ) \ + > \ + struct sequence_tag \ + { \ + typedef fusion::fusion_sequence_tag type; \ + }; \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \ + TEMPLATE_PARAMS_SEQ) \ + > \ + struct sequence_tag< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const \ + > \ + { \ + typedef fusion::fusion_sequence_tag type; \ + }; \ + } \ +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/at_impl.hpp new file mode 100644 index 0000000000..99c63e9a34 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/at_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_AT_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_AT_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + : access::struct_member< + typename remove_const::type + , N::value + >::template apply + {}; + }; + + template <> + struct at_impl + : at_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/begin_impl.hpp new file mode 100644 index 0000000000..80321ee125 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/begin_impl.hpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_BEGIN_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_BEGIN_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef + basic_iterator< + struct_iterator_tag + , random_access_traversal_tag + , Seq + , 0 + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; + + template <> + struct begin_impl + { + template + struct apply + { + typedef + basic_iterator< + struct_iterator_tag + , assoc_struct_category + , Seq + , 0 + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/category_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/category_of_impl.hpp new file mode 100644 index 0000000000..81350e6a8f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/category_of_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_CATEGORY_OF_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_CATEGORY_OF_IMPL_HPP + +namespace boost { namespace fusion +{ + namespace extension + { + template + struct category_of_impl; + + template<> + struct category_of_impl + { + template + struct apply + { + typedef random_access_traversal_tag type; + }; + }; + + template<> + struct category_of_impl + { + template + struct apply + { + typedef assoc_struct_category type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/define_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/define_struct.hpp new file mode 100644 index 0000000000..5f761463e9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/define_struct.hpp @@ -0,0 +1,308 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEFINE_STRUCT_HPP +#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEFINE_STRUCT_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_FUSION_DEFINE_STRUCT_COPY_CTOR_FILLER_I( \ + R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + \ + BOOST_PP_COMMA_IF(I) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)( \ + other_self.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)) + +#define BOOST_FUSION_DEFINE_STRUCT_ASSIGN_FILLER_I( \ + R, ATTRIBUTE_TUPEL_SIZE, I_, ATTRIBUTE) \ + \ + BOOST_PP_EXPR_IF( \ + I_, \ + typedef typename \ + boost::fusion::result_of::next< \ + BOOST_PP_CAT(I,BOOST_PP_DEC(I_)) \ + >::type \ + BOOST_PP_CAT(I,I_); \ + BOOST_PP_CAT(I,I_) BOOST_PP_CAT(i,I_)= \ + boost::fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(I_))); \ + ) \ + \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)= \ + boost::fusion::deref(BOOST_PP_CAT(i,I_)); + +#define BOOST_FUSION_DEFINE_STRUCT_ASSIGN_OP( \ + ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + template \ + self_type& \ + operator=(Seq const& seq) \ + { \ + typedef typename \ + boost::fusion::result_of::begin::type \ + I0; \ + I0 i0=boost::fusion::begin(seq); \ + \ + BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_DEFINE_STRUCT_ASSIGN_FILLER_I, \ + ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTES_SEQ) \ + \ + return *this; \ + } + +#define BOOST_FUSION_DEFINE_STRUCT_ATTR_I(R, ATTRIBUTE_TUPEL_SIZE, ATTRIBUTE) \ + \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,0,ATTRIBUTE) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE); + +#define BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_FILLER_I( \ + R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + \ + BOOST_PP_COMMA_IF(I) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)( \ + boost::fusion::deref(boost::fusion::advance_c(boost::fusion::begin( \ + seq)))) + +#define BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_DISABLER( \ + ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + , typename boost::disable_if< \ + boost::is_convertible< \ + Seq const& \ + , BOOST_PP_TUPLE_ELEM( \ + ATTRIBUTE_TUPEL_SIZE, \ + 0, \ + BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ)) \ + > \ + >::type* =0 + +#define BOOST_FUSION_DEFINE_STRUCT_SEQ_DEFAULT_CTOR_FILLER_I( \ + R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + \ + BOOST_PP_COMMA_IF(I) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)() + +#define BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + BOOST_PP_SEQ_FOR_EACH_R( \ + 1, \ + BOOST_FUSION_DEFINE_STRUCT_ATTR_I, \ + ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTES_SEQ) \ + \ + NAME() \ + : BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_DEFINE_STRUCT_SEQ_DEFAULT_CTOR_FILLER_I, \ + ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTES_SEQ) \ + {} \ + \ + NAME(self_type const& other_self) \ + : BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_DEFINE_STRUCT_COPY_CTOR_FILLER_I, \ + ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTES_SEQ) \ + {} \ + \ + template \ + NAME(Seq const& seq \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ + BOOST_PP_TUPLE_EAT(2), \ + BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_DISABLER)( \ + ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + ) \ + : BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_FILLER_I, \ + ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTES_SEQ) \ + {} \ + \ + BOOST_FUSION_DEFINE_STRUCT_ASSIGN_OP(ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) + +#define BOOST_FUSION_DEFINE_STRUCT_CTOR_1( \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + explicit \ + NAME(boost::call_traits< \ + BOOST_PP_TUPLE_ELEM( \ + ATTRIBUTE_TUPEL_SIZE,0,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ)) \ + >::param_type arg) \ + : BOOST_PP_TUPLE_ELEM( \ + ATTRIBUTE_TUPEL_SIZE,1,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))(arg) \ + {} + +#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1( \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + explicit \ + NAME(typename boost::call_traits< \ + typename boost::fusion::detail::get_first_arg< \ + BOOST_PP_TUPLE_ELEM( \ + ATTRIBUTE_TUPEL_SIZE, \ + 0, \ + BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ)) \ + , BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ) \ + >::type \ + >::param_type arg) \ + : BOOST_PP_TUPLE_ELEM( \ + ATTRIBUTE_TUPEL_SIZE,1,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))(arg) \ + {} + +#define BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I( \ + R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + \ + BOOST_PP_COMMA_IF(I) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)(BOOST_PP_CAT(_,I)) + +#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I(R, DATA, I, ATTRIBUTE) \ + \ + BOOST_PP_COMMA_IF(I) \ + typename boost::call_traits< \ + typename boost::fusion::detail::get_first_arg< \ + BOOST_PP_TUPLE_ELEM( \ + BOOST_PP_TUPLE_ELEM(3,0,DATA), \ + 0, \ + ATTRIBUTE) \ + , BOOST_PP_TUPLE_ELEM(3,2,DATA) \ + >::type \ + >::param_type BOOST_PP_CAT(_,I) + +#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N( \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I, \ + ( \ + ATTRIBUTE_TUPEL_SIZE, \ + BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ), \ + BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ) \ + ), \ + ATTRIBUTES_SEQ)) \ + : BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I, \ + ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTES_SEQ) \ + {} + +#define BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I( \ + R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + \ + BOOST_PP_COMMA_IF(I) \ + boost::call_traits< \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,0,ATTRIBUTE) \ + >::param_type BOOST_PP_CAT(_,I) + +#define BOOST_FUSION_DEFINE_STRUCT_CTOR_N( \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I, \ + ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTES_SEQ)) \ + : BOOST_PP_SEQ_FOR_EACH_I_R( \ + 1, \ + BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I, \ + ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTES_SEQ) \ + {} + +#define BOOST_FUSION_DEFINE_STRUCT_CTOR(ATTRIBUTES_SEQ) \ + BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ + BOOST_FUSION_DEFINE_STRUCT_CTOR_N, \ + BOOST_FUSION_DEFINE_STRUCT_CTOR_1) + +#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR(ATTRIBUTES_SEQ) \ + BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ + BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N, \ + BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1) + +#define BOOST_FUSION_DEFINE_STRUCT_IMPL( \ + NAMESPACE_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ) \ + \ + struct NAME \ + { \ + typedef NAME self_type; \ + \ + BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + BOOST_FUSION_DEFINE_STRUCT_CTOR(ATTRIBUTES_SEQ)( \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + }; \ + \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ) + +#define BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL( \ + TEMPLATE_PARAMS_SEQ, \ + NAMESPACE_SEQ, \ + NAME, \ + ATTRIBUTES_SEQ, \ + ATTRIBUTE_TUPEL_SIZE) \ + \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ) \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL( \ + (0)TEMPLATE_PARAMS_SEQ) \ + > \ + struct NAME \ + { \ + typedef NAME self_type; \ + \ + BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + \ + BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR(ATTRIBUTES_SEQ)( \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + }; \ + \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ) + +namespace boost { namespace fusion { namespace detail +{ + template + struct get_first_arg + { + typedef A1 type; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/deref_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/deref_data_impl.hpp new file mode 100644 index 0000000000..d3b6ced6c6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/deref_data_impl.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_DATA_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_DATA_IMPL_HPP + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_data_impl; + + template <> + struct deref_data_impl + : deref_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/deref_impl.hpp new file mode 100644 index 0000000000..3f25efef58 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/deref_impl.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_IMPL_HPP + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename + access::struct_member< + typename remove_const::type + , It::index::value + >::template apply + impl; + + typedef typename impl::type type; + + static + type + call(It const& it) + { + return impl::call(*it.seq); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/end_impl.hpp new file mode 100644 index 0000000000..e4f92056bb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/end_impl.hpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_END_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_END_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef + basic_iterator< + struct_iterator_tag + , random_access_traversal_tag + , Seq + , struct_size::type>::value + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; + + template <> + struct end_impl + { + template + struct apply + { + typedef + basic_iterator< + struct_iterator_tag + , assoc_struct_category + , Seq + , struct_size::type>::value + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/extension.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/extension.hpp new file mode 100644 index 0000000000..17edb89dca --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/extension.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_EXTENSION_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_EXTENSION_HPP + +#include + +namespace boost { namespace fusion +{ + struct struct_tag; + struct struct_iterator_tag; + struct assoc_struct_tag; + struct fusion_sequence_tag; + + struct assoc_struct_category + : random_access_traversal_tag, associative_tag + {}; + + namespace extension + { + struct no_such_member; + + struct access + { + template + struct struct_member; + + template + struct adt_attribute_access; + }; + + template + struct adt_attribute_proxy; + + template + struct struct_member_name; + + template + struct struct_size; + + template + struct struct_is_view; + + template + struct struct_assoc_key; + + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp new file mode 100644 index 0000000000..6f8adde5ca --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_SEQUENCE_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_SEQUENCE_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct is_sequence_impl; + + template<> + struct is_sequence_impl + { + template + struct apply + : mpl::true_ + {}; + }; + + template <> + struct is_sequence_impl + : is_sequence_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/is_view_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/is_view_impl.hpp new file mode 100644 index 0000000000..eae0b36403 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/is_view_impl.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_VIEW_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_VIEW_IMPL_HPP + +namespace boost { namespace fusion { namespace extension +{ + template + struct is_view_impl; + + template<> + struct is_view_impl + { + template + struct apply + : struct_is_view::type> + {}; + }; + + template <> + struct is_view_impl + : is_view_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/key_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/key_of_impl.hpp new file mode 100644 index 0000000000..d24a24b1b3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/key_of_impl.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_KEY_OF_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_KEY_OF_IMPL_HPP + +namespace boost { namespace fusion { namespace extension +{ + template + struct key_of_impl; + + template <> + struct key_of_impl + { + template + struct apply + : extension::struct_assoc_key< + typename remove_const::type + , It::index::value + > + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/namespace.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/namespace.hpp new file mode 100644 index 0000000000..0f3ec5e0b1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/namespace.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2009-2010 Hartmut Kaiser + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_NAMESPACE_HPP +#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_NAMESPACE_HPP + +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_BEGIN_I(R,DATA,ELEM) \ + namespace ELEM { +#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_END_I(Z,I,DATA) } +#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION_I(Z,I,ELEM) ELEM:: + +#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ) \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)), \ + BOOST_PP_SEQ_FOR_EACH_R, \ + BOOST_PP_TUPLE_EAT(4))( \ + 1, \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_BEGIN_I, \ + _, \ + BOOST_PP_SEQ_TAIL(NAMESPACE_SEQ)) + +#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ) \ + BOOST_PP_REPEAT_1( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)), \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_END_I, \ + _) + +#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION(NAMESPACE_SEQ) \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)), \ + BOOST_PP_SEQ_FOR_EACH_R, \ + BOOST_PP_TUPLE_EAT(4))( \ + 1, \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION_I, \ + _, \ + BOOST_PP_SEQ_TAIL(NAMESPACE_SEQ)) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/proxy_type.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/proxy_type.hpp new file mode 100644 index 0000000000..bf0a6ebd53 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/proxy_type.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2009-2010 Hartmut Kaiser + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_PROXY_TYPE_HPP +#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_PROXY_TYPE_HPP + +#include + +#define BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \ + WRAPPED_TYPE,NAMESPACE_SEQ,NAME) \ + \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ) \ + \ + struct NAME \ + { \ + NAME(WRAPPED_TYPE& in_obj) \ + : obj(in_obj) \ + {} \ + \ + WRAPPED_TYPE& obj; \ + \ + private: \ + NAME& operator= (NAME const&); \ + }; \ + \ + BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ) + +#define BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE( \ + WRAPPED_TYPE, NAMESPACE_SEQ, NAME) \ + \ + BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \ + WRAPPED_TYPE, (0)NAMESPACE_SEQ, NAME) + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/size_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/size_impl.hpp new file mode 100644 index 0000000000..43a5705744 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/size_impl.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_SIZE_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_SIZE_IMPL_HPP + +namespace boost { namespace fusion { namespace extension +{ + template + struct size_impl; + + template <> + struct size_impl + { + template + struct apply + : struct_size::type> + {}; + }; + + template <> + struct size_impl + : size_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_at_impl.hpp new file mode 100644 index 0000000000..08c82fc0c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_at_impl.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_AT_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_AT_IMPL_HPP + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + : access::struct_member::type, N::value> + {}; + }; + + template <> + struct value_at_impl + : value_at_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp new file mode 100644 index 0000000000..4528b854a4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_DATA_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_DATA_IMPL_HPP + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_data_impl; + + template <> + struct value_of_data_impl + : value_of_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_of_impl.hpp new file mode 100644 index 0000000000..63dcbe52ff --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/adapted/struct/detail/value_of_impl.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_IMPL_HPP +#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_IMPL_HPP + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + : access::struct_member< + typename remove_const::type + , It::index::value + > + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm.hpp new file mode 100644 index 0000000000..74e5272326 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm.hpp @@ -0,0 +1,14 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ALGORITHM_10022005_0549) +#define FUSION_ALGORITHM_10022005_0549 + +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration.hpp new file mode 100644 index 0000000000..c94d4786c6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ALGORITHM_ITERATION_10022005_0549) +#define FUSION_ALGORITHM_ITERATION_10022005_0549 + +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/accumulate.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/accumulate.hpp new file mode 100644 index 0000000000..aa52a99b83 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/accumulate.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ACCUMULATE_09172005_1032) +#define FUSION_ACCUMULATE_09172005_1032 + +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template + struct accumulate + : result_of::fold + {}; + } + + template + inline typename result_of::accumulate::type + accumulate(Sequence& seq, State const& state, F f) + { + return fusion::fold(seq, state, f); + } + + template + inline typename result_of::accumulate::type + accumulate(Sequence const& seq, State const& state, F f) + { + return fusion::fold(seq, state, f); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/detail/fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/detail/fold.hpp new file mode 100644 index 0000000000..56302fb8be --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/detail/fold.hpp @@ -0,0 +1,436 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ALGORITHM_ITERATION_DETAIL_FOLD_HPP +#define BOOST_FUSION_ALGORITHM_ITERATION_DETAIL_FOLD_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +#ifdef BOOST_FUSION_REVERSE_FOLD +# ifdef BOOST_FUSION_ITER_FOLD +# define BOOST_FUSION_FOLD_NAME reverse_iter_fold +# else +# define BOOST_FUSION_FOLD_NAME reverse_fold +# endif + +# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION end +# define BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION prior +# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(IT) \ + typename fusion::result_of::prior::type +# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(IT) fusion::prior(IT) +#else +# ifdef BOOST_FUSION_ITER_FOLD +# define BOOST_FUSION_FOLD_NAME iter_fold +# else +# define BOOST_FUSION_FOLD_NAME fold +# endif + +# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION begin +# define BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION next +# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(IT) IT +# define BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(IT) IT +#endif +#ifdef BOOST_FUSION_ITER_FOLD +# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(IT) IT& +# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) IT +#else +# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(IT) \ + typename fusion::result_of::deref::type +# define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) fusion::deref(IT) +#endif + +namespace boost { namespace fusion +{ + namespace detail + { + template + struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state) + : boost::result_of< + F( + typename add_reference::type>::type, + BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(It)) + > + {}; + + template + struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME) + { + template + static Result + call(State const& state,It0 const& it0,F f) + { + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It0 const + >::type + It1; + It1 it1 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0); + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It1 + >::type + It2; + It2 it2 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1); + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It2 + >::type + It3; + It3 it3 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it2); + + typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)::type State1; + State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)); + + typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)::type State2; + State2 const state2=f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1)); + + typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)::type State3; + State3 const state3=f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2)); + + return BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)< + Result + , N-4 + >::call( + f(state3,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it3)), + fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it3), + f); + } + }; + + template + struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME) + { + template + static Result + call(State const& state,It0 const& it0,F f) + { + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It0 const + >::type + It1; + It1 it1 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0); + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It1 + >::type + It2; + It2 it2 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1); + + typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)::type State1; + State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)); + + typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)::type State2; + State2 const state2=f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1)); + + return f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2)); + } + }; + + template + struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME) + { + template + static Result + call(State const& state,It0 const& it0,F f) + { + typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)::type State1; + State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)); + + return f( + state1, + BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM( + fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0))); + } + }; + + template + struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME) + { + template + static Result + call(State const& state,It0 const& it0,F f) + { + return f(state, + BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)); + } + }; + + template + struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME) + { + template + static Result + call(State const& state,It0 const& it0,F f) + { + return static_cast(state); + } + }; + + template + struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME) + { + typedef typename + BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)< + StateRef + , It0 const + , F + >::type + rest1; + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It0 const + >::type + it1; + typedef typename + BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)< + rest1 + , it1 + , F + >::type + rest2; + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION::type + it2; + typedef typename + BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)< + rest2 + , it2 + , F + >::type + rest3; + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION::type + it3; + + typedef typename + BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)< + typename BOOST_PP_CAT( + BOOST_FUSION_FOLD_NAME, _lvalue_state)< + rest3 + , it3 + , F + >::type + , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + it3 + >::type + , F + , N-4 + >::type + type; + }; + + template + struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)< + StateRef + , It0 + , F + , 3 + > + { + typedef typename + BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)< + StateRef + , It0 const + , F + >::type + rest1; + typedef typename + result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It0 const + >::type + it1; + + typedef typename + BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)< + typename BOOST_PP_CAT( + BOOST_FUSION_FOLD_NAME, _lvalue_state)< + rest1 + , it1 + , F + >::type + , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + it1 const + >::type const + , F + >::type + type; + }; + + template + struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)< + StateRef + , It0 + , F + , 2 + > + : BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)< + typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)< + StateRef + , It0 const + , F + >::type + , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It0 const + >::type const + , F + > + {}; + + template + struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)< + StateRef + , It0 + , F + , 1 + > + : BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)< + StateRef + , It0 const + , F + > + {}; + + template + struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)< + StateRef + , It0 + , F + , 0 + > + { + typedef StateRef type; + }; + + template + struct BOOST_PP_CAT(result_of_first_unrolled,BOOST_FUSION_FOLD_NAME) + { + typedef typename + BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)< + typename boost::result_of< + F( + StateRef, + BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM( + It0 const) + ) + >::type + , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION< + It0 const + >::type + , F + , SeqSize-1 + >::type + type; + }; + + template + struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl) + { + typedef typename + BOOST_PP_CAT( + result_of_first_unrolled,BOOST_FUSION_FOLD_NAME)< + StateRef + , BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(It0) + , F + , SeqSize + >::type + type; + + static type + call(StateRef state, It0 const& it0, F f) + { + return BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)< + type + , SeqSize + >::call(state,BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(it0),f); + } + }; + + template + struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<0,StateRef,It0,F> + { + typedef StateRef type; + + static StateRef + call(StateRef state, It0 const&, F) + { + return static_cast(state); + } + }; + } + + namespace result_of + { + template + struct BOOST_FUSION_FOLD_NAME + : detail::BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)< + size::value + , typename add_reference< + typename add_const::type + >::type + , typename BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION::type + , F + > + {}; + } + + template + inline typename result_of::BOOST_FUSION_FOLD_NAME< + Seq + , State const + , F + >::type + BOOST_FUSION_FOLD_NAME(Seq& seq,State const& state,F f) + { + return result_of::BOOST_FUSION_FOLD_NAME::call( + state, + fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq), + f); + } + + template + inline typename result_of::BOOST_FUSION_FOLD_NAME< + Seq const + , State const + , F + >::type + BOOST_FUSION_FOLD_NAME(Seq const& seq,State const& state,F f) + { + return result_of::BOOST_FUSION_FOLD_NAME::call( + state, + fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq), + f); + } +}} + +#undef BOOST_FUSION_FOLD_NAME +#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION +#undef BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION +#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM +#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM +#undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM +#undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/detail/for_each.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/detail/for_each.hpp new file mode 100644 index 0000000000..a23517c8c7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/detail/for_each.hpp @@ -0,0 +1,130 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FOR_EACH_05052005_1028) +#define FUSION_FOR_EACH_05052005_1028 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { +namespace detail +{ + template + inline void + for_each_linear(First const&, Last const&, F const&, mpl::true_) + { + } + + template + inline void + for_each_linear(First const& first, Last const& last, F const& f, mpl::false_) + { + f(*first); + detail::for_each_linear(fusion::next(first), last, f, + result_of::equal_to::type, Last>()); + } + + + template + inline void + for_each(Sequence& seq, F const& f, Tag) + { + detail::for_each_linear( + fusion::begin(seq) + , fusion::end(seq) + , f + , result_of::equal_to< + typename result_of::begin::type + , typename result_of::end::type>()); + } + + template + struct for_each_unrolled + { + template + static void call(I0 const& i0, F const& f) + { + f(*i0); + typedef typename result_of::next::type I1; + I1 i1(fusion::next(i0)); + f(*i1); + typedef typename result_of::next::type I2; + I2 i2(fusion::next(i1)); + f(*i2); + typedef typename result_of::next::type I3; + I3 i3(fusion::next(i2)); + f(*i3); + for_each_unrolled::call(fusion::next(i3), f); + } + }; + + template<> + struct for_each_unrolled<3> + { + template + static void call(I0 const& i0, F const& f) + { + f(*i0); + typedef typename result_of::next::type I1; + I1 i1(fusion::next(i0)); + f(*i1); + typedef typename result_of::next::type I2; + I2 i2(fusion::next(i1)); + f(*i2); + } + }; + + template<> + struct for_each_unrolled<2> + { + template + static void call(I0 const& i0, F const& f) + { + f(*i0); + typedef typename result_of::next::type I1; + I1 i1(fusion::next(i0)); + f(*i1); + } + }; + + template<> + struct for_each_unrolled<1> + { + template + static void call(I0 const& i0, F const& f) + { + f(*i0); + } + }; + + template<> + struct for_each_unrolled<0> + { + template + static void call(It const&, F const&) + { + } + }; + + template + inline void + for_each(Sequence& seq, F const& f, random_access_traversal_tag) + { + typedef typename result_of::begin::type begin; + typedef typename result_of::end::type end; + for_each_unrolled::type::value>::call(fusion::begin(seq), f); + } +}}} + + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/ext_/for_each_s.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/ext_/for_each_s.hpp new file mode 100644 index 0000000000..9e571d0fe1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/ext_/for_each_s.hpp @@ -0,0 +1,91 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FOR_EACH_S_05022006_1027) +#define FUSION_FOR_EACH_S_05022006_1027 + +#include +#include +#include +#include +#include + +// fwd declarations +namespace boost { namespace fusion +{ + template + void + for_each_s(Sequence& seq, F const& f); + + template + void + for_each_s(Sequence const& seq, F const& f); +}} + +namespace boost { namespace fusion { namespace detail +{ + template + struct for_each_s_bind + { + explicit for_each_s_bind(F const &f) + : f_(f) + {} + + template + void operator ()(Sequence &seq) const + { + fusion::for_each_s(seq, this->f_); + } + + template + void operator ()(Sequence const &seq) const + { + fusion::for_each_s(seq, this->f_); + } + private: + F const &f_; + }; + + template + void for_each_s(Sequence &seq, F const &f, mpl::true_) + { + fusion::for_each_s(fusion::segments(seq), for_each_s_bind(f)); + } + + template + void for_each_s(Sequence &seq, F const &f, mpl::false_) + { + fusion::for_each(seq, f); + } +}}} + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct for_each_s + { + typedef void type; + }; + } + + template + inline void + for_each_s(Sequence& seq, F const& f) + { + detail::for_each_s(seq, f, traits::is_segmented()); + } + + template + inline void + for_each_s(Sequence const& seq, F const& f) + { + detail::for_each_s(seq, f, traits::is_segmented()); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/fold.hpp new file mode 100644 index 0000000000..347fb4f1cd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/fold.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2007 Dan Marsden + Copyright (c) 2009-2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ALGORITHM_ITERATION_FOLD_HPP +#define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/for_each.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/for_each.hpp new file mode 100644 index 0000000000..fffb0f0096 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/for_each.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_FOR_EACH_20070527_0943) +#define BOOST_FUSION_FOR_EACH_20070527_0943 + +#include + +#include + +namespace boost { namespace fusion { + + namespace result_of + { + template + struct for_each + { + typedef void type; + }; + } + + struct random_access_traversal_tag; + + template + inline void + for_each(Sequence& seq, F const& f) + { + detail::for_each(seq, f, typename traits::category_of::type()); + } + + template + inline void + for_each(Sequence const& seq, F const& f) + { + detail::for_each(seq, f, typename traits::category_of::type()); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/iter_fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/iter_fold.hpp new file mode 100644 index 0000000000..59cbfd8c69 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/iter_fold.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_HPP +#define BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_HPP + +#define BOOST_FUSION_ITER_FOLD + +#include + +#undef BOOST_FUSION_ITER_FOLD + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/reverse_fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/reverse_fold.hpp new file mode 100644 index 0000000000..bb09db5d7d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/reverse_fold.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_HPP +#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_HPP + +#define BOOST_FUSION_REVERSE_FOLD + +#include + +#undef BOOST_FUSION_REVERSE_FOLD + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp new file mode 100644 index 0000000000..80079f4864 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_HPP +#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_HPP + +#define BOOST_FUSION_REVERSE_FOLD +#define BOOST_FUSION_ITER_FOLD + +#include + +#undef BOOST_FUSION_REVERSE_FOLD +#undef BOOST_FUSION_ITER_FOLD + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query.hpp new file mode 100644 index 0000000000..488a62a842 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ALGORITHM_QUERY_10022005_0549) +#define FUSION_ALGORITHM_QUERY_10022005_0549 + +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/all.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/all.hpp new file mode 100644 index 0000000000..9d78867c97 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/all.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_ALL_05052005_1238) +#define BOOST_FUSION_ALL_05052005_1238 + +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct all + { + typedef bool type; + }; + } + + template + inline bool + all(Sequence const& seq, F f) + { + return detail::all(seq, f, typename traits::category_of::type()); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/any.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/any.hpp new file mode 100644 index 0000000000..be4ef09964 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/any.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005 Eric Niebler + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ANY_05052005_1230) +#define FUSION_ANY_05052005_1230 + +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct any + { + typedef bool type; + }; + } + + template + inline bool + any(Sequence const& seq, F f) + { + return detail::any(seq, f, typename traits::category_of::type()); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/count.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/count.hpp new file mode 100644 index 0000000000..27e3370e80 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/count.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_COUNT_09162005_0150) +#define BOOST_FUSION_COUNT_09162005_0150 + +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct count + { + typedef int type; + }; + } + + template + inline int + count(Sequence const& seq, T const& x) + { + detail::count_compare f(x); + return fusion::count_if(seq, f); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/count_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/count_if.hpp new file mode 100644 index 0000000000..a080b3b24b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/count_if.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_COUNT_IF_09162005_0137) +#define BOOST_FUSION_COUNT_IF_09162005_0137 + +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct count_if + { + typedef int type; + }; + } + + template + inline int + count_if(Sequence const& seq, F f) + { + return detail::count_if( + seq, f, typename traits::category_of::type()); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/all.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/all.hpp new file mode 100644 index 0000000000..c9284e8680 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/all.hpp @@ -0,0 +1,127 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ALL_05052005_1237) +#define FUSION_ALL_05052005_1237 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + inline bool + linear_all(First const&, Last const&, F const&, mpl::true_) + { + return true; + } + + template + inline bool + linear_all(First const& first, Last const& last, F& f, mpl::false_) + { + typename result_of::deref::type x = *first; + return f(x) && + detail::linear_all( + fusion::next(first) + , last + , f + , result_of::equal_to::type, Last>()); + } + + template + inline bool + all(Sequence const& seq, F f, Tag) + { + return detail::linear_all( + fusion::begin(seq) + , fusion::end(seq) + , f + , result_of::equal_to< + typename result_of::begin::type + , typename result_of::end::type>()); + } + + template + struct unrolled_all + { + template + static bool call(It const& it, F f) + { + return + f(*it) && + f(*fusion::advance_c<1>(it))&& + f(*fusion::advance_c<2>(it)) && + f(*fusion::advance_c<3>(it)) && + detail::unrolled_all::call(fusion::advance_c<4>(it), f); + } + }; + + template<> + struct unrolled_all<3> + { + template + static bool call(It const& it, F f) + { + return + f(*it) && + f(*fusion::advance_c<1>(it)) && + f(*fusion::advance_c<2>(it)); + } + }; + + template<> + struct unrolled_all<2> + { + template + static bool call(It const& it, F f) + { + return + f(*it) && + f(*fusion::advance_c<1>(it)); + } + }; + + template<> + struct unrolled_all<1> + { + template + static bool call(It const& it, F f) + { + return f(*it); + } + }; + + template<> + struct unrolled_all<0> + { + template + static bool call(It const& /*it*/, F /*f*/) + { + return true; + } + }; + + template + inline bool + all(Sequence const& seq, F f, random_access_traversal_tag) + { + typedef typename result_of::begin::type begin; + typedef typename result_of::end::type end; + return detail::unrolled_all::type::value>::call( + fusion::begin(seq), f); + } +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/any.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/any.hpp new file mode 100644 index 0000000000..31bbaa5824 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/any.hpp @@ -0,0 +1,130 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005 Eric Niebler + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ANY_05052005_1229) +#define FUSION_ANY_05052005_1229 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + struct random_access_traversal_tag; +namespace detail +{ + template + inline bool + linear_any(First const&, Last const&, F const&, mpl::true_) + { + return false; + } + + template + inline bool + linear_any(First const& first, Last const& last, F& f, mpl::false_) + { + typename result_of::deref::type x = *first; + return f(x) || + detail::linear_any( + fusion::next(first) + , last + , f + , result_of::equal_to::type, Last>()); + } + + template + inline bool + any(Sequence const& seq, F f, Tag) + { + return detail::linear_any( + fusion::begin(seq) + , fusion::end(seq) + , f + , result_of::equal_to< + typename result_of::begin::type + , typename result_of::end::type>()); + } + + template + struct unrolled_any + { + template + static bool call(It const& it, F f) + { + return + f(*it) || + f(*fusion::advance_c<1>(it))|| + f(*fusion::advance_c<2>(it)) || + f(*fusion::advance_c<3>(it)) || + detail::unrolled_any::call(fusion::advance_c<4>(it), f); + } + }; + + template<> + struct unrolled_any<3> + { + template + static bool call(It const& it, F f) + { + return + f(*it) || + f(*fusion::advance_c<1>(it)) || + f(*fusion::advance_c<2>(it)); + } + }; + + template<> + struct unrolled_any<2> + { + template + static bool call(It const& it, F f) + { + return + f(*it) || + f(*fusion::advance_c<1>(it)); + } + }; + + template<> + struct unrolled_any<1> + { + template + static bool call(It const& it, F f) + { + return f(*it); + } + }; + + template<> + struct unrolled_any<0> + { + template + static bool call(It const& it, F f) + { + return false; + } + }; + + template + inline bool + any(Sequence const& seq, F f, random_access_traversal_tag) + { + typedef typename result_of::begin::type begin; + typedef typename result_of::end::type end; + return detail::unrolled_any::type::value>::call( + fusion::begin(seq), f); + } +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/count.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/count.hpp new file mode 100644 index 0000000000..6c4254c30e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/count.hpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_COUNT_09162005_0158) +#define FUSION_COUNT_09162005_0158 + +#include +#include +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion { namespace detail +{ + template + struct compare_convertible; + + // T1 is convertible to T2 or vice versa + template <> + struct compare_convertible + { + template + static bool + call(T1 const& x, T2 const& y) + { + return x == y; + } + }; + + // T1 is NOT convertible to T2 NOR vice versa + template <> + struct compare_convertible + { + template + static bool + call(T1 const&, T2 const&) + { + return false; + } + }; + + template + struct count_compare + { + typedef typename detail::call_param::type param; + count_compare(param in_x) + : x(in_x) {} + + template + bool + operator()(T2 const& y) + { + return + compare_convertible< + mpl::or_< + is_convertible + , is_convertible + >::value + >::call(x, y); + } + + param x; + }; +}}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/count_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/count_if.hpp new file mode 100644 index 0000000000..d270b5914c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/count_if.hpp @@ -0,0 +1,170 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_COUNT_IF_09162005_0141) +#define BOOST_FUSION_COUNT_IF_09162005_0141 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + struct random_access_traversal_tag; +namespace detail +{ + template + inline int + linear_count_if(First const&, Last const&, F const&, mpl::true_) + { + return 0; + } + + template + inline int + linear_count_if(First const& first, Last const& last, F& f, mpl::false_) + { + int n = + detail::linear_count_if( + fusion::next(first) + , last + , f + , result_of::equal_to::type, Last>()); + if (f(*first)) + ++n; + return n; + } + + template + inline int + count_if(Sequence const& seq, F f, Tag) + { + return detail::linear_count_if( + fusion::begin(seq) + , fusion::end(seq) + , f + , result_of::equal_to< + typename result_of::begin::type + , typename result_of::end::type>()); + } + + template + struct unrolled_count_if + { + template + static int call(I0 const& i0, F f) + { + int ct = unrolled_count_if:: + call(fusion::advance_c<4>(i0), f); + if(f(*i0)) + ++ct; + + typedef typename result_of::next::type I1; + I1 i1(fusion::next(i0)); + if(f(*i1)) + ++ct; + + typedef typename result_of::next::type I2; + I2 i2(fusion::next(i1)); + if(f(*i2)) + ++ct; + + typedef typename result_of::next::type I3; + I3 i3(fusion::next(i2)); + if(f(*i3)) + ++ct; + + return ct; + } + }; + + template<> + struct unrolled_count_if<3> + { + template + static int call(I0 const& i0, F f) + { + int ct = 0; + if(f(*i0)) + ++ct; + + typedef typename result_of::next::type I1; + I1 i1(fusion::next(i0)); + if(f(*i1)) + ++ct; + + typedef typename result_of::next::type I2; + I2 i2(fusion::next(i1)); + if(f(*i2)) + ++ct; + + return ct; + } + }; + + template<> + struct unrolled_count_if<2> + { + template + static int call(I0 const& i0, F f) + { + int ct = 0; + + if(f(*i0)) + ++ct; + + typedef typename result_of::next::type I1; + I1 i1(fusion::next(i0)); + if(f(*i1)) + ++ct; + + return ct; + } + }; + + template<> + struct unrolled_count_if<1> + { + template + static int call(I0 const& i0, F f) + { + int ct = 0; + if(f(*i0)) + ++ct; + return ct; + } + }; + + + template<> + struct unrolled_count_if<0> + { + template + static int call(I0 const&, F) + { + return 0; + } + }; + + template + inline int + count_if(Sequence const& seq, F f, random_access_traversal_tag) + { + typedef typename result_of::begin::type begin; + typedef typename result_of::end::type end; + return detail::unrolled_count_if::type::value>:: + call(fusion::begin(seq), f); + } +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/find_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/find_if.hpp new file mode 100644 index 0000000000..5d2a74196f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/detail/find_if.hpp @@ -0,0 +1,232 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 Dan Marsden + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FIND_IF_05052005_1107) +#define FUSION_FIND_IF_05052005_1107 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + struct random_access_traversal_tag; +namespace detail +{ + template + struct apply_filter + { + typedef typename mpl::apply1< + Pred, Iterator>::type type; + BOOST_STATIC_CONSTANT(int, value = type::value); + }; + + template + struct main_find_if; + + template + struct recursive_find_if + { + typedef typename + main_find_if< + typename result_of::next::type, Last, Pred + >::type + type; + }; + + template + struct main_find_if + { + typedef mpl::or_< + result_of::equal_to + , apply_filter > + filter; + + typedef typename + mpl::eval_if< + filter + , mpl::identity + , recursive_find_if + >::type + type; + }; + + template< + typename First, typename Last, + typename Pred, bool> + struct choose_find_if; + + template + struct choose_find_if + : main_find_if + {}; + + template + struct unroll_again; + + template + struct apply_offset_filter + { + typedef typename result_of::advance_c::type Shifted; + typedef typename + mpl::apply1< + Pred + , Shifted + >::type + type; + BOOST_STATIC_CONSTANT(int, value = type::value); + }; + + template + struct unrolled_find_if + { + typedef typename mpl::eval_if< + apply_filter, + mpl::identity, + mpl::eval_if< + apply_offset_filter, + result_of::advance_c, + mpl::eval_if< + apply_offset_filter, + result_of::advance_c, + mpl::eval_if< + apply_offset_filter, + result_of::advance_c, + unroll_again< + Iter, + Pred, + n, + 4> > > > >::type type; + }; + + template + struct unrolled_find_if + { + typedef typename mpl::eval_if< + apply_filter, + mpl::identity, + mpl::eval_if< + apply_offset_filter, + result_of::advance_c, + mpl::eval_if< + apply_offset_filter, + result_of::advance_c, + result_of::advance_c > > >::type type; + }; + + template + struct unrolled_find_if + { + typedef typename mpl::eval_if< + apply_filter, + mpl::identity, + mpl::eval_if< + apply_offset_filter, + result_of::advance_c, + result_of::advance_c > >::type type; + }; + + template + struct unrolled_find_if + { + typedef typename mpl::eval_if< + apply_filter, + mpl::identity, + result_of::advance_c >::type type; + }; + + template + struct unroll_again + { + typedef typename unrolled_find_if< + typename result_of::advance_c::type, + Pred, + n-unrolling>::type type; + }; + + template + struct unrolled_find_if + { + typedef Iter type; + }; + + template + struct choose_find_if + { + typedef typename result_of::distance::type N; + typedef typename unrolled_find_if::type type; + }; + + template + struct static_find_if + { + typedef typename + choose_find_if< + First + , Last + , typename mpl::lambda::type + , is_base_of::type>::value + >::type + type; + + template + static type + recursive_call(Iterator const& iter, mpl::true_) + { + return iter; + } + + template + static type + recursive_call(Iterator const& iter, mpl::false_) + { + return recursive_call(fusion::next(iter)); + } + + template + static type + recursive_call(Iterator const& iter) + { + typedef result_of::equal_to found; + return recursive_call(iter, found()); + } + + template + static type + choose_call(Iterator const& iter, Tag) + { + return recursive_call(iter); + } + + template + static type + choose_call(Iterator const& iter, random_access_traversal_tag) + { + typedef typename result_of::distance::type N; + return fusion::advance(iter); + } + + template + static type + call(Iterator const& iter) + { + return choose_call(iter, typename traits::category_of::type()); + } + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/ext_/find_if_s.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/ext_/find_if_s.hpp new file mode 100644 index 0000000000..0b1852a68d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/ext_/find_if_s.hpp @@ -0,0 +1,222 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FIND_IF_S_05152006_1027) +#define FIND_IF_S_05152006_1027 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// fwd declarations +namespace boost { namespace fusion +{ + namespace detail + { + template::value> + struct static_find_if_s_recurse; + } + + namespace result_of + { + template + struct find_if_s; + } +}} + +namespace boost { namespace fusion { namespace detail +{ + + template::value> + struct is_found + : mpl::not_::type> > + {}; + + template + struct is_found + : mpl::not_ > + {}; + + template< + typename SegmentedRange + , typename Where + , typename Sequence = typename remove_reference< + typename result_of::deref< + typename SegmentedRange::iterator_type + >::type + >::type + , bool IsSegmented = traits::is_segmented::value + > + struct as_segmented_cons + { + typedef cons< + SegmentedRange + , cons > + > type; + + static type call(SegmentedRange const &range, Where const &where) + { + return fusion::make_cons( + range + , fusion::make_cons( + segmented_range(*fusion::begin(range), where) + ) + ); + } + }; + + template< + typename SegmentedRange + , typename Where + , typename Sequence + > + struct as_segmented_cons + { + typedef cons type; + + static type call(SegmentedRange const &range, Where const &where) + { + return fusion::make_cons(range, where); + } + }; + + template< + typename SegmentedRange + , typename Pred + , bool IsEmpty = is_empty::value + > + struct static_find_if_s_seg + { + typedef typename SegmentedRange::iterator_type first; + typedef typename result_of::deref::type segment_ref; + typedef typename remove_reference::type segment; + typedef static_find_if_s_recurse where; + typedef range_next next; + typedef is_found is_found; + typedef as_segmented_cons found; + typedef static_find_if_s_seg not_found; + typedef typename mpl::eval_if::type type; + + static type call(SegmentedRange const &range) + { + return call_(range, is_found()); + } + + private: + static type call_(SegmentedRange const &range, mpl::true_) + { + return found::call(range, where::call(*range.where_)); + } + + static type call_(SegmentedRange const &range, mpl::false_) + { + return not_found::call(next::call(range)); + } + }; + + template< + typename SegmentedRange + , typename Pred + > + struct static_find_if_s_seg + { + typedef nil type; + + static type call(SegmentedRange const &) + { + return nil(); + } + }; + + template + struct static_find_if_s_recurse + { + typedef typename as_segmented_range::type range; + typedef static_find_if_s_seg find_if; + typedef typename find_if::type type; + + static type call(Sequence &seq) + { + return find_if::call(range(fusion::segments(seq))); + } + }; + + template + struct static_find_if_s_recurse + { + typedef typename result_of::find_if::type type; + + static type call(Sequence &seq) + { + return fusion::find_if(seq); + } + }; + + template::value> + struct static_find_if_s + : static_find_if_s_recurse + {}; + + template + struct static_find_if_s + { + typedef typename as_segmented_range::type range; + typedef static_find_if_s_recurse find_if; + typedef typename find_if::type found; + + typedef segmented_iterator::type> type; + + static type call(Sequence &seq) + { + return type(reverse_cons::call(find_if::call(seq))); + } + }; +}}} + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct find_if_s + { + typedef typename + detail::static_find_if_s< + Sequence + , Pred + >::type + type; + }; + } + + template + typename lazy_disable_if< + is_const + , result_of::find_if_s + >::type + find_if_s(Sequence& seq) + { + return detail::static_find_if_s::call(seq); + } + + template + typename result_of::find_if_s::type + find_if_s(Sequence const& seq) + { + return detail::static_find_if_s::call(seq); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/find.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/find.hpp new file mode 100644 index 0000000000..6beb900587 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/find.hpp @@ -0,0 +1,72 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FIND_05052005_1107) +#define FUSION_FIND_05052005_1107 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template < + typename Sequence + , typename T + > + struct find + { + typedef + detail::static_find_if< + typename result_of::begin::type + , typename result_of::end::type + , is_same< + typename mpl::if_< + traits::is_associative + , key_of + , value_of + >::type + , T + > + > + filter; + + typedef typename filter::type type; + }; + } + + template + inline typename + lazy_disable_if< + is_const + , result_of::find + >::type const + find(Sequence& seq) + { + typedef typename result_of::find::filter filter; + return filter::call(fusion::begin(seq)); + } + + template + inline typename result_of::find::type const + find(Sequence const& seq) + { + typedef typename result_of::find::filter filter; + return filter::call(fusion::begin(seq)); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/find_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/find_if.hpp new file mode 100644 index 0000000000..3950958c38 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/find_if.hpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FIND_IF_05052005_1108) +#define FUSION_FIND_IF_05052005_1108 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct find_if + { + typedef + detail::static_find_if< + typename result_of::begin::type + , typename result_of::end::type + , mpl::bind1< + typename mpl::lambda::type + , mpl::bind1,mpl::_1> + > + > + filter; + + typedef typename filter::type type; + }; + } + + template + inline typename + lazy_disable_if< + is_const + , result_of::find_if + >::type + find_if(Sequence& seq) + { + typedef typename result_of::find_if::filter filter; + return filter::call(fusion::begin(seq)); + } + + template + inline typename result_of::find_if::type const + find_if(Sequence const& seq) + { + typedef typename result_of::find_if::filter filter; + return filter::call(fusion::begin(seq)); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/none.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/none.hpp new file mode 100644 index 0000000000..f31f4c9cf7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/query/none.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_NONE_07062005_1128) +#define BOOST_FUSION_NONE_07062005_1128 + +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct none + { + typedef bool type; + }; + } + + template + inline bool + none(Sequence const& seq, F f) + { + return !fusion::any(seq, f); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation.hpp new file mode 100644 index 0000000000..9221cd45c6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ALGORITHM_TRANSFORMATION_10022005_0551) +#define FUSION_ALGORITHM_TRANSFORMATION_10022005_0551 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/clear.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/clear.hpp new file mode 100644 index 0000000000..992a76ee5e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/clear.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CLEAR_09172005_1127) +#define FUSION_CLEAR_09172005_1127 + +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct clear + { + typedef vector0<> type; + }; + } + + template + inline typename result_of::clear::type + clear(Sequence const& /*seq*/) + { + return vector0<>(); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/detail/replace.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/detail/replace.hpp new file mode 100644 index 0000000000..8005aad04f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/detail/replace.hpp @@ -0,0 +1,73 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REPLACE_08182005_0841) +#define FUSION_REPLACE_08182005_0841 + +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct replacer_helper; + + template <> + struct replacer_helper + { + template + static U& + call(U& x, T const&, T const&) + { + return x; + } + }; + + template <> + struct replacer_helper + { + template + static U + call(U& x, T const& old_value, T const& new_value) + { + return (x == old_value) ? new_value : x; + } + }; + + template + struct replacer + { + replacer(T const& in_old_value, T const& in_new_value) + : old_value(in_old_value), new_value(in_new_value) {} + + template + struct result; + + template + struct result(U2)> + { + typedef typename remove_reference::type value; + typedef typename + mpl::if_, value, value const&>::type + type; + }; + + template + typename result::type + operator()(U const& x) const + { + return replacer_helper::value>:: + call(x, old_value, new_value); + } + + T old_value; + T new_value; + }; +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/detail/replace_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/detail/replace_if.hpp new file mode 100644 index 0000000000..fa6068aa27 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/detail/replace_if.hpp @@ -0,0 +1,73 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REPLACE_IF_08182005_0946) +#define FUSION_REPLACE_IF_08182005_0946 + +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct replacer_if_helper; + + template <> + struct replacer_if_helper + { + template + static U& + call(U& x, F&, T const&) + { + return x; + } + }; + + template <> + struct replacer_if_helper + { + template + static U + call(U& x, F& f, T const& new_value) + { + return f(x) ? new_value : x; + } + }; + + template + struct replacer_if + { + replacer_if(F in_f, T const& in_new_value) + : f(in_f), new_value(in_new_value) {} + + template + struct result; + + template + struct result(U)> + { + typedef typename remove_reference::type value; + typedef typename + mpl::if_, value, value const&>::type + type; + }; + + template + typename result::type + operator()(U const& x) const + { + return replacer_if_helper::value>:: + call(x, f, new_value); + } + + F f; + T new_value; + }; +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/erase.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/erase.hpp new file mode 100644 index 0000000000..d0405c307d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/erase.hpp @@ -0,0 +1,108 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ERASE_07232005_0534) +#define FUSION_ERASE_07232005_0534 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct compute_erase_last // put this in detail!!! + { + typedef typename result_of::end::type seq_last_type; + typedef typename convert_iterator::type first_type; + typedef typename + mpl::if_< + result_of::equal_to + , first_type + , typename result_of::next::type + >::type + type; + + static type + call(First const& first, mpl::false_) + { + return fusion::next(convert_iterator::call(first)); + } + + static type + call(First const& first, mpl::true_) + { + return convert_iterator::call(first); + } + + static type + call(First const& first) + { + return call(first, result_of::equal_to()); + } + }; + + template < + typename Sequence + , typename First + , typename Last = typename compute_erase_last::type> + struct erase + { + typedef typename result_of::begin::type seq_first_type; + typedef typename result_of::end::type seq_last_type; + BOOST_STATIC_ASSERT((!result_of::equal_to::value)); + + typedef typename convert_iterator::type first_type; + typedef typename convert_iterator::type last_type; + typedef iterator_range left_type; + typedef iterator_range right_type; + typedef joint_view type; + }; + } + + template + typename result_of::erase::type + erase(Sequence const& seq, First const& first) + { + typedef result_of::erase result_of; + typedef typename result_of::left_type left_type; + typedef typename result_of::right_type right_type; + typedef typename result_of::type result_type; + + left_type left( + fusion::begin(seq) + , convert_iterator::call(first)); + right_type right( + fusion::result_of::compute_erase_last::call(first) + , fusion::end(seq)); + return result_type(left, right); + } + + template + typename result_of::erase::type + erase(Sequence const& seq, First const& first, Last const& last) + { + typedef result_of::erase result_of; + typedef typename result_of::left_type left_type; + typedef typename result_of::right_type right_type; + typedef typename result_of::type result_type; + + left_type left(fusion::begin(seq), first); + right_type right(last, fusion::end(seq)); + return result_type(left, right); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/erase_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/erase_key.hpp new file mode 100644 index 0000000000..03128695ea --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/erase_key.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ERASE_KEY_10022005_1851) +#define FUSION_ERASE_KEY_10022005_1851 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct erase_key + : erase::type> + {}; + } + + template + inline typename result_of::erase_key::type + erase_key(Sequence const& seq) + { + return erase(seq, find(seq)); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/filter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/filter.hpp new file mode 100644 index 0000000000..52bf6af3fc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/filter.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FILTER_02122005_1839) +#define FUSION_FILTER_02122005_1839 + +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct filter + { + typedef filter_view > type; + }; + } + + template + inline typename result_of::filter::type + filter(Sequence const& seq) + { + return filter_view >(seq); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/filter_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/filter_if.hpp new file mode 100644 index 0000000000..d13113b1e5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/filter_if.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FILTER_IF_07172005_0818) +#define FUSION_FILTER_IF_07172005_0818 + +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct filter_if + { + typedef filter_view type; + }; + } + + template + inline typename result_of::filter_if::type + filter_if(Sequence const& seq) + { + return filter_view(seq); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/insert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/insert.hpp new file mode 100644 index 0000000000..1702bc19a2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/insert.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INSERT_07222005_0730) +#define FUSION_INSERT_07222005_0730 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct insert + { + typedef typename detail::as_fusion_element::type element_type; + typedef typename convert_iterator::type pos_type; + typedef typename result_of::begin::type first_type; + typedef typename result_of::end::type last_type; + + typedef iterator_range left_type; + typedef iterator_range right_type; + typedef fusion::single_view single_view; + typedef joint_view left_insert_type; + typedef joint_view type; + }; + } + + template + inline typename result_of::insert< + Sequence const, Position, T>::type + insert(Sequence const& seq, Position const& pos, T const& x) + { + typedef result_of::insert< + Sequence const, Position, T> + result_of; + typedef typename result_of::left_type left_type; + typedef typename result_of::right_type right_type; + typedef typename result_of::single_view single_view; + typedef typename result_of::left_insert_type left_insert_type; + typedef typename result_of::type result; + + left_type left(fusion::begin(seq), convert_iterator::call(pos)); + right_type right(convert_iterator::call(pos), fusion::end(seq)); + single_view insert(x); + left_insert_type left_insert(left, insert); + return result(left_insert, right); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/insert_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/insert_range.hpp new file mode 100644 index 0000000000..1915c413e9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/insert_range.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INSERT_RANGE_009172005_1147) +#define FUSION_INSERT_RANGE_009172005_1147 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct insert_range + { + typedef typename convert_iterator::type pos_type; + typedef typename result_of::begin::type first_type; + typedef typename result_of::end::type last_type; + + typedef iterator_range left_type; + typedef iterator_range right_type; + typedef joint_view left_insert_type; + typedef joint_view type; + }; + } + + template + inline typename result_of::insert_range::type + insert_range(Sequence const& seq, Position const& pos, Range const& range) + { + typedef result_of::insert_range result_of; + typedef typename result_of::left_type left_type; + typedef typename result_of::right_type right_type; + typedef typename result_of::left_insert_type left_insert_type; + typedef typename result_of::type result; + + left_type left(fusion::begin(seq), convert_iterator::call(pos)); + right_type right(convert_iterator::call(pos), fusion::end(seq)); + left_insert_type left_insert(left, range); + return result(left_insert, right); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/join.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/join.hpp new file mode 100644 index 0000000000..4ed78b5fbd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/join.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_JOIN_200601222109) +#define FUSION_JOIN_200601222109 + +#include + +namespace boost { namespace fusion { + + namespace result_of + { + template + struct join + { + typedef joint_view type; + }; + } + + template + inline typename result_of::join::type + join(LhSequence const& lhs, RhSequence const& rhs) + { + return typename result_of::join::type( + lhs, rhs); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/pop_back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/pop_back.hpp new file mode 100644 index 0000000000..6eb743fd7f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/pop_back.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_POP_BACK_09172005_1038) +#define FUSION_POP_BACK_09172005_1038 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct pop_back + { + typedef + iterator_range< + typename begin::type + , typename prior< + typename end::type + >::type + > + type; + }; + } + + template + inline typename result_of::pop_back::type + pop_back(Sequence const& seq) + { + typedef typename result_of::pop_back::type result; + return result(fusion::begin(seq), fusion::prior(fusion::end(seq))); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/pop_front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/pop_front.hpp new file mode 100644 index 0000000000..aed524d3f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/pop_front.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_POP_FRONT_09172005_1115) +#define FUSION_POP_FRONT_09172005_1115 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct pop_front + { + typedef + iterator_range< + typename next< + typename begin::type + >::type + , typename end::type + > + type; + }; + } + + template + inline typename result_of::pop_front::type + pop_front(Sequence const& seq) + { + typedef typename result_of::pop_front::type result; + return result(fusion::next(fusion::begin(seq)), fusion::end(seq)); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/push_back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/push_back.hpp new file mode 100644 index 0000000000..4fadc79c5a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/push_back.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PUSH_BACK_07162005_0235) +#define FUSION_PUSH_BACK_07162005_0235 + +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct push_back + { + typedef fusion::single_view::type> single_view; + typedef joint_view type; + }; + } + + template + inline typename result_of::push_back::type + push_back(Sequence const& seq, T const& x) + { + typedef typename result_of::push_back push_back; + typedef typename push_back::single_view single_view; + typedef typename push_back::type result; + single_view x_(x); + return result(seq, x_); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/push_front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/push_front.hpp new file mode 100644 index 0000000000..10f9fc104e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/push_front.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PUSH_FRONT_07162005_0749) +#define FUSION_PUSH_FRONT_07162005_0749 + +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct push_front + { + typedef fusion::single_view::type> single_view; + typedef joint_view type; + }; + } + + template + inline typename result_of::push_front::type + push_front(Sequence const& seq, T const& x) + { + typedef typename result_of::push_front push_front; + typedef typename push_front::single_view single_view; + typedef typename push_front::type result; + single_view x_(x); + return result(x_, seq); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/remove.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/remove.hpp new file mode 100644 index 0000000000..01718d323b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/remove.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REMOVE_07162005_0818) +#define FUSION_REMOVE_07162005_0818 + +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct remove + { + typedef filter_view > > type; + }; + } + + template + inline typename result_of::remove::type + remove(Sequence const& seq) + { + typedef typename result_of::remove::type result_type; + return result_type(seq); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/remove_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/remove_if.hpp new file mode 100644 index 0000000000..ab13694d1c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/remove_if.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REMOVE_IF_07162005_0818) +#define FUSION_REMOVE_IF_07162005_0818 + +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct remove_if + { + typedef filter_view > type; + }; + } + + template + inline typename result_of::remove_if::type + remove_if(Sequence const& seq) + { + typedef typename result_of::remove_if::type result_type; + return result_type(seq); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/replace.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/replace.hpp new file mode 100644 index 0000000000..780f1a4584 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/replace.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REPLACE_08182005_0830) +#define FUSION_REPLACE_08182005_0830 + +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct replace + { + typedef transform_view > type; + }; + } + + template + inline typename result_of::replace::type + replace(Sequence const& seq, T const& old_value, T const& new_value) + { + typedef typename result_of::replace::type result; + detail::replacer f(old_value, new_value); + return result(seq, f); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/replace_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/replace_if.hpp new file mode 100644 index 0000000000..90db568360 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/replace_if.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REPLACE_IF_08182005_0939) +#define FUSION_REPLACE_IF_08182005_0939 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct replace_if + { + typedef transform_view > type; + }; + } + + template + inline typename result_of::replace_if::type + replace_if(Sequence const& seq, F pred, T const& new_value) + { + typedef typename result_of::replace_if::type result; + detail::replacer_if f(pred, new_value); + return result(seq, f); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/reverse.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/reverse.hpp new file mode 100644 index 0000000000..b95461c89b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/reverse.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REVERSE_07212005_1230) +#define FUSION_REVERSE_07212005_1230 + +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct reverse + { + typedef reverse_view type; + }; + } + + template + inline reverse_view + reverse(Sequence const& view) + { + return reverse_view(view); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/transform.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/transform.hpp new file mode 100644 index 0000000000..681319bc95 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/transform.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_TRANSFORM_07052005_1057) +#define FUSION_TRANSFORM_07052005_1057 + +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template + struct transform + { + typedef transform_view type; + }; + + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + struct transform +#else + struct transform +#endif + { + typedef transform_view type; + }; + } + + template + inline typename result_of::transform::type + transform(Sequence const& seq, F f) + { + return transform_view(seq, f); + } + + template + inline typename result_of::transform::type + transform(Sequence1 const& seq1, Sequence2 const& seq2, F f) + { + return transform_view(seq1, seq2, f); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/zip.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/zip.hpp new file mode 100644 index 0000000000..ff6e6b1afc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/algorithm/transformation/zip.hpp @@ -0,0 +1,86 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_ZIP_HPP_20060125_2058) +#define FUSION_ZIP_HPP_20060125_2058 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(FUSION_MAX_ZIP_SEQUENCES) +#define FUSION_MAX_ZIP_SEQUENCES 10 +#endif + +namespace boost { namespace fusion { + + struct void_; + + namespace result_of + { + template + struct zip; + } + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_ZIP_SEQUENCES) +#include BOOST_PP_ITERATE() + +}} + +#endif + +#else + +#define ZIP_ITERATION BOOST_PP_ITERATION() + + namespace result_of + { + template< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, typename T) > +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(ZIP_ITERATION), FUSION_MAX_ZIP_SEQUENCES, TEXT, void_) > + #undef TEXT +#else + struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) > +#endif + { + typedef mpl::vector< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) > sequences; + typedef typename mpl::transform >::type ref_params; + typedef zip_view::type> type; + }; + } + +#define FUSION_REF_PARAM(z, n, data) const T ## n& + + template + inline typename result_of::zip::type + zip(BOOST_PP_ENUM_BINARY_PARAMS(ZIP_ITERATION, T, const& t)) + { + fusion::vector seqs( + BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, t)); + return typename result_of::zip::type( + seqs); + } + +#undef FUSION_REF_PARAM +#undef ZIP_ITERATION + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container.hpp new file mode 100644 index 0000000000..1398197dcf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_CLASS_10022005_0614) +#define FUSION_SEQUENCE_CLASS_10022005_0614 + +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque.hpp new file mode 100644 index 0000000000..bb29ce2f2d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036) +#define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036 + +#include +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/back_extended_deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/back_extended_deque.hpp new file mode 100644 index 0000000000..28d5cecaef --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/back_extended_deque.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209) +#define BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209 + +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { namespace fusion { + template + struct back_extended_deque + : detail::keyed_element, + sequence_base > + { + typedef detail::keyed_element base; + typedef typename Deque::next_down next_down; + typedef mpl::int_ >::value> next_up; + typedef mpl::plus::type, mpl::int_<1> > size; + + back_extended_deque(Deque const& deque, typename add_reference::type>::type t) + : base(t, deque) + {} + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/convert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/convert.hpp new file mode 100644 index 0000000000..0f3a75e2a7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/convert.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_20061213_2207) +#define FUSION_CONVERT_20061213_2207 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_deque + { + typedef typename detail::as_deque::value> gen; + typedef typename gen:: + template apply::type>::type + type; + }; + } + + template + inline typename result_of::as_deque::type + as_deque(Sequence& seq) + { + typedef typename result_of::as_deque::gen gen; + return gen::call(fusion::begin(seq)); + } + + template + inline typename result_of::as_deque::type + as_deque(Sequence const& seq) + { + typedef typename result_of::as_deque::gen gen; + return gen::call(fusion::begin(seq)); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque.hpp new file mode 100644 index 0000000000..b5c9edd840 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque.hpp @@ -0,0 +1,94 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_26112006_1649) +#define BOOST_FUSION_DEQUE_26112006_1649 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace fusion { + + struct deque_tag; + + template + struct deque + : + detail::deque_keyed_values::type, + sequence_base > + { + typedef deque_tag fusion_tag; + typedef bidirectional_traversal_tag category; + typedef typename detail::deque_keyed_values::type base; + typedef typename detail::deque_initial_size::type size; + typedef mpl::int_ next_up; + typedef mpl::int_< + mpl::if_ >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down; + typedef mpl::false_ is_view; + +#include + + deque() + {} + + explicit deque(typename add_reference::type>::type t0) + : base(t0, detail::nil_keyed_element()) + {} + + template + deque(deque const& seq) + : base(seq) + {} + + template + deque(Sequence const& seq, typename disable_if >::type* /*dummy*/ = 0) + : base(base::from_iterator(fusion::begin(seq))) + {} + + template + deque& + operator=(deque const& rhs) + { + base::operator=(rhs); + return *this; + } + + template + deque& + operator=(T const& rhs) + { + base::operator=(rhs); + return *this; + } + + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque_fwd.hpp new file mode 100644 index 0000000000..415bb2f2ee --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque_fwd.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2005-2007 Joel de Guzman + Copyright (c) 2005-2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEQUE_FORWARD_02092007_0749) +#define FUSION_DEQUE_FORWARD_02092007_0749 + +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + template< + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_DEQUE_SIZE, typename T, void_)> + struct deque; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque_iterator.hpp new file mode 100644 index 0000000000..7a2fcf459f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/deque_iterator.hpp @@ -0,0 +1,111 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_ITERATOR_26112006_2154) +#define BOOST_FUSION_DEQUE_ITERATOR_26112006_2154 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct bidirectional_traversal_tag; + + template + struct deque_iterator + : iterator_facade, bidirectional_traversal_tag> + { + typedef Seq sequence; + typedef mpl::int_ index; + + deque_iterator(Seq& seq) + : seq_(seq) + {} + + template + struct value_of + : detail::keyed_element_value_at< + typename Iterator::sequence, typename Iterator::index> + {}; + + template + struct deref + { + typedef typename detail::keyed_element_value_at< + typename Iterator::sequence, typename Iterator::index>::type element_type; + + typedef typename add_reference< + typename mpl::eval_if< + is_const, + add_const, + mpl::identity >::type>::type type; + + static type + call(Iterator const& it) + { + return it.seq_.get(typename Iterator::index()); + } + }; + + template + struct advance + { + typedef typename Iterator::index index; + typedef typename Iterator::sequence sequence; + typedef deque_iterator type; + + static type + call(Iterator const& i) + { + return type(i.seq_); + } + }; + + template + struct next + : advance > + {}; + + template + struct prior + : advance > + {}; + + template + struct distance : mpl::minus + { + typedef typename + mpl::minus< + typename I2::index, typename I1::index + >::type + type; + + static type + call(I1 const&, I2 const&) + { + return type(); + } + }; + + template + struct equal_to + : mpl::equal_to + {}; + + Seq& seq_; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + deque_iterator& operator= (deque_iterator const&); + }; + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/as_deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/as_deque.hpp new file mode 100644 index 0000000000..e48b7910d3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/as_deque.hpp @@ -0,0 +1,102 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_AS_DEQUE_20061213_2210) +#define FUSION_AS_DEQUE_20061213_2210 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct as_deque; + + template <> + struct as_deque<0> + { + template + struct apply + { + typedef deque<> type; + }; + + template + static typename apply::type + call(Iterator) + { + return deque<>(); + } + }; + +#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::next::type \ + BOOST_PP_CAT(I, BOOST_PP_INC(n)); + +#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ + typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ + BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); + +#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::value_of::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_NEXT_ITERATOR +#undef BOOST_FUSION_NEXT_CALL_ITERATOR +#undef BOOST_FUSION_VALUE_OF_ITERATOR + +}}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template <> + struct as_deque + { + template + struct apply + { + BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) + typedef deque type; + }; + + template + static typename apply::type + call(Iterator const& i0) + { + typedef apply gen; + typedef typename gen::type result; + BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _) + return result(BOOST_PP_ENUM_PARAMS(N, *i)); + } + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/at_impl.hpp new file mode 100644 index 0000000000..3dc7cde99f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/at_impl.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_AT_IMPL_09122006_2017) +#define BOOST_FUSION_DEQUE_AT_IMPL_09122006_2017 + +#include + +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace fusion { + + struct deque_tag; + + namespace extension + { + template + struct at_impl; + + template<> + struct at_impl + { + template + struct apply + { + typedef typename Sequence::next_up next_up; + typedef typename Sequence::next_down next_down; + BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value); + + typedef mpl::plus > offset; + typedef mpl::int_::value> adjusted_index; + typedef typename detail::keyed_element_value_at::type element_type; + typedef typename add_reference< + typename mpl::eval_if< + is_const, + add_const, + mpl::identity >::type>::type type; + + static type call(Sequence& seq) + { + return seq.get(adjusted_index()); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/begin_impl.hpp new file mode 100644 index 0000000000..13b50143da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/begin_impl.hpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_BEGIN_IMPL_09122006_2034) +#define BOOST_FUSION_DEQUE_BEGIN_IMPL_09122006_2034 + +#include + +#include +#include + +namespace boost { namespace fusion { + + struct deque_tag; + + namespace extension + { + template + struct begin_impl; + + template<> + struct begin_impl + { + template + struct apply + { + typedef typename mpl::if_< + mpl::equal_to, + deque_iterator, + deque_iterator< + Sequence, mpl::plus >::value> >::type type; + + static type call(Sequence& seq) + { + return type(seq); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/convert_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/convert_impl.hpp new file mode 100644 index 0000000000..ac310a19f7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/convert_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_IMPL_20061213_2207) +#define FUSION_CONVERT_IMPL_20061213_2207 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct deque_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename detail::as_deque::value> gen; + typedef typename gen:: + template apply::type>::type + type; + + static type call(Sequence& seq) + { + return gen::call(fusion::begin(seq)); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp new file mode 100644 index 0000000000..813c049153 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_PP_IS_ITERATING) +#if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212) +#define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212 + +#include +#include +#include + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE) +#include BOOST_PP_ITERATE() + +#endif +#else + +#define N BOOST_PP_ITERATION() + +deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference::type>::type t)) + : base(detail::deque_keyed_values::call(BOOST_PP_ENUM_PARAMS(N, t))) +{} + +#undef N +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_initial_size.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_initial_size.hpp new file mode 100644 index 0000000000..8fa56292c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_initial_size.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139) +#define BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139 + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct void_; + +namespace detail { + + template + struct deque_initial_size + { + typedef mpl::vector args; + typedef typename mpl::find::type first_void; + typedef typename mpl::distance::type, first_void>::type type; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp new file mode 100644 index 0000000000..11b229b2bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330) +#define BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330 + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define FUSION_VOID(z, n, _) void_ + +namespace boost { namespace fusion { + + struct void_; + +namespace detail { + + template + struct keyed_element; + + struct nil_keyed_element; + + template + struct deque_keyed_values_impl; + + template + struct deque_keyed_values_impl + { + typedef nil_keyed_element type; + + static type call() + { + return type(); + } + }; + + template + struct deque_keyed_values_impl + { + typedef mpl::int_ >::value> next_index; + + typedef typename deque_keyed_values_impl< + next_index, + BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type tail; + typedef keyed_element type; + +#include + + }; + + template + struct deque_keyed_values + : deque_keyed_values_impl, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> + {}; + +}}} + +#undef FUSION_VOID + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp new file mode 100644 index 0000000000..0a39add6ca --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_PP_IS_ITERATING) +#if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211) +#define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211 + +#include +#include +#include + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) +#include BOOST_PP_ITERATE() + +#endif +#else + +#define N BOOST_PP_ITERATION() + +static type call(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference::type>::type t)) +{ + return type(t0, + deque_keyed_values_impl< + next_index +#if N > 1 + , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T) +#endif + >::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t))); +} + +#undef N +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/end_impl.hpp new file mode 100644 index 0000000000..96a1b17da6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/end_impl.hpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_END_IMPL_09122006_2034) +#define BOOST_FUSION_DEQUE_END_IMPL_09122006_2034 + +#include + +#include +#include + +namespace boost { namespace fusion { + + struct deque_tag; + + namespace extension + { + template + struct end_impl; + + template<> + struct end_impl + { + template + struct apply + { + typedef typename mpl::if_< + mpl::equal_to, + deque_iterator, + deque_iterator< + Sequence, Sequence::next_up::value> >::type type; + + static type call(Sequence& seq) + { + return type(seq); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/keyed_element.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/keyed_element.hpp new file mode 100644 index 0000000000..177f68ac34 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -0,0 +1,111 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330) +#define BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330 + +#include +#include + +#include +#include + +namespace boost { namespace fusion { + + struct fusion_sequence_tag; + +namespace detail { + + struct nil_keyed_element + { + typedef fusion_sequence_tag tag; + void get(); + + template + static nil_keyed_element + from_iterator(It const&) + { + return nil_keyed_element(); + } + }; + + template + struct keyed_element + : Rest + { + typedef Rest base; + typedef fusion_sequence_tag tag; + using Rest::get; + + template + static keyed_element + from_iterator(It const& it) + { + return keyed_element( + *it, base::from_iterator(fusion::next(it))); + } + + template + keyed_element(keyed_element const& rhs) + : Rest(rhs.get_base()), value_(rhs.value_) + {} + + Rest const get_base() const + { + return *this; + } + + typename add_reference::type>::type get(Key) const + { + return value_; + } + + typename add_reference::type get(Key) + { + return value_; + } + + keyed_element(typename add_reference::type>::type value, Rest const& rest) + : Rest(rest), value_(value) + {} + + keyed_element() + : Rest(), value_() + {} + + template + keyed_element& operator=(keyed_element const& rhs) + { + base::operator=(static_cast(rhs)); // cast for msvc-7.1 + value_ = rhs.value_; + return *this; + } + + keyed_element& operator=(keyed_element const& rhs) + { + base::operator=(rhs); + value_ = rhs.value_; + return *this; + } + + Value value_; + }; + + template + struct keyed_element_value_at + : keyed_element_value_at + {}; + + template + struct keyed_element_value_at, Key> + { + typedef Value type; + }; + +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/value_at_impl.hpp new file mode 100644 index 0000000000..ec0351de63 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/detail/value_at_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_VALUE_AT_IMPL_08122006_0756) +#define BOOST_FUSION_DEQUE_VALUE_AT_IMPL_08122006_0756 + +#include + +#include +#include + +namespace boost { namespace fusion { + + struct deque_tag; + + namespace extension + { + template + struct value_at_impl; + + template<> + struct value_at_impl + { + template + struct apply + { + typedef typename Sequence::next_up next_up; + typedef typename Sequence::next_down next_down; + BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value); + + typedef mpl::plus > offset; + typedef mpl::int_::value> adjusted_index; + typedef typename detail::keyed_element_value_at::type type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/front_extended_deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/front_extended_deque.hpp new file mode 100644 index 0000000000..156e66a475 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/front_extended_deque.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209) +#define BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209 + +#include +#include +#include +#include +#include + +#include +#include + +#include + +namespace boost { namespace fusion { + template + struct front_extended_deque + : detail::keyed_element, + sequence_base > + { + typedef detail::keyed_element base; + typedef mpl::int_ >::value> next_down; + typedef typename Deque::next_up next_up; + typedef mpl::plus::type, mpl::int_<1> > size; + + front_extended_deque(Deque const& deque, typename add_reference::type>::type t) + : base(t, deque) + {} + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/limits.hpp new file mode 100644 index 0000000000..2262f17cfc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/deque/limits.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEQUE_LIMITS_26112006_1737) +#define BOOST_FUSION_DEQUE_LIMITS_26112006_1737 + +#if !defined(FUSION_MAX_DEQUE_SIZE) +#define FUSION_MAX_DEQUE_SIZE 10 +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/ext_/tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/ext_/tree.hpp new file mode 100644 index 0000000000..cd8c5dcd3f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/ext_/tree.hpp @@ -0,0 +1,130 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef FUSION_BINARY_TREE_EAN_05032006_1027 +#define FUSION_BINARY_TREE_EAN_05032006_1027 + +#include +#include +#include +#include +#include +#include +#include +#include // for nil +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct tree_tag; + + namespace detail + { + template + struct reference : add_reference {}; + + template + struct reference : reference::type, false> {}; + + template + struct reference : reference {}; + } + + template + struct tree + : sequence_base > + { + typedef Data data_type; + typedef Left left_type; + typedef Right right_type; + typedef tree_tag fusion_tag; + typedef forward_traversal_tag category; + typedef mpl::false_ is_view; + + typedef typename mpl::if_< + traits::is_sequence + , Data + , single_view + >::type data_view; + + explicit tree( + typename fusion::detail::call_param::type data_ + , typename fusion::detail::call_param::type left_ = Left() + , typename fusion::detail::call_param::type right_ = Right() + ) + : segments(left_, data_view(data_), right_) + {} + + typedef vector3 segments_type; + segments_type segments; + }; + + template + tree make_tree(Data const &data) + { + return tree(data); + } + + template + tree make_tree(Data const &data, Left const &left, Right const &right) + { + return tree(data, left, right); + } + + namespace extension + { + template<> + struct is_segmented_impl + { + template + struct apply : mpl::true_ {}; + }; + + template<> + struct segments_impl + { + template + struct apply + { + typedef typename mpl::if_< + is_const + , typename Sequence::segments_type const & + , typename Sequence::segments_type & + >::type type; + + static type call(Sequence &seq) + { + return seq.segments; + } + }; + }; + + template<> + struct begin_impl + { + template + struct apply + : segmented_begin + {}; + }; + + template<> + struct end_impl + { + template + struct apply + : segmented_end + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation.hpp new file mode 100644 index 0000000000..7d92bb2f05 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_GENERATION_10022005_0615) +#define FUSION_SEQUENCE_GENERATION_10022005_0615 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/cons_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/cons_tie.hpp new file mode 100644 index 0000000000..88ce0aa49e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/cons_tie.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONS_TIE_07182005_0854) +#define FUSION_CONS_TIE_07182005_0854 + +#include + +namespace boost { namespace fusion +{ + struct nil; + + namespace result_of + { + template + struct cons_tie + { + typedef cons type; + }; + } + + // $$$ do we really want a cons_tie? $$$ + template + inline cons + cons_tie(Car& car) + { + return cons(car); + } + + // $$$ do we really want a cons_tie? $$$ + template + inline cons + cons_tie(Car& car, Cdr const& cdr) + { + return cons(car, cdr); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/deque_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/deque_tie.hpp new file mode 100644 index 0000000000..c5d26c9796 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/deque_tie.hpp @@ -0,0 +1,79 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_DEQUE_TIE_07192005_1242) +#define FUSION_DEQUE_TIE_07192005_1242 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_DEQUE_SIZE, typename T, void_) + , typename Extra = void_ + > + struct deque_tie; + } + +#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_REF + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct deque_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) > + #undef TEXT +#else + struct deque_tie +#endif + { + typedef deque type; + }; + } + + template + inline deque + deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) + { + return deque( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/ignore.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/ignore.hpp new file mode 100644 index 0000000000..6a416c6b5c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/ignore.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001 Doug Gregor + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_IGNORE_07192005_0329) +#define FUSION_IGNORE_07192005_0329 + +namespace boost { namespace fusion +{ + // Swallows any assignment (by Doug Gregor) + namespace detail + { + struct swallow_assign + { + template + swallow_assign const& + operator=(const T&) const + { + return *this; + } + }; + } + + // "ignore" allows tuple positions to be ignored when using "tie". + detail::swallow_assign const ignore = detail::swallow_assign(); +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/list_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/list_tie.hpp new file mode 100644 index 0000000000..44691e029f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/list_tie.hpp @@ -0,0 +1,79 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_LIST_TIE_07192005_0109) +#define FUSION_LIST_TIE_07192005_0109 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_LIST_SIZE, typename T, void_) + , typename Extra = void_ + > + struct list_tie; + } + +// $$$ shouldn't we remove_reference first to allow references? $$$ +#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_REF + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct list_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) > + #undef TEXT +#else + struct list_tie +#endif + { + typedef list type; + }; + } + + template + inline list + list_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) + { + return list( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_cons.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_cons.hpp new file mode 100644 index 0000000000..47a2f461a7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_cons.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MAKE_CONS_07172005_0918) +#define FUSION_MAKE_CONS_07172005_0918 + +#include +#include + +namespace boost { namespace fusion +{ + struct nil; + + namespace result_of + { + template + struct make_cons + { + typedef cons::type, Cdr> type; + }; + } + + template + inline cons::type> + make_cons(Car const& car) + { + return cons::type>(car); + } + + template + inline cons::type, Cdr> + make_cons(Car const& car, Cdr const& cdr) + { + return cons::type, Cdr>(car, cdr); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_deque.hpp new file mode 100644 index 0000000000..90d146e99a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_deque.hpp @@ -0,0 +1,98 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_DEQUE_07162005_0243) +#define FUSION_MAKE_DEQUE_07162005_0243 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_DEQUE_SIZE, typename T, void_) + , typename Extra = void_ + > + struct make_deque; + + template <> + struct make_deque<> + { + typedef deque<> type; + }; + } + + inline deque<> + make_deque() + { + return deque<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) > + #undef TEXT +#else + struct make_deque +#endif + { + typedef deque type; + }; + } + + template + inline deque + make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return deque( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_list.hpp new file mode 100644 index 0000000000..b4cfd0126e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_list.hpp @@ -0,0 +1,91 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_LIST_07192005_1239) +#define FUSION_MAKE_LIST_07192005_1239 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_LIST_SIZE, typename T, void_) + , typename Extra = void_ + > + struct make_list; + + template <> + struct make_list<> + { + typedef list<> type; + }; + } + + inline list<> + make_list() + { + return list<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct make_list< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) > + #undef TEXT +#else + struct make_list +#endif + { + typedef list type; + }; + } + + template + inline list + make_list(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return list( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_map.hpp new file mode 100644 index 0000000000..865d5a2013 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_map.hpp @@ -0,0 +1,106 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_MAP_07222005_1247) +#define FUSION_MAKE_MAP_07222005_1247 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename K, void_) + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename D, void_) + , typename Extra = void_ + > + struct make_map; + + template <> + struct make_map<> + { + typedef map<> type; + }; + } + + inline map<> + make_map() + { + return map<>(); + } + +#define BOOST_FUSION_PAIR(z, n, data) \ + fusion::pair< \ + BOOST_PP_CAT(K, n) \ + , typename detail::as_fusion_element::type> + +#define BOOST_FUSION_MAKE_PAIR(z, n, data) \ + fusion::make_pair(BOOST_PP_CAT(_, n)) \ + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_PAIR +#undef BOOST_FUSION_MAKE_PAIR + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct make_map + #undef TEXT +#else + struct make_map +#endif + { + typedef map type; + }; + } + + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > + inline map + make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _)) + { + return map( + BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_set.hpp new file mode 100644 index 0000000000..52aa952dc5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_set.hpp @@ -0,0 +1,93 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_SET_09162005_1125) +#define FUSION_MAKE_SET_09162005_1125 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + , typename Extra = void_ + > + struct make_set; + + template <> + struct make_set<> + { + typedef set<> type; + }; + } + + inline set<> + make_set() + { + return set<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_ELEMENT +#undef BOOST_FUSION_AS_ELEMENT + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct make_set< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_SET_SIZE, TEXT, void_) > + #undef TEXT +#else + struct make_set +#endif + { + typedef set type; + }; + } + + template + inline set + make_set(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return set( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_vector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_vector.hpp new file mode 100644 index 0000000000..868ad0ca7a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/make_vector.hpp @@ -0,0 +1,91 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_VECTOR_07162005_0243) +#define FUSION_MAKE_VECTOR_07162005_0243 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + , typename Extra = void_ + > + struct make_vector; + + template <> + struct make_vector<> + { + typedef vector0<> type; + }; + } + + inline vector0<> + make_vector() + { + return vector0<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct make_vector< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) > + #undef TEXT +#else + struct make_vector +#endif + { + typedef BOOST_PP_CAT(vector, N) type; + }; + } + + template + inline BOOST_PP_CAT(vector, N) + make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return BOOST_PP_CAT(vector, N)( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/map_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/map_tie.hpp new file mode 100644 index 0000000000..39d1e94520 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/map_tie.hpp @@ -0,0 +1,110 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAP_TIE_20060814_1116) +#define FUSION_MAP_TIE_20060814_1116 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_MAP_SIZE, typename K, void_) + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_MAP_SIZE, typename D, void_) + , typename Extra = void_ + > + struct map_tie; + + template <> + struct map_tie<> + { + typedef map<> type; + }; + } + + inline map<> + map_tie() + { + return map<>(); + } + +#define BOOST_FUSION_TIED_PAIR(z, n, data) \ + fusion::pair< \ + BOOST_PP_CAT(K, n) \ + , typename add_reference::type> + +#define BOOST_FUSION_PAIR_TIE(z, n, data) \ + fusion::pair_tie(BOOST_PP_CAT(_, n)) \ + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_PAIR +#undef BOOST_FUSION_MAKE_PAIR + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + + struct map_tie + #undef TEXT +#else + struct map_tie +#endif + { + typedef map type; + }; + } + + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > + inline map + map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _)) + { + return map( + BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/pair_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/pair_tie.hpp new file mode 100644 index 0000000000..09437a2659 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/pair_tie.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined (BOOST_FUSION_PAIR_TIE_20060812_2058) +#define BOOST_FUSION_PAIR_TIE_20060812_2058 + +#include +#include + +namespace boost { namespace fusion { + + template + struct pair; + + namespace result_of + { + template + struct pair_tie + { + typedef fusion::pair type; + }; + } + + template + typename disable_if, typename result_of::pair_tie::type>::type + pair_tie(T& t) + { + return typename result_of::pair_tie::type(t); + } + + template + typename result_of::pair_tie::type + pair_tie(T const& t) + { + return typename result_of::pair_tie::type(t); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/vector_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/vector_tie.hpp new file mode 100644 index 0000000000..7f7aaba31d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/generation/vector_tie.hpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_VECTOR_TIE_07192005_1242) +#define FUSION_VECTOR_TIE_07192005_1242 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + , typename Extra = void_ + > + struct vector_tie; + } + +#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_REF + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct vector_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) > + #undef TEXT +#else + struct vector_tie +#endif + { + typedef vector type; + }; + } + + template + inline vector + vector_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) + { + return vector( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list.hpp new file mode 100644 index 0000000000..8a0d645630 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_CLASS_LIST_10022005_0605) +#define FUSION_SEQUENCE_CLASS_LIST_10022005_0605 + +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/cons.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/cons.hpp new file mode 100644 index 0000000000..e274561667 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/cons.hpp @@ -0,0 +1,143 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONS_07172005_0843) +#define FUSION_CONS_07172005_0843 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + struct cons_tag; + struct forward_traversal_tag; + struct fusion_sequence_tag; + + struct nil : sequence_base + { + typedef mpl::int_<0> size; + typedef cons_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + typedef forward_traversal_tag category; + typedef void_ car_type; + typedef void_ cdr_type; + + nil() {} + + template + nil(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) + {} + + template + void assign_from_iter(Iterator const& /*iter*/) + { + } + }; + + template + struct cons : sequence_base > + { + typedef mpl::int_ size; + typedef cons_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + typedef forward_traversal_tag category; + typedef Car car_type; + typedef Cdr cdr_type; + + cons() + : car(), cdr() {} + + explicit cons(typename detail::call_param::type in_car) + : car(in_car), cdr() {} + + cons( + typename detail::call_param::type in_car + , typename detail::call_param::type in_cdr) + : car(in_car), cdr(in_cdr) {} + + template + cons(cons const& rhs) + : car(rhs.car), cdr(rhs.cdr) {} + + cons(cons const& rhs) + : car(rhs.car), cdr(rhs.cdr) {} + + template + cons( + Sequence const& seq + , typename disable_if< + mpl::or_< + is_convertible // use copy ctor instead + , is_convertible // use copy to car instead + > + >::type* /*dummy*/ = 0 + ) + : car(*fusion::begin(seq)) + , cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {} + + template + cons(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/) + : car(*iter) + , cdr(fusion::next(iter), mpl::true_()) {} + + template + cons& operator=(cons const& rhs) + { + car = rhs.car; + cdr = rhs.cdr; + return *this; + } + + cons& operator=(cons const& rhs) + { + car = rhs.car; + cdr = rhs.cdr; + return *this; + } + + template + typename disable_if, cons&>::type + operator=(Sequence const& seq) + { + typedef typename result_of::begin::type Iterator; + Iterator iter = fusion::begin(seq); + this->assign_from_iter(iter); + return *this; + } + + template + void assign_from_iter(Iterator const& iter) + { + car = *iter; + cdr.assign_from_iter(fusion::next(iter)); + } + + car_type car; + cdr_type cdr; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/cons_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/cons_iterator.hpp new file mode 100644 index 0000000000..1eff153560 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/cons_iterator.hpp @@ -0,0 +1,89 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONS_ITERATOR_07172005_0849) +#define FUSION_CONS_ITERATOR_07172005_0849 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct nil; + struct cons_iterator_tag; + struct forward_traversal_tag; + + template + struct cons_iterator_identity; + + template + struct cons_iterator : iterator_base > + { + typedef cons_iterator_tag fusion_tag; + typedef forward_traversal_tag category; + typedef Cons cons_type; + typedef cons_iterator_identity< + typename add_const::type> + identity; + + explicit cons_iterator(cons_type& in_cons) + : cons(in_cons) {} + + cons_type& cons; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + cons_iterator& operator= (cons_iterator const&); + }; + + struct nil_iterator : iterator_base + { + typedef forward_traversal_tag category; + typedef cons_iterator_tag fusion_tag; + typedef nil cons_type; + typedef cons_iterator_identity< + add_const::type> + identity; + nil_iterator() {} + explicit nil_iterator(nil const&) {} + }; + + template <> + struct cons_iterator : nil_iterator + { + cons_iterator() {} + explicit cons_iterator(nil const&) {} + }; + + template <> + struct cons_iterator : nil_iterator + { + cons_iterator() {} + explicit cons_iterator(nil const&) {} + }; + + template <> + struct cons_iterator > : nil_iterator + { + cons_iterator() {} + explicit cons_iterator(nil const&) {} + }; + + template <> + struct cons_iterator const> : nil_iterator + { + cons_iterator() {} + explicit cons_iterator(nil const&) {} + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/convert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/convert.hpp new file mode 100644 index 0000000000..418158cfaa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/convert.hpp @@ -0,0 +1,56 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_09232005_1215) +#define FUSION_CONVERT_09232005_1215 + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_list + { + typedef typename + detail::build_cons< + typename result_of::begin::type + , typename result_of::end::type + > + build_cons; + + typedef typename build_cons::type type; + + static type + call(Sequence& seq) + { + return build_cons::call(fusion::begin(seq), fusion::end(seq)); + } + }; + } + + template + inline typename result_of::as_list::type + as_list(Sequence& seq) + { + return result_of::as_list::call(seq); + } + + template + inline typename result_of::as_list::type + as_list(Sequence const& seq) + { + return result_of::as_list::call(seq); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/at_impl.hpp new file mode 100644 index 0000000000..4dee15dcda --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/at_impl.hpp @@ -0,0 +1,132 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_AT_IMPL_07172005_0726) +#define FUSION_AT_IMPL_07172005_0726 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace detail + { + template + struct cons_deref + { + typedef typename Cons::car_type type; + }; + + template + struct cons_advance + { + typedef typename + cons_advance::type::cdr_type + type; + }; + + template + struct cons_advance + { + typedef Cons type; + }; + + template + struct cons_advance + { + typedef typename Cons::cdr_type type; + }; + + template + struct cons_advance + { +#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above + typedef typename Cons::cdr_type::cdr_type type; +#else + typedef typename Cons::cdr_type _a; + typedef typename _a::cdr_type type; +#endif + }; + + template + struct cons_advance + { +#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above + typedef typename Cons::cdr_type::cdr_type::cdr_type type; +#else + typedef typename Cons::cdr_type _a; + typedef typename _a::cdr_type _b; + typedef typename _b::cdr_type type; +#endif + }; + + template + struct cons_advance + { +#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above + typedef typename Cons::cdr_type::cdr_type::cdr_type::cdr_type type; +#else + typedef typename Cons::cdr_type _a; + typedef typename _a::cdr_type _b; + typedef typename _b::cdr_type _c; + typedef typename _c::cdr_type type; +#endif + }; + } + + struct cons_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef detail::cons_deref< + typename detail::cons_advance::type> + element; + + typedef typename + mpl::eval_if< + is_const + , detail::cref_result + , detail::ref_result + >::type + type; + + template + static type + call(Cons& s, mpl::int_) + { + return call(s.cdr, mpl::int_()); + } + + template + static type + call(Cons& s, mpl::int_<0>) + { + return s.car; + } + + static type + call(Sequence& s) + { + return call(s, mpl::int_()); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/begin_impl.hpp new file mode 100644 index 0000000000..a22c9a3d7f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/begin_impl.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_07172005_0824) +#define FUSION_BEGIN_IMPL_07172005_0824 + +#include +#include + +namespace boost { namespace fusion +{ + struct nil; + + struct cons_tag; + + template + struct cons; + + template + struct cons_iterator; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef cons_iterator type; + + static type + call(Sequence& t) + { + return type(t); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/build_cons.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/build_cons.hpp new file mode 100644 index 0000000000..befbd4e9ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/build_cons.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BUILD_CONS_09232005_1222) +#define FUSION_BUILD_CONS_09232005_1222 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template < + typename First + , typename Last + , bool is_empty = result_of::equal_to::value> + struct build_cons; + + template + struct build_cons + { + typedef nil type; + + static nil + call(First const&, Last const&) + { + return nil(); + } + }; + + template + struct build_cons + { + typedef + build_cons::type, Last> + next_build_cons; + + typedef cons< + typename result_of::value_of::type + , typename next_build_cons::type> + type; + + static type + call(First const& f, Last const& l) + { + return type(*f, next_build_cons::call(fusion::next(f), l)); + } + }; + +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/convert_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/convert_impl.hpp new file mode 100644 index 0000000000..cfe7a1dfa4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/convert_impl.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_IMPL_09232005_1215) +#define FUSION_CONVERT_IMPL_09232005_1215 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct cons_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename + detail::build_cons< + typename result_of::begin::type + , typename result_of::end::type + > + build_cons; + + typedef typename build_cons::type type; + + static type + call(Sequence& seq) + { + return build_cons::call(fusion::begin(seq), fusion::end(seq)); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/deref_impl.hpp new file mode 100644 index 0000000000..5292dced84 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/deref_impl.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_07172005_0831) +#define FUSION_DEREF_IMPL_07172005_0831 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct cons_iterator_tag; + + namespace extension + { + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename Iterator::cons_type cons_type; + typedef typename cons_type::car_type value_type; + + typedef typename mpl::eval_if< + is_const + , add_reference::type> + , add_reference >::type + type; + + static type + call(Iterator const& i) + { + return i.cons.car; + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/empty_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/empty_impl.hpp new file mode 100644 index 0000000000..5c92c7335e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/empty_impl.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_SEQUENCE_EMPTY_IMPL_HPP_INCLUDED) +#define BOOST_FUSION_SEQUENCE_EMPTY_IMPL_HPP_INCLUDED + +#include + +namespace boost { namespace fusion +{ + struct cons_tag; + + struct nil; + + template + struct cons; + + namespace extension + { + template + struct empty_impl; + + template <> + struct empty_impl + { + template + struct apply + : boost::is_convertible + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/end_impl.hpp new file mode 100644 index 0000000000..03b5e21d86 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/end_impl.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_07172005_0828) +#define FUSION_END_IMPL_07172005_0828 + +#include +#include + +namespace boost { namespace fusion +{ + struct nil; + + struct cons_tag; + + template + struct cons; + + template + struct cons_iterator; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef cons_iterator< + typename mpl::if_, nil const, nil>::type> + type; + + static type + call(Sequence&) + { + return type(); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/equal_to_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/equal_to_impl.hpp new file mode 100644 index 0000000000..1192588009 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/equal_to_impl.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_EQUAL_TO_IMPL_09172005_1120) +#define FUSION_EQUAL_TO_IMPL_09172005_1120 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct cons_iterator_tag; + + namespace extension + { + template + struct equal_to_impl; + + template <> + struct equal_to_impl + { + template + struct apply + : is_same< + typename I1::identity + , typename I2::identity + > + { + }; + }; + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_forward_ctor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_forward_ctor.hpp new file mode 100644 index 0000000000..39471809f8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_forward_ctor.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_LIST_FORWARD_CTOR_07172005_0113) +#define FUSION_LIST_FORWARD_CTOR_07172005_0113 + +#include +#include +#include +#include +#include + +#define FUSION_LIST_CTOR_MAKE_CONS(z, n, type) tie_cons(BOOST_PP_CAT(_, n) +#define FUSION_LIST_CL_PAREN(z, n, type) ) + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) +#include BOOST_PP_ITERATE() + +#undef FUSION_LIST_CTOR_MAKE_CONS +#undef FUSION_LIST_CL_PAREN + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#define N BOOST_PP_ITERATION() + +#if N == 1 + explicit +#endif + list(BOOST_PP_ENUM_BINARY_PARAMS( + N, typename detail::call_param::type _)) + : inherited_type(list_to_cons::call(BOOST_PP_ENUM_PARAMS(N, _))) + {} + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_to_cons.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_to_cons.hpp new file mode 100644 index 0000000000..8e6d6912be --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_to_cons.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LIST_TO_CONS_07172005_1041) +#define FUSION_LIST_TO_CONS_07172005_1041 + +#include +#include +#include +#include +#include +#include + +#define FUSION_VOID(z, n, _) void_ + +namespace boost { namespace fusion +{ + struct nil; + struct void_; +}} + +namespace boost { namespace fusion { namespace detail +{ + template + struct list_to_cons + { + typedef T0 head_type; + typedef list_to_cons< + BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_LIST_SIZE, T), void_> + tail_list_to_cons; + typedef typename tail_list_to_cons::type tail_type; + + typedef cons type; + + #include + }; + + template <> + struct list_to_cons + { + typedef nil type; + }; +}}} + +#undef FUSION_VOID +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_to_cons_call.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_to_cons_call.hpp new file mode 100644 index 0000000000..069f0598fb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/list_to_cons_call.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_LIST_TO_CONS_CALL_07192005_0138) +#define FUSION_LIST_TO_CONS_CALL_07192005_0138 + +#include +#include +#include + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) +#include BOOST_PP_ITERATE() + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#define N BOOST_PP_ITERATION() + + static type + call(BOOST_PP_ENUM_BINARY_PARAMS( + N, typename detail::call_param::type _)) + { + return type(_0 +#if N > 1 + , tail_list_to_cons::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, _))); +#else + ); +#endif + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/next_impl.hpp new file mode 100644 index 0000000000..dafa83cc8c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/next_impl.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_07172005_0836) +#define FUSION_NEXT_IMPL_07172005_0836 + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct cons_iterator_tag; + + template + struct cons_iterator; + + namespace extension + { + template + struct next_impl; + + template <> + struct next_impl + { + template + struct apply + { + typedef typename Iterator::cons_type cons_type; + typedef typename cons_type::cdr_type cdr_type; + + typedef cons_iterator< + typename mpl::eval_if< + is_const + , add_const + , mpl::identity + >::type> + type; + + static type + call(Iterator const& i) + { + return type(i.cons.cdr); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/value_at_impl.hpp new file mode 100644 index 0000000000..5f0ff1663b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/value_at_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_AT_IMPL_07172005_0952) +#define FUSION_VALUE_AT_IMPL_07172005_0952 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct cons_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + { + typedef typename + mpl::eval_if< + mpl::bool_ + , mpl::identity + , apply > + >::type + type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/value_of_impl.hpp new file mode 100644 index 0000000000..f8175c6d4d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/detail/value_of_impl.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_OF_IMPL_07172005_0838) +#define FUSION_VALUE_OF_IMPL_07172005_0838 + +namespace boost { namespace fusion +{ + struct cons_iterator_tag; + + namespace extension + { + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename Iterator::cons_type cons_type; + typedef typename cons_type::car_type type; + }; + }; + } + +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/limits.hpp new file mode 100644 index 0000000000..20ff6dd2e0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/limits.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LIST_LIMITS_07172005_0112) +#define FUSION_LIST_LIMITS_07172005_0112 + +#if !defined(FUSION_MAX_LIST_SIZE) +# define FUSION_MAX_LIST_SIZE 10 +#else +# if FUSION_MAX_LIST_SIZE < 3 +# undef FUSION_MAX_LIST_SIZE +# define FUSION_MAX_LIST_SIZE 10 +# endif +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/list.hpp new file mode 100644 index 0000000000..7516df48a3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/list.hpp @@ -0,0 +1,68 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LIST_07172005_1153) +#define FUSION_LIST_07172005_1153 + +#include +#include + +namespace boost { namespace fusion +{ + struct nil; + struct void_; + + template + struct list + : detail::list_to_cons::type + { + private: + typedef + detail::list_to_cons + list_to_cons; + + public: + typedef typename list_to_cons::type inherited_type; + + list() + : inherited_type() {} + + template + list(list const& rhs) + : inherited_type(rhs) {} + + template + list(Sequence const& rhs) + : inherited_type(rhs) {} + + // Expand a couple of forwarding constructors for arguments + // of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple: + // + // list( + // typename detail::call_param::type _0 + // , typename detail::call_param::type _1) + // : inherited_type(list_to_cons::call(_0, _1)) {} + #include + + template + list& + operator=(list const& rhs) + { + inherited_type::operator=(rhs); + return *this; + } + + template + list& + operator=(T const& rhs) + { + inherited_type::operator=(rhs); + return *this; + } + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/list_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/list_fwd.hpp new file mode 100644 index 0000000000..90c088b476 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/list/list_fwd.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LIST_FORWARD_07172005_0224) +#define FUSION_LIST_FORWARD_07172005_0224 + +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_LIST_SIZE, typename T, void_) + > + struct list; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map.hpp new file mode 100644 index 0000000000..695183119f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_CLASS_MAP_10022005_0606) +#define FUSION_SEQUENCE_CLASS_MAP_10022005_0606 + +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/convert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/convert.hpp new file mode 100644 index 0000000000..f174da58e9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/convert.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_09232005_1340) +#define FUSION_CONVERT_09232005_1340 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_map + { + typedef typename detail::as_map::value> gen; + typedef typename gen:: + template apply::type>::type + type; + }; + } + + template + inline typename result_of::as_map::type + as_map(Sequence& seq) + { + typedef typename result_of::as_map::gen gen; + return gen::call(fusion::begin(seq)); + } + + template + inline typename result_of::as_map::type + as_map(Sequence const& seq) + { + typedef typename result_of::as_map::gen gen; + return gen::call(fusion::begin(seq)); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/as_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/as_map.hpp new file mode 100644 index 0000000000..326877f9db --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/as_map.hpp @@ -0,0 +1,101 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_AS_MAP_0932005_1339) +#define FUSION_AS_MAP_0932005_1339 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct as_map; + + template <> + struct as_map<0> + { + template + struct apply + { + typedef map<> type; + }; + + template + static typename apply::type + call(Iterator) + { + return map<>(); + } + }; + +#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::next::type \ + BOOST_PP_CAT(I, BOOST_PP_INC(n)); + +#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ + typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ + BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); + +#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::value_of::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_NEXT_ITERATOR +#undef BOOST_FUSION_NEXT_CALL_ITERATOR +#undef BOOST_FUSION_VALUE_OF_ITERATOR + +}}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template <> + struct as_map + { + template + struct apply + { + BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) + typedef map type; + }; + + template + static typename apply::type + call(Iterator const& i0) + { + typedef apply gen; + typedef typename gen::type result; + BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _) + return result(BOOST_PP_ENUM_PARAMS(N, *i)); + } + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/begin_impl.hpp new file mode 100644 index 0000000000..063932a80d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/begin_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP +#define BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef + basic_iterator< + map_iterator_tag + , typename Seq::category + , Seq + , 0 + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/convert_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/convert_impl.hpp new file mode 100644 index 0000000000..aedd3e3d7e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/convert_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_IMPL_09232005_1340) +#define FUSION_CONVERT_IMPL_09232005_1340 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename detail::as_map::value> gen; + typedef typename gen:: + template apply::type>::type + type; + + static type call(Sequence& seq) + { + return gen::call(fusion::begin(seq)); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/deref_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/deref_data_impl.hpp new file mode 100644 index 0000000000..9943171a54 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/deref_data_impl.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_DATA_IMPL_HPP +#define BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_DATA_IMPL_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_data_impl; + + template <> + struct deref_data_impl + { + template + struct apply + { + typedef typename result_of::value_of::type::second_type data; + + typedef typename + mpl::eval_if< + is_const + , detail::cref_result > + , detail::ref_result > + >::type + type; + + static type + call(It const& it) + { + return deref(it).second; + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/deref_impl.hpp new file mode 100644 index 0000000000..359a5dc07f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/deref_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_IMPL_HPP +#define BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_IMPL_HPP + +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename + result_of::at< + typename mpl::if_< + is_const + , typename It::seq_type::storage_type const + , typename It::seq_type::storage_type + >::type + , typename It::index + >::type + type; + + static type + call(It const& it) + { + return at(it.seq->get_data()); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/end_impl.hpp new file mode 100644 index 0000000000..0e30de8c00 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/end_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP +#define BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef + basic_iterator< + map_iterator_tag + , typename Seq::category + , Seq + , Seq::size::value + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/key_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/key_of_impl.hpp new file mode 100644 index 0000000000..5a90c03784 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/key_of_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP +#define BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct key_of_impl; + + template <> + struct key_of_impl + { + template + struct apply + { + typedef typename + value_of_impl:: + template apply::type::first_type + type; + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/map_forward_ctor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/map_forward_ctor.hpp new file mode 100644 index 0000000000..c35168bac9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/map_forward_ctor.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAP_FORWARD_CTOR_07222005_0106) +#define FUSION_MAP_FORWARD_CTOR_07222005_0106 + +#include +#include +#include + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) +#include BOOST_PP_ITERATE() + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + +#if N == 1 + explicit +#endif + map(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + : data(BOOST_PP_ENUM_PARAMS(N, _)) {} + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/value_of_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/value_of_data_impl.hpp new file mode 100644 index 0000000000..28d21678f0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/value_of_data_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP +#define BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_data_impl; + + template <> + struct value_of_data_impl + { + template + struct apply + { + typedef typename + value_of_impl:: + template apply::type::second_type + type; + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/value_of_impl.hpp new file mode 100644 index 0000000000..26b19f20f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/detail/value_of_impl.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_IMPL_HPP +#define BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_IMPL_HPP + +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename + result_of::value_at< + typename mpl::if_< + is_const + , typename It::seq_type::storage_type const + , typename It::seq_type::storage_type + >::type + , typename It::index + >::type + type; + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/limits.hpp new file mode 100644 index 0000000000..738abff4c6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/limits.hpp @@ -0,0 +1,25 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MAP_LIMITS_07212005_1104) +#define FUSION_MAP_LIMITS_07212005_1104 + +#include + +#if !defined(FUSION_MAX_MAP_SIZE) +# define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE +#else +# if FUSION_MAX_MAP_SIZE < 3 +# undef FUSION_MAX_MAP_SIZE +# if (FUSION_MAX_VECTOR_SIZE > 10) +# define FUSION_MAX_MAP_SIZE 10 +# else +# define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE +# endif +# endif +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/map.hpp new file mode 100644 index 0000000000..77fe292018 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/map.hpp @@ -0,0 +1,71 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MAP_07212005_1106) +#define FUSION_MAP_07212005_1106 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + struct fusion_sequence_tag; + + template + struct map : sequence_base > + { + struct category : forward_traversal_tag, associative_tag {}; + + typedef map_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + + typedef vector< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> + storage_type; + + typedef typename storage_type::size size; + + map() + : data() {} + + template + map(Sequence const& rhs) + : data(rhs) {} + + #include + + template + map& + operator=(T const& rhs) + { + data = rhs; + return *this; + } + + storage_type& get_data() { return data; } + storage_type const& get_data() const { return data; } + + private: + + storage_type data; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/map_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/map_fwd.hpp new file mode 100644 index 0000000000..d8a9c1b71f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/map/map_fwd.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MAP_FORWARD_07212005_1105) +#define FUSION_MAP_FORWARD_07212005_1105 + +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + struct map_tag; + struct map_iterator_tag; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_MAP_SIZE, typename T, void_) + > + struct map; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set.hpp new file mode 100644 index 0000000000..6b7674d66c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_CLASS_SET_10022005_0607) +#define FUSION_SEQUENCE_CLASS_SET_10022005_0607 + +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/convert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/convert.hpp new file mode 100644 index 0000000000..1aaddf0cfd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/convert.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_09232005_1341) +#define FUSION_CONVERT_09232005_1341 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_set + { + typedef typename detail::as_set::value> gen; + typedef typename gen:: + template apply::type>::type + type; + }; + } + + template + inline typename result_of::as_set::type + as_set(Sequence& seq) + { + typedef typename result_of::as_set::gen gen; + return gen::call(fusion::begin(seq)); + } + + template + inline typename result_of::as_set::type + as_set(Sequence const& seq) + { + typedef typename result_of::as_set::gen gen; + return gen::call(fusion::begin(seq)); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/as_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/as_set.hpp new file mode 100644 index 0000000000..3378633854 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/as_set.hpp @@ -0,0 +1,101 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_AS_SET_0932005_1341) +#define FUSION_AS_SET_0932005_1341 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct as_set; + + template <> + struct as_set<0> + { + template + struct apply + { + typedef set<> type; + }; + + template + static typename apply::type + call(Iterator) + { + return set<>(); + } + }; + +#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::next::type \ + BOOST_PP_CAT(I, BOOST_PP_INC(n)); + +#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ + typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ + BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); + +#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::value_of::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_NEXT_ITERATOR +#undef BOOST_FUSION_NEXT_CALL_ITERATOR +#undef BOOST_FUSION_VALUE_OF_ITERATOR + +}}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template <> + struct as_set + { + template + struct apply + { + BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) + typedef set type; + }; + + template + static typename apply::type + call(Iterator const& i0) + { + typedef apply gen; + typedef typename gen::type result; + BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _) + return result(BOOST_PP_ENUM_PARAMS(N, *i)); + } + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/begin_impl.hpp new file mode 100644 index 0000000000..8047743d15 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/begin_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_BEGIN_IMPL_HPP +#define BOOST_FUSION_CONTAINER_SET_DETAIL_BEGIN_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef + basic_iterator< + set_iterator_tag + , typename Seq::category + , Seq + , 0 + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/convert_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/convert_impl.hpp new file mode 100644 index 0000000000..1aa79fb121 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/convert_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_IMPL_09232005_1341) +#define FUSION_CONVERT_IMPL_09232005_1341 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct set_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename detail::as_set::value> gen; + typedef typename gen:: + template apply::type>::type + type; + + static type call(Sequence& seq) + { + return gen::call(fusion::begin(seq)); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/deref_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/deref_data_impl.hpp new file mode 100644 index 0000000000..7238cc6f11 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/deref_data_impl.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_DATA_IMPL_HPP +#define BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_data_impl; + + template <> + struct deref_data_impl + : deref_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/deref_impl.hpp new file mode 100644 index 0000000000..10a0349687 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/deref_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_IMPL_HPP +#define BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_IMPL_HPP + +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename + result_of::at< + typename mpl::if_< + is_const + , typename It::seq_type::storage_type const + , typename It::seq_type::storage_type + >::type + , typename It::index + >::type + type; + + static type + call(It const& it) + { + return ::boost::fusion::at(it.seq->get_data()); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/end_impl.hpp new file mode 100644 index 0000000000..a981585b42 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/end_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_END_IMPL_HPP +#define BOOST_FUSION_CONTAINER_SET_DETAIL_END_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef + basic_iterator< + set_iterator_tag + , typename Seq::category + , Seq + , Seq::size::value + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/key_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/key_of_impl.hpp new file mode 100644 index 0000000000..9c56aaf5da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/key_of_impl.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_KEY_OF_IMPL_HPP +#define BOOST_FUSION_CONTAINER_SET_DETAIL_KEY_OF_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct key_of_impl; + + template <> + struct key_of_impl + : value_of_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/set_forward_ctor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/set_forward_ctor.hpp new file mode 100644 index 0000000000..d105b15079 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/set_forward_ctor.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_SET_FORWARD_CTOR_09162005_1115) +#define FUSION_SET_FORWARD_CTOR_09162005_1115 + +#include +#include +#include + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE) +#include BOOST_PP_ITERATE() + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + +#if N == 1 + explicit +#endif + set(BOOST_PP_ENUM_BINARY_PARAMS( + N, typename detail::call_param::type _)) + : data(BOOST_PP_ENUM_PARAMS(N, _)) {} + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/value_of_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/value_of_data_impl.hpp new file mode 100644 index 0000000000..c98e5b9f77 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/value_of_data_impl.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_DATA_IMPL_HPP +#define BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_data_impl; + + template <> + struct value_of_data_impl + : value_of_impl + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/value_of_impl.hpp new file mode 100644 index 0000000000..02218310ae --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/detail/value_of_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_IMPL_HPP +#define BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename + result_of::value_at< + typename It::seq_type::storage_type + , typename It::index + >::type + type; + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/limits.hpp new file mode 100644 index 0000000000..35eb0803f4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/limits.hpp @@ -0,0 +1,25 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SET_LIMITS_09162005_1103) +#define FUSION_SET_LIMITS_09162005_1103 + +#include + +#if !defined(FUSION_MAX_SET_SIZE) +# define FUSION_MAX_SET_SIZE FUSION_MAX_VECTOR_SIZE +#else +# if FUSION_MAX_SET_SIZE < 3 +# undef FUSION_MAX_SET_SIZE +# if (FUSION_MAX_VECTOR_SIZE > 10) +# define FUSION_MAX_SET_SIZE 10 +# else +# define FUSION_MAX_SET_SIZE FUSION_MAX_VECTOR_SIZE +# endif +# endif +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/set.hpp new file mode 100644 index 0000000000..62b9140298 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/set.hpp @@ -0,0 +1,71 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SET_09162005_1104) +#define FUSION_SET_09162005_1104 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + struct fusion_sequence_tag; + + template + struct set : sequence_base > + { + struct category : forward_traversal_tag, associative_tag {}; + + typedef set_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + + typedef vector< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> + storage_type; + + typedef typename storage_type::size size; + + set() + : data() {} + + template + set(Sequence const& rhs) + : data(rhs) {} + + #include + + template + set& + operator=(T const& rhs) + { + data = rhs; + return *this; + } + + storage_type& get_data() { return data; } + storage_type const& get_data() const { return data; } + + private: + + storage_type data; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/set_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/set_fwd.hpp new file mode 100644 index 0000000000..082422f1f6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/set/set_fwd.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SET_FORWARD_09162005_1102) +#define FUSION_SET_FORWARD_09162005_1102 + +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + struct set_tag; + struct set_iterator_tag; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_SET_SIZE, typename T, void_) + > + struct set; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector.hpp new file mode 100644 index 0000000000..389a102e5a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector.hpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_CLASS_VECTOR_10022005_0602) +#define FUSION_SEQUENCE_CLASS_VECTOR_10022005_0602 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/convert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/convert.hpp new file mode 100644 index 0000000000..a31578a2f5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/convert.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_09222005_1104) +#define FUSION_CONVERT_09222005_1104 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_vector + { + typedef typename detail::as_vector::value> gen; + typedef typename gen:: + template apply::type>::type + type; + }; + } + + template + inline typename result_of::as_vector::type + as_vector(Sequence& seq) + { + typedef typename result_of::as_vector::gen gen; + return gen::call(fusion::begin(seq)); + } + + template + inline typename result_of::as_vector::type + as_vector(Sequence const& seq) + { + typedef typename result_of::as_vector::gen gen; + return gen::call(fusion::begin(seq)); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/advance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/advance_impl.hpp new file mode 100644 index 0000000000..c2c97b18e5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/advance_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ADVANCE_IMPL_09172005_1156) +#define FUSION_ADVANCE_IMPL_09172005_1156 + +namespace boost { namespace fusion +{ + struct vector_iterator_tag; + + template + struct vector_iterator; + + namespace extension + { + template + struct advance_impl; + + template <> + struct advance_impl + { + template + struct apply + { + typedef typename Iterator::index index; + typedef typename Iterator::vector vector; + typedef vector_iterator type; + + static type + call(Iterator const& i) + { + return type(i.vec); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/as_vector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/as_vector.hpp new file mode 100644 index 0000000000..a70fd4aea5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/as_vector.hpp @@ -0,0 +1,101 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_AS_VECTOR_09222005_0950) +#define FUSION_AS_VECTOR_09222005_0950 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct as_vector; + + template <> + struct as_vector<0> + { + template + struct apply + { + typedef vector0<> type; + }; + + template + static typename apply::type + call(Iterator) + { + return vector0<>(); + } + }; + +#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::next::type \ + BOOST_PP_CAT(I, BOOST_PP_INC(n)); + +#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ + typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ + BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); + +#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::value_of::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_NEXT_ITERATOR +#undef BOOST_FUSION_NEXT_CALL_ITERATOR +#undef BOOST_FUSION_VALUE_OF_ITERATOR + +}}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template <> + struct as_vector + { + template + struct apply + { + BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) + typedef BOOST_PP_CAT(vector, N) type; + }; + + template + static typename apply::type + call(Iterator const& i0) + { + typedef apply gen; + typedef typename gen::type result; + BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _) + return result(BOOST_PP_ENUM_PARAMS(N, *i)); + } + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/at_impl.hpp new file mode 100644 index 0000000000..1366ec9f40 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/at_impl.hpp @@ -0,0 +1,56 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_AT_IMPL_05042005_0741) +#define FUSION_AT_IMPL_05042005_0741 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef mpl::at element; + typedef typename detail::ref_result::type type; + + static type + call(Sequence& v) + { + return v.at_impl(N()); + } + }; + + template + struct apply + { + typedef mpl::at element; + typedef typename detail::cref_result::type type; + + static type + call(Sequence const& v) + { + return v.at_impl(N()); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/begin_impl.hpp new file mode 100644 index 0000000000..d2d687be0c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/begin_impl.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_05042005_1136) +#define FUSION_BEGIN_IMPL_05042005_1136 + +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef vector_iterator type; + + static type + call(Sequence& v) + { + return type(v); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/convert_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/convert_impl.hpp new file mode 100644 index 0000000000..5e1d080f20 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/convert_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_IMPL_09222005_1104) +#define FUSION_CONVERT_IMPL_09222005_1104 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + + namespace extension + { + template + struct convert_impl; + + template <> + struct convert_impl + { + template + struct apply + { + typedef typename detail::as_vector::value> gen; + typedef typename gen:: + template apply::type>::type + type; + + static type call(Sequence& seq) + { + return gen::call(fusion::begin(seq)); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/deref_impl.hpp new file mode 100644 index 0000000000..bd9f3d0670 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/deref_impl.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_05042005_1037) +#define FUSION_DEREF_IMPL_05042005_1037 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_iterator_tag; + + namespace extension + { + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename Iterator::vector vector; + typedef typename Iterator::index index; + typedef typename mpl::at< + typename vector::types, index> + element; + + typedef typename + mpl::eval_if< + is_const + , fusion::detail::cref_result + , fusion::detail::ref_result + >::type + type; + + static type + call(Iterator const& i) + { + return i.vec.at_impl(index()); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/distance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/distance_impl.hpp new file mode 100644 index 0000000000..9664d5c2da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/distance_impl.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DISTANCE_IMPL_09172005_0751) +#define FUSION_DISTANCE_IMPL_09172005_0751 + +#include + +namespace boost { namespace fusion +{ + struct vector_iterator_tag; + + namespace extension + { + template + struct distance_impl; + + template <> + struct distance_impl + { + template + struct apply : mpl::minus + { + static typename mpl::minus< + typename Last::index, typename First::index>::type + call(First const&, Last const&) + { + typedef typename mpl::minus< + typename Last::index, typename First::index>::type + result; + return result(); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/end_impl.hpp new file mode 100644 index 0000000000..f33282dcb8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/end_impl.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_05042005_1142) +#define FUSION_END_IMPL_05042005_1142 + +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef typename Sequence::size size; + typedef vector_iterator type; + + static type + call(Sequence& v) + { + return type(v); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/equal_to_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/equal_to_impl.hpp new file mode 100644 index 0000000000..5ff81c61a9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/equal_to_impl.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_EQUAL_TO_IMPL_05052005_1215) +#define FUSION_EQUAL_TO_IMPL_05052005_1215 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_iterator_tag; + + namespace extension + { + template + struct equal_to_impl; + + template <> + struct equal_to_impl + { + template + struct apply + : is_same< + typename I1::identity + , typename I2::identity + > + { + }; + }; + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/next_impl.hpp new file mode 100644 index 0000000000..b11cfdb281 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/next_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_05042005_1058) +#define FUSION_NEXT_IMPL_05042005_1058 + +#include + +namespace boost { namespace fusion +{ + struct vector_iterator_tag; + template + struct vector_iterator; + + namespace extension + { + template + struct next_impl; + + template <> + struct next_impl + { + template + struct apply + { + typedef typename Iterator::vector vector; + typedef typename Iterator::index index; + typedef vector_iterator type; + + static type + call(Iterator const& i) + { + return type(i.vec); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/prior_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/prior_impl.hpp new file mode 100644 index 0000000000..610591b68c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/prior_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PRIOR_IMPL_05042005_1145) +#define FUSION_PRIOR_IMPL_05042005_1145 + +#include + +namespace boost { namespace fusion +{ + struct vector_iterator_tag; + template + struct vector_iterator; + + namespace extension + { + template + struct prior_impl; + + template <> + struct prior_impl + { + template + struct apply + { + typedef typename Iterator::vector vector; + typedef typename Iterator::index index; + typedef vector_iterator type; + + static type + call(Iterator const& i) + { + return type(i.vec); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/value_at_impl.hpp new file mode 100644 index 0000000000..0178054b41 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/value_at_impl.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_AT_IMPL_05052005_0232) +#define FUSION_VALUE_AT_IMPL_05052005_0232 + +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + { + typedef typename mpl::at::type type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/value_of_impl.hpp new file mode 100644 index 0000000000..3a775fbbac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/value_of_impl.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_OF_IMPL_05052005_1128) +#define FUSION_VALUE_OF_IMPL_05052005_1128 + +#include + +namespace boost { namespace fusion +{ + struct vector_iterator_tag; + + namespace extension + { + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename Iterator::vector vector; + typedef typename Iterator::index index; + typedef typename mpl::at< + typename vector::types, index>::type + type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp new file mode 100644 index 0000000000..e4680bb8bb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_VECTOR_FORWARD_CTOR_07122005_1123) +#define FUSION_VECTOR_FORWARD_CTOR_07122005_1123 + +#include +#include +#include + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + +#if N == 1 + explicit +#endif + vector(BOOST_PP_ENUM_BINARY_PARAMS( + N, typename detail::call_param::type _)) + : vec(BOOST_PP_ENUM_PARAMS(N, _)) {} + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_n.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_n.hpp new file mode 100644 index 0000000000..ea314ac28e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -0,0 +1,150 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +// No include guard. This file is meant to be included many times + +#if !defined(FUSION_MACRO_05042005) +#define FUSION_MACRO_05042005 + +#define FUSION_MEMBER_DEFAULT_INIT(z, n, _) m##n() +#define FUSION_MEMBER_INIT(z, n, _) m##n(_##n) +#define FUSION_COPY_INIT(z, n, _) m##n(other.m##n) +#define FUSION_MEMBER_DECL(z, n, _) T##n m##n; + +#define FUSION_MEMBER_ASSIGN(z, n, _) \ + this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n); + +#define FUSION_DEREF_MEMBER_ASSIGN(z, n, _) \ + this->BOOST_PP_CAT(m, n) = *BOOST_PP_CAT(i, n); + +#define FUSION_AT_IMPL(z, n, _) \ + typename add_reference::type \ + at_impl(mpl::int_) { return this->m##n; } \ + typename add_reference::type>::type \ + at_impl(mpl::int_) const { return this->m##n; } + +#define FUSION_ITER_DECL_VAR(z, n, _) \ + typedef typename result_of::next< \ + BOOST_PP_CAT(I, BOOST_PP_DEC(n))>::type BOOST_PP_CAT(I, n); \ + BOOST_PP_CAT(I, n) BOOST_PP_CAT(i, n) \ + = fusion::next(BOOST_PP_CAT(i, BOOST_PP_DEC(n))); + +#endif + +#define N BOOST_PP_ITERATION() + + template + struct BOOST_PP_CAT(vector_data, N) : sequence_base + { + BOOST_PP_CAT(vector_data, N)() + : BOOST_PP_ENUM(N, FUSION_MEMBER_DEFAULT_INIT, _) {} + + BOOST_PP_CAT(vector_data, N)( + BOOST_PP_ENUM_BINARY_PARAMS( + N, typename detail::call_param::type _)) + : BOOST_PP_ENUM(N, FUSION_MEMBER_INIT, _) {} + + BOOST_PP_CAT(vector_data, N)( + BOOST_PP_CAT(vector_data, N) const& other) + : BOOST_PP_ENUM(N, FUSION_COPY_INIT, _) {} + + BOOST_PP_CAT(vector_data, N)& + operator=(BOOST_PP_CAT(vector_data, N) const& vec) + { + BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _) + return *this; + } + + template + static BOOST_PP_CAT(vector_data, N) + init_from_sequence(Sequence const& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _) + return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i)); + } + + BOOST_PP_REPEAT(N, FUSION_MEMBER_DECL, _) + }; + + template + struct BOOST_PP_CAT(vector, N) + : BOOST_PP_CAT(vector_data, N)< + BOOST_PP_CAT(vector, N) + , BOOST_PP_ENUM_PARAMS(N, T)> + { + typedef BOOST_PP_CAT(vector, N) this_type; + typedef BOOST_PP_CAT(vector_data, N) base_type; + typedef mpl::BOOST_PP_CAT(vector, N) types; + typedef vector_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + typedef random_access_traversal_tag category; + typedef mpl::int_ size; + + BOOST_PP_CAT(vector, N)() {} + +#if (N == 1) + explicit +#endif + BOOST_PP_CAT(vector, N)( + BOOST_PP_ENUM_BINARY_PARAMS( + N, typename detail::call_param::type _)) + : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} + + template + BOOST_PP_CAT(vector, N)( + BOOST_PP_CAT(vector, N) const& vec) + : base_type(BOOST_PP_ENUM_PARAMS(N, vec.m)) {} + + template + BOOST_PP_CAT(vector, N)( + Sequence const& seq +#if (N == 1) + , typename disable_if >::type* /*dummy*/ = 0 +#endif + ) + : base_type(base_type::init_from_sequence(seq)) {} + + template + BOOST_PP_CAT(vector, N)& + operator=(BOOST_PP_CAT(vector, N) const& vec) + { + BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _) + return *this; + } + + template + typename disable_if, this_type&>::type + operator=(Sequence const& seq) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(seq); + BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _) + BOOST_PP_REPEAT(N, FUSION_DEREF_MEMBER_ASSIGN, _) + return *this; + } + + BOOST_PP_REPEAT(N, FUSION_AT_IMPL, _) + + template + typename add_reference::type>::type + at_impl(I) + { + return this->at_impl(mpl::int_()); + } + + template + typename add_reference::type>::type>::type + at_impl(I) const + { + return this->at_impl(mpl::int_()); + } + }; + +#undef N + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_n_chooser.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_n_chooser.hpp new file mode 100644 index 0000000000..f4b85d89c4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/detail/vector_n_chooser.hpp @@ -0,0 +1,81 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_VECTOR_N_CHOOSER_07072005_1248) +#define FUSION_VECTOR_N_CHOOSER_07072005_1248 + +#include + +// include vector0..N where N is FUSION_MAX_VECTOR_SIZE +#include +#if (FUSION_MAX_VECTOR_SIZE > 10) +#include +#endif +#if (FUSION_MAX_VECTOR_SIZE > 20) +#include +#endif +#if (FUSION_MAX_VECTOR_SIZE > 30) +#include +#endif +#if (FUSION_MAX_VECTOR_SIZE > 40) +#include +#endif + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; +}} + +namespace boost { namespace fusion { namespace detail +{ + template + struct vector_n_chooser + { + typedef BOOST_PP_CAT(vector, FUSION_MAX_VECTOR_SIZE) type; + }; + + template <> + struct vector_n_chooser + { + typedef vector0<> type; + }; + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (1, BOOST_PP_DEC(FUSION_MAX_VECTOR_SIZE)) +#include BOOST_PP_ITERATE() + +}}} + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template + struct vector_n_chooser< + BOOST_PP_ENUM_PARAMS(N, T) + BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(FUSION_MAX_VECTOR_SIZE, N), void_ BOOST_PP_INTERCEPT)> + { + typedef BOOST_PP_CAT(vector, N) type; + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/limits.hpp new file mode 100644 index 0000000000..0e7e3a0359 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/limits.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR_LIMITS_07072005_1246) +#define FUSION_VECTOR_LIMITS_07072005_1246 + +#if !defined(FUSION_MAX_VECTOR_SIZE) +# define FUSION_MAX_VECTOR_SIZE 10 +#else +# if FUSION_MAX_VECTOR_SIZE < 3 +# undef FUSION_MAX_VECTOR_SIZE +# define FUSION_MAX_VECTOR_SIZE 10 +# endif +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector.hpp new file mode 100644 index 0000000000..8eaa6a6f61 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector.hpp @@ -0,0 +1,151 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR_07072005_1244) +#define FUSION_VECTOR_07072005_1244 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + struct fusion_sequence_tag; + + template + struct vector + : sequence_base > + { + private: + + typedef typename detail::vector_n_chooser< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type + vector_n; + + template + friend struct vector; + + public: + + typedef typename vector_n::types types; + typedef typename vector_n::fusion_tag fusion_tag; + typedef typename vector_n::tag tag; + typedef typename vector_n::size size; + typedef typename vector_n::category category; + typedef typename vector_n::is_view is_view; + + vector() + : vec() {} + + template + vector(vector const& rhs) + : vec(rhs.vec) {} + + vector(vector const& rhs) + : vec(rhs.vec) {} + + template + vector(Sequence const& rhs) +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) + : vec(ctor_helper(rhs, is_base_of())) {} +#else + : vec(rhs) {} +#endif + + // Expand a couple of forwarding constructors for arguments + // of type (T0), (T0, T1), (T0, T1, T2) etc. Example: + // + // vector( + // typename detail::call_param::type _0 + // , typename detail::call_param::type _1) + // : vec(_0, _1) {} + #include + + template + vector& + operator=(vector const& rhs) + { + vec = rhs.vec; + return *this; + } + + template + vector& + operator=(T const& rhs) + { + vec = rhs; + return *this; + } + + template + typename add_reference< + typename mpl::at_c::type + >::type + at_impl(mpl::int_ index) + { + return vec.at_impl(index); + } + + template + typename add_reference< + typename add_const< + typename mpl::at_c::type + >::type + >::type + at_impl(mpl::int_ index) const + { + return vec.at_impl(index); + } + + template + typename add_reference< + typename mpl::at::type + >::type + at_impl(I /*index*/) + { + return vec.at_impl(mpl::int_()); + } + + template + typename add_reference< + typename add_const< + typename mpl::at::type + >::type + >::type + at_impl(I /*index*/) const + { + return vec.at_impl(mpl::int_()); + } + + private: + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) + static vector_n const& + ctor_helper(vector const& rhs, mpl::true_) + { + return rhs.vec; + } + + template + static T const& + ctor_helper(T const& rhs, mpl::false_) + { + return rhs; + } +#endif + + vector_n vec; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector10.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector10.hpp new file mode 100644 index 0000000000..f1af70d72e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector10.hpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR10_05042005_0257) +#define FUSION_VECTOR10_05042005_0257 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + + template + struct vector0 : sequence_base > + { + typedef mpl::vector0<> types; + typedef vector_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + typedef random_access_traversal_tag category; + typedef mpl::int_<0> size; + + vector0() {} + + template + vector0(Sequence const& /*seq*/) + {} + }; + +// expand vector1 to vector10 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, 10) +#include BOOST_PP_ITERATE() + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector20.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector20.hpp new file mode 100644 index 0000000000..be71100640 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector20.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR20_05052005_0205) +#define FUSION_VECTOR20_05052005_0205 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +// expand vector11 to vector20 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (11, 20) +#include BOOST_PP_ITERATE() + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector30.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector30.hpp new file mode 100644 index 0000000000..efbe92937b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector30.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR30_05052005_0206) +#define FUSION_VECTOR30_05052005_0206 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +// expand vector21 to vector30 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (21, 30) +#include BOOST_PP_ITERATE() + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector40.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector40.hpp new file mode 100644 index 0000000000..b72a23c5f1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector40.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR40_05052005_0208) +#define FUSION_VECTOR40_05052005_0208 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +// expand vector31 to vector40 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (31, 40) +#include BOOST_PP_ITERATE() + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector50.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector50.hpp new file mode 100644 index 0000000000..ab8515d787 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector50.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR50_05052005_0207) +#define FUSION_VECTOR50_05052005_0207 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +// expand vector41 to vector50 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (41, 50) +#include BOOST_PP_ITERATE() + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector_fwd.hpp new file mode 100644 index 0000000000..2c4848db5e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector_fwd.hpp @@ -0,0 +1,25 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR_FORWARD_07072005_0125) +#define FUSION_VECTOR_FORWARD_07072005_0125 + +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + > + struct vector; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector_iterator.hpp new file mode 100644 index 0000000000..8faa13adac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/container/vector/vector_iterator.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VECTOR_ITERATOR_05042005_0635) +#define FUSION_VECTOR_ITERATOR_05042005_0635 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_iterator_tag; + struct random_access_traversal_tag; + + template + struct vector_iterator_identity; + + template + struct vector_iterator : iterator_base > + { + typedef mpl::int_ index; + typedef Vector vector; + typedef vector_iterator_tag fusion_tag; + typedef random_access_traversal_tag category; + typedef vector_iterator_identity< + typename add_const::type, N> identity; + + vector_iterator(Vector& in_vec) + : vec(in_vec) {} + Vector& vec; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + vector_iterator& operator= (vector_iterator const&); + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional.hpp new file mode 100644 index 0000000000..12662d973a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_HPP_INCLUDED + +#include +#include +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter.hpp new file mode 100644 index 0000000000..1a1f9819f0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP_INCLUDED +#include +#include +#include +#include +#include +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/detail/access.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/detail/access.hpp new file mode 100644 index 0000000000..ee03ffd0ad --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/detail/access.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED + +namespace boost { namespace fusion { namespace detail +{ + // const reference deduction for function templates that accept T const & + template struct cref { typedef T const& type; }; + template struct cref { typedef T const& type; }; + template struct cref { typedef T const& type; }; + + // mutable reference deduction for function templates that accept T & + template struct mref { typedef T & type; }; + template struct mref { typedef T & type; }; + + // generic reference deduction for function templates that are overloaded + // to accept both T const & and T & + template struct gref { typedef T const& type; }; + template struct gref { typedef T & type; }; + template struct gref { typedef T const& type; }; + + // appropriately qualified target function in const context + template struct qf_c { typedef T const type; }; + template struct qf_c { typedef T const type; }; + template struct qf_c { typedef T type; }; + + // appropriately qualified target function in non-const context + template struct qf { typedef T type; }; + template struct qf { typedef T const type; }; + template struct qf { typedef T type; }; +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused.hpp new file mode 100644 index 0000000000..91ae1f2cf1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused.hpp @@ -0,0 +1,95 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED + +#include +#include + +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion +{ + template class fused; + + //----- ---- --- -- - - - - + + template + class fused + { + Function fnc_transformed; + + typedef typename detail::qf_c::type & func_const_fwd_t; + typedef typename detail::qf::type & func_fwd_t; + + public: + + inline explicit fused(func_const_fwd_t f = Function()) + : fnc_transformed(f) + { } + + template + inline typename result_of::invoke::type + operator()(Seq const & s) const + { + return fusion::invoke(this->fnc_transformed,s); + } + + template + inline typename result_of::invoke::type + operator()(Seq const & s) + { + return fusion::invoke(this->fnc_transformed,s); + } + + template + inline typename result_of::invoke::type + operator()(Seq & s) const + { + return fusion::invoke(this->fnc_transformed,s); + } + + template + inline typename result_of::invoke::type + operator()(Seq & s) + { + return fusion::invoke(this->fnc_transformed,s); + } + + template + struct result; + + template + struct result< Self const (Seq) > + : result_of::invoke::type > + { }; + + template + struct result< Self(Seq) > + : result_of::invoke::type > + { }; + + }; + +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused_function_object.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused_function_object.hpp new file mode 100644 index 0000000000..da8ac99baf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused_function_object.hpp @@ -0,0 +1,100 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED + +#include +#include + +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion +{ + template class fused_function_object; + + //----- ---- --- -- - - - - + + template + class fused_function_object + { + Function fnc_transformed; + + typedef typename detail::qf_c::type & func_const_fwd_t; + typedef typename detail::qf::type & func_fwd_t; + + public: + + inline explicit fused_function_object(func_const_fwd_t f = Function()) + : fnc_transformed(f) + { } + + template + inline typename result_of::invoke_function_object::type operator()(Seq const & s) const + { + return fusion::invoke_function_object< + func_const_fwd_t >(this->fnc_transformed,s); + } + + template + inline typename result_of::invoke_function_object::type + operator()(Seq const & s) + { + return fusion::invoke_function_object< + func_fwd_t >(this->fnc_transformed,s); + } + + template + inline typename result_of::invoke_function_object::type + operator()(Seq & s) const + { + return fusion::invoke_function_object< + func_const_fwd_t >(this->fnc_transformed,s); + } + + template + inline typename result_of::invoke_function_object::type + operator()(Seq & s) + { + return fusion::invoke_function_object< + func_fwd_t >(this->fnc_transformed,s); + } + + template + struct result; + + template + struct result< Self const (Seq) > + : result_of::invoke_function_object::type > + { }; + + template + struct result< Self(Seq) > + : result_of::invoke_function_object::type > + { }; + }; + +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused_procedure.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused_procedure.hpp new file mode 100644 index 0000000000..10c7c7a0d2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/fused_procedure.hpp @@ -0,0 +1,80 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED + +#include +#include + +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion +{ + template class fused_procedure; + + //----- ---- --- -- - - - - + + template + class fused_procedure + { + Function fnc_transformed; + + typedef typename detail::qf_c::type & func_const_fwd_t; + typedef typename detail::qf::type & func_fwd_t; + + public: + + inline explicit fused_procedure(func_const_fwd_t f = Function()) + : fnc_transformed(f) + { } + + template + inline void operator()(Seq const & s) const + { + fusion::invoke_procedure< + func_const_fwd_t >(this->fnc_transformed,s); + } + + template + inline void operator()(Seq const & s) + { + fusion::invoke_procedure< + func_fwd_t >(this->fnc_transformed,s); + } + + template + inline void operator()(Seq & s) const + { + fusion::invoke_procedure< + func_const_fwd_t >(this->fnc_transformed,s); + } + + template + inline void operator()(Seq & s) + { + return fusion::invoke_procedure< + func_fwd_t >(this->fnc_transformed,s); + } + + typedef void result_type; + }; +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/limits.hpp new file mode 100644 index 0000000000..783bc63275 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/limits.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED) +# define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED + +# include + +# if !defined(BOOST_FUSION_UNFUSED_MAX_ARITY) +# define BOOST_FUSION_UNFUSED_MAX_ARITY 6 +# elif BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE +# error "BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE" +# endif +# if !defined(BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY) +# define BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY 6 +# elif BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE +# error "BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE" +# endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/unfused.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/unfused.hpp new file mode 100755 index 0000000000..b0d02bc47c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/unfused.hpp @@ -0,0 +1,162 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP_INCLUDED) +#if !defined(BOOST_PP_IS_ITERATING) + +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion +{ + template + class unfused; + + //----- ---- --- -- - - - - + + template + class unfused + : public unfused + { + typedef typename detail::qf_c::type function_c; + typedef typename detail::qf::type function; + typedef typename detail::call_param::type func_const_fwd_t; + public: + + using unfused::operator(); + + inline explicit unfused(func_const_fwd_t f = function()) + : unfused(f) + { } + + typedef typename boost::result_of< + function_c(fusion::vector0<> &) >::type call_const_0_result; + + inline call_const_0_result operator()() const + { + fusion::vector0<> arg; + return this->fnc_transformed(arg); + } + + typedef typename boost::result_of< + function(fusion::vector0<> &) >::type call_0_result; + + inline call_0_result operator()() + { + fusion::vector0<> arg; + return this->fnc_transformed(arg); + } + }; + + template class unfused + { + protected: + Function fnc_transformed; + typedef typename detail::qf_c::type function_c; + typedef typename detail::qf::type function; + typedef typename detail::call_param::type func_const_fwd_t; + public: + + inline explicit unfused(func_const_fwd_t f = function()) + : fnc_transformed(f) + { } + + template + struct result; + + #define BOOST_PP_FILENAME_1 \ + + #define BOOST_PP_ITERATION_LIMITS \ + (1,BOOST_FUSION_UNFUSED_MAX_ARITY) + #include BOOST_PP_ITERATE() + }; +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +namespace boost +{ + template + struct result_of< boost::fusion::unfused const () > + { + typedef typename boost::fusion::unfused::call_const_0_result type; + }; + template + struct result_of< boost::fusion::unfused() > + { + typedef typename boost::fusion::unfused::call_0_result type; + }; +} + +#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP_INCLUDED +#else // defined(BOOST_PP_IS_ITERATING) +//////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +//////////////////////////////////////////////////////////////////////////////// +#define N BOOST_PP_ITERATION() + + template + struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) > + : boost::result_of< function_c( + BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N, + typename detail::mref::type BOOST_PP_INTERCEPT) > & )> + { }; + + template + struct result< Self(BOOST_PP_ENUM_PARAMS(N,T)) > + : boost::result_of< function( + BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N, + typename detail::mref::type BOOST_PP_INTERCEPT) > & )> + { }; + + template + inline typename boost::result_of & )>::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const + { + BOOST_PP_CAT(fusion::vector,N)< + BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) > + arg(BOOST_PP_ENUM_PARAMS(N,a)); + return this->fnc_transformed(arg); + } + + template + inline typename boost::result_of & )>::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) + { + BOOST_PP_CAT(fusion::vector,N)< + BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) > + arg(BOOST_PP_ENUM_PARAMS(N,a)); + return this->fnc_transformed(arg); + } +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/unfused_typed.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/unfused_typed.hpp new file mode 100644 index 0000000000..0f19f28f0b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/adapter/unfused_typed.hpp @@ -0,0 +1,164 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP_INCLUDED) +#if !defined(BOOST_PP_IS_ITERATING) + +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + + +namespace boost { namespace fusion +{ + + template class unfused_typed; + + //----- ---- --- -- - - - - + + namespace detail + { + template + struct unfused_typed_impl; + } + + template + class unfused_typed + : public detail::unfused_typed_impl + < unfused_typed, Function, Sequence, + result_of::size::value > + { + Function fnc_transformed; + + template + friend struct detail::unfused_typed_impl; + + typedef typename detail::call_param::type func_const_fwd_t; + + public: + + inline explicit unfused_typed(func_const_fwd_t f = Function()) + : fnc_transformed(f) + { } + }; + + #define BOOST_PP_FILENAME_1 + #define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY) + #include BOOST_PP_ITERATE() + +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +namespace boost +{ + template + struct result_of< boost::fusion::unfused_typed const () > + : boost::fusion::unfused_typed::template result< + boost::fusion::unfused_typed const () > + { }; + template + struct result_of< boost::fusion::unfused_typed() > + : boost::fusion::unfused_typed::template result< + boost::fusion::unfused_typed () > + { }; +} + + +#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP_INCLUDED +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#define N BOOST_PP_ITERATION() + + namespace detail + { + + template + struct unfused_typed_impl + { + typedef typename detail::qf_c::type function_c; + typedef typename detail::qf::type function; + typedef typename result_of::as_vector::type arg_vector_t; + + public: + +#define M(z,i,s) \ + typename call_param::type>::type a##i + + inline typename boost::result_of< + function_c(arg_vector_t &) >::type + operator()(BOOST_PP_ENUM(N,M,arg_vector_t)) const + { +#if N > 0 + arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a)); +#else + arg_vector_t arg; +#endif + return static_cast(this)->fnc_transformed(arg); + } + + inline typename boost::result_of< + function(arg_vector_t &) >::type + operator()(BOOST_PP_ENUM(N,M,arg_vector_t)) + { +#if N > 0 + arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a)); +#else + arg_vector_t arg; +#endif + return static_cast(this)->fnc_transformed(arg); + } + +#undef M + + template struct result { typedef void type; }; + + template + struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) > + : boost::result_of< function_c(arg_vector_t &) > + { }; + + template + struct result< Self (BOOST_PP_ENUM_PARAMS(N,T)) > + : boost::result_of< function(arg_vector_t &) > + { }; + }; + + } // namespace detail + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation.hpp new file mode 100644 index 0000000000..3d812b9f7e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_GENERATION_HPP_INCLUDED + +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/detail/gen_make_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/detail/gen_make_adapter.hpp new file mode 100644 index 0000000000..1c2c3e95a0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/detail/gen_make_adapter.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +// No include guard - this file is included multiple times intentionally. + +#include +#include + +#if !defined(BOOST_FUSION_CLASS_TPL_NAME) +# error "BOOST_FUSION_CLASS_TPL_NAME undefined" +#endif + +#define BOOST_FUSION_FUNC_NAME BOOST_PP_CAT(make_,BOOST_FUSION_CLASS_TPL_NAME) + +namespace boost { namespace fusion +{ + + namespace result_of + { + template + struct BOOST_FUSION_FUNC_NAME + { + typedef fusion::BOOST_FUSION_CLASS_TPL_NAME< + typename fusion::detail::as_fusion_element::type > type; + }; + } + + template + inline typename result_of::BOOST_FUSION_FUNC_NAME::type + BOOST_FUSION_FUNC_NAME(F const & f) + { + return typename result_of::BOOST_FUSION_FUNC_NAME::type(f); + } + +}} + +#undef BOOST_FUSION_CLASS_TPL_NAME +#undef BOOST_FUSION_FUNC_NAME + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused.hpp new file mode 100644 index 0000000000..12365824f7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED + +#include + +#define BOOST_FUSION_CLASS_TPL_NAME fused +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused_function_object.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused_function_object.hpp new file mode 100644 index 0000000000..4146ddd6a7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused_function_object.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED + +#include + +#define BOOST_FUSION_CLASS_TPL_NAME fused_function_object +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused_procedure.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused_procedure.hpp new file mode 100644 index 0000000000..0687577c26 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_fused_procedure.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED + +#include + +#define BOOST_FUSION_CLASS_TPL_NAME fused_procedure +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_unfused.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_unfused.hpp new file mode 100644 index 0000000000..79eadbd5aa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/generation/make_unfused.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP_INCLUDED + +#include + +#define BOOST_FUSION_CLASS_TPL_NAME unfused +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation.hpp new file mode 100644 index 0000000000..3ca68c34ff --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP_INCLUDED + +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/detail/that_ptr.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/detail/that_ptr.hpp new file mode 100644 index 0000000000..a92c436b25 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/detail/that_ptr.hpp @@ -0,0 +1,87 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct that_ptr + { + private: + + typedef typename remove_reference::type pointee; + + template + static inline pointee * do_get_pointer(T &, pointee * x) + { + return x; + } + template + static inline pointee * do_get_pointer(T & x, void const *) + { + return get_pointer(x); + } + + public: + + static inline pointee * get(pointee * x) + { + return x; + } + + static inline pointee * get(pointee & x) + { + return boost::addressof(x); + } + + template static inline pointee * get(T & x) + { + return do_get_pointer(x, boost::addressof(x)); + } + }; + + template struct non_const_pointee; + + namespace adl_barrier + { + using boost::get_pointer; + void const * BOOST_TT_DECL get_pointer(...); // fallback + + template< typename T> char const_tester(T *); + template< typename T> long const_tester(T const *); + + template + struct non_const_pointee_impl + { + static Ptr & what; + + static bool const value = + sizeof(const_tester(get_pointer(what))) == 1; + }; + } + + template struct non_const_pointee + : adl_barrier::non_const_pointee_impl< + typename remove_cv< + typename remove_reference::type >::type > + { + typedef non_const_pointee type; + typedef bool value_type; + }; + +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke.hpp new file mode 100644 index 0000000000..085beb7eda --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke.hpp @@ -0,0 +1,331 @@ +/*============================================================================= + Copyright (c) 2005-2006 Joao Abecasis + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED) +#if !defined(BOOST_PP_IS_ITERATING) + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template struct invoke; + } + + template + inline typename result_of::invoke::type + invoke(Function, Sequence &); + + template + inline typename result_of::invoke::type + invoke(Function, Sequence const &); + + //----- ---- --- -- - - - - + + namespace detail + { + namespace ft = function_types; + + template< + typename Function, class Sequence, + int N = result_of::size::value, + bool CBI = ft::is_callable_builtin::value, + bool RandomAccess = traits::is_random_access::value + > + struct invoke_impl; + + template + struct invoke_param_types; + + template + struct invoke_data_member; + + template + struct invoke_mem_fn; + + #define BOOST_PP_FILENAME_1 + #define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_INVOKE_MAX_ARITY) + #include BOOST_PP_ITERATE() + + template + struct invoke_nonmember_builtin + // use same implementation as for function objects but... + : invoke_impl< // ...work around boost::result_of bugs + typename mpl::eval_if< ft::is_function, + boost::add_reference, boost::remove_cv >::type, + Sequence, N, false, RandomAccess > + { }; + + template + struct invoke_impl + : mpl::if_< ft::is_member_function_pointer, + invoke_mem_fn, + invoke_nonmember_builtin + >::type + { }; + + template + struct invoke_impl + : mpl::eval_if< ft::is_member_pointer, + mpl::if_< ft::is_member_function_pointer, + invoke_mem_fn, + invoke_data_member >, + mpl::identity< invoke_nonmember_builtin< + Function,Sequence,1,RandomAccess> > + >::type + { }; + + template + struct invoke_data_member< T C::*, Sequence > + { + private: + + typedef typename result_of::front::type that; + + typedef mpl::or_< boost::is_convertible, + boost::is_convertible, + non_const_pointee > non_const_cond; + + typedef typename mpl::eval_if< non_const_cond, + mpl::identity, add_const >::type qualified_class; + + typedef typename mpl::eval_if< non_const_cond, + mpl::identity, add_const >::type qualified_type; + + public: + + typedef typename boost::add_reference::type + result_type; + + static inline result_type call(T C::* f, Sequence & s) + { + typename result_of::front::type c = fusion::front(s); + return that_ptr::get(c)->*f; + } + }; + } + + namespace result_of + { + template struct invoke + { + typedef typename detail::invoke_impl< + typename boost::remove_reference::type, Sequence + >::result_type type; + }; + } + + template + inline typename result_of::invoke::type + invoke(Function f, Sequence & s) + { + return detail::invoke_impl< + typename boost::remove_reference::type,Sequence + >::call(f,s); + } + + template + inline typename result_of::invoke::type + invoke(Function f, Sequence const & s) + { + return detail::invoke_impl< + typename boost::remove_reference::type,Sequence const + >::call(f,s); + } + +}} + +#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#define N BOOST_PP_ITERATION() + + template + struct invoke_impl + { + public: + + typedef typename boost::result_of< +#define M(z,j,data) typename result_of::at_c::type + Function(BOOST_PP_ENUM(N,M,~)) >::type result_type; +#undef M + +#if N > 0 + + template + static inline result_type + call(F & f, Sequence & s) + { +#define M(z,j,data) fusion::at_c(s) + return f( BOOST_PP_ENUM(N,M,~) ); + } + +#else + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + + }; + + +#if N > 0 + template + struct invoke_mem_fn + { + public: + + typedef typename ft::result_type::type result_type; + + template + static inline result_type + call(F & f, Sequence & s) + { + return (that_ptr >::type + >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~)); + } + }; +#endif + +#undef M + +#define M(z,j,data) \ + typename seq::I##j i##j = \ + fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j))); + + template + struct invoke_impl + { + private: + typedef invoke_param_types seq; + public: + + typedef typename boost::result_of< + Function(BOOST_PP_ENUM_PARAMS(N,typename seq::T)) + >::type result_type; + +#if N > 0 + + template + static inline result_type + call(F & f, Sequence & s) + { + typename seq::I0 i0 = fusion::begin(s); + BOOST_PP_REPEAT_FROM_TO(1,N,M,~) + return f( BOOST_PP_ENUM_PARAMS(N,*i) ); + } + +#else + + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + + }; + +#if N > 0 + template + struct invoke_mem_fn + { + private: + typedef invoke_param_types seq; + public: + + typedef typename ft::result_type::type result_type; + + template + static inline result_type + call(F & f, Sequence & s) + { + typename seq::I0 i0 = fusion::begin(s); + BOOST_PP_REPEAT_FROM_TO(1,N,M,~) + + return (that_ptr< typename mpl::front< + ft::parameter_types >::type + >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i)); + } + }; +#endif + +#undef M + + template struct invoke_param_types + { +#if N > 0 + typedef typename result_of::begin::type I0; + typedef typename result_of::deref::type T0; + +#define M(z,i,data) \ + typedef typename result_of::next< \ + BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \ + typedef typename result_of::deref::type T##i; + + BOOST_PP_REPEAT_FROM_TO(1,N,M,~) +#undef M +#endif + }; + + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke_function_object.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke_function_object.hpp new file mode 100644 index 0000000000..81c33f9229 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke_function_object.hpp @@ -0,0 +1,203 @@ +/*============================================================================= + Copyright (c) 2005-2006 Joao Abecasis + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED) +#if !defined(BOOST_PP_IS_ITERATING) + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template struct invoke_function_object; + } + + template + inline typename result_of::invoke_function_object::type + invoke_function_object(Function, Sequence &); + + template + inline typename result_of::invoke_function_object::type invoke_function_object(Function, Sequence const &); + + //----- ---- --- -- - - - - + + namespace detail + { + template< + class Function, class Sequence, + int N = result_of::size::value, + bool RandomAccess = traits::is_random_access::value + > + struct invoke_function_object_impl; + + template + struct invoke_function_object_param_types; + + #define BOOST_PP_FILENAME_1 \ + + #define BOOST_PP_ITERATION_LIMITS \ + (0, BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY) + #include BOOST_PP_ITERATE() + } + + namespace result_of + { + template struct invoke_function_object + { + typedef typename detail::invoke_function_object_impl< + typename boost::remove_reference::type, Sequence + >::result_type type; + }; + } + + template + inline typename result_of::invoke_function_object::type + invoke_function_object(Function f, Sequence & s) + { + return detail::invoke_function_object_impl< + typename boost::remove_reference::type,Sequence + >::call(f,s); + } + + template + inline typename result_of::invoke_function_object::type + invoke_function_object(Function f, Sequence const & s) + { + return detail::invoke_function_object_impl< + typename boost::remove_reference::type,Sequence const + >::call(f,s); + } + +}} + +#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#define N BOOST_PP_ITERATION() + + template + struct invoke_function_object_impl + { + public: + + typedef typename boost::result_of< +#define M(z,j,data) \ + typename result_of::at_c::type + Function (BOOST_PP_ENUM(N,M,~)) >::type result_type; +#undef M + +#if N > 0 + + template + static inline result_type + call(F & f, Sequence & s) + { +#define M(z,j,data) fusion::at_c(s) + return f( BOOST_PP_ENUM(N,M,~) ); +#undef M + } + +#else + + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + + }; + + template + struct invoke_function_object_impl + { + private: + typedef invoke_function_object_param_types seq; + public: + typedef typename boost::result_of< + Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T)) + >::type result_type; + +#if N > 0 + + template + static inline result_type + call(F & f, Sequence & s) + { + typename seq::I0 i0 = fusion::begin(s); +#define M(z,j,data) \ + typename seq::I##j i##j = \ + fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j))); + BOOST_PP_REPEAT_FROM_TO(1,N,M,~) +#undef M + return f( BOOST_PP_ENUM_PARAMS(N,*i) ); + } + +#else + + template + static inline result_type + call(F & f, Sequence & /*s*/) + { + return f(); + } + +#endif + + }; + + template + struct invoke_function_object_param_types + { +#if N > 0 + typedef typename result_of::begin::type I0; + typedef typename result_of::deref::type T0; + +#define M(z,i,data) \ + typedef typename result_of::next< \ + BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \ + typedef typename result_of::deref::type T##i; + + BOOST_PP_REPEAT_FROM_TO(1,N,M,~) +#undef M +#endif + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke_procedure.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke_procedure.hpp new file mode 100644 index 0000000000..ddb5e5065d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/invoke_procedure.hpp @@ -0,0 +1,194 @@ +/*============================================================================= + Copyright (c) 2005-2006 Joao Abecasis + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP_INCLUDED) +#if !defined(BOOST_PP_IS_ITERATING) + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template struct invoke_procedure + { + typedef void type; + }; + } + + template + inline void invoke_procedure(Function, Sequence &); + + template + inline void invoke_procedure(Function, Sequence const &); + + //----- ---- --- -- - - - - + + namespace detail + { + namespace ft = function_types; + + template< + typename Function, class Sequence, + int N = result_of::size::value, + bool MFP = ft::is_member_function_pointer::value, + bool RandomAccess = traits::is_random_access::value + > + struct invoke_procedure_impl; + + #define BOOST_PP_FILENAME_1 \ + + #define BOOST_PP_ITERATION_LIMITS \ + (0, BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY) + #include BOOST_PP_ITERATE() + + } + + template + inline void invoke_procedure(Function f, Sequence & s) + { + detail::invoke_procedure_impl< + typename boost::remove_reference::type,Sequence + >::call(f,s); + } + + template + inline void invoke_procedure(Function f, Sequence const & s) + { + detail::invoke_procedure_impl< + typename boost::remove_reference::type,Sequence const + >::call(f,s); + } + +}} + +#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP_INCLUDED +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#define N BOOST_PP_ITERATION() + +#define M(z,j,data) fusion::at_c(s) + + template + struct invoke_procedure_impl + { + +#if N > 0 + + static inline void call(Function & f, Sequence & s) + { + f(BOOST_PP_ENUM(N,M,~)); + } + +#else + + static inline void call(Function & f, Sequence & /*s*/) + { + f(); + } + +#endif + + }; + +#if N > 0 + template + struct invoke_procedure_impl + { + static inline void call(Function & f, Sequence & s) + { + (that_ptr >::type + >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~)); + } + }; +#endif + +#undef M + +#define M(z,j,data) \ + typedef typename result_of::next< BOOST_PP_CAT(I,BOOST_PP_DEC(j)) \ + >::type I ## j ; \ + I##j i##j = fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j))); + + template + struct invoke_procedure_impl + { + +#if N > 0 + + static inline void call(Function & f, Sequence & s) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(s); + BOOST_PP_REPEAT_FROM_TO(1,N,M,~) + f( BOOST_PP_ENUM_PARAMS(N,*i) ); + } + +#else + static inline void call(Function & f, Sequence & /*s*/) + { + f(); + } + +#endif + + }; + +#if N > 0 + template + struct invoke_procedure_impl + { + static inline void call(Function & f, Sequence & s) + { + typedef typename result_of::begin::type I0; + I0 i0 = fusion::begin(s); + BOOST_PP_REPEAT_FROM_TO(1,N,M,~) + + (that_ptr >::type + >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i)); + } + }; +#endif + +#undef M + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/limits.hpp new file mode 100644 index 0000000000..9cb5a04a44 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/functional/invocation/limits.hpp @@ -0,0 +1,23 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP_INCLUDED) +# define BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP_INCLUDED + +# if !defined(BOOST_FUSION_INVOKE_MAX_ARITY) +# define BOOST_FUSION_INVOKE_MAX_ARITY 6 +# endif +# if !defined(BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY) +# define BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY 6 +# endif +# if !defined(BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY) +# define BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY 6 +# endif + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/accumulate.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/accumulate.hpp new file mode 100644 index 0000000000..b9ca6526ef --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/accumulate.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ACCUMULATE) +#define FUSION_INCLUDE_ACCUMULATE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt.hpp new file mode 100644 index 0000000000..87ef15e848 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_ADT_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_ADT_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt_named.cpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt_named.cpp new file mode 100644 index 0000000000..8ac033a019 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt_named.cpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ADAPT_ADT_NAMED) +#define FUSION_INCLUDE_ADAPT_ADT_NAMED + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt_named.hpp new file mode 100644 index 0000000000..308249e818 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_adt_named.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_ADT_NAMED_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_ADT_NAMED_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_adt.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_adt.hpp new file mode 100644 index 0000000000..55bd551465 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_adt.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_ADT_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_ADR_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_adt_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_adt_named.hpp new file mode 100644 index 0000000000..aa356e756d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_adt_named.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_ADT_NAMED_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_ADT_NAMED_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_class.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_class.hpp new file mode 100644 index 0000000000..ccbfeb18e6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_class.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_CLASS_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_CLASS_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_class_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_class_named.hpp new file mode 100644 index 0000000000..10782681d5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_class_named.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_CLASS_NAMED_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_CLASS_NAMED_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_struct.hpp new file mode 100644 index 0000000000..681aa2e421 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_struct.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_STRUCT_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_STRUCT_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_struct_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_struct_named.hpp new file mode 100644 index 0000000000..19204f50b5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_assoc_struct_named.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_STRUCT_NAMED_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_STRUCT_NAMED_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_struct.hpp new file mode 100644 index 0000000000..c1271543f8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_struct.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_STRUCT_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_STRUCT_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_struct_named.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_struct_named.hpp new file mode 100644 index 0000000000..01cbf3294d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapt_struct_named.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ADAPT_STRUCT_NAMED_HPP +#define BOOST_FUSION_INCLUDE_ADAPT_STRUCT_NAMED_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapted.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapted.hpp new file mode 100644 index 0000000000..1827267da5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapted.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ADAPTED) +#define FUSION_INCLUDE_ADAPTED + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapter.hpp new file mode 100644 index 0000000000..2441d7caa6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/adapter.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ADAPTER) +#define FUSION_INCLUDE_ADAPTER + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/advance.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/advance.hpp new file mode 100644 index 0000000000..cb9ed7a9b8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/advance.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ADVANCE) +#define FUSION_INCLUDE_ADVANCE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/algorithm.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/algorithm.hpp new file mode 100644 index 0000000000..1a362fd8f6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/algorithm.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ALGORITHM) +#define FUSION_INCLUDE_ALGORITHM + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/all.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/all.hpp new file mode 100644 index 0000000000..5802626890 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/all.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ALL) +#define FUSION_INCLUDE_ALL + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/any.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/any.hpp new file mode 100644 index 0000000000..e5c7306020 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/any.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ANY) +#define FUSION_INCLUDE_ANY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/array.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/array.hpp new file mode 100644 index 0000000000..b54cd70d88 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/array.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ARRAY) +#define FUSION_INCLUDE_ARRAY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_deque.hpp new file mode 100644 index 0000000000..8f1686f268 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_deque.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_AS_DEQUE) +#define FUSION_INCLUDE_AS_DEQUE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_list.hpp new file mode 100644 index 0000000000..6c477d2402 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_list.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_AS_LIST) +#define FUSION_INCLUDE_AS_LIST + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_map.hpp new file mode 100644 index 0000000000..bdfd3f53c0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_map.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_AS_MAP) +#define FUSION_INCLUDE_AS_MAP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_set.hpp new file mode 100644 index 0000000000..c0d5a8b3d4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_set.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_AS_SET) +#define FUSION_INCLUDE_AS_SET + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_vector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_vector.hpp new file mode 100644 index 0000000000..4c9b39d041 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/as_vector.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_AS_VECTOR) +#define FUSION_INCLUDE_AS_VECTOR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at.hpp new file mode 100644 index 0000000000..eacd7bbb80 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_AT) +#define FUSION_INCLUDE_AT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at_c.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at_c.hpp new file mode 100644 index 0000000000..a2403d16c3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at_c.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_AT_C) +#define FUSION_INCLUDE_AT_C + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at_key.hpp new file mode 100644 index 0000000000..89a0aae26a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/at_key.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_AT_KEY) +#define FUSION_INCLUDE_AT_KEY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/back.hpp new file mode 100644 index 0000000000..d5e77f0a67 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/back.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_BACK) +#define FUSION_INCLUDE_BACK + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/begin.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/begin.hpp new file mode 100644 index 0000000000..53361fb210 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/begin.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_BEGIN) +#define FUSION_INCLUDE_BEGIN + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/boost_array.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/boost_array.hpp new file mode 100644 index 0000000000..d2c2bed836 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/boost_array.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_BOOST_ARRAY) +#define FUSION_INCLUDE_BOOST_ARRAY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/boost_tuple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/boost_tuple.hpp new file mode 100644 index 0000000000..1ccc94dab4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/boost_tuple.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_BOOST_TUPLE) +#define FUSION_INCLUDE_BOOST_TUPLE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/category_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/category_of.hpp new file mode 100644 index 0000000000..c390686cd6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/category_of.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_CATEGORY_OF) +#define FUSION_INCLUDE_CATEGORY_OF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/clear.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/clear.hpp new file mode 100644 index 0000000000..7fd863323d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/clear.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_CLEAR) +#define FUSION_INCLUDE_CLEAR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/comparison.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/comparison.hpp new file mode 100644 index 0000000000..e7790f2831 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/comparison.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_COMPARISON) +#define FUSION_INCLUDE_COMPARISON + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/cons.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/cons.hpp new file mode 100644 index 0000000000..853eb6d2c4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/cons.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_CONS) +#define FUSION_INCLUDE_CONS + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/cons_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/cons_tie.hpp new file mode 100644 index 0000000000..740e1739f0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/cons_tie.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_CONS_TIE) +#define FUSION_INCLUDE_CONS_TIE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/container.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/container.hpp new file mode 100644 index 0000000000..657b4c3022 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/container.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_CONTAINER) +#define FUSION_INCLUDE_CONTAINER + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/convert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/convert.hpp new file mode 100644 index 0000000000..1d64ea1b00 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/convert.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_CONVERT) +#define FUSION_INCLUDE_CONVERT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/count.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/count.hpp new file mode 100644 index 0000000000..750a030327 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/count.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_COUNT) +#define FUSION_INCLUDE_COUNT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/count_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/count_if.hpp new file mode 100644 index 0000000000..ff804ae94e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/count_if.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_COUNT_IF) +#define FUSION_INCLUDE_COUNT_IF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deduce.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deduce.hpp new file mode 100644 index 0000000000..43ec5c0f3d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deduce.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_DEDUCE) +#define FUSION_INCLUDE_DEDUCE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deduce_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deduce_sequence.hpp new file mode 100644 index 0000000000..a8d36c08c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deduce_sequence.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_DEDUCE_SEQUENCE) +#define FUSION_INCLUDE_DEDUCE_SEQUENCE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/define_assoc_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/define_assoc_struct.hpp new file mode 100644 index 0000000000..8b8ee261d2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/define_assoc_struct.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_DEFINE_ASSOC_STRUCT_HPP +#define BOOST_FUSION_INCLUDE_DEFINE_ASSOC_STRUCT_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/define_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/define_struct.hpp new file mode 100644 index 0000000000..564f1c7834 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/define_struct.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_DEFINE_STRUCT_HPP +#define BOOST_FUSION_INCLUDE_DEFINE_STRUCT_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque.hpp new file mode 100644 index 0000000000..17386a1dc1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_DEQUE) +#define FUSION_INCLUDE_DEQUE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque_fwd.hpp new file mode 100644 index 0000000000..915c3cbb4e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque_fwd.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_DEQUE) +#define FUSION_INCLUDE_DEQUE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque_tie.hpp new file mode 100644 index 0000000000..8adbc4c0bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deque_tie.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_GENERATION) +#define FUSION_INCLUDE_GENERATION + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deref.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deref.hpp new file mode 100644 index 0000000000..9c831f79da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deref.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_DEREF) +#define FUSION_INCLUDE_DEREF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deref_data.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deref_data.hpp new file mode 100644 index 0000000000..24d4e7cfd1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/deref_data.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_DEREF_DATA_HPP +#define BOOST_FUSION_INCLUDE_DEREF_DATA_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/distance.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/distance.hpp new file mode 100644 index 0000000000..fac103a6f2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/distance.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_DISTANCE) +#define FUSION_INCLUDE_DISTANCE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/empty.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/empty.hpp new file mode 100644 index 0000000000..0a8af33c44 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/empty.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_EMPTY) +#define FUSION_INCLUDE_EMPTY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/end.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/end.hpp new file mode 100644 index 0000000000..61d65de01d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/end.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_END) +#define FUSION_INCLUDE_END + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/equal_to.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/equal_to.hpp new file mode 100644 index 0000000000..5607b8e231 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/equal_to.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_EQUAL_TO) +#define FUSION_INCLUDE_EQUAL_TO + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/erase.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/erase.hpp new file mode 100644 index 0000000000..b7e6fafb35 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/erase.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ERASE) +#define FUSION_INCLUDE_ERASE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/erase_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/erase_key.hpp new file mode 100644 index 0000000000..e13c889f2c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/erase_key.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ERASE_KEY) +#define FUSION_INCLUDE_ERASE_KEY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter.hpp new file mode 100644 index 0000000000..234e40642b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FILTER) +#define FUSION_INCLUDE_FILTER + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter_if.hpp new file mode 100644 index 0000000000..31fdec5d32 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter_if.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FILTER_IF) +#define FUSION_INCLUDE_FILTER_IF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter_view.hpp new file mode 100644 index 0000000000..196df8a012 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/filter_view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FILTER_VIEW) +#define FUSION_INCLUDE_FILTER_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/find.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/find.hpp new file mode 100644 index 0000000000..cf50c412fd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/find.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FIND) +#define FUSION_INCLUDE_FIND + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/find_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/find_if.hpp new file mode 100644 index 0000000000..aa1a4c7a45 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/find_if.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FIND_IF) +#define FUSION_INCLUDE_FIND_IF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fold.hpp new file mode 100644 index 0000000000..40bf3a793e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fold.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FOLD) +#define FUSION_INCLUDE_FOLD + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/for_each.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/for_each.hpp new file mode 100644 index 0000000000..b20578e5e8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/for_each.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FOR_EACH) +#define FUSION_INCLUDE_FOR_EACH + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/front.hpp new file mode 100644 index 0000000000..495deaf74d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/front.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FRONT) +#define FUSION_INCLUDE_FRONT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/functional.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/functional.hpp new file mode 100644 index 0000000000..ab38fe1f43 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/functional.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FUNCTIONAL) +#define FUSION_INCLUDE_FUNCTIONAL + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused.hpp new file mode 100644 index 0000000000..fa9dd46443 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FUSED) +#define FUSION_INCLUDE_FUSED + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused_function_object.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused_function_object.hpp new file mode 100644 index 0000000000..d35140c655 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused_function_object.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FUSED_FUNCTION_OBJECT) +#define FUSION_INCLUDE_FUSED_FUNCTION_OBJECT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused_procedure.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused_procedure.hpp new file mode 100644 index 0000000000..9df4717b7d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/fused_procedure.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_FUSED_PROCEDURE) +#define FUSION_INCLUDE_FUSED_PROCEDURE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/generation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/generation.hpp new file mode 100644 index 0000000000..8adbc4c0bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/generation.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_GENERATION) +#define FUSION_INCLUDE_GENERATION + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/greater.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/greater.hpp new file mode 100644 index 0000000000..a5ff306fd4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/greater.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_NOT_GREATER) +#define FUSION_INCLUDE_NOT_GREATER + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/greater_equal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/greater_equal.hpp new file mode 100644 index 0000000000..3a09255147 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/greater_equal.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_GREATER_EQUAL) +#define FUSION_INCLUDE_GREATER_EQUAL + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/has_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/has_key.hpp new file mode 100644 index 0000000000..b696241d03 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/has_key.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_HAS_KEY) +#define FUSION_INCLUDE_HAS_KEY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/ignore.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/ignore.hpp new file mode 100644 index 0000000000..8adbc4c0bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/ignore.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_GENERATION) +#define FUSION_INCLUDE_GENERATION + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/in.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/in.hpp new file mode 100644 index 0000000000..ca285c0e58 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/in.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_IN) +#define FUSION_INCLUDE_IN + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/insert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/insert.hpp new file mode 100644 index 0000000000..53c0b05ea6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/insert.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_INSERT) +#define FUSION_INCLUDE_INSERT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/insert_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/insert_range.hpp new file mode 100644 index 0000000000..f7093ed994 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/insert_range.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_INSERT_RANGE) +#define FUSION_INCLUDE_INSERT_RANGE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/intrinsic.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/intrinsic.hpp new file mode 100644 index 0000000000..c9d787117b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/intrinsic.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_INTRINSIC) +#define FUSION_INCLUDE_INTRINSIC + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invocation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invocation.hpp new file mode 100644 index 0000000000..2a6f12a37f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invocation.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_INVOCATION) +#define FUSION_INCLUDE_INVOCATION + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke.hpp new file mode 100644 index 0000000000..452264259b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_INVOKE) +#define FUSION_INCLUDE_INVOKE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke_function_object.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke_function_object.hpp new file mode 100644 index 0000000000..4ffeb24dd8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke_function_object.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_INVOKE_FUNCTION_OBJECT) +#define FUSION_INCLUDE_INVOKE_FUNCTION_OBJECT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke_procedure.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke_procedure.hpp new file mode 100644 index 0000000000..afd46259b9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/invoke_procedure.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_INVOKE_PROCEDURE) +#define FUSION_INCLUDE_INVOKE_PROCEDURE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/io.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/io.hpp new file mode 100644 index 0000000000..d84fdf3511 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/io.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_IO) +#define FUSION_INCLUDE_IO + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_iterator.hpp new file mode 100644 index 0000000000..31348eb788 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_iterator.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_IS_ITERATOR) +#define FUSION_INCLUDE_IS_ITERATOR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_sequence.hpp new file mode 100644 index 0000000000..a7f2b4d88d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_sequence.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_IS_SEQUENCE) +#define FUSION_INCLUDE_IS_SEQUENCE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_view.hpp new file mode 100644 index 0000000000..5ebc34732d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/is_view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_IS_VIEW) +#define FUSION_INCLUDE_IS_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iter_fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iter_fold.hpp new file mode 100644 index 0000000000..ba6f9b7e70 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iter_fold.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_ITER_FOLD_HPP +#define BOOST_FUSION_INCLUDE_ITER_FOLD_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iteration.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iteration.hpp new file mode 100644 index 0000000000..372aa726a2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iteration.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ITERATION) +#define FUSION_INCLUDE_ITERATION + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator.hpp new file mode 100644 index 0000000000..2ed8e8381f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ITERATOR) +#define FUSION_INCLUDE_ITERATOR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_base.hpp new file mode 100644 index 0000000000..bbd353217e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_base.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ITERATOR_BASE) +#define FUSION_INCLUDE_ITERATOR_BASE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_facade.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_facade.hpp new file mode 100644 index 0000000000..a36f8b162f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_facade.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ITERATOR_FACADE) +#define FUSION_INCLUDE_ITERATOR_FACADE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_range.hpp new file mode 100644 index 0000000000..54eba6dd2a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/iterator_range.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ITERATOR_RANGE) +#define FUSION_INCLUDE_ITERATOR_RANGE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/join.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/join.hpp new file mode 100644 index 0000000000..5f701ad305 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/join.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_JOIN) +#define FUSION_INCLUDE_JOIN + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/joint_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/joint_view.hpp new file mode 100644 index 0000000000..e3d1e20485 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/joint_view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_JOINT_VIEW) +#define FUSION_INCLUDE_JOINT_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/key_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/key_of.hpp new file mode 100644 index 0000000000..cb29f571ad --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/key_of.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_KEY_OF_HPP +#define BOOST_FUSION_INCLUDE_KEY_OF_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/less.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/less.hpp new file mode 100644 index 0000000000..bd4d27714e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/less.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_LESS) +#define FUSION_INCLUDE_LESS + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/less_equal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/less_equal.hpp new file mode 100644 index 0000000000..2ac1b72ba7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/less_equal.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_LESS_EQUAL) +#define FUSION_INCLUDE_LESS_EQUAL + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list.hpp new file mode 100644 index 0000000000..0a3a1a63f6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_LIST) +#define FUSION_INCLUDE_LIST + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list_fwd.hpp new file mode 100644 index 0000000000..08823bf673 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list_fwd.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_LIST_FWD) +#define FUSION_INCLUDE_LIST_FWD + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list_tie.hpp new file mode 100644 index 0000000000..8adbc4c0bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/list_tie.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_GENERATION) +#define FUSION_INCLUDE_GENERATION + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_cons.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_cons.hpp new file mode 100644 index 0000000000..76c4caa530 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_cons.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_CONS) +#define FUSION_INCLUDE_MAKE_CONS + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_deque.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_deque.hpp new file mode 100644 index 0000000000..35520e8d2b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_deque.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_DEQUE) +#define FUSION_INCLUDE_MAKE_DEQUE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused.hpp new file mode 100644 index 0000000000..6ed860ef54 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_FUSED) +#define FUSION_INCLUDE_MAKE_FUSED + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused_function_object.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused_function_object.hpp new file mode 100644 index 0000000000..dfc1295b10 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused_function_object.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_FUSED_FUNCTION_OBJECT) +#define FUSION_INCLUDE_MAKE_FUSED_FUNCTION_OBJECT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused_procedure.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused_procedure.hpp new file mode 100644 index 0000000000..94e44717aa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_fused_procedure.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_FUSED_PROCEDURE) +#define FUSION_INCLUDE_MAKE_FUSED_PROCEDURE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_list.hpp new file mode 100644 index 0000000000..7adb350718 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_list.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_LIST) +#define FUSION_INCLUDE_MAKE_LIST + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_map.hpp new file mode 100644 index 0000000000..90d599216a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_map.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_MAP) +#define FUSION_INCLUDE_MAKE_MAP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_set.hpp new file mode 100644 index 0000000000..19f344f670 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_set.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_SET) +#define FUSION_INCLUDE_MAKE_SET + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_tuple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_tuple.hpp new file mode 100644 index 0000000000..8cfbdc8e5f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_tuple.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_TUPLE) +#define FUSION_INCLUDE_MAKE_TUPLE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_generic.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_generic.hpp new file mode 100644 index 0000000000..dcebceb1dd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_generic.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_UNFUSED_GENERIC) +#define FUSION_INCLUDE_MAKE_UNFUSED_GENERIC + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_lvalue_args.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_lvalue_args.hpp new file mode 100644 index 0000000000..1805bb18e4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_lvalue_args.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_UNFUSED_LVALUE_ARGS) +#define FUSION_INCLUDE_MAKE_UNFUSED_LVALUE_ARGS + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_rvalue_args.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_rvalue_args.hpp new file mode 100644 index 0000000000..0d546be734 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_unfused_rvalue_args.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_UNFUSED_RVALUE_ARGS) +#define FUSION_INCLUDE_MAKE_UNFUSED_RVALUE_ARGS + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_vector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_vector.hpp new file mode 100644 index 0000000000..b165ba3ed5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/make_vector.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAKE_VECTOR) +#define FUSION_INCLUDE_MAKE_VECTOR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map.hpp new file mode 100644 index 0000000000..07441b4a08 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAP) +#define FUSION_INCLUDE_MAP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map_fwd.hpp new file mode 100644 index 0000000000..970c413270 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map_fwd.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAP_FWD) +#define FUSION_INCLUDE_MAP_FWD + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map_tie.hpp new file mode 100644 index 0000000000..89aeb71617 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/map_tie.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MAP_TIE) +#define FUSION_INCLUDE_MAP_TIE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/mpl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/mpl.hpp new file mode 100644 index 0000000000..8a1cbfd025 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/mpl.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_MPL) +#define FUSION_INCLUDE_MPL + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/next.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/next.hpp new file mode 100644 index 0000000000..6188c65a72 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/next.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_NEXT) +#define FUSION_INCLUDE_NEXT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/none.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/none.hpp new file mode 100644 index 0000000000..19720ef8cc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/none.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_NONE) +#define FUSION_INCLUDE_NONE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/not_equal_to.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/not_equal_to.hpp new file mode 100644 index 0000000000..9e23b899da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/not_equal_to.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_NOT_EQUAL_TO) +#define FUSION_INCLUDE_NOT_EQUAL_TO + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/nview.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/nview.hpp new file mode 100644 index 0000000000..215329d02b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/nview.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_NVIEW) +#define FUSION_INCLUDE_NVIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/out.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/out.hpp new file mode 100644 index 0000000000..9ecef3e713 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/out.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_OUT) +#define FUSION_INCLUDE_OUT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pair.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pair.hpp new file mode 100644 index 0000000000..97ebfcd8bd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pair.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_PAIR) +#define FUSION_INCLUDE_PAIR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pair_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pair_tie.hpp new file mode 100644 index 0000000000..ac192cada1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pair_tie.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_PAIR_TIE) +#define FUSION_INCLUDE_PAIR_TIE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pop_back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pop_back.hpp new file mode 100644 index 0000000000..b5a808cd5e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pop_back.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_POP_BACK) +#define FUSION_INCLUDE_POP_BACK + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pop_front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pop_front.hpp new file mode 100644 index 0000000000..7df977e0d6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/pop_front.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_POP_FRONT) +#define FUSION_INCLUDE_POP_FRONT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/prior.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/prior.hpp new file mode 100644 index 0000000000..b18a55a394 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/prior.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_PRIOR) +#define FUSION_INCLUDE_PRIOR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/proxy_type.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/proxy_type.hpp new file mode 100644 index 0000000000..31e8dce010 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/proxy_type.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_PROXY_TYPE_HPP +#define BOOST_FUSION_INCLUDE_PROXY_TYPE_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/push_back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/push_back.hpp new file mode 100644 index 0000000000..4908e87c63 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/push_back.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_PUSH_BACK) +#define FUSION_INCLUDE_PUSH_BACK + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/push_front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/push_front.hpp new file mode 100644 index 0000000000..5a9cfa5ec2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/push_front.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_PUSH_FRONT) +#define FUSION_INCLUDE_PUSH_FRONT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/query.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/query.hpp new file mode 100644 index 0000000000..6e5144b57d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/query.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_QUERY) +#define FUSION_INCLUDE_QUERY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/remove.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/remove.hpp new file mode 100644 index 0000000000..9f11d69617 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/remove.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_REMOVE) +#define FUSION_INCLUDE_REMOVE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/remove_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/remove_if.hpp new file mode 100644 index 0000000000..7f0b4657da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/remove_if.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_REMOVE_IF) +#define FUSION_INCLUDE_REMOVE_IF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/repetetive_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/repetetive_view.hpp new file mode 100644 index 0000000000..f56bca8821 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/repetetive_view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_REPETETIVE_VIEW) +#define FUSION_INCLUDE_REPETETIVE_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/replace.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/replace.hpp new file mode 100644 index 0000000000..4d0b3af829 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/replace.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_REPLACE) +#define FUSION_INCLUDE_REPLACE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/replace_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/replace_if.hpp new file mode 100644 index 0000000000..354e13abd0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/replace_if.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_REPLACE_IF) +#define FUSION_INCLUDE_REPLACE_IF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse.hpp new file mode 100644 index 0000000000..3f9fd7824d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_REVERSE) +#define FUSION_INCLUDE_REVERSE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_fold.hpp new file mode 100644 index 0000000000..f2379e6779 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_fold.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_REVERSE_FOLD_HPP +#define BOOST_FUSION_INCLUDE_REVERSE_FOLD_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_iter_fold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_iter_fold.hpp new file mode 100644 index 0000000000..ba92d5fea1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_iter_fold.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_REVERSE_ITER_FOLD_HPP +#define BOOST_FUSION_INCLUDE_REVERSE_ITER_FOLD_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_view.hpp new file mode 100644 index 0000000000..844532d62d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/reverse_view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_REVERSE_VIEW) +#define FUSION_INCLUDE_REVERSE_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence.hpp new file mode 100644 index 0000000000..09cded778e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SEQUENCE) +#define FUSION_INCLUDE_SEQUENCE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence_base.hpp new file mode 100644 index 0000000000..7e50a23704 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence_base.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SEQUENCE_BASE) +#define FUSION_INCLUDE_SEQUENCE_BASE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence_facade.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence_facade.hpp new file mode 100644 index 0000000000..b8773e28af --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/sequence_facade.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SEQUENCE_FACADE) +#define FUSION_INCLUDE_SEQUENCE_FACADE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/set.hpp new file mode 100644 index 0000000000..90dd5004be --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/set.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SET) +#define FUSION_INCLUDE_SET + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/set_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/set_fwd.hpp new file mode 100644 index 0000000000..9bc45ad5cf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/set_fwd.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SET_FWD) +#define FUSION_INCLUDE_SET_FWD + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/single_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/single_view.hpp new file mode 100644 index 0000000000..a95d04a80d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/single_view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SINGLE_VIEW) +#define FUSION_INCLUDE_SINGLE_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/size.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/size.hpp new file mode 100644 index 0000000000..02d2a00fcb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/size.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SIZE) +#define FUSION_INCLUDE_SIZE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/std_pair.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/std_pair.hpp new file mode 100644 index 0000000000..98f37c8672 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/std_pair.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_STD_PAIR) +#define FUSION_INCLUDE_STD_PAIR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/struct.hpp new file mode 100644 index 0000000000..f0886aab86 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/struct.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_STRUCT) +#define FUSION_INCLUDE_STRUCT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/support.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/support.hpp new file mode 100644 index 0000000000..d57eafeb87 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/support.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SUPPORT) +#define FUSION_INCLUDE_SUPPORT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/swap.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/swap.hpp new file mode 100644 index 0000000000..1f428aa175 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/swap.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_SWAP) +#define FUSION_INCLUDE_SWAP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tag_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tag_of.hpp new file mode 100644 index 0000000000..f15b41b54a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tag_of.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_TAG_OF) +#define FUSION_INCLUDE_TAG_OF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tag_of_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tag_of_fwd.hpp new file mode 100644 index 0000000000..fbc7ebe752 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tag_of_fwd.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_TAG_OF_FWD) +#define FUSION_INCLUDE_TAG_OF_FWD + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transform.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transform.hpp new file mode 100644 index 0000000000..2b66c4f736 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transform.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_TRANSFORM) +#define FUSION_INCLUDE_TRANSFORM + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transform_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transform_view.hpp new file mode 100644 index 0000000000..3aceaaee9f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transform_view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_TRANSFORM_VIEW) +#define FUSION_INCLUDE_TRANSFORM_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transformation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transformation.hpp new file mode 100644 index 0000000000..f14ab70c75 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/transformation.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_TRANSFORMATION) +#define FUSION_INCLUDE_TRANSFORMATION + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple.hpp new file mode 100644 index 0000000000..52e53fb594 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_TUPLE) +#define FUSION_INCLUDE_TUPLE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple_fwd.hpp new file mode 100644 index 0000000000..a66653a3b0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple_fwd.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_TUPLE_FWD) +#define FUSION_INCLUDE_TUPLE_FWD + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple_tie.hpp new file mode 100644 index 0000000000..677976a65f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/tuple_tie.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_TUPLE_TIE) +#define FUSION_INCLUDE_TUPLE_TIE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_generic.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_generic.hpp new file mode 100644 index 0000000000..d377900f9d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_generic.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_UNFUSED_GENERIC) +#define FUSION_INCLUDE_UNFUSED_GENERIC + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_lvalue_args.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_lvalue_args.hpp new file mode 100644 index 0000000000..17acc261c3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_lvalue_args.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_UNFUSED_LVALUE_ARGS) +#define FUSION_INCLUDE_UNFUSED_LVALUE_ARGS + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_rvalue_args.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_rvalue_args.hpp new file mode 100644 index 0000000000..556b2dee28 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_rvalue_args.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_UNFUSED_RVALUE_ARGS) +#define FUSION_INCLUDE_UNFUSED_RVALUE_ARGS + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_typed.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_typed.hpp new file mode 100644 index 0000000000..a118b306c2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unfused_typed.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_UNFUSED_TYPED) +#define FUSION_INCLUDE_UNFUSED_TYPED + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unused.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unused.hpp new file mode 100644 index 0000000000..f91ea8fe69 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/unused.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_UNUSED) +#define FUSION_INCLUDE_UNUSED + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_at.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_at.hpp new file mode 100644 index 0000000000..da5745d9b8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_at.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VALUE_AT) +#define FUSION_INCLUDE_VALUE_AT + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_at_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_at_key.hpp new file mode 100644 index 0000000000..4ab3dc1422 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_at_key.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VALUE_AT_KEY) +#define FUSION_INCLUDE_VALUE_AT_KEY + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_of.hpp new file mode 100644 index 0000000000..4f2bef9599 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_of.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VALUE_OF) +#define FUSION_INCLUDE_VALUE_OF + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_of_data.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_of_data.hpp new file mode 100644 index 0000000000..6884185fd0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/value_of_data.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_VALUE_OF_DATA_HPP +#define BOOST_FUSION_INCLUDE_VALUE_OF_DATA_HPP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector.hpp new file mode 100644 index 0000000000..689c2f8827 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VECTOR) +#define FUSION_INCLUDE_VECTOR + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector10.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector10.hpp new file mode 100644 index 0000000000..d3e10ddc60 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector10.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VECTOR10) +#define FUSION_INCLUDE_VECTOR10 + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector20.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector20.hpp new file mode 100644 index 0000000000..accda290d7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector20.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VECTOR20) +#define FUSION_INCLUDE_VECTOR20 + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector30.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector30.hpp new file mode 100644 index 0000000000..72a72a25b6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector30.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VECTOR30) +#define FUSION_INCLUDE_VECTOR30 + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector40.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector40.hpp new file mode 100644 index 0000000000..427c531918 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector40.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VECTOR40) +#define FUSION_INCLUDE_VECTOR40 + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector50.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector50.hpp new file mode 100644 index 0000000000..5980373b94 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector50.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VECTOR50) +#define FUSION_INCLUDE_VECTOR50 + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector_fwd.hpp new file mode 100644 index 0000000000..578754fbc9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector_fwd.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VECTOR_FWD) +#define FUSION_INCLUDE_VECTOR_FWD + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector_tie.hpp new file mode 100644 index 0000000000..3a0431c1ed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/vector_tie.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VECTOR_TIE) +#define FUSION_INCLUDE_VECTOR_TIE + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/view.hpp new file mode 100644 index 0000000000..48405df849 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VIEW) +#define FUSION_INCLUDE_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/void.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/void.hpp new file mode 100644 index 0000000000..b3e9cf2785 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/void.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_VOID) +#define FUSION_INCLUDE_VOID + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/zip.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/zip.hpp new file mode 100644 index 0000000000..8a5656102e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/zip.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ZIP) +#define FUSION_INCLUDE_ZIP + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/zip_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/zip_view.hpp new file mode 100644 index 0000000000..1aecfd4dc1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/include/zip_view.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_ZIP_VIEW) +#define FUSION_INCLUDE_ZIP_VIEW + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator.hpp new file mode 100644 index 0000000000..c7f8e1ebc4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ITERATOR_10022005_0559) +#define FUSION_ITERATOR_10022005_0559 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/advance.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/advance.hpp new file mode 100644 index 0000000000..56ed60be7c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/advance.hpp @@ -0,0 +1,92 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ADVANCE_09172005_1146) +#define FUSION_ADVANCE_09172005_1146 + +#include +#include + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct random_access_traversal_tag; + + // Special tags: + struct iterator_facade_tag; // iterator facade tag + struct boost_array_iterator_tag; // boost::array iterator tag + struct mpl_iterator_tag; // mpl sequence iterator tag + struct std_pair_iterator_tag; // std::pair iterator tag + + namespace extension + { + template + struct advance_impl + { + // default implementation + template + struct apply : + mpl::if_c< + (N::value > 0) + , advance_detail::forward + , advance_detail::backward + >::type + { + BOOST_MPL_ASSERT_NOT((traits::is_random_access)); + }; + }; + + template <> + struct advance_impl + { + template + struct apply : Iterator::template advance {}; + }; + + template <> + struct advance_impl; + + template <> + struct advance_impl; + + template <> + struct advance_impl; + } + + namespace result_of + { + template + struct advance_c + : extension::advance_impl::type>::template apply > + {}; + + template + struct advance + : extension::advance_impl::type>::template apply + {}; + } + + template + inline typename result_of::advance_c::type const + advance_c(Iterator const& i) + { + return result_of::advance_c::call(i); + } + + template + inline typename result_of::advance::type const + advance(Iterator const& i) + { + return result_of::advance::call(i); + } + +}} // namespace boost::fusion + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/basic_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/basic_iterator.hpp new file mode 100644 index 0000000000..4327a8cef5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/basic_iterator.hpp @@ -0,0 +1,141 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ITERATOR_BASIC_ITERATOR_HPP +#define BOOST_FUSION_ITERATOR_BASIC_ITERATOR_HPP + +#include + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace extension + { + template + struct value_of_impl; + + template + struct deref_impl; + + template + struct value_of_data_impl; + + template + struct key_of_impl; + + template + struct deref_data_impl; + } + + template + struct basic_iterator + : iterator_facade, Category> + { + typedef mpl::int_ index; + typedef Seq seq_type; + + template + struct value_of + : extension::value_of_impl::template apply + {}; + + template + struct deref + : extension::deref_impl::template apply + {}; + + template + struct value_of_data + : extension::value_of_data_impl::template apply + {}; + + template + struct key_of + : extension::key_of_impl::template apply + {}; + + template + struct deref_data + : extension::deref_data_impl::template apply + {}; + + template + struct advance + { + typedef + basic_iterator + type; + + static type + call(It const& it) + { + return type(*it.seq,0); + } + }; + + template + struct next + : advance > + {}; + + template + struct prior + : advance > + {}; + + template + struct distance + { + typedef mpl::minus type; + + static + type + call(It1 const&, It2 const&) + { + return type(); + } + }; + + template + struct equal_to + : mpl::and_< + is_same< + typename remove_const::type + , typename remove_const::type + > + , mpl::equal_to + > + {}; + + template + basic_iterator(basic_iterator const& it) + : seq(it.seq) + {} + + basic_iterator(Seq& in_seq, int) + : seq(&in_seq) + {} + + template + basic_iterator& + operator=(basic_iterator const& it) + { + seq=it.seq; + return *this; + } + + Seq* seq; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/deref.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/deref.hpp new file mode 100644 index 0000000000..2d5f04ee0c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/deref.hpp @@ -0,0 +1,72 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_05042005_1019) +#define FUSION_DEREF_05042005_1019 + +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct iterator_facade_tag; // iterator facade tag + struct boost_array_iterator_tag; // boost::array iterator tag + struct mpl_iterator_tag; // mpl sequence iterator tag + struct std_pair_iterator_tag; // std::pair iterator tag + + namespace extension + { + template + struct deref_impl + { + template + struct apply {}; + }; + + template <> + struct deref_impl + { + template + struct apply : Iterator::template deref {}; + }; + + template <> + struct deref_impl; + + template <> + struct deref_impl; + + template <> + struct deref_impl; + } + + namespace result_of + { + template + struct deref + : extension::deref_impl::type>:: + template apply + {}; + } + + template + typename result_of::deref::type + deref(Iterator const& i) + { + typedef result_of::deref deref_meta; + return deref_meta::call(i); + } + + template + typename result_of::deref::type + operator*(iterator_base const& i) + { + return fusion::deref(i.cast()); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/deref_data.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/deref_data.hpp new file mode 100644 index 0000000000..09ba439214 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/deref_data.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ITERATOR_DEREF_DATA_HPP +#define BOOST_FUSION_ITERATOR_DEREF_DATA_HPP + +#include + +namespace boost { namespace fusion +{ + struct iterator_facade_tag; + + namespace extension + { + template + struct deref_data_impl; + + template <> + struct deref_data_impl + { + template + struct apply + : It::template deref_data + {}; + }; + } + + namespace result_of + { + template + struct deref_data + : extension::deref_data_impl::type>:: + template apply + {}; + } + + template + typename result_of::deref_data::type + deref_data(It const& it) + { + return result_of::deref_data::call(it); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/adapt_deref_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/adapt_deref_traits.hpp new file mode 100644 index 0000000000..d683c2891e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/adapt_deref_traits.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ADAPT_DEREF_TRAITS_05062005_0900) +#define FUSION_ADAPT_DEREF_TRAITS_05062005_0900 + +#include + +namespace boost { namespace fusion { namespace detail +{ + struct adapt_deref_traits + { + template + struct apply + { + typedef typename + result_of::deref::type + type; + + static type + call(Iterator const& i) + { + return *i.first; + } + }; + }; +}}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/adapt_value_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/adapt_value_traits.hpp new file mode 100644 index 0000000000..a7d72f5348 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/adapt_value_traits.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ADAPT_VALUE_TRAITS_05062005_0859) +#define FUSION_ADAPT_VALUE_TRAITS_05062005_0859 + +#include + +namespace boost { namespace fusion { namespace detail +{ + struct adapt_value_traits + { + template + struct apply + { + typedef typename + result_of::value_of::type + type; + }; + }; +}}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/advance.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/advance.hpp new file mode 100644 index 0000000000..900608fae1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/advance.hpp @@ -0,0 +1,102 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ADVANCE_09172005_1149) +#define FUSION_ADVANCE_09172005_1149 + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace advance_detail +{ + // Default advance implementation, perform next(i) + // or prior(i) N times. + + template + struct forward; + + template + struct next_forward + { + typedef typename + forward< + typename result_of::next::type + , N-1 + >::type + type; + }; + + template + struct forward + { + typedef typename + mpl::eval_if_c< + (N == 0) + , mpl::identity + , next_forward + >::type + type; + + static type const& + call(type const& i) + { + return i; + } + + template + static type + call(I const& i) + { + return call(fusion::next(i)); + } + }; + + template + struct backward; + + template + struct next_backward + { + typedef typename + backward< + typename result_of::prior::type + , N+1 + >::type + type; + }; + + template + struct backward + { + typedef typename + mpl::eval_if_c< + (N == 0) + , mpl::identity + , next_backward + >::type + type; + + static type const& + call(type const& i) + { + return i; + } + + template + static type + call(I const& i) + { + return call(fusion::prior(i)); + } + }; + +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/distance.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/distance.hpp new file mode 100644 index 0000000000..e4c0a5e7cc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/detail/distance.hpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DISTANCE_09172005_0730) +#define FUSION_DISTANCE_09172005_0730 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace distance_detail +{ + // Default distance implementation, linear + // search for the Last iterator. + + template + struct linear_distance; + + template + struct next_distance + { + typedef typename + mpl::next< + typename linear_distance< + typename result_of::next::type + , Last + >::type + >::type + type; + }; + + template + struct linear_distance + : mpl::eval_if< + result_of::equal_to + , mpl::identity > + , next_distance + >::type + { + typedef typename + mpl::eval_if< + result_of::equal_to + , mpl::identity > + , next_distance + >::type + type; + + static type + call(First const&, Last const&) + { + return type(); + } + }; + +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/distance.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/distance.hpp new file mode 100644 index 0000000000..0cfa414d20 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/distance.hpp @@ -0,0 +1,81 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DISTANCE_09172005_0721) +#define FUSION_DISTANCE_09172005_0721 + +#include +#include + +#include +#include +#include + +#include + +namespace boost { namespace fusion +{ + struct random_access_traversal_tag; + + // Special tags: + struct iterator_facade_tag; // iterator facade tag + struct boost_array_iterator_tag; // boost::array iterator tag + struct mpl_iterator_tag; // mpl sequence iterator tag + struct std_pair_iterator_tag; // std::pair iterator tag + + namespace extension + { + template + struct distance_impl + { + // default implementation + template + struct apply : distance_detail::linear_distance + { + BOOST_MPL_ASSERT_NOT((traits::is_random_access)); + BOOST_MPL_ASSERT_NOT((traits::is_random_access)); + }; + }; + + template <> + struct distance_impl + { + template + struct apply : First::template distance {}; + }; + + template <> + struct distance_impl; + + template <> + struct distance_impl; + + template <> + struct distance_impl; + } + + namespace result_of + { + template + struct distance + : extension::distance_impl::type>:: + template apply + { + typedef typename extension::distance_impl::type>:: + template apply::type distance_application; + BOOST_STATIC_CONSTANT(int, value = distance_application::value); + }; + } + + template + inline typename result_of::distance::type + distance(First const& a, Last const& b) + { + return result_of::distance::call(a,b); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/equal_to.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/equal_to.hpp new file mode 100644 index 0000000000..a038741732 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/equal_to.hpp @@ -0,0 +1,93 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_EQUAL_TO_05052005_1208) +#define FUSION_EQUAL_TO_05052005_1208 + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct iterator_facade_tag; // iterator facade tag + struct boost_array_iterator_tag; // boost::array iterator tag + struct mpl_iterator_tag; // mpl sequence iterator tag + struct std_pair_iterator_tag; // std::pair iterator tag + + namespace extension + { + template + struct equal_to_impl + { + // default implementation + template + struct apply + : is_same::type, typename add_const::type> + {}; + }; + + template <> + struct equal_to_impl + { + template + struct apply : I1::template equal_to {}; + }; + + template <> + struct equal_to_impl; + + template <> + struct equal_to_impl; + + template <> + struct equal_to_impl; + } + + namespace result_of + { + template + struct equal_to + : extension::equal_to_impl::type>:: + template apply + {}; + } + + namespace iterator_operators + { + template + inline typename + enable_if< + mpl::and_, is_fusion_iterator > + , bool + >::type + operator==(Iter1 const&, Iter2 const&) + { + return result_of::equal_to::value; + } + + template + inline typename + enable_if< + mpl::and_, is_fusion_iterator > + , bool + >::type + operator!=(Iter1 const&, Iter2 const&) + { + return !result_of::equal_to::value; + } + } + + using iterator_operators::operator==; + using iterator_operators::operator!=; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/iterator_facade.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/iterator_facade.hpp new file mode 100644 index 0000000000..fa74f8dca5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/iterator_facade.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ITERATOR_FACADE_09252006_1011) +#define FUSION_ITERATOR_FACADE_09252006_1011 + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct iterator_facade_tag; + + template + struct iterator_facade : iterator_base + { + typedef iterator_facade_tag fusion_tag; + typedef Derived derived_type; + typedef Category category; + + // default implementation + template + struct equal_to // default implementation + : is_same< + typename I1::derived_type + , typename I2::derived_type + > + {}; + + // default implementation + template + struct advance : + mpl::if_c< + (N::value > 0) + , advance_detail::forward + , advance_detail::backward + >::type + { + BOOST_MPL_ASSERT_NOT((traits::is_random_access)); + }; + + // default implementation + template + struct distance : + distance_detail::linear_distance + {}; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/key_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/key_of.hpp new file mode 100644 index 0000000000..64c2f86aa7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/key_of.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ITERATOR_KEY_OF_HPP +#define BOOST_FUSION_ITERATOR_KEY_OF_HPP + +#include + +namespace boost { namespace fusion +{ + struct iterator_facade_tag; + + namespace extension + { + template + struct key_of_impl; + + template <> + struct key_of_impl + { + template + struct apply + : It::template key_of + {}; + }; + } + + namespace result_of + { + template + struct key_of + : extension::key_of_impl::type>:: + template apply + {}; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl.hpp new file mode 100644 index 0000000000..2709bd297c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ITERATOR_MPL_10022005_0557) +#define FUSION_ITERATOR_MPL_10022005_0557 + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl/convert_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl/convert_iterator.hpp new file mode 100644 index 0000000000..6cec51047c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl/convert_iterator.hpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_ITERATOR_05062005_1218) +#define FUSION_CONVERT_ITERATOR_05062005_1218 + +#include +#include +#include + +namespace boost { namespace fusion +{ + template + struct mpl_iterator; // forward declaration + + // Test T. If it is a fusion iterator, return a reference to it. + // else, assume it is an mpl iterator. + + template + struct convert_iterator + { + typedef typename + mpl::if_< + is_fusion_iterator + , T + , mpl_iterator + >::type + type; + + static T const& + call(T const& x, mpl::true_) + { + return x; + } + + static mpl_iterator + call(T const& /*x*/, mpl::false_) + { + return mpl_iterator(); + } + + static typename + mpl::if_< + is_fusion_iterator + , T const& + , mpl_iterator + >::type + call(T const& x) + { + return call(x, is_fusion_iterator()); + } + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl/fusion_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl/fusion_iterator.hpp new file mode 100644 index 0000000000..b18ef8f062 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/mpl/fusion_iterator.hpp @@ -0,0 +1,79 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FUSION_ITERATOR_10012005_1551) +#define FUSION_FUSION_ITERATOR_10012005_1551 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + +template +struct to_mpl_category { + typedef typename mpl::eval_if< + is_base_of, + mpl::random_access_iterator_tag, + mpl::eval_if< + is_base_of, + mpl::bidirectional_iterator_tag, + mpl::forward_iterator_tag + > + >::type type; +}; + +}}} + +namespace boost { namespace mpl +{ + template + struct fusion_iterator + { + typedef typename fusion::result_of::value_of::type type; + typedef typename fusion::traits::category_of::type fusion_category; + typedef typename fusion::detail::to_mpl_category::type category; + typedef Iterator iterator; + }; + + template + struct next > + { + typedef fusion_iterator::type> type; + }; + + template + struct prior > + { + typedef fusion_iterator::type> type; + }; + + template + struct advance, N> + { + typedef fusion_iterator::type> type; + }; + + template + struct distance, fusion_iterator > + : fusion::result_of::distance + {}; + +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/next.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/next.hpp new file mode 100644 index 0000000000..d2cf63ddde --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/next.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_05042005_1101) +#define FUSION_NEXT_05042005_1101 + +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct iterator_facade_tag; // iterator facade tag + struct boost_array_iterator_tag; // boost::array iterator tag + struct mpl_iterator_tag; // mpl sequence iterator tag + struct std_pair_iterator_tag; // std::pair iterator tag + + namespace extension + { + template + struct next_impl + { + template + struct apply {}; + }; + + template <> + struct next_impl + { + template + struct apply : Iterator::template next {}; + }; + + template <> + struct next_impl; + + template <> + struct next_impl; + + template <> + struct next_impl; + } + + namespace result_of + { + template + struct next + : extension::next_impl::type>:: + template apply + {}; + } + + template + typename result_of::next::type const + next(Iterator const& i) + { + return result_of::next::call(i); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/prior.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/prior.hpp new file mode 100644 index 0000000000..a8b9fd64be --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/prior.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PRIOR_05042005_1144) +#define FUSION_PRIOR_05042005_1144 + +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct iterator_facade_tag; // iterator facade tag + struct boost_array_iterator_tag; // boost::array iterator tag + struct mpl_iterator_tag; // mpl sequence iterator tag + struct std_pair_iterator_tag; // std::pair iterator tag + + namespace extension + { + template + struct prior_impl + { + template + struct apply {}; + }; + + template <> + struct prior_impl + { + template + struct apply : Iterator::template prior {}; + }; + + template <> + struct prior_impl; + + template <> + struct prior_impl; + + template <> + struct prior_impl; + } + + namespace result_of + { + template + struct prior + : extension::prior_impl::type>:: + template apply + {}; + } + + template + typename result_of::prior::type const + prior(Iterator const& i) + { + return result_of::prior::call(i); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/value_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/value_of.hpp new file mode 100644 index 0000000000..478e4d2b2a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/value_of.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_OF_05052005_1126) +#define FUSION_VALUE_OF_05052005_1126 + +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct iterator_facade_tag; // iterator facade tag + struct boost_array_iterator_tag; // boost::array iterator tag + struct mpl_iterator_tag; // mpl sequence iterator tag + struct std_pair_iterator_tag; // std::pair iterator tag + + namespace extension + { + template + struct value_of_impl + { + template + struct apply {}; + }; + + template <> + struct value_of_impl + { + template + struct apply : Iterator::template value_of {}; + }; + + template <> + struct value_of_impl; + + template <> + struct value_of_impl; + + template <> + struct value_of_impl; + } + + namespace result_of + { + template + struct value_of + : extension::value_of_impl::type>:: + template apply + {}; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/value_of_data.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/value_of_data.hpp new file mode 100644 index 0000000000..4a8316deb7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/iterator/value_of_data.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_ITERATOR_VALUE_OF_DATA_HPP +#define BOOST_FUSION_ITERATOR_VALUE_OF_DATA_HPP + +#include + +namespace boost { namespace fusion +{ + struct iterator_facade_tag; + + namespace extension + { + template + struct value_of_data_impl; + + template <> + struct value_of_data_impl + { + template + struct apply + : It::template value_of_data + {}; + }; + } + + namespace result_of + { + template + struct value_of_data + : extension::value_of_data_impl::type>:: + template apply + {}; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl.hpp new file mode 100644 index 0000000000..e499df93c1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MPL_09172006_2049) +#define FUSION_MPL_09172006_2049 + +// The fusion <--> MPL link headers +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/at.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/at.hpp new file mode 100644 index 0000000000..a164bb3299 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/at.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_AT_10022005_1616) +#define FUSION_AT_10022005_1616 + +#include +#include + +namespace boost { +namespace fusion +{ + struct fusion_sequence_tag; +} + +namespace mpl +{ + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply : fusion::result_of::value_at {}; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/back.hpp new file mode 100644 index 0000000000..1f5197e276 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/back.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BACK_10022005_1620) +#define FUSION_BACK_10022005_1620 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct back_impl; + + template <> + struct back_impl + { + template + struct apply : + fusion::result_of::value_of< + typename fusion::result_of::prior< + typename fusion::result_of::end::type + >::type> {}; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/begin.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/begin.hpp new file mode 100644 index 0000000000..be8b314235 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/begin.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_10022005_1620) +#define FUSION_BEGIN_10022005_1620 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef fusion_iterator::type> type; + }; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/clear.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/clear.hpp new file mode 100644 index 0000000000..14b3489e3d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/clear.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CLEAR_10022005_1817) +#define FUSION_CLEAR_10022005_1817 + +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct clear_impl; + + template <> + struct clear_impl + { + template + struct apply + { + typedef typename + fusion::detail::clear::type>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/detail/clear.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/detail/clear.hpp new file mode 100644 index 0000000000..d8c32d5afa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/detail/clear.hpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CLEAR_10022005_1442) +#define FUSION_CLEAR_10022005_1442 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct cons_tag; + struct map_tag; + struct set_tag; + struct vector_tag; + struct deque_tag; + + namespace detail + { + template + struct clear; + + template <> + struct clear : mpl::identity > {}; + + template <> + struct clear : mpl::identity > {}; + + template <> + struct clear : mpl::identity > {}; + + template <> + struct clear : mpl::identity > {}; + + template <> + struct clear : mpl::identity > {}; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/empty.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/empty.hpp new file mode 100644 index 0000000000..a0e27d6693 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/empty.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_EMPTY_10022005_1619) +#define FUSION_EMPTY_10022005_1619 + +#include +#include + +namespace boost { namespace mpl +{ + template + struct empty_impl; + + template <> + struct empty_impl + { + template + struct apply : fusion::result_of::empty {}; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/end.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/end.hpp new file mode 100644 index 0000000000..ed3320b250 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/end.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_10022005_1619) +#define FUSION_END_10022005_1619 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef fusion_iterator::type> type; + }; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/erase.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/erase.hpp new file mode 100644 index 0000000000..a8b092aeb1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/erase.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ERASE_10022005_1835) +#define FUSION_ERASE_10022005_1835 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct erase_impl; + + template <> + struct erase_impl + { + template + struct apply + { + typedef typename + fusion::result_of::erase::type + result; + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/erase_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/erase_key.hpp new file mode 100644 index 0000000000..3cda268613 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/erase_key.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ERASE_KEY_10022005_1907) +#define FUSION_ERASE_KEY_10022005_1907 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct erase_key_impl; + + template <> + struct erase_key_impl + { + template + struct apply + { + typedef typename + fusion::result_of::erase_key::type + result; + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/front.hpp new file mode 100644 index 0000000000..97a26f731d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/front.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FRONT_10022005_1618) +#define FUSION_FRONT_10022005_1618 + +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct front_impl; + + template <> + struct front_impl + { + template + struct apply : + fusion::result_of::value_of::type> {}; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/has_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/has_key.hpp new file mode 100644 index 0000000000..beac7c645d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/has_key.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_HAS_KEY_10022005_1617) +#define FUSION_HAS_KEY_10022005_1617 + +#include +#include + +namespace boost { namespace mpl +{ + template + struct has_key_impl; + + template <> + struct has_key_impl + { + template + struct apply : fusion::result_of::has_key {}; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/insert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/insert.hpp new file mode 100644 index 0000000000..76918ce986 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/insert.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INSERT_10022005_1837) +#define FUSION_INSERT_10022005_1837 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct insert_impl; + + template <> + struct insert_impl + { + template + struct apply + { + typedef typename + fusion::result_of::insert::type + result; + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/insert_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/insert_range.hpp new file mode 100644 index 0000000000..4da3936587 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/insert_range.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_INSERT_RANGE_10022005_1838) +#define FUSION_INSERT_RANGE_10022005_1838 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct insert_range_impl; + + template <> + struct insert_range_impl + { + template + struct apply + { + typedef typename + fusion::result_of::insert_range::type + result; + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/pop_back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/pop_back.hpp new file mode 100644 index 0000000000..84bd75a465 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/pop_back.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_POP_BACK_10022005_1801) +#define FUSION_POP_BACK_10022005_1801 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct pop_back_impl; + + template <> + struct pop_back_impl + { + template + struct apply + { + typedef typename + fusion::result_of::pop_back::type + result; + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/pop_front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/pop_front.hpp new file mode 100644 index 0000000000..ffe6c302d6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/pop_front.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_POP_FRONT_10022005_1800) +#define FUSION_POP_FRONT_10022005_1800 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct pop_front_impl; + + template <> + struct pop_front_impl + { + template + struct apply + { + typedef typename + fusion::result_of::pop_front::type + result; + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/push_back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/push_back.hpp new file mode 100644 index 0000000000..e96faa062b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/push_back.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PUSH_BACK_10022005_1647) +#define FUSION_PUSH_BACK_10022005_1647 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct push_back_impl; + + template <> + struct push_back_impl + { + template + struct apply + { + typedef typename + fusion::result_of::push_back::type + result; + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/push_front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/push_front.hpp new file mode 100644 index 0000000000..c508d6524d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/push_front.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PUSH_FRONT_10022005_1720) +#define FUSION_PUSH_FRONT_10022005_1720 + +#include +#include +#include +#include + +namespace boost { namespace mpl +{ + template + struct push_front_impl; + + template <> + struct push_front_impl + { + template + struct apply + { + typedef typename + fusion::result_of::push_front::type + result; + + typedef typename + fusion::result_of::convert< + typename fusion::detail::tag_of::type, result>::type + type; + }; + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/size.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/size.hpp new file mode 100644 index 0000000000..2c724281a9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/mpl/size.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SIZE_10022005_1617) +#define FUSION_SIZE_10022005_1617 + +#include +#include + +namespace boost { namespace mpl +{ + template + struct size_impl; + + template <> + struct size_impl + { + template + struct apply : fusion::result_of::size {}; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence.hpp new file mode 100644 index 0000000000..9c3ed87393 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_10022005_0559) +#define FUSION_ITERATOR_10022005_0559 + +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison.hpp new file mode 100644 index 0000000000..50e72cb3a4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_COMPARISON_10022005_0615) +#define FUSION_SEQUENCE_COMPARISON_10022005_0615 + +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/enable_comparison.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/enable_comparison.hpp new file mode 100644 index 0000000000..3e79277ed4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/enable_comparison.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ENABLE_COMPARISON_09232005_1958) +#define FUSION_ENABLE_COMPARISON_09232005_1958 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct is_native_fusion_sequence : is_base_of {}; + + template + struct enable_equality + : mpl::or_, is_native_fusion_sequence > + {}; + + template + struct enable_comparison + : mpl::and_< + mpl::or_, is_native_fusion_sequence > + , mpl::equal_to, result_of::size > + > + {}; + +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/equal_to.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/equal_to.hpp new file mode 100644 index 0000000000..40cd96f480 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/equal_to.hpp @@ -0,0 +1,60 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_EQUAL_TO_05052005_1142) +#define FUSION_EQUAL_TO_05052005_1142 + +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct sequence_equal_to + { + typedef typename result_of::end::type end1_type; + typedef typename result_of::end::type end2_type; + + template + static bool + call(I1 const&, I2 const&, mpl::true_) + { + return true; + } + + template + static bool + call(I1 const& a, I2 const& b, mpl::false_) + { + return *a == *b + && call(fusion::next(a), fusion::next(b)); + } + + template + static bool + call(I1 const& a, I2 const& b) + { + typename result_of::equal_to::type eq; + return call(a, b, eq); + } + }; + + template + struct sequence_equal_to + { + template + static bool + call(I1 const& /*a*/, I2 const& /*b*/) + { + return false; + } + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/greater.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/greater.hpp new file mode 100644 index 0000000000..e7b6a034c4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/greater.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_GREATER_05052005_1142) +#define FUSION_GREATER_05052005_1142 + +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct sequence_greater + { + typedef typename result_of::end::type end1_type; + typedef typename result_of::end::type end2_type; + + template + static bool + call(I1 const&, I2 const&, mpl::true_) + { + return false; + } + + template + static bool + call(I1 const& a, I2 const& b, mpl::false_) + { + return *a > *b || + (!(*b > *a) && call(fusion::next(a), fusion::next(b))); + } + + template + static bool + call(I1 const& a, I2 const& b) + { + typename result_of::equal_to::type eq; + return call(a, b, eq); + } + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/greater_equal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/greater_equal.hpp new file mode 100644 index 0000000000..08b98760b1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/greater_equal.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_GREATER_EQUAL_05052005_1142) +#define FUSION_GREATER_EQUAL_05052005_1142 + +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct sequence_greater_equal + { + typedef typename result_of::end::type end1_type; + typedef typename result_of::end::type end2_type; + + template + static bool + call(I1 const&, I2 const&, mpl::true_) + { + return true; + } + + template + static bool + call(I1 const& a, I2 const& b, mpl::false_) + { + return *a >= *b + && (!(*b >= *a) || call(fusion::next(a), fusion::next(b))); + } + + template + static bool + call(I1 const& a, I2 const& b) + { + typename result_of::equal_to::type eq; + return call(a, b, eq); + } + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/less.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/less.hpp new file mode 100644 index 0000000000..a8b0ce841f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/less.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LESS_05052005_1141) +#define FUSION_LESS_05052005_1141 + +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct sequence_less + { + typedef typename result_of::end::type end1_type; + typedef typename result_of::end::type end2_type; + + template + static bool + call(I1 const&, I2 const&, mpl::true_) + { + return false; + } + + template + static bool + call(I1 const& a, I2 const& b, mpl::false_) + { + return *a < *b || + (!(*b < *a) && call(fusion::next(a), fusion::next(b))); + } + + template + static bool + call(I1 const& a, I2 const& b) + { + typename result_of::equal_to::type eq; + return call(a, b, eq); + } + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/less_equal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/less_equal.hpp new file mode 100644 index 0000000000..ee8a111ea4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/less_equal.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LESS_EQUAL_05052005_1141) +#define FUSION_LESS_EQUAL_05052005_1141 + +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct sequence_less_equal + { + typedef typename result_of::end::type end1_type; + typedef typename result_of::end::type end2_type; + + template + static bool + call(I1 const&, I2 const&, mpl::true_) + { + return true; + } + + template + static bool + call(I1 const& a, I2 const& b, mpl::false_) + { + return *a <= *b + && (!(*b <= *a) || call(fusion::next(a), fusion::next(b))); + } + + template + static bool + call(I1 const& a, I2 const& b) + { + typename result_of::equal_to::type eq; + return call(a, b, eq); + } + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/not_equal_to.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/not_equal_to.hpp new file mode 100644 index 0000000000..5e939675f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/detail/not_equal_to.hpp @@ -0,0 +1,60 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NOT_EQUAL_TO_05052005_1141) +#define FUSION_NOT_EQUAL_TO_05052005_1141 + +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct sequence_not_equal_to + { + typedef typename result_of::end::type end1_type; + typedef typename result_of::end::type end2_type; + + template + static bool + call(I1 const&, I2 const&, mpl::true_) + { + return false; + } + + template + static bool + call(I1 const& a, I2 const& b, mpl::false_) + { + return *a != *b + || call(fusion::next(a), fusion::next(b)); + } + + template + static bool + call(I1 const& a, I2 const& b) + { + typename result_of::equal_to::type eq; + return call(a, b, eq); + } + }; + + template + struct sequence_not_equal_to + { + template + static bool + call(I1 const& a, I2 const& b) + { + return true; + } + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/equal_to.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/equal_to.hpp new file mode 100644 index 0000000000..0c8a37e40f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/equal_to.hpp @@ -0,0 +1,56 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_EQUAL_TO_05052005_0431) +#define FUSION_EQUAL_TO_05052005_0431 + +#include +#include +#include +#include +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4100) // unreferenced formal parameter +#endif + +namespace boost { namespace fusion +{ + template + inline bool + equal_to(Seq1 const& a, Seq2 const& b) + { + return result_of::size::value == result_of::size::value + && detail::sequence_equal_to< + Seq1 const, Seq2 const + , result_of::size::value == result_of::size::value>:: + call(fusion::begin(a), fusion::begin(b)); + } + + namespace operators + { + template + inline typename + enable_if< + detail::enable_equality + , bool + >::type + operator==(Seq1 const& a, Seq2 const& b) + { + return fusion::equal_to(a, b); + } + } + using operators::operator==; +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/greater.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/greater.hpp new file mode 100644 index 0000000000..8df806e424 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/greater.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_GREATER_05052005_0432) +#define FUSION_GREATER_05052005_0432 + +#include +#include +#include +#include + +#if defined(FUSION_DIRECT_OPERATOR_USAGE) +#include +#else +#include +#endif + +namespace boost { namespace fusion +{ + template + inline bool + greater(Seq1 const& a, Seq2 const& b) + { +#if defined(FUSION_DIRECT_OPERATOR_USAGE) + return detail::sequence_greater:: + call(fusion::begin(a), fusion::begin(b)); +#else + return (b < a); +#endif + } + + namespace operators + { + template + inline typename + enable_if< + detail::enable_comparison + , bool + >::type + operator>(Seq1 const& a, Seq2 const& b) + { + return fusion::greater(a, b); + } + } + using operators::operator>; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/greater_equal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/greater_equal.hpp new file mode 100644 index 0000000000..3a20e0e812 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/greater_equal.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_GREATER_EQUAL_05052005_0432) +#define FUSION_GREATER_EQUAL_05052005_0432 + +#include +#include +#include +#include + +#if defined(FUSION_DIRECT_OPERATOR_USAGE) +#include +#else +#include +#endif + +namespace boost { namespace fusion +{ + template + inline bool + greater_equal(Seq1 const& a, Seq2 const& b) + { +#if defined(FUSION_DIRECT_OPERATOR_USAGE) + return detail::sequence_greater_equal:: + call(fusion::begin(a), fusion::begin(b)); +#else + return !(a < b); +#endif + } + + namespace operators + { + template + inline typename + enable_if< + detail::enable_comparison + , bool + >::type + operator>=(Seq1 const& a, Seq2 const& b) + { + return fusion::greater_equal(a, b); + } + } + using operators::operator>=; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/less.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/less.hpp new file mode 100644 index 0000000000..a86c35171f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/less.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LESS_05052005_0432) +#define FUSION_LESS_05052005_0432 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + template + inline bool + less(Seq1 const& a, Seq2 const& b) + { + return detail::sequence_less:: + call(fusion::begin(a), fusion::begin(b)); + } + + namespace operators + { + template + inline typename + enable_if< + detail::enable_comparison + , bool + >::type + operator<(Seq1 const& a, Seq2 const& b) + { + return fusion::less(a, b); + } + } + using operators::operator<; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/less_equal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/less_equal.hpp new file mode 100644 index 0000000000..518e1c0fd0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/less_equal.hpp @@ -0,0 +1,80 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LESS_EQUAL_05052005_0432) +#define FUSION_LESS_EQUAL_05052005_0432 + +#include +#include +#include +#include + +#if defined(FUSION_DIRECT_OPERATOR_USAGE) +#include +#else +#include +#endif + +namespace boost { namespace fusion +{ + template + inline bool + less_equal(Seq1 const& a, Seq2 const& b) + { +#if defined(FUSION_DIRECT_OPERATOR_USAGE) + return detail::sequence_less_equal:: + call(fusion::begin(a), fusion::begin(b)); +#else + return !(b < a); +#endif + } + + namespace operators + { +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400) +// Workaround for VC8.0 and VC7.1 + template + inline bool + operator<=(sequence_base const& a, sequence_base const& b) + { + return less_equal(a.derived(), b.derived()); + } + + template + inline typename disable_if, bool>::type + operator<=(sequence_base const& a, Seq2 const& b) + { + return less_equal(a.derived(), b); + } + + template + inline typename disable_if, bool>::type + operator<=(Seq1 const& a, sequence_base const& b) + { + return less_equal(a, b.derived()); + } + +#else +// Somehow VC8.0 and VC7.1 does not like this code +// but barfs somewhere else. + + template + inline typename + enable_if< + detail::enable_comparison + , bool + >::type + operator<=(Seq1 const& a, Seq2 const& b) + { + return fusion::less_equal(a, b); + } +#endif + } + using operators::operator<=; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/not_equal_to.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/not_equal_to.hpp new file mode 100644 index 0000000000..54648e1601 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/comparison/not_equal_to.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NOT_EQUAL_TO_05052005_0431) +#define FUSION_NOT_EQUAL_TO_05052005_0431 + +#include +#include +#include +#include + +#if defined(FUSION_DIRECT_OPERATOR_USAGE) +#include +#else +#include +#endif + +namespace boost { namespace fusion +{ + template + inline bool + not_equal_to(Seq1 const& a, Seq2 const& b) + { +#if defined(FUSION_DIRECT_OPERATOR_USAGE) + return result_of::size::value != result_of::size::value + || detail::sequence_not_equal_to< + Seq1 const, Seq2 const + , result_of::size::value == result_of::size::value>:: + call(fusion::begin(a), fusion::begin(b)); +#else + return !(a == b); +#endif + } + + namespace operators + { + template + inline typename + enable_if< + detail::enable_equality + , bool + >::type + operator!=(Seq1 const& a, Seq2 const& b) + { + return fusion::not_equal_to(a, b); + } + } + using operators::operator!=; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/convert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/convert.hpp new file mode 100644 index 0000000000..a6e3cccaf3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/convert.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CONVERT_10022005_1442) +#define FUSION_CONVERT_10022005_1442 + +namespace boost { namespace fusion +{ + namespace extension + { + template + struct convert_impl; + } + + namespace result_of + { + template + struct convert + { + typedef typename extension::convert_impl gen; + + typedef typename + gen::template apply::type + type; + }; + } + + template + inline typename result_of::convert::type + convert(Sequence& seq) + { + typedef typename result_of::convert::gen gen; + return gen::call(seq); + } + + template + inline typename result_of::convert::type + convert(Sequence const& seq) + { + typedef typename result_of::convert::gen gen; + return gen::call(seq); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic.hpp new file mode 100644 index 0000000000..8c5f4abd6a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_INTRINSIC_10022005_0618) +#define FUSION_SEQUENCE_INTRINSIC_10022005_0618 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at.hpp new file mode 100644 index 0000000000..9ccbfc64a2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at.hpp @@ -0,0 +1,106 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_AT_05042005_0722) +#define FUSION_AT_05042005_0722 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct at_impl + { + template + struct apply; + }; + + template <> + struct at_impl + { + template + struct apply : Sequence::template at {}; + }; + + template <> + struct at_impl; + + template <> + struct at_impl; + + template <> + struct at_impl; + + template <> + struct at_impl; + } + + namespace result_of + { + template + struct at + : extension::at_impl::type>:: + template apply + {}; + + template + struct at_c + : at > + {}; + } + + + template + inline typename + lazy_disable_if< + is_const + , result_of::at + >::type + at(Sequence& seq) + { + return result_of::at::call(seq); + } + + template + inline typename result_of::at::type + at(Sequence const& seq) + { + return result_of::at::call(seq); + } + + template + inline typename + lazy_disable_if< + is_const + , result_of::at_c + >::type + at_c(Sequence& seq) + { + return fusion::at >(seq); + } + + template + inline typename result_of::at_c::type + at_c(Sequence const& seq) + { + return fusion::at >(seq); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at_c.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at_c.hpp new file mode 100644 index 0000000000..4dc53ae0c5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at_c.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_AT_C_08252008_0308) +#define FUSION_AT_C_08252008_0308 + +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at_key.hpp new file mode 100644 index 0000000000..30fefe0126 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/at_key.hpp @@ -0,0 +1,92 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_KEY_20060304_1755) +#define BOOST_FUSION_AT_KEY_20060304_1755 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct at_key_impl + { + template + struct apply + { + typedef typename + result_of::deref_data< + typename result_of::find::type + >::type + type; + + static type + call(Seq& seq) + { + return fusion::deref_data(fusion::find(seq)); + } + }; + }; + + template <> + struct at_key_impl + { + template + struct apply : Sequence::template at_key_impl {}; + }; + + template <> + struct at_key_impl; + + template <> + struct at_key_impl; + + template <> + struct at_key_impl; + } + + namespace result_of + { + template + struct at_key + : extension::at_key_impl::type>:: + template apply + {}; + } + + template + inline typename + lazy_disable_if< + is_const + , result_of::at_key + >::type + at_key(Sequence& seq) + { + return result_of::at_key::call(seq); + } + + template + inline typename result_of::at_key::type + at_key(Sequence const& seq) + { + return result_of::at_key::call(seq); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/back.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/back.hpp new file mode 100644 index 0000000000..1f3567f939 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/back.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BACK_09162005_0350) +#define FUSION_BACK_09162005_0350 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct fusion_sequence_tag; + + namespace result_of + { + template + struct back + : result_of::deref::type>::type> + {}; + } + + template + inline typename result_of::back::type + back(Sequence& seq) + { + return *fusion::prior(fusion::end(seq)); + } + + template + inline typename result_of::back::type + back(Sequence const& seq) + { + return *fusion::prior(fusion::end(seq)); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/begin.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/begin.hpp new file mode 100644 index 0000000000..5dbe0c408d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/begin.hpp @@ -0,0 +1,74 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_04052005_1132) +#define FUSION_BEGIN_04052005_1132 + +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; // iterator facade tag + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct begin_impl + { + template + struct apply; + }; + + template <> + struct begin_impl + { + template + struct apply : Sequence::template begin {}; + }; + + template <> + struct begin_impl; + + template <> + struct begin_impl; + + template <> + struct begin_impl; + + template <> + struct begin_impl; + } + + namespace result_of + { + template + struct begin + : extension::begin_impl::type>:: + template apply + {}; + } + + template + inline typename result_of::begin::type const + begin(Sequence& seq) + { + return result_of::begin::call(seq); + } + + template + inline typename result_of::begin::type const + begin(Sequence const& seq) + { + return result_of::begin::call(seq); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/empty.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/empty.hpp new file mode 100644 index 0000000000..2390a49b1c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/empty.hpp @@ -0,0 +1,60 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_EMPTY_09162005_0335) +#define FUSION_EMPTY_09162005_0335 + +#include +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct mpl_sequence_tag; // mpl sequence tag + + namespace extension + { + template + struct empty_impl + { + template + struct apply + : mpl::bool_<(result_of::size::value == 0)> + {}; + }; + + template <> + struct empty_impl + { + template + struct apply : Sequence::template empty {}; + }; + + template <> + struct empty_impl; + } + + namespace result_of + { + template + struct empty + : extension::empty_impl::type>:: + template apply + {}; + } + + template + inline typename result_of::empty::type + empty(Sequence const&) + { + typedef typename result_of::empty::type result; + return result(); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/end.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/end.hpp new file mode 100644 index 0000000000..98a554e307 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/end.hpp @@ -0,0 +1,74 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_04052005_1141) +#define FUSION_END_04052005_1141 + +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct end_impl + { + template + struct apply; + }; + + template <> + struct end_impl + { + template + struct apply : Sequence::template end {}; + }; + + template <> + struct end_impl; + + template <> + struct end_impl; + + template <> + struct end_impl; + + template <> + struct end_impl; + } + + namespace result_of + { + template + struct end + : extension::end_impl::type>:: + template apply + {}; + } + + template + inline typename result_of::end::type const + end(Sequence& seq) + { + return result_of::end::call(seq); + } + + template + inline typename result_of::end::type const + end(Sequence const& seq) + { + return result_of::end::call(seq); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/ext_/segments.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/ext_/segments.hpp new file mode 100644 index 0000000000..58f148f2e0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/ext_/segments.hpp @@ -0,0 +1,56 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEGMENTS_04052005_1141) +#define FUSION_SEGMENTS_04052005_1141 + +#include + +namespace boost { namespace fusion +{ + // segments: returns a sequence of sequences + namespace extension + { + template + struct segments_impl + { + template + struct apply {}; + }; + } + + namespace result_of + { + template + struct segments + { + typedef typename + extension::segments_impl::type>:: + template apply::type + type; + }; + } + + template + typename result_of::segments::type + segments(Sequence & seq) + { + return + extension::segments_impl::type>:: + template apply::call(seq); + } + + template + typename result_of::segments::type + segments(Sequence const& seq) + { + return + extension::segments_impl::type>:: + template apply::call(seq); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/ext_/size_s.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/ext_/size_s.hpp new file mode 100644 index 0000000000..8b61746af4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/ext_/size_s.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SIZE_S_08112006_1141) +#define FUSION_SIZE_S_08112006_1141 + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + /////////////////////////////////////////////////////////////////////////// + // calculates the size of any segmented data structure. + template::value> + struct segmented_size; + + namespace detail + { + struct size_plus + { + template + struct result; + + template + struct result + : mpl::plus< + segmented_size::type> + , typename remove_reference::type + > + {}; + }; + } + + /////////////////////////////////////////////////////////////////////////// + template + struct segmented_size + : result_of::fold< + typename result_of::segments::type + , mpl::size_t<0> + , detail::size_plus + >::type + {}; + + template + struct segmented_size + : result_of::size + {}; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/front.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/front.hpp new file mode 100644 index 0000000000..bb79cfa921 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/front.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FRONT_09162005_0343) +#define FUSION_FRONT_09162005_0343 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct fusion_sequence_tag; + + namespace result_of + { + template + struct front + : result_of::deref::type> + {}; + } + + template + inline typename result_of::front::type + front(Sequence& seq) + { + return *fusion::begin(seq); + } + + template + inline typename result_of::front::type + front(Sequence const& seq) + { + return *fusion::begin(seq); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/has_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/has_key.hpp new file mode 100644 index 0000000000..f254eb1eeb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/has_key.hpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_HAS_KEY_09232005_1454) +#define FUSION_HAS_KEY_09232005_1454 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + // Special tags: + struct sequence_facade_tag; + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct has_key_impl + { + template + struct apply + : mpl::not_< + typename result_of::equal_to< + typename result_of::find::type + , typename result_of::end::type + >::type + >::type + {}; + }; + + template <> + struct has_key_impl + { + template + struct apply : Sequence::template has_key {}; + }; + + template <> + struct has_key_impl; + + template <> + struct has_key_impl; + + template <> + struct has_key_impl; + } + + namespace result_of + { + template + struct has_key + : extension::has_key_impl::type>:: + template apply + {}; + } + + template + inline typename result_of::has_key::type + has_key(Sequence const& seq) + { + typedef typename result_of::has_key::type result; + return result(); + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/size.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/size.hpp new file mode 100644 index 0000000000..2a3cb7f823 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/size.hpp @@ -0,0 +1,74 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SIZE_05052005_0214) +#define FUSION_SIZE_05052005_0214 + +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct size_impl + { + template + struct apply : Sequence::size {}; + }; + + template <> + struct size_impl + { + template + struct apply : Sequence::template size {}; + }; + + template <> + struct size_impl; + + template <> + struct size_impl; + + template <> + struct size_impl; + + template <> + struct size_impl; + } + + namespace result_of + { + template + struct size + : extension::size_impl::type>:: + template apply + + { + typedef typename extension::size_impl::type>:: + template apply::type size_application; + BOOST_STATIC_CONSTANT(int, value = size_application::value); + }; + } + + template + inline typename result_of::size::type + size(Sequence const&) + { + typedef typename result_of::size::type result; + return result(); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/swap.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/swap.hpp new file mode 100644 index 0000000000..7a385ae8f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/swap.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_SWAP_20070501_1956) +#define BOOST_FUSION_SWAP_20070501_1956 + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + namespace result_of + { + template + struct swap + { + typedef void type; + }; + } + + namespace detail + { + struct swap + { + template + struct result + { + typedef void type; + }; + + template + void operator()(Elem const& e) const + { + using std::swap; + swap(front(e), back(e)); + } + }; + } + + template + typename enable_if, traits::is_sequence >, void>::type + swap(Seq1& lhs, Seq2& rhs) + { + typedef vector references; + for_each(zip_view(references(lhs, rhs)), detail::swap()); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/value_at.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/value_at.hpp new file mode 100644 index 0000000000..01cdc9d50a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/value_at.hpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_AT_05052005_0229) +#define FUSION_VALUE_AT_05052005_0229 + +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct value_at_impl + { + template + struct apply; + }; + + template <> + struct value_at_impl + { + template + struct apply : Sequence::template value_at {}; + }; + + template <> + struct value_at_impl; + + template <> + struct value_at_impl; + + template <> + struct value_at_impl; + + template <> + struct value_at_impl; + } + + namespace result_of + { + template + struct value_at + : extension::value_at_impl::type>:: + template apply + {}; + + template + struct value_at_c + : fusion::result_of::value_at > + {}; + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/value_at_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/value_at_key.hpp new file mode 100644 index 0000000000..d7f84cd932 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/intrinsic/value_at_key.hpp @@ -0,0 +1,65 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_AT_KEY_05052005_0229) +#define FUSION_VALUE_AT_KEY_05052005_0229 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct value_at_key_impl + { + template + struct apply + : result_of::value_of_data< + typename result_of::find::type + > + {}; + }; + + template <> + struct value_at_key_impl + { + template + struct apply : Sequence::template value_at_key {}; + }; + + template <> + struct value_at_key_impl; + + template <> + struct value_at_key_impl; + + template <> + struct value_at_key_impl; + } + + namespace result_of + { + template + struct value_at_key + : extension::value_at_key_impl::type>:: + template apply + {}; + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io.hpp new file mode 100644 index 0000000000..080bae3819 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_IO_10032005_0836) +#define FUSION_SEQUENCE_IO_10032005_0836 + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/in.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/in.hpp new file mode 100644 index 0000000000..b0620284ed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/in.hpp @@ -0,0 +1,85 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 1999-2003 Jeremiah Willcock + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_IN_05052005_0121) +#define FUSION_IN_05052005_0121 + +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct delimiter_in + { + // read a delimiter + template + static void + read(IS& is, char const* delim, mpl::false_ = mpl::false_()) + { + detail::string_ios_manip manip(is); + manip.read(delim); + } + + template + static void + read(IS&, char const*, mpl::true_) + { + } + }; + + struct read_sequence_loop + { + template + static void + call(IS&, First const&, Last const&, mpl::true_) + { + } + + template + static void + call(IS& is, First const& first, Last const& last, mpl::false_) + { + result_of::equal_to< + typename result_of::next::type + , Last + > + is_last; + + is >> *first; + delimiter_in::read(is, " ", is_last); + call(is, fusion::next(first), last, is_last); + } + + template + static void + call(IS& is, First const& first, Last const& last) + { + result_of::equal_to eq; + call(is, first, last, eq); + } + }; + + template + inline void + read_sequence(IS& is, Sequence& seq) + { + delimiter_in::read(is, "("); + read_sequence_loop::call(is, fusion::begin(seq), fusion::end(seq)); + delimiter_in::read(is, ")"); + } +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/manip.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/manip.hpp new file mode 100644 index 0000000000..988f8bc2bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/manip.hpp @@ -0,0 +1,320 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jeremiah Willcock + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MANIP_05052005_1200) +#define FUSION_MANIP_05052005_1200 + +#include +#include +#include +#include + +// Tuple I/O manipulators + +#define FUSION_GET_CHAR_TYPE(T) typename T::char_type +#define FUSION_GET_TRAITS_TYPE(T) typename T::traits_type + +#if defined (BOOST_NO_TEMPLATED_STREAMS) +#define FUSION_STRING_OF_STREAM(Stream) std::string +#else +#define FUSION_STRING_OF_STREAM(Stream) \ + std::basic_string< \ + FUSION_GET_CHAR_TYPE(Stream) \ + , FUSION_GET_TRAITS_TYPE(Stream) \ + > +#endif + +//$$$ these should be part of the public API$$$ +//$$$ rename tuple_open, tuple_close and tuple_delimiter to +// open, close and delimeter and add these synonyms to the +// TR1 tuple module. + +namespace boost { namespace fusion +{ + namespace detail + { + template + int get_xalloc_index(Tag* = 0) + { + // each Tag will have a unique index + static int index = std::ios::xalloc(); + return index; + } + + template + struct stream_data + { + struct arena + { + ~arena() + { + for ( + typename std::vector::iterator i = data.begin() + ; i != data.end() + ; ++i) + { + delete *i; + } + } + + std::vector data; + }; + + static void attach(Stream& stream, T const& data) + { + static arena ar; // our arena + ar.data.push_back(new T(data)); + stream.pword(get_xalloc_index()) = ar.data.back(); + } + + static T const* get(Stream& stream) + { + return (T const*)stream.pword(get_xalloc_index()); + } + }; + + template + class string_ios_manip + { + public: + + typedef FUSION_STRING_OF_STREAM(Stream) string_type; + + typedef stream_data stream_data_t; + + string_ios_manip(Stream& str_) + : stream(str_) + {} + + void + set(string_type const& s) + { + stream_data_t::attach(stream, s); + } + + void + print(char const* default_) const + { + // print a delimiter + string_type const* p = stream_data_t::get(stream); + if (p) + stream << *p; + else + stream << default_; + } + + void + read(char const* default_) const + { + // read a delimiter + string_type const* p = stream_data_t::get(stream); + using namespace std; + ws(stream); + + if (p) + { + typedef typename string_type::const_iterator iterator; + for (iterator i = p->begin(); i != p->end(); ++i) + check_delim(*i); + } + else + { + while (*default_) + check_delim(*default_++); + } + } + + private: + + template + void + check_delim(Char c) const + { + if (!isspace(c)) + { + if (stream.get() != c) + { + stream.unget(); + stream.setstate(std::ios::failbit); + } + } + } + + Stream& stream; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + string_ios_manip& operator= (string_ios_manip const&); + }; + + } // detail + +#if defined (BOOST_NO_TEMPLATED_STREAMS) + +#define STD_TUPLE_DEFINE_MANIPULATOR(name) \ + namespace detail \ + { \ + struct name##_tag; \ + \ + struct name##_type \ + { \ + typedef std::string string_type; \ + string_type data; \ + name##_type(const string_type& d): data(d) {} \ + }; \ + \ + template \ + Stream& operator>>(Stream& s, const name##_type& m) \ + { \ + string_ios_manip(s).set(m.data); \ + return s; \ + } \ + \ + template \ + Stream& operator<<(Stream& s, const name##_type& m) \ + { \ + string_ios_manip(s).set(m.data); \ + return s; \ + } \ + } + +#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \ + inline detail::name##_type \ + name(const std::string& s) \ + { \ + return detail::name##_type(s); \ + } \ + \ + inline detail::name##_type \ + name(const char* s) \ + { \ + return detail::name##_type(std::string(s)); \ + } \ + \ + inline detail::name##_type \ + name(char c) \ + { \ + return detail::name##_type(std::string(1, c)); \ + } + +#else // defined(BOOST_NO_TEMPLATED_STREAMS) + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + +#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \ + template \ + inline detail::name##_type \ + name(const std::basic_string& s) \ + { \ + return detail::name##_type(s); \ + } \ + \ + inline detail::name##_type \ + name(char const* s) \ + { \ + return detail::name##_type(std::basic_string(s)); \ + } \ + \ + inline detail::name##_type \ + name(wchar_t const* s) \ + { \ + return detail::name##_type(std::basic_string(s)); \ + } \ + \ + inline detail::name##_type \ + name(char c) \ + { \ + return detail::name##_type(std::basic_string(1, c)); \ + } \ + \ + inline detail::name##_type \ + name(wchar_t c) \ + { \ + return detail::name##_type(std::basic_string(1, c)); \ + } + +#else // defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + +#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \ + template \ + inline detail::name##_type \ + name(const std::basic_string& s) \ + { \ + return detail::name##_type(s); \ + } \ + \ + template \ + inline detail::name##_type \ + name(Char s[]) \ + { \ + return detail::name##_type(std::basic_string(s)); \ + } \ + \ + template \ + inline detail::name##_type \ + name(Char const s[]) \ + { \ + return detail::name##_type(std::basic_string(s)); \ + } \ + \ + template \ + inline detail::name##_type \ + name(Char c) \ + { \ + return detail::name##_type(std::basic_string(1, c)); \ + } + +#endif + +#define STD_TUPLE_DEFINE_MANIPULATOR(name) \ + namespace detail \ + { \ + struct name##_tag; \ + \ + template > \ + struct name##_type \ + { \ + typedef std::basic_string string_type; \ + string_type data; \ + name##_type(const string_type& d): data(d) {} \ + }; \ + \ + template \ + Stream& operator>>(Stream& s, const name##_type& m) \ + { \ + string_ios_manip(s).set(m.data); \ + return s; \ + } \ + \ + template \ + Stream& operator<<(Stream& s, const name##_type& m) \ + { \ + string_ios_manip(s).set(m.data); \ + return s; \ + } \ + } \ + +#endif // defined(BOOST_NO_TEMPLATED_STREAMS) + + STD_TUPLE_DEFINE_MANIPULATOR(tuple_open) + STD_TUPLE_DEFINE_MANIPULATOR(tuple_close) + STD_TUPLE_DEFINE_MANIPULATOR(tuple_delimiter) + + STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_open) + STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_close) + STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_delimiter) + +#undef STD_TUPLE_DEFINE_MANIPULATOR +#undef STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS +#undef FUSION_STRING_OF_STREAM +#undef FUSION_GET_CHAR_TYPE +#undef FUSION_GET_TRAITS_TYPE + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/out.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/out.hpp new file mode 100644 index 0000000000..6d0c28a7ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/detail/out.hpp @@ -0,0 +1,85 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 1999-2003 Jeremiah Willcock + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_OUT_05052005_0121) +#define FUSION_OUT_05052005_0121 + +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct delimiter_out + { + // print a delimiter + template + static void + print(OS& os, char const* delim, mpl::false_ = mpl::false_()) + { + detail::string_ios_manip manip(os); + manip.print(delim); + } + + template + static void + print(OS&, char const*, mpl::true_) + { + } + }; + + struct print_sequence_loop + { + template + static void + call(OS&, First const&, Last const&, mpl::true_) + { + } + + template + static void + call(OS& os, First const& first, Last const& last, mpl::false_) + { + result_of::equal_to< + typename result_of::next::type + , Last + > + is_last; + + os << *first; + delimiter_out::print(os, " ", is_last); + call(os, fusion::next(first), last, is_last); + } + + template + static void + call(OS& os, First const& first, Last const& last) + { + result_of::equal_to eq; + call(os, first, last, eq); + } + }; + + template + inline void + print_sequence(OS& os, Sequence const& seq) + { + delimiter_out::print(os, "("); + print_sequence_loop::call(os, fusion::begin(seq), fusion::end(seq)); + delimiter_out::print(os, ")"); + } +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/in.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/in.hpp new file mode 100644 index 0000000000..19142d46f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/in.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 1999-2003 Jeremiah Willcock + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_IN_05042005_0120) +#define BOOST_IN_05042005_0120 + +#include +#include +#include + +namespace boost { namespace fusion +{ + template + inline std::istream& + in(std::istream& is, Sequence& seq) + { + detail::read_sequence(is, seq); + return is; + } + + namespace operators + { + template + inline typename + enable_if< + fusion::traits::is_sequence + , std::istream& + >::type + operator>>(std::istream& is, Sequence& seq) + { + return fusion::in(is, seq); + } + } + using operators::operator>>; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/out.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/out.hpp new file mode 100644 index 0000000000..017f0e974e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/io/out.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 1999-2003 Jeremiah Willcock + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_OUT_05042005_0120) +#define BOOST_OUT_05042005_0120 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + template + inline std::ostream& + out(std::ostream& os, Sequence& seq) + { + detail::print_sequence(os, seq); + return os; + } + + namespace operators + { + template + inline typename + enable_if< + fusion::traits::is_sequence + , std::ostream& + >::type + operator<<(std::ostream& os, Sequence const& seq) + { + return fusion::out(os, seq); + } + } + using operators::operator<<; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/sequence_facade.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/sequence_facade.hpp new file mode 100644 index 0000000000..af6faf5666 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/sequence/sequence_facade.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_FACADE_09252006_1044) +#define FUSION_SEQUENCE_FACADE_09252006_1044 + +#include +#include + +namespace boost { namespace fusion +{ + struct sequence_facade_tag; + + template + struct sequence_facade : sequence_base + { + typedef sequence_facade_tag fusion_tag; + typedef Derived derived_type; + typedef Category category; + typedef IsView is_view; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support.hpp new file mode 100644 index 0000000000..012ee10746 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SUPPORT_10022005_0545) +#define FUSION_SUPPORT_10022005_0545 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/category_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/category_of.hpp new file mode 100644 index 0000000000..73def5b0e0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/category_of.hpp @@ -0,0 +1,112 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CATEGORY_OF_07202005_0308) +#define FUSION_CATEGORY_OF_07202005_0308 + +#include +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + struct incrementable_traversal_tag {}; + + struct single_pass_traversal_tag + : incrementable_traversal_tag {}; + + struct forward_traversal_tag + : single_pass_traversal_tag {}; + + struct bidirectional_traversal_tag + : forward_traversal_tag {}; + + struct random_access_traversal_tag + : bidirectional_traversal_tag {}; + + struct associative_tag {}; + + namespace extension + { + template + struct category_of_impl + { + template + struct apply : detail::fusion_category_of {}; + }; + + template <> + struct category_of_impl; + + template <> + struct category_of_impl; + + template <> + struct category_of_impl; + + template <> + struct category_of_impl; + } + + namespace traits + { + template + struct category_of + : extension::category_of_impl::type>:: + template apply + {}; + + template + struct is_associative + : is_base_of< + associative_tag + , typename category_of::type> + {}; + + template + struct is_incrementable + : is_base_of< + incrementable_traversal_tag + , typename category_of::type> + {}; + + template + struct is_single_pass + : is_base_of< + single_pass_traversal_tag + , typename category_of::type> + {}; + + template + struct is_forward + : is_base_of< + forward_traversal_tag + , typename category_of::type> + {}; + + template + struct is_bidirectional + : is_base_of< + bidirectional_traversal_tag + , typename category_of::type> + {}; + + template + struct is_random_access + : is_base_of< + random_access_traversal_tag + , typename category_of::type> + {}; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/deduce.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/deduce.hpp new file mode 100644 index 0000000000..3a7231bdf1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/deduce.hpp @@ -0,0 +1,117 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_SUPPORT_DEDUCE_HPP_INCLUDED) +#define BOOST_FUSION_SUPPORT_DEDUCE_HPP_INCLUDED + +#include + +namespace boost { namespace fusion { namespace traits +{ + template struct deduce; + + //----- ---- --- -- - - - - + + // Non-references pass unchanged + + template + struct deduce + { + typedef T type; + }; + + template + struct deduce + { + typedef T type; + }; + + template + struct deduce + { + typedef T type; + }; + + template + struct deduce + { + typedef T type; + }; + + // Keep references on mutable LValues + + template + struct deduce + { + typedef T & type; + }; + + template + struct deduce + { + typedef T volatile& type; + }; + + // Store away potential RValues + + template + struct deduce + { + typedef T type; + }; + + template + struct deduce + { + typedef T type; + }; + + // Unwrap Boost.RefS (referencee cv is deduced) + + template + struct deduce & > + { + typedef T& type; + }; + + template + struct deduce const & > + { + typedef T& type; + }; + + // Keep references on arrays, even if const + + template + struct deduce + { + typedef T(&type)[N]; + }; + + template + struct deduce + { + typedef volatile T(&type)[N]; + }; + + template + struct deduce + { + typedef const T(&type)[N]; + }; + + template + struct deduce + { + typedef const volatile T(&type)[N]; + }; + +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/deduce_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/deduce_sequence.hpp new file mode 100644 index 0000000000..77631b79a3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/deduce_sequence.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +==============================================================================*/ + +#if !defined(BOOST_FUSION_SUPPORT_DEDUCE_SEQUENCE_HPP_INCLUDED) +#define BOOST_FUSION_SUPPORT_DEDUCE_SEQUENCE_HPP_INCLUDED + +#include +#include +#include + + +namespace boost { namespace fusion { namespace traits +{ + template struct deduce_sequence; + + namespace detail + { + struct deducer + { + template + struct result; + + template + struct result< Self(T) > + : fusion::traits::deduce + { }; + }; + } + + template + struct deduce_sequence + : result_of::as_vector< + fusion::transform_view > + { }; + +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/access.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/access.hpp new file mode 100644 index 0000000000..af7374ccc7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/access.hpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ACCESS_04182005_0737) +#define FUSION_ACCESS_04182005_0737 + +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct ref_result + { + typedef typename add_reference::type type; + }; + + template + struct cref_result + { + typedef typename + add_reference< + typename add_const::type + >::type + type; + }; + + template + struct call_param + { + typedef T const& type; + }; + + template + struct call_param + { + typedef T& type; + }; + + template + struct call_param + { + typedef T const& type; + }; + + template + struct call_param + { + typedef T const& type; + }; + + template + struct call_param + { + typedef T const& type; + }; + +}}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/as_fusion_element.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/as_fusion_element.hpp new file mode 100644 index 0000000000..2d020644dd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/as_fusion_element.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_AS_FUSION_ELEMENT_05052005_0338) +#define FUSION_AS_FUSION_ELEMENT_05052005_0338 + +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct as_fusion_element + { + typedef T type; + }; + + template + struct as_fusion_element > + { + typedef T& type; + }; + + template + struct as_fusion_element + { + typedef const T(&type)[N]; + }; + + template + struct as_fusion_element + { + typedef const volatile T(&type)[N]; + }; + + template + struct as_fusion_element + { + typedef const volatile T(&type)[N]; + }; + +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/category_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/category_of.hpp new file mode 100644 index 0000000000..04102cfdf1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/category_of.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_CATEGORY_OF_07212005_1025) +#define FUSION_CATEGORY_OF_07212005_1025 + +namespace boost { namespace fusion { namespace detail +{ + template + struct fusion_category_of + { + typedef typename T::category type; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/is_mpl_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/is_mpl_sequence.hpp new file mode 100644 index 0000000000..eeb8f91617 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/is_mpl_sequence.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DETAIL_IS_MPL_SEQUENCE_29122006_1105) +#define FUSION_DETAIL_IS_MPL_SEQUENCE_29122006_1105 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct is_mpl_sequence + : mpl::and_< + mpl::not_ > + , mpl::is_sequence > + {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/is_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/is_view.hpp new file mode 100644 index 0000000000..5fa2f24108 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/is_view.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_IS_VIEW_03202006_0018) +#define FUSION_IS_VIEW_03202006_0018 + +namespace boost { namespace fusion { namespace detail +{ + template + struct fusion_is_view + { + typedef typename T::is_view type; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/mpl_iterator_category.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/mpl_iterator_category.hpp new file mode 100644 index 0000000000..37a7fe9481 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/mpl_iterator_category.hpp @@ -0,0 +1,66 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MPL_ITERATOR_CATEGORY_07212005_0923) +#define FUSION_MPL_ITERATOR_CATEGORY_07212005_0923 + +namespace boost { namespace mpl +{ + struct forward_iterator_tag; + struct bidirectional_iterator_tag; + struct random_access_iterator_tag; +}} + +namespace boost { namespace fusion +{ + struct forward_traversal_tag; + struct bidirectional_traversal_tag; + struct random_access_traversal_tag; +}} + +namespace boost { namespace fusion { namespace detail +{ + template + struct mpl_iterator_category; + + template <> + struct mpl_iterator_category + { + typedef forward_traversal_tag type; + }; + + template <> + struct mpl_iterator_category + { + typedef bidirectional_traversal_tag type; + }; + + template <> + struct mpl_iterator_category + { + typedef random_access_traversal_tag type; + }; + + template <> + struct mpl_iterator_category + { + typedef forward_traversal_tag type; + }; + + template <> + struct mpl_iterator_category + { + typedef bidirectional_traversal_tag type; + }; + + template <> + struct mpl_iterator_category + { + typedef random_access_traversal_tag type; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/unknown_key.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/unknown_key.hpp new file mode 100644 index 0000000000..48ffcc2b1d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/detail/unknown_key.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_UNKNOWN_KEY_09242005_1219) +#define FUSION_UNKNOWN_KEY_09242005_1219 + +namespace boost { namespace fusion { namespace detail +{ + template + struct unknown_key {}; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/ext_/is_segmented.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/ext_/is_segmented.hpp new file mode 100644 index 0000000000..63330a4ae8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/ext_/is_segmented.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_IS_SEGMENTED_03202006_0015) +#define FUSION_IS_SEGMENTED_03202006_0015 + +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + struct iterator_range_tag; + + namespace extension + { + template + struct is_segmented_impl + { + template + struct apply + : mpl::false_ + {}; + }; + + template<> + struct is_segmented_impl; + } + + namespace traits + { + template + struct is_segmented + : extension::is_segmented_impl::type>:: + template apply + { + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_iterator.hpp new file mode 100644 index 0000000000..9e775f4e52 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_iterator.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_IS_ITERATOR_05062005_1219) +#define FUSION_IS_ITERATOR_05062005_1219 + +#include + +namespace boost { namespace fusion +{ + struct iterator_root; + + template + struct is_fusion_iterator : is_base_of {}; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_sequence.hpp new file mode 100644 index 0000000000..d57cecb410 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_sequence.hpp @@ -0,0 +1,66 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_IS_SEQUENCE_05052005_1002) +#define FUSION_IS_SEQUENCE_05052005_1002 + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct non_fusion_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct is_sequence_impl + { + template + struct apply : is_base_of {}; + }; + + template <> + struct is_sequence_impl + { + template + struct apply : mpl::false_ {}; + }; + + template <> + struct is_sequence_impl; + + template <> + struct is_sequence_impl; + + template <> + struct is_sequence_impl; + + template <> + struct is_sequence_impl; + } + + namespace traits + { + template + struct is_sequence + : extension::is_sequence_impl< + typename fusion::detail::tag_of::type + >::template apply + {}; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_view.hpp new file mode 100644 index 0000000000..e2cf6eb4e7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/is_view.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_IS_VIEW_03202006_0015) +#define FUSION_IS_VIEW_03202006_0015 + +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag + struct boost_array_tag; // boost::array tag + struct mpl_sequence_tag; // mpl sequence tag + struct std_pair_tag; // std::pair tag + + namespace extension + { + template + struct is_view_impl + { + template + struct apply + : detail::fusion_is_view + {}; + }; + + template <> + struct is_view_impl + { + template + struct apply : Sequence::is_view {}; + }; + + template <> + struct is_view_impl; + + template <> + struct is_view_impl; + + template <> + struct is_view_impl; + + template <> + struct is_view_impl; + } + + namespace traits + { + template + struct is_view : + extension::is_view_impl::type>:: + template apply::type + {}; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/iterator_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/iterator_base.hpp new file mode 100644 index 0000000000..2f909b2e63 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/iterator_base.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ITERATOR_BASE_05042005_1008) +#define FUSION_ITERATOR_BASE_05042005_1008 + +namespace boost { namespace fusion +{ + struct iterator_root {}; + + template + struct iterator_base : iterator_root + { + Iterator const& + cast() const + { + return static_cast(*this); + } + + Iterator& + cast() + { + return static_cast(*this); + } + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/pair.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/pair.hpp new file mode 100644 index 0000000000..a4ad4ee546 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/pair.hpp @@ -0,0 +1,112 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + Copyright (c) 2006 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PAIR_07222005_1203) +#define FUSION_PAIR_07222005_1203 + +#include +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion +{ + // A half runtime pair where the first type does not have data + template + struct pair + { + pair() + : second() {} + + pair(typename detail::call_param::type val) + : second(val) {} + + template + pair(pair const& rhs) + : second(rhs.second) {} + + template + pair& operator=(pair const& rhs) + { + second = rhs.second; + return *this; + } + + typedef First first_type; + typedef Second second_type; + Second second; + }; + + namespace result_of + { + template + struct make_pair + { + typedef fusion::pair::type> type; + }; + + template + struct first + { + typedef typename Pair::first_type type; + }; + + template + struct second + { + typedef typename Pair::second_type type; + }; + } + + template + inline typename result_of::make_pair::type + make_pair(Second const& val) + { + return pair::type>(val); + } + + template + inline OStream& + operator<<(OStream& os, pair const& p) + { + os << p.second; + return os; + } + + template + inline IStream& + operator>>(IStream& is, pair& p) + { + is >> p.second; + return is; + } + + template + inline bool + operator==(pair const& l, pair const& r) + { + return l.second == r.second; + } + + template + inline bool + operator!=(pair const& l, pair const& r) + { + return l.second != r.second; + } +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/sequence_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/sequence_base.hpp new file mode 100644 index 0000000000..1d436ef165 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/sequence_base.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_BASE_04182005_0737) +#define FUSION_SEQUENCE_BASE_04182005_0737 + +#include + +namespace boost { namespace fusion +{ + struct sequence_root {}; + + template + struct sequence_base : sequence_root + { + Sequence const& + derived() const + { + return static_cast(*this); + } + + Sequence& + derived() + { + return static_cast(*this); + } + }; + + struct fusion_sequence_tag; +}} + +namespace boost { namespace mpl +{ + // Deliberately break mpl::begin, so it doesn't lie that a Fusion sequence + // is not an MPL sequence by returning mpl::void_. + // In other words: Fusion Sequences are always MPL Sequences, but they can + // be incompletely defined. + template<> struct begin_impl< boost::fusion::fusion_sequence_tag >; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/tag_of.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/tag_of.hpp new file mode 100644 index 0000000000..cba060672b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/tag_of.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_TAG_OF_09232005_0845) +#define FUSION_TAG_OF_09232005_0845 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + template + class array; // forward + + namespace tuples + { + struct null_type; + + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > + class tuple; + + template + struct cons; + } +} + +namespace boost { namespace fusion +{ + struct non_fusion_tag; + struct mpl_sequence_tag; + + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag) + } + + namespace traits + { + template + struct tag_of + : mpl::if_< fusion::detail::is_mpl_sequence, + mpl::identity, + mpl::identity >::type + {}; + + template + struct tag_of >::type> + { + typedef typename Sequence::fusion_tag type; + }; + } + + namespace detail + { + template + struct tag_of + : traits::tag_of::type> + {}; + } +}} +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/tag_of_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/tag_of_fwd.hpp new file mode 100644 index 0000000000..e6c883d5dc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/tag_of_fwd.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_TAG_OF_FWD_31122005_1445) +#define BOOST_FUSION_TAG_OF_FWD_31122005_1445 + +namespace boost { namespace fusion +{ + namespace traits + { + template + struct tag_of; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/unused.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/unused.hpp new file mode 100644 index 0000000000..c62b738a34 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/unused.hpp @@ -0,0 +1,85 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_SUPPORT_UNUSED_20070305_1038) +#define BOOST_FUSION_SUPPORT_UNUSED_20070305_1038 + +#include +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4522) // multiple assignment operators specified warning +#endif + +#define BOOST_FUSION_UNUSED_HAS_IO + +namespace boost { namespace fusion +{ + struct unused_type + { + unused_type() + { + } + + template + unused_type(T const&) + { + } + + template + unused_type const& + operator=(T const&) const + { + return *this; + } + + template + unused_type& + operator=(T const&) + { + return *this; + } + + unused_type const& + operator=(unused_type const&) const + { + return *this; + } + + unused_type& + operator=(unused_type const&) + { + return *this; + } + }; + + unused_type const unused = unused_type(); + + namespace detail + { + struct unused_only + { + unused_only(unused_type const&) {} + }; + } + + template + inline Out& operator<<(Out& out, detail::unused_only const&) + { + return out; + } + + template + inline In& operator>>(In& in, unused_type&) + { + return in; + } +}} + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/void.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/void.hpp new file mode 100644 index 0000000000..7dd11e5c74 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/support/void.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_SUPPORT_VOID_20070706_2125) +#define BOOST_FUSION_SUPPORT_VOID_20070706_2125 + +namespace boost { namespace fusion +{ + struct void_ {}; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple.hpp new file mode 100644 index 0000000000..affceccad0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_TUPLE_10032005_0806) +#define FUSION_TUPLE_10032005_0806 + +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/detail/tuple_expand.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/detail/tuple_expand.hpp new file mode 100644 index 0000000000..806515f92d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/detail/tuple_expand.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_TUPLE_EXPAND_10032005_0815) +#define FUSION_TUPLE_EXPAND_10032005_0815 + +#include +#include +#include + +#define BOOST_PP_FILENAME_1 \ + +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + +#if N == 1 + explicit +#endif + tuple(BOOST_PP_ENUM_BINARY_PARAMS( + N, typename detail::call_param::type _)) + : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} + + template + tuple(tuple const& rhs) + : base_type(rhs) {} + + template + tuple& operator=(tuple const& rhs) + { + base_type::operator=(rhs); + return *this; + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/make_tuple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/make_tuple.hpp new file mode 100644 index 0000000000..32fd912eec --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/make_tuple.hpp @@ -0,0 +1,56 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_TUPLE_10032005_0843) +#define FUSION_MAKE_TUPLE_10032005_0843 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + inline tuple<> + make_tuple() + { + return tuple<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template + inline tuple + make_tuple(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return tuple( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple.hpp new file mode 100644 index 0000000000..a97cadeb03 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple.hpp @@ -0,0 +1,88 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_TUPLE_10032005_0810) +#define FUSION_TUPLE_10032005_0810 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + template + struct tuple : vector + { + typedef vector< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> + base_type; + + tuple() + : base_type() {} + + tuple(tuple const& rhs) + : base_type(rhs) {} + + template + tuple(std::pair const& rhs) + : base_type(rhs) {} + + #include + + template + tuple& operator=(T const& rhs) + { + base_type::operator=(rhs); + return *this; + } + + tuple& operator=(tuple const& rhs) + { + base_type::operator=(rhs); + return *this; + } + + template + tuple& operator=(std::pair const& rhs) + { + base_type::operator=(rhs); + return *this; + } + }; + + template + struct tuple_size : result_of::size {}; + + template + struct tuple_element : result_of::value_at_c {}; + + template + inline typename + lazy_disable_if< + is_const + , result_of::at_c + >::type + get(Tuple& tup) + { + return at_c(tup); + } + + template + inline typename result_of::at_c::type + get(Tuple const& tup) + { + return at_c(tup); + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple_fwd.hpp new file mode 100644 index 0000000000..1a127cab10 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple_fwd.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2005 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_TUPLE_FORWARD_10032005_0956) +#define FUSION_TUPLE_FORWARD_10032005_0956 + +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + > + struct tuple; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple_tie.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple_tie.hpp new file mode 100644 index 0000000000..b6c21eff5b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/tuple/tuple_tie.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_TUPLE_TIE_10032005_0846) +#define FUSION_TUPLE_TIE_10032005_0846 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ +#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_REF + +}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template + inline tuple + tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) + { + return tuple( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view.hpp new file mode 100644 index 0000000000..f1d837cf86 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_VIEW_10022005_0620) +#define FUSION_SEQUENCE_VIEW_10022005_0620 + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/detail/strictest_traversal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/detail/strictest_traversal.hpp new file mode 100644 index 0000000000..0ba5d8a1a7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/detail/strictest_traversal.hpp @@ -0,0 +1,68 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_STRICTEST_TRAVERSAL_20060123_2101) +#define FUSION_STRICTEST_TRAVERSAL_20060123_2101 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct forward_traversal_tag; + struct bidirectional_traversal_tag; + struct random_access_traversal_tag; + + namespace detail + { + template::value> + struct stricter_traversal + { + typedef Tag1 type; + }; + + template + struct stricter_traversal + { + typedef Tag2 type; + }; + + struct strictest_traversal_impl + { + template + struct result; + + template + struct result + { + typedef typename remove_reference::type next_value; + typedef typename remove_reference::type strictest_so_far; + + typedef strictest_so_far tag1; + typedef typename traits::category_of::type tag2; + + typedef typename stricter_traversal::type type; + }; + }; + + template + struct strictest_traversal + : result_of::fold< + Sequence, fusion::random_access_traversal_tag, + strictest_traversal_impl> + {}; + + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/multiple_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/multiple_view.hpp new file mode 100644 index 0000000000..e34b1d6285 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/multiple_view.hpp @@ -0,0 +1,178 @@ +/*============================================================================= + Copyright (c) 2001-2006 Eric Niebler + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef FUSION_MULTIPLE_VIEW_05052005_0335 +#define FUSION_MULTIPLE_VIEW_05052005_0335 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct multiple_view_tag; + struct forward_traversal_tag; + struct fusion_sequence_tag; + + template + struct multiple_view + : sequence_base > + { + typedef multiple_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef forward_traversal_tag category; + typedef mpl::true_ is_view; + typedef mpl::int_ size; + typedef T value_type; + + multiple_view() + : val() + {} + + explicit multiple_view(typename detail::call_param::type val) + : val(val) + {} + + value_type val; + }; + + template + inline multiple_view::type> + make_multiple_view(T const& v) + { + return multiple_view::type>(v); + } + + struct multiple_view_iterator_tag; + struct forward_traversal_tag; + + template + struct multiple_view_iterator + : iterator_base > + { + typedef multiple_view_iterator_tag fusion_tag; + typedef forward_traversal_tag category; + typedef typename MultipleView::value_type value_type; + typedef MultipleView multiple_view_type; + typedef Index index; + + explicit multiple_view_iterator(multiple_view_type const &view_) + : view(view_) + {} + + multiple_view_type view; + }; + + namespace extension + { + template + struct next_impl; + + template <> + struct next_impl + { + template + struct apply + { + typedef multiple_view_iterator< + typename mpl::next::type + , typename Iterator::multiple_view_type + > type; + + static type + call(Iterator const &where) + { + return type(where.view); + } + }; + }; + + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef multiple_view_iterator< + typename Sequence::size + , Sequence + > type; + + static type + call(Sequence &seq) + { + return type(seq); + } + }; + }; + + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename Iterator::value_type type; + + static type + call(Iterator const& i) + { + return i.view.val; + } + }; + }; + + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef multiple_view_iterator< + mpl::int_<0> + , Sequence + > type; + + static type + call(Sequence &seq) + { + return type(seq); + } + }; + }; + + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename Iterator::multiple_view_type multiple_view_type; + typedef typename multiple_view_type::value_type type; + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/segmented_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/segmented_iterator.hpp new file mode 100644 index 0000000000..79bc707e4d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/segmented_iterator.hpp @@ -0,0 +1,448 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef FUSION_SEGMENTED_ITERATOR_EAN_05032006_1027 +#define FUSION_SEGMENTED_ITERATOR_EAN_05032006_1027 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for nil +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct fusion_sequence_tag; + + namespace detail + { + using mpl::_; + using mpl::not_; + + //////////////////////////////////////////////////////////////////////////// + template + struct is_empty + : result_of::equal_to< + typename result_of::begin::type + , typename result_of::end::type + > + {}; + + template + struct is_empty + : is_empty + {}; + + //////////////////////////////////////////////////////////////////////////// + struct not_is_empty_pred + { + template + struct apply + : not_ > + {}; + }; + + struct segmented_range_tag; + + //////////////////////////////////////////////////////////////////////////// + template + struct segmented_range + : sequence_base > + { + BOOST_MPL_ASSERT_NOT((is_reference)); + typedef mpl::bool_ is_segmented; + typedef segmented_range_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + + // If this is a range of segments, skip over the empty ones + typedef typename mpl::if_< + is_segmented + , filter_view + , Sequence + >::type sequence_non_ref_type; + + typedef typename mpl::if_< + traits::is_view + , sequence_non_ref_type + , sequence_non_ref_type & + >::type sequence_type; + + typedef + typename fusion::result_of::advance< + typename fusion::result_of::begin::type + , Index + >::type + iterator_type; + + typedef typename traits::category_of::type category; + + explicit segmented_range(Sequence &sequence_) + : sequence(sequence_type(sequence_)) + {} + + segmented_range(sequence_type sequence_, int) + : sequence(sequence_) + {} + + iterator_type where_() const + { + return fusion::advance( + fusion::begin(const_cast(this->sequence)) + ); + } + + sequence_type sequence; + + private: + segmented_range &operator =(segmented_range const &); + }; + } + + namespace extension + { + template<> + struct is_segmented_impl + { + template + struct apply + : Sequence::is_segmented + {}; + }; + + template<> + struct size_impl + { + template + struct apply + : mpl::int_< + result_of::distance< + typename Sequence::iterator_type + , typename result_of::end::type + >::value + > + {}; + }; + + template<> + struct segments_impl + { + template + struct apply + { + typedef Sequence &type; + static type call(Sequence &seq) + { + return seq; + } + }; + }; + + template<> + struct begin_impl + { + template + struct apply + { + typedef typename Sequence::iterator_type type; + static type call(Sequence &seq) + { + return seq.where_(); + } + }; + }; + + template<> + struct end_impl + { + template + struct apply + { + typedef typename Sequence::sequence_non_ref_type sequence; + typedef typename result_of::end::type type; + + static type call(Sequence &seq) + { + return fusion::end(seq.sequence); + } + }; + }; + } + + namespace detail + { + /////////////////////////////////////////////////////////////////////// + template + struct range_next; + + template + struct range_next > + { + typedef typename mpl::next::type index_type; + typedef segmented_range type; + + static type call(segmented_range const &rng) + { + return type(rng.sequence, 0); + } + }; + + /////////////////////////////////////////////////////////////////////// + template + struct is_range_next_empty + : is_empty::type> + {}; + + template<> + struct is_range_next_empty + : mpl::true_ + {}; + + /////////////////////////////////////////////////////////////////////// + template::value> + struct as_segmented_range + { + typedef typename result_of::segments::type segments; + typedef typename remove_reference::type sequence; + typedef segmented_range, true> type; + + static type call(Sequence &seq) + { + segments segs(fusion::segments(seq)); + return type(segs); + } + }; + + template + struct as_segmented_range + { + typedef typename remove_reference::type sequence; + typedef segmented_range, false> type; + + static type call(Sequence &seq) + { + return type(seq); + } + }; + + template + struct as_segmented_range, IsSegmented> + { + typedef segmented_range type; + static type &call(type &seq) + { + return seq; + } + }; + + /////////////////////////////////////////////////////////////////////// + template< + typename Sequence + , typename State = nil + , bool IsSegmented = traits::is_segmented::value + > + struct push_segments + { + typedef typename as_segmented_range::type range; + typedef typename result_of::begin::type begin; + typedef typename result_of::deref::type next_ref; + typedef typename remove_reference::type next; + typedef push_segments > push; + typedef typename push::type type; + + static type call(Sequence &seq, State const &state) + { + range rng(as_segmented_range::call(seq)); + next_ref nxt(*fusion::begin(rng)); + return push::call(nxt, fusion::make_cons(rng, state)); + } + }; + + template + struct push_segments + { + typedef typename as_segmented_range::type range; + typedef cons type; + + static type call(Sequence &seq, State const &state) + { + range rng(as_segmented_range::call(seq)); + return fusion::make_cons(rng, state); + } + }; + + /////////////////////////////////////////////////////////////////////// + template::value> + struct pop_segments + { + typedef range_next next; + typedef push_segments push; + typedef typename push::type type; + + static type call(State const &state) + { + typename next::type rng(next::call(state.car)); + return push::call(rng, state.cdr); + } + }; + + template + struct pop_segments + { + typedef pop_segments pop; + typedef typename pop::type type; + + static type call(State const &state) + { + return pop::call(state.cdr); + } + }; + + template<> + struct pop_segments + { + typedef nil type; + + static type call(nil const &) + { + return nil(); + } + }; + } // namespace detail + + struct segmented_iterator_tag; + + //////////////////////////////////////////////////////////////////////////// + template + struct segmented_iterator + : fusion::iterator_base > + { + typedef segmented_iterator_tag fusion_tag; + typedef fusion::forward_traversal_tag category; + + typedef Cons cons_type; + typedef typename Cons::car_type car_type; + typedef typename Cons::cdr_type cdr_type; + + explicit segmented_iterator(Cons const &c) + : cons_(c) + {} + + cons_type const &cons() const { return this->cons_; }; + car_type const &car() const { return this->cons_.car; }; + cdr_type const &cdr() const { return this->cons_.cdr; }; + + private: + Cons cons_; + }; + + /////////////////////////////////////////////////////////////////////////// + template + struct segmented_begin + { + typedef typename detail::push_segments push; + typedef segmented_iterator type; + + static type call(Sequence &seq) + { + return type(push::call(seq, nil())); + } + }; + + /////////////////////////////////////////////////////////////////////////// + template + struct segmented_end + { + typedef segmented_iterator type; + + static type call(Sequence &) + { + return type(nil()); + } + }; + + namespace extension + { + template<> + struct value_of_impl + { + template + struct apply + { + typedef typename result_of::begin::type begin; + typedef typename result_of::value_of::type type; + }; + }; + + template<> + struct deref_impl + { + template + struct apply + { + typedef typename result_of::begin::type begin; + typedef typename result_of::deref::type type; + + static type call(Iterator const &it) + { + return *fusion::begin(it.car()); + } + }; + }; + + // discards the old head, expands the right child of the new head + // and pushes the result to the head of the list. + + template<> + struct next_impl + { + template< + typename Iterator + , bool IsSegmentDone = detail::is_range_next_empty::value + > + struct apply + { + typedef typename Iterator::cdr_type cdr_type; + typedef detail::range_next next; + typedef segmented_iterator > type; + + static type call(Iterator const &it) + { + return type(fusion::make_cons(next::call(it.car()), it.cdr())); + } + }; + + template + struct apply // segment done, move to next segment + { + typedef typename Iterator::cdr_type cdr_type; + typedef typename detail::pop_segments pop; + typedef segmented_iterator type; + + static type call(Iterator const &it) + { + return type(pop::call(it.cdr())); + } + }; + }; + } +}} // namespace boost::fusion + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/segmented_iterator_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/segmented_iterator_range.hpp new file mode 100644 index 0000000000..803e642ba0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/ext_/segmented_iterator_range.hpp @@ -0,0 +1,537 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef FUSION_SEGMENTED_ITERATOR_RANGE_EAN_05032006_1027 +#define FUSION_SEGMENTED_ITERATOR_RANGE_EAN_05032006_1027 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace detail + { + //////////////////////////////////////////////////////////////////////////// + template + struct reverse_cons; + + template + struct reverse_cons, State> + { + typedef reverse_cons > reverse; + typedef typename reverse::type type; + + static type call(cons const &cons, State const &state = State()) + { + return reverse::call(cons.cdr, fusion::make_cons(cons.car, state)); + } + }; + + template + struct reverse_cons + { + typedef State type; + + static State const &call(nil const &, State const &state = State()) + { + return state; + } + }; + + //////////////////////////////////////////////////////////////////////////// + // tags + struct full_view {}; + struct left_view {}; + struct right_view {}; + struct center_view {}; + + template + struct segmented_view_tag; + + //////////////////////////////////////////////////////////////////////////// + // a segmented view of that includes all elements either to the + // right or the left of a segmented iterator. + template + struct segmented_view + : sequence_base > + { + typedef segmented_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + typedef forward_traversal_tag category; + + explicit segmented_view(Cons1 const &cons) + : cons(cons) + {} + + typedef Cons1 cons_type; + cons_type const &cons; + }; + + // a segmented view that contains all the elements in between + // two segmented iterators + template + struct segmented_view + : sequence_base > + { + typedef segmented_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + typedef forward_traversal_tag category; + + segmented_view(Cons1 const &lcons, Cons2 const &rcons) + : left_cons(lcons) + , right_cons(rcons) + {} + + typedef Cons1 left_cons_type; + typedef Cons2 right_cons_type; + + left_cons_type const &left_cons; + right_cons_type const &right_cons; + }; + + //////////////////////////////////////////////////////////////////////////// + // Used to transform a sequence of segments. The first segment is + // bounded by RightCons, and the last segment is bounded by LeftCons + // and all the others are passed through unchanged. + template + struct segments_transform + { + explicit segments_transform(RightCons const &cons_) + : right_cons(cons_) + , left_cons(cons_) + {} + + segments_transform(RightCons const &right_cons_, LeftCons const &left_cons_) + : right_cons(right_cons_) + , left_cons(left_cons_) + {} + + template + struct result_; + + template + struct result_ + { + typedef segmented_view type; + }; + + template + struct result_ + { + typedef segmented_view type; + }; + + template + struct result_ + { + typedef Second type; + }; + + template + struct result; + + template + struct result + : result_< + typename remove_cv::type>::type + , typename remove_cv::type>::type + > + {}; + + template + segmented_view operator ()(right_view, Second &second) const + { + return segmented_view(this->right_cons); + } + + template + segmented_view operator ()(left_view, Second &second) const + { + return segmented_view(this->left_cons); + } + + template + Second &operator ()(full_view, Second &second) const + { + return second; + } + + private: + RightCons const &right_cons; + LeftCons const &left_cons; + }; + + } // namespace detail + + namespace extension + { + //////////////////////////////////////////////////////////////////////////// + template + struct is_segmented_impl > + { + template + struct apply + : mpl::true_ + {}; + }; + + //////////////////////////////////////////////////////////////////////////// + template<> + struct segments_impl > + { + template< + typename Sequence + , typename Cdr = typename Sequence::cons_type::cdr_type + > + struct apply + { + typedef typename Sequence::cons_type::car_type segmented_range; + typedef typename result_of::size::type size; + typedef typename mpl::prior::type size_minus_1; + typedef detail::segments_transform tfx; + typedef joint_view< + single_view const + , multiple_view const + > mask; + typedef transform_view type; + + static type call(Sequence &seq) + { + return type( + mask( + make_single_view(detail::right_view()) + , make_multiple_view(detail::full_view()) + ) + , seq.cons.car + , tfx(seq.cons.cdr) + ); + } + }; + + template + struct apply + { + typedef typename Sequence::cons_type::car_type segmented_range; + typedef typename segmented_range::iterator_type begin; + typedef typename segmented_range::sequence_non_ref_type sequence_type; + typedef typename result_of::end::type end; + typedef iterator_range range; + typedef single_view type; + + static type call(Sequence &seq) + { + return type(range(seq.cons.car.where_, fusion::end(seq.cons.car.sequence))); + } + }; + }; + + //////////////////////////////////////////////////////////////////////////// + template<> + struct segments_impl > + { + template< + typename Sequence + , typename Cdr = typename Sequence::cons_type::cdr_type + > + struct apply + { + typedef typename Sequence::cons_type::car_type right_segmented_range; + typedef typename right_segmented_range::sequence_type sequence_type; + typedef typename right_segmented_range::iterator_type iterator_type; + + typedef iterator_range< + typename result_of::begin::type + , typename result_of::next::type + > segmented_range; + + typedef detail::segments_transform tfx; + typedef typename result_of::size::type size; + typedef typename mpl::prior::type size_minus_1; + typedef joint_view< + multiple_view const + , single_view const + > mask; + typedef transform_view type; + + static type call(Sequence &seq) + { + return type( + mask( + make_multiple_view(detail::full_view()) + , make_single_view(detail::left_view()) + ) + , segmented_range(fusion::begin(seq.cons.car.sequence), fusion::next(seq.cons.car.where_)) + , tfx(seq.cons.cdr) + ); + } + }; + + template + struct apply + { + typedef typename Sequence::cons_type::car_type segmented_range; + typedef typename segmented_range::sequence_non_ref_type sequence_type; + typedef typename result_of::begin::type begin; + typedef typename segmented_range::iterator_type end; + typedef iterator_range range; + typedef single_view type; + + static type call(Sequence &seq) + { + return type(range(fusion::begin(seq.cons.car.sequence), seq.cons.car.where_)); + } + }; + }; + + //////////////////////////////////////////////////////////////////////////// + template<> + struct segments_impl > + { + template + struct apply + { + typedef typename Sequence::right_cons_type right_cons_type; + typedef typename Sequence::left_cons_type left_cons_type; + typedef typename right_cons_type::car_type right_segmented_range; + typedef typename left_cons_type::car_type left_segmented_range; + + typedef iterator_range< + typename result_of::begin::type + , typename result_of::next::type>::type + > segmented_range; + + typedef typename mpl::minus< + typename result_of::size::type + , mpl::int_<2> + >::type size_minus_2; + + BOOST_MPL_ASSERT_RELATION(0, <=, size_minus_2::value); + + typedef detail::segments_transform< + typename left_cons_type::cdr_type + , typename right_cons_type::cdr_type + > tfx; + + typedef joint_view< + multiple_view const + , single_view const + > left_mask; + + typedef joint_view< + single_view const + , left_mask const + > mask; + + typedef transform_view type; + + static type call(Sequence &seq) + { + left_mask lmask( + make_multiple_view(detail::full_view()) + , make_single_view(detail::left_view()) + ); + return type( + mask(make_single_view(detail::right_view()), lmask) + , segmented_range(fusion::begin(seq.left_cons.car), fusion::next(fusion::begin(seq.right_cons.car))) + , tfx(seq.left_cons.cdr, seq.right_cons.cdr) + ); + } + }; + }; + } + + // specialize iterator_range for use with segmented iterators, so that + // it presents a segmented view of the range. + template + struct iterator_range; + + template + struct iterator_range, segmented_iterator > + : sequence_base, segmented_iterator > > + { + typedef typename convert_iterator >::type begin_type; + typedef typename convert_iterator >::type end_type; + typedef typename detail::reverse_cons::type begin_cons_type; + typedef typename detail::reverse_cons::type end_cons_type; + typedef iterator_range_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef typename traits::category_of::type category; + typedef typename result_of::distance::type size; + typedef mpl::true_ is_view; + + iterator_range(segmented_iterator const& first_, segmented_iterator const& last_) + : first(convert_iterator >::call(first_)) + , last(convert_iterator >::call(last_)) + , first_cons(detail::reverse_cons::call(first_.cons())) + , last_cons(detail::reverse_cons::call(last_.cons())) + {} + + begin_type first; + end_type last; + + begin_cons_type first_cons; + end_cons_type last_cons; + }; + + namespace detail + { + + template + struct same_segment + : mpl::false_ + {}; + + template + struct same_segment, cons > + : mpl::and_< + traits::is_segmented + , is_same + > + {}; + + //////////////////////////////////////////////////////////////////////////// + template + struct segments_gen; + + //////////////////////////////////////////////////////////////////////////// + template + struct segments_gen2 + { + typedef segments_gen gen; + typedef typename gen::type type; + + static type call(Cons1 const &cons1, Cons2 const &cons2) + { + return gen::call(cons1.cdr, cons2.cdr); + } + }; + + template + struct segments_gen2 + { + typedef segmented_view view; + typedef typename result_of::segments::type type; + + static type call(Cons1 const &cons1, Cons2 const &cons2) + { + view v(cons1, cons2); + return fusion::segments(v); + } + }; + + template + struct segments_gen2, cons, false> + { + typedef iterator_range< + typename Car1::iterator_type + , typename Car2::iterator_type + > range; + + typedef single_view type; + + static type call(cons const &cons1, cons const &cons2) + { + return type(range(cons1.car.where_, cons2.car.where_)); + } + }; + + //////////////////////////////////////////////////////////////////////////// + template + struct segments_gen + : segments_gen2::value> + {}; + + template + struct segments_gen, nil> + { + typedef segmented_view > view; + typedef typename result_of::segments::type type; + + static type call(cons const &cons, nil const &) + { + view v(cons); + return fusion::segments(v); + } + }; + + template<> + struct segments_gen + { + typedef nil type; + + static type call(nil const &, nil const &) + { + return nil(); + } + }; + } // namespace detail + + namespace extension + { + template + struct is_segmented_impl; + + // An iterator_range of segmented_iterators is segmented + template<> + struct is_segmented_impl + { + template + struct is_segmented_iterator : mpl::false_ {}; + + template + struct is_segmented_iterator > : mpl::true_ {}; + + template + struct apply + : mpl::and_< + is_segmented_iterator + , is_segmented_iterator + > + {}; + }; + + template + struct segments_impl; + + template<> + struct segments_impl + { + template + struct apply + { + typedef typename Sequence::begin_cons_type begin_cons; + typedef typename Sequence::end_cons_type end_cons; + + typedef detail::segments_gen gen; + typedef typename gen::type type; + + static type call(Sequence &sequence) + { + return gen::call(sequence.first_cons, sequence.last_cons); + } + }; + }; + } + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view.hpp new file mode 100644 index 0000000000..c649407f0b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_VIEW_FILTER_VIEW_10022005_0608) +#define FUSION_SEQUENCE_VIEW_FILTER_VIEW_10022005_0608 + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/begin_impl.hpp new file mode 100644 index 0000000000..7d94261de1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/begin_impl.hpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_05062005_0903) +#define FUSION_BEGIN_IMPL_05062005_0903 + +namespace boost { namespace fusion +{ + struct filter_view_tag; + + template + struct filter_iterator; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef typename Sequence::first_type first_type; + typedef typename Sequence::last_type last_type; + typedef typename Sequence::pred_type pred_type; + typedef typename Sequence::category category; + typedef filter_iterator type; + + static type + call(Sequence& s) + { + return type(s.first()); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp new file mode 100644 index 0000000000..bf721b5a5a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_DEREF_DATA_IMPL_HPP +#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_DEREF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_data_impl; + + template <> + struct deref_data_impl + { + template + struct apply + { + typedef typename + result_of::deref_data::type + type; + + static type + call(It const& it) + { + return fusion::deref_data(it.first); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/deref_impl.hpp new file mode 100644 index 0000000000..3e6447c530 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/deref_impl.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_05062005_0905) +#define FUSION_DEREF_IMPL_05062005_0905 + +#include + +namespace boost { namespace fusion +{ + struct filter_view_iterator_tag; + + namespace extension + { + template + struct deref_impl; + + template <> + struct deref_impl + : detail::adapt_deref_traits {}; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/end_impl.hpp new file mode 100644 index 0000000000..baabbd451c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/end_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_05062005_0906) +#define FUSION_END_IMPL_05062005_0906 + +namespace boost { namespace fusion +{ + struct filter_view_tag; + + template + struct filter_iterator; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef typename Sequence::last_type last_type; + typedef typename Sequence::pred_type pred_type; + typedef typename Sequence::category category; + typedef filter_iterator type; + + static type + call(Sequence& s) + { + return type(s.last()); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/equal_to_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/equal_to_impl.hpp new file mode 100644 index 0000000000..5d7b2932bf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/equal_to_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_EQUAL_TO_IMPL_02012005_2133) +#define BOOST_FUSION_EQUAL_TO_IMPL_02012005_2133 + +namespace boost { namespace fusion +{ + struct filter_view_iterator_tag; + + namespace extension + { + template + struct equal_to; + + template + struct equal_to_impl; + + template<> + struct equal_to_impl + { + template + struct apply + : result_of::equal_to + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp new file mode 100644 index 0000000000..09d9112b1f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_KEY_OF_IMPL_HPP +#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_KEY_OF_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct key_of_impl; + + template <> + struct key_of_impl + { + template + struct apply + : result_of::key_of + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/next_impl.hpp new file mode 100644 index 0000000000..a436bfc260 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/next_impl.hpp @@ -0,0 +1,77 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_06052005_0900) +#define FUSION_NEXT_IMPL_06052005_0900 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct filter_view_iterator_tag; + + template + struct filter_iterator; + + namespace extension + { + template + struct next_impl; + + template <> + struct next_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename Iterator::last_type last_type; + typedef typename Iterator::pred_type pred_type; + typedef typename Iterator::category category; + + typedef typename + mpl::eval_if< + result_of::equal_to + , mpl::identity + , result_of::next + >::type + next_type; + + typedef typename + detail::static_find_if< + next_type + , last_type + , mpl::bind1< + typename mpl::lambda::type + , mpl::bind1,mpl::_1> + > + > + filter; + + typedef filter_iterator< + category, typename filter::type, last_type, pred_type> + type; + + static type + call(Iterator const& i) + { + return type(filter::call(i.first)); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/size_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/size_impl.hpp new file mode 100644 index 0000000000..1c5a0acae0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/size_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SIZE_IMPL_09232005_1058) +#define FUSION_SIZE_IMPL_09232005_1058 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct filter_view_tag; + + namespace extension + { + template + struct size_impl; + + template <> + struct size_impl + { + template + struct apply + : result_of::distance< + typename result_of::begin::type + , typename result_of::end::type> + {}; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp new file mode 100644 index 0000000000..38d1bdc063 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP +#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_data_impl; + + template <> + struct value_of_data_impl + { + template + struct apply + : result_of::value_of_data + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/value_of_impl.hpp new file mode 100644 index 0000000000..f9188f6f80 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/detail/value_of_impl.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_OF_IMPL_05062005_0857) +#define FUSION_VALUE_OF_IMPL_05062005_0857 + +#include + +namespace boost { namespace fusion +{ + struct filter_view_iterator_tag; + + namespace extension + { + template + struct value_of_impl; + + template <> + struct value_of_impl + : detail::adapt_value_traits {}; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/filter_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/filter_view.hpp new file mode 100644 index 0000000000..76ce031a2a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/filter_view.hpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_FILTER_VIEW_HPP) +#define FUSION_SEQUENCE_FILTER_VIEW_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct filter_view_tag; + struct forward_traversal_tag; + struct fusion_sequence_tag; + + template + struct filter_view : sequence_base > + { + typedef filter_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef typename + mpl::eval_if< + traits::is_associative + , mpl::inherit2 + , mpl::identity + >::type + category; + typedef mpl::true_ is_view; + + typedef typename result_of::begin::type first_type; + typedef typename result_of::end::type last_type; + typedef Pred pred_type; + + filter_view(Sequence& in_seq) + : seq(in_seq) + {} + + first_type first() const { return fusion::begin(seq); } + last_type last() const { return fusion::end(seq); } + typename mpl::if_, Sequence, Sequence&>::type seq; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + filter_view& operator= (filter_view const&); + }; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/filter_view_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/filter_view_iterator.hpp new file mode 100644 index 0000000000..8ce63cbdd9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/filter_view/filter_view_iterator.hpp @@ -0,0 +1,70 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_FILTER_VIEW_ITERATOR_05062005_0849) +#define FUSION_FILTER_VIEW_ITERATOR_05062005_0849 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct filter_view_iterator_tag; + struct forward_traversal_tag; + + template + struct filter_iterator : iterator_base > + { + typedef convert_iterator first_converter; + typedef typename first_converter::type first_iter; + typedef convert_iterator last_converter; + typedef typename last_converter::type last_iter; + + typedef filter_view_iterator_tag fusion_tag; + typedef Category category; + typedef + detail::static_find_if< + first_iter + , last_iter + , mpl::bind1< + typename mpl::lambda::type + , mpl::bind1,mpl::_1> + > + > + filter; + typedef typename filter::type first_type; + typedef last_iter last_type; + typedef Pred pred_type; + + filter_iterator(First const& in_first) + : first(filter::call(first_converter::call(in_first))) {} + + first_type first; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + filter_iterator& operator= (filter_iterator const&); + }; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range.hpp new file mode 100644 index 0000000000..f8d302217d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_VIEW_ITERATOR_RANGE_10022005_0610) +#define FUSION_SEQUENCE_VIEW_ITERATOR_RANGE_10022005_0610 + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/at_impl.hpp new file mode 100644 index 0000000000..5f882aaa51 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/at_impl.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_ITERATOR_RANGE_AT_IMPL_HPP_INCLUDED) +#define BOOST_FUSION_ITERATOR_RANGE_AT_IMPL_HPP_INCLUDED + +#include +#include + +namespace boost { namespace fusion +{ + struct iterator_range_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef typename Seq::begin_type begin_type; + typedef typename result_of::advance::type pos; + typedef typename result_of::deref::type type; + + static type + call(Seq& s) + { + return * advance(s.first); + } + }; + }; + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/begin_impl.hpp new file mode 100644 index 0000000000..32341369b3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/begin_impl.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_05062005_1226) +#define FUSION_BEGIN_IMPL_05062005_1226 + +namespace boost { namespace fusion +{ + struct iterator_range_tag; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef typename Sequence::begin_type type; + + static type + call(Sequence& s) + { + return s.first; + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/end_impl.hpp new file mode 100644 index 0000000000..dacbe191df --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/end_impl.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_05062005_1226) +#define FUSION_END_IMPL_05062005_1226 + +namespace boost { namespace fusion +{ + struct iterator_range_tag; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef typename Sequence::end_type type; + + static type + call(Sequence& s) + { + return s.last; + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/value_at_impl.hpp new file mode 100644 index 0000000000..b6fe888179 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/detail/value_at_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_ITERATOR_RANGE_VALUE_AT_IMPL_HPP_INCLUDED) +#define BOOST_FUSION_ITERATOR_RANGE_VALUE_AT_IMPL_HPP_INCLUDED + +#include +#include + +namespace boost { namespace fusion +{ + struct iterator_range_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + { + typedef typename Seq::begin_type begin_type; + typedef typename result_of::advance::type pos; + typedef typename result_of::value_of::type type; + }; + }; + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/iterator_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/iterator_range.hpp new file mode 100644 index 0000000000..4d16ca6c8d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/iterator_range/iterator_range.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ITERATOR_RANGE_05062005_1224) +#define FUSION_ITERATOR_RANGE_05062005_1224 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion +{ + struct iterator_range_tag; + struct fusion_sequence_tag; + + template + struct iterator_range : sequence_base > + { + typedef typename convert_iterator::type begin_type; + typedef typename convert_iterator::type end_type; + typedef iterator_range_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef typename result_of::distance::type size; + typedef mpl::true_ is_view; + + typedef typename traits::category_of::type category; + + iterator_range(First const& in_first, Last const& in_last) + : first(convert_iterator::call(in_first)) + , last(convert_iterator::call(in_last)) {} + + begin_type first; + end_type last; + }; +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view.hpp new file mode 100644 index 0000000000..cd1b857104 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_VIEW_JOINT_VIEW_10022005_0610) +#define FUSION_SEQUENCE_VIEW_JOINT_VIEW_10022005_0610 + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/begin_impl.hpp new file mode 100644 index 0000000000..140d3756d1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/begin_impl.hpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_07162005_0115) +#define FUSION_BEGIN_IMPL_07162005_0115 + +#include +#include + +namespace boost { namespace fusion +{ + struct joint_view_tag; + + template + struct joint_view_iterator; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef typename Sequence::first_type first_type; + typedef typename Sequence::last_type last_type; + typedef typename Sequence::concat_type concat_type; + typedef typename Sequence::category category; + typedef result_of::equal_to equal_to; + + typedef typename + mpl::if_< + equal_to + , concat_type + , joint_view_iterator + >::type + type; + + static type + call(Sequence& s, mpl::true_) + { + return s.concat(); + } + + static type + call(Sequence& s, mpl::false_) + { + return type(s.first(), s.concat()); + } + + static type + call(Sequence& s) + { + return call(s, equal_to()); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp new file mode 100644 index 0000000000..a60a125fa9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_DEREF_DATA_IMPL_HPP +#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_DEREF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_data_impl; + + template <> + struct deref_data_impl + { + template + struct apply + { + typedef typename + result_of::deref_data::type + type; + + static type + call(It const& it) + { + return fusion::deref_data(it.first); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/deref_impl.hpp new file mode 100644 index 0000000000..7eb471849e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/deref_impl.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_07162005_0137) +#define FUSION_DEREF_IMPL_07162005_0137 + +#include + +namespace boost { namespace fusion +{ + struct joint_view_iterator_tag; + + namespace extension + { + template + struct deref_impl; + + template <> + struct deref_impl + : detail::adapt_deref_traits {}; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/end_impl.hpp new file mode 100644 index 0000000000..5bdeb02e5c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/end_impl.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_07162005_0128) +#define FUSION_END_IMPL_07162005_0128 + +#include +#include + +namespace boost { namespace fusion +{ + struct joint_view_tag; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef typename Sequence::concat_last_type type; + + static type + call(Sequence& s) + { + return s.concat_last(); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp new file mode 100644 index 0000000000..e413c3d441 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_KEY_OF_IMPL_HPP +#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_KEY_OF_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct key_of_impl; + + template <> + struct key_of_impl + { + template + struct apply + : result_of::key_of + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/next_impl.hpp new file mode 100644 index 0000000000..2313faa0d8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/next_impl.hpp @@ -0,0 +1,71 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_07162005_0136) +#define FUSION_NEXT_IMPL_07162005_0136 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct joint_view_iterator_tag; + + template + struct joint_view_iterator; + + namespace extension + { + template + struct next_impl; + + template <> + struct next_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename Iterator::last_type last_type; + typedef typename Iterator::concat_type concat_type; + typedef typename Iterator::category category; + typedef typename result_of::next::type next_type; + typedef result_of::equal_to equal_to; + + typedef typename + mpl::if_< + equal_to + , concat_type + , joint_view_iterator + >::type + type; + + static type + call(Iterator const& i, mpl::true_) + { + return i.concat; + } + + static type + call(Iterator const& i, mpl::false_) + { + return type(fusion::next(i.first), i.concat); + } + + static type + call(Iterator const& i) + { + return call(i, equal_to()); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp new file mode 100644 index 0000000000..cc883d7023 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP +#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_data_impl; + + template <> + struct value_of_data_impl + { + template + struct apply + : result_of::value_of_data + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/value_of_impl.hpp new file mode 100644 index 0000000000..53afe1c934 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/detail/value_of_impl.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_IMPL_07162005_0132) +#define FUSION_VALUE_IMPL_07162005_0132 + +#include + +namespace boost { namespace fusion +{ + struct joint_view_iterator_tag; + + namespace extension + { + template + struct value_of_impl; + + template <> + struct value_of_impl + : detail::adapt_value_traits {}; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/joint_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/joint_view.hpp new file mode 100644 index 0000000000..e0d5c0902b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/joint_view.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_JOINT_VIEW_07162005_0140) +#define FUSION_JOINT_VIEW_07162005_0140 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct joint_view_tag; + struct forward_traversal_tag; + struct fusion_sequence_tag; + + template + struct joint_view : sequence_base > + { + typedef joint_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef typename + mpl::eval_if< + mpl::and_< + traits::is_associative + , traits::is_associative + > + , mpl::inherit2 + , mpl::identity + >::type + category; + typedef mpl::true_ is_view; + + typedef typename result_of::begin::type first_type; + typedef typename result_of::end::type last_type; + typedef typename result_of::begin::type concat_type; + typedef typename result_of::end::type concat_last_type; + typedef typename mpl::plus, result_of::size >::type size; + + joint_view(Sequence1& in_seq1, Sequence2& in_seq2) + : seq1(in_seq1) + , seq2(in_seq2) + {} + + first_type first() const { return fusion::begin(seq1); } + concat_type concat() const { return fusion::begin(seq2); } + concat_last_type concat_last() const { return fusion::end(seq2); } + + private: + // silence MSVC warning C4512: assignment operator could not be generated + joint_view& operator= (joint_view const&); + + typename mpl::if_, Sequence1, Sequence1&>::type seq1; + typename mpl::if_, Sequence2, Sequence2&>::type seq2; + }; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/joint_view_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/joint_view_iterator.hpp new file mode 100644 index 0000000000..79b4d11527 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/joint_view/joint_view_iterator.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_JOINT_VIEW_ITERATOR_07162005_0140) +#define FUSION_JOINT_VIEW_ITERATOR_07162005_0140 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct joint_view_iterator_tag; + struct forward_traversal_tag; + + template + struct joint_view_iterator + : iterator_base > + { + typedef convert_iterator first_converter; + typedef convert_iterator last_converter; + typedef convert_iterator concat_converter; + + typedef typename first_converter::type first_type; + typedef typename last_converter::type last_type; + typedef typename concat_converter::type concat_type; + + typedef joint_view_iterator_tag fusion_tag; + typedef Category category; + BOOST_STATIC_ASSERT((!result_of::equal_to::value)); + + joint_view_iterator(First const& in_first, Concat const& in_concat) + : first(first_converter::call(in_first)) + , concat(concat_converter::call(in_concat)) + {} + + first_type first; + concat_type concat; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + joint_view_iterator& operator= (joint_view_iterator const&); + }; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview.hpp new file mode 100644 index 0000000000..92e2f26a57 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NVIEW_SEP_23_2009_1107PM) +#define FUSION_NVIEW_SEP_23_2009_1107PM + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/advance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/advance_impl.hpp new file mode 100644 index 0000000000..391bebd8b0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/advance_impl.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_ADVANCE_IMPL_SEP_24_2009_0212PM) +#define BOOST_FUSION_NVIEW_ADVANCE_IMPL_SEP_24_2009_0212PM + +#include +#include + +namespace boost { namespace fusion +{ + struct nview_iterator_tag; + + template + struct nview_iterator; + + namespace extension + { + template + struct advance_impl; + + template<> + struct advance_impl + { + template + struct apply + { + typedef typename Iterator::first_type::iterator_type iterator_type; + typedef typename Iterator::sequence_type sequence_type; + + typedef nview_iterator::type> type; + + static type + call(Iterator const& i) + { + return type(i.seq); + } + }; + }; + } + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/at_impl.hpp new file mode 100644 index 0000000000..f1f41642ab --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/at_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM) +#define BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM + +#include + +namespace boost { namespace fusion +{ + struct nview_tag; + + namespace extension + { + template + struct at_impl; + + template<> + struct at_impl + { + template + struct apply + { + typedef typename Sequence::sequence_type sequence_type; + typedef typename Sequence::index_type index_type; + + typedef typename result_of::at::type index; + typedef typename result_of::at::type type; + + static type + call(Sequence& seq) + { + return fusion::at(seq.seq); + } + }; + }; + } + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/begin_impl.hpp new file mode 100644 index 0000000000..8ba59fc5d8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/begin_impl.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_BEGIN_IMPL_SEP_23_2009_1036PM) +#define BOOST_FUSION_NVIEW_BEGIN_IMPL_SEP_23_2009_1036PM + +#include +#include + +namespace boost { namespace fusion +{ + struct nview_tag; + + template + struct nview_iterator; + + namespace extension + { + template + struct begin_impl; + + template<> + struct begin_impl + { + template + struct apply + { + typedef typename Sequence::index_type index_type; + + typedef nview_iterator::type> type; + + static type call(Sequence& s) + { + return type(s); + } + }; + }; + } + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/deref_impl.hpp new file mode 100644 index 0000000000..075f0b0f18 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/deref_impl.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM) +#define BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM + +#include +#include + +namespace boost { namespace fusion +{ + struct nview_iterator_tag; + + namespace extension + { + template + struct deref_impl; + + template<> + struct deref_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename Iterator::sequence_type sequence_type; + + typedef typename result_of::deref::type index; + typedef typename result_of::at< + typename sequence_type::sequence_type, index>::type type; + + static type call(Iterator const& i) + { + return at(i.seq.seq); + } + }; + }; + + } + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/distance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/distance_impl.hpp new file mode 100644 index 0000000000..8b1906f6d2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/distance_impl.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_DISTANCE_IMPL_SEP_23_2009_0328PM) +#define BOOST_FUSION_NVIEW_DISTANCE_IMPL_SEP_23_2009_0328PM + +#include + +namespace boost { namespace fusion +{ + struct nview_iterator_tag; + + namespace extension + { + template + struct distance_impl; + + template<> + struct distance_impl + { + template + struct apply + : result_of::distance + { + typedef typename result_of::distance< + typename First::first_type, typename Last::first_type + >::type type; + + static type + call(First const& /*first*/, Last const& /*last*/) + { + return type(); + } + }; + }; + } + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/end_impl.hpp new file mode 100644 index 0000000000..7897748b7d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/end_impl.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_END_IMPL_SEP_24_2009_0140PM) +#define BOOST_FUSION_NVIEW_END_IMPL_SEP_24_2009_0140PM + +#include +#include + +namespace boost { namespace fusion +{ + struct nview_tag; + + template + struct nview_iterator; + + namespace extension + { + template + struct end_impl; + + // Unary Version + template <> + struct end_impl + { + template + struct apply + { + typedef typename Sequence::index_type index_type; + + typedef nview_iterator::type> type; + + static type call(Sequence& s) + { + return type(s); + } + }; + }; + } + +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/equal_to_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/equal_to_impl.hpp new file mode 100644 index 0000000000..517204b078 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/equal_to_impl.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_ITERATOR_SEP_24_2009_0329PM) +#define BOOST_FUSION_NVIEW_ITERATOR_SEP_24_2009_0329PM + +#include + +namespace boost { namespace fusion +{ + struct nview_iterator_tag; + + namespace extension + { + template + struct equal_to_impl; + + template<> + struct equal_to_impl + { + template + struct apply + : result_of::equal_to + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/next_impl.hpp new file mode 100644 index 0000000000..01cccf2b84 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/next_impl.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM) +#define BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM + +#include + +namespace boost { namespace fusion +{ + struct nview_iterator_tag; + + template + struct nview_iterator; + + namespace extension + { + template + struct next_impl; + + template <> + struct next_impl + { + template + struct apply + { + typedef typename Iterator::first_type::iterator_type first_type; + typedef typename Iterator::sequence_type sequence_type; + + typedef nview_iterator::type> type; + + static type + call(Iterator const& i) + { + return type(i.seq); + } + }; + }; + } + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/nview_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/nview_impl.hpp new file mode 100644 index 0000000000..03aa49f4cf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/nview_impl.hpp @@ -0,0 +1,77 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_PP_IS_ITERATING + +#if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM) +#define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM + +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, FUSION_MAX_VECTOR_SIZE, \ + "boost/fusion/view/nview/detail/nview_impl.hpp")) \ + /**/ + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace fusion { namespace result_of +{ + template + struct as_nview + { + typedef mpl::vector_c< + int, BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, I) + > index_type; + typedef nview type; + }; +}}} + +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Preprocessor vertical repetition code +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + +#if N < FUSION_MAX_VECTOR_SIZE +namespace boost { namespace fusion { namespace result_of +{ + template + struct as_nview + { + typedef mpl::vector_c index_type; + typedef nview type; + }; +}}} +#endif + +namespace boost { namespace fusion +{ + template + inline nview > + as_nview(Sequence& s) + { + typedef mpl::vector_c index_type; + return nview(s); + } + +}} + +#undef N + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/prior_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/prior_impl.hpp new file mode 100644 index 0000000000..079a9ca6c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/prior_impl.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_PRIOR_IMPL_SEP_24_2009_0142PM) +#define BOOST_FUSION_NVIEW_PRIOR_IMPL_SEP_24_2009_0142PM + +#include + +namespace boost { namespace fusion +{ + struct nview_iterator_tag; + + template + struct nview_iterator; + + namespace extension + { + template + struct prior_impl; + + template <> + struct prior_impl + { + template + struct apply + { + typedef typename Iterator::first_type::iterator_type first_type; + typedef typename Iterator::sequence_type sequence_type; + + typedef nview_iterator::type> type; + + static type + call(Iterator const& i) + { + return type(i.seq); + } + }; + }; + } + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/size_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/size_impl.hpp new file mode 100644 index 0000000000..0c83402662 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/size_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NVIEW_SIZE_IMPL_OCT_06_2009_0525PM) +#define FUSION_NVIEW_SIZE_IMPL_OCT_06_2009_0525PM + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct nview_tag; + + namespace extension + { + template + struct size_impl; + + template <> + struct size_impl + { + template + struct apply + : result_of::distance< + typename result_of::begin::type + , typename result_of::end::type> + {}; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/value_at_impl.hpp new file mode 100644 index 0000000000..145bb629bb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/value_at_impl.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_VALUE_AT_IMPL_SEP_24_2009_0234PM) +#define BOOST_FUSION_NVIEW_VALUE_AT_IMPL_SEP_24_2009_0234PM + +#include + +namespace boost { namespace fusion +{ + struct nview_tag; + + namespace extension + { + template + struct value_at_impl; + + template<> + struct value_at_impl + { + template + struct apply + { + typedef typename Sequence::sequence_type sequence_type; + typedef typename Sequence::index_type index_type; + + typedef typename result_of::at::type index; + typedef typename result_of::at::type type; + }; + }; + } + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/value_of_impl.hpp new file mode 100644 index 0000000000..5b0a85ba9a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/detail/value_of_impl.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM) +#define BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM + +#include +#include + +namespace boost { namespace fusion +{ + struct nview_iterator_tag; + + template + struct nview_iterator; + + namespace extension + { + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename Iterator::sequence_type sequence_type; + + typedef typename result_of::deref::type index; + typedef typename result_of::at< + typename sequence_type::sequence_type, index>::type type; + }; + }; + } + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/nview.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/nview.hpp new file mode 100644 index 0000000000..02422e0b86 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/nview.hpp @@ -0,0 +1,109 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_NVIEW_SEP_23_2009_0948PM) +#define BOOST_FUSION_NVIEW_SEP_23_2009_0948PM + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace detail + { + struct addref + { + template + struct result; + + template + struct result : add_reference {}; + + template + typename add_reference::type + operator()(T& x) const + { + return x; + } + }; + + struct addconstref + { + template + struct result; + + template + struct result + : add_reference::type> + {}; + + template + typename add_reference::type>::type + operator()(T& x) const + { + return x; + } + + template + typename add_reference::type>::type + operator()(T const& x) const + { + return x; + } + }; + } + + struct nview_tag; + struct random_access_traversal_tag; + struct fusion_sequence_tag; + + template + struct nview + : sequence_base > + { + typedef nview_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef random_access_traversal_tag category; + + typedef mpl::true_ is_view; + typedef Indicies index_type; + typedef typename mpl::size::type size; + + typedef typename mpl::if_< + is_const, detail::addconstref, detail::addref + >::type transform_type; + typedef transform_view transform_view_type; + typedef typename result_of::as_vector::type + sequence_type; + + explicit nview(Sequence& val) + : seq(sequence_type(transform_view_type(val, transform_type()))) + {} + + sequence_type seq; + }; + +}} + +// define the nview() generator functions +#include + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/nview_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/nview_iterator.hpp new file mode 100644 index 0000000000..3b7ec1f905 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/nview/nview_iterator.hpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_NVIEW_ITERATOR_SEP_23_2009_0948PM) +#define BOOST_FUSION_NVIEW_ITERATOR_SEP_23_2009_0948PM + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct nview_iterator_tag; + struct random_access_traversal_tag; + + template + struct nview_iterator + : iterator_base > + { + typedef nview_iterator_tag fusion_tag; + typedef random_access_traversal_tag category; + + typedef Sequence sequence_type; + typedef mpl_iterator first_type; + + explicit nview_iterator(Sequence& in_seq) + : seq(in_seq) {} + + Sequence& seq; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + nview_iterator& operator= (nview_iterator const&); + }; + +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view.hpp new file mode 100644 index 0000000000..fef1462fa2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_VIEW_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_HPP_INCLUDED + +#include +#include + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/begin_impl.hpp new file mode 100644 index 0000000000..321d7b8d8d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/begin_impl.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_VIEW_BEGIN_IMPL_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_BEGIN_IMPL_HPP_INCLUDED + +#include +#include + +namespace boost { namespace fusion +{ + struct repetitive_view_tag; + + template + struct repetitive_view_iterator; + + namespace extension + { + template + struct begin_impl; + + template<> + struct begin_impl + { + template + struct apply + { + typedef typename View::sequence_type sequence_type; + + typedef repetitive_view_iterator::type > type; + + static type call(View const& v) + { + return type(v.seq); + } + }; + }; + + } + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/deref_impl.hpp new file mode 100644 index 0000000000..2c0caf8022 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/deref_impl.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_VIEW_DEREF_IMPL_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_DEREF_IMPL_HPP_INCLUDED + +#include + +namespace boost { namespace fusion +{ + struct repetitive_view_iterator_tag; + + namespace extension + { + template + struct deref_impl; + + template<> + struct deref_impl + { + template + struct apply + { + typedef typename + result_of::deref::type + type; + + static type call(Iterator const& i) + { + return *i.pos; + } + }; + }; + + } + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/end_impl.hpp new file mode 100644 index 0000000000..52e36da50d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/end_impl.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_VIEW_END_IMPL_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_END_IMPL_HPP_INCLUDED + +#include +#include + +namespace boost { namespace fusion +{ + struct repetitive_view_tag; + + template + struct repetitive_view_iterator; + + namespace extension + { + template + struct end_impl; + + template<> + struct end_impl + { + template + struct apply + { + typedef typename View::sequence_type sequence_type; + + typedef repetitive_view_iterator::type > type; + + static type call(View const& v) + { + return type(v.seq,end(v.seq)); + } + }; + }; + + } + +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/next_impl.hpp new file mode 100644 index 0000000000..b629cb0122 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/next_impl.hpp @@ -0,0 +1,90 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_VIEW_NEXT_IMPL_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_NEXT_IMPL_HPP_INCLUDED + +#include +#include + +namespace boost { namespace fusion +{ + struct repetitive_view_iterator_tag; + + template + struct repetitive_view_iterator; + + namespace extension + { + template + struct next_impl; + + template <> + struct next_impl + { + template::type>::value > + struct apply_nonempty // + { + // advanvce to next position + + typedef repetitive_view_iterator< + typename Iterator::sequence_type, + typename result_of::next::type + > + type; + + static type call(Iterator const& i) + { + return type(i.seq, next(i.pos)); + } + }; + template + struct apply_nonempty + { + // reset to beginning + + typedef repetitive_view_iterator< + typename Iterator::sequence_type, + typename Iterator::first_type + > + type; + + static type call(Iterator const& i) + { + return type(i.seq); + } + }; + + template ::value > + struct apply // + : apply_nonempty + { }; + + template + struct apply + { + // eps^n = eps + + typedef Iterator type; + + static type call(Iterator const& i) + { + return type(i); + } + }; + }; + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/value_of_impl.hpp new file mode 100644 index 0000000000..bf5f2f0615 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/detail/value_of_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_VIEW_VALUE_OF_IMPL_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_VALUE_OF_IMPL_HPP_INCLUDED + +#include + +namespace boost { namespace fusion +{ + struct repetitive_view_iterator_tag; + + namespace extension + { + template + struct value_of_impl; + + template<> + struct value_of_impl + { + template + struct apply + : result_of::value_of + { }; + }; + } +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view.hpp new file mode 100644 index 0000000000..509db859c1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_REPETITIVE_VIEW_VIEW_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_REPETITIVE_VIEW_HPP_INCLUDED + +#include +#include + +#include +#include + +#include +#include + + +namespace boost { namespace fusion +{ + struct repetitive_view_tag; + struct fusion_sequence_tag; + + template struct repetitive_view + : sequence_base< repetitive_view > + { + typedef repetitive_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + + typedef single_pass_traversal_tag category; + + typedef typename boost::remove_reference::type sequence_type; + typedef typename + mpl::if_, Sequence, sequence_type&>::type + stored_seq_type; + + repetitive_view(Sequence& in_seq) + : seq(in_seq) {} + + stored_seq_type seq; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + repetitive_view& operator= (repetitive_view const&); + }; + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view_fwd.hpp new file mode 100644 index 0000000000..24e146c00d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view_fwd.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_VIEW_FWD_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_FWD_HPP_INCLUDED + +namespace boost { namespace fusion +{ + struct repetitive_view_tag; + + template struct repetitive_view; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp new file mode 100644 index 0000000000..4dff006e01 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_FUSION_REPETITIVE_VIEW_ITERATOR_HPP_INCLUDED) +#define BOOST_FUSION_REPETITIVE_VIEW_HPP_ITERATOR_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct repetitive_view_iterator_tag; + + template::type> + struct repetitive_view_iterator + : iterator_base< repetitive_view_iterator > + { + typedef repetitive_view_iterator_tag fusion_tag; + + typedef Sequence sequence_type; + typedef typename convert_iterator::type pos_type; + typedef typename convert_iterator::type>::type first_type; + typedef typename convert_iterator::type>::type end_type; + typedef single_pass_traversal_tag category; + + explicit repetitive_view_iterator(Sequence& in_seq) + : seq(in_seq), pos(begin(in_seq)) {} + + repetitive_view_iterator(Sequence& in_seq, pos_type const& in_pos) + : seq(in_seq), pos(in_pos) {} + + Sequence& seq; + pos_type pos; + + + private: + // silence MSVC warning C4512: assignment operator could not be generated + repetitive_view_iterator& operator= (repetitive_view_iterator const&); + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view.hpp new file mode 100644 index 0000000000..634b398c77 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_VIEW_REVERSE_VIEW_10022005_0612) +#define FUSION_SEQUENCE_VIEW_REVERSE_VIEW_10022005_0612 + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp new file mode 100644 index 0000000000..8785881e50 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ADVANCE_IMPL_14122005_2015) +#define FUSION_ADVANCE_IMPL_14122005_2015 + +#include +#include + +namespace boost { namespace fusion { + + struct reverse_view_iterator_tag; + + template + struct reverse_view_iterator; + + namespace extension + { + template + struct advance_impl; + + template<> + struct advance_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename mpl::negate::type negative_dist; + typedef typename result_of::advance::type advanced_type; + typedef reverse_view_iterator type; + + static type + call(Iterator const& i) + { + return type(boost::fusion::advance(i.first)); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/at_impl.hpp new file mode 100644 index 0000000000..2e842596c4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/at_impl.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP +#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP + +#include +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef mpl::minus, N> real_n; + + typedef typename + result_of::at::type + type; + + static type + call(Seq& seq) + { + return fusion::at(seq.seq); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp new file mode 100644 index 0000000000..b7968f5696 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_07202005_0849) +#define FUSION_BEGIN_IMPL_07202005_0849 + +namespace boost { namespace fusion +{ + struct reverse_view_tag; + + template + struct reverse_view_iterator; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef reverse_view_iterator type; + + static type + call(Sequence const& s) + { + return type(s.last()); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp new file mode 100644 index 0000000000..2f52bdd898 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP +#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct deref_data_impl; + + template <> + struct deref_data_impl + { + template + struct apply + { + typedef typename + result_of::deref_data::type + type; + + static type + call(It const& it) + { + return fusion::deref_data(it.first); + } + }; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp new file mode 100644 index 0000000000..97cb8915af --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_07202005_0851) +#define FUSION_DEREF_IMPL_07202005_0851 + +#include +#include + +namespace boost { namespace fusion +{ + struct reverse_view_iterator_tag; + + namespace extension + { + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename + result_of::deref< + typename result_of::prior< + typename Iterator::first_type + >::type + >::type + type; + + static type + call(Iterator const& i) + { + return *fusion::prior(i.first); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp new file mode 100644 index 0000000000..5edc749942 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DISTANCE_IMPL_14122005_2104) +#define FUSION_DISTANCE_IMPL_14122005_2104 + +#include + +namespace boost { namespace fusion { + + struct reverse_view_iterator_tag; + + template + struct reverse_view_iterator; + + namespace extension + { + template + struct distance_impl; + + template<> + struct distance_impl + { + template + struct apply + { + typedef typename First::first_type first_type; + typedef typename Last::first_type last_type; + typedef typename result_of::distance::type type; + + static type + call(First const& first, Last const& last) + { + return boost::fusion::distance(last.first, first.first); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/end_impl.hpp new file mode 100644 index 0000000000..916e49d066 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/end_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_07202005_0851) +#define FUSION_END_IMPL_07202005_0851 + +namespace boost { namespace fusion +{ + struct reverse_view_tag; + + template + struct reverse_view_iterator; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef reverse_view_iterator type; + + static type + call(Sequence const& s) + { + return type(s.first()); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp new file mode 100644 index 0000000000..3d760fd272 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP +#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct key_of_impl; + + template <> + struct key_of_impl + { + template + struct apply + : result_of::key_of + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/next_impl.hpp new file mode 100644 index 0000000000..c036510ce4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/next_impl.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_07202005_0856) +#define FUSION_NEXT_IMPL_07202005_0856 + +#include +#include + +namespace boost { namespace fusion +{ + struct reverse_view_iterator_tag; + + template + struct reverse_view_iterator; + + namespace extension + { + template <> + struct next_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename prior_impl:: + template apply + wrapped; + + typedef reverse_view_iterator type; + + static type + call(Iterator const& i) + { + return type(wrapped::call(i.first)); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp new file mode 100644 index 0000000000..317054fc5a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PRIOR_IMPL_07202005_0857) +#define FUSION_PRIOR_IMPL_07202005_0857 + +#include +#include + +namespace boost { namespace fusion +{ + struct reverse_view_iterator_tag; + + template + struct reverse_view_iterator; + + namespace extension + { + template <> + struct prior_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename next_impl:: + template apply + wrapped; + + typedef reverse_view_iterator type; + + static type + call(Iterator const& i) + { + return type(wrapped::call(i.first)); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp new file mode 100644 index 0000000000..90f5129bc9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP +#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP + +#include +#include +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + : result_of::value_at< + typename Seq::seq_type + , mpl::minus, N> + > + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp new file mode 100644 index 0000000000..69d310ffb1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP +#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct value_of_data_impl; + + template <> + struct value_of_data_impl + { + template + struct apply + : result_of::value_of_data + {}; + }; +}}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp new file mode 100644 index 0000000000..bf9b2ade31 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_OF_IMPL_07202005_0900) +#define FUSION_VALUE_OF_IMPL_07202005_0900 + +#include +#include + +namespace boost { namespace fusion +{ + struct reverse_view_iterator_tag; + + namespace extension + { + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename + result_of::value_of< + typename result_of::prior< + typename Iterator::first_type + >::type + >::type + type; + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/reverse_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/reverse_view.hpp new file mode 100644 index 0000000000..f3e8ffea94 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/reverse_view.hpp @@ -0,0 +1,68 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REVERSE_VIEW_07202005_0836) +#define FUSION_REVERSE_VIEW_07202005_0836 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct reverse_view_tag; + struct fusion_sequence_tag; + + template + struct reverse_view : sequence_base > + { + typedef reverse_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + + typedef Sequence seq_type; + typedef typename traits::category_of::type category; + typedef typename result_of::begin::type first_type; + typedef typename result_of::end::type last_type; + typedef typename result_of::size::type size; + + BOOST_STATIC_ASSERT(( + is_base_of< + bidirectional_traversal_tag + , typename traits::category_of::type>::value)); + + reverse_view(Sequence& in_seq) + : seq(in_seq) + {} + + first_type first() const { return fusion::begin(seq); } + last_type last() const { return fusion::end(seq); } + typename mpl::if_, Sequence, Sequence&>::type seq; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + reverse_view& operator= (reverse_view const&); + }; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp new file mode 100644 index 0000000000..ddf2e9bed7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp @@ -0,0 +1,56 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_REVERSE_VIEW_ITERATOR_07202005_0835) +#define FUSION_REVERSE_VIEW_ITERATOR_07202005_0835 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct reverse_view_iterator_tag; + + template + struct reverse_view_iterator + : iterator_base > + { + typedef convert_iterator converter; + typedef typename converter::type first_type; + typedef reverse_view_iterator_tag fusion_tag; + typedef typename traits::category_of::type category; + + BOOST_STATIC_ASSERT(( + is_base_of< + bidirectional_traversal_tag + , category>::value)); + + reverse_view_iterator(First const& in_first) + : first(converter::call(in_first)) {} + + first_type first; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + reverse_view_iterator& operator= (reverse_view_iterator const&); + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view.hpp new file mode 100644 index 0000000000..3640fae896 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SINGLE_VIEW_03192006_2216) +#define FUSION_SINGLE_VIEW_03192006_2216 + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/begin_impl.hpp new file mode 100644 index 0000000000..395992bee9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/begin_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_05052005_0305) +#define FUSION_BEGIN_IMPL_05052005_0305 + +namespace boost { namespace fusion +{ + struct single_view_tag; + + template + struct single_view_iterator; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef single_view_iterator type; + + static type + call(Sequence& s) + { + return type(s); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/deref_impl.hpp new file mode 100644 index 0000000000..355cf6ac24 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/deref_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_05052005_0258) +#define FUSION_DEREF_IMPL_05052005_0258 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct single_view_iterator_tag; + + namespace extension + { + template + struct deref_impl; + + template <> + struct deref_impl + { + template + struct apply + { + typedef typename Iterator::value_type type; + + static type + call(Iterator const& i) + { + return i.val; + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/end_impl.hpp new file mode 100644 index 0000000000..d239c242d3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/end_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_05052005_0332) +#define FUSION_END_IMPL_05052005_0332 + +namespace boost { namespace fusion +{ + struct single_view_tag; + + template + struct single_view_iterator_end; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef single_view_iterator_end type; + + static type + call(Sequence&) + { + return type(); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/next_impl.hpp new file mode 100644 index 0000000000..c9cdafdf8a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/next_impl.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_05052005_0331) +#define FUSION_NEXT_IMPL_05052005_0331 + +namespace boost { namespace fusion +{ + struct single_view_iterator_tag; + + template + struct single_view_iterator_end; + + template + struct single_view_iterator; + + namespace extension + { + template + struct next_impl; + + template <> + struct next_impl + { + template + struct apply + { + typedef single_view_iterator_end< + typename Iterator::single_view_type> + type; + + static type + call(Iterator) + { + return type(); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/value_of_impl.hpp new file mode 100644 index 0000000000..f975eb149e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/detail/value_of_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_IMPL_05052005_0324) +#define FUSION_VALUE_IMPL_05052005_0324 + +namespace boost { namespace fusion +{ + struct single_view_iterator_tag; + + namespace extension + { + template + struct value_of_impl; + + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename Iterator::single_view_type single_view_type; + typedef typename single_view_type::value_type type; + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/single_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/single_view.hpp new file mode 100644 index 0000000000..03087cd626 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/single_view.hpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SINGLE_VIEW_05052005_0335) +#define FUSION_SINGLE_VIEW_05052005_0335 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion +{ + struct single_view_tag; + struct forward_traversal_tag; + struct fusion_sequence_tag; + + template + struct single_view : sequence_base > + { + typedef single_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef forward_traversal_tag category; + typedef mpl::true_ is_view; + typedef mpl::int_<1> size; + typedef T value_type; + + single_view() + : val() {} + + explicit single_view(typename detail::call_param::type in_val) + : val(in_val) {} + + value_type val; + }; + + template + inline single_view::type> + make_single_view(T const& v) + { + return single_view::type>(v); + } +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/single_view_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/single_view_iterator.hpp new file mode 100644 index 0000000000..fa24901542 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/single_view/single_view_iterator.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SINGLE_VIEW_ITERATOR_05052005_0340) +#define FUSION_SINGLE_VIEW_ITERATOR_05052005_0340 + +#include +#include +#include +#include +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4512) // assignment operator could not be generated. +#endif + +namespace boost { namespace fusion +{ + struct single_view_iterator_tag; + struct forward_traversal_tag; + + template + struct single_view_iterator_end + : iterator_base > + { + typedef single_view_iterator_tag fusion_tag; + typedef forward_traversal_tag category; + }; + + template + struct single_view_iterator + : iterator_base > + { + typedef single_view_iterator_tag fusion_tag; + typedef forward_traversal_tag category; + typedef typename SingleView::value_type value_type; + typedef SingleView single_view_type; + + explicit single_view_iterator(single_view_type const& view) + : val(view.val) {} + + value_type val; + }; +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view.hpp new file mode 100644 index 0000000000..744d063cf7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_VIEW_TRANSFORM_VIEW_10022005_0612) +#define FUSION_SEQUENCE_VIEW_TRANSFORM_VIEW_10022005_0612 + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/advance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/advance_impl.hpp new file mode 100644 index 0000000000..6b3234844f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/advance_impl.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ADVANCE_IMPL_13122005_1906) +#define FUSION_ADVANCE_IMPL_13122005_1906 + +#include + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + template + struct transform_view_iterator; + + template + struct transform_view_iterator2; + + namespace extension + { + template + struct advance_impl; + + // Unary Version + template<> + struct advance_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename result_of::advance::type advanced_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator type; + + static type + call(Iterator const& i) + { + return type(boost::fusion::advance(i.first), i.f); + } + }; + }; + + // Binary Version + template<> + struct advance_impl + { + template + struct apply + { + typedef typename Iterator::first1_type first1_type; + typedef typename Iterator::first2_type first2_type; + typedef typename result_of::advance::type advanced1_type; + typedef typename result_of::advance::type advanced2_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator2 type; + + static type + call(Iterator const& i) + { + return type( + boost::fusion::advance(i.first1) + , boost::fusion::advance(i.first2), i.f); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/apply_transform_result.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/apply_transform_result.hpp new file mode 100644 index 0000000000..73be3045f2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/apply_transform_result.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_APPLY_TRANSFORM_RESULT_02092006_1936) +#define BOOST_FUSION_APPLY_TRANSFORM_RESULT_02092006_1936 + +#include + +namespace boost { namespace fusion +{ + struct void_; + + namespace detail + { + template + struct apply_transform_result + { + template + struct apply + : boost::result_of + {}; + + template + struct apply + : boost::result_of + {}; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/at_impl.hpp new file mode 100644 index 0000000000..620d96feaf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/at_impl.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_IMPL_20061029_1946) +#define BOOST_FUSION_AT_IMPL_20061029_1946 + +#include +#include +#include + +namespace boost { namespace fusion { + struct transform_view_tag; + struct transform_view2_tag; + + namespace extension + { + template + struct at_impl; + + template<> + struct at_impl + { + template + struct apply + { + typedef typename Seq::transform_type F; + typedef detail::apply_transform_result transform_type; + typedef typename boost::fusion::result_of::at::type value_type; + typedef typename mpl::apply::type type; + + static type call(Seq& seq) + { + return seq.f(boost::fusion::at(seq.seq)); + } + }; + }; + + template<> + struct at_impl + { + template + struct apply + { + typedef typename Seq::transform_type F; + typedef detail::apply_transform_result transform_type; + typedef typename boost::fusion::result_of::at::type value1_type; + typedef typename boost::fusion::result_of::at::type value2_type; + typedef typename mpl::apply::type type; + + static type call(Seq& seq) + { + return seq.f(boost::fusion::at(seq.seq1), boost::fusion::at(seq.seq2)); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/begin_impl.hpp new file mode 100644 index 0000000000..75b043829e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/begin_impl.hpp @@ -0,0 +1,68 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_07162005_1031) +#define FUSION_BEGIN_IMPL_07162005_1031 + +#include + +namespace boost { namespace fusion +{ + template + struct transform_view_iterator; + + template + struct transform_view_iterator2; + + namespace extension + { + template + struct begin_impl; + + // Unary Version + template <> + struct begin_impl + { + template + struct apply + { + typedef typename Sequence::first_type first_type; + typedef typename Sequence::transform_type transform_type; + typedef transform_view_iterator type; + + static type + call(Sequence& s) + { + return type(s.first(), s.f); + } + }; + }; + + // Binary Version + template <> + struct begin_impl + { + template + struct apply + { + typedef typename Sequence::first1_type first1_type; + typedef typename Sequence::first2_type first2_type; + typedef typename Sequence::transform_type transform_type; + typedef transform_view_iterator2 type; + + static type + call(Sequence& s) + { + return type(s.first1(), s.first2(), s.f); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/deref_impl.hpp new file mode 100644 index 0000000000..3849f80aff --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/deref_impl.hpp @@ -0,0 +1,76 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_07162005_1026) +#define FUSION_DEREF_IMPL_07162005_1026 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + namespace extension + { + template + struct deref_impl; + + // Unary Version + template <> + struct deref_impl + { + template + struct apply + { + typedef typename + result_of::deref::type + value_type; + + typedef detail::apply_transform_result transform_type; + typedef typename mpl::apply::type type; + + static type + call(Iterator const& i) + { + return i.f(*i.first); + } + }; + }; + + // Binary Version + template <> + struct deref_impl + { + template + struct apply + { + typedef typename + result_of::deref::type + value1_type; + typedef typename + result_of::deref::type + value2_type; + + typedef detail::apply_transform_result transform_type; + typedef typename mpl::apply::type type; + + static type + call(Iterator const& i) + { + return i.f(*i.first1, *i.first2); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/distance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/distance_impl.hpp new file mode 100644 index 0000000000..d5ae0adcb9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/distance_impl.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DISTANCE_IMPL_13122005_2139) +#define FUSION_DISTANCE_IMPL_13122005_2139 + +#include + +namespace boost { namespace fusion { + + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + namespace extension + { + template + struct distance_impl; + + // Unary Version + template<> + struct distance_impl + { + template + struct apply + : result_of::distance + { + static + typename result_of::distance::type + call(First const& first, Last const& last) + { + return boost::fusion::distance(first.first, last.first); + } + }; + }; + + // Binary Version + template<> + struct distance_impl + { + template + struct apply + : result_of::distance + { + static + typename result_of::distance::type + call(First const& first, Last const& last) + { + return boost::fusion::distance(first.first1, last.first1); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/end_impl.hpp new file mode 100644 index 0000000000..465a2cbe18 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/end_impl.hpp @@ -0,0 +1,68 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_07162005_1028) +#define FUSION_END_IMPL_07162005_1028 + +#include + +namespace boost { namespace fusion +{ + template + struct transform_view_iterator; + + template + struct transform_view_iterator2; + + namespace extension + { + template + struct end_impl; + + // Unary Version + template <> + struct end_impl + { + template + struct apply + { + typedef typename Sequence::last_type last_type; + typedef typename Sequence::transform_type transform_type; + typedef transform_view_iterator type; + + static type + call(Sequence& s) + { + return type(s.last(), s.f); + } + }; + }; + + // Binary Version + template <> + struct end_impl + { + template + struct apply + { + typedef typename Sequence::last1_type last1_type; + typedef typename Sequence::last2_type last2_type; + typedef typename Sequence::transform_type transform_type; + typedef transform_view_iterator2 type; + + static type + call(Sequence& s) + { + return type(s.last1(), s.last2(), s.f); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/equal_to_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/equal_to_impl.hpp new file mode 100644 index 0000000000..063a00edfe --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/equal_to_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_TRANSFORM_VIEW_ITERATOR_20070127_0957) +#define BOOST_FUSION_TRANSFORM_VIEW_ITERATOR_20070127_0957 + +#include + +namespace boost { namespace fusion { + + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + namespace extension + { + template + struct equal_to_impl; + + template<> + struct equal_to_impl + { + template + struct apply + : result_of::equal_to + {}; + }; + + template<> + struct equal_to_impl + { + template + struct apply + : result_of::equal_to + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/next_impl.hpp new file mode 100644 index 0000000000..4d6ec74385 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/next_impl.hpp @@ -0,0 +1,74 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_07162005_1029) +#define FUSION_NEXT_IMPL_07162005_1029 + +#include + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + template + struct transform_view_iterator; + + template + struct transform_view_iterator2; + + namespace extension + { + template + struct next_impl; + + // Unary Version + template <> + struct next_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename result_of::next::type next_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator type; + + static type + call(Iterator const& i) + { + return type(fusion::next(i.first), i.f); + } + }; + }; + + // Binary Version + template <> + struct next_impl + { + template + struct apply + { + typedef typename Iterator::first1_type first1_type; + typedef typename Iterator::first2_type first2_type; + typedef typename result_of::next::type next1_type; + typedef typename result_of::next::type next2_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator2 type; + + static type + call(Iterator const& i) + { + return type(fusion::next(i.first1), fusion::next(i.first2), i.f); + } + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/prior_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/prior_impl.hpp new file mode 100644 index 0000000000..f7d49966ac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/prior_impl.hpp @@ -0,0 +1,73 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PREV_IMPL_13122005_2110) +#define FUSION_PREV_IMPL_13122005_2110 + +#include + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + template + struct transform_view_iterator; + + template + struct transform_view_iterator2; + + namespace extension + { + template + struct prior_impl; + + // Unary Version + template<> + struct prior_impl + { + template + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename result_of::prior::type prior_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator type; + + static type + call(Iterator const& i) + { + return type(fusion::prior(i.first), i.f); + } + }; + }; + + // Binary Version + template<> + struct prior_impl + { + template + struct apply + { + typedef typename Iterator::first1_type first1_type; + typedef typename Iterator::first2_type first2_type; + typedef typename result_of::prior::type prior1_type; + typedef typename result_of::prior::type prior2_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator2 type; + + static type + call(Iterator const& i) + { + return type(fusion::prior(i.first1), fusion::prior(i.first2), i.f); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/value_at_impl.hpp new file mode 100644 index 0000000000..bd4409f7a9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/value_at_impl.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_AT_IMPL_20061101_0745) +#define BOOST_FUSION_VALUE_AT_IMPL_20061101_0745 + +#include +#include +#include + +namespace boost { namespace fusion { + struct transform_view_tag; + struct transform_view2_tag; + + namespace extension + { + template + struct value_at_impl; + + template<> + struct value_at_impl + { + template + struct apply + { + typedef typename Seq::transform_type F; + typedef detail::apply_transform_result transform_type; + typedef typename boost::fusion::result_of::value_at::type value_type; + typedef typename mpl::apply::type type; + }; + }; + + template<> + struct value_at_impl + { + template + struct apply + { + typedef typename Seq::transform_type F; + typedef detail::apply_transform_result transform_type; + typedef typename boost::fusion::result_of::value_at::type value1_type; + typedef typename boost::fusion::result_of::value_at::type value2_type; + typedef typename mpl::apply::type type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/value_of_impl.hpp new file mode 100644 index 0000000000..08bbf20961 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/detail/value_of_impl.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_OF_IMPL_07162005_1030) +#define FUSION_VALUE_OF_IMPL_07162005_1030 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + namespace extension + { + template + struct value_of_impl; + + // Unary Version + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename + result_of::value_of::type + value_type; + + typedef detail::apply_transform_result transform_type; + typedef typename mpl::apply::type type; + }; + }; + + // Binary Version + template <> + struct value_of_impl + { + template + struct apply + { + typedef typename + result_of::value_of::type + value1_type; + typedef typename + result_of::value_of::type + value2_type; + + typedef detail::apply_transform_result transform_type; + typedef typename mpl::apply::type type; + }; + }; + } +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view.hpp new file mode 100644 index 0000000000..3d330b769f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view.hpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_TRANSFORM_VIEW_07162005_1037) +#define FUSION_TRANSFORM_VIEW_07162005_1037 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + struct transform_view_tag; + struct transform_view2_tag; + struct fusion_sequence_tag; + + // Binary Version + template + struct transform_view : sequence_base > + { + BOOST_STATIC_ASSERT(result_of::size::value == result_of::size::value); + typedef transform_view2_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + + typedef typename traits::category_of::type category1; + typedef typename traits::category_of::type category2; + typedef typename detail::strictest_traversal< + fusion::vector2 >::type category; + typedef typename result_of::begin::type first1_type; + typedef typename result_of::begin::type first2_type; + typedef typename result_of::end::type last1_type; + typedef typename result_of::end::type last2_type; + typedef typename result_of::size::type size; + typedef Sequence1 sequence1_type; + typedef Sequence2 sequence2_type; + typedef F transform_type; + + transform_view(Sequence1& in_seq1, Sequence2& in_seq2, F const& binop) + : f(binop) + , seq1(in_seq1) + , seq2(in_seq2) + {} + + first1_type first1() const { return fusion::begin(seq1); } + first2_type first2() const { return fusion::begin(seq2); } + last1_type last1() const { return fusion::end(seq1); } + last2_type last2() const { return fusion::end(seq2); } + + transform_type f; + typename mpl::if_, Sequence1, Sequence1&>::type seq1; + typename mpl::if_, Sequence2, Sequence2&>::type seq2; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view& operator= (transform_view const&); + }; + + // Unary Version + template +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + struct transform_view : sequence_base > +#else + struct transform_view : sequence_base > +#endif + { + typedef transform_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + + typedef typename traits::category_of::type category; + typedef typename result_of::begin::type first_type; + typedef typename result_of::end::type last_type; + typedef typename result_of::size::type size; + typedef Sequence sequence_type; + typedef F transform_type; + + transform_view(Sequence& in_seq, F const& in_f) + : seq(in_seq) + , f(in_f) + {} + + first_type first() const { return fusion::begin(seq); } + last_type last() const { return fusion::end(seq); } + typename mpl::if_, Sequence, Sequence&>::type seq; + transform_type f; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view& operator= (transform_view const&); + }; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view_fwd.hpp new file mode 100644 index 0000000000..7dca304ae7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view_fwd.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_TRANSFORM_VIEW_FORWARD_01052006_1839) +#define FUSION_TRANSFORM_VIEW_FORWARD_01052006_1839 + +namespace boost { namespace fusion +{ + struct void_; + struct transform_view_tag; + struct transform_view2_tag; + + template + struct transform_view; +}} + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view_iterator.hpp new file mode 100644 index 0000000000..2c31b261eb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/transform_view/transform_view_iterator.hpp @@ -0,0 +1,77 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_TRANSFORM_VIEW_ITERATOR_07162005_1033) +#define FUSION_TRANSFORM_VIEW_ITERATOR_07162005_1033 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + // Unary Version + struct transform_view_iterator_tag; + + template + struct transform_view_iterator + : iterator_base > + { + typedef transform_view_iterator_tag fusion_tag; + typedef convert_iterator converter; + typedef typename converter::type first_type; + typedef typename traits::category_of::type category; + typedef F transform_type; + + transform_view_iterator(First const& in_first, F const& in_f) + : first(converter::call(in_first)), f(in_f) {} + + first_type first; + transform_type f; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view_iterator& operator= (transform_view_iterator const&); + }; + + // Binary Version + struct transform_view_iterator2_tag; + + template + struct transform_view_iterator2 + : iterator_base > + { + typedef transform_view_iterator2_tag fusion_tag; + typedef convert_iterator converter1; + typedef convert_iterator converter2; + typedef typename converter1::type first1_type; + typedef typename converter2::type first2_type; + typedef typename traits::category_of::type category; + typedef F transform_type; + + transform_view_iterator2(First1 const& in_first1, First2 const& in_first2, F const& in_f) + : first1(converter1::call(in_first1)), first2(converter2::call(in_first2)), f(in_f) {} + + first1_type first1; + first2_type first2; + transform_type f; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view_iterator2& operator= (transform_view_iterator2 const&); + }; +}} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view.hpp new file mode 100644 index 0000000000..f7a16ea0df --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view.hpp @@ -0,0 +1,14 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ZIP_VIEW_23012006_0811) +#define FUSION_ZIP_VIEW_23012006_0811 + +#include +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/advance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/advance_impl.hpp new file mode 100644 index 0000000000..9aa00debf3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/advance_impl.hpp @@ -0,0 +1,69 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ADVANCE_IMPL_20061024_2021) +#define FUSION_ADVANCE_IMPL_20061024_2021 + +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct zip_view_iterator_tag; + + namespace detail + { + template + struct poly_advance + { + template + struct result; + + template + struct result(It)> + { + typedef typename remove_reference::type it; + typedef typename result_of::advance::type type; + }; + + template + typename result::type + operator()(const It& it) const + { + return fusion::advance(it); + } + }; + } + + namespace extension + { + template + struct advance_impl; + + template<> + struct advance_impl + { + template + struct apply + { + typedef zip_view_iterator< + typename result_of::transform >::type> type; + + static type + call(It const& it) + { + return type( + fusion::transform(it.iterators_, detail::poly_advance())); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/at_impl.hpp new file mode 100644 index 0000000000..b01b8cfad9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/at_impl.hpp @@ -0,0 +1,92 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_AT_IMPL_20060124_1933) +#define FUSION_AT_IMPL_20060124_1933 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace boost { namespace fusion +{ + struct zip_view_tag; + + namespace detail + { + template + struct poly_at + { + template + struct result; + + template + struct result(SeqRef)> + : mpl::eval_if, + mpl::identity, + result_of::at::type, N> > + { + BOOST_MPL_ASSERT((is_reference)); + }; + + template + typename result::type + operator()(Seq& seq) const + { + return fusion::at(seq); + } + + template + typename result::type + operator()(Seq const& seq) const + { + return fusion::at(seq); + } + + unused_type operator()(unused_type const&) const + { + return unused_type(); + } + }; + } + + namespace extension + { + template + struct at_impl; + + template<> + struct at_impl + { + template + struct apply + { + typedef typename result_of::as_vector< + typename result_of::transform< + typename Seq::sequences, detail::poly_at >::type>::type type; + + static type + call(Seq& seq) + { + return type( + fusion::transform(seq.sequences_, detail::poly_at())); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/begin_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/begin_impl.hpp new file mode 100644 index 0000000000..674dea38cc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/begin_impl.hpp @@ -0,0 +1,92 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_20060123_2147) +#define FUSION_BEGIN_IMPL_20060123_2147 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct zip_view_tag; + + namespace detail + { + struct poly_begin + { + template + struct result; + + template + struct result + : mpl::eval_if, + mpl::identity, + result_of::begin::type> > + { + BOOST_MPL_ASSERT((is_reference)); + }; + + template + typename result::type + operator()(Seq& seq) const + { + return fusion::begin(seq); + } + + template + typename result::type + operator()(Seq const& seq) const + { + return fusion::begin(seq); + } + + unused_type operator()(unused_type const&) const + { + return unused_type(); + } + }; + } + + namespace extension + { + template + struct begin_impl; + + template<> + struct begin_impl + { + template + struct apply + { + typedef zip_view_iterator< + typename result_of::transform::type, + typename Sequence::category> type; + + static type + call(Sequence& sequence) + { + return type( + fusion::transform(sequence.sequences_, detail::poly_begin())); + } + }; + + + + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/deref_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/deref_impl.hpp new file mode 100644 index 0000000000..69cc882550 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/deref_impl.hpp @@ -0,0 +1,83 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_20061024_1959) +#define FUSION_DEREF_IMPL_20061024_1959 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct zip_view_iterator_tag; + + namespace detail + { + struct poly_deref + { + template + struct result; + + template + struct result + { + typedef typename remove_const< + typename remove_reference::type>::type it; + + typedef typename mpl::eval_if, + mpl::identity, + result_of::deref >::type type; + }; + + template + typename result::type + operator()(const It& it) const + { + return fusion::deref(it); + } + + unused_type operator()(unused_type const&) const + { + return unused_type(); + } + }; + } + + namespace extension + { + template + struct deref_impl; + + template<> + struct deref_impl + { + template + struct apply + { + typedef typename result_of::as_vector< + typename result_of::transform::type>::type type; + + static type + call(It const& it) + { + return type( + fusion::transform(it.iterators_, detail::poly_deref())); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/distance_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/distance_impl.hpp new file mode 100644 index 0000000000..b2febd5be2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/distance_impl.hpp @@ -0,0 +1,82 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_DISTANCE_IMPL_20060124_2033) +#define FUSION_DISTANCE_IMPL_20060124_2033 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct zip_view_iterator_tag; + + struct random_access_iterator_tag; + + namespace detail + { + template + struct best_distance + { + typedef typename result_of::find_if< + typename SearchIt::iterators, is_same, random_access_iterator_tag> > finder; + + BOOST_MPL_ASSERT_NOT((is_same >)); + + typedef typename result_of::distance::type type; + }; + + template + struct default_distance + : result_of::distance< + typename result_of::value_at_c::type, + typename result_of::value_at_c::type> + {}; + + template + struct zip_view_iterator_distance + { + typedef typename result_of::find_if< + typename It1::iterators, is_same, random_access_iterator_tag> > finder; + + typedef typename mpl::eval_if< + is_same::type>, + detail::default_distance , + detail::best_distance >::type type; + }; + } + + namespace extension + { + template + struct distance_impl; + + template<> + struct distance_impl + { + template + struct apply + : detail::zip_view_iterator_distance::type + { + static typename detail::zip_view_iterator_distance::type + call(It1 const& /*it1*/, It2 const& /*it2*/) + { + return typename detail::zip_view_iterator_distance::type(); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/end_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/end_impl.hpp new file mode 100644 index 0000000000..fa9c31db10 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/end_impl.hpp @@ -0,0 +1,103 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_20060123_2208) +#define FUSION_END_IMPL_20060123_2208 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace fusion { + + struct zip_view_tag; + + namespace detail + { + template + struct get_endpoint + { + typedef typename remove_reference::type Seq; + typedef typename result_of::begin::type begin; + typedef typename result_of::advance::type type; + }; + + template + struct endpoints + { + template + struct result; + + template + struct result(SeqRef)> + : mpl::eval_if, + mpl::identity, + get_endpoint > + { + BOOST_MPL_ASSERT((is_reference)); + }; + + template + typename result::type + operator()(Seq& seq) const + { + return fusion::advance(fusion::begin(seq)); + } + + template + typename result::type + operator()(Seq const& seq) + { + return fusion::advance(fusion::begin(seq)); + } + + unused_type operator()(unused_type const&) const + { + return unused_type(); + } + }; + } + + namespace extension + { + template + struct end_impl; + + template<> + struct end_impl + { + template + struct apply + { + typedef zip_view_iterator< + typename result_of::transform >::type, + typename Sequence::category> type; + + static type + call(Sequence& sequence) + { + return type( + fusion::transform(sequence.sequences_, detail::endpoints())); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/equal_to_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/equal_to_impl.hpp new file mode 100644 index 0000000000..c3962a63da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/equal_to_impl.hpp @@ -0,0 +1,62 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_EQUAL_TO_IMPL_20060128_1423) +#define FUSION_EQUAL_TO_IMPL_20060128_1423 + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +namespace boost { namespace fusion { + + struct zip_view_iterator_tag; + + namespace detail + { + template + struct zip_iterators_equal + { + typedef mpl::zip_view > zipped; + typedef mpl::transform_view > > transformed; + + typedef typename mpl::find_if >::type found; + + typedef typename is_same::type, found>::type type; + }; + } + + namespace extension + { + template + struct equal_to_impl; + + template<> + struct equal_to_impl + { + template + struct apply + : detail::zip_iterators_equal::type + {}; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/next_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/next_impl.hpp new file mode 100644 index 0000000000..1c9c024577 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/next_impl.hpp @@ -0,0 +1,83 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_20060124_2006) +#define FUSION_NEXT_IMPL_20060124_2006 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct zip_view_iterator_tag; + + namespace detail + { + struct poly_next + { + template + struct result; + + template + struct result + { + typedef typename remove_const< + typename remove_reference::type>::type it; + + typedef typename mpl::eval_if, + mpl::identity, + result_of::next >::type type; + }; + + template + typename result::type + operator()(const It& it) const + { + return fusion::next(it); + } + + unused_type operator()(unused_type const&) const + { + return unused_type(); + } + }; + } + + namespace extension + { + template + struct next_impl; + + template<> + struct next_impl + { + template + struct apply + { + typedef fusion::zip_view_iterator< + typename result_of::transform::type, + typename Iterator::category> type; + + static type + call(Iterator const& it) + { + return type( + fusion::transform(it.iterators_, detail::poly_next())); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/prior_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/prior_impl.hpp new file mode 100644 index 0000000000..49b99397ab --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/prior_impl.hpp @@ -0,0 +1,83 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_PRIOR_IMPL_20060124_2006) +#define FUSION_PRIOR_IMPL_20060124_2006 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct zip_view_iterator_tag; + + namespace detail + { + struct poly_prior + { + template + struct result; + + template + struct result + { + typedef typename remove_const< + typename remove_reference::type>::type it; + typedef typename mpl::eval_if, + mpl::identity, + result_of::prior >::type type; + }; + + template + typename result::type + operator()(const It& it) const + { + return fusion::prior(it); + } + + unused_type operator()(unused_type const&) const + { + return unused_type(); + } + }; + } + + namespace extension + { + template + struct prior_impl; + + template<> + struct prior_impl + { + template + struct apply + { + typedef zip_view_iterator< + typename result_of::transform::type, + typename Iterator::category> type; + + static type + call(Iterator const& it) + + { + return type( + fusion::transform(it.iterators_, detail::poly_prior())); + } + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/size_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/size_impl.hpp new file mode 100644 index 0000000000..70798d28ec --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/size_impl.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SIZE_IMPL_20060124_0800) +#define FUSION_SIZE_IMPL_20060124_0800 + +namespace boost { namespace fusion { + + struct zip_view_tag; + + namespace extension + { + template + struct size; + + template + struct size_impl; + + template<> + struct size_impl + { + template + struct apply + { + typedef typename Sequence::size type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp new file mode 100644 index 0000000000..7905b063ac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp @@ -0,0 +1,61 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_AT_IMPL_20060124_2129) +#define FUSION_VALUE_AT_IMPL_20060124_2129 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { + + struct zip_view_tag; + + namespace detail + { + template + struct poly_value_at + { + template + struct result; + + template + struct result(Seq)> + : mpl::eval_if, + mpl::identity, + result_of::value_at::type, N> > + {}; + }; + } + + namespace extension + { + template + struct value_at_impl; + + template<> + struct value_at_impl + { + template + struct apply + { + typedef typename result_of::transform< + typename Sequence::sequences, + detail::poly_value_at >::type values; + typedef typename result_of::as_vector::type type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp new file mode 100644 index 0000000000..4ba4c3c535 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp @@ -0,0 +1,61 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_VALUE_OF_IMPL_20060124_2147) +#define FUSION_VALUE_OF_IMPL_20060124_2147 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct zip_view_iterator_tag; + + namespace detail + { + struct poly_value_of + { + template + struct result; + + template + struct result + : mpl::eval_if, + mpl::identity, + result_of::value_of > + {}; + }; + } + + namespace extension + { + template + struct value_of_impl; + + template<> + struct value_of_impl + { + template + struct apply + { + typedef typename result_of::transform< + typename Iterator::iterators, + detail::poly_value_of>::type values; + + typedef typename result_of::as_vector::type type; + }; + }; + } +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view.hpp new file mode 100644 index 0000000000..340feafb30 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view.hpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ZIP_VIEW_23012006_0813) +#define FUSION_ZIP_VIEW_23012006_0813 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { namespace fusion { + + namespace detail + { + template + struct all_references + : fusion::result_of::equal_to > >::type, typename fusion::result_of::end::type> + {}; + + struct seq_ref_size + { + template + struct result; + + template + struct result + { + static int const high_int = static_cast( + (static_cast(~0) >> 1) - 1); + + typedef typename remove_reference::type SeqClass; + + typedef typename mpl::eval_if< + traits::is_forward, + result_of::size, + mpl::int_ >::type type; + }; + }; + + struct poly_min + { + template + struct result; + + template + struct result + { + typedef typename remove_reference::type lhs; + typedef typename remove_reference::type rhs; + typedef typename mpl::min::type type; + }; + }; + + template + struct min_size + { + typedef typename result_of::transform::type sizes; + typedef typename result_of::fold::type, detail::poly_min>::type type; + }; + } + + struct zip_view_tag; + struct fusion_sequence_tag; + + template + struct zip_view : sequence_base< zip_view > + { + typedef typename result_of::remove::type real_sequences; + BOOST_MPL_ASSERT((detail::all_references)); + typedef typename detail::strictest_traversal::type category; + typedef zip_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + typedef typename fusion::result_of::as_vector::type sequences; + typedef typename detail::min_size::type size; + + zip_view( + const Sequences& seqs) + : sequences_(seqs) + {}; + + sequences sequences_; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view_iterator.hpp new file mode 100644 index 0000000000..66b514dc3a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view_iterator.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ZIP_VIEW_ITERATOR_23012006_0814) +#define FUSION_ZIP_VIEW_ITERATOR_23012006_0814 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { namespace fusion { + + struct zip_view_iterator_tag; + + template< + typename IteratorSequence, + typename Traversal> + struct zip_view_iterator + : iterator_base > + { + typedef zip_view_iterator_tag fusion_tag; + typedef Traversal category; + + template + zip_view_iterator( + const InitSeq& iterator_seq) + : iterators_(iterator_seq) + {} + + typedef typename result_of::as_vector::type iterators; + iterators iterators_; + }; +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp new file mode 100644 index 0000000000..e2b9a7d4c3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ZIP_VIEW_ITERATOR_FWD) +#define FUSION_ZIP_VIEW_ITERATOR_FWD + +#include + +namespace boost { namespace fusion { + + template< + typename IteratorSequence, + typename Traversal = typename detail::strictest_traversal::type> + struct zip_view_iterator; + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/generator_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/generator_iterator.hpp new file mode 100644 index 0000000000..ebf478b25b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/generator_iterator.hpp @@ -0,0 +1,80 @@ +// (C) Copyright Jens Maurer 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Revision History: + +// 15 Nov 2001 Jens Maurer +// created. + +// See http://www.boost.org/libs/utility/iterator_adaptors.htm for documentation. + +#ifndef BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP +#define BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP + +#include +#include + +namespace boost { + +template +class generator_iterator + : public iterator_facade< + generator_iterator + , typename Generator::result_type + , single_pass_traversal_tag + , typename Generator::result_type const& + > +{ + typedef iterator_facade< + generator_iterator + , typename Generator::result_type + , single_pass_traversal_tag + , typename Generator::result_type const& + > super_t; + + public: + generator_iterator() {} + generator_iterator(Generator* g) : m_g(g), m_value((*m_g)()) {} + + void increment() + { + m_value = (*m_g)(); + } + + const typename Generator::result_type& + dereference() const + { + return m_value; + } + + bool equal(generator_iterator const& y) const + { + return this->m_g == y.m_g && this->m_value == y.m_value; + } + + private: + Generator* m_g; + typename Generator::result_type m_value; +}; + +template +struct generator_iterator_generator +{ + typedef generator_iterator type; +}; + +template +inline generator_iterator +make_generator_iterator(Generator & gen) +{ + typedef generator_iterator result_t; + return result_t(&gen); +} + +} // namespace boost + + +#endif // BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/get_pointer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/get_pointer.hpp new file mode 100644 index 0000000000..a0cd5c0b19 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/get_pointer.hpp @@ -0,0 +1,33 @@ +// Copyright Peter Dimov and David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef GET_POINTER_DWA20021219_HPP +# define GET_POINTER_DWA20021219_HPP + +// In order to avoid circular dependencies with Boost.TR1 +// we make sure that our include of doesn't try to +// pull in the TR1 headers: that's why we use this header +// rather than including directly: +# include // std::auto_ptr + +namespace boost { + +// get_pointer(p) extracts a ->* capable pointer from p + +template T * get_pointer(T * p) +{ + return p; +} + +// get_pointer(shared_ptr const & p) has been moved to shared_ptr.hpp + +template T * get_pointer(std::auto_ptr const& p) +{ + return p.get(); +} + + +} // namespace boost + +#endif // GET_POINTER_DWA20021219_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/accounting.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/accounting.hpp new file mode 100644 index 0000000000..6643e75290 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/accounting.hpp @@ -0,0 +1,36 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_ACCOUNTING_HPP +#define BOOST_GRAPH_ACCOUNTING_HPP + +#include +#include +#include +#include +#include + +namespace boost { namespace graph { namespace accounting { + +typedef double time_type; + +inline time_type get_time() +{ + return MPI_Wtime(); +} + +inline std::string print_time(time_type t) +{ + std::ostringstream out; + out << std::setiosflags(std::ios::fixed) << std::setprecision(2) << t; + return out.str(); +} + +} } } // end namespace boost::graph::accounting + +#endif // BOOST_GRAPH_ACCOUNTING_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/adj_list_serialize.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/adj_list_serialize.hpp new file mode 100644 index 0000000000..c1ff4111d0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/adj_list_serialize.hpp @@ -0,0 +1,113 @@ +//======================================================================= +// Copyright 2005 Jeremy G. Siek +// Authors: Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef ADJ_LIST_SERIALIZE_HPP +#define ADJ_LIST_SERIALIZE_HPP + +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace boost { + +namespace serialization { + +// Turn off tracking for adjacency_list. It's not polymorphic, and we +// need to do this to enable saving of non-const adjacency lists. +template +struct tracking_level > { + typedef mpl::integral_c_tag tag; + typedef mpl::int_ type; + BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value); +}; + +template +inline void save( + Archive & ar, + const boost::adjacency_list &graph, + const unsigned int /* file_version */ +){ + typedef adjacency_list Graph; + typedef typename graph_traits::vertex_descriptor Vertex; + + int V = num_vertices(graph); + int E = num_edges(graph); + ar << BOOST_SERIALIZATION_NVP(V); + ar << BOOST_SERIALIZATION_NVP(E); + + // assign indices to vertices + std::map indices; + int num = 0; + BGL_FORALL_VERTICES_T(v, graph, Graph) { + indices[v] = num++; + ar << serialization::make_nvp("vertex_property", get(vertex_all_t(), graph, v) ); + } + + // write edges + BGL_FORALL_EDGES_T(e, graph, Graph) { + ar << serialization::make_nvp("u" , indices[source(e,graph)]); + ar << serialization::make_nvp("v" , indices[target(e,graph)]); + ar << serialization::make_nvp("edge_property", get(edge_all_t(), graph, e) ); + } +} + + +template +inline void load( + Archive & ar, + boost::adjacency_list &graph, + const unsigned int /* file_version */ +){ + typedef adjacency_list Graph; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + + unsigned int V; + ar >> BOOST_SERIALIZATION_NVP(V); + unsigned int E; + ar >> BOOST_SERIALIZATION_NVP(E); + + std::vector verts(V); + int i = 0; + while(V-- > 0){ + Vertex v = add_vertex(graph); + verts[i++] = v; + ar >> serialization::make_nvp("vertex_property", get(vertex_all_t(), graph, v) ); + } + while(E-- > 0){ + int u; int v; + ar >> BOOST_SERIALIZATION_NVP(u); + ar >> BOOST_SERIALIZATION_NVP(v); + Edge e; bool inserted; + boost::tie(e,inserted) = add_edge(verts[u], verts[v], graph); + ar >> serialization::make_nvp("edge_property", get(edge_all_t(), graph, e) ); + } +} + +template +inline void serialize( + Archive & ar, + boost::adjacency_list &graph, + const unsigned int file_version +){ + boost::serialization::split_free(ar, graph, file_version); +} + +}//serialization +}//boost + + +#endif // ADJ_LIST_SERIALIZE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_iterator.hpp new file mode 100644 index 0000000000..d500606443 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_iterator.hpp @@ -0,0 +1,102 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_ADJACENCY_ITERATOR_HPP +#define BOOST_ADJACENCY_ITERATOR_HPP + +#include +#include + +namespace boost +{ + + template + struct adjacency_iterator + : iterator_adaptor< + adjacency_iterator + , OutEdgeIter + , Vertex + , use_default + , Vertex + , Difference + > + { + typedef iterator_adaptor< + adjacency_iterator + , OutEdgeIter + , Vertex + , use_default + , Vertex + , Difference + > super_t; + + inline adjacency_iterator() {} + inline adjacency_iterator(OutEdgeIter const& i, const Graph* g) : super_t(i), m_g(g) { } + + inline Vertex + dereference() const + { return target(*this->base(), *m_g); } + + const Graph* m_g; + }; + + template ::vertex_descriptor, + class OutEdgeIter=typename graph_traits::out_edge_iterator> + class adjacency_iterator_generator + { + typedef typename boost::detail::iterator_traits + ::difference_type difference_type; + public: + typedef adjacency_iterator type; + }; + + template + struct inv_adjacency_iterator + : iterator_adaptor< + inv_adjacency_iterator + , InEdgeIter + , Vertex + , use_default + , Vertex + , Difference + > + { + typedef iterator_adaptor< + inv_adjacency_iterator + , InEdgeIter + , Vertex + , use_default + , Vertex + , Difference + > super_t; + + inline inv_adjacency_iterator() { } + inline inv_adjacency_iterator(InEdgeIter const& i, const Graph* g) : super_t(i), m_g(g) { } + + inline Vertex + dereference() const + { return source(*this->base(), *m_g); } + + const Graph* m_g; + }; + + template ::vertex_descriptor, + class InEdgeIter = typename graph_traits::in_edge_iterator> + class inv_adjacency_iterator_generator { + typedef typename boost::detail::iterator_traits + ::difference_type difference_type; + public: + typedef inv_adjacency_iterator type; + }; + +} // namespace boost + +#endif // BOOST_DETAIL_ADJACENCY_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_list.hpp new file mode 100644 index 0000000000..5034fec5a5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_list.hpp @@ -0,0 +1,618 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2010 Thomas Claveirole +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_ADJACENCY_LIST_HPP +#define BOOST_GRAPH_ADJACENCY_LIST_HPP + + +#include + +#include +#include +#include + +#include + +#if !defined BOOST_NO_SLIST +# ifdef BOOST_SLIST_HEADER +# include BOOST_SLIST_HEADER +# else +# include +# endif +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + //=========================================================================== + // Selectors for the VertexList and EdgeList template parameters of + // adjacency_list, and the container_gen traits class which is used + // to map the selectors to the container type used to implement the + // graph. + // + // The main container_gen traits class uses partial specialization, + // so we also include a workaround. + +#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#if !defined BOOST_NO_SLIST + struct slistS {}; +#endif + + struct vecS { }; + struct listS { }; + struct setS { }; + struct mapS { }; + struct multisetS { }; + struct multimapS { }; + struct hash_setS { }; + struct hash_mapS { }; + struct hash_multisetS { }; + struct hash_multimapS { }; + + template + struct container_gen { }; + + template + struct container_gen { + typedef std::list type; + }; +#if !defined BOOST_NO_SLIST + template + struct container_gen { + typedef BOOST_STD_EXTENSION_NAMESPACE::slist type; + }; +#endif + template + struct container_gen { + typedef std::vector type; + }; + + template + struct container_gen { + typedef std::set type; + }; + + template + struct container_gen { + typedef std::set type; + }; + + template + struct container_gen { + typedef std::multiset type; + }; + + template + struct container_gen { + typedef std::multiset type; + }; + + template + struct container_gen { + typedef boost::unordered_set type; + }; + + template + struct container_gen { + typedef boost::unordered_set type; + }; + + template + struct container_gen { + typedef boost::unordered_multiset type; + }; + + template + struct container_gen { + typedef boost::unordered_multiset type; + }; + +#else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#if !defined BOOST_NO_SLIST + struct slistS { + template + struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::slist type; }; + }; +#endif + + struct vecS { + template + struct bind_ { typedef std::vector type; }; + }; + + struct listS { + template + struct bind_ { typedef std::list type; }; + }; + + struct setS { + template + struct bind_ { typedef std::set > type; }; + }; + + + struct mapS { + template + struct bind_ { typedef std::set > type; }; + }; + + struct multisetS { + template + struct bind_ { typedef std::multiset > type; }; + }; + + struct multimapS { + template + struct bind_ { typedef std::multiset > type; }; + }; + + struct hash_setS { + template + struct bind_ { typedef boost::unordered_set type; }; + }; + + struct hash_mapS { + template + struct bind_ { typedef boost::unordered_set type; }; + }; + + struct hash_multisetS { + template + struct bind_ { typedef boost::unordered_multiset type; }; + }; + + struct hash_multimapS { + template + struct bind_ { typedef boost::unordered_multiset type; }; + }; + + template struct container_selector { + typedef vecS type; + }; + +#define BOOST_CONTAINER_SELECTOR(NAME) \ + template <> struct container_selector { \ + typedef NAME type; \ + } + + BOOST_CONTAINER_SELECTOR(vecS); + BOOST_CONTAINER_SELECTOR(listS); + BOOST_CONTAINER_SELECTOR(mapS); + BOOST_CONTAINER_SELECTOR(setS); + BOOST_CONTAINER_SELECTOR(multisetS); + BOOST_CONTAINER_SELECTOR(hash_mapS); +#if !defined BOOST_NO_SLIST + BOOST_CONTAINER_SELECTOR(slistS); +#endif + + template + struct container_gen { + typedef typename container_selector::type Select; + typedef typename Select:: template bind_::type type; + }; + +#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + template + struct parallel_edge_traits { }; + + template <> + struct parallel_edge_traits { + typedef allow_parallel_edge_tag type; }; + + template <> + struct parallel_edge_traits { + typedef allow_parallel_edge_tag type; }; + +#if !defined BOOST_NO_SLIST + template <> + struct parallel_edge_traits { + typedef allow_parallel_edge_tag type; }; +#endif + + template <> + struct parallel_edge_traits { + typedef disallow_parallel_edge_tag type; }; + + template <> + struct parallel_edge_traits { + typedef allow_parallel_edge_tag type; }; + + template <> + struct parallel_edge_traits { + typedef disallow_parallel_edge_tag type; + }; + + // mapS is obsolete, replaced with setS + template <> + struct parallel_edge_traits { + typedef disallow_parallel_edge_tag type; }; + + template <> + struct parallel_edge_traits { + typedef disallow_parallel_edge_tag type; + }; + + template <> + struct parallel_edge_traits { + typedef allow_parallel_edge_tag type; + }; + + template <> + struct parallel_edge_traits { + typedef allow_parallel_edge_tag type; + }; + + namespace detail { + template struct is_random_access { + enum { value = false}; + typedef mpl::false_ type; + }; + template <> + struct is_random_access { + enum { value = true }; + typedef mpl::true_ type; + }; + + } // namespace detail + + + + //=========================================================================== + // The adjacency_list_traits class, which provides a way to access + // some of the associated types of an adjacency_list type without + // having to first create the adjacency_list type. This is useful + // when trying to create interior vertex or edge properties who's + // value type is a vertex or edge descriptor. + + template + struct adjacency_list_traits + { + typedef typename detail::is_random_access::type + is_rand_access; + typedef typename DirectedS::is_bidir_t is_bidir; + typedef typename DirectedS::is_directed_t is_directed; + + typedef typename mpl::if_::type + >::type directed_category; + + typedef typename parallel_edge_traits::type + edge_parallel_category; + + typedef std::size_t vertices_size_type; + typedef void* vertex_ptr; + typedef typename mpl::if_::type vertex_descriptor; + typedef detail::edge_desc_impl + edge_descriptor; + + private: + // Logic to figure out the edges_size_type + struct dummy {}; + typedef typename container_gen::type EdgeContainer; + typedef typename DirectedS::is_bidir_t BidirectionalT; + typedef typename DirectedS::is_directed_t DirectedT; + typedef typename mpl::and_::type >::type on_edge_storage; + public: + typedef typename mpl::if_::type edges_size_type; + + }; + +} // namespace boost + +#include + +namespace boost { + + //=========================================================================== + // The adjacency_list class. + // + + template + class adjacency_list + : public detail::adj_list_gen< + adjacency_list, + VertexListS, OutEdgeListS, DirectedS, +#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES) + typename detail::retag_property_list::type, + typename detail::retag_property_list::type, +#else + VertexProperty, EdgeProperty, +#endif + GraphProperty, EdgeListS>::type, + // Support for named vertices + public graph::maybe_named_graph< + adjacency_list, + typename adjacency_list_traits::vertex_descriptor, + VertexProperty> + { + public: +#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES) + typedef typename graph_detail::graph_prop::property graph_property_type; + typedef typename graph_detail::graph_prop::bundle graph_bundled; + + typedef typename graph_detail::vertex_prop::property vertex_property_type; + typedef typename graph_detail::vertex_prop::bundle vertex_bundled; + + typedef typename graph_detail::edge_prop::property edge_property_type; + typedef typename graph_detail::edge_prop::bundle edge_bundled; +#else + typedef GraphProperty graph_property_type; + typedef no_graph_bundle graph_bundled; + + typedef VertexProperty vertex_property_type; + typedef no_vertex_bundle vertex_bundled; + + typedef EdgeProperty edge_property_type; + typedef no_edge_bundle edge_bundled; +#endif + + private: + typedef adjacency_list self; + typedef typename detail::adj_list_gen< + self, VertexListS, OutEdgeListS, DirectedS, + vertex_property_type, edge_property_type, GraphProperty, EdgeListS + >::type Base; + + public: + typedef typename Base::stored_vertex stored_vertex; + typedef typename Base::vertices_size_type vertices_size_type; + typedef typename Base::edges_size_type edges_size_type; + typedef typename Base::degree_size_type degree_size_type; + typedef typename Base::vertex_descriptor vertex_descriptor; + typedef typename Base::edge_descriptor edge_descriptor; + typedef OutEdgeListS out_edge_list_selector; + typedef VertexListS vertex_list_selector; + typedef DirectedS directed_selector; + typedef EdgeListS edge_list_selector; + + + adjacency_list(const GraphProperty& p = GraphProperty()) + : m_property(new graph_property_type(p)) + { } + + adjacency_list(const adjacency_list& x) + : Base(x), m_property(new graph_property_type(*x.m_property)) + { } + + adjacency_list& operator=(const adjacency_list& x) { + // TBD: probably should give the strong guarantee + if (&x != this) { + Base::operator=(x); + + // Copy/swap the ptr since we can't just assign it... + property_ptr p(new graph_property_type(*x.m_property)); + m_property.swap(p); + } + return *this; + } + + // Required by Mutable Graph + adjacency_list(vertices_size_type num_vertices, + const GraphProperty& p = GraphProperty()) + : Base(num_vertices), m_property(new graph_property_type(p)) + { } + +#if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 + // Required by Iterator Constructible Graph + template + adjacency_list(EdgeIterator first, EdgeIterator last, + vertices_size_type n, + edges_size_type = 0, + const GraphProperty& p = GraphProperty()) + : Base(n, first, last), m_property(new graph_property_type(p)) + { } + + template + adjacency_list(EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter, + vertices_size_type n, + edges_size_type = 0, + const GraphProperty& p = GraphProperty()) + : Base(n, first, last, ep_iter), m_property(new graph_property_type(p)) + { } +#endif + + void swap(adjacency_list& x) { + // Is there a more efficient way to do this? + adjacency_list tmp(x); + x = *this; + *this = tmp; + } + + void clear() + { + this->clearing_graph(); + Base::clear(); + } + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + // Directly access a vertex or edge bundle + vertex_bundled& operator[](vertex_descriptor v) + { return get(vertex_bundle, *this)[v]; } + + const vertex_bundled& operator[](vertex_descriptor v) const + { return get(vertex_bundle, *this)[v]; } + + edge_bundled& operator[](edge_descriptor e) + { return get(edge_bundle, *this)[e]; } + + const edge_bundled& operator[](edge_descriptor e) const + { return get(edge_bundle, *this)[e]; } + + graph_bundled& operator[](graph_bundle_t) + { return get_property(*this); } + + graph_bundled const& operator[](graph_bundle_t) const + { return get_property(*this); } +#endif + + // protected: (would be protected if friends were more portable) + typedef scoped_ptr property_ptr; + property_ptr m_property; + }; + +#define ADJLIST_PARAMS \ + typename OEL, typename VL, typename D, typename VP, typename EP, \ + typename GP, typename EL +#define ADJLIST adjacency_list + + template + inline void set_property(ADJLIST& g, Tag, Value const& value) { + get_property_value(*g.m_property, Tag()) = value; + } + + template + inline typename graph_property::type& + get_property(ADJLIST& g, Tag) { + return get_property_value(*g.m_property, Tag()); + } + + template + inline typename graph_property::type const& + get_property(ADJLIST const& g, Tag) { + return get_property_value(*g.m_property, Tag()); + } + + // dwa 09/25/00 - needed to be more explicit so reverse_graph would work. + template + inline Vertex + source(const detail::edge_base& e, + const adjacency_list&) + { + return e.m_source; + } + + template + inline Vertex + target(const detail::edge_base& e, + const adjacency_list&) + { + return e.m_target; + } + + // Support for bundled properties +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + template + inline + typename property_map, T Bundle::*>::type + get(T Bundle::* p, adjacency_list& g) + { + typedef typename property_map, T Bundle::*>::type + result_type; + return result_type(&g, p); + } + + template + inline + typename property_map, T Bundle::*>::const_type + get(T Bundle::* p, adjacency_list const & g) + { + typedef typename property_map, T Bundle::*>::const_type + result_type; + return result_type(&g, p); + } + + template + inline T + get(T Bundle::* p, adjacency_list const & g, const Key& key) + { + return get(get(p, g), key); + } + + template + inline void + put(T Bundle::* p, adjacency_list& g, const Key& key, const T& value) + { + put(get(p, g), key, value); + } + +#endif + +// Mutability Traits +template +struct graph_mutability_traits { + typedef mutable_property_graph_tag category; +}; + +// Can't remove vertices from adjacency lists with VL==vecS +template +struct graph_mutability_traits< adjacency_list > { + typedef add_only_property_graph_tag category; +}; +#undef ADJLIST_PARAMS +#undef ADJLIST + + +} // namespace boost + + +#endif // BOOST_GRAPH_ADJACENCY_LIST_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_list_io.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_list_io.hpp new file mode 100644 index 0000000000..91b0b465d7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_list_io.hpp @@ -0,0 +1,406 @@ +//======================================================================= +// Copyright 2001 Universite Joseph Fourier, Grenoble. +// Author: Francois Faure +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_ADJACENCY_LIST_IO_HPP +#define BOOST_GRAPH_ADJACENCY_LIST_IO_HPP + +#include +#include +#include +#include +#include + +// Method read to parse an adjacency list from an input stream. Examples: +// cin >> read( G ); +// cin >> read( G, NodePropertySubset(), EdgepropertySubset() ); +// +// Method write to print an adjacency list to an output stream. Examples: +// cout << write( G ); +// cout << write( G, NodePropertySubset(), EdgepropertySubset() ); + +namespace boost { + +/* outline + - basic property input + - get property subset + - graph parser + - property printer + - graph printer + - user methods +*/ + +//=========================================================================== +// basic property input + +template +std::istream& operator >> ( std::istream& in, property& p ) +{ + in >> p.m_value >> *(static_cast(&p)); // houpla !! + return in; +} + +template +std::istream& operator >> ( std::istream& in, property& p ) +{ + in >> p.m_value; + return in; +} + +inline std::istream& operator >> ( std::istream& in, no_property& ) +{ + return in; +} + +// basic property input +//=========================================================================== +// get property subsets + +// get a single property tagged Stag +template +void get +( property& p, const V& v, Stag s ) +{ + get( *(static_cast(&p)),v,s ); +} + +template +void get +( property& p, const V& v, Stag ) +{ + p.m_value = v; +} + +// get a subset of properties tagged Stag +template +void getSubset +( property& p, const property& s ) +{ + get( p, s.m_value, Stag() ); + getSubset( p, Snext(s) ); +} + +template +void getSubset +( property& p, const property& s) +{ + get( p, s.m_value, Stag() ); +} + +inline void getSubset +( no_property&, const no_property& ) +{ +} + +#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES) +template +void getSubset(T& p, const U& s) +{ + p = s; +} + +template +void getSubset(T&, const no_property&) +{ +} + + +#endif + +// get property subset +//=========================================================================== +// graph parser +typedef enum{ PARSE_NUM_NODES, PARSE_VERTEX, PARSE_EDGE } GraphParserState; + +template +struct GraphParser +{ + + typedef Graph_t Graph; + + GraphParser( Graph* g ): graph(g) + {} + + GraphParser& operator () ( std::istream& in ) + { + typedef typename graph_traits::vertex_descriptor Vertex; + std::vector nodes; + + GraphParserState state = PARSE_VERTEX; + + unsigned int numLine = 1; + char c; + while ( in.get(c) ) + { + if( c== '#' ) skip(in); + else if( c== 'n' ) state = PARSE_NUM_NODES; + else if( c== 'v' ) state = PARSE_VERTEX; + else if( c== 'e' ) state = PARSE_EDGE; + else if( c== '\n' ) numLine++; + else if( !std::isspace(c) ){ + in.putback(c); + if( state == PARSE_VERTEX ){ + VertexPropertySubset readProp; + if( in >> readProp ) + { + VertexProperty vp; + getSubset( vp, readProp ); + nodes.push_back( add_vertex(vp, *graph) ); + } + else + std::cerr<<"read vertex, parse error at line"<> source >> target; + if( in >> readProp ) + { + EdgeProperty ep; + getSubset( ep, readProp ); + add_edge(nodes[source], nodes[target], ep, *graph); + } + else + std::cerr<<"read edge, parse error at line"<> n ){ + for( int i=0; i +struct PropertyPrinter +{ + typedef typename Property::value_type Value; + typedef typename Property::tag_type Tag; + typedef typename Property::next_type Next; + + PropertyPrinter( const Graph& g ):graph(&g){} + + template + PropertyPrinter& operator () ( std::ostream& out, const Val& v ) + { + typename property_map::type ps = get(Tag(), *graph); + out << ps[ v ] <<" "; + PropertyPrinter print(*graph); + print(out, v); + return (*this); + } +private: + const Graph* graph; +}; +#else +template +struct PropertyPrinter +{ + PropertyPrinter( const Graph& g ):graph(&g){} + + template + PropertyPrinter& operator () ( std::ostream& out, const Val& v ) + { + out << (*graph)[ v ] <<" "; + return (*this); + } +private: + const Graph* graph; +}; + +template +struct PropertyPrinter > +{ + PropertyPrinter( const Graph& g ):graph(&g){} + + template + PropertyPrinter& operator () ( std::ostream& out, const Val& v ) + { + typename property_map::type ps = get(Tag(), *graph); + out << ps[ v ] <<" "; + PropertyPrinter print(*graph); + print(out, v); + return (*this); + } +private: + const Graph* graph; +}; +#endif + +template +struct PropertyPrinter +{ + PropertyPrinter( const Graph& ){} + + template + PropertyPrinter& operator () ( std::ostream&, const Val& ){ return *this; } +}; + +// property printer +//========================================================================= +// graph printer + +template +struct EdgePrinter +{ + + typedef Graph_t Graph; + typedef typename graph_traits::vertex_descriptor Vertex; + + EdgePrinter( const Graph& g ) + : graph(g) + {} + + const EdgePrinter& operator () ( std::ostream& out ) const + { + // assign indices to vertices + std::map indices; + int num = 0; + BGL_FORALL_VERTICES_T(v, graph, Graph) { + indices[v] = num++; + } + + // write edges + PropertyPrinter print_Edge(graph); + out << "e" << std::endl; + BGL_FORALL_EDGES_T(e, graph, Graph) { + out << indices[source(e,graph)] << " " << indices[target(e,graph)] << " "; + print_Edge(out,e); + out << std::endl; + } + out << std::endl; + return (*this); + } + +protected: + + const Graph& graph; + +}; + +template +struct GraphPrinter: public EdgePrinter +{ + GraphPrinter( const Graph& g ) + : EdgePrinter(g) + {} + + const GraphPrinter& operator () ( std::ostream& out ) const + { + PropertyPrinter printNode(this->graph); + out << "v"<graph, Graph) { + printNode(out,v); + out << std::endl; + } + + EdgePrinter::operator ()( out ); + return (*this); + } +}; + +template +struct GraphPrinter + : public EdgePrinter +{ + GraphPrinter( const Graph& g ) + : EdgePrinter(g) + {} + + const GraphPrinter& operator () ( std::ostream& out ) const + { + out << "n "<< num_vertices(this->graph) << std::endl; + EdgePrinter::operator ()( out ); + return (*this); + } +}; + +// graph printer +//========================================================================= +// user methods + +/// input stream for reading a graph +template +std::istream& operator >> ( std::istream& in, GraphParser gp ) +{ + gp(in); + return in; +} + +/// graph parser for given subsets of internal vertex and edge properties +template +GraphParser,VP,EP,VPS,EPS> +read( adjacency_list& g, VPS vps, EPS eps ) +{ + return GraphParser,VP,EP,VPS,EPS>(&g); +} + +/// graph parser for all internal vertex and edge properties +template +GraphParser,VP,EP,VP,EP> +read( adjacency_list& g ) +{ + return GraphParser,VP,EP,VP,EP>(&g); +} + + +/// output stream for writing a graph +template +std::ostream& operator << ( std::ostream& out, const GraphPrinter& gp ) +{ + gp(out); + return out; +} + +/// write the graph with given property subsets +template +GraphPrinter,VPS,EPS> +write( const adjacency_list& g, VPS, EPS ) +{ + return GraphPrinter,VPS,EPS>(g); +} + +/// write the graph with all internal vertex and edge properties +template +GraphPrinter,VP,EP> +write( const adjacency_list& g ) +{ + return GraphPrinter,VP,EP>(g); +} + +// user methods +//========================================================================= +}// boost +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_matrix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_matrix.hpp new file mode 100644 index 0000000000..6fb1f48651 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/adjacency_matrix.hpp @@ -0,0 +1,1362 @@ +//======================================================================= +// Copyright 2001 University of Notre Dame. +// Copyright 2006 Trustees of Indiana University +// Authors: Jeremy G. Siek and Douglas Gregor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_ADJACENCY_MATRIX_HPP +#define BOOST_ADJACENCY_MATRIX_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + namespace detail { + + template + class matrix_edge_desc_impl : public edge_desc_impl + { + typedef edge_desc_impl Base; + public: + matrix_edge_desc_impl() { } + matrix_edge_desc_impl(bool exists, Vertex s, Vertex d, + const void* ep = 0) + : Base(s, d, ep), m_exists(exists) { } + bool exists() const { return m_exists; } + private: + bool m_exists; + }; + + struct does_edge_exist { + template + bool operator()(const Edge& e) const { return e.exists(); } + }; + + // Note to self... The int for get_edge_exists and set_edge exist helps + // make these calls unambiguous. + template + bool get_edge_exists(const std::pair& stored_edge, int) { + return stored_edge.first; + } + template + void set_edge_exists( + std::pair& stored_edge, + bool flag, + int + ) { + stored_edge.first = flag; + } + + template + bool get_edge_exists(const EdgeProxy& edge_proxy, ...) { + return edge_proxy; + } + template + EdgeProxy& set_edge_exists(EdgeProxy& edge_proxy, bool flag, ...) { + edge_proxy = flag; + return edge_proxy; // just to avoid never used warning + } + + + // NOTE: These functions collide with the get_property function for + // accessing bundled graph properties. Be excplicit when using them. + template + const EdgeProperty& + get_edge_property(const std::pair& stored_edge) { + return stored_edge.second; + } + template + EdgeProperty& + get_edge_property(std::pair& stored_edge) { + return stored_edge.second; + } + + template + inline void + set_edge_property(std::pair& stored_edge, + const EdgeProperty& ep, int) { + stored_edge.second = ep; + } + + inline const no_property& get_edge_property(const char&) { + static no_property s_prop; + return s_prop; + } + inline no_property& get_edge_property(char&) { + static no_property s_prop; + return s_prop; + } + template + inline void set_edge_property(EdgeProxy, const EdgeProperty&, ...) {} + + //======================================================================= + // Directed Out Edge Iterator + + template < + typename VertexDescriptor, typename MatrixIter + , typename VerticesSizeType, typename EdgeDescriptor + > + struct dir_adj_matrix_out_edge_iter + : iterator_adaptor< + dir_adj_matrix_out_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > + { + typedef iterator_adaptor< + dir_adj_matrix_out_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > super_t; + + dir_adj_matrix_out_edge_iter() { } + + dir_adj_matrix_out_edge_iter( + const MatrixIter& i + , const VertexDescriptor& src + , const VerticesSizeType& n + ) + : super_t(i), m_src(src), m_targ(0), m_n(n) + { } + + void increment() { + ++this->base_reference(); + ++m_targ; + } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor(get_edge_exists(*this->base(), 0), + m_src, m_targ, + &get_edge_property(*this->base())); + } + VertexDescriptor m_src, m_targ; + VerticesSizeType m_n; + }; + + //======================================================================= + // Directed In Edge Iterator + + template < + typename VertexDescriptor, typename MatrixIter + , typename VerticesSizeType, typename EdgeDescriptor + > + struct dir_adj_matrix_in_edge_iter + : iterator_adaptor< + dir_adj_matrix_in_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > + { + typedef iterator_adaptor< + dir_adj_matrix_in_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > super_t; + + dir_adj_matrix_in_edge_iter() { } + + dir_adj_matrix_in_edge_iter( + const MatrixIter& i + , const MatrixIter& last + , const VertexDescriptor& tgt + , const VerticesSizeType& n + ) + : super_t(i), m_last(last), m_src(0), m_targ(tgt), m_n(n) + { } + + void increment() { + if (VerticesSizeType(m_last - this->base_reference()) >= m_n) { + this->base_reference() += m_n; + ++m_src; + } else { + this->base_reference() = m_last; + } + } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor(get_edge_exists(*this->base(), 0), + m_src, m_targ, + &get_edge_property(*this->base())); + } + MatrixIter m_last; + VertexDescriptor m_src, m_targ; + VerticesSizeType m_n; + }; + + //======================================================================= + // Undirected Out Edge Iterator + + template < + typename VertexDescriptor, typename MatrixIter + , typename VerticesSizeType, typename EdgeDescriptor + > + struct undir_adj_matrix_out_edge_iter + : iterator_adaptor< + undir_adj_matrix_out_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > + { + typedef iterator_adaptor< + undir_adj_matrix_out_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > super_t; + + undir_adj_matrix_out_edge_iter() { } + + undir_adj_matrix_out_edge_iter( + const MatrixIter& i + , const VertexDescriptor& src + , const VerticesSizeType& n + ) + : super_t(i), m_src(src), m_inc(src), m_targ(0), m_n(n) + {} + + void increment() + { + if (m_targ < m_src) // first half + { + ++this->base_reference(); + } + else if (m_targ < m_n - 1) + { // second half + ++m_inc; + this->base_reference() += m_inc; + } + else + { // past-the-end + this->base_reference() += m_n - m_src; + } + ++m_targ; + } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor(get_edge_exists(*this->base(), 0), + m_src, m_targ, + &get_edge_property(*this->base())); + } + + VertexDescriptor m_src, m_inc, m_targ; + VerticesSizeType m_n; + }; + + //======================================================================= + // Undirected In Edge Iterator + + template < + typename VertexDescriptor, typename MatrixIter + , typename VerticesSizeType, typename EdgeDescriptor + > + struct undir_adj_matrix_in_edge_iter + : iterator_adaptor< + undir_adj_matrix_in_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > + { + typedef iterator_adaptor< + undir_adj_matrix_in_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > super_t; + + undir_adj_matrix_in_edge_iter() { } + + undir_adj_matrix_in_edge_iter( + const MatrixIter& i + , const VertexDescriptor& src + , const VerticesSizeType& n + ) + : super_t(i), m_src(src), m_inc(src), m_targ(0), m_n(n) + {} + + void increment() + { + if (m_targ < m_src) // first half + { + ++this->base_reference(); + } + else if (m_targ < m_n - 1) + { // second half + ++m_inc; + this->base_reference() += m_inc; + } + else + { // past-the-end + this->base_reference() += m_n - m_src; + } + ++m_targ; + } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor(get_edge_exists(*this->base(), 0), + m_targ, m_src, + &get_edge_property(*this->base())); + } + + VertexDescriptor m_src, m_inc, m_targ; + VerticesSizeType m_n; + }; + + //======================================================================= + // Edge Iterator + + template + struct adj_matrix_edge_iter + : iterator_adaptor< + adj_matrix_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > + { + typedef iterator_adaptor< + adj_matrix_edge_iter + , MatrixIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , std::ptrdiff_t + > super_t; + + adj_matrix_edge_iter() { } + + adj_matrix_edge_iter(const MatrixIter& i, const MatrixIter& start, const VerticesSizeType& n) + : super_t(i), m_start(start), m_src(0), m_targ(0), m_n(n) { } + + void increment() + { + increment_dispatch(this->base_reference(), Directed()); + } + + void increment_dispatch(MatrixIter& i, directedS) + { + ++i; + if (m_targ == m_n - 1) + { + m_targ = 0; + ++m_src; + } + else + { + ++m_targ; + } + } + + void increment_dispatch(MatrixIter& i, undirectedS) + { + ++i; + if (m_targ == m_src) + { + m_targ = 0; + ++m_src; + } + else + { + ++m_targ; + } + } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor(get_edge_exists(*this->base(), 0), + m_src, m_targ, + &get_edge_property(*this->base())); + } + + MatrixIter m_start; + VerticesSizeType m_src, m_targ, m_n; + }; + + } // namespace detail + + //========================================================================= + // Adjacency Matrix Traits + template + class adjacency_matrix_traits { + typedef typename Directed::is_directed_t is_directed; + public: + // The bidirectionalS tag is not allowed with the adjacency_matrix + // graph type. Instead, use directedS, which also provides the + // functionality required for a Bidirectional Graph (in_edges, + // in_degree, etc.). +#if !defined(_MSC_VER) || _MSC_VER > 1300 + BOOST_STATIC_ASSERT(type_traits::ice_not<(is_same::value)>::value); +#endif + + typedef typename mpl::if_::type + directed_category; + + typedef disallow_parallel_edge_tag edge_parallel_category; + + typedef std::size_t vertex_descriptor; + + typedef detail::matrix_edge_desc_impl edge_descriptor; + }; + + struct adjacency_matrix_class_tag { }; + + struct adj_matrix_traversal_tag : + public virtual adjacency_matrix_tag, + public virtual vertex_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual edge_list_graph_tag { }; + + //========================================================================= + // Adjacency Matrix Class + template > + class adjacency_matrix { + typedef adjacency_matrix self; + typedef adjacency_matrix_traits Traits; + + public: +#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 + // The bidirectionalS tag is not allowed with the adjacency_matrix + // graph type. Instead, use directedS, which also provides the + // functionality required for a Bidirectional Graph (in_edges, + // in_degree, etc.). + BOOST_STATIC_ASSERT(!(is_same::value)); +#endif + +#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES) + typedef typename graph_detail::graph_prop::property graph_property_type; + typedef typename graph_detail::graph_prop::bundle graph_bundled; + + typedef typename graph_detail::vertex_prop::property vertex_property_type; + typedef typename graph_detail::vertex_prop::bundle vertex_bundled; + + typedef typename graph_detail::edge_prop::property edge_property_type; + typedef typename graph_detail::edge_prop::bundle edge_bundled; +#else + typedef GraphProperty graph_property_type; + typedef no_graph_bundle graph_bundled; + + typedef VertexProperty vertex_property_type; + typedef no_vertex_bundle vertex_bundled; + + typedef EdgeProperty edge_property_type; + typedef no_edge_bundle edge_bundled; +#endif + + public: // should be private + typedef typename mpl::if_::type, + std::pair, char>::type StoredEdge; +#if (defined(BOOST_MSVC) && BOOST_MSVC <= 1300) || defined(BOOST_NO_STD_ALLOCATOR) + typedef std::vector Matrix; +#else + // This causes internal compiler error for MSVC + typedef typename Allocator::template rebind::other Alloc; + typedef std::vector Matrix; +#endif + typedef typename Matrix::iterator MatrixIter; + typedef typename Matrix::size_type size_type; + public: + // Graph concept required types + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::edge_descriptor edge_descriptor; + typedef typename Traits::directed_category directed_category; + typedef typename Traits::edge_parallel_category edge_parallel_category; + typedef adj_matrix_traversal_tag traversal_category; + + static vertex_descriptor null_vertex() + { + return (std::numeric_limits::max)(); + } + + //private: if friends worked, these would be private + + typedef detail::dir_adj_matrix_out_edge_iter< + vertex_descriptor, MatrixIter, size_type, edge_descriptor + > DirOutEdgeIter; + + typedef detail::undir_adj_matrix_out_edge_iter< + vertex_descriptor, MatrixIter, size_type, edge_descriptor + > UnDirOutEdgeIter; + + typedef typename mpl::if_< + typename Directed::is_directed_t, DirOutEdgeIter, UnDirOutEdgeIter + >::type unfiltered_out_edge_iter; + + typedef detail::dir_adj_matrix_in_edge_iter< + vertex_descriptor, MatrixIter, size_type, edge_descriptor + > DirInEdgeIter; + + typedef detail::undir_adj_matrix_in_edge_iter< + vertex_descriptor, MatrixIter, size_type, edge_descriptor + > UnDirInEdgeIter; + + typedef typename mpl::if_< + typename Directed::is_directed_t, DirInEdgeIter, UnDirInEdgeIter + >::type unfiltered_in_edge_iter; + + typedef detail::adj_matrix_edge_iter< + Directed, MatrixIter, size_type, edge_descriptor + > unfiltered_edge_iter; + + public: + + // IncidenceGraph concept required types + typedef filter_iterator + out_edge_iterator; + + typedef size_type degree_size_type; + + // BidirectionalGraph required types + typedef filter_iterator + in_edge_iterator; + + // AdjacencyGraph required types + typedef typename adjacency_iterator_generator::type adjacency_iterator; + + // VertexListGraph required types + typedef size_type vertices_size_type; + typedef integer_range VertexList; + typedef typename VertexList::iterator vertex_iterator; + + // EdgeListGraph required types + typedef size_type edges_size_type; + typedef filter_iterator< + detail::does_edge_exist, unfiltered_edge_iter + > edge_iterator; + + // PropertyGraph required types + typedef adjacency_matrix_class_tag graph_tag; + + // Constructor required by MutableGraph + adjacency_matrix(vertices_size_type n_vertices, + const GraphProperty& p = GraphProperty()) + : m_matrix(Directed::is_directed ? + (n_vertices * n_vertices) + : (n_vertices * (n_vertices + 1) / 2)), + m_vertex_set(0, n_vertices), + m_vertex_properties(n_vertices), + m_num_edges(0), + m_property(p) { } + + template + adjacency_matrix(EdgeIterator first, + EdgeIterator last, + vertices_size_type n_vertices, + const GraphProperty& p = GraphProperty()) + : m_matrix(Directed::is_directed ? + (n_vertices * n_vertices) + : (n_vertices * (n_vertices + 1) / 2)), + m_vertex_set(0, n_vertices), + m_vertex_properties(n_vertices), + m_num_edges(0), + m_property(p) + { + for (; first != last; ++first) { + add_edge(first->first, first->second, *this); + } + } + + template + adjacency_matrix(EdgeIterator first, + EdgeIterator last, + EdgePropertyIterator ep_iter, + vertices_size_type n_vertices, + const GraphProperty& p = GraphProperty()) + : m_matrix(Directed::is_directed ? + (n_vertices * n_vertices) + : (n_vertices * (n_vertices + 1) / 2)), + m_vertex_set(0, n_vertices), + m_vertex_properties(n_vertices), + m_num_edges(0), + m_property(p) + { + for (; first != last; ++first, ++ep_iter) { + add_edge(first->first, first->second, *ep_iter, *this); + } + } + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + // Directly access a vertex or edge bundle + vertex_bundled& operator[](vertex_descriptor v) + { return get(vertex_bundle, *this)[v]; } + + const vertex_bundled& operator[](vertex_descriptor v) const + { return get(vertex_bundle, *this)[v]; } + + edge_bundled& operator[](edge_descriptor e) + { return get(edge_bundle, *this)[e]; } + + const edge_bundled& operator[](edge_descriptor e) const + { return get(edge_bundle, *this)[e]; } + + graph_bundled& operator[](graph_bundle_t) + { return get_property(*this); } + + const graph_bundled& operator[](graph_bundle_t) const + { return get_property(*this); } +#endif + + //private: if friends worked, these would be private + + typename Matrix::const_reference + get_edge(vertex_descriptor u, vertex_descriptor v) const { + if (Directed::is_directed) + return m_matrix[u * m_vertex_set.size() + v]; + else { + if (v > u) + std::swap(u, v); + return m_matrix[u * (u + 1)/2 + v]; + } + } + typename Matrix::reference + get_edge(vertex_descriptor u, vertex_descriptor v) { + if (Directed::is_directed) + return m_matrix[u * m_vertex_set.size() + v]; + else { + if (v > u) + std::swap(u, v); + return m_matrix[u * (u + 1)/2 + v]; + } + } + + Matrix m_matrix; + VertexList m_vertex_set; + std::vector m_vertex_properties; + size_type m_num_edges; + graph_property_type m_property; + }; + + //========================================================================= + // Functions required by the AdjacencyMatrix concept + + template + std::pair::edge_descriptor, + bool> + edge(typename adjacency_matrix::vertex_descriptor u, + typename adjacency_matrix::vertex_descriptor v, + const adjacency_matrix& g) + { + bool exists = detail::get_edge_exists(g.get_edge(u,v), 0); + typename adjacency_matrix::edge_descriptor + e(exists, u, v, &detail::get_edge_property(g.get_edge(u,v))); + return std::make_pair(e, exists); + } + + //========================================================================= + // Functions required by the IncidenceGraph concept + + // O(1) + template + std::pair::out_edge_iterator, + typename adjacency_matrix::out_edge_iterator> + out_edges + (typename adjacency_matrix::vertex_descriptor u, + const adjacency_matrix& g_) + { + typedef adjacency_matrix Graph; + Graph& g = const_cast(g_); + typename Graph::vertices_size_type offset = u * g.m_vertex_set.size(); + typename Graph::MatrixIter f = g.m_matrix.begin() + offset; + typename Graph::MatrixIter l = f + g.m_vertex_set.size(); + typename Graph::unfiltered_out_edge_iter + first(f, u, g.m_vertex_set.size()) + , last(l, u, g.m_vertex_set.size()); + detail::does_edge_exist pred; + typedef typename Graph::out_edge_iterator out_edge_iterator; + return std::make_pair(out_edge_iterator(pred, first, last), + out_edge_iterator(pred, last, last)); + } + + // O(1) + template + std::pair< + typename adjacency_matrix::out_edge_iterator, + typename adjacency_matrix::out_edge_iterator> + out_edges + (typename adjacency_matrix::vertex_descriptor u, + const adjacency_matrix& g_) + { + typedef adjacency_matrix Graph; + Graph& g = const_cast(g_); + typename Graph::vertices_size_type offset = u * (u + 1) / 2; + typename Graph::MatrixIter f = g.m_matrix.begin() + offset; + typename Graph::MatrixIter l = g.m_matrix.end(); + + typename Graph::unfiltered_out_edge_iter + first(f, u, g.m_vertex_set.size()) + , last(l, u, g.m_vertex_set.size()); + + detail::does_edge_exist pred; + typedef typename Graph::out_edge_iterator out_edge_iterator; + return std::make_pair(out_edge_iterator(pred, first, last), + out_edge_iterator(pred, last, last)); + } + + // O(N) + template + typename adjacency_matrix::degree_size_type + out_degree(typename adjacency_matrix::vertex_descriptor u, + const adjacency_matrix& g) + { + typename adjacency_matrix::degree_size_type n = 0; + typename adjacency_matrix::out_edge_iterator f, l; + for (boost::tie(f, l) = out_edges(u, g); f != l; ++f) + ++n; + return n; + } + + // O(1) + template + typename adjacency_matrix::vertex_descriptor + source(const detail::matrix_edge_desc_impl& e, + const adjacency_matrix&) + { + return e.m_source; + } + + // O(1) + template + typename adjacency_matrix::vertex_descriptor + target(const detail::matrix_edge_desc_impl& e, + const adjacency_matrix&) + { + return e.m_target; + } + + //========================================================================= + // Functions required by the BidirectionalGraph concept + + // O(1) + template + std::pair::in_edge_iterator, + typename adjacency_matrix::in_edge_iterator> + in_edges + (typename adjacency_matrix::vertex_descriptor u, + const adjacency_matrix& g_) + { + typedef adjacency_matrix Graph; + Graph& g = const_cast(g_); + typename Graph::MatrixIter f = g.m_matrix.begin() + u; + typename Graph::MatrixIter l = g.m_matrix.end(); + typename Graph::unfiltered_in_edge_iter + first(f, l, u, g.m_vertex_set.size()) + , last(l, l, u, g.m_vertex_set.size()); + detail::does_edge_exist pred; + typedef typename Graph::in_edge_iterator in_edge_iterator; + return std::make_pair(in_edge_iterator(pred, first, last), + in_edge_iterator(pred, last, last)); + } + + // O(1) + template + std::pair< + typename adjacency_matrix::in_edge_iterator, + typename adjacency_matrix::in_edge_iterator> + in_edges + (typename adjacency_matrix::vertex_descriptor u, + const adjacency_matrix& g_) + { + typedef adjacency_matrix Graph; + Graph& g = const_cast(g_); + typename Graph::vertices_size_type offset = u * (u + 1) / 2; + typename Graph::MatrixIter f = g.m_matrix.begin() + offset; + typename Graph::MatrixIter l = g.m_matrix.end(); + + typename Graph::unfiltered_in_edge_iter + first(f, u, g.m_vertex_set.size()) + , last(l, u, g.m_vertex_set.size()); + + detail::does_edge_exist pred; + typedef typename Graph::in_edge_iterator in_edge_iterator; + return std::make_pair(in_edge_iterator(pred, first, last), + in_edge_iterator(pred, last, last)); + } + + // O(N) + template + typename adjacency_matrix::degree_size_type + in_degree(typename adjacency_matrix::vertex_descriptor u, + const adjacency_matrix& g) + { + typename adjacency_matrix::degree_size_type n = 0; + typename adjacency_matrix::in_edge_iterator f, l; + for (boost::tie(f, l) = in_edges(u, g); f != l; ++f) + ++n; + return n; + } + + //========================================================================= + // Functions required by the AdjacencyGraph concept + + template + std::pair::adjacency_iterator, + typename adjacency_matrix::adjacency_iterator> + adjacent_vertices + (typename adjacency_matrix::vertex_descriptor u, + const adjacency_matrix& g_) + { + typedef adjacency_matrix Graph; + const Graph& cg = static_cast(g_); + Graph& g = const_cast(cg); + typedef typename Graph::adjacency_iterator adjacency_iterator; + typename Graph::out_edge_iterator first, last; + boost::tie(first, last) = out_edges(u, g); + return std::make_pair(adjacency_iterator(first, &g), + adjacency_iterator(last, &g)); + } + + //========================================================================= + // Functions required by the VertexListGraph concept + + template + std::pair::vertex_iterator, + typename adjacency_matrix::vertex_iterator> + vertices(const adjacency_matrix& g_) { + typedef adjacency_matrix Graph; + Graph& g = const_cast(g_); + return std::make_pair(g.m_vertex_set.begin(), g.m_vertex_set.end()); + } + + template + typename adjacency_matrix::vertices_size_type + num_vertices(const adjacency_matrix& g) { + return g.m_vertex_set.size(); + } + + //========================================================================= + // Functions required by the EdgeListGraph concept + + template + std::pair::edge_iterator, + typename adjacency_matrix::edge_iterator> + edges(const adjacency_matrix& g_) + { + typedef adjacency_matrix Graph; + Graph& g = const_cast(g_); + + typename Graph::unfiltered_edge_iter + first(g.m_matrix.begin(), g.m_matrix.begin(), + g.m_vertex_set.size()), + last(g.m_matrix.end(), g.m_matrix.begin(), + g.m_vertex_set.size()); + detail::does_edge_exist pred; + typedef typename Graph::edge_iterator edge_iterator; + return std::make_pair(edge_iterator(pred, first, last), + edge_iterator(pred, last, last)); + } + + // O(1) + template + typename adjacency_matrix::edges_size_type + num_edges(const adjacency_matrix& g) + { + return g.m_num_edges; + } + + //========================================================================= + // Functions required by the MutableGraph concept + + // O(1) + template + std::pair::edge_descriptor, bool> + add_edge(typename adjacency_matrix::vertex_descriptor u, + typename adjacency_matrix::vertex_descriptor v, + const EP2& ep, + adjacency_matrix& g) + { + typedef typename adjacency_matrix::edge_descriptor + edge_descriptor; + if (detail::get_edge_exists(g.get_edge(u,v), 0) == false) { + ++(g.m_num_edges); + detail::set_edge_property(g.get_edge(u,v), EP(ep), 0); + detail::set_edge_exists(g.get_edge(u,v), true, 0); + return std::make_pair + (edge_descriptor(true, u, v, &detail::get_edge_property(g.get_edge(u,v))), + true); + } else + return std::make_pair + (edge_descriptor(true, u, v, &detail::get_edge_property(g.get_edge(u,v))), + false); + } + // O(1) + template + std::pair::edge_descriptor, bool> + add_edge(typename adjacency_matrix::vertex_descriptor u, + typename adjacency_matrix::vertex_descriptor v, + adjacency_matrix& g) + { + EP ep; + return add_edge(u, v, ep, g); + } + + // O(1) + template + void + remove_edge(typename adjacency_matrix::vertex_descriptor u, + typename adjacency_matrix::vertex_descriptor v, + adjacency_matrix& g) + { + // Don'remove the edge unless it already exists. + if(detail::get_edge_exists(g.get_edge(u,v), 0)) { + --(g.m_num_edges); + detail::set_edge_exists(g.get_edge(u,v), false, 0); + } + } + + // O(1) + template + void + remove_edge(typename adjacency_matrix::edge_descriptor e, + adjacency_matrix& g) + { + remove_edge(source(e, g), target(e, g), g); + } + + + template + inline typename adjacency_matrix::vertex_descriptor + add_vertex(adjacency_matrix& g) { + // UNDER CONSTRUCTION + assert(false); + return *vertices(g).first; + } + + template + inline typename adjacency_matrix::vertex_descriptor + add_vertex(const VP2& /*vp*/, adjacency_matrix& g) { + // UNDER CONSTRUCTION + assert(false); + return *vertices(g).first; + } + + template + inline void + remove_vertex(typename adjacency_matrix::vertex_descriptor /*u*/, + adjacency_matrix& /*g*/) + { + // UNDER CONSTRUCTION + assert(false); + } + + // O(V) + template + void + clear_vertex + (typename adjacency_matrix::vertex_descriptor u, + adjacency_matrix& g) + { + typename adjacency_matrix::vertex_iterator + vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + remove_edge(u, *vi, g); + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + remove_edge(*vi, u, g); + } + + // O(V) + template + void + clear_vertex + (typename adjacency_matrix::vertex_descriptor u, + adjacency_matrix& g) + { + typename adjacency_matrix::vertex_iterator + vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + remove_edge(u, *vi, g); + } + + //========================================================================= + // Functions required by the PropertyGraph concept + + // O(1) + template + inline void + set_property(adjacency_matrix& g, Tag, const Value& value) + { + get_property_value(g.m_property, Tag()) = value; + } + + template + inline typename graph_property, Tag>::type& + get_property(adjacency_matrix& g, Tag) + { + return get_property_value(g.m_property, Tag()); + } + + template + inline const typename graph_property, Tag>::type& + get_property(const adjacency_matrix& g, Tag) + { + return get_property_value(g.m_property, Tag()); + } + + //========================================================================= + // Vertex Property Map + + template + class adj_matrix_vertex_property_map + : public put_get_helper > + { + public: + typedef T value_type; + typedef R reference; + typedef Vertex key_type; + typedef boost::lvalue_property_map_tag category; + adj_matrix_vertex_property_map() { } + adj_matrix_vertex_property_map(GraphPtr g) : m_g(g) { } + inline reference operator[](key_type v) const { + return get_property_value(m_g->m_vertex_properties[v], Tag()); + } + GraphPtr m_g; + }; + + template + struct adj_matrix_vertex_id_map + : public boost::put_get_helper > + { + typedef Vertex value_type; + typedef Vertex reference; + typedef Vertex key_type; + typedef boost::readable_property_map_tag category; + adj_matrix_vertex_id_map() { } + template + inline adj_matrix_vertex_id_map(const Graph&) { } + inline value_type operator[](key_type v) const { return v; } + }; + + namespace detail { + + struct adj_matrix_any_vertex_pa { + template + struct bind_ { + typedef typename property_value::type Value; + typedef typename boost::graph_traits::vertex_descriptor Vertex; + + typedef adj_matrix_vertex_property_map type; + typedef adj_matrix_vertex_property_map const_type; + }; + }; + struct adj_matrix_id_vertex_pa { + template + struct bind_ { + typedef typename Graph::vertex_descriptor Vertex; + typedef adj_matrix_vertex_id_map type; + typedef adj_matrix_vertex_id_map const_type; + }; + }; + + template + struct adj_matrix_choose_vertex_pa_helper { + typedef adj_matrix_any_vertex_pa type; + }; + template <> + struct adj_matrix_choose_vertex_pa_helper { + typedef adj_matrix_id_vertex_pa type; + }; + + template + struct adj_matrix_choose_vertex_pa { + typedef typename adj_matrix_choose_vertex_pa_helper::type Helper; + typedef typename Helper::template bind_ Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + + struct adj_matrix_vertex_property_selector { + template + struct bind_ { + typedef adj_matrix_choose_vertex_pa Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + }; + + } // namespace detail + + template <> + struct vertex_property_selector { + typedef detail::adj_matrix_vertex_property_selector type; + }; + + //========================================================================= + // Edge Property Map + + + template + class adj_matrix_edge_property_map + : public put_get_helper > + { + public: + typedef T value_type; + typedef R reference; + typedef detail::matrix_edge_desc_impl key_type; + typedef boost::lvalue_property_map_tag category; + inline reference operator[](key_type e) const { + Property& p = *(Property*)e.get_property(); + return get_property_value(p, Tag()); + } + }; + struct adj_matrix_edge_property_selector { + template + struct bind_ { + typedef typename property_value::type T; + typedef typename Graph::vertex_descriptor Vertex; + typedef adj_matrix_edge_property_map type; + typedef adj_matrix_edge_property_map const_type; + }; + }; + template <> + struct edge_property_selector { + typedef adj_matrix_edge_property_selector type; + }; + + //========================================================================= + // Functions required by PropertyGraph + + namespace detail { + + template + typename boost::property_map, + Property>::type + get_dispatch(adjacency_matrix& g, Property, + vertex_property_tag) + { + typedef adjacency_matrix Graph; + typedef typename boost::property_map, + Property>::type PA; + return PA(&g); + } + template + typename boost::property_map, + Property>::type + get_dispatch(adjacency_matrix&, Property, + edge_property_tag) + { + typedef typename boost::property_map, + Property>::type PA; + return PA(); + } + template + typename boost::property_map, + Property>::const_type + get_dispatch(const adjacency_matrix& g, Property, + vertex_property_tag) + { + typedef adjacency_matrix Graph; + typedef typename boost::property_map, + Property>::const_type PA; + return PA(&g); + } + template + typename boost::property_map, + Property>::const_type + get_dispatch(const adjacency_matrix&, Property, + edge_property_tag) + { + typedef typename boost::property_map, + Property>::const_type PA; + return PA(); + } + + } // namespace detail + + template + inline + typename property_map, Property>::type + get(Property p, adjacency_matrix& g) + { + typedef typename property_kind::type Kind; + return detail::get_dispatch(g, p, Kind()); + } + + template + inline + typename property_map, Property>::const_type + get(Property p, const adjacency_matrix& g) + { + typedef typename property_kind::type Kind; + return detail::get_dispatch(g, p, Kind()); + } + + template + inline + typename property_traits< + typename property_map, Property>::const_type + >::value_type + get(Property p, const adjacency_matrix& g, + const Key& key) + { + return get(get(p, g), key); + } + + template + inline void + put(Property p, adjacency_matrix& g, + const Key& key, const Value& value) + { + typedef adjacency_matrix Graph; + typedef typename boost::property_map::type Map; + Map pmap = get(p, g); + put(pmap, key, value); + } + + //========================================================================= + // Other Functions + + template + typename adjacency_matrix::vertex_descriptor + vertex(typename adjacency_matrix::vertices_size_type n, + const adjacency_matrix&) + { + return n; + } + + // Support for bundled properties +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + template + inline + typename property_map, + T Bundle::*>::type + get(T Bundle::* p, adjacency_matrix& g) + { + typedef typename property_map, + T Bundle::*>::type + result_type; + return result_type(&g, p); + } + + template + inline + typename property_map, + T Bundle::*>::const_type + get(T Bundle::* p, adjacency_matrix const & g) + { + typedef typename property_map, + T Bundle::*>::const_type + result_type; + return result_type(&g, p); + } + + template + inline T + get(T Bundle::* p, adjacency_matrix const & g, + const Key& key) + { + return get(get(p, g), key); + } + + template + inline void + put(T Bundle::* p, adjacency_matrix& g, + const Key& key, const T& value) + { + put(get(p, g), key, value); + } + +#endif + +#define ADJMAT_PARAMS \ + typename D, typename VP, typename EP, typename GP, typename A +#define ADJMAT adjacency_matrix +template +struct graph_mutability_traits { + typedef mutable_edge_property_graph_tag category; +}; +#undef ADJMAT_PARAMS +#undef ADJMAT + + +} // namespace boost + +#endif // BOOST_ADJACENCY_MATRIX_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/astar_search.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/astar_search.hpp new file mode 100644 index 0000000000..ae60113da4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/astar_search.hpp @@ -0,0 +1,378 @@ + + +// +//======================================================================= +// Copyright (c) 2004 Kristopher Beevers +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +#ifndef BOOST_GRAPH_ASTAR_SEARCH_HPP +#define BOOST_GRAPH_ASTAR_SEARCH_HPP + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace boost { + + + template + struct AStarHeuristicConcept { + void constraints() + { + function_requires< CopyConstructibleConcept >(); + h(u); + } + Heuristic h; + typename graph_traits::vertex_descriptor u; + }; + + + template + class astar_heuristic : public std::unary_function< + typename graph_traits::vertex_descriptor, CostType> + { + public: + typedef typename graph_traits::vertex_descriptor Vertex; + astar_heuristic() {} + CostType operator()(Vertex u) { return static_cast(0); } + }; + + + + template + struct AStarVisitorConcept { + void constraints() + { + function_requires< CopyConstructibleConcept >(); + vis.initialize_vertex(u, g); + vis.discover_vertex(u, g); + vis.examine_vertex(u, g); + vis.examine_edge(e, g); + vis.edge_relaxed(e, g); + vis.edge_not_relaxed(e, g); + vis.black_target(e, g); + vis.finish_vertex(u, g); + } + Visitor vis; + Graph g; + typename graph_traits::vertex_descriptor u; + typename graph_traits::edge_descriptor e; + }; + + + template + class astar_visitor : public bfs_visitor { + public: + astar_visitor() {} + astar_visitor(Visitors vis) + : bfs_visitor(vis) {} + + template + void edge_relaxed(Edge e, const Graph& g) { + invoke_visitors(this->m_vis, e, g, on_edge_relaxed()); + } + template + void edge_not_relaxed(Edge e, const Graph& g) { + invoke_visitors(this->m_vis, e, g, on_edge_not_relaxed()); + } + private: + template + void tree_edge(Edge e, const Graph& g) {} + template + void non_tree_edge(Edge e, const Graph& g) {} + }; + template + astar_visitor + make_astar_visitor(Visitors vis) { + return astar_visitor(vis); + } + typedef astar_visitor<> default_astar_visitor; + + + namespace detail { + + template + struct astar_bfs_visitor + { + + typedef typename property_traits::value_type C; + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typedef typename property_traits::value_type distance_type; + + astar_bfs_visitor(AStarHeuristic h, UniformCostVisitor vis, + UpdatableQueue& Q, PredecessorMap p, + CostMap c, DistanceMap d, WeightMap w, + ColorMap col, BinaryFunction combine, + BinaryPredicate compare, C zero) + : m_h(h), m_vis(vis), m_Q(Q), m_predecessor(p), m_cost(c), + m_distance(d), m_weight(w), m_color(col), + m_combine(combine), m_compare(compare), m_zero(zero) {} + + + template + void initialize_vertex(Vertex u, const Graph& g) { + m_vis.initialize_vertex(u, g); + } + template + void discover_vertex(Vertex u, const Graph& g) { + m_vis.discover_vertex(u, g); + } + template + void examine_vertex(Vertex u, const Graph& g) { + m_vis.examine_vertex(u, g); + } + template + void finish_vertex(Vertex u, const Graph& g) { + m_vis.finish_vertex(u, g); + } + template + void examine_edge(Edge e, const Graph& g) { + if (m_compare(get(m_weight, e), m_zero)) + BOOST_THROW_EXCEPTION(negative_edge()); + m_vis.examine_edge(e, g); + } + template + void non_tree_edge(Edge, const Graph&) {} + + + + template + void tree_edge(Edge e, const Graph& g) { + m_decreased = relax(e, g, m_weight, m_predecessor, m_distance, + m_combine, m_compare); + + if(m_decreased) { + m_vis.edge_relaxed(e, g); + put(m_cost, target(e, g), + m_combine(get(m_distance, target(e, g)), + m_h(target(e, g)))); + } else + m_vis.edge_not_relaxed(e, g); + } + + + template + void gray_target(Edge e, const Graph& g) { + m_decreased = relax(e, g, m_weight, m_predecessor, m_distance, + m_combine, m_compare); + + if(m_decreased) { + put(m_cost, target(e, g), + m_combine(get(m_distance, target(e, g)), + m_h(target(e, g)))); + m_Q.update(target(e, g)); + m_vis.edge_relaxed(e, g); + } else + m_vis.edge_not_relaxed(e, g); + } + + + template + void black_target(Edge e, const Graph& g) { + m_decreased = relax(e, g, m_weight, m_predecessor, m_distance, + m_combine, m_compare); + + if(m_decreased) { + m_vis.edge_relaxed(e, g); + put(m_cost, target(e, g), + m_combine(get(m_distance, target(e, g)), + m_h(target(e, g)))); + m_Q.push(target(e, g)); + put(m_color, target(e, g), Color::gray()); + m_vis.black_target(e, g); + } else + m_vis.edge_not_relaxed(e, g); + } + + + + AStarHeuristic m_h; + UniformCostVisitor m_vis; + UpdatableQueue& m_Q; + PredecessorMap m_predecessor; + CostMap m_cost; + DistanceMap m_distance; + WeightMap m_weight; + ColorMap m_color; + BinaryFunction m_combine; + BinaryPredicate m_compare; + bool m_decreased; + C m_zero; + + }; + + } // namespace detail + + + + template + inline void + astar_search_no_init + (const VertexListGraph &g, + typename graph_traits::vertex_descriptor s, + AStarHeuristic h, AStarVisitor vis, + PredecessorMap predecessor, CostMap cost, + DistanceMap distance, WeightMap weight, + ColorMap color, VertexIndexMap index_map, + CompareFunction compare, CombineFunction combine, + CostInf /*inf*/, CostZero zero) + { + typedef typename graph_traits::vertex_descriptor + Vertex; + typedef boost::vector_property_map IndexInHeapMap; + IndexInHeapMap index_in_heap(index_map); + typedef d_ary_heap_indirect + MutableQueue; + MutableQueue Q(cost, index_in_heap, compare); + + detail::astar_bfs_visitor + bfs_vis(h, vis, Q, predecessor, cost, distance, weight, + color, combine, compare, zero); + + breadth_first_visit(g, s, Q, bfs_vis, color); + } + + + // Non-named parameter interface + template + inline void + astar_search + (const VertexListGraph &g, + typename graph_traits::vertex_descriptor s, + AStarHeuristic h, AStarVisitor vis, + PredecessorMap predecessor, CostMap cost, + DistanceMap distance, WeightMap weight, + VertexIndexMap index_map, ColorMap color, + CompareFunction compare, CombineFunction combine, + CostInf inf, CostZero zero) + { + + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + put(color, *ui, Color::white()); + put(distance, *ui, inf); + put(cost, *ui, inf); + put(predecessor, *ui, *ui); + vis.initialize_vertex(*ui, g); + } + put(distance, s, zero); + put(cost, s, h(s)); + + astar_search_no_init + (g, s, h, vis, predecessor, cost, distance, weight, + color, index_map, compare, combine, inf, zero); + + } + + // Named parameter interfaces + template + void + astar_search + (const VertexListGraph &g, + typename graph_traits::vertex_descriptor s, + AStarHeuristic h, const bgl_named_params& params) + { + using namespace boost::graph::keywords; + typedef bgl_named_params params_type; + BOOST_GRAPH_DECLARE_CONVERTED_PARAMETERS(params_type, params) + + // Distance type is the value type of the distance map if there is one, + // otherwise the value type of the weight map. + typedef + typename detail::override_const_property_result< + arg_pack_type, tag::weight_map, edge_weight_t, VertexListGraph>::type + weight_map_type; + typedef typename boost::property_traits::value_type W; + typedef + typename detail::map_maker::map_type + distance_map_type; + typedef typename boost::property_traits::value_type D; + + astar_search + (g, s, h, + arg_pack[_visitor | make_astar_visitor(null_visitor())], + arg_pack[_predecessor_map | dummy_property_map()], + detail::make_property_map_from_arg_pack_gen(D())(g, arg_pack), + detail::make_property_map_from_arg_pack_gen(W())(g, arg_pack), + detail::override_const_property(arg_pack, _weight_map, g, edge_weight), + detail::override_const_property(arg_pack, _vertex_index_map, g, vertex_index), + detail::make_color_map_from_arg_pack(g, arg_pack), + arg_pack[_distance_compare | std::less()], + arg_pack[_distance_combine | closed_plus()], + arg_pack[_distance_inf | (std::numeric_limits::max)()], + arg_pack[_distance_zero | D()]); + } + + template + void + astar_search_no_init + (const VertexListGraph &g, + typename graph_traits::vertex_descriptor s, + AStarHeuristic h, const bgl_named_params& params) + { + using namespace boost::graph::keywords; + typedef bgl_named_params params_type; + BOOST_GRAPH_DECLARE_CONVERTED_PARAMETERS(params_type, params) + typedef + typename detail::override_const_property_result< + arg_pack_type, tag::weight_map, edge_weight_t, VertexListGraph>::type + weight_map_type; + typedef typename boost::property_traits::value_type D; + astar_search_no_init + (g, s, h, + arg_pack[_visitor | make_astar_visitor(null_visitor())], + arg_pack[_predecessor_map | dummy_property_map()], + detail::make_property_map_from_arg_pack_gen(D())(g, arg_pack), + detail::make_property_map_from_arg_pack_gen(D())(g, arg_pack), + detail::override_const_property(arg_pack, _weight_map, g, edge_weight), + detail::override_const_property(arg_pack, _vertex_index_map, g, vertex_index), + detail::make_color_map_from_arg_pack(g, arg_pack), + arg_pack[_distance_compare | std::less()], + arg_pack[_distance_combine | closed_plus()], + arg_pack[_distance_inf | (std::numeric_limits::max)()], + arg_pack[_distance_zero | D()]); + } + +} // namespace boost + +#endif // BOOST_GRAPH_ASTAR_SEARCH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/bandwidth.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/bandwidth.hpp new file mode 100644 index 0000000000..0bfeefb99c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/bandwidth.hpp @@ -0,0 +1,83 @@ +// Copyright (c) Jeremy Siek 2001, Marc Wintermantel 2002 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_BANDWIDTH_HPP +#define BOOST_GRAPH_BANDWIDTH_HPP + +#include // for std::min and std::max +#include +#include +#include + +namespace boost { + + template + typename graph_traits::vertices_size_type + ith_bandwidth(typename graph_traits::vertex_descriptor i, + const Graph& g, + VertexIndexMap index) + { + BOOST_USING_STD_MAX(); + typedef typename graph_traits::vertices_size_type size_type; + size_type b = 0; + typename graph_traits::out_edge_iterator e, end; + for (boost::tie(e, end) = out_edges(i, g); e != end; ++e) { + int f_i = get(index, i); + int f_j = get(index, target(*e, g)); + using namespace std; // to call abs() unqualified + if(f_i > f_j) + b = max BOOST_PREVENT_MACRO_SUBSTITUTION (b, size_type(f_i - f_j)); + } + return b; + } + + template + typename graph_traits::vertices_size_type + ith_bandwidth(typename graph_traits::vertex_descriptor i, + const Graph& g) + { + return ith_bandwidth(i, g, get(vertex_index, g)); + } + + template + typename graph_traits::vertices_size_type + bandwidth(const Graph& g, VertexIndexMap index) + { + BOOST_USING_STD_MAX(); + typename graph_traits::vertices_size_type b = 0; + typename graph_traits::vertex_iterator i, end; + for (boost::tie(i, end) = vertices(g); i != end; ++i) + b = max BOOST_PREVENT_MACRO_SUBSTITUTION (b, ith_bandwidth(*i, g, index)); + return b; + } + + template + typename graph_traits::vertices_size_type + bandwidth(const Graph& g) + { + return bandwidth(g, get(vertex_index, g)); + } + + template + typename graph_traits::vertices_size_type + edgesum(const Graph& g, VertexIndexMap index_map) + { + typedef typename graph_traits::vertices_size_type size_type; + typedef typename detail::numeric_traits::difference_type diff_t; + size_type sum = 0; + typename graph_traits::edge_iterator i, end; + for (boost::tie(i, end) = edges(g); i != end; ++i) { + diff_t f_u = get(index_map, source(*i, g)); + diff_t f_v = get(index_map, target(*i, g)); + using namespace std; // to call abs() unqualified + sum += abs(f_u - f_v); + } + return sum; + } + +} // namespace boost + +#endif // BOOST_GRAPH_BANDWIDTH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/bc_clustering.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/bc_clustering.hpp new file mode 100644 index 0000000000..6f4bbf40b8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/bc_clustering.hpp @@ -0,0 +1,166 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_BETWEENNESS_CENTRALITY_CLUSTERING_HPP +#define BOOST_GRAPH_BETWEENNESS_CENTRALITY_CLUSTERING_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +/** Threshold termination function for the betweenness centrality + * clustering algorithm. + */ +template +struct bc_clustering_threshold +{ + typedef T centrality_type; + + /// Terminate clustering when maximum absolute edge centrality is + /// below the given threshold. + explicit bc_clustering_threshold(T threshold) + : threshold(threshold), dividend(1.0) {} + + /** + * Terminate clustering when the maximum edge centrality is below + * the given threshold. + * + * @param threshold the threshold value + * + * @param g the graph on which the threshold will be calculated + * + * @param normalize when true, the threshold is compared against the + * normalized edge centrality based on the input graph; otherwise, + * the threshold is compared against the absolute edge centrality. + */ + template + bc_clustering_threshold(T threshold, const Graph& g, bool normalize = true) + : threshold(threshold), dividend(1.0) + { + if (normalize) { + typename graph_traits::vertices_size_type n = num_vertices(g); + dividend = T((n - 1) * (n - 2)) / T(2); + } + } + + /** Returns true when the given maximum edge centrality (potentially + * normalized) falls below the threshold. + */ + template + bool operator()(T max_centrality, Edge, const Graph&) + { + return (max_centrality / dividend) < threshold; + } + + protected: + T threshold; + T dividend; +}; + +/** Graph clustering based on edge betweenness centrality. + * + * This algorithm implements graph clustering based on edge + * betweenness centrality. It is an iterative algorithm, where in each + * step it compute the edge betweenness centrality (via @ref + * brandes_betweenness_centrality) and removes the edge with the + * maximum betweenness centrality. The @p done function object + * determines when the algorithm terminates (the edge found when the + * algorithm terminates will not be removed). + * + * @param g The graph on which clustering will be performed. The type + * of this parameter (@c MutableGraph) must be a model of the + * VertexListGraph, IncidenceGraph, EdgeListGraph, and Mutable Graph + * concepts. + * + * @param done The function object that indicates termination of the + * algorithm. It must be a ternary function object thats accepts the + * maximum centrality, the descriptor of the edge that will be + * removed, and the graph @p g. + * + * @param edge_centrality (UTIL/OUT) The property map that will store + * the betweenness centrality for each edge. When the algorithm + * terminates, it will contain the edge centralities for the + * graph. The type of this property map must model the + * ReadWritePropertyMap concept. Defaults to an @c + * iterator_property_map whose value type is + * @c Done::centrality_type and using @c get(edge_index, g) for the + * index map. + * + * @param vertex_index (IN) The property map that maps vertices to + * indices in the range @c [0, num_vertices(g)). This type of this + * property map must model the ReadablePropertyMap concept and its + * value type must be an integral type. Defaults to + * @c get(vertex_index, g). + */ +template +void +betweenness_centrality_clustering(MutableGraph& g, Done done, + EdgeCentralityMap edge_centrality, + VertexIndexMap vertex_index) +{ + typedef typename property_traits::value_type + centrality_type; + typedef typename graph_traits::edge_iterator edge_iterator; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::vertices_size_type + vertices_size_type; + + if (has_no_edges(g)) return; + + // Function object that compares the centrality of edges + indirect_cmp > + cmp(edge_centrality); + + bool is_done; + do { + brandes_betweenness_centrality(g, + edge_centrality_map(edge_centrality) + .vertex_index_map(vertex_index)); + std::pair edges_iters = edges(g); + edge_descriptor e = *max_element(edges_iters.first, edges_iters.second, cmp); + is_done = done(get(edge_centrality, e), e, g); + if (!is_done) remove_edge(e, g); + } while (!is_done && !has_no_edges(g)); +} + +/** + * \overload + */ +template +void +betweenness_centrality_clustering(MutableGraph& g, Done done, + EdgeCentralityMap edge_centrality) +{ + betweenness_centrality_clustering(g, done, edge_centrality, + get(vertex_index, g)); +} + +/** + * \overload + */ +template +void +betweenness_centrality_clustering(MutableGraph& g, Done done) +{ + typedef typename Done::centrality_type centrality_type; + std::vector edge_centrality(num_edges(g)); + betweenness_centrality_clustering(g, done, + make_iterator_property_map(edge_centrality.begin(), get(edge_index, g)), + get(vertex_index, g)); +} + +} // end namespace boost + +#endif // BOOST_GRAPH_BETWEENNESS_CENTRALITY_CLUSTERING_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/bellman_ford_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/bellman_ford_shortest_paths.hpp new file mode 100644 index 0000000000..8fc02529a8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/bellman_ford_shortest_paths.hpp @@ -0,0 +1,241 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +/* + This file implements the function + + template + bool bellman_ford_shortest_paths(EdgeListGraph& g, Size N, + const bgl_named_params& params) + + */ + + +#ifndef BOOST_GRAPH_BELLMAN_FORD_SHORTEST_PATHS_HPP +#define BOOST_GRAPH_BELLMAN_FORD_SHORTEST_PATHS_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + struct BellmanFordVisitorConcept { + void constraints() { + function_requires< CopyConstructibleConcept >(); + vis.examine_edge(e, g); + vis.edge_relaxed(e, g); + vis.edge_not_relaxed(e, g); + vis.edge_minimized(e, g); + vis.edge_not_minimized(e, g); + } + Visitor vis; + Graph g; + typename graph_traits::edge_descriptor e; + }; + + template + class bellman_visitor { + public: + bellman_visitor() { } + bellman_visitor(Visitors vis) : m_vis(vis) { } + + template + void examine_edge(Edge u, Graph& g) { + invoke_visitors(m_vis, u, g, on_examine_edge()); + } + template + void edge_relaxed(Edge u, Graph& g) { + invoke_visitors(m_vis, u, g, on_edge_relaxed()); + } + template + void edge_not_relaxed(Edge u, Graph& g) { + invoke_visitors(m_vis, u, g, on_edge_not_relaxed()); + } + template + void edge_minimized(Edge u, Graph& g) { + invoke_visitors(m_vis, u, g, on_edge_minimized()); + } + template + void edge_not_minimized(Edge u, Graph& g) { + invoke_visitors(m_vis, u, g, on_edge_not_minimized()); + } + protected: + Visitors m_vis; + }; + template + bellman_visitor + make_bellman_visitor(Visitors vis) { + return bellman_visitor(vis); + } + typedef bellman_visitor<> default_bellman_visitor; + + template + bool bellman_ford_shortest_paths(EdgeListGraph& g, Size N, + WeightMap weight, + PredecessorMap pred, + DistanceMap distance, + BinaryFunction combine, + BinaryPredicate compare, + BellmanFordVisitor v) + { + function_requires >(); + typedef graph_traits GTraits; + typedef typename GTraits::edge_descriptor Edge; + typedef typename GTraits::vertex_descriptor Vertex; + function_requires >(); + function_requires >(); + typedef typename property_traits::value_type D_value; + typedef typename property_traits::value_type W_value; + + typename GTraits::edge_iterator i, end; + + for (Size k = 0; k < N; ++k) { + bool at_least_one_edge_relaxed = false; + for (boost::tie(i, end) = edges(g); i != end; ++i) { + v.examine_edge(*i, g); + if (relax(*i, g, weight, pred, distance, combine, compare)) { + at_least_one_edge_relaxed = true; + v.edge_relaxed(*i, g); + } else + v.edge_not_relaxed(*i, g); + } + if (!at_least_one_edge_relaxed) + break; + } + + for (boost::tie(i, end) = edges(g); i != end; ++i) + if (compare(combine(get(distance, source(*i, g)), get(weight, *i)), + get(distance, target(*i,g)))) + { + v.edge_not_minimized(*i, g); + return false; + } else + v.edge_minimized(*i, g); + + return true; + } + + namespace detail { + + template + bool + bellman_dispatch2 + (VertexAndEdgeListGraph& g, + typename graph_traits::vertex_descriptor s, + Size N, WeightMap weight, PredecessorMap pred, DistanceMap distance, + const bgl_named_params& params) + { + typedef typename property_traits::value_type D; + bellman_visitor<> null_vis; + typedef typename property_traits::value_type weight_type; + typename graph_traits::vertex_iterator v, v_end; + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) { + put(distance, *v, (std::numeric_limits::max)()); + put(pred, *v, *v); + } + put(distance, s, weight_type(0)); + return bellman_ford_shortest_paths + (g, N, weight, pred, distance, + choose_param(get_param(params, distance_combine_t()), + closed_plus()), + choose_param(get_param(params, distance_compare_t()), + std::less()), + choose_param(get_param(params, graph_visitor), + null_vis) + ); + } + + template + bool + bellman_dispatch2 + (VertexAndEdgeListGraph& g, + detail::error_property_not_found, + Size N, WeightMap weight, PredecessorMap pred, DistanceMap distance, + const bgl_named_params& params) + { + typedef typename property_traits::value_type D; + bellman_visitor<> null_vis; + return bellman_ford_shortest_paths + (g, N, weight, pred, distance, + choose_param(get_param(params, distance_combine_t()), + closed_plus()), + choose_param(get_param(params, distance_compare_t()), + std::less()), + choose_param(get_param(params, graph_visitor), + null_vis) + ); + } + + template + bool bellman_dispatch(EdgeListGraph& g, Size N, + WeightMap weight, DistanceMap distance, + const bgl_named_params& params) + { + dummy_property_map dummy_pred; + return + detail::bellman_dispatch2 + (g, + get_param(params, root_vertex_t()), + N, weight, + choose_param(get_param(params, vertex_predecessor), dummy_pred), + distance, + params); + } + } // namespace detail + + template + bool bellman_ford_shortest_paths + (EdgeListGraph& g, Size N, + const bgl_named_params& params) + { + return detail::bellman_dispatch + (g, N, + choose_const_pmap(get_param(params, edge_weight), g, edge_weight), + choose_pmap(get_param(params, vertex_distance), g, vertex_distance), + params); + } + + template + bool bellman_ford_shortest_paths(EdgeListGraph& g, Size N) + { + bgl_named_params params(0); + return bellman_ford_shortest_paths(g, N, params); + } + + template + bool bellman_ford_shortest_paths + (VertexAndEdgeListGraph& g, + const bgl_named_params& params) + { + function_requires >(); + return detail::bellman_dispatch + (g, num_vertices(g), + choose_const_pmap(get_param(params, edge_weight), g, edge_weight), + choose_pmap(get_param(params, vertex_distance), g, vertex_distance), + params); + } +} // namespace boost + +#endif // BOOST_GRAPH_BELLMAN_FORD_SHORTEST_PATHS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/betweenness_centrality.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/betweenness_centrality.hpp new file mode 100644 index 0000000000..052f0633c1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/betweenness_centrality.hpp @@ -0,0 +1,619 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_BRANDES_BETWEENNESS_CENTRALITY_HPP +#define BOOST_GRAPH_BRANDES_BETWEENNESS_CENTRALITY_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace detail { namespace graph { + + /** + * Customized visitor passed to Dijkstra's algorithm by Brandes' + * betweenness centrality algorithm. This visitor is responsible for + * keeping track of the order in which vertices are discovered, the + * predecessors on the shortest path(s) to a vertex, and the number + * of shortest paths. + */ + template + struct brandes_dijkstra_visitor : public bfs_visitor<> + { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + brandes_dijkstra_visitor(std::stack& ordered_vertices, + WeightMap weight, + IncomingMap incoming, + DistanceMap distance, + PathCountMap path_count) + : ordered_vertices(ordered_vertices), weight(weight), + incoming(incoming), distance(distance), + path_count(path_count) + { } + + /** + * Whenever an edge e = (v, w) is relaxed, the incoming edge list + * for w is set to {(v, w)} and the shortest path count of w is set to + * the number of paths that reach {v}. + */ + void edge_relaxed(edge_descriptor e, const Graph& g) + { + vertex_descriptor v = source(e, g), w = target(e, g); + incoming[w].clear(); + incoming[w].push_back(e); + put(path_count, w, get(path_count, v)); + } + + /** + * If an edge e = (v, w) was not relaxed, it may still be the case + * that we've found more equally-short paths, so include {(v, w)} in the + * incoming edges of w and add all of the shortest paths to v to the + * shortest path count of w. + */ + void edge_not_relaxed(edge_descriptor e, const Graph& g) + { + typedef typename property_traits::value_type weight_type; + typedef typename property_traits::value_type distance_type; + vertex_descriptor v = source(e, g), w = target(e, g); + distance_type d_v = get(distance, v), d_w = get(distance, w); + weight_type w_e = get(weight, e); + + closed_plus combine; + if (d_w == combine(d_v, w_e)) { + put(path_count, w, get(path_count, w) + get(path_count, v)); + incoming[w].push_back(e); + } + } + + /// Keep track of vertices as they are reached + void examine_vertex(vertex_descriptor w, const Graph&) + { + ordered_vertices.push(w); + } + + private: + std::stack& ordered_vertices; + WeightMap weight; + IncomingMap incoming; + DistanceMap distance; + PathCountMap path_count; + }; + + /** + * Function object that calls Dijkstra's shortest paths algorithm + * using the Dijkstra visitor for the Brandes betweenness centrality + * algorithm. + */ + template + struct brandes_dijkstra_shortest_paths + { + brandes_dijkstra_shortest_paths(WeightMap weight_map) + : weight_map(weight_map) { } + + template + void + operator()(Graph& g, + typename graph_traits::vertex_descriptor s, + std::stack::vertex_descriptor>& ov, + IncomingMap incoming, + DistanceMap distance, + PathCountMap path_count, + VertexIndexMap vertex_index) + { + typedef brandes_dijkstra_visitor visitor_type; + visitor_type visitor(ov, weight_map, incoming, distance, path_count); + + dijkstra_shortest_paths(g, s, + boost::weight_map(weight_map) + .vertex_index_map(vertex_index) + .distance_map(distance) + .visitor(visitor)); + } + + private: + WeightMap weight_map; + }; + + /** + * Function object that invokes breadth-first search for the + * unweighted form of the Brandes betweenness centrality algorithm. + */ + struct brandes_unweighted_shortest_paths + { + /** + * Customized visitor passed to breadth-first search, which + * records predecessor and the number of shortest paths to each + * vertex. + */ + template + struct visitor_type : public bfs_visitor<> + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + + visitor_type(IncomingMap incoming, DistanceMap distance, + PathCountMap path_count, + std::stack& ordered_vertices) + : incoming(incoming), distance(distance), + path_count(path_count), ordered_vertices(ordered_vertices) { } + + /// Keep track of vertices as they are reached + void examine_vertex(vertex_descriptor v, Graph&) + { + ordered_vertices.push(v); + } + + /** + * Whenever an edge e = (v, w) is labelled a tree edge, the + * incoming edge list for w is set to {(v, w)} and the shortest + * path count of w is set to the number of paths that reach {v}. + */ + void tree_edge(edge_descriptor e, Graph& g) + { + vertex_descriptor v = source(e, g); + vertex_descriptor w = target(e, g); + put(distance, w, get(distance, v) + 1); + + put(path_count, w, get(path_count, v)); + incoming[w].push_back(e); + } + + /** + * If an edge e = (v, w) is not a tree edge, it may still be the + * case that we've found more equally-short paths, so include (v, w) + * in the incoming edge list of w and add all of the shortest + * paths to v to the shortest path count of w. + */ + void non_tree_edge(edge_descriptor e, Graph& g) + { + vertex_descriptor v = source(e, g); + vertex_descriptor w = target(e, g); + if (get(distance, w) == get(distance, v) + 1) { + put(path_count, w, get(path_count, w) + get(path_count, v)); + incoming[w].push_back(e); + } + } + + private: + IncomingMap incoming; + DistanceMap distance; + PathCountMap path_count; + std::stack& ordered_vertices; + }; + + template + void + operator()(Graph& g, + typename graph_traits::vertex_descriptor s, + std::stack::vertex_descriptor>& ov, + IncomingMap incoming, + DistanceMap distance, + PathCountMap path_count, + VertexIndexMap vertex_index) + { + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + + visitor_type + visitor(incoming, distance, path_count, ov); + + std::vector + colors(num_vertices(g), color_traits::white()); + boost::queue Q; + breadth_first_visit(g, s, Q, visitor, + make_iterator_property_map(colors.begin(), + vertex_index)); + } + }; + + // When the edge centrality map is a dummy property map, no + // initialization is needed. + template + inline void + init_centrality_map(std::pair, dummy_property_map) { } + + // When we have a real edge centrality map, initialize all of the + // centralities to zero. + template + void + init_centrality_map(std::pair keys, Centrality centrality_map) + { + typedef typename property_traits::value_type + centrality_type; + while (keys.first != keys.second) { + put(centrality_map, *keys.first, centrality_type(0)); + ++keys.first; + } + } + + // When the edge centrality map is a dummy property map, no update + // is performed. + template + inline void + update_centrality(dummy_property_map, const Key&, const T&) { } + + // When we have a real edge centrality map, add the value to the map + template + inline void + update_centrality(CentralityMap centrality_map, Key k, const T& x) + { put(centrality_map, k, get(centrality_map, k) + x); } + + template + inline void + divide_centrality_by_two(std::pair, dummy_property_map) {} + + template + inline void + divide_centrality_by_two(std::pair keys, + CentralityMap centrality_map) + { + typename property_traits::value_type two(2); + while (keys.first != keys.second) { + put(centrality_map, *keys.first, get(centrality_map, *keys.first) / two); + ++keys.first; + } + } + + template + void + brandes_betweenness_centrality_impl(const Graph& g, + CentralityMap centrality, // C_B + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, // P + DistanceMap distance, // d + DependencyMap dependency, // delta + PathCountMap path_count, // sigma + VertexIndexMap vertex_index, + ShortestPaths shortest_paths) + { + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::edge_iterator edge_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + // Initialize centrality + init_centrality_map(vertices(g), centrality); + init_centrality_map(edges(g), edge_centrality_map); + + std::stack ordered_vertices; + vertex_iterator s, s_end; + for (boost::tie(s, s_end) = vertices(g); s != s_end; ++s) { + // Initialize for this iteration + vertex_iterator w, w_end; + for (boost::tie(w, w_end) = vertices(g); w != w_end; ++w) { + incoming[*w].clear(); + put(path_count, *w, 0); + put(dependency, *w, 0); + } + put(path_count, *s, 1); + + // Execute the shortest paths algorithm. This will be either + // Dijkstra's algorithm or a customized breadth-first search, + // depending on whether the graph is weighted or unweighted. + shortest_paths(g, *s, ordered_vertices, incoming, distance, + path_count, vertex_index); + + while (!ordered_vertices.empty()) { + vertex_descriptor w = ordered_vertices.top(); + ordered_vertices.pop(); + + typedef typename property_traits::value_type + incoming_type; + typedef typename incoming_type::iterator incoming_iterator; + typedef typename property_traits::value_type + dependency_type; + + for (incoming_iterator vw = incoming[w].begin(); + vw != incoming[w].end(); ++vw) { + vertex_descriptor v = source(*vw, g); + dependency_type factor = dependency_type(get(path_count, v)) + / dependency_type(get(path_count, w)); + factor *= (dependency_type(1) + get(dependency, w)); + put(dependency, v, get(dependency, v) + factor); + update_centrality(edge_centrality_map, *vw, factor); + } + + if (w != *s) { + update_centrality(centrality, w, get(dependency, w)); + } + } + } + + typedef typename graph_traits::directed_category directed_category; + const bool is_undirected = + is_convertible::value; + if (is_undirected) { + divide_centrality_by_two(vertices(g), centrality); + divide_centrality_by_two(edges(g), edge_centrality_map); + } + } + +} } // end namespace detail::graph + +template +void +brandes_betweenness_centrality(const Graph& g, + CentralityMap centrality, // C_B + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, // P + DistanceMap distance, // d + DependencyMap dependency, // delta + PathCountMap path_count, // sigma + VertexIndexMap vertex_index + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) +{ + detail::graph::brandes_unweighted_shortest_paths shortest_paths; + + detail::graph::brandes_betweenness_centrality_impl(g, centrality, + edge_centrality_map, + incoming, distance, + dependency, path_count, + vertex_index, + shortest_paths); +} + +template +void +brandes_betweenness_centrality(const Graph& g, + CentralityMap centrality, // C_B + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, // P + DistanceMap distance, // d + DependencyMap dependency, // delta + PathCountMap path_count, // sigma + VertexIndexMap vertex_index, + WeightMap weight_map + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) +{ + detail::graph::brandes_dijkstra_shortest_paths + shortest_paths(weight_map); + + detail::graph::brandes_betweenness_centrality_impl(g, centrality, + edge_centrality_map, + incoming, distance, + dependency, path_count, + vertex_index, + shortest_paths); +} + +namespace detail { namespace graph { + template + void + brandes_betweenness_centrality_dispatch2(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + WeightMap weight_map, + VertexIndexMap vertex_index) + { + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename mpl::if_c<(is_same::value), + EdgeCentralityMap, + CentralityMap>::type a_centrality_map; + typedef typename property_traits::value_type + centrality_type; + + typename graph_traits::vertices_size_type V = num_vertices(g); + + std::vector > incoming(V); + std::vector distance(V); + std::vector dependency(V); + std::vector path_count(V); + + brandes_betweenness_centrality( + g, centrality, edge_centrality_map, + make_iterator_property_map(incoming.begin(), vertex_index), + make_iterator_property_map(distance.begin(), vertex_index), + make_iterator_property_map(dependency.begin(), vertex_index), + make_iterator_property_map(path_count.begin(), vertex_index), + vertex_index, + weight_map); + } + + + template + void + brandes_betweenness_centrality_dispatch2(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + VertexIndexMap vertex_index) + { + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename mpl::if_c<(is_same::value), + EdgeCentralityMap, + CentralityMap>::type a_centrality_map; + typedef typename property_traits::value_type + centrality_type; + + typename graph_traits::vertices_size_type V = num_vertices(g); + + std::vector > incoming(V); + std::vector distance(V); + std::vector dependency(V); + std::vector path_count(V); + + brandes_betweenness_centrality( + g, centrality, edge_centrality_map, + make_iterator_property_map(incoming.begin(), vertex_index), + make_iterator_property_map(distance.begin(), vertex_index), + make_iterator_property_map(dependency.begin(), vertex_index), + make_iterator_property_map(path_count.begin(), vertex_index), + vertex_index); + } + + template + struct brandes_betweenness_centrality_dispatch1 + { + template + static void + run(const Graph& g, CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, VertexIndexMap vertex_index, + WeightMap weight_map) + { + brandes_betweenness_centrality_dispatch2(g, centrality, edge_centrality_map, + weight_map, vertex_index); + } + }; + + template<> + struct brandes_betweenness_centrality_dispatch1 + { + template + static void + run(const Graph& g, CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, VertexIndexMap vertex_index, + error_property_not_found) + { + brandes_betweenness_centrality_dispatch2(g, centrality, edge_centrality_map, + vertex_index); + } + }; + + template + struct is_bgl_named_params { + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct is_bgl_named_params > { + BOOST_STATIC_CONSTANT(bool, value = true); + }; + +} } // end namespace detail::graph + +template +void +brandes_betweenness_centrality(const Graph& g, + const bgl_named_params& params + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) +{ + typedef bgl_named_params named_params; + + typedef typename property_value::type ew; + detail::graph::brandes_betweenness_centrality_dispatch1::run( + g, + choose_param(get_param(params, vertex_centrality), + dummy_property_map()), + choose_param(get_param(params, edge_centrality), + dummy_property_map()), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + get_param(params, edge_weight)); +} + +// disable_if is required to work around problem with MSVC 7.1 (it seems to not +// get partial ordering getween this overload and the previous one correct) +template +typename disable_if, + void>::type +brandes_betweenness_centrality(const Graph& g, CentralityMap centrality + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) +{ + detail::graph::brandes_betweenness_centrality_dispatch2( + g, centrality, dummy_property_map(), get(vertex_index, g)); +} + +template +void +brandes_betweenness_centrality(const Graph& g, CentralityMap centrality, + EdgeCentralityMap edge_centrality_map + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) +{ + detail::graph::brandes_betweenness_centrality_dispatch2( + g, centrality, edge_centrality_map, get(vertex_index, g)); +} + +/** + * Converts "absolute" betweenness centrality (as computed by the + * brandes_betweenness_centrality algorithm) in the centrality map + * into "relative" centrality. The result is placed back into the + * given centrality map. + */ +template +void +relative_betweenness_centrality(const Graph& g, CentralityMap centrality) +{ + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename property_traits::value_type centrality_type; + + typename graph_traits::vertices_size_type n = num_vertices(g); + centrality_type factor = centrality_type(2)/centrality_type(n*n - 3*n + 2); + vertex_iterator v, v_end; + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) { + put(centrality, *v, factor * get(centrality, *v)); + } +} + +// Compute the central point dominance of a graph. +template +typename property_traits::value_type +central_point_dominance(const Graph& g, CentralityMap centrality + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) +{ + using std::max; + + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename property_traits::value_type centrality_type; + + typename graph_traits::vertices_size_type n = num_vertices(g); + + // Find max centrality + centrality_type max_centrality(0); + vertex_iterator v, v_end; + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) { + max_centrality = (max)(max_centrality, get(centrality, *v)); + } + + // Compute central point dominance + centrality_type sum(0); + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) { + sum += (max_centrality - get(centrality, *v)); + } + return sum/(n-1); +} + +} // end namespace boost + +#endif // BOOST_GRAPH_BRANDES_BETWEENNESS_CENTRALITY_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/biconnected_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/biconnected_components.hpp new file mode 100644 index 0000000000..0345963642 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/biconnected_components.hpp @@ -0,0 +1,415 @@ +// Copyright (c) Jeremy Siek 2001 +// Copyright (c) Douglas Gregor 2004 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// NOTE: this final is generated by libs/graph/doc/biconnected_components.w + +#ifndef BOOST_GRAPH_BICONNECTED_COMPONENTS_HPP +#define BOOST_GRAPH_BICONNECTED_COMPONENTS_HPP + +#include +#include +#include // for std::min and std::max +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace detail + { + template + struct biconnected_components_visitor : public dfs_visitor<> + { + biconnected_components_visitor + (ComponentMap comp, std::size_t& c, DiscoverTimeMap dtm, + std::size_t& dfs_time, LowPointMap lowpt, PredecessorMap pred, + OutputIterator out, Stack& S, DFSVisitor vis) + : comp(comp), c(c), dtm(dtm), dfs_time(dfs_time), lowpt(lowpt), + pred(pred), out(out), S(S), vis(vis) { } + + template + void initialize_vertex(const Vertex& u, Graph& g) + { + vis.initialize_vertex(u, g); + } + + template + void start_vertex(const Vertex& u, Graph& g) + { + put(pred, u, u); + vis.start_vertex(u, g); + } + + template + void discover_vertex(const Vertex& u, Graph& g) + { + put(dtm, u, ++dfs_time); + put(lowpt, u, get(dtm, u)); + vis.discover_vertex(u, g); + } + + template + void examine_edge(const Edge& e, Graph& g) + { + vis.examine_edge(e, g); + } + + template + void tree_edge(const Edge& e, Graph& g) + { + S.push(e); + put(pred, target(e, g), source(e, g)); + vis.tree_edge(e, g); + } + + template + void back_edge(const Edge& e, Graph& g) + { + BOOST_USING_STD_MIN(); + + if ( target(e, g) != get(pred, source(e, g)) ) { + S.push(e); + put(lowpt, source(e, g), + min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, source(e, g)), + get(dtm, target(e, g)))); + } + vis.back_edge(e, g); + } + + template + void forward_or_cross_edge(const Edge& e, Graph& g) + { + vis.forward_or_cross_edge(e, g); + } + + template + void finish_vertex(const Vertex& u, Graph& g) + { + BOOST_USING_STD_MIN(); + Vertex parent = get(pred, u); + const std::size_t dtm_of_dubious_parent = get(dtm, parent); + bool is_art_point = false; + if ( dtm_of_dubious_parent > get(dtm, u) ) { + parent = get(pred, parent); + is_art_point = true; + put(pred, get(pred, u), u); + put(pred, u, parent); + } + + if ( parent == u ) { // at top + if ( get(dtm, u) + 1 == dtm_of_dubious_parent ) + is_art_point = false; + } else { + put(lowpt, parent, + min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, parent), + get(lowpt, u))); + + if (get(lowpt, u) >= get(dtm, parent)) { + if ( get(dtm, parent) > get(dtm, get(pred, parent)) ) { + put(pred, u, get(pred, parent)); + put(pred, parent, u); + } + + while ( get(dtm, source(S.top(), g)) >= get(dtm, u) ) { + put(comp, S.top(), c); + S.pop(); + } + put(comp, S.top(), c); + S.pop(); + ++c; + if ( S.empty() ) { + put(pred, u, parent); + put(pred, parent, u); + } + } + } + if ( is_art_point ) + *out++ = u; + vis.finish_vertex(u, g); + } + + ComponentMap comp; + std::size_t& c; + DiscoverTimeMap dtm; + std::size_t& dfs_time; + LowPointMap lowpt; + PredecessorMap pred; + OutputIterator out; + Stack& S; + DFSVisitor vis; + }; + + template + std::pair + biconnected_components_impl(const Graph & g, ComponentMap comp, + OutputIterator out, VertexIndexMap index_map, DiscoverTimeMap dtm, + LowPointMap lowpt, PredecessorMap pred, DFSVisitor dfs_vis) + { + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + function_requires >(); + function_requires >(); + function_requires >(); + function_requires >(); + function_requires >(); + function_requires >(); + + std::size_t num_components = 0; + std::size_t dfs_time = 0; + std::stack S; + + biconnected_components_visitor, + DFSVisitor> + vis(comp, num_components, dtm, dfs_time, lowpt, pred, out, + S, dfs_vis); + + depth_first_search(g, visitor(vis).vertex_index_map(index_map)); + + return std::pair(num_components, vis.out); + } + + template + struct bicomp_dispatch3 + { + template + static std::pair apply (const Graph & g, + ComponentMap comp, OutputIterator out, VertexIndexMap index_map, + DiscoverTimeMap dtm, LowPointMap lowpt, + const bgl_named_params& params, PredecessorMap pred) + { + return biconnected_components_impl + (g, comp, out, index_map, dtm, lowpt, pred, + choose_param(get_param(params, graph_visitor), + make_dfs_visitor(null_visitor()))); + } + }; + + template <> + struct bicomp_dispatch3 + { + template + static std::pair apply (const Graph & g, + ComponentMap comp, OutputIterator out, VertexIndexMap index_map, + DiscoverTimeMap dtm, LowPointMap lowpt, + const bgl_named_params& params, + error_property_not_found) + { + typedef typename graph_traits::vertex_descriptor vertex_t; + std::vector pred(num_vertices(g)); + vertex_t vert = graph_traits::null_vertex(); + + return biconnected_components_impl + (g, comp, out, index_map, dtm, lowpt, + make_iterator_property_map(pred.begin(), index_map, vert), + choose_param(get_param(params, graph_visitor), + make_dfs_visitor(null_visitor()))); + } + }; + + template + struct bicomp_dispatch2 + { + template + static std::pair apply (const Graph& g, + ComponentMap comp, OutputIterator out, VertexIndexMap index_map, + DiscoverTimeMap dtm, const bgl_named_params& params, + LowPointMap lowpt) + { + typedef typename property_value< bgl_named_params, + vertex_predecessor_t>::type dispatch_type; + + return bicomp_dispatch3::apply + (g, comp, out, index_map, dtm, lowpt, params, + get_param(params, vertex_predecessor)); + } + }; + + + template <> + struct bicomp_dispatch2 + { + template + static std::pair apply (const Graph& g, + ComponentMap comp, OutputIterator out, VertexIndexMap index_map, + DiscoverTimeMap dtm, const bgl_named_params& params, + error_property_not_found) + { + typedef typename graph_traits::vertices_size_type + vertices_size_type; + std::vector lowpt(num_vertices(g)); + vertices_size_type vst(0); + + typedef typename property_value< bgl_named_params, + vertex_predecessor_t>::type dispatch_type; + + return bicomp_dispatch3::apply + (g, comp, out, index_map, dtm, + make_iterator_property_map(lowpt.begin(), index_map, vst), + params, get_param(params, vertex_predecessor)); + } + }; + + template + struct bicomp_dispatch1 + { + template + static std::pair apply(const Graph& g, + ComponentMap comp, OutputIterator out, VertexIndexMap index_map, + const bgl_named_params& params, DiscoverTimeMap dtm) + { + typedef typename property_value< bgl_named_params, + vertex_lowpoint_t>::type dispatch_type; + + return bicomp_dispatch2::apply + (g, comp, out, index_map, dtm, params, + get_param(params, vertex_lowpoint)); + } + }; + + template <> + struct bicomp_dispatch1 + { + template + static std::pair apply(const Graph& g, + ComponentMap comp, OutputIterator out, VertexIndexMap index_map, + const bgl_named_params& params, error_property_not_found) + { + typedef typename graph_traits::vertices_size_type + vertices_size_type; + std::vector discover_time(num_vertices(g)); + vertices_size_type vst(0); + + typedef typename property_value< bgl_named_params, + vertex_lowpoint_t>::type dispatch_type; + + return bicomp_dispatch2::apply + (g, comp, out, index_map, + make_iterator_property_map(discover_time.begin(), index_map, vst), + params, get_param(params, vertex_lowpoint)); + } + }; + + } + + template + std::pair + biconnected_components(const Graph& g, ComponentMap comp, + OutputIterator out, DiscoverTimeMap dtm, LowPointMap lowpt) + { + typedef detail::error_property_not_found dispatch_type; + + return detail::bicomp_dispatch3::apply + (g, comp, out, + get(vertex_index, g), + dtm, lowpt, + bgl_named_params(0), + detail::error_property_not_found()); + } + + template + std::pair + biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out, + const bgl_named_params& params) + { + typedef typename property_value< bgl_named_params, + vertex_discover_time_t>::type dispatch_type; + + return detail::bicomp_dispatch1::apply(g, comp, out, + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + params, get_param(params, vertex_discover_time)); + } + + template < typename Graph, typename ComponentMap, typename OutputIterator> + std::pair + biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out) + { + return biconnected_components(g, comp, out, + bgl_named_params(0)); + } + + namespace graph_detail { + struct dummy_output_iterator + { + typedef std::output_iterator_tag iterator_category; + typedef void value_type; + typedef void pointer; + typedef void difference_type; + + struct reference { + template + reference& operator=(const T&) { return *this; } + }; + + reference operator*() const { return reference(); } + dummy_output_iterator& operator++() { return *this; } + dummy_output_iterator operator++(int) { return *this; } + }; + } // end namespace graph_detail + + template + std::size_t + biconnected_components(const Graph& g, ComponentMap comp, + const bgl_named_params& params) + { + return biconnected_components(g, comp, + graph_detail::dummy_output_iterator(), params).first; + } + + template + std::size_t + biconnected_components(const Graph& g, ComponentMap comp) + { + return biconnected_components(g, comp, + graph_detail::dummy_output_iterator()).first; + } + + template + OutputIterator + articulation_points(const Graph& g, OutputIterator out, + const bgl_named_params& params) + { + return biconnected_components(g, dummy_property_map(), out, + params).second; + } + + template + OutputIterator + articulation_points(const Graph& g, OutputIterator out) + { + return biconnected_components(g, dummy_property_map(), out, + bgl_named_params(0)).second; + } + +} // namespace boost + +#endif /* BOOST_GRAPH_BICONNECTED_COMPONENTS_HPP */ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/bipartite.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/bipartite.hpp new file mode 100644 index 0000000000..f902fd3e7a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/bipartite.hpp @@ -0,0 +1,386 @@ +/** + * + * Copyright (c) 2010 Matthias Walter (xammy@xammy.homelinux.net) + * + * Authors: Matthias Walter + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + */ + +#ifndef BOOST_GRAPH_BIPARTITE_HPP +#define BOOST_GRAPH_BIPARTITE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + namespace detail { + + /** + * The bipartite_visitor_error is thrown if an edge cannot be colored. + * The witnesses are the edges incident vertices. + */ + + template + struct bipartite_visitor_error: std::exception + { + std::pair witnesses; + + bipartite_visitor_error (Vertex a, Vertex b) : + witnesses (a, b) + { + + } + + const char* what () const throw () + { + return "Graph is not bipartite."; + } + }; + + /** + * Functor which colors edges to be non-monochromatic. + */ + + template + struct bipartition_colorize + { + typedef on_tree_edge event_filter; + + bipartition_colorize (PartitionMap partition_map) : + partition_map_ (partition_map) + { + + } + + template + void operator() (Edge e, const Graph& g) + { + typedef typename graph_traits ::vertex_descriptor vertex_descriptor_t; + typedef color_traits ::value_type> color_traits; + + vertex_descriptor_t source_vertex = source (e, g); + vertex_descriptor_t target_vertex = target (e, g); + if (get (partition_map_, source_vertex) == color_traits::white ()) + put (partition_map_, target_vertex, color_traits::black ()); + else + put (partition_map_, target_vertex, color_traits::white ()); + } + + private: + PartitionMap partition_map_; + }; + + /** + * Creates a bipartition_colorize functor which colors edges + * to be non-monochromatic. + * + * @param partition_map Color map for the bipartition + * @return The functor. + */ + + template + inline bipartition_colorize colorize_bipartition (PartitionMap partition_map) + { + return bipartition_colorize (partition_map); + } + + /** + * Functor which tests an edge to be monochromatic. + */ + + template + struct bipartition_check + { + typedef on_back_edge event_filter; + + bipartition_check (PartitionMap partition_map) : + partition_map_ (partition_map) + { + + } + + template + void operator() (Edge e, const Graph& g) + { + typedef typename graph_traits ::vertex_descriptor vertex_descriptor_t; + + vertex_descriptor_t source_vertex = source (e, g); + vertex_descriptor_t target_vertex = target (e, g); + if (get (partition_map_, source_vertex) == get (partition_map_, target_vertex)) + throw bipartite_visitor_error (source_vertex, target_vertex); + } + + private: + PartitionMap partition_map_; + }; + + /** + * Creates a bipartition_check functor which raises an error if a + * monochromatic edge is found. + * + * @param partition_map The map for a bipartition. + * @return The functor. + */ + + template + inline bipartition_check check_bipartition (PartitionMap partition_map) + { + return bipartition_check (partition_map); + } + + /** + * Find the beginning of a common suffix of two sequences + * + * @param sequence1 Pair of bidirectional iterators defining the first sequence. + * @param sequence2 Pair of bidirectional iterators defining the second sequence. + * @return Pair of iterators pointing to the beginning of the common suffix. + */ + + template + inline std::pair reverse_mismatch (std::pair < + BiDirectionalIterator1, BiDirectionalIterator1> sequence1, std::pair sequence2) + { + if (sequence1.first == sequence1.second || sequence2.first == sequence2.second) + return std::make_pair (sequence1.first, sequence2.first); + + BiDirectionalIterator1 iter1 = sequence1.second; + BiDirectionalIterator2 iter2 = sequence2.second; + + while (true) + { + --iter1; + --iter2; + if (*iter1 != *iter2) + { + ++iter1; + ++iter2; + break; + } + if (iter1 == sequence1.first) + break; + if (iter2 == sequence2.first) + break; + } + + return std::make_pair (iter1, iter2); + } + + } + + /** + * Checks a given graph for bipartiteness and fills the given color map with + * white and black according to the bipartition. If the graph is not + * bipartite, the contents of the color map are undefined. Runs in linear + * time in the size of the graph, if access to the property maps is in + * constant time. + * + * @param graph The given graph. + * @param index_map An index map associating vertices with an index. + * @param partition_map A color map to fill with the bipartition. + * @return true if and only if the given graph is bipartite. + */ + + template + bool is_bipartite (const Graph& graph, const IndexMap index_map, PartitionMap partition_map) + { + /// General types and variables + typedef typename property_traits ::value_type partition_color_t; + typedef typename graph_traits ::vertex_descriptor vertex_descriptor_t; + typedef typename graph_traits ::vertex_iterator vertex_iterator_t; + + /// Declare dfs visitor + // detail::empty_recorder recorder; + // typedef detail::bipartite_visitor dfs_visitor_t; + // dfs_visitor_t dfs_visitor (partition_map, recorder); + + + /// Call dfs + try + { + depth_first_search (graph, vertex_index_map (index_map).visitor (make_dfs_visitor (std::make_pair ( + detail::colorize_bipartition (partition_map), std::make_pair (detail::check_bipartition (partition_map), + put_property (partition_map, color_traits ::white (), on_start_vertex ())))))); + + // depth_first_search (graph, vertex_index_map (index_map).visitor (dfs_visitor)); + } + catch (detail::bipartite_visitor_error error) + { + return false; + } + + return true; + } + + /** + * Checks a given graph for bipartiteness. + * + * @param graph The given graph. + * @param index_map An index map associating vertices with an index. + * @return true if and only if the given graph is bipartite. + */ + + template + bool is_bipartite (const Graph& graph, const IndexMap index_map) + { + typedef one_bit_color_map partition_map_t; + partition_map_t partition_map (num_vertices (graph), index_map); + + return is_bipartite (graph, index_map, partition_map); + } + + /** + * Checks a given graph for bipartiteness. The graph must + * have an internal vertex_index property. Runs in linear time in the + * size of the graph, if access to the property maps is in constant time. + * + * @param graph The given graph. + * @return true if and only if the given graph is bipartite. + */ + + template + bool is_bipartite (const Graph& graph) + { + return is_bipartite (graph, get (vertex_index, graph)); + } + + /** + * Checks a given graph for bipartiteness and fills a given color map with + * white and black according to the bipartition. If the graph is not + * bipartite, a sequence of vertices, producing an odd-cycle, is written to + * the output iterator. The final iterator value is returned. Runs in linear + * time in the size of the graph, if access to the property maps is in + * constant time. + * + * @param graph The given graph. + * @param index_map An index map associating vertices with an index. + * @param partition_map A color map to fill with the bipartition. + * @param result An iterator to write the odd-cycle vertices to. + * @return The final iterator value after writing. + */ + + template + OutputIterator find_odd_cycle (const Graph& graph, const IndexMap index_map, PartitionMap partition_map, + OutputIterator result) + { + /// General types and variables + typedef typename property_traits ::value_type partition_color_t; + typedef typename graph_traits ::vertex_descriptor vertex_descriptor_t; + typedef typename graph_traits ::vertex_iterator vertex_iterator_t; + vertex_iterator_t vertex_iter, vertex_end; + + /// Declare predecessor map + typedef std::vector predecessors_t; + typedef iterator_property_map predecessor_map_t; + typedef predecessor_recorder predecessor_recorder_t; + + predecessors_t predecessors (num_vertices (graph), graph_traits ::null_vertex ()); + predecessor_map_t predecessor_map (predecessors.begin (), index_map); + predecessor_recorder_t predecessor_recorder (predecessor_map); + + /// Initialize predecessor map + for (boost::tie (vertex_iter, vertex_end) = vertices (graph); vertex_iter != vertex_end; ++vertex_iter) + { + put (predecessor_map, *vertex_iter, *vertex_iter); + } + + /// Call dfs + try + { + depth_first_search (graph, vertex_index_map (index_map).visitor (make_dfs_visitor (std::make_pair ( + detail::colorize_bipartition (partition_map), std::make_pair (detail::check_bipartition (partition_map), + std::make_pair (put_property (partition_map, color_traits ::white (), + on_start_vertex ()), record_predecessors (predecessor_map, on_tree_edge ()))))))); + } + catch (detail::bipartite_visitor_error error) + { + typedef std::vector path_t; + + path_t path1, path2; + vertex_descriptor_t next, current; + + /// First path + next = error.witnesses.first; + do + { + current = next; + path1.push_back (current); + next = predecessor_map[current]; + } + while (current != next); + + /// Second path + next = error.witnesses.second; + do + { + current = next; + path2.push_back (current); + next = predecessor_map[current]; + } + while (current != next); + + /// Find beginning of common suffix + std::pair mismatch = detail::reverse_mismatch ( + std::make_pair (path1.begin (), path1.end ()), std::make_pair (path2.begin (), path2.end ())); + + /// Copy the odd-length cycle + result = std::copy (path1.begin (), mismatch.first + 1, result); + return std::reverse_copy (path2.begin (), mismatch.second, result); + } + + return result; + } + + /** + * Checks a given graph for bipartiteness. If the graph is not bipartite, a + * sequence of vertices, producing an odd-cycle, is written to the output + * iterator. The final iterator value is returned. Runs in linear time in the + * size of the graph, if access to the property maps is in constant time. + * + * @param graph The given graph. + * @param index_map An index map associating vertices with an index. + * @param result An iterator to write the odd-cycle vertices to. + * @return The final iterator value after writing. + */ + + template + OutputIterator find_odd_cycle (const Graph& graph, const IndexMap index_map, OutputIterator result) + { + typedef one_bit_color_map partition_map_t; + partition_map_t partition_map (num_vertices (graph), index_map); + + return find_odd_cycle (graph, index_map, partition_map, result); + } + + /** + * Checks a given graph for bipartiteness. If the graph is not bipartite, a + * sequence of vertices, producing an odd-cycle, is written to the output + * iterator. The final iterator value is returned. The graph must have an + * internal vertex_index property. Runs in linear time in the size of the + * graph, if access to the property maps is in constant time. + * + * @param graph The given graph. + * @param result An iterator to write the odd-cycle vertices to. + * @return The final iterator value after writing. + */ + + template + OutputIterator find_odd_cycle (const Graph& graph, OutputIterator result) + { + return find_odd_cycle (graph, get (vertex_index, graph), result); + } +} + +#endif /// BOOST_GRAPH_BIPARTITE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/boyer_myrvold_planar_test.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/boyer_myrvold_planar_test.hpp new file mode 100644 index 0000000000..dc0158687f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/boyer_myrvold_planar_test.hpp @@ -0,0 +1,322 @@ +//======================================================================= +// Copyright 2007 Aaron Windsor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef __BOYER_MYRVOLD_PLANAR_TEST_HPP__ +#define __BOYER_MYRVOLD_PLANAR_TEST_HPP__ + +#include +#include +#include +#include + + +namespace boost +{ + + struct no_kuratowski_subgraph_isolation {}; + struct no_planar_embedding {}; + + namespace boyer_myrvold_params + { + + BOOST_PARAMETER_KEYWORD(tag, graph) + BOOST_PARAMETER_KEYWORD(tag, embedding) + BOOST_PARAMETER_KEYWORD(tag, kuratowski_subgraph) + BOOST_PARAMETER_KEYWORD(tag, vertex_index_map) + BOOST_PARAMETER_KEYWORD(tag, edge_index_map) + + typedef parameter::parameters< parameter::required, + tag::embedding, + tag::kuratowski_subgraph, + tag::vertex_index_map, + tag::edge_index_map + > boyer_myrvold_params_t; + + namespace core + { + + template + bool dispatched_boyer_myrvold(ArgumentPack const& args, + mpl::true_, + mpl::true_ + ) + { + //Dispatch for no planar embedding, no kuratowski subgraph isolation + + typedef typename remove_const + < + typename remove_reference + < typename parameter::binding + < ArgumentPack, tag::graph>::type + >::type + >::type graph_t; + + typedef typename parameter::binding + < ArgumentPack, + tag::vertex_index_map, + typename property_map + < typename remove_reference::type, + vertex_index_t>::const_type + >::type vertex_index_map_t; + + boyer_myrvold_impl + + planarity_tester(args[graph], + args[vertex_index_map | + get(vertex_index, args[graph]) + ] + ); + + return planarity_tester.is_planar() ? true : false; + } + + + + template + bool dispatched_boyer_myrvold(ArgumentPack const& args, + mpl::true_, + mpl::false_ + ) + { + //Dispatch for no planar embedding, kuratowski subgraph isolation + typedef typename remove_const + < + typename remove_reference + < typename parameter::binding + < ArgumentPack, tag::graph>::type + >::type + >::type graph_t; + + typedef typename parameter::binding + < ArgumentPack, + tag::vertex_index_map, + typename property_map::type + >::type vertex_index_map_t; + + boyer_myrvold_impl + + planarity_tester(args[graph], + args[vertex_index_map | + get(vertex_index, args[graph]) + ] + ); + + if (planarity_tester.is_planar()) + return true; + else + { + planarity_tester.extract_kuratowski_subgraph + (args[kuratowski_subgraph], + args[edge_index_map|get(edge_index, args[graph])] + ); + return false; + } + } + + + + + template + bool dispatched_boyer_myrvold(ArgumentPack const& args, + mpl::false_, + mpl::true_ + ) + { + //Dispatch for planar embedding, no kuratowski subgraph isolation + typedef typename remove_const + < + typename remove_reference + < typename parameter::binding + < ArgumentPack, tag::graph>::type + >::type + >::type graph_t; + + typedef typename parameter::binding + < ArgumentPack, + tag::vertex_index_map, + typename property_map::type + >::type vertex_index_map_t; + + boyer_myrvold_impl + + planarity_tester(args[graph], + args[vertex_index_map | + get(vertex_index, args[graph]) + ] + ); + + if (planarity_tester.is_planar()) + { + planarity_tester.make_edge_permutation(args[embedding]); + return true; + } + else + return false; + } + + + + template + bool dispatched_boyer_myrvold(ArgumentPack const& args, + mpl::false_, + mpl::false_ + ) + { + //Dispatch for planar embedding, kuratowski subgraph isolation + typedef typename remove_const + < + typename remove_reference + < typename parameter::binding + < ArgumentPack, tag::graph>::type + >::type + >::type graph_t; + + typedef typename parameter::binding + < ArgumentPack, + tag::vertex_index_map, + typename property_map::type + >::type vertex_index_map_t; + + boyer_myrvold_impl + + planarity_tester(args[graph], + args[vertex_index_map | + get(vertex_index, args[graph]) + ] + ); + + if (planarity_tester.is_planar()) + { + planarity_tester.make_edge_permutation(args[embedding]); + return true; + } + else + { + planarity_tester.extract_kuratowski_subgraph + (args[kuratowski_subgraph], + args[edge_index_map | get(edge_index, args[graph])] + ); + return false; + } + } + + + + + template + bool boyer_myrvold_planarity_test(ArgumentPack const& args) + { + + typedef typename parameter::binding + < ArgumentPack, + tag::kuratowski_subgraph, + const no_kuratowski_subgraph_isolation& + >::type + kuratowski_arg_t; + + typedef typename parameter::binding + < ArgumentPack, + tag::embedding, + const no_planar_embedding& + >::type + embedding_arg_t; + + return dispatched_boyer_myrvold + (args, + boost::is_same + (), + boost::is_same + () + ); + } + + + + } //namespace core + + } //namespace boyer_myrvold_params + + + template + bool boyer_myrvold_planarity_test(A0 const& arg0) + { + return boyer_myrvold_params::core::boyer_myrvold_planarity_test + (boyer_myrvold_params::boyer_myrvold_params_t()(arg0)); + } + + template + // bool boyer_myrvold_planarity_test(A0 const& arg0, A1 const& arg1) + bool boyer_myrvold_planarity_test(A0 const& arg0, A1 const& arg1) + { + return boyer_myrvold_params::core::boyer_myrvold_planarity_test + (boyer_myrvold_params::boyer_myrvold_params_t()(arg0,arg1)); + } + + template + bool boyer_myrvold_planarity_test(A0 const& arg0, + A1 const& arg1, + A2 const& arg2 + ) + { + return boyer_myrvold_params::core::boyer_myrvold_planarity_test + (boyer_myrvold_params::boyer_myrvold_params_t()(arg0,arg1,arg2)); + } + + template + bool boyer_myrvold_planarity_test(A0 const& arg0, + A1 const& arg1, + A2 const& arg2, + A3 const& arg3 + ) + { + return boyer_myrvold_params::core::boyer_myrvold_planarity_test + (boyer_myrvold_params::boyer_myrvold_params_t()(arg0,arg1,arg2,arg3)); + } + + template + bool boyer_myrvold_planarity_test(A0 const& arg0, + A1 const& arg1, + A2 const& arg2, + A3 const& arg3, + A4 const& arg4 + ) + { + return boyer_myrvold_params::core::boyer_myrvold_planarity_test + (boyer_myrvold_params::boyer_myrvold_params_t() + (arg0,arg1,arg2,arg3,arg4) + ); + } + + +} + +#endif //__BOYER_MYRVOLD_PLANAR_TEST_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/boykov_kolmogorov_max_flow.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/boykov_kolmogorov_max_flow.hpp new file mode 100644 index 0000000000..8559bd771d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/boykov_kolmogorov_max_flow.hpp @@ -0,0 +1,866 @@ +// Copyright (c) 2006, Stephan Diederich +// +// This code may be used under either of the following two licences: +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. OF SUCH DAMAGE. +// +// Or: +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_BOYKOV_KOLMOGOROV_MAX_FLOW_HPP +#define BOOST_BOYKOV_KOLMOGOROV_MAX_FLOW_HPP + +#include +#include +#include +#include +#include +#include +#include // for std::min and std::max + +#include +#include +#include +#include +#include +#include +#include + +// The algorithm impelemented here is described in: +// +// Boykov, Y., Kolmogorov, V. "An Experimental Comparison of Min-Cut/Max-Flow +// Algorithms for Energy Minimization in Vision", In IEEE Transactions on +// Pattern Analysis and Machine Intelligence, vol. 26, no. 9, pp. 1124-1137, +// Sep 2004. +// +// For further reading, also see: +// +// Kolmogorov, V. "Graph Based Algorithms for Scene Reconstruction from Two or +// More Views". PhD thesis, Cornell University, Sep 2003. + +namespace boost { + +namespace detail { + +template +class bk_max_flow { + typedef typename property_traits::value_type tEdgeVal; + typedef graph_traits tGraphTraits; + typedef typename tGraphTraits::vertex_iterator vertex_iterator; + typedef typename tGraphTraits::vertex_descriptor vertex_descriptor; + typedef typename tGraphTraits::edge_descriptor edge_descriptor; + typedef typename tGraphTraits::edge_iterator edge_iterator; + typedef typename tGraphTraits::out_edge_iterator out_edge_iterator; + typedef boost::queue tQueue; //queue of vertices, used in adoption-stage + typedef typename property_traits::value_type tColorValue; + typedef color_traits tColorTraits; + typedef typename property_traits::value_type tDistanceVal; + + public: + bk_max_flow(Graph& g, + EdgeCapacityMap cap, + ResidualCapacityEdgeMap res, + ReverseEdgeMap rev, + PredecessorMap pre, + ColorMap color, + DistanceMap dist, + IndexMap idx, + vertex_descriptor src, + vertex_descriptor sink): + m_g(g), + m_index_map(idx), + m_cap_map(cap), + m_res_cap_map(res), + m_rev_edge_map(rev), + m_pre_map(pre), + m_tree_map(color), + m_dist_map(dist), + m_source(src), + m_sink(sink), + m_active_nodes(), + m_in_active_list_vec(num_vertices(g), false), + m_in_active_list_map(make_iterator_property_map(m_in_active_list_vec.begin(), m_index_map)), + m_has_parent_vec(num_vertices(g), false), + m_has_parent_map(make_iterator_property_map(m_has_parent_vec.begin(), m_index_map)), + m_time_vec(num_vertices(g), 0), + m_time_map(make_iterator_property_map(m_time_vec.begin(), m_index_map)), + m_flow(0), + m_time(1), + m_last_grow_vertex(graph_traits::null_vertex()){ + // initialize the color-map with gray-values + vertex_iterator vi, v_end; + for(boost::tie(vi, v_end) = vertices(m_g); vi != v_end; ++vi){ + set_tree(*vi, tColorTraits::gray()); + } + // Initialize flow to zero which means initializing + // the residual capacity equal to the capacity + edge_iterator ei, e_end; + for(boost::tie(ei, e_end) = edges(m_g); ei != e_end; ++ei) { + m_res_cap_map[*ei] = m_cap_map[*ei]; + assert(m_rev_edge_map[m_rev_edge_map[*ei]] == *ei); //check if the reverse edge map is build up properly + } + //init the search trees with the two terminals + set_tree(m_source, tColorTraits::black()); + set_tree(m_sink, tColorTraits::white()); + m_time_map[m_source] = 1; + m_time_map[m_sink] = 1; + } + + tEdgeVal max_flow(){ + //augment direct paths from SOURCE->SINK and SOURCE->VERTEX->SINK + augment_direct_paths(); + //start the main-loop + while(true){ + bool path_found; + edge_descriptor connecting_edge; + boost::tie(connecting_edge, path_found) = grow(); //find a path from source to sink + if(!path_found){ + //we're finished, no more paths were found + break; + } + ++m_time; + augment(connecting_edge); //augment that path + adopt(); //rebuild search tree structure + } + return m_flow; + } + + // the complete class is protected, as we want access to members in + // derived test-class (see test/boykov_kolmogorov_max_flow_test.cpp) + protected: + void augment_direct_paths(){ + // in a first step, we augment all direct paths from source->NODE->sink + // and additionally paths from source->sink. This improves especially + // graphcuts for segmentation, as most of the nodes have source/sink + // connects but shouldn't have an impact on other maxflow problems + // (this is done in grow() anyway) + out_edge_iterator ei, e_end; + for(boost::tie(ei, e_end) = out_edges(m_source, m_g); ei != e_end; ++ei){ + edge_descriptor from_source = *ei; + vertex_descriptor current_node = target(from_source, m_g); + if(current_node == m_sink){ + tEdgeVal cap = m_res_cap_map[from_source]; + m_res_cap_map[from_source] = 0; + m_flow += cap; + continue; + } + edge_descriptor to_sink; + bool is_there; + boost::tie(to_sink, is_there) = lookup_edge(current_node, m_sink, m_g); + if(is_there){ + tEdgeVal cap_from_source = m_res_cap_map[from_source]; + tEdgeVal cap_to_sink = m_res_cap_map[to_sink]; + if(cap_from_source > cap_to_sink){ + set_tree(current_node, tColorTraits::black()); + add_active_node(current_node); + set_edge_to_parent(current_node, from_source); + m_dist_map[current_node] = 1; + m_time_map[current_node] = 1; + // add stuff to flow and update residuals. we dont need to + // update reverse_edges, as incoming/outgoing edges to/from + // source/sink don't count for max-flow + m_res_cap_map[from_source] -= cap_to_sink; + m_res_cap_map[to_sink] = 0; + m_flow += cap_to_sink; + } else if(cap_to_sink > 0){ + set_tree(current_node, tColorTraits::white()); + add_active_node(current_node); + set_edge_to_parent(current_node, to_sink); + m_dist_map[current_node] = 1; + m_time_map[current_node] = 1; + // add stuff to flow and update residuals. we dont need to update + // reverse_edges, as incoming/outgoing edges to/from source/sink + // don't count for max-flow + m_res_cap_map[to_sink] -= cap_from_source; + m_res_cap_map[from_source] = 0; + m_flow += cap_from_source; + } + } else if(m_res_cap_map[from_source]){ + // there is no sink connect, so we can't augment this path, but to + // avoid adding m_source to the active nodes, we just activate this + // node and set the approciate things + set_tree(current_node, tColorTraits::black()); + set_edge_to_parent(current_node, from_source); + m_dist_map[current_node] = 1; + m_time_map[current_node] = 1; + add_active_node(current_node); + } + } + for(boost::tie(ei, e_end) = out_edges(m_sink, m_g); ei != e_end; ++ei){ + edge_descriptor to_sink = m_rev_edge_map[*ei]; + vertex_descriptor current_node = source(to_sink, m_g); + if(m_res_cap_map[to_sink]){ + set_tree(current_node, tColorTraits::white()); + set_edge_to_parent(current_node, to_sink); + m_dist_map[current_node] = 1; + m_time_map[current_node] = 1; + add_active_node(current_node); + } + } + } + + /** + * Returns a pair of an edge and a boolean. if the bool is true, the + * edge is a connection of a found path from s->t , read "the link" and + * source(returnVal, m_g) is the end of the path found in the source-tree + * target(returnVal, m_g) is the beginning of the path found in the sink-tree + */ + std::pair grow(){ + assert(m_orphans.empty()); + vertex_descriptor current_node; + while((current_node = get_next_active_node()) != graph_traits::null_vertex()){ //if there is one + assert(get_tree(current_node) != tColorTraits::gray() && + (has_parent(current_node) || + current_node == m_source || + current_node == m_sink)); + + if(get_tree(current_node) == tColorTraits::black()){ + //source tree growing + out_edge_iterator ei, e_end; + if(current_node != m_last_grow_vertex){ + m_last_grow_vertex = current_node; + boost::tie(m_last_grow_edge_it, m_last_grow_edge_end) = out_edges(current_node, m_g); + } + for(; m_last_grow_edge_it != m_last_grow_edge_end; ++m_last_grow_edge_it) { + edge_descriptor out_edge = *m_last_grow_edge_it; + if(m_res_cap_map[out_edge] > 0){ //check if we have capacity left on this edge + vertex_descriptor other_node = target(out_edge, m_g); + if(get_tree(other_node) == tColorTraits::gray()){ //it's a free node + set_tree(other_node, tColorTraits::black()); //aquire other node to our search tree + set_edge_to_parent(other_node, out_edge); //set us as parent + m_dist_map[other_node] = m_dist_map[current_node] + 1; //and update the distance-heuristic + m_time_map[other_node] = m_time_map[current_node]; + add_active_node(other_node); + } else if(get_tree(other_node) == tColorTraits::black()) { + // we do this to get shorter paths. check if we are nearer to + // the source as its parent is + if(is_closer_to_terminal(current_node, other_node)){ + set_edge_to_parent(other_node, out_edge); + m_dist_map[other_node] = m_dist_map[current_node] + 1; + m_time_map[other_node] = m_time_map[current_node]; + } + } else{ + assert(get_tree(other_node)==tColorTraits::white()); + //kewl, found a path from one to the other search tree, return + // the connecting edge in src->sink dir + return std::make_pair(out_edge, true); + } + } + } //for all out-edges + } //source-tree-growing + else{ + assert(get_tree(current_node) == tColorTraits::white()); + out_edge_iterator ei, e_end; + if(current_node != m_last_grow_vertex){ + m_last_grow_vertex = current_node; + boost::tie(m_last_grow_edge_it, m_last_grow_edge_end) = out_edges(current_node, m_g); + } + for(; m_last_grow_edge_it != m_last_grow_edge_end; ++m_last_grow_edge_it){ + edge_descriptor in_edge = m_rev_edge_map[*m_last_grow_edge_it]; + if(m_res_cap_map[in_edge] > 0){ //check if there is capacity left + vertex_descriptor other_node = source(in_edge, m_g); + if(get_tree(other_node) == tColorTraits::gray()){ //it's a free node + set_tree(other_node, tColorTraits::white()); //aquire that node to our search tree + set_edge_to_parent(other_node, in_edge); //set us as parent + add_active_node(other_node); //activate that node + m_dist_map[other_node] = m_dist_map[current_node] + 1; //set its distance + m_time_map[other_node] = m_time_map[current_node]; //and time + } else if(get_tree(other_node) == tColorTraits::white()){ + if(is_closer_to_terminal(current_node, other_node)){ + //we are closer to the sink than its parent is, so we "adopt" him + set_edge_to_parent(other_node, in_edge); + m_dist_map[other_node] = m_dist_map[current_node] + 1; + m_time_map[other_node] = m_time_map[current_node]; + } + } else{ + assert(get_tree(other_node)==tColorTraits::black()); + //kewl, found a path from one to the other search tree, + // return the connecting edge in src->sink dir + return std::make_pair(in_edge, true); + } + } + } //for all out-edges + } //sink-tree growing + + //all edges of that node are processed, and no more paths were found. + // remove if from the front of the active queue + finish_node(current_node); + } //while active_nodes not empty + + //no active nodes anymore and no path found, we're done + return std::make_pair(edge_descriptor(), false); + } + + /** + * augments path from s->t and updates residual graph + * source(e, m_g) is the end of the path found in the source-tree + * target(e, m_g) is the beginning of the path found in the sink-tree + * this phase generates orphans on satured edges, if the attached verts are + * from different search-trees orphans are ordered in distance to + * sink/source. first the farest from the source are front_inserted into + * the orphans list, and after that the sink-tree-orphans are + * front_inserted. when going to adoption stage the orphans are popped_front, + * and so we process the nearest verts to the terminals first + */ + void augment(edge_descriptor e) { + assert(get_tree(target(e, m_g)) == tColorTraits::white()); + assert(get_tree(source(e, m_g)) == tColorTraits::black()); + assert(m_orphans.empty()); + + const tEdgeVal bottleneck = find_bottleneck(e); + //now we push the found flow through the path + //for each edge we saturate we have to look for the verts that belong to that edge, one of them becomes an orphans + //now process the connecting edge + m_res_cap_map[e] -= bottleneck; + assert(m_res_cap_map[e] >= 0); + m_res_cap_map[m_rev_edge_map[e]] += bottleneck; + + //now we follow the path back to the source + vertex_descriptor current_node = source(e, m_g); + while(current_node != m_source){ + edge_descriptor pred = get_edge_to_parent(current_node); + m_res_cap_map[pred] -= bottleneck; + assert(m_res_cap_map[pred] >= 0); + m_res_cap_map[m_rev_edge_map[pred]] += bottleneck; + if(m_res_cap_map[pred] == 0){ + set_no_parent(current_node); + m_orphans.push_front(current_node); + } + current_node = source(pred, m_g); + } + //then go forward in the sink-tree + current_node = target(e, m_g); + while(current_node != m_sink){ + edge_descriptor pred = get_edge_to_parent(current_node); + m_res_cap_map[pred] -= bottleneck; + assert(m_res_cap_map[pred] >= 0); + m_res_cap_map[m_rev_edge_map[pred]] += bottleneck; + if(m_res_cap_map[pred] == 0){ + set_no_parent(current_node); + m_orphans.push_front(current_node); + } + current_node = target(pred, m_g); + } + //and add it to the max-flow + m_flow += bottleneck; + } + + /** + * returns the bottleneck of a s->t path (end_of_path is last vertex in + * source-tree, begin_of_path is first vertex in sink-tree) + */ + inline tEdgeVal find_bottleneck(edge_descriptor e){ + BOOST_USING_STD_MIN(); + tEdgeVal minimum_cap = m_res_cap_map[e]; + vertex_descriptor current_node = source(e, m_g); + //first go back in the source tree + while(current_node != m_source){ + edge_descriptor pred = get_edge_to_parent(current_node); + minimum_cap = min BOOST_PREVENT_MACRO_SUBSTITUTION(minimum_cap, m_res_cap_map[pred]); + current_node = source(pred, m_g); + } + //then go forward in the sink-tree + current_node = target(e, m_g); + while(current_node != m_sink){ + edge_descriptor pred = get_edge_to_parent(current_node); + minimum_cap = min BOOST_PREVENT_MACRO_SUBSTITUTION(minimum_cap, m_res_cap_map[pred]); + current_node = target(pred, m_g); + } + return minimum_cap; + } + + /** + * rebuild search trees + * empty the queue of orphans, and find new parents for them or just drop + * them from the search trees + */ + void adopt(){ + while(!m_orphans.empty() || !m_child_orphans.empty()){ + vertex_descriptor current_node; + if(m_child_orphans.empty()){ + //get the next orphan from the main-queue and remove it + current_node = m_orphans.front(); + m_orphans.pop_front(); + } else{ + current_node = m_child_orphans.front(); + m_child_orphans.pop(); + } + if(get_tree(current_node) == tColorTraits::black()){ + //we're in the source-tree + tDistanceVal min_distance = (std::numeric_limits::max)(); + edge_descriptor new_parent_edge; + out_edge_iterator ei, e_end; + for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ + const edge_descriptor in_edge = m_rev_edge_map[*ei]; + assert(target(in_edge, m_g) == current_node); //we should be the target of this edge + if(m_res_cap_map[in_edge] > 0){ + vertex_descriptor other_node = source(in_edge, m_g); + if(get_tree(other_node) == tColorTraits::black() && has_source_connect(other_node)){ + if(m_dist_map[other_node] < min_distance){ + min_distance = m_dist_map[other_node]; + new_parent_edge = in_edge; + } + } + } + } + if(min_distance != (std::numeric_limits::max)()){ + set_edge_to_parent(current_node, new_parent_edge); + m_dist_map[current_node] = min_distance + 1; + m_time_map[current_node] = m_time; + } else{ + m_time_map[current_node] = 0; + for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ + edge_descriptor in_edge = m_rev_edge_map[*ei]; + vertex_descriptor other_node = source(in_edge, m_g); + if(get_tree(other_node) == tColorTraits::black() && has_parent(other_node)){ + if(m_res_cap_map[in_edge] > 0){ + add_active_node(other_node); + } + if(source(get_edge_to_parent(other_node), m_g) == current_node){ + //we are the parent of that node + //it has to find a new parent, too + set_no_parent(other_node); + m_child_orphans.push(other_node); + } + } + } + set_tree(current_node, tColorTraits::gray()); + } //no parent found + } //source-tree-adoption + else{ + //now we should be in the sink-tree, check that... + assert(get_tree(current_node) == tColorTraits::white()); + out_edge_iterator ei, e_end; + edge_descriptor new_parent_edge; + tDistanceVal min_distance = (std::numeric_limits::max)(); + for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ + const edge_descriptor out_edge = *ei; + if(m_res_cap_map[out_edge] > 0){ + const vertex_descriptor other_node = target(out_edge, m_g); + if(get_tree(other_node) == tColorTraits::white() && has_sink_connect(other_node)) + if(m_dist_map[other_node] < min_distance){ + min_distance = m_dist_map[other_node]; + new_parent_edge = out_edge; + } + } + } + if(min_distance != (std::numeric_limits::max)()){ + set_edge_to_parent(current_node, new_parent_edge); + m_dist_map[current_node] = min_distance + 1; + m_time_map[current_node] = m_time; + } else{ + m_time_map[current_node] = 0; + for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ + const edge_descriptor out_edge = *ei; + const vertex_descriptor other_node = target(out_edge, m_g); + if(get_tree(other_node) == tColorTraits::white() && has_parent(other_node)){ + if(m_res_cap_map[out_edge] > 0){ + add_active_node(other_node); + } + if(target(get_edge_to_parent(other_node), m_g) == current_node){ + //we were it's parent, so it has to find a new one, too + set_no_parent(other_node); + m_child_orphans.push(other_node); + } + } + } + set_tree(current_node, tColorTraits::gray()); + } //no parent found + } //sink-tree adoption + } //while !orphans.empty() + } //adopt + + /** + * return next active vertex if there is one, otherwise a null_vertex + */ + inline vertex_descriptor get_next_active_node(){ + while(true){ + if(m_active_nodes.empty()) + return graph_traits::null_vertex(); + vertex_descriptor v = m_active_nodes.front(); + + //if it has no parent, this node can't be active (if its not source or sink) + if(!has_parent(v) && v != m_source && v != m_sink){ + m_active_nodes.pop(); + m_in_active_list_map[v] = false; + } else{ + assert(get_tree(v) == tColorTraits::black() || get_tree(v) == tColorTraits::white()); + return v; + } + } + } + + /** + * adds v as an active vertex, but only if its not in the list already + */ + inline void add_active_node(vertex_descriptor v){ + assert(get_tree(v) != tColorTraits::gray()); + if(m_in_active_list_map[v]){ + return; + } else{ + m_in_active_list_map[v] = true; + m_active_nodes.push(v); + } + } + + /** + * finish_node removes a node from the front of the active queue (its called in grow phase, if no more paths can be found using this node) + */ + inline void finish_node(vertex_descriptor v){ + assert(m_active_nodes.front() == v); + m_active_nodes.pop(); + m_in_active_list_map[v] = false; + m_last_grow_vertex = graph_traits::null_vertex(); + } + + /** + * removes a vertex from the queue of active nodes (actually this does nothing, + * but checks if this node has no parent edge, as this is the criteria for + * being no more active) + */ + inline void remove_active_node(vertex_descriptor v){ + assert(!has_parent(v)); + } + + /** + * returns the search tree of v; tColorValue::black() for source tree, + * white() for sink tree, gray() for no tree + */ + inline tColorValue get_tree(vertex_descriptor v) const { + return m_tree_map[v]; + } + + /** + * sets search tree of v; tColorValue::black() for source tree, white() + * for sink tree, gray() for no tree + */ + inline void set_tree(vertex_descriptor v, tColorValue t){ + m_tree_map[v] = t; + } + + /** + * returns edge to parent vertex of v; + */ + inline edge_descriptor get_edge_to_parent(vertex_descriptor v) const{ + return m_pre_map[v]; + } + + /** + * returns true if the edge stored in m_pre_map[v] is a valid entry + */ + inline bool has_parent(vertex_descriptor v) const{ + return m_has_parent_map[v]; + } + + /** + * sets edge to parent vertex of v; + */ + inline void set_edge_to_parent(vertex_descriptor v, edge_descriptor f_edge_to_parent){ + assert(m_res_cap_map[f_edge_to_parent] > 0); + m_pre_map[v] = f_edge_to_parent; + m_has_parent_map[v] = true; + } + + /** + * removes the edge to parent of v (this is done by invalidating the + * entry an additional map) + */ + inline void set_no_parent(vertex_descriptor v){ + m_has_parent_map[v] = false; + } + + /** + * checks if vertex v has a connect to the sink-vertex (@var m_sink) + * @param v the vertex which is checked + * @return true if a path to the sink was found, false if not + */ + inline bool has_sink_connect(vertex_descriptor v){ + tDistanceVal current_distance = 0; + vertex_descriptor current_vertex = v; + while(true){ + if(m_time_map[current_vertex] == m_time){ + //we found a node which was already checked this round. use it for distance calculations + current_distance += m_dist_map[current_vertex]; + break; + } + if(current_vertex == m_sink){ + m_time_map[m_sink] = m_time; + break; + } + if(has_parent(current_vertex)){ + //it has a parent, so get it + current_vertex = target(get_edge_to_parent(current_vertex), m_g); + ++current_distance; + } else{ + //no path found + return false; + } + } + current_vertex=v; + while(m_time_map[current_vertex] != m_time){ + m_dist_map[current_vertex] = current_distance--; + m_time_map[current_vertex] = m_time; + current_vertex = target(get_edge_to_parent(current_vertex), m_g); + } + return true; + } + + /** + * checks if vertex v has a connect to the source-vertex (@var m_source) + * @param v the vertex which is checked + * @return true if a path to the source was found, false if not + */ + inline bool has_source_connect(vertex_descriptor v){ + tDistanceVal current_distance = 0; + vertex_descriptor current_vertex = v; + while(true){ + if(m_time_map[current_vertex] == m_time){ + //we found a node which was already checked this round. use it for distance calculations + current_distance += m_dist_map[current_vertex]; + break; + } + if(current_vertex == m_source){ + m_time_map[m_source] = m_time; + break; + } + if(has_parent(current_vertex)){ + //it has a parent, so get it + current_vertex = source(get_edge_to_parent(current_vertex), m_g); + ++current_distance; + } else{ + //no path found + return false; + } + } + current_vertex=v; + while(m_time_map[current_vertex] != m_time){ + m_dist_map[current_vertex] = current_distance-- ; + m_time_map[current_vertex] = m_time; + current_vertex = source(get_edge_to_parent(current_vertex), m_g); + } + return true; + } + + /** + * returns true, if p is closer to a terminal than q + */ + inline bool is_closer_to_terminal(vertex_descriptor p, vertex_descriptor q){ + //checks the timestamps first, to build no cycles, and after that the real distance + return (m_time_map[q] <= m_time_map[p] && m_dist_map[q] > m_dist_map[p]+1); + } + + //////// + // member vars + //////// + Graph& m_g; + IndexMap m_index_map; + EdgeCapacityMap m_cap_map; + ResidualCapacityEdgeMap m_res_cap_map; + ReverseEdgeMap m_rev_edge_map; + PredecessorMap m_pre_map; //stores paths found in the growth stage + ColorMap m_tree_map; //maps each vertex into one of the two search tree or none (gray()) + DistanceMap m_dist_map; //stores distance to source/sink nodes + vertex_descriptor m_source; + vertex_descriptor m_sink; + + tQueue m_active_nodes; + std::vector m_in_active_list_vec; + iterator_property_map::iterator, IndexMap> m_in_active_list_map; + + std::list m_orphans; + tQueue m_child_orphans; // we use a second queuqe for child orphans, as they are FIFO processed + + std::vector m_has_parent_vec; + iterator_property_map::iterator, IndexMap> m_has_parent_map; + + std::vector m_time_vec; //timestamp of each node, used for sink/source-path calculations + iterator_property_map::iterator, IndexMap> m_time_map; + tEdgeVal m_flow; + long m_time; + vertex_descriptor m_last_grow_vertex; + out_edge_iterator m_last_grow_edge_it; + out_edge_iterator m_last_grow_edge_end; +}; + +} //namespace boost::detail + +/** + * non-named-parameter version, given everything + * this is the catch all version + */ +template +typename property_traits::value_type +boykov_kolmogorov_max_flow(Graph& g, + CapacityEdgeMap cap, + ResidualCapacityEdgeMap res_cap, + ReverseEdgeMap rev_map, + PredecessorMap pre_map, + ColorMap color, + DistanceMap dist, + IndexMap idx, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + //as this method is the last one before we instantiate the solver, we do the concept checks here + function_requires >(); //to have vertices(), num_vertices(), + function_requires >(); //to have edges() + function_requires >(); //to have source(), target() and out_edges() + function_requires >(); //read flow-values from edges + function_requires >(); //write flow-values to residuals + function_requires >(); //read out reverse edges + function_requires >(); //store predecessor there + function_requires >(); //write corresponding tree + function_requires >(); //write distance to source/sink + function_requires >(); //get index 0...|V|-1 + assert(num_vertices(g) >= 2 && src != sink); + + detail::bk_max_flow< + Graph, CapacityEdgeMap, ResidualCapacityEdgeMap, ReverseEdgeMap, + PredecessorMap, ColorMap, DistanceMap, IndexMap + > algo(g, cap, res_cap, rev_map, pre_map, color, dist, idx, src, sink); + + return algo.max_flow(); +} + +/** + * non-named-parameter version, given capacity, residucal_capacity, + * reverse_edges, and an index map. + */ +template +typename property_traits::value_type +boykov_kolmogorov_max_flow(Graph& g, + CapacityEdgeMap cap, + ResidualCapacityEdgeMap res_cap, + ReverseEdgeMap rev, + IndexMap idx, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) +{ + typename graph_traits::vertices_size_type n_verts = num_vertices(g); + std::vector::edge_descriptor> predecessor_vec(n_verts); + std::vector color_vec(n_verts); + std::vector::vertices_size_type> distance_vec(n_verts); + return + boykov_kolmogorov_max_flow( + g, cap, res_cap, rev, + make_iterator_property_map(predecessor_vec.begin(), idx), + make_iterator_property_map(color_vec.begin(), idx), + make_iterator_property_map(distance_vec.begin(), idx), + idx, src, sink); +} + +/** + * non-named-parameter version, some given: capacity, residual_capacity, + * reverse_edges, color_map and an index map. Use this if you are interested in + * the minimum cut, as the color map provides that info. + */ +template +typename property_traits::value_type +boykov_kolmogorov_max_flow(Graph& g, + CapacityEdgeMap cap, + ResidualCapacityEdgeMap res_cap, + ReverseEdgeMap rev, + ColorMap color, + IndexMap idx, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) +{ + typename graph_traits::vertices_size_type n_verts = num_vertices(g); + std::vector::edge_descriptor> predecessor_vec(n_verts); + std::vector::vertices_size_type> distance_vec(n_verts); + return + boykov_kolmogorov_max_flow( + g, cap, res_cap, rev, + make_iterator_property_map(predecessor_vec.begin(), idx), + color, + make_iterator_property_map(distance_vec.begin(), idx), + idx, src, sink); +} + +/** + * named-parameter version, some given + */ +template +typename property_traits::const_type>::value_type +boykov_kolmogorov_max_flow(Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + const bgl_named_params& params) +{ + return + boykov_kolmogorov_max_flow( + g, + choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity), + choose_pmap(get_param(params, edge_residual_capacity), g, edge_residual_capacity), + choose_const_pmap(get_param(params, edge_reverse), g, edge_reverse), + choose_pmap(get_param(params, vertex_predecessor), g, vertex_predecessor), + choose_pmap(get_param(params, vertex_color), g, vertex_color), + choose_pmap(get_param(params, vertex_distance), g, vertex_distance), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + src, sink); +} + +/** + * named-parameter version, none given + */ +template +typename property_traits::const_type>::value_type +boykov_kolmogorov_max_flow(Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) +{ + bgl_named_params params(0); // bogus empty param + return boykov_kolmogorov_max_flow(g, src, sink, params); +} + +} // namespace boost + +#endif // BOOST_BOYKOV_KOLMOGOROV_MAX_FLOW_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/breadth_first_search.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/breadth_first_search.hpp new file mode 100644 index 0000000000..79fde8cd6e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/breadth_first_search.hpp @@ -0,0 +1,352 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_BREADTH_FIRST_SEARCH_HPP +#define BOOST_GRAPH_BREADTH_FIRST_SEARCH_HPP + +/* + Breadth First Search Algorithm (Cormen, Leiserson, and Rivest p. 470) +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_GRAPH_USE_MPI +#include +#endif // BOOST_GRAPH_USE_MPI + +namespace boost { + + template + struct BFSVisitorConcept { + void constraints() { + function_requires< CopyConstructibleConcept >(); + vis.initialize_vertex(u, g); + vis.discover_vertex(u, g); + vis.examine_vertex(u, g); + vis.examine_edge(e, g); + vis.tree_edge(e, g); + vis.non_tree_edge(e, g); + vis.gray_target(e, g); + vis.black_target(e, g); + vis.finish_vertex(u, g); + } + Visitor vis; + Graph g; + typename graph_traits::vertex_descriptor u; + typename graph_traits::edge_descriptor e; + }; + + + template + void breadth_first_visit + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor s, + Buffer& Q, BFSVisitor vis, ColorMap color) + { + function_requires< IncidenceGraphConcept >(); + typedef graph_traits GTraits; + typedef typename GTraits::vertex_descriptor Vertex; + typedef typename GTraits::edge_descriptor Edge; + function_requires< BFSVisitorConcept >(); + function_requires< ReadWritePropertyMapConcept >(); + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typename GTraits::out_edge_iterator ei, ei_end; + + put(color, s, Color::gray()); vis.discover_vertex(s, g); + Q.push(s); + while (! Q.empty()) { + Vertex u = Q.top(); Q.pop(); vis.examine_vertex(u, g); + for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) { + Vertex v = target(*ei, g); vis.examine_edge(*ei, g); + ColorValue v_color = get(color, v); + if (v_color == Color::white()) { vis.tree_edge(*ei, g); + put(color, v, Color::gray()); vis.discover_vertex(v, g); + Q.push(v); + } else { vis.non_tree_edge(*ei, g); + if (v_color == Color::gray()) vis.gray_target(*ei, g); + else vis.black_target(*ei, g); + } + } // end for + put(color, u, Color::black()); vis.finish_vertex(u, g); + } // end while + } // breadth_first_visit + + + template + void breadth_first_search + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + Buffer& Q, BFSVisitor vis, ColorMap color) + { + // Initialization + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typename boost::graph_traits::vertex_iterator i, i_end; + for (boost::tie(i, i_end) = vertices(g); i != i_end; ++i) { + vis.initialize_vertex(*i, g); + put(color, *i, Color::white()); + } + breadth_first_visit(g, s, Q, vis, color); + } + + namespace graph { struct bfs_visitor_event_not_overridden {}; } + + + template + class bfs_visitor { + public: + bfs_visitor() { } + bfs_visitor(Visitors vis) : m_vis(vis) { } + + template + graph::bfs_visitor_event_not_overridden + initialize_vertex(Vertex u, Graph& g) + { + invoke_visitors(m_vis, u, g, ::boost::on_initialize_vertex()); + return graph::bfs_visitor_event_not_overridden(); + } + + template + graph::bfs_visitor_event_not_overridden + discover_vertex(Vertex u, Graph& g) + { + invoke_visitors(m_vis, u, g, ::boost::on_discover_vertex()); + return graph::bfs_visitor_event_not_overridden(); + } + + template + graph::bfs_visitor_event_not_overridden + examine_vertex(Vertex u, Graph& g) + { + invoke_visitors(m_vis, u, g, ::boost::on_examine_vertex()); + return graph::bfs_visitor_event_not_overridden(); + } + + template + graph::bfs_visitor_event_not_overridden + examine_edge(Edge e, Graph& g) + { + invoke_visitors(m_vis, e, g, ::boost::on_examine_edge()); + return graph::bfs_visitor_event_not_overridden(); + } + + template + graph::bfs_visitor_event_not_overridden + tree_edge(Edge e, Graph& g) + { + invoke_visitors(m_vis, e, g, ::boost::on_tree_edge()); + return graph::bfs_visitor_event_not_overridden(); + } + + template + graph::bfs_visitor_event_not_overridden + non_tree_edge(Edge e, Graph& g) + { + invoke_visitors(m_vis, e, g, ::boost::on_non_tree_edge()); + return graph::bfs_visitor_event_not_overridden(); + } + + template + graph::bfs_visitor_event_not_overridden + gray_target(Edge e, Graph& g) + { + invoke_visitors(m_vis, e, g, ::boost::on_gray_target()); + return graph::bfs_visitor_event_not_overridden(); + } + + template + graph::bfs_visitor_event_not_overridden + black_target(Edge e, Graph& g) + { + invoke_visitors(m_vis, e, g, ::boost::on_black_target()); + return graph::bfs_visitor_event_not_overridden(); + } + + template + graph::bfs_visitor_event_not_overridden + finish_vertex(Vertex u, Graph& g) + { + invoke_visitors(m_vis, u, g, ::boost::on_finish_vertex()); + return graph::bfs_visitor_event_not_overridden(); + } + + BOOST_GRAPH_EVENT_STUB(on_initialize_vertex,bfs) + BOOST_GRAPH_EVENT_STUB(on_discover_vertex,bfs) + BOOST_GRAPH_EVENT_STUB(on_examine_vertex,bfs) + BOOST_GRAPH_EVENT_STUB(on_examine_edge,bfs) + BOOST_GRAPH_EVENT_STUB(on_tree_edge,bfs) + BOOST_GRAPH_EVENT_STUB(on_non_tree_edge,bfs) + BOOST_GRAPH_EVENT_STUB(on_gray_target,bfs) + BOOST_GRAPH_EVENT_STUB(on_black_target,bfs) + BOOST_GRAPH_EVENT_STUB(on_finish_vertex,bfs) + + protected: + Visitors m_vis; + }; + template + bfs_visitor + make_bfs_visitor(Visitors vis) { + return bfs_visitor(vis); + } + typedef bfs_visitor<> default_bfs_visitor; + + + namespace detail { + + template + void bfs_helper + (VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + ColorMap color, + BFSVisitor vis, + const bgl_named_params& params, + BOOST_GRAPH_ENABLE_IF_MODELS(VertexListGraph, vertex_list_graph_tag, + void)* = 0) + { + typedef graph_traits Traits; + // Buffer default + typedef typename Traits::vertex_descriptor Vertex; + typedef boost::queue queue_t; + queue_t Q; + breadth_first_search + (g, s, + choose_param(get_param(params, buffer_param_t()), boost::ref(Q)).get(), + vis, color); + } + +#ifdef BOOST_GRAPH_USE_MPI + template + void bfs_helper + (DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + ColorMap color, + BFSVisitor vis, + const bgl_named_params& params, + BOOST_GRAPH_ENABLE_IF_MODELS(DistributedGraph, distributed_graph_tag, + void)* = 0); +#endif // BOOST_GRAPH_USE_MPI + + //------------------------------------------------------------------------- + // Choose between default color and color parameters. Using + // function dispatching so that we don't require vertex index if + // the color default is not being used. + + template + struct bfs_dispatch { + template + static void apply + (VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params, + ColorMap color) + { + bfs_helper + (g, s, color, + choose_param(get_param(params, graph_visitor), + make_bfs_visitor(null_visitor())), + params); + } + }; + + template <> + struct bfs_dispatch { + template + static void apply + (VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params, + detail::error_property_not_found) + { + null_visitor null_vis; + + bfs_helper + (g, s, + make_two_bit_color_map + (num_vertices(g), + choose_const_pmap(get_param(params, vertex_index), + g, vertex_index)), + choose_param(get_param(params, graph_visitor), + make_bfs_visitor(null_vis)), + params); + } + }; + + } // namespace detail + + + // Named Parameter Variant + template + void breadth_first_search + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params) + { + // The graph is passed by *const* reference so that graph adaptors + // (temporaries) can be passed into this function. However, the + // graph is not really const since we may write to property maps + // of the graph. + VertexListGraph& ng = const_cast(g); + typedef typename property_value< bgl_named_params, + vertex_color_t>::type C; + detail::bfs_dispatch::apply(ng, s, params, + get_param(params, vertex_color)); + } + + + // This version does not initialize colors, user has to. + + template + void breadth_first_visit + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params) + { + // The graph is passed by *const* reference so that graph adaptors + // (temporaries) can be passed into this function. However, the + // graph is not really const since we may write to property maps + // of the graph. + IncidenceGraph& ng = const_cast(g); + + typedef graph_traits Traits; + // Buffer default + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef boost::queue queue_t; + queue_t Q; + + breadth_first_visit + (ng, s, + choose_param(get_param(params, buffer_param_t()), boost::ref(Q)).get(), + choose_param(get_param(params, graph_visitor), + make_bfs_visitor(null_visitor())), + choose_pmap(get_param(params, vertex_color), ng, vertex_color) + ); + } + +} // namespace boost + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif + +#endif // BOOST_GRAPH_BREADTH_FIRST_SEARCH_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/bron_kerbosch_all_cliques.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/bron_kerbosch_all_cliques.hpp new file mode 100644 index 0000000000..35479316a3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/bron_kerbosch_all_cliques.hpp @@ -0,0 +1,309 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_CLIQUE_HPP +#define BOOST_GRAPH_CLIQUE_HPP + +#include +#include +#include + +#include +#include + +#include +namespace boost { + namespace concepts { + BOOST_concept(CliqueVisitor,(Visitor)(Clique)(Graph)) + { + BOOST_CONCEPT_USAGE(CliqueVisitor) + { + vis.clique(k, g); + } + private: + Visitor vis; + Graph g; + Clique k; + }; + } /* namespace concepts */ +using concepts::CliqueVisitorConcept; +} /* namespace boost */ +#include + +namespace boost +{ +// The algorithm implemented in this paper is based on the so-called +// Algorithm 457, published as: +// +// @article{362367, +// author = {Coen Bron and Joep Kerbosch}, +// title = {Algorithm 457: finding all cliques of an undirected graph}, +// journal = {Communications of the ACM}, +// volume = {16}, +// number = {9}, +// year = {1973}, +// issn = {0001-0782}, +// pages = {575--577}, +// doi = {http://doi.acm.org/10.1145/362342.362367}, +// publisher = {ACM Press}, +// address = {New York, NY, USA}, +// } +// +// Sort of. This implementation is adapted from the 1st version of the +// algorithm and does not implement the candidate selection optimization +// described as published - it could, it just doesn't yet. +// +// The algorithm is given as proportional to (3.14)^(n/3) power. This is +// not the same as O(...), but based on time measures and approximation. +// +// Unfortunately, this implementation may be less efficient on non- +// AdjacencyMatrix modeled graphs due to the non-constant implementation +// of the edge(u,v,g) functions. +// +// TODO: It might be worthwhile to provide functionality for passing +// a connectivity matrix to improve the efficiency of those lookups +// when needed. This could simply be passed as a BooleanMatrix +// s.t. edge(u,v,B) returns true or false. This could easily be +// abstracted for adjacency matricies. +// +// The following paper is interesting for a number of reasons. First, +// it lists a number of other such algorithms and second, it describes +// a new algorithm (that does not appear to require the edge(u,v,g) +// function and appears fairly efficient. It is probably worth investigating. +// +// @article{DBLP:journals/tcs/TomitaTT06, +// author = {Etsuji Tomita and Akira Tanaka and Haruhisa Takahashi}, +// title = {The worst-case time complexity for generating all maximal cliques and computational experiments}, +// journal = {Theor. Comput. Sci.}, +// volume = {363}, +// number = {1}, +// year = {2006}, +// pages = {28-42} +// ee = {http://dx.doi.org/10.1016/j.tcs.2006.06.015} +// } + +/** + * The default clique_visitor supplies an empty visitation function. + */ +struct clique_visitor +{ + template + void clique(const VertexSet&, Graph&) + { } +}; + +/** + * The max_clique_visitor records the size of the maximum clique (but not the + * clique itself). + */ +struct max_clique_visitor +{ + max_clique_visitor(std::size_t& max) + : maximum(max) + { } + + template + inline void clique(const Clique& p, const Graph& g) + { + BOOST_USING_STD_MAX(); + maximum = max BOOST_PREVENT_MACRO_SUBSTITUTION (maximum, p.size()); + } + std::size_t& maximum; +}; + +inline max_clique_visitor find_max_clique(std::size_t& max) +{ return max_clique_visitor(max); } + +namespace detail +{ + template + inline bool + is_connected_to_clique(const Graph& g, + typename graph_traits::vertex_descriptor u, + typename graph_traits::vertex_descriptor v, + typename graph_traits::undirected_category) + { + return lookup_edge(u, v, g).second; + } + + template + inline bool + is_connected_to_clique(const Graph& g, + typename graph_traits::vertex_descriptor u, + typename graph_traits::vertex_descriptor v, + typename graph_traits::directed_category) + { + // Note that this could alternate between using an || to determine + // full connectivity. I believe that this should produce strongly + // connected components. Note that using && instead of || will + // change the results to a fully connected subgraph (i.e., symmetric + // edges between all vertices s.t., if a->b, then b->a. + return lookup_edge(u, v, g).second && lookup_edge(v, u, g).second; + } + + template + inline void + filter_unconnected_vertices(const Graph& g, + typename graph_traits::vertex_descriptor v, + const Container& in, + Container& out) + { + function_requires< GraphConcept >(); + + typename graph_traits::directed_category cat; + typename Container::const_iterator i, end = in.end(); + for(i = in.begin(); i != end; ++i) { + if(is_connected_to_clique(g, v, *i, cat)) { + out.push_back(*i); + } + } + } + + template < + typename Graph, + typename Clique, // compsub type + typename Container, // candidates/not type + typename Visitor> + void extend_clique(const Graph& g, + Clique& clique, + Container& cands, + Container& nots, + Visitor vis, + std::size_t min) + { + function_requires< GraphConcept >(); + function_requires< CliqueVisitorConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + + // Is there vertex in nots that is connected to all vertices + // in the candidate set? If so, no clique can ever be found. + // This could be broken out into a separate function. + { + typename Container::iterator ni, nend = nots.end(); + typename Container::iterator ci, cend = cands.end(); + for(ni = nots.begin(); ni != nend; ++ni) { + for(ci = cands.begin(); ci != cend; ++ci) { + // if we don't find an edge, then we're okay. + if(!lookup_edge(*ni, *ci, g).second) break; + } + // if we iterated all the way to the end, then *ni + // is connected to all *ci + if(ci == cend) break; + } + // if we broke early, we found *ni connected to all *ci + if(ni != nend) return; + } + + // TODO: the original algorithm 457 describes an alternative + // (albeit really complicated) mechanism for selecting candidates. + // The given optimizaiton seeks to bring about the above + // condition sooner (i.e., there is a vertex in the not set + // that is connected to all candidates). unfortunately, the + // method they give for doing this is fairly unclear. + + // basically, for every vertex in not, we should know how many + // vertices it is disconnected from in the candidate set. if + // we fix some vertex in the not set, then we want to keep + // choosing vertices that are not connected to that fixed vertex. + // apparently, by selecting fix point with the minimum number + // of disconnections (i.e., the maximum number of connections + // within the candidate set), then the previous condition wil + // be reached sooner. + + // there's some other stuff about using the number of disconnects + // as a counter, but i'm jot really sure i followed it. + + // TODO: If we min-sized cliques to visit, then theoretically, we + // should be able to stop recursing if the clique falls below that + // size - maybe? + + // otherwise, iterate over candidates and and test + // for maxmimal cliquiness. + typename Container::iterator i, j, end = cands.end(); + for(i = cands.begin(); i != cands.end(); ) { + Vertex candidate = *i; + + // add the candidate to the clique (keeping the iterator!) + // typename Clique::iterator ci = clique.insert(clique.end(), candidate); + clique.push_back(candidate); + + // remove it from the candidate set + i = cands.erase(i); + + // build new candidate and not sets by removing all vertices + // that are not connected to the current candidate vertex. + // these actually invert the operation, adding them to the new + // sets if the vertices are connected. its semantically the same. + Container new_cands, new_nots; + filter_unconnected_vertices(g, candidate, cands, new_cands); + filter_unconnected_vertices(g, candidate, nots, new_nots); + + if(new_cands.empty() && new_nots.empty()) { + // our current clique is maximal since there's nothing + // that's connected that we haven't already visited. If + // the clique is below our radar, then we won't visit it. + if(clique.size() >= min) { + vis.clique(clique, g); + } + } + else { + // recurse to explore the new candidates + extend_clique(g, clique, new_cands, new_nots, vis, min); + } + + // we're done with this vertex, so we need to move it + // to the nots, and remove the candidate from the clique. + nots.push_back(candidate); + clique.pop_back(); + } + } +} /* namespace detail */ + +template +inline void +bron_kerbosch_all_cliques(const Graph& g, Visitor vis, std::size_t min) +{ + function_requires< IncidenceGraphConcept >(); + function_requires< VertexListGraphConcept >(); + function_requires< VertexIndexGraphConcept >(); + function_requires< AdjacencyMatrixConcept >(); // Structural requirement only + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + typedef std::vector VertexSet; + typedef std::deque Clique; + function_requires< CliqueVisitorConcept >(); + + // NOTE: We're using a deque to implement the clique, because it provides + // constant inserts and removals at the end and also a constant size. + + VertexIterator i, end; + boost::tie(i, end) = vertices(g); + VertexSet cands(i, end); // start with all vertices as candidates + VertexSet nots; // start with no vertices visited + + Clique clique; // the first clique is an empty vertex set + detail::extend_clique(g, clique, cands, nots, vis, min); +} + +// NOTE: By default the minimum number of vertices per clique is set at 2 +// because singleton cliques aren't really very interesting. +template +inline void +bron_kerbosch_all_cliques(const Graph& g, Visitor vis) +{ bron_kerbosch_all_cliques(g, vis, 2); } + +template +inline std::size_t +bron_kerbosch_clique_number(const Graph& g) +{ + std::size_t ret = 0; + bron_kerbosch_all_cliques(g, find_max_clique(ret)); + return ret; +} + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/buffer_concepts.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/buffer_concepts.hpp new file mode 100644 index 0000000000..2bad8af35d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/buffer_concepts.hpp @@ -0,0 +1,91 @@ +// Copyright Daniel Trebbien 2010. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or the copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_BUFFER_CONCEPTS_HPP +#define BOOST_GRAPH_BUFFER_CONCEPTS_HPP 1 +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + BOOST_concept(Buffer, (B)) + { + typedef typename B::value_type value_type; + typedef typename B::size_type size_type; + + BOOST_CONCEPT_USAGE(Buffer) { + typedef typename boost::add_reference::type reference; + + BOOST_CONCEPT_ASSERT((Assignable)); + + buf.push(g_ct); + buf.pop(); + reference t = buf.top(); + boost::ignore_unused_variable_warning(t); + } + + void const_constraints(const B& cbuf) { + typedef typename boost::add_const::type>::type& const_reference; + + const_reference ct = cbuf.top(); + s = cbuf.size(); + if (cbuf.empty()) + dummy = __LINE__; + } + + int dummy; + + static const value_type g_ct; + size_type s; + B buf; + }; + + BOOST_concept(UpdatableQueue, (Q)) + : Buffer + { + BOOST_CONCEPT_USAGE(UpdatableQueue) { + q.update(g_ct); + } + + void const_constraints(const Q& cq) { + if (cq.contains(g_ct)) + dummy = __LINE__; + } + + int dummy; + + static const typename Buffer::value_type g_ct; + Q q; + }; + + BOOST_concept(KeyedUpdatableQueue, (Q)) + : UpdatableQueue + { + typedef typename Q::key_type key_type; + typedef typename Q::key_map key_map; + + BOOST_CONCEPT_USAGE(KeyedUpdatableQueue) { + BOOST_CONCEPT_ASSERT((boost::ReadWritePropertyMapConcept::value_type>)); + } + + void const_constraints(const Q& cq) { + km = cq.keys(); + k = get(km, g_ct); + } + + static const typename Buffer::value_type g_ct; + key_type k; + key_map km; + Q q; + }; + +} // end `namespace boost` + +#endif // !BOOST_GRAPH_BUFFER_CONCEPTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/chrobak_payne_drawing.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/chrobak_payne_drawing.hpp new file mode 100644 index 0000000000..9e3a2f368e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/chrobak_payne_drawing.hpp @@ -0,0 +1,270 @@ +//======================================================================= +// Copyright (c) Aaron Windsor 2007 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef __CHROBAK_PAYNE_DRAWING_HPP__ +#define __CHROBAK_PAYNE_DRAWING_HPP__ + +#include +#include +#include +#include //for next and prior +#include +#include + + +namespace boost +{ + + namespace graph { namespace detail + { + + template + void accumulate_offsets(typename graph_traits::vertex_descriptor v, + std::size_t offset, + const Graph& g, + VertexTo1DCoordMap x, + VertexTo1DCoordMap delta_x, + VertexToVertexMap left, + VertexToVertexMap right) + { + if (v != graph_traits::null_vertex()) + { + x[v] += delta_x[v] + offset; + accumulate_offsets(left[v], x[v], g, x, delta_x, left, right); + accumulate_offsets(right[v], x[v], g, x, delta_x, left, right); + } + } + + } /*namespace detail*/ } /*namespace graph*/ + + + + + + template + void chrobak_payne_straight_line_drawing(const Graph& g, + PlanarEmbedding embedding, + ForwardIterator ordering_begin, + ForwardIterator ordering_end, + GridPositionMap drawing, + VertexIndexMap vm + ) + { + + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename graph_traits::vertex_iterator vertex_iterator_t; + typedef typename PlanarEmbedding::value_type::const_iterator + edge_permutation_iterator_t; + typedef typename graph_traits::vertices_size_type v_size_t; + typedef std::vector vertex_vector_t; + typedef std::vector vsize_vector_t; + typedef std::vector bool_vector_t; + typedef boost::iterator_property_map + + vertex_to_vertex_map_t; + typedef boost::iterator_property_map + + vertex_to_vsize_map_t; + typedef boost::iterator_property_map + + vertex_to_bool_map_t; + + vertex_vector_t left_vector(num_vertices(g), + graph_traits::null_vertex() + ); + vertex_vector_t right_vector(num_vertices(g), + graph_traits::null_vertex() + ); + vsize_vector_t seen_as_right_vector(num_vertices(g), 0); + vsize_vector_t seen_vector(num_vertices(g), 0); + vsize_vector_t delta_x_vector(num_vertices(g),0); + vsize_vector_t y_vector(num_vertices(g)); + vsize_vector_t x_vector(num_vertices(g),0); + bool_vector_t installed_vector(num_vertices(g),false); + + vertex_to_vertex_map_t left(left_vector.begin(), vm); + vertex_to_vertex_map_t right(right_vector.begin(), vm); + vertex_to_vsize_map_t seen_as_right(seen_as_right_vector.begin(), vm); + vertex_to_vsize_map_t seen(seen_vector.begin(), vm); + vertex_to_vsize_map_t delta_x(delta_x_vector.begin(), vm); + vertex_to_vsize_map_t y(y_vector.begin(), vm); + vertex_to_vsize_map_t x(x_vector.begin(), vm); + vertex_to_bool_map_t installed(installed_vector.begin(), vm); + + v_size_t timestamp = 1; + vertex_vector_t installed_neighbors; + + ForwardIterator itr = ordering_begin; + vertex_t v1 = *itr; ++itr; + vertex_t v2 = *itr; ++itr; + vertex_t v3 = *itr; ++itr; + + delta_x[v2] = 1; + delta_x[v3] = 1; + + y[v1] = 0; + y[v2] = 0; + y[v3] = 1; + + right[v1] = v3; + right[v3] = v2; + + installed[v1] = installed[v2] = installed[v3] = true; + + for(ForwardIterator itr_end = ordering_end; itr != itr_end; ++itr) + { + vertex_t v = *itr; + + // First, find the leftmost and rightmost neighbor of v on the outer + // cycle of the embedding. + // Note: since we're moving clockwise through the edges adjacent to v, + // we're actually moving from right to left among v's neighbors on the + // outer face (since v will be installed above them all) looking for + // the leftmost and rightmost installed neigbhors + + vertex_t leftmost = graph_traits::null_vertex(); + vertex_t rightmost = graph_traits::null_vertex(); + + installed_neighbors.clear(); + + vertex_t prev_vertex = graph_traits::null_vertex(); + edge_permutation_iterator_t pi, pi_end; + pi_end = embedding[v].end(); + for(pi = embedding[v].begin(); pi != pi_end; ++pi) + { + vertex_t curr_vertex = source(*pi,g) == v ? + target(*pi,g) : source(*pi,g); + + // Skip any self-loops or parallel edges + if (curr_vertex == v || curr_vertex == prev_vertex) + continue; + + if (installed[curr_vertex]) + { + seen[curr_vertex] = timestamp; + + if (right[curr_vertex] != graph_traits::null_vertex()) + { + seen_as_right[right[curr_vertex]] = timestamp; + } + installed_neighbors.push_back(curr_vertex); + } + + prev_vertex = curr_vertex; + } + + typename vertex_vector_t::iterator vi, vi_end; + vi_end = installed_neighbors.end(); + for(vi = installed_neighbors.begin(); vi != vi_end; ++vi) + { + if (right[*vi] == graph_traits::null_vertex() || + seen[right[*vi]] != timestamp + ) + rightmost = *vi; + if (seen_as_right[*vi] != timestamp) + leftmost = *vi; + } + + ++timestamp; + + //stretch gaps + ++delta_x[right[leftmost]]; + ++delta_x[rightmost]; + + //adjust offsets + std::size_t delta_p_q = 0; + vertex_t stopping_vertex = right[rightmost]; + for(vertex_t temp = right[leftmost]; temp != stopping_vertex; + temp = right[temp] + ) + { + delta_p_q += delta_x[temp]; + } + + delta_x[v] = ((y[rightmost] + delta_p_q) - y[leftmost])/2; + y[v] = y[leftmost] + delta_x[v]; + delta_x[rightmost] = delta_p_q - delta_x[v]; + + bool leftmost_and_rightmost_adjacent = right[leftmost] == rightmost; + if (!leftmost_and_rightmost_adjacent) + delta_x[right[leftmost]] -= delta_x[v]; + + //install v + if (!leftmost_and_rightmost_adjacent) + { + left[v] = right[leftmost]; + vertex_t next_to_rightmost; + for(vertex_t temp = leftmost; temp != rightmost; + temp = right[temp] + ) + { + next_to_rightmost = temp; + } + + right[next_to_rightmost] = graph_traits::null_vertex(); + } + else + { + left[v] = graph_traits::null_vertex(); + } + + right[leftmost] = v; + right[v] = rightmost; + installed[v] = true; + + } + + graph::detail::accumulate_offsets + (*ordering_begin,0,g,x,delta_x,left,right); + + vertex_iterator_t vi, vi_end; + for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + { + vertex_t v(*vi); + drawing[v].x = x[v]; + drawing[v].y = y[v]; + } + + } + + + + + template + inline void chrobak_payne_straight_line_drawing(const Graph& g, + PlanarEmbedding embedding, + ForwardIterator ord_begin, + ForwardIterator ord_end, + GridPositionMap drawing + ) + { + chrobak_payne_straight_line_drawing(g, + embedding, + ord_begin, + ord_end, + drawing, + get(vertex_index,g) + ); + } + + + + +} // namespace boost + +#endif //__CHROBAK_PAYNE_DRAWING_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/circle_layout.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/circle_layout.hpp new file mode 100644 index 0000000000..9c6ca6ef57 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/circle_layout.hpp @@ -0,0 +1,58 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_CIRCLE_LAYOUT_HPP +#define BOOST_GRAPH_CIRCLE_LAYOUT_HPP +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + /** + * \brief Layout the graph with the vertices at the points of a regular + * n-polygon. + * + * The distance from the center of the polygon to each point is + * determined by the @p radius parameter. The @p position parameter + * must be an Lvalue Property Map whose value type is a class type + * containing @c x and @c y members that will be set to the @c x and + * @c y coordinates. + */ + template + void + circle_graph_layout(const VertexListGraph& g, PositionMap position, + Radius radius) + { + BOOST_STATIC_ASSERT (property_traits::value_type::dimensions >= 2); + const double pi = boost::math::constants::pi(); + +#ifndef BOOST_NO_STDC_NAMESPACE + using std::sin; + using std::cos; +#endif // BOOST_NO_STDC_NAMESPACE + + typedef typename graph_traits::vertices_size_type + vertices_size_type; + + vertices_size_type n = num_vertices(g); + + vertices_size_type i = 0; + double two_pi_over_n = 2. * pi / n; + BGL_FORALL_VERTICES_T(v, g, VertexListGraph) { + position[v][0] = radius * cos(i * two_pi_over_n); + position[v][1] = radius * sin(i * two_pi_over_n); + ++i; + } + } +} // end namespace boost + +#endif // BOOST_GRAPH_CIRCLE_LAYOUT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/closeness_centrality.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/closeness_centrality.hpp new file mode 100644 index 0000000000..77cea7b0e7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/closeness_centrality.hpp @@ -0,0 +1,157 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_CLOSENESS_CENTRALITY_HPP +#define BOOST_GRAPH_CLOSENESS_CENTRALITY_HPP + +#include +#include + +namespace boost +{ +template > +struct closeness_measure + : public geodesic_measure +{ + typedef geodesic_measure< Graph, DistanceType, ResultType> base_type; + typedef typename base_type::distance_type distance_type; + typedef typename base_type::result_type result_type; + + result_type operator ()(distance_type d, const Graph&) + { + function_requires< NumericValueConcept >(); + function_requires< NumericValueConcept >(); + function_requires< AdaptableUnaryFunctionConcept >(); + return (d == base_type::infinite_distance()) + ? base_type::zero_result() + : rec(result_type(d)); + } + Reciprocal rec; +}; + +template +inline closeness_measure< + Graph, typename property_traits::value_type, double, + detail::reciprocal > +measure_closeness(const Graph&, DistanceMap) +{ + typedef typename property_traits::value_type Distance; + return closeness_measure >(); +} + +template +inline closeness_measure< + Graph, typename property_traits::value_type, T, + detail::reciprocal > +measure_closeness(const Graph&, DistanceMap) +{ + typedef typename property_traits::value_type Distance; + return closeness_measure >(); +} + +template +inline closeness_measure< + Graph, typename property_traits::value_type, T, + Reciprocal> +measure_closeness(const Graph&, DistanceMap) +{ + typedef typename property_traits::value_type Distance; + return closeness_measure(); +} + +template +inline typename Measure::result_type +closeness_centrality(const Graph& g, + DistanceMap dist, + Measure measure, + Combinator combine) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type Distance; + function_requires< NumericValueConcept >(); + function_requires< DistanceMeasureConcept >(); + + Distance n = detail::combine_distances(g, dist, combine, Distance(0)); + return measure(n, g); +} + +template +inline typename Measure::result_type +closeness_centrality(const Graph& g, DistanceMap dist, Measure measure) +{ + function_requires< GraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type Distance; + + return closeness_centrality(g, dist, measure, std::plus()); +} + +template +inline double closeness_centrality(const Graph& g, DistanceMap dist) +{ return closeness_centrality(g, dist, measure_closeness(g, dist)); } + +template +inline T closeness_centrality(const Graph& g, DistanceMap dist) +{ return closeness_centrality(g, dist, measure_closeness(g, dist)); } + +template +inline void +all_closeness_centralities(const Graph& g, + DistanceMatrixMap dist, + CentralityMap cent, + Measure measure) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type DistanceMap; + function_requires< ReadablePropertyMapConcept >(); + function_requires< WritablePropertyMapConcept >(); + typedef typename property_traits::value_type Distance; + typedef typename property_traits::value_type Centrality; + + typename graph_traits::vertex_iterator i, end; + for(tie(i, end) = vertices(g); i != end; ++i) { + DistanceMap dm = get(dist, *i); + Centrality c = closeness_centrality(g, dm, measure); + put(cent, *i, c); + } +} + +template +inline void +all_closeness_centralities(const Graph& g, + DistanceMatrixMap dist, + CentralityMap cent) +{ + function_requires< GraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type DistanceMap; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type Distance; + typedef typename property_traits::value_type Result; + + all_closeness_centralities(g, dist, cent, measure_closeness(g, DistanceMap())); +} + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/clustering_coefficient.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/clustering_coefficient.hpp new file mode 100644 index 0000000000..15574f0415 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/clustering_coefficient.hpp @@ -0,0 +1,158 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_CLUSTERING_COEFFICIENT_HPP +#define BOOST_GRAPH_CLUSTERING_COEFFICIENT_HPP + +#include +#include +#include +#include + +namespace boost +{ +namespace detail +{ + template + inline typename graph_traits::degree_size_type + possible_edges(const Graph& g, std::size_t k, directed_tag) + { + function_requires< GraphConcept >(); + typedef typename graph_traits::degree_size_type T; + return T(k) * (T(k) - 1); + } + + template + inline typename graph_traits::degree_size_type + possible_edges(const Graph& g, size_t k, undirected_tag) + { + // dirty little trick... + return possible_edges(g, k, directed_tag()) / 2; + } + + // This template matches directedS and bidirectionalS. + template + inline typename graph_traits::degree_size_type + count_edges(const Graph& g, + typename Graph::vertex_descriptor u, + typename Graph::vertex_descriptor v, + directed_tag) + + { + function_requires< AdjacencyMatrixConcept >(); + return (lookup_edge(u, v, g).second ? 1 : 0) + + (lookup_edge(v, u, g).second ? 1 : 0); + } + + // This template matches undirectedS + template + inline typename graph_traits::degree_size_type + count_edges(const Graph& g, + typename Graph::vertex_descriptor u, + typename Graph::vertex_descriptor v, + undirected_tag) + { + function_requires< AdjacencyMatrixConcept >(); + return lookup_edge(u, v, g).second ? 1 : 0; + } +} + +template +inline typename graph_traits::degree_size_type +num_paths_through_vertex(const Graph& g, Vertex v) +{ + function_requires< AdjacencyGraphConcept >(); + typedef typename graph_traits::directed_category Directed; + typedef typename graph_traits::adjacency_iterator AdjacencyIterator; + + // TODO: There should actually be a set of neighborhood functions + // for things like this (num_neighbors() would be great). + + AdjacencyIterator i, end; + boost::tie(i, end) = adjacent_vertices(v, g); + std::size_t k = std::distance(i, end); + return detail::possible_edges(g, k, Directed()); +} + +template +inline typename graph_traits::degree_size_type +num_triangles_on_vertex(const Graph& g, Vertex v) +{ + function_requires< IncidenceGraphConcept >(); + function_requires< AdjacencyGraphConcept >(); + typedef typename graph_traits::degree_size_type Degree; + typedef typename graph_traits::directed_category Directed; + typedef typename graph_traits::adjacency_iterator AdjacencyIterator; + + // TODO: I might be able to reduce the requirement from adjacency graph + // to incidence graph by using out edges. + + Degree count(0); + AdjacencyIterator i, j, end; + for(boost::tie(i, end) = adjacent_vertices(v, g); i != end; ++i) { + for(j = boost::next(i); j != end; ++j) { + count += detail::count_edges(g, *i, *j, Directed()); + } + } + return count; +} /* namespace detail */ + +template +inline T +clustering_coefficient(const Graph& g, Vertex v) +{ + T zero(0); + T routes = T(num_paths_through_vertex(g, v)); + return (routes > zero) ? + T(num_triangles_on_vertex(g, v)) / routes : zero; +} + +template +inline double +clustering_coefficient(const Graph& g, Vertex v) +{ return clustering_coefficient(g, v); } + +template +inline typename property_traits::value_type +all_clustering_coefficients(const Graph& g, ClusteringMap cm) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + function_requires< WritablePropertyMapConcept >(); + typedef typename property_traits::value_type Coefficient; + + Coefficient sum(0); + VertexIterator i, end; + for(boost::tie(i, end) = vertices(g); i != end; ++i) { + Coefficient cc = clustering_coefficient(g, *i); + put(cm, *i, cc); + sum += cc; + } + return sum / Coefficient(num_vertices(g)); +} + +template +inline typename property_traits::value_type +mean_clustering_coefficient(const Graph& g, ClusteringMap cm) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type Coefficient; + + Coefficient cc(0); + VertexIterator i, end; + for(boost::tie(i, end) = vertices(g); i != end; ++i) { + cc += get(cm, *i); + } + return cc / Coefficient(num_vertices(g)); +} + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/compressed_sparse_row_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/compressed_sparse_row_graph.hpp new file mode 100644 index 0000000000..9b5a4d52ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/compressed_sparse_row_graph.hpp @@ -0,0 +1,1599 @@ +// Copyright 2005-2009 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Douglas Gregor +// Andrew Lumsdaine + +// Compressed sparse row graph type + +#ifndef BOOST_GRAPH_COMPRESSED_SPARSE_ROW_GRAPH_HPP +#define BOOST_GRAPH_COMPRESSED_SPARSE_ROW_GRAPH_HPP + +#include +#include +#include +#include +#include +#include +#if 0 +#include // For some debugging code below +#endif +#include +#include +#include // For keep_all +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_GRAPH_NO_BUNDLED_PROPERTIES +# error The Compressed Sparse Row graph only supports bundled properties. +# error You will need a compiler that conforms better to the C++ standard. +#endif + +namespace boost { + +// A tag type indicating that the graph in question is a compressed +// sparse row graph. This is an internal detail of the BGL. +struct csr_graph_tag; + +// A type (edges_are_sorted_t) and a value (edges_are_sorted) used to indicate +// that the edge list passed into the CSR graph is already sorted by source +// vertex. +enum edges_are_sorted_t {edges_are_sorted}; + +// A type (edges_are_sorted_global_t) and a value (edges_are_sorted_global) +// used to indicate that the edge list passed into the CSR graph is already +// sorted by source vertex. +enum edges_are_sorted_global_t {edges_are_sorted_global}; + +// A type (edges_are_unsorted_t) and a value (edges_are_unsorted) used to +// indicate that the edge list passed into the CSR graph is not sorted by +// source vertex. This version caches the edge information in memory, and thus +// requires only a single pass over the input data. +enum edges_are_unsorted_t {edges_are_unsorted}; + +// A type (edges_are_unsorted_multi_pass_t) and a value +// (edges_are_unsorted_multi_pass) used to indicate that the edge list passed +// into the CSR graph is not sorted by source vertex. This version uses less +// memory but requires multi-pass capability on the iterators. +enum edges_are_unsorted_multi_pass_t {edges_are_unsorted_multi_pass}; + +// A type (edges_are_unsorted_multi_pass_global_t) and a value +// (edges_are_unsorted_multi_pass_global) used to indicate that the edge list +// passed into the CSR graph is not sorted by source vertex. This version uses +// less memory but requires multi-pass capability on the iterators. The +// global mapping and filtering is done here because it is often faster and it +// greatly simplifies handling of edge properties. +enum edges_are_unsorted_multi_pass_global_t {edges_are_unsorted_multi_pass_global}; + +// A type (construct_inplace_from_sources_and_targets_t) and a value +// (construct_inplace_from_sources_and_targets) used to indicate that mutable +// vectors of sources and targets (and possibly edge properties) are being used +// to construct the CSR graph. These vectors are sorted in-place and then the +// targets and properties are swapped into the graph data structure. +enum construct_inplace_from_sources_and_targets_t {construct_inplace_from_sources_and_targets}; + +// A type (construct_inplace_from_sources_and_targets_global_t) and a value +// (construct_inplace_from_sources_and_targets_global) used to indicate that +// mutable vectors of sources and targets (and possibly edge properties) are +// being used to construct the CSR graph. These vectors are sorted in-place +// and then the targets and properties are swapped into the graph data +// structure. It is assumed that global indices (for distributed CSR) are +// used, and a map is required to convert those to local indices. This +// constructor is intended for internal use by the various CSR graphs +// (sequential and distributed). +enum construct_inplace_from_sources_and_targets_global_t {construct_inplace_from_sources_and_targets_global}; + +// A type (edges_are_unsorted_global_t) and a value (edges_are_unsorted_global) +// used to indicate that the edge list passed into the CSR graph is not sorted +// by source vertex. The data is also stored using global vertex indices, and +// must be filtered to choose only local vertices. This constructor caches the +// edge information in memory, and thus requires only a single pass over the +// input data. This constructor is intended for internal use by the +// distributed CSR constructors. +enum edges_are_unsorted_global_t {edges_are_unsorted_global}; + +/**************************************************************************** + * Local helper macros to reduce typing and clutter later on. * + ****************************************************************************/ +#define BOOST_CSR_GRAPH_TEMPLATE_PARMS \ + typename Directed, typename VertexProperty, typename EdgeProperty, \ + typename GraphProperty, typename Vertex, typename EdgeIndex +#define BOOST_CSR_GRAPH_TYPE \ + compressed_sparse_row_graph +#define BOOST_DIR_CSR_GRAPH_TEMPLATE_PARMS \ + typename VertexProperty, typename EdgeProperty, \ + typename GraphProperty, typename Vertex, typename EdgeIndex +#define BOOST_DIR_CSR_GRAPH_TYPE \ + compressed_sparse_row_graph +#define BOOST_BIDIR_CSR_GRAPH_TEMPLATE_PARMS \ + typename VertexProperty, typename EdgeProperty, \ + typename GraphProperty, typename Vertex, typename EdgeIndex +#define BOOST_BIDIR_CSR_GRAPH_TYPE \ + compressed_sparse_row_graph + +namespace detail { + template + struct default_construct_iterator: public boost::iterator_facade, T, boost::random_access_traversal_tag, const T&> { + typedef boost::iterator_facade, T, std::random_access_iterator_tag, const T&> base_type; + T saved_value; + const T& dereference() const {return saved_value;} + bool equal(default_construct_iterator i) const {return true;} + void increment() {} + void decrement() {} + void advance(typename base_type::difference_type) {} + typename base_type::difference_type distance_to(default_construct_iterator) const {return 0;} + }; + + template + struct compare_first { + Less less; + compare_first(Less less = Less()): less(less) {} + template + bool operator()(const Tuple& a, const Tuple& b) const { + return less(a.template get<0>(), b.template get<0>()); + } + }; + + template + struct my_tuple_get_class { + typedef const Result& result_type; + template + result_type operator()(const Tuple& t) const { + return t.template get(); + } + }; +} + +/** Compressed sparse row graph. + * + * Vertex and EdgeIndex should be unsigned integral types and should + * specialize numeric_limits. + */ +template +class compressed_sparse_row_graph; // Not defined + +template +class compressed_sparse_row_graph + : public detail::indexed_vertex_properties > +{ + public: + typedef detail::indexed_vertex_properties > + inherited_vertex_properties; + + public: + // For Property Graph + typedef typename graph_detail::graph_prop::property graph_property_type; + typedef typename graph_detail::graph_prop::bundle graph_bundled; + + typedef detail::compressed_sparse_row_structure forward_type; + + public: + /* At this time, the compressed sparse row graph can only be used to + * create directed and bidirectional graphs. In the future, + * undirected CSR graphs will also be supported. + */ + // BOOST_STATIC_ASSERT((is_same::value)); + + // Concept requirements: + // For Graph + typedef Vertex vertex_descriptor; + typedef detail::csr_edge_descriptor edge_descriptor; + typedef directed_tag directed_category; + typedef allow_parallel_edge_tag edge_parallel_category; + + class traversal_category: public incidence_graph_tag, + public adjacency_graph_tag, + public vertex_list_graph_tag, + public edge_list_graph_tag {}; + + static vertex_descriptor null_vertex() { return vertex_descriptor(-1); } + + // For VertexListGraph + typedef counting_iterator vertex_iterator; + typedef Vertex vertices_size_type; + + // For EdgeListGraph + typedef EdgeIndex edges_size_type; + + // For IncidenceGraph + typedef detail::csr_out_edge_iterator out_edge_iterator; + typedef EdgeIndex degree_size_type; + + // For AdjacencyGraph + typedef typename std::vector::const_iterator adjacency_iterator; + + // For EdgeListGraph + typedef detail::csr_edge_iterator edge_iterator; + + // For BidirectionalGraph (not implemented) + typedef void in_edge_iterator; + + // For internal use + typedef csr_graph_tag graph_tag; + + typedef typename forward_type::inherited_edge_properties::edge_bundled edge_bundled; + typedef typename forward_type::inherited_edge_properties::edge_push_back_type edge_push_back_type; + typedef typename forward_type::inherited_edge_properties::edge_property_type edge_property_type; + + // Constructors + + // Default constructor: an empty graph. + compressed_sparse_row_graph(): m_property() {} + + // With numverts vertices + compressed_sparse_row_graph(vertices_size_type numverts) + : inherited_vertex_properties(numverts), m_forward(numverts) {} + + // From number of vertices and unsorted list of edges + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numverts), m_property(prop) + { + m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, numverts, typed_identity_property_map(), keep_all()); + } + + // From number of vertices and unsorted list of edges, plus edge properties + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numverts), m_forward(), m_property(prop) + { + m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, ep_iter, numverts, typed_identity_property_map(), keep_all()); + } + + // From number of vertices and unsorted list of edges, with filter and + // global-to-local map + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_global_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numlocalverts, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numlocalverts), m_forward(), m_property(prop) + { + m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, numlocalverts, global_to_local, source_pred); + } + + // From number of vertices and unsorted list of edges, plus edge properties, + // with filter and global-to-local map + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_global_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numlocalverts, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numlocalverts), m_forward(), m_property(prop) + { + m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, ep_iter, numlocalverts, global_to_local, source_pred); + } + + // From number of vertices and sorted list of edges (new interface) + template + compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + edges_size_type numedges = 0, + const GraphProperty& prop = GraphProperty()) + : m_property(prop) + { + m_forward.assign_from_sorted_edges(edge_begin, edge_end, typed_identity_property_map(), keep_all(), numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // From number of vertices and sorted list of edges (new interface) + template + compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + edges_size_type numedges = 0, + const GraphProperty& prop = GraphProperty()) + : m_property(prop) + { + m_forward.assign_from_sorted_edges(edge_begin, edge_end, ep_iter, typed_identity_property_map(), keep_all(), numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // From number of vertices and sorted list of edges, filtered and global (new interface) + template + compressed_sparse_row_graph(edges_are_sorted_global_t, + InputIterator edge_begin, InputIterator edge_end, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : m_property(prop) + { + m_forward.assign_from_sorted_edges(edge_begin, edge_end, global_to_local, source_pred, numverts, 0); + inherited_vertex_properties::resize(numverts); + } + + // From number of vertices and sorted list of edges (new interface) + template + compressed_sparse_row_graph(edges_are_sorted_global_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : m_property(prop) + { + m_forward.assign_from_sorted_edges(edge_begin, edge_end, ep_iter, global_to_local, source_pred, numverts, 0); + inherited_vertex_properties::resize(numverts); + } + + // From number of vertices and mutable vectors of sources and targets; + // vectors are returned with unspecified contents but are guaranteed not to + // share storage with the constructed graph. + compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numverts), m_property(prop) + { + m_forward.assign_sources_and_targets_global(sources, targets, numverts, boost::typed_identity_property_map()); + } + + // From number of vertices and mutable vectors of sources and targets, + // expressed with global vertex indices; vectors are returned with + // unspecified contents but are guaranteed not to share storage with the + // constructed graph. This constructor should only be used by the + // distributed CSR graph. + template + compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_global_t, + std::vector& sources, + std::vector& targets, + vertices_size_type numlocalverts, + GlobalToLocal global_to_local, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numlocalverts), m_property(prop) + { + m_forward.assign_sources_and_targets_global(sources, targets, numlocalverts, global_to_local); + } + + // From number of vertices and mutable vectors of sources, targets, and edge + // properties; vectors are returned with unspecified contents but are + // guaranteed not to share storage with the constructed graph. + compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + std::vector& edge_props, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numverts), m_property(prop) + { + m_forward.assign_sources_and_targets_global(sources, targets, edge_props, numverts, boost::typed_identity_property_map()); + } + + // From number of vertices and mutable vectors of sources and targets and + // edge properties, expressed with global vertex indices; vectors are + // returned with unspecified contents but are guaranteed not to share + // storage with the constructed graph. This constructor should only be used + // by the distributed CSR graph. + template + compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_global_t, + std::vector& sources, + std::vector& targets, + std::vector& edge_props, + vertices_size_type numlocalverts, + GlobalToLocal global_to_local, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numlocalverts), m_property(prop) + { + m_forward.assign_sources_and_targets_global(sources, targets, edge_props, numlocalverts, global_to_local); + } + + // From number of vertices and single-pass range of unsorted edges. Data is + // cached in coordinate form before creating the actual graph. + template + compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numverts), m_property(prop) + { + std::vector sources, targets; + boost::graph::detail::split_into_separate_coords + (edge_begin, edge_end, sources, targets); + m_forward.assign_sources_and_targets_global(sources, targets, numverts, boost::typed_identity_property_map()); + } + + // From number of vertices and single-pass range of unsorted edges and + // single-pass range of edge properties. Data is cached in coordinate form + // before creating the actual graph. + template + compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numverts), m_property(prop) + { + std::vector sources, targets; + boost::graph::detail::split_into_separate_coords + (edge_begin, edge_end, sources, targets); + size_t numedges = sources.size(); + std::vector edge_props(numedges); + for (size_t i = 0; i < numedges; ++i) { + edge_props[i] = *ep_iter++; + } + m_forward.assign_sources_and_targets_global(sources, targets, edge_props, numverts, boost::typed_identity_property_map()); + } + + // From number of vertices and single-pass range of unsorted edges. Data is + // cached in coordinate form before creating the actual graph. Edges are + // filtered and transformed for use in a distributed graph. + template + compressed_sparse_row_graph(edges_are_unsorted_global_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numlocalverts, + GlobalToLocal global_to_local, + const SourcePred& source_pred, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numlocalverts), m_property(prop) + { + std::vector sources, targets; + boost::graph::detail::split_into_separate_coords_filtered + (edge_begin, edge_end, sources, targets, source_pred); + m_forward.assign_sources_and_targets_global(sources, targets, numlocalverts, global_to_local); + } + + // From number of vertices and single-pass range of unsorted edges and + // single-pass range of edge properties. Data is cached in coordinate form + // before creating the actual graph. Edges are filtered and transformed for + // use in a distributed graph. + template + compressed_sparse_row_graph(edges_are_unsorted_global_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numlocalverts, + GlobalToLocal global_to_local, + const SourcePred& source_pred, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numlocalverts), m_property(prop) + { + std::vector sources, targets; + std::vector edge_props; + boost::graph::detail::split_into_separate_coords_filtered + (edge_begin, edge_end, ep_iter, sources, targets, edge_props, source_pred); + m_forward.assign_sources_and_targets_global(sources, targets, edge_props, numlocalverts, global_to_local); + } + + + // Requires IncidenceGraph and a vertex index map + template + compressed_sparse_row_graph(const Graph& g, const VertexIndexMap& vi, + vertices_size_type numverts, + edges_size_type numedges) + : m_property() + { + assign(g, vi, numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Requires VertexListGraph and EdgeListGraph + template + compressed_sparse_row_graph(const Graph& g, const VertexIndexMap& vi) + : m_property() + { + typename graph_traits::edges_size_type numedges = num_edges(g); + if (is_same::directed_category, undirectedS>::value) { + numedges *= 2; // Double each edge (actual doubling done by out_edges function) + } + vertices_size_type numverts = num_vertices(g); + assign(g, vi, numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Requires vertex index map plus requirements of previous constructor + template + explicit compressed_sparse_row_graph(const Graph& g) + : m_property() + { + typename graph_traits::edges_size_type numedges = num_edges(g); + if (is_same::directed_category, undirectedS>::value) { + numedges *= 2; // Double each edge (actual doubling done by out_edges function) + } + assign(g, get(vertex_index, g), num_vertices(g), numedges); + } + + // From any graph (slow and uses a lot of memory) + // Requires IncidenceGraph and a vertex index map + // Internal helper function + // Note that numedges must be doubled for undirected source graphs + template + void + assign(const Graph& g, const VertexIndexMap& vi, + vertices_size_type numverts, edges_size_type numedges) + { + m_forward.assign(g, vi, numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Requires the above, plus VertexListGraph and EdgeListGraph + template + void assign(const Graph& g, const VertexIndexMap& vi) + { + typename graph_traits::edges_size_type numedges = num_edges(g); + if (is_same::directed_category, undirectedS>::value) { + numedges *= 2; // Double each edge (actual doubling done by out_edges function) + } + vertices_size_type numverts = num_vertices(g); + m_forward.assign(g, vi, numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Requires the above, plus a vertex_index map. + template + void assign(const Graph& g) + { + typename graph_traits::edges_size_type numedges = num_edges(g); + if (is_same::directed_category, undirectedS>::value) { + numedges *= 2; // Double each edge (actual doubling done by out_edges function) + } + vertices_size_type numverts = num_vertices(g); + m_forward.assign(g, get(vertex_index, g), numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Add edges from a sorted (smallest sources first) range of pairs and edge + // properties + template + void + add_edges_sorted_internal( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted, + const GlobalToLocal& global_to_local) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, ep_iter_sorted, global_to_local); + } + + template + void + add_edges_sorted_internal( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, ep_iter_sorted, typed_identity_property_map()); + } + + // Add edges from a sorted (smallest sources first) range of pairs + template + void + add_edges_sorted_internal( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, detail::default_construct_iterator()); + } + + template + void + add_edges_sorted_internal_global( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + const GlobalToLocal& global_to_local) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, detail::default_construct_iterator(), global_to_local); + } + + template + void + add_edges_sorted_internal_global( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted, + const GlobalToLocal& global_to_local) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, ep_iter_sorted, global_to_local); + } + + // Add edges from a range of (source, target) pairs that are unsorted + template + inline void + add_edges_internal(InputIterator first, InputIterator last, + const GlobalToLocal& global_to_local) { + typedef compressed_sparse_row_graph Graph; + typedef typename boost::graph_traits::vertex_descriptor vertex_t; + typedef typename boost::graph_traits::vertices_size_type vertex_num; + typedef typename boost::graph_traits::edges_size_type edge_num; + typedef std::vector > edge_vector_t; + edge_vector_t new_edges(first, last); + if (new_edges.empty()) return; + std::sort(new_edges.begin(), new_edges.end()); + this->add_edges_sorted_internal_global(new_edges.begin(), new_edges.end(), global_to_local); + } + + template + inline void + add_edges_internal(InputIterator first, InputIterator last) { + this->add_edges_internal(first, last, typed_identity_property_map()); + } + + // Add edges from a range of (source, target) pairs and edge properties that + // are unsorted + template + inline void + add_edges_internal(InputIterator first, InputIterator last, + EPIterator ep_iter, EPIterator ep_iter_end, + const GlobalToLocal& global_to_local) { + typedef compressed_sparse_row_graph Graph; + typedef typename boost::graph_traits::vertex_descriptor vertex_t; + typedef typename boost::graph_traits::vertices_size_type vertex_num; + typedef typename boost::graph_traits::edges_size_type edge_num; + typedef std::pair vertex_pair; + typedef std::vector< + boost::tuple > + edge_vector_t; + edge_vector_t new_edges + (boost::make_zip_iterator(boost::make_tuple(first, ep_iter)), + boost::make_zip_iterator(boost::make_tuple(last, ep_iter_end))); + if (new_edges.empty()) return; + std::sort(new_edges.begin(), new_edges.end(), + boost::detail::compare_first< + std::less >()); + m_forward.add_edges_sorted_internal + (boost::make_transform_iterator( + new_edges.begin(), + boost::detail::my_tuple_get_class<0, vertex_pair>()), + boost::make_transform_iterator( + new_edges.end(), + boost::detail::my_tuple_get_class<0, vertex_pair>()), + boost::make_transform_iterator( + new_edges.begin(), + boost::detail::my_tuple_get_class + <1, edge_bundled>()), + global_to_local); + } + + // Add edges from a range of (source, target) pairs and edge properties that + // are unsorted + template + inline void + add_edges_internal(InputIterator first, InputIterator last, + EPIterator ep_iter, EPIterator ep_iter_end) { + this->add_edges_internal(first, last, ep_iter, ep_iter_end, typed_identity_property_map()); + } + + using inherited_vertex_properties::operator[]; + + // Directly access a edge or edge bundle + edge_push_back_type& operator[](const edge_descriptor& v) + { return m_forward.m_edge_properties[get(edge_index, *this, v)]; } + + const edge_push_back_type& operator[](const edge_descriptor& v) const + { return m_forward.m_edge_properties[get(edge_index, *this, v)]; } + + // Directly access a graph bundle + graph_bundled& operator[](graph_bundle_t) + { return get_property(*this); } + + const graph_bundled& operator[](graph_bundle_t) const + { return get_property(*this); } + + // private: non-portable, requires friend templates + inherited_vertex_properties& vertex_properties() {return *this;} + const inherited_vertex_properties& vertex_properties() const {return *this;} + typename forward_type::inherited_edge_properties& edge_properties() { return m_forward; } + const typename forward_type::inherited_edge_properties& edge_properties() const { return m_forward; } + + forward_type m_forward; + GraphProperty m_property; +}; + +template +class compressed_sparse_row_graph + : public detail::indexed_vertex_properties > +{ + public: + typedef detail::indexed_vertex_properties > + inherited_vertex_properties; + + public: + // For Property Graph + typedef typename graph_detail::graph_prop::property graph_property_type; + typedef typename graph_detail::graph_prop::bundle graph_bundled; + // typedef GraphProperty graph_property_type; + + typedef detail::compressed_sparse_row_structure forward_type; + typedef EdgeIndex /* typename boost::mpl::if_c, boost::no_property, EdgeIndex> */ backward_edge_property; + typedef detail::compressed_sparse_row_structure backward_type; + + public: + // Concept requirements: + // For Graph + typedef Vertex vertex_descriptor; + typedef detail::csr_edge_descriptor edge_descriptor; + typedef bidirectional_tag directed_category; + typedef allow_parallel_edge_tag edge_parallel_category; + + class traversal_category: public bidirectional_graph_tag, + public adjacency_graph_tag, + public vertex_list_graph_tag, + public edge_list_graph_tag {}; + + static vertex_descriptor null_vertex() { return vertex_descriptor(-1); } + + // For VertexListGraph + typedef counting_iterator vertex_iterator; + typedef Vertex vertices_size_type; + + // For EdgeListGraph + typedef EdgeIndex edges_size_type; + + // For IncidenceGraph + typedef detail::csr_out_edge_iterator out_edge_iterator; + typedef EdgeIndex degree_size_type; + + // For AdjacencyGraph + typedef typename std::vector::const_iterator adjacency_iterator; + + // For EdgeListGraph + typedef detail::csr_edge_iterator edge_iterator; + + // For BidirectionalGraph (not implemented) + typedef detail::csr_in_edge_iterator in_edge_iterator; + + // For internal use + typedef csr_graph_tag graph_tag; + + typedef typename forward_type::inherited_edge_properties::edge_bundled edge_bundled; + typedef typename forward_type::inherited_edge_properties::edge_push_back_type edge_push_back_type; + typedef typename forward_type::inherited_edge_properties::edge_property_type edge_property_type; + + // Constructors + + // Default constructor: an empty graph. + compressed_sparse_row_graph(): m_property() {} + + // With numverts vertices + compressed_sparse_row_graph(vertices_size_type numverts) + : inherited_vertex_properties(numverts), + m_forward(numverts), m_backward(numverts) {} + + private: + + void set_up_backward_property_links() { + std::pair e = edges(*this); + m_backward.assign_unsorted_multi_pass_edges + (detail::transpose_edges( + detail::make_edge_to_index_pair_iter + (*this, get(vertex_index, *this), e.first)), + detail::transpose_edges( + detail::make_edge_to_index_pair_iter + (*this, get(vertex_index, *this), e.second)), + boost::counting_iterator(0), + m_forward.m_rowstart.size() - 1, + typed_identity_property_map(), + keep_all()); + } + + public: + + // From number of vertices and unsorted list of edges + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numverts), m_property(prop) + { + m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, numverts, typed_identity_property_map(), keep_all()); + set_up_backward_property_links(); + } + + // From number of vertices and unsorted list of edges, plus edge properties + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numverts), m_forward(), m_property(prop) + { + m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, ep_iter, numverts, typed_identity_property_map(), keep_all()); + set_up_backward_property_links(); + } + + // From number of vertices and unsorted list of edges, with filter and + // global-to-local map + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_global_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numlocalverts, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numlocalverts), m_forward(), m_property(prop) + { + m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, numlocalverts, global_to_local, source_pred); + set_up_backward_property_links(); + } + + // From number of vertices and unsorted list of edges, plus edge properties, + // with filter and global-to-local map + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_global_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numlocalverts, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred, + const GraphProperty& prop = GraphProperty()) + : inherited_vertex_properties(numlocalverts), m_forward(), m_property(prop) + { + m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, ep_iter, numlocalverts, global_to_local, source_pred); + set_up_backward_property_links(); + } + + // Requires IncidenceGraph and a vertex index map + template + compressed_sparse_row_graph(const Graph& g, const VertexIndexMap& vi, + vertices_size_type numverts, + edges_size_type numedges) + : m_property() + { + assign(g, vi, numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Requires VertexListGraph and EdgeListGraph + template + compressed_sparse_row_graph(const Graph& g, const VertexIndexMap& vi) + : m_property() + { + typename graph_traits::edges_size_type numedges = num_edges(g); + if (is_same::directed_category, undirectedS>::value) { + numedges *= 2; // Double each edge (actual doubling done by out_edges function) + } + vertices_size_type numverts = num_vertices(g); + assign(g, vi, numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Requires vertex index map plus requirements of previous constructor + template + explicit compressed_sparse_row_graph(const Graph& g) + : m_property() + { + typename graph_traits::edges_size_type numedges = num_edges(g); + if (is_same::directed_category, undirectedS>::value) { + numedges *= 2; // Double each edge (actual doubling done by out_edges function) + } + assign(g, get(vertex_index, g), num_vertices(g), numedges); + } + + // From any graph (slow and uses a lot of memory) + // Requires IncidenceGraph and a vertex index map + // Internal helper function + // Note that numedges must be doubled for undirected source graphs + template + void + assign(const Graph& g, const VertexIndexMap& vi, + vertices_size_type numverts, edges_size_type numedges) + { + m_forward.assign(g, vi, numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Requires the above, plus VertexListGraph and EdgeListGraph + template + void assign(const Graph& g, const VertexIndexMap& vi) + { + typename graph_traits::edges_size_type numedges = num_edges(g); + if (is_same::directed_category, undirectedS>::value) { + numedges *= 2; // Double each edge (actual doubling done by out_edges function) + } + vertices_size_type numverts = num_vertices(g); + m_forward.assign(g, vi, numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Requires the above, plus a vertex_index map. + template + void assign(const Graph& g) + { + typename graph_traits::edges_size_type numedges = num_edges(g); + if (is_same::directed_category, undirectedS>::value) { + numedges *= 2; // Double each edge (actual doubling done by out_edges function) + } + vertices_size_type numverts = num_vertices(g); + m_forward.assign(g, get(vertex_index, g), numverts, numedges); + inherited_vertex_properties::resize(numverts); + } + + // Add edges from a sorted (smallest sources first) range of pairs and edge + // properties + template + void + add_edges_sorted_internal( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted, + const GlobalToLocal& global_to_local) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, ep_iter_sorted, global_to_local); + } + + template + void + add_edges_sorted_internal( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, ep_iter_sorted, typed_identity_property_map()); + } + + // Add edges from a sorted (smallest sources first) range of pairs + template + void + add_edges_sorted_internal( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, detail::default_construct_iterator()); + } + + template + void + add_edges_sorted_internal_global( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + const GlobalToLocal& global_to_local) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, detail::default_construct_iterator(), global_to_local); + } + + template + void + add_edges_sorted_internal_global( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted, + const GlobalToLocal& global_to_local) { + m_forward.add_edges_sorted_internal(first_sorted, last_sorted, ep_iter_sorted, global_to_local); + } + + // Add edges from a range of (source, target) pairs that are unsorted + template + inline void + add_edges_internal(InputIterator first, InputIterator last, + const GlobalToLocal& global_to_local) { + typedef compressed_sparse_row_graph Graph; + typedef typename boost::graph_traits::vertex_descriptor vertex_t; + typedef typename boost::graph_traits::vertices_size_type vertex_num; + typedef typename boost::graph_traits::edges_size_type edge_num; + typedef std::vector > edge_vector_t; + edge_vector_t new_edges(first, last); + if (new_edges.empty()) return; + std::sort(new_edges.begin(), new_edges.end()); + this->add_edges_sorted_internal_global(new_edges.begin(), new_edges.end(), global_to_local); + } + + template + inline void + add_edges_internal(InputIterator first, InputIterator last) { + this->add_edges_internal(first, last, typed_identity_property_map()); + } + + // Add edges from a range of (source, target) pairs and edge properties that + // are unsorted + template + inline void + add_edges_internal(InputIterator first, InputIterator last, + EPIterator ep_iter, EPIterator ep_iter_end, + const GlobalToLocal& global_to_local) { + typedef compressed_sparse_row_graph Graph; + typedef typename boost::graph_traits::vertex_descriptor vertex_t; + typedef typename boost::graph_traits::vertices_size_type vertex_num; + typedef typename boost::graph_traits::edges_size_type edge_num; + typedef std::pair vertex_pair; + typedef std::vector< + boost::tuple > + edge_vector_t; + edge_vector_t new_edges + (boost::make_zip_iterator(boost::make_tuple(first, ep_iter)), + boost::make_zip_iterator(boost::make_tuple(last, ep_iter_end))); + if (new_edges.empty()) return; + std::sort(new_edges.begin(), new_edges.end(), + boost::detail::compare_first< + std::less >()); + m_forward.add_edges_sorted_internal + (boost::make_transform_iterator( + new_edges.begin(), + boost::detail::my_tuple_get_class<0, vertex_pair>()), + boost::make_transform_iterator( + new_edges.end(), + boost::detail::my_tuple_get_class<0, vertex_pair>()), + boost::make_transform_iterator( + new_edges.begin(), + boost::detail::my_tuple_get_class + <1, edge_bundled>()), + global_to_local); + } + + // Add edges from a range of (source, target) pairs and edge properties that + // are unsorted + template + inline void + add_edges_internal(InputIterator first, InputIterator last, + EPIterator ep_iter, EPIterator ep_iter_end) { + this->add_edges_internal(first, last, ep_iter, ep_iter_end, typed_identity_property_map()); + } + + using inherited_vertex_properties::operator[]; + + // Directly access a edge or edge bundle + edge_push_back_type& operator[](const edge_descriptor& v) + { return m_forward.m_edge_properties[get(edge_index, *this, v)]; } + + const edge_push_back_type& operator[](const edge_descriptor& v) const + { return m_forward.m_edge_properties[get(edge_index, *this, v)]; } + + // private: non-portable, requires friend templates + inherited_vertex_properties& vertex_properties() {return *this;} + const inherited_vertex_properties& vertex_properties() const {return *this;} + typename forward_type::inherited_edge_properties& edge_properties() { return m_forward; } + const typename forward_type::inherited_edge_properties& edge_properties() const { return m_forward; } + + forward_type m_forward; + backward_type m_backward; + GraphProperty m_property; +}; + +// Construction functions +template +inline Vertex +add_vertex(BOOST_CSR_GRAPH_TYPE& g) { + add_vertex(g, typename BOOST_CSR_GRAPH_TYPE::vertex_bundled()); +} + +template +inline Vertex +add_vertex(BOOST_DIR_CSR_GRAPH_TYPE& g, + typename BOOST_DIR_CSR_GRAPH_TYPE::vertex_bundled const& p) { + Vertex old_num_verts_plus_one = g.m_forward.m_rowstart.size(); + g.m_forward.m_rowstart.push_back(g.m_forward.m_rowstart.back()); + g.vertex_properties().push_back(p); + return old_num_verts_plus_one - 1; +} + +template +inline Vertex +add_vertex(BOOST_BIDIR_CSR_GRAPH_TYPE& g, + typename BOOST_BIDIR_CSR_GRAPH_TYPE::vertex_bundled const& p) { + Vertex old_num_verts_plus_one = g.m_forward.m_rowstart.size(); + g.m_forward.m_rowstart.push_back(g.m_forward.m_rowstart.back()); + g.m_backward.m_rowstart.push_back(g.m_backward.m_rowstart.back()); + g.vertex_properties().push_back(p); + return old_num_verts_plus_one - 1; +} + +template +inline Vertex +add_vertices(typename BOOST_DIR_CSR_GRAPH_TYPE::vertices_size_type count, BOOST_DIR_CSR_GRAPH_TYPE& g) { + Vertex old_num_verts_plus_one = g.m_forward.m_rowstart.size(); + EdgeIndex numedges = g.m_forward.m_rowstart.back(); + g.m_forward.m_rowstart.resize(old_num_verts_plus_one + count, numedges); + g.m_backward.m_rowstart.resize(old_num_verts_plus_one + count, numedges); + g.vertex_properties().resize(num_vertices(g)); + return old_num_verts_plus_one - 1; +} + + // Add edges from a sorted (smallest sources first) range of pairs and edge + // properties + template + void + add_edges_sorted( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted, + BOOST_DIR_CSR_GRAPH_TYPE& g) { + g.add_edges_sorted_internal(first_sorted, last_sorted, ep_iter_sorted); + } + + // Add edges from a sorted (smallest sources first) range of pairs + template + void + add_edges_sorted( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + BOOST_DIR_CSR_GRAPH_TYPE& g) { + g.add_edges_sorted_internal(first_sorted, last_sorted); + } + + template + void + add_edges_sorted_global( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted, + const GlobalToLocal& global_to_local, + BOOST_DIR_CSR_GRAPH_TYPE& g) { + g.add_edges_sorted_internal_global(first_sorted, last_sorted, ep_iter_sorted, + global_to_local); + } + + // Add edges from a sorted (smallest sources first) range of pairs + template + void + add_edges_sorted_global( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + const GlobalToLocal& global_to_local, + BOOST_DIR_CSR_GRAPH_TYPE& g) { + g.add_edges_sorted_internal_global(first_sorted, last_sorted, global_to_local); + } + + // Add edges from a range of (source, target) pairs that are unsorted + template + inline void + add_edges_global(InputIterator first, InputIterator last, + const GlobalToLocal& global_to_local, BOOST_DIR_CSR_GRAPH_TYPE& g) { + g.add_edges_internal(first, last, global_to_local); + } + + // Add edges from a range of (source, target) pairs that are unsorted + template + inline void + add_edges(InputIterator first, InputIterator last, BOOST_DIR_CSR_GRAPH_TYPE& g) { + g.add_edges_internal(first, last); + } + + // Add edges from a range of (source, target) pairs and edge properties that + // are unsorted + template + inline void + add_edges(InputIterator first, InputIterator last, + EPIterator ep_iter, EPIterator ep_iter_end, + BOOST_DIR_CSR_GRAPH_TYPE& g) { + g.add_edges_internal(first, last, ep_iter, ep_iter_end); + } + + template + inline void + add_edges_global(InputIterator first, InputIterator last, + EPIterator ep_iter, EPIterator ep_iter_end, + const GlobalToLocal& global_to_local, + BOOST_DIR_CSR_GRAPH_TYPE& g) { + g.add_edges_internal(first, last, ep_iter, ep_iter_end, global_to_local); + } + +// From VertexListGraph +template +inline Vertex +num_vertices(const BOOST_CSR_GRAPH_TYPE& g) { + return g.m_forward.m_rowstart.size() - 1; +} + +template +std::pair, counting_iterator > +inline vertices(const BOOST_CSR_GRAPH_TYPE& g) { + return std::make_pair(counting_iterator(0), + counting_iterator(num_vertices(g))); +} + +// From IncidenceGraph +template +inline Vertex +source(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor e, + const BOOST_CSR_GRAPH_TYPE&) +{ + return e.src; +} + +template +inline Vertex +target(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor e, + const BOOST_CSR_GRAPH_TYPE& g) +{ + return g.m_forward.m_column[e.idx]; +} + +template +inline std::pair +out_edges(Vertex v, const BOOST_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_CSR_GRAPH_TYPE::edge_descriptor ed; + typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator it; + EdgeIndex v_row_start = g.m_forward.m_rowstart[v]; + EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1]; + return std::make_pair(it(ed(v, v_row_start)), + it(ed(v, next_row_start))); +} + +template +inline EdgeIndex +out_degree(Vertex v, const BOOST_CSR_GRAPH_TYPE& g) +{ + EdgeIndex v_row_start = g.m_forward.m_rowstart[v]; + EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1]; + return next_row_start - v_row_start; +} + +template +inline std::pair +in_edges(Vertex v, const BOOST_BIDIR_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_BIDIR_CSR_GRAPH_TYPE::edge_descriptor ed; + typedef typename BOOST_BIDIR_CSR_GRAPH_TYPE::in_edge_iterator it; + EdgeIndex v_row_start = g.m_backward.m_rowstart[v]; + EdgeIndex next_row_start = g.m_backward.m_rowstart[v + 1]; + return std::make_pair(it(g, v_row_start), + it(g, next_row_start)); +} + +template +inline EdgeIndex +in_degree(Vertex v, const BOOST_BIDIR_CSR_GRAPH_TYPE& g) +{ + EdgeIndex v_row_start = g.m_backward.m_rowstart[v]; + EdgeIndex next_row_start = g.m_backward.m_rowstart[v + 1]; + return next_row_start - v_row_start; +} + +// From AdjacencyGraph +template +inline std::pair +adjacent_vertices(Vertex v, const BOOST_CSR_GRAPH_TYPE& g) +{ + EdgeIndex v_row_start = g.m_forward.m_rowstart[v]; + EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1]; + return std::make_pair(g.m_forward.m_column.begin() + v_row_start, + g.m_forward.m_column.begin() + next_row_start); +} + +// Extra, common functions +template +inline typename graph_traits::vertex_descriptor +vertex(typename graph_traits::vertex_descriptor i, + const BOOST_CSR_GRAPH_TYPE&) +{ + return i; +} + +// edge() can be provided in linear time for the new interface + +template +inline std::pair +edge(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter; + std::pair range = out_edges(i, g); + for (; range.first != range.second; ++range.first) { + if (target(*range.first, g) == j) + return std::make_pair(*range.first, true); + } + return std::make_pair(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor(), + false); +} + +// Find an edge given its index in the graph +template +inline typename BOOST_CSR_GRAPH_TYPE::edge_descriptor +edge_from_index(EdgeIndex idx, const BOOST_CSR_GRAPH_TYPE& g) +{ + typedef typename std::vector::const_iterator row_start_iter; + assert (idx < num_edges(g)); + row_start_iter src_plus_1 = + std::upper_bound(g.m_forward.m_rowstart.begin(), + g.m_forward.m_rowstart.end(), + idx); + // Get last source whose rowstart is at most idx + // upper_bound returns this position plus 1 + Vertex src = (src_plus_1 - g.m_forward.m_rowstart.begin()) - 1; + return typename BOOST_CSR_GRAPH_TYPE::edge_descriptor(src, idx); +} + +template +inline EdgeIndex +num_edges(const BOOST_CSR_GRAPH_TYPE& g) +{ + return g.m_forward.m_column.size(); +} + +template +std::pair +edges(const BOOST_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_CSR_GRAPH_TYPE::edge_iterator ei; + typedef typename BOOST_CSR_GRAPH_TYPE::edge_descriptor edgedesc; + if (g.m_forward.m_rowstart.size() == 1 || g.m_forward.m_column.empty()) { + return std::make_pair(ei(), ei()); + } else { + // Find the first vertex that has outgoing edges + Vertex src = 0; + while (g.m_forward.m_rowstart[src + 1] == 0) ++src; + return std::make_pair(ei(g, edgedesc(src, 0), g.m_forward.m_rowstart[src + 1]), + ei(g, edgedesc(num_vertices(g), g.m_forward.m_column.size()), 0)); + } +} + +// For Property Graph + +// Graph properties +template +inline void +set_property(BOOST_CSR_GRAPH_TYPE& g, Tag, const Value& value) +{ + get_property_value(g.m_property, Tag()) = value; +} + +template +inline +typename graph_property::type& +get_property(BOOST_CSR_GRAPH_TYPE& g, Tag) +{ + return get_property_value(g.m_property, Tag()); +} + +template +inline +const +typename graph_property::type& +get_property(const BOOST_CSR_GRAPH_TYPE& g, Tag) +{ + return get_property_value(g.m_property, Tag()); +} + +template +struct property_map +{ + typedef typed_identity_property_map type; + typedef type const_type; +}; + +template +struct property_map +{ + typedef detail::csr_edge_index_map type; + typedef type const_type; +}; + +template +struct property_map +{ + typedef typename BOOST_CSR_GRAPH_TYPE::inherited_vertex_properties::vertex_map_type type; + typedef typename BOOST_CSR_GRAPH_TYPE::inherited_vertex_properties::const_vertex_map_type const_type; +}; + +template +struct property_map +{ + typedef typename BOOST_CSR_GRAPH_TYPE::forward_type::inherited_edge_properties::edge_map_type type; + typedef typename BOOST_CSR_GRAPH_TYPE::forward_type::inherited_edge_properties::const_edge_map_type const_type; +}; + +template +inline typed_identity_property_map +get(vertex_index_t, const BOOST_CSR_GRAPH_TYPE&) +{ + return typed_identity_property_map(); +} + +template +inline Vertex +get(vertex_index_t, + const BOOST_CSR_GRAPH_TYPE&, Vertex v) +{ + return v; +} + +template +inline typename property_map::const_type +get(edge_index_t, const BOOST_CSR_GRAPH_TYPE&) +{ + typedef typename property_map::const_type + result_type; + return result_type(); +} + +template +inline EdgeIndex +get(edge_index_t, const BOOST_CSR_GRAPH_TYPE&, + typename BOOST_CSR_GRAPH_TYPE::edge_descriptor e) +{ + return e.idx; +} + +template +inline typename property_map::type +get(vertex_bundle_t, BOOST_CSR_GRAPH_TYPE& g) +{ + return g.get_vertex_bundle(get(vertex_index, g)); +} + +template +inline typename property_map::const_type +get(vertex_bundle_t, const BOOST_CSR_GRAPH_TYPE& g) +{ + return g.get_vertex_bundle(get(vertex_index, g)); +} + +template +inline VertexProperty& +get(vertex_bundle_t, + BOOST_CSR_GRAPH_TYPE& g, Vertex v) +{ + return get(vertex_bundle, g)[v]; +} + +template +inline const VertexProperty& +get(vertex_bundle_t, + const BOOST_CSR_GRAPH_TYPE& g, Vertex v) +{ + return get(vertex_bundle, g)[v]; +} + +template +inline void +put(vertex_bundle_t, + BOOST_CSR_GRAPH_TYPE& g, + Vertex v, + const VertexProperty& val) +{ + put(get(vertex_bundle, g), v, val); +} + +template +inline typename property_map::type +get(edge_bundle_t, BOOST_CSR_GRAPH_TYPE& g) +{ + return g.m_forward.get_edge_bundle(get(edge_index, g)); +} + +template +inline typename property_map::const_type +get(edge_bundle_t, const BOOST_CSR_GRAPH_TYPE& g) +{ + return g.m_forward.get_edge_bundle(get(edge_index, g)); +} + +template +inline EdgeProperty& +get(edge_bundle_t, + BOOST_CSR_GRAPH_TYPE& g, + const typename BOOST_CSR_GRAPH_TYPE::edge_descriptor& e) +{ + return get(edge_bundle, g)[e]; +} + +template +inline const EdgeProperty& +get(edge_bundle_t, + const BOOST_CSR_GRAPH_TYPE& g, + const typename BOOST_CSR_GRAPH_TYPE::edge_descriptor& e) +{ + return get(edge_bundle, g)[e]; +} + +template +inline void +put(edge_bundle_t, + BOOST_CSR_GRAPH_TYPE& g, + const typename BOOST_CSR_GRAPH_TYPE::edge_descriptor& e, + const EdgeProperty& val) +{ + put(get(edge_bundle, g), e, val); +} + +template +inline +typename property_map::type +get(T Bundle::* p, BOOST_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map::type + result_type; + return result_type(&g, p); +} + +template +inline +typename property_map::const_type +get(T Bundle::* p, BOOST_CSR_GRAPH_TYPE const & g) +{ + typedef typename property_map::const_type + result_type; + return result_type(&g, p); +} + +template +inline T +get(T Bundle::* p, BOOST_CSR_GRAPH_TYPE const & g, + const Key& key) +{ + return get(get(p, g), key); +} + +template +inline void +put(T Bundle::* p, BOOST_CSR_GRAPH_TYPE& g, + const Key& key, const T& value) +{ + put(get(p, g), key, value); +} + +#undef BOOST_CSR_GRAPH_TYPE +#undef BOOST_CSR_GRAPH_TEMPLATE_PARMS +#undef BOOST_DIR_CSR_GRAPH_TYPE +#undef BOOST_DIR_CSR_GRAPH_TEMPLATE_PARMS +#undef BOOST_BIDIR_CSR_GRAPH_TYPE +#undef BOOST_BIDIR_CSR_GRAPH_TEMPLATE_PARMS + +} // end namespace boost + +#endif // BOOST_GRAPH_COMPRESSED_SPARSE_ROW_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/connected_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/connected_components.hpp new file mode 100644 index 0000000000..90015e6703 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/connected_components.hpp @@ -0,0 +1,106 @@ +// +//======================================================================= +// Copyright 1997-2001 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_CONNECTED_COMPONENTS_HPP +#define BOOST_GRAPH_CONNECTED_COMPONENTS_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + + namespace detail { + + // This visitor is used both in the connected_components algorithm + // and in the kosaraju strong components algorithm during the + // second DFS traversal. + template + class components_recorder : public dfs_visitor<> + { + typedef typename property_traits::value_type comp_type; + public: + components_recorder(ComponentsMap c, + comp_type& c_count) + : m_component(c), m_count(c_count) {} + + template + void start_vertex(Vertex, Graph&) { + if (m_count == (std::numeric_limits::max)()) + m_count = 0; // start counting components at zero + else + ++m_count; + } + template + void discover_vertex(Vertex u, Graph&) { + put(m_component, u, m_count); + } + protected: + ComponentsMap m_component; + comp_type& m_count; + }; + + } // namespace detail + + // This function computes the connected components of an undirected + // graph using a single application of depth first search. + + template + inline typename property_traits::value_type + connected_components(const Graph& g, ComponentMap c, + const bgl_named_params& params + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, vertex_list_graph_tag)) + { + if (num_vertices(g) == 0) return 0; + + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< WritablePropertyMapConcept >(); + typedef typename boost::graph_traits::directed_category directed; + BOOST_STATIC_ASSERT((boost::is_same::value)); + + typedef typename property_traits::value_type comp_type; + // c_count initialized to "nil" (with nil represented by (max)()) + comp_type c_count((std::numeric_limits::max)()); + detail::components_recorder vis(c, c_count); + depth_first_search(g, params.visitor(vis)); + return c_count + 1; + } + + template + inline typename property_traits::value_type + connected_components(const Graph& g, ComponentMap c + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, vertex_list_graph_tag)) + { + if (num_vertices(g) == 0) return 0; + + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< WritablePropertyMapConcept >(); + typedef typename boost::graph_traits::directed_category directed; + // BOOST_STATIC_ASSERT((boost::is_same::value)); + + typedef typename property_traits::value_type comp_type; + // c_count initialized to "nil" (with nil represented by (max)()) + comp_type c_count((std::numeric_limits::max)()); + detail::components_recorder vis(c, c_count); + depth_first_search(g, visitor(vis)); + return c_count + 1; + } + + +} // namespace boost + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif + +#endif // BOOST_GRAPH_CONNECTED_COMPONENTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/copy.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/copy.hpp new file mode 100644 index 0000000000..8ef01238c5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/copy.hpp @@ -0,0 +1,465 @@ +// +//======================================================================= +// Copyright 1997-2001 University of Notre Dame. +// Authors: Jeremy G. Siek, Lie-Quan Lee, Andrew Lumsdaine +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +/* + This file implements the following functions: + + + template + void copy_graph(const VertexListGraph& g_in, MutableGraph& g_out) + + template + void copy_graph(const VertexListGraph& g_in, MutableGraph& g_out, + const bgl_named_params& params) + + + template + typename graph_traits::vertex_descriptor + copy_component(IncidenceGraph& g_in, + typename graph_traits::vertex_descriptor src, + MutableGraph& g_out) + + template + typename graph_traits::vertex_descriptor + copy_component(IncidenceGraph& g_in, + typename graph_traits::vertex_descriptor src, + MutableGraph& g_out, + const bgl_named_params& params) + */ + + +#ifndef BOOST_GRAPH_COPY_HPP +#define BOOST_GRAPH_COPY_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + namespace detail { + + // Default edge and vertex property copiers + + template + struct edge_copier { + edge_copier(const Graph1& g1, Graph2& g2) + : edge_all_map1(get(edge_all, g1)), + edge_all_map2(get(edge_all, g2)) { } + + template + void operator()(const Edge1& e1, Edge2& e2) const { + put(edge_all_map2, e2, get(edge_all_map1, e1)); + } + typename property_map::const_type edge_all_map1; + mutable typename property_map::type edge_all_map2; + }; + template + inline edge_copier + make_edge_copier(const Graph1& g1, Graph2& g2) + { + return edge_copier(g1, g2); + } + + template + struct vertex_copier { + vertex_copier(const Graph1& g1, Graph2& g2) + : vertex_all_map1(get(vertex_all, g1)), + vertex_all_map2(get(vertex_all, g2)) { } + + template + void operator()(const Vertex1& v1, Vertex2& v2) const { + put(vertex_all_map2, v2, get(vertex_all_map1, v1)); + } + typename property_map::const_type vertex_all_map1; + mutable typename property_map::type + vertex_all_map2; + }; + template + inline vertex_copier + make_vertex_copier(const Graph1& g1, Graph2& g2) + { + return vertex_copier(g1, g2); + } + + // Copy all the vertices and edges of graph g_in into graph g_out. + // The copy_vertex and copy_edge function objects control how vertex + // and edge properties are copied. + + template + struct copy_graph_impl { }; + + template <> struct copy_graph_impl<0> + { + template + static void apply(const Graph& g_in, MutableGraph& g_out, + CopyVertex copy_vertex, CopyEdge copy_edge, + Orig2CopyVertexIndexMap orig2copy, IndexMap) + { + typename graph_traits::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g_in); vi != vi_end; ++vi) { + typename graph_traits::vertex_descriptor + new_v = add_vertex(g_out); + put(orig2copy, *vi, new_v); + copy_vertex(*vi, new_v); + } + typename graph_traits::edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = edges(g_in); ei != ei_end; ++ei) { + typename graph_traits::edge_descriptor new_e; + bool inserted; + boost::tie(new_e, inserted) = add_edge(get(orig2copy, source(*ei, g_in)), + get(orig2copy, target(*ei, g_in)), + g_out); + copy_edge(*ei, new_e); + } + } + }; + + // for directed graphs + template <> struct copy_graph_impl<1> + { + template + static void apply(const Graph& g_in, MutableGraph& g_out, + CopyVertex copy_vertex, CopyEdge copy_edge, + Orig2CopyVertexIndexMap orig2copy, IndexMap) + { + typename graph_traits::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g_in); vi != vi_end; ++vi) { + typename graph_traits::vertex_descriptor + new_v = add_vertex(g_out); + put(orig2copy, *vi, new_v); + copy_vertex(*vi, new_v); + } + for (boost::tie(vi, vi_end) = vertices(g_in); vi != vi_end; ++vi) { + typename graph_traits::out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(*vi, g_in); ei != ei_end; ++ei) { + typename graph_traits::edge_descriptor new_e; + bool inserted; + boost::tie(new_e, inserted) = add_edge(get(orig2copy, source(*ei, g_in)), + get(orig2copy, target(*ei, g_in)), + g_out); + copy_edge(*ei, new_e); + } + } + } + }; + + // for undirected graphs + template <> struct copy_graph_impl<2> + { + template + static void apply(const Graph& g_in, MutableGraph& g_out, + CopyVertex copy_vertex, CopyEdge copy_edge, + Orig2CopyVertexIndexMap orig2copy, + IndexMap index_map) + { + typedef color_traits Color; + std::vector + color(num_vertices(g_in), Color::white()); + typename graph_traits::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g_in); vi != vi_end; ++vi) { + typename graph_traits::vertex_descriptor + new_v = add_vertex(g_out); + put(orig2copy, *vi, new_v); + copy_vertex(*vi, new_v); + } + for (boost::tie(vi, vi_end) = vertices(g_in); vi != vi_end; ++vi) { + typename graph_traits::out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(*vi, g_in); ei != ei_end; ++ei) { + typename graph_traits::edge_descriptor new_e; + bool inserted; + if (color[get(index_map, target(*ei, g_in))] == Color::white()) { + boost::tie(new_e, inserted) = add_edge(get(orig2copy, source(*ei,g_in)), + get(orig2copy, target(*ei,g_in)), + g_out); + copy_edge(*ei, new_e); + } + } + color[get(index_map, *vi)] = Color::black(); + } + } + }; + + template + struct choose_graph_copy { + typedef typename Graph::traversal_category Trv; + typedef typename Graph::directed_category Dr; + enum { algo = + (is_convertible::value + && is_convertible::value) + ? 0 : is_convertible::value ? 1 : 2 }; + typedef copy_graph_impl type; + }; + + //------------------------------------------------------------------------- + struct choose_copier_parameter { + template + struct bind_ { + typedef const P& result_type; + static result_type apply(const P& p, const G1&, G2&) + { return p; } + }; + }; + struct choose_default_edge_copier { + template + struct bind_ { + typedef edge_copier result_type; + static result_type apply(const P&, const G1& g1, G2& g2) { + return result_type(g1, g2); + } + }; + }; + template + struct choose_edge_copy { + typedef choose_copier_parameter type; + }; + template <> + struct choose_edge_copy { + typedef choose_default_edge_copier type; + }; + template + struct choose_edge_copier_helper { + typedef typename choose_edge_copy::type Selector; + typedef typename Selector:: template bind_ Bind; + typedef Bind type; + typedef typename Bind::result_type result_type; + }; + template + typename detail::choose_edge_copier_helper::result_type + choose_edge_copier(const Param& params, const G1& g_in, G2& g_out) + { + typedef typename + detail::choose_edge_copier_helper::type Choice; + return Choice::apply(params, g_in, g_out); + } + + + struct choose_default_vertex_copier { + template + struct bind_ { + typedef vertex_copier result_type; + static result_type apply(const P&, const G1& g1, G2& g2) { + return result_type(g1, g2); + } + }; + }; + template + struct choose_vertex_copy { + typedef choose_copier_parameter type; + }; + template <> + struct choose_vertex_copy { + typedef choose_default_vertex_copier type; + }; + template + struct choose_vertex_copier_helper { + typedef typename choose_vertex_copy::type Selector; + typedef typename Selector:: template bind_ Bind; + typedef Bind type; + typedef typename Bind::result_type result_type; + }; + template + typename detail::choose_vertex_copier_helper::result_type + choose_vertex_copier(const Param& params, const G1& g_in, G2& g_out) + { + typedef typename + detail::choose_vertex_copier_helper::type Choice; + return Choice::apply(params, g_in, g_out); + } + + } // namespace detail + + + template + void copy_graph(const VertexListGraph& g_in, MutableGraph& g_out) + { + if (num_vertices(g_in) == 0) + return; + typedef typename graph_traits::vertex_descriptor vertex_t; + std::vector orig2copy(num_vertices(g_in)); + typedef typename detail::choose_graph_copy::type + copy_impl; + copy_impl::apply + (g_in, g_out, + detail::make_vertex_copier(g_in, g_out), + detail::make_edge_copier(g_in, g_out), + make_iterator_property_map(orig2copy.begin(), + get(vertex_index, g_in), orig2copy[0]), + get(vertex_index, g_in) + ); + } + + template + void copy_graph(const VertexListGraph& g_in, MutableGraph& g_out, + const bgl_named_params& params) + { + typename std::vector::size_type n; + n = is_default_param(get_param(params, orig_to_copy_t())) + ? num_vertices(g_in) : 1; + if (n == 0) + return; + std::vector::vertex_descriptor> + orig2copy(n); + + typedef typename detail::choose_graph_copy::type + copy_impl; + copy_impl::apply + (g_in, g_out, + detail::choose_vertex_copier(get_param(params, vertex_copy_t()), + g_in, g_out), + detail::choose_edge_copier(get_param(params, edge_copy_t()), + g_in, g_out), + choose_param(get_param(params, orig_to_copy_t()), + make_iterator_property_map + (orig2copy.begin(), + choose_const_pmap(get_param(params, vertex_index), + g_in, vertex_index), orig2copy[0])), + choose_const_pmap(get_param(params, vertex_index), g_in, vertex_index) + ); + } + + namespace detail { + + template + struct graph_copy_visitor : public bfs_visitor<> + { + graph_copy_visitor(NewGraph& graph, Copy2OrigIndexMap c, + CopyVertex cv, CopyEdge ce) + : g_out(graph), orig2copy(c), copy_vertex(cv), copy_edge(ce) { } + + template + typename graph_traits::vertex_descriptor copy_one_vertex(Vertex u) const { + typename graph_traits::vertex_descriptor + new_u = add_vertex(g_out); + put(orig2copy, u, new_u); + copy_vertex(u, new_u); + return new_u; + } + + template + void tree_edge(Edge e, const Graph& g_in) const { + // For a tree edge, the target vertex has not been copied yet. + typename graph_traits::edge_descriptor new_e; + bool inserted; + boost::tie(new_e, inserted) = add_edge(get(orig2copy, source(e, g_in)), + this->copy_one_vertex(target(e, g_in)), + g_out); + copy_edge(e, new_e); + } + + template + void non_tree_edge(Edge e, const Graph& g_in) const { + // For a non-tree edge, the target vertex has already been copied. + typename graph_traits::edge_descriptor new_e; + bool inserted; + boost::tie(new_e, inserted) = add_edge(get(orig2copy, source(e, g_in)), + get(orig2copy, target(e, g_in)), + g_out); + copy_edge(e, new_e); + } + private: + NewGraph& g_out; + Copy2OrigIndexMap orig2copy; + CopyVertex copy_vertex; + CopyEdge copy_edge; + }; + + template + typename graph_traits::vertex_descriptor + copy_component_impl + (const Graph& g_in, + typename graph_traits::vertex_descriptor src, + MutableGraph& g_out, + CopyVertex copy_vertex, CopyEdge copy_edge, + Orig2CopyVertexIndexMap orig2copy, + const Params& params) + { + graph_copy_visitor vis(g_out, orig2copy, copy_vertex, copy_edge); + typename graph_traits::vertex_descriptor src_copy + = vis.copy_one_vertex(src); + breadth_first_search(g_in, src, params.visitor(vis)); + return src_copy; + } + + } // namespace detail + + + // Copy all the vertices and edges of graph g_in that are reachable + // from the source vertex into graph g_out. Return the vertex + // in g_out that matches the source vertex of g_in. + template + typename graph_traits::vertex_descriptor + copy_component(IncidenceGraph& g_in, + typename graph_traits::vertex_descriptor src, + MutableGraph& g_out, + const bgl_named_params& params) + { + typename std::vector::size_type n; + n = is_default_param(get_param(params, orig_to_copy_t())) + ? num_vertices(g_in) : 1; + std::vector::vertex_descriptor> + orig2copy(n); + + return detail::copy_component_impl + (g_in, src, g_out, + detail::choose_vertex_copier(get_param(params, vertex_copy_t()), + g_in, g_out), + detail::choose_edge_copier(get_param(params, edge_copy_t()), + g_in, g_out), + choose_param(get_param(params, orig_to_copy_t()), + make_iterator_property_map + (orig2copy.begin(), + choose_pmap(get_param(params, vertex_index), + g_in, vertex_index), orig2copy[0])), + params + ); + } + + template + typename graph_traits::vertex_descriptor + copy_component(IncidenceGraph& g_in, + typename graph_traits::vertex_descriptor src, + MutableGraph& g_out) + { + std::vector::vertex_descriptor> + orig2copy(num_vertices(g_in)); + + return detail::copy_component_impl + (g_in, src, g_out, + make_vertex_copier(g_in, g_out), + make_edge_copier(g_in, g_out), + make_iterator_property_map(orig2copy.begin(), + get(vertex_index, g_in), orig2copy[0]), + bgl_named_params('x') // dummy param object + ); + } + +} // namespace boost + +#endif // BOOST_GRAPH_COPY_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/core_numbers.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/core_numbers.hpp new file mode 100644 index 0000000000..7ef08261c8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/core_numbers.hpp @@ -0,0 +1,350 @@ +// +//======================================================================= +// Copyright 2007 Stanford University +// Authors: David Gleich +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_CORE_NUMBERS_HPP +#define BOOST_GRAPH_CORE_NUMBERS_HPP + +#include +#include +#include +#include + +/* + * core_numbers + * + * Requirement: IncidenceGraph + */ + +// History +// +// 30 July 2007 +// Added visitors to the implementation +// +// 8 February 2008 +// Fixed headers and missing typename + +namespace boost { + + // A linear time O(m) algorithm to compute the indegree core number + // of a graph for unweighted graphs. + // + // and a O((n+m) log n) algorithm to compute the in-edge-weight core + // numbers of a weighted graph. + // + // The linear algorithm comes from: + // Vladimir Batagelj and Matjaz Zaversnik, "An O(m) Algorithm for Cores + // Decomposition of Networks." Sept. 1 2002. + + template + struct CoreNumbersVisitorConcept { + void constraints() + { + function_requires< CopyConstructibleConcept >(); + vis.examine_vertex(u,g); + vis.finish_vertex(u,g); + vis.examine_edge(e,g); + } + Visitor vis; + Graph g; + typename graph_traits::vertex_descriptor u; + typename graph_traits::edge_descriptor e; + }; + + template + class core_numbers_visitor : public bfs_visitor { + public: + core_numbers_visitor() {} + core_numbers_visitor(Visitors vis) + : bfs_visitor(vis) {} + + private: + template + void initialize_vertex(Vertex, Graph&) {} + + template + void discover_vertex(Vertex , Graph&) {} + + template + void gray_target(Vertex, Graph&) {} + + template + void black_target(Vertex, Graph&) {} + + template + void tree_edge(Edge, Graph&) {} + + template + void non_tree_edge(Edge, Graph&) {} + }; + + template + core_numbers_visitor make_core_numbers_visitor(Visitors vis) + { return core_numbers_visitor(vis); } + + typedef core_numbers_visitor<> default_core_numbers_visitor; + + namespace detail { + + // implement a constant_property_map to simplify compute_in_degree + // for the weighted and unweighted case + // this is based on dummy property map + template + class constant_value_property_map + : public boost::put_get_helper > + { + public: + typedef void key_type; + typedef ValueType value_type; + typedef const ValueType& reference; + typedef boost::readable_property_map_tag category; + inline constant_value_property_map(ValueType cc) : c(cc) { } + inline constant_value_property_map(const constant_value_property_map& x) + : c(x.c) { } + template + inline reference operator[](Vertex) const { return c; } + protected: + ValueType c; + }; + + + // the core numbers start as the indegree or inweight. This function + // will initialize these values + template + void compute_in_degree_map(Graph& g, CoreMap d, EdgeWeightMap wm) + { + typename graph_traits::vertex_iterator vi,vi_end; + typename graph_traits::out_edge_iterator ei,ei_end; + for (boost::tie(vi,vi_end) = vertices(g); vi!=vi_end; ++vi) { + put(d,*vi,0); + } + for (boost::tie(vi,vi_end) = vertices(g); vi!=vi_end; ++vi) { + for (boost::tie(ei,ei_end) = out_edges(*vi,g); ei!=ei_end; ++ei) { + put(d,target(*ei,g),get(d,target(*ei,g))+get(wm,*ei)); + } + } + } + + // the version for weighted graphs is a little different + template + typename property_traits::value_type + core_numbers_impl(Graph& g, CoreMap c, EdgeWeightMap wm, + MutableQueue& Q, Visitor vis) + { + typename property_traits::value_type v_cn = 0; + typedef typename graph_traits::vertex_descriptor vertex; + while (!Q.empty()) + { + // remove v from the Q, and then decrease the core numbers + // of its successors + vertex v = Q.top(); + vis.examine_vertex(v,g); + Q.pop(); + v_cn = get(c,v); + typename graph_traits::out_edge_iterator oi,oi_end; + for (boost::tie(oi,oi_end) = out_edges(v,g); oi!=oi_end; ++oi) { + vis.examine_edge(*oi,g); + vertex u = target(*oi,g); + // if c[u] > c[v], then u is still in the graph, + if (get(c,u) > v_cn) { + // remove the edge + put(c,u,get(c,u)-get(wm,*oi)); + Q.update(u); + } + } + vis.finish_vertex(v,g); + } + return (v_cn); + } + + template + typename property_traits::value_type + core_numbers_dispatch(Graph&g, CoreMap c, EdgeWeightMap wm, + IndexMap im, CoreNumVisitor vis) + { + typedef typename property_traits::value_type D; + typedef std::less Cmp; + typedef indirect_cmp IndirectCmp; + IndirectCmp icmp(c, Cmp()); + // build the mutable queue + typedef typename graph_traits::vertex_descriptor vertex; + typedef mutable_queue, IndirectCmp, + IndexMap> MutableQueue; + MutableQueue Q(num_vertices(g), icmp, im); + typename graph_traits::vertex_iterator vi,vi_end; + for (boost::tie(vi,vi_end) = vertices(g); vi!=vi_end; ++vi) { + Q.push(*vi); + } + return core_numbers_impl(g, c, wm, Q, vis); + } + + // the version for the unweighted case + // for this functions CoreMap must be initialized + // with the in degree of each vertex + template + typename property_traits::value_type + core_numbers_impl(Graph& g, CoreMap c, PositionMap pos, Visitor vis) + { + typedef typename graph_traits::vertices_size_type size_type; + typedef typename graph_traits::degree_size_type degree_type; + typedef typename graph_traits::vertex_descriptor vertex; + typename graph_traits::vertex_iterator vi,vi_end; + + // store the vertex core numbers + typename property_traits::value_type v_cn = 0; + + // compute the maximum degree (degrees are in the coremap) + typename graph_traits::degree_size_type max_deg = 0; + for (boost::tie(vi,vi_end) = vertices(g); vi!=vi_end; ++vi) { + max_deg = (std::max::degree_size_type>)(max_deg, get(c,*vi)); + } + + // store the vertices in bins by their degree + // allocate two extra locations to ease boundary cases + std::vector bin(max_deg+2); + for (boost::tie(vi,vi_end) = vertices(g); vi!=vi_end; ++vi) { + ++bin[get(c,*vi)]; + } + + // this loop sets bin[d] to the starting position of vertices + // with degree d in the vert array for the bucket sort + size_type cur_pos = 0; + for (degree_type cur_deg = 0; cur_deg < max_deg+2; ++cur_deg) { + degree_type tmp = bin[cur_deg]; + bin[cur_deg] = cur_pos; + cur_pos += tmp; + } + + // perform the bucket sort with pos and vert so that + // pos[0] is the vertex of smallest degree + std::vector vert(num_vertices(g)); + for (boost::tie(vi,vi_end) = vertices(g); vi!=vi_end; ++vi) { + vertex v=*vi; + size_type p=bin[get(c,v)]; + put(pos,v,p); + vert[p]=v; + ++bin[get(c,v)]; + } + // we ``abused'' bin while placing the vertices, now, + // we need to restore it + std::copy(boost::make_reverse_iterator(bin.end()-2), + boost::make_reverse_iterator(bin.begin()), + boost::make_reverse_iterator(bin.end()-1)); + // now simulate removing the vertices + for (size_type i=0; i < num_vertices(g); ++i) { + vertex v = vert[i]; + vis.examine_vertex(v,g); + v_cn = get(c,v); + typename graph_traits::out_edge_iterator oi,oi_end; + for (boost::tie(oi,oi_end) = out_edges(v,g); oi!=oi_end; ++oi) { + vis.examine_edge(*oi,g); + vertex u = target(*oi,g); + // if c[u] > c[v], then u is still in the graph, + if (get(c,u) > v_cn) { + degree_type deg_u = get(c,u); + degree_type pos_u = get(pos,u); + // w is the first vertex with the same degree as u + // (this is the resort operation!) + degree_type pos_w = bin[deg_u]; + vertex w = vert[pos_w]; + if (u!=v) { + // swap u and w + put(pos,u,pos_w); + put(pos,w,pos_u); + vert[pos_w] = u; + vert[pos_u] = w; + } + // now, the vertices array is sorted assuming + // we perform the following step + // start the set of vertices with degree of u + // one into the future (this now points at vertex + // w which we swapped with u). + ++bin[deg_u]; + // we are removing v from the graph, so u's degree + // decreases + put(c,u,get(c,u)-1); + } + } + vis.finish_vertex(v,g); + } + return v_cn; + } + + } // namespace detail + + // non-named parameter version for the unweighted case + template + typename property_traits::value_type + core_numbers(Graph& g, CoreMap c, CoreNumVisitor vis) + { + typedef typename graph_traits::vertices_size_type size_type; + detail::compute_in_degree_map(g,c, + detail::constant_value_property_map< + typename property_traits::value_type>(1) ); + return detail::core_numbers_impl(g,c, + make_iterator_property_map( + std::vector(num_vertices(g)).begin(),get(vertex_index, g)), + vis + ); + } + + // non-named paramter version for the unweighted case + template + typename property_traits::value_type + core_numbers(Graph& g, CoreMap c) + { + return core_numbers(g, c, make_core_numbers_visitor(null_visitor())); + } + + // non-named parameter version for the weighted case + template + typename property_traits::value_type + core_numbers(Graph& g, CoreMap c, EdgeWeightMap wm, VertexIndexMap vim, + CoreNumVisitor vis) + { + typedef typename graph_traits::vertices_size_type size_type; + detail::compute_in_degree_map(g,c,wm); + return detail::core_numbers_dispatch(g,c,wm,vim,vis); + } + + // non-named parameter version for the weighted case +// template +// typename property_traits::value_type +// core_numbers(Graph& g, CoreMap c, EdgeWeightMap wm) +// { +// typedef typename graph_traits::vertices_size_type size_type; +// detail::compute_in_degree_map(g,c,wm); +// return detail::core_numbers_dispatch(g,c,wm,get(vertex_index,g), +// make_core_numbers_visitor(null_visitor())); +// } + + template + typename property_traits::value_type + weighted_core_numbers(Graph& g, CoreMap c) + { + return weighted_core_numbers( + g,c, make_core_numbers_visitor(null_visitor()) + ); + } + + template + typename property_traits::value_type + weighted_core_numbers(Graph& g, CoreMap c, CoreNumVisitor vis) + { return core_numbers(g,c,get(edge_weight,g),get(vertex_index,g),vis); } + +} // namespace boost + +#endif // BOOST_GRAPH_CORE_NUMBERS_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/create_condensation_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/create_condensation_graph.hpp new file mode 100644 index 0000000000..f874a08682 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/create_condensation_graph.hpp @@ -0,0 +1,83 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_CREATE_CONDENSATION_GRAPH_HPP +#define BOOST_CREATE_CONDENSATION_GRAPH_HPP + +#include +#include + +namespace boost { + + template + void create_condensation_graph(const Graph& g, + const ComponentLists& components, + ComponentNumberMap component_number, + CondensationGraph& cg, + EdgeMultiplicityMap edge_mult_map) + { + typedef typename graph_traits::vertex_descriptor vertex; + typedef typename graph_traits::vertices_size_type size_type; + typedef typename graph_traits::vertex_descriptor + cg_vertex; + std::vector to_cg_vertex(components.size()); + for (size_type s = 0; s < components.size(); ++s) + to_cg_vertex[s] = add_vertex(cg); + + for (size_type si = 0; si < components.size(); ++si) { + cg_vertex s = to_cg_vertex[si]; + std::vector adj; + for (size_type i = 0; i < components[si].size(); ++i) { + vertex u = components[s][i]; + typename graph_traits::adjacency_iterator v, v_end; + for (boost::tie(v, v_end) = adjacent_vertices(u, g); v != v_end; ++v) { + cg_vertex t = to_cg_vertex[component_number[*v]]; + if (s != t) // Avoid loops in the condensation graph + adj.push_back(t); + } + } + std::sort(adj.begin(), adj.end()); + if (! adj.empty()) { + size_type i = 0; + cg_vertex t = adj[i]; + typename graph_traits::edge_descriptor e; + bool inserted; + boost::tie(e, inserted) = add_edge(s, t, cg); + put(edge_mult_map, e, 1); + ++i; + while (i < adj.size()) { + if (adj[i] == t) + put(edge_mult_map, e, get(edge_mult_map, e) + 1); + else { + t = adj[i]; + boost::tie(e, inserted) = add_edge(s, t, cg); + put(edge_mult_map, e, 1); + } + ++i; + } + } + } + } + + template + void create_condensation_graph(const Graph& g, + const ComponentLists& components, + ComponentNumberMap component_number, + CondensationGraph& cg) + { + create_condensation_graph(g, components, component_number, cg, + dummy_property_map()); + } + +} // namespace boost + +#endif // BOOST_CREATE_CONDENSATION_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/cuthill_mckee_ordering.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/cuthill_mckee_ordering.hpp new file mode 100644 index 0000000000..52dc982a18 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/cuthill_mckee_ordering.hpp @@ -0,0 +1,191 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2004, 2005 Trustees of Indiana University +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, +// Doug Gregor, D. Kevin McGrath +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_CUTHILL_MCKEE_HPP +#define BOOST_GRAPH_CUTHILL_MCKEE_HPP + +#include +#include +#include +#include + + +/* + (Reverse) Cuthill-McKee Algorithm for matrix reordering +*/ + +namespace boost { + + namespace detail { + + + + template < typename OutputIterator, typename Buffer, typename DegreeMap > + class bfs_rcm_visitor:public default_bfs_visitor + { + public: + bfs_rcm_visitor(OutputIterator *iter, Buffer *b, DegreeMap deg): + permutation(iter), Qptr(b), degree(deg) { } + template + void examine_vertex(Vertex u, Graph&) { + *(*permutation)++ = u; + index_begin = Qptr->size(); + } + template + void finish_vertex(Vertex, Graph&) { + using std::sort; + + typedef typename property_traits::value_type ds_type; + + typedef indirect_cmp > Compare; + Compare comp(degree); + + sort(Qptr->begin()+index_begin, Qptr->end(), comp); + } + protected: + OutputIterator *permutation; + int index_begin; + Buffer *Qptr; + DegreeMap degree; + }; + + } // namespace detail + + + // Reverse Cuthill-McKee algorithm with a given starting Vertex. + // + // If user provides a reverse iterator, this will be a reverse-cuthill-mckee + // algorithm, otherwise it will be a standard CM algorithm + + template + OutputIterator + cuthill_mckee_ordering(const Graph& g, + std::deque< typename + graph_traits::vertex_descriptor > vertex_queue, + OutputIterator permutation, + ColorMap color, DegreeMap degree) + { + + //create queue, visitor...don't forget namespaces! + typedef typename property_traits::value_type ds_type; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename boost::sparse::sparse_ordering_queue queue; + typedef typename detail::bfs_rcm_visitor Visitor; + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + + + queue Q; + + //create a bfs_rcm_visitor as defined above + Visitor vis(&permutation, &Q, degree); + + typename graph_traits::vertex_iterator ui, ui_end; + + // Copy degree to pseudo_degree + // initialize the color map + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui){ + put(color, *ui, Color::white()); + } + + + while( !vertex_queue.empty() ) { + Vertex s = vertex_queue.front(); + vertex_queue.pop_front(); + + //call BFS with visitor + breadth_first_visit(g, s, Q, vis, color); + } + return permutation; + } + + + // This is the case where only a single starting vertex is supplied. + template + OutputIterator + cuthill_mckee_ordering(const Graph& g, + typename graph_traits::vertex_descriptor s, + OutputIterator permutation, + ColorMap color, DegreeMap degree) + { + + std::deque< typename graph_traits::vertex_descriptor > vertex_queue; + vertex_queue.push_front( s ); + + return cuthill_mckee_ordering(g, vertex_queue, permutation, color, degree); + + } + + + // This is the version of CM which selects its own starting vertex + template < class Graph, class OutputIterator, + class ColorMap, class DegreeMap> + OutputIterator + cuthill_mckee_ordering(const Graph& G, OutputIterator permutation, + ColorMap color, DegreeMap degree) + { + if (boost::graph::has_no_vertices(G)) + return permutation; + + typedef typename boost::graph_traits::vertex_descriptor Vertex; + typedef typename boost::graph_traits::vertex_iterator VerIter; + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + + std::deque vertex_queue; + + // Mark everything white + BGL_FORALL_VERTICES_T(v, G, Graph) put(color, v, Color::white()); + + // Find one vertex from each connected component + BGL_FORALL_VERTICES_T(v, G, Graph) { + if (get(color, v) == Color::white()) { + depth_first_visit(G, v, dfs_visitor<>(), color); + vertex_queue.push_back(v); + } + } + + // Find starting nodes for all vertices + // TBD: How to do this with a directed graph? + for (typename std::deque::iterator i = vertex_queue.begin(); + i != vertex_queue.end(); ++i) + *i = find_starting_node(G, *i, color, degree); + + return cuthill_mckee_ordering(G, vertex_queue, permutation, + color, degree); + } + + template + OutputIterator + cuthill_mckee_ordering(const Graph& G, OutputIterator permutation, + VertexIndexMap index_map) + { + if (boost::graph::has_no_vertices(G)) + return permutation; + + typedef out_degree_property_map DegreeMap; + std::vector colors(num_vertices(G)); + return cuthill_mckee_ordering(G, permutation, + make_iterator_property_map(&colors[0], + index_map, + colors[0]), + make_out_degree_map(G)); + } + + template + inline OutputIterator + cuthill_mckee_ordering(const Graph& G, OutputIterator permutation) + { return cuthill_mckee_ordering(G, permutation, get(vertex_index, G)); } +} // namespace boost + + +#endif // BOOST_GRAPH_CUTHILL_MCKEE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/dag_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/dag_shortest_paths.hpp new file mode 100644 index 0000000000..a46de9145b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/dag_shortest_paths.hpp @@ -0,0 +1,157 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_DAG_SHORTEST_PATHS_HPP +#define BOOST_GRAPH_DAG_SHORTEST_PATHS_HPP + +#include +#include + +// single-source shortest paths for a Directed Acyclic Graph (DAG) + +namespace boost { + + // Initalize distances and call depth first search + template + inline void + dag_shortest_paths + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + DistanceMap distance, WeightMap weight, ColorMap color, + PredecessorMap pred, + DijkstraVisitor vis, Compare compare, Combine combine, + DistInf inf, DistZero zero) + { + typedef typename graph_traits::vertex_descriptor Vertex; + std::vector rev_topo_order; + rev_topo_order.reserve(num_vertices(g)); + + // Call 'depth_first_visit', not 'topological_sort', because we don't + // want to traverse the entire graph, only vertices reachable from 's', + // and 'topological_sort' will traverse everything. The logic below + // is the same as for 'topological_sort', only we call 'depth_first_visit' + // and 'topological_sort' calls 'depth_first_search'. + topo_sort_visitor > > + topo_visitor(std::back_inserter(rev_topo_order)); + depth_first_visit(g, s, topo_visitor, color); + + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + put(distance, *ui, inf); + put(pred, *ui, *ui); + } + + put(distance, s, zero); + vis.discover_vertex(s, g); + typename std::vector::reverse_iterator i; + for (i = rev_topo_order.rbegin(); i != rev_topo_order.rend(); ++i) { + Vertex u = *i; + vis.examine_vertex(u, g); + typename graph_traits::out_edge_iterator e, e_end; + for (boost::tie(e, e_end) = out_edges(u, g); e != e_end; ++e) { + vis.discover_vertex(target(*e, g), g); + bool decreased = relax(*e, g, weight, pred, distance, + combine, compare); + if (decreased) + vis.edge_relaxed(*e, g); + else + vis.edge_not_relaxed(*e, g); + } + vis.finish_vertex(u, g); + } + } + + namespace detail { + + // Defaults are the same as Dijkstra's algorithm + + // Handle Distance Compare, Combine, Inf and Zero defaults + template + inline void + dag_sp_dispatch2 + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + DistanceMap distance, WeightMap weight, ColorMap color, IndexMap /*id*/, + DijkstraVisitor vis, const Params& params) + { + typedef typename property_traits::value_type D; + dummy_property_map p_map; + dag_shortest_paths + (g, s, distance, weight, color, + choose_param(get_param(params, vertex_predecessor), p_map), + vis, + choose_param(get_param(params, distance_compare_t()), std::less()), + choose_param(get_param(params, distance_combine_t()), closed_plus()), + choose_param(get_param(params, distance_inf_t()), + (std::numeric_limits::max)()), + choose_param(get_param(params, distance_zero_t()), + D())); + } + + // Handle DistanceMap and ColorMap defaults + template + inline void + dag_sp_dispatch1 + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + DistanceMap distance, WeightMap weight, ColorMap color, IndexMap id, + DijkstraVisitor vis, const Params& params) + { + typedef typename property_traits::value_type T; + typename std::vector::size_type n; + n = is_default_param(distance) ? num_vertices(g) : 1; + std::vector distance_map(n); + n = is_default_param(color) ? num_vertices(g) : 1; + std::vector color_map(n); + + dag_sp_dispatch2 + (g, s, + choose_param(distance, + make_iterator_property_map(distance_map.begin(), id, + distance_map[0])), + weight, + choose_param(color, + make_iterator_property_map(color_map.begin(), id, + color_map[0])), + id, vis, params); + } + + } // namespace detail + + template + inline void + dag_shortest_paths + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params) + { + // assert that the graph is directed... + null_visitor null_vis; + detail::dag_sp_dispatch1 + (g, s, + get_param(params, vertex_distance), + choose_const_pmap(get_param(params, edge_weight), g, edge_weight), + get_param(params, vertex_color), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + choose_param(get_param(params, graph_visitor), + make_dijkstra_visitor(null_vis)), + params); + } + +} // namespace boost + +#endif // BOOST_GRAPH_DAG_SHORTEST_PATHS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/degree_centrality.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/degree_centrality.hpp new file mode 100644 index 0000000000..24ecb6c511 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/degree_centrality.hpp @@ -0,0 +1,130 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_DEGREE_CENTRALITY_HPP +#define BOOST_GRAPH_DEGREE_CENTRALITY_HPP + +#include + +namespace boost { + +template +struct degree_centrality_measure +{ + typedef typename graph_traits::degree_size_type degree_type; + typedef typename graph_traits::vertex_descriptor vertex_type; +}; + +template +struct influence_measure + : public degree_centrality_measure +{ + typedef degree_centrality_measure base_type; + typedef typename base_type::degree_type degree_type; + typedef typename base_type::vertex_type vertex_type; + + inline degree_type operator ()(vertex_type v, const Graph& g) + { + function_requires< IncidenceGraphConcept >(); + return out_degree(v, g); + } +}; + +template +inline influence_measure +measure_influence(const Graph&) +{ return influence_measure(); } + + +template +struct prestige_measure + : public degree_centrality_measure +{ + typedef degree_centrality_measure base_type; + typedef typename base_type::degree_type degree_type; + typedef typename base_type::vertex_type vertex_type; + + inline degree_type operator ()(vertex_type v, const Graph& g) + { + function_requires< BidirectionalGraphConcept >(); + return in_degree(v, g); + } +}; + +template +inline prestige_measure +measure_prestige(const Graph&) +{ return prestige_measure(); } + + +template +inline typename Measure::degree_type +degree_centrality(const Graph& g, Vertex v, Measure measure) +{ + function_requires< DegreeMeasureConcept >(); + return measure(v, g); +} + +template +inline typename graph_traits::degree_size_type +degree_centrality(const Graph& g, Vertex v) +{ + return degree_centrality(g, v, measure_influence(g)); +} + + +// These are alias functions, intended to provide a more expressive interface. + +template +inline typename graph_traits::degree_size_type +influence(const Graph& g, Vertex v) +{ return degree_centrality(g, v, measure_influence(g)); } + + +template +inline typename graph_traits::degree_size_type +prestige(const Graph& g, Vertex v) +{ return degree_centrality(g, v, measure_prestige(g)); } + + +template +inline void +all_degree_centralities(const Graph& g, CentralityMap cent, Measure measure) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + function_requires< WritablePropertyMapConcept >(); + typedef typename property_traits::value_type Centrality; + + VertexIterator i, end; + for(tie(i, end) = vertices(g); i != end; ++i) { + Centrality c = degree_centrality(g, *i, measure); + put(cent, *i, c); + } +} + +template +inline void all_degree_centralities(const Graph& g, CentralityMap cent) +{ all_degree_centralities(g, cent, measure_influence(g)); } + +// More helper functions for computing influence and prestige. +// I hate the names of these functions, but influence and prestige +// don't pluralize too well. + +template +inline void all_influence_values(const Graph& g, CentralityMap cent) +{ all_degree_centralities(g, cent, measure_influence(g)); } + +template +inline void all_prestige_values(const Graph& g, CentralityMap cent) +{ all_degree_centralities(g, cent, measure_prestige(g)); } + +} /* namespace boost */ + +#endif + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/depth_first_search.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/depth_first_search.hpp new file mode 100644 index 0000000000..74fe2c029c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/depth_first_search.hpp @@ -0,0 +1,331 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2003 Bruce Barr +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +// Nonrecursive implementation of depth_first_visit_impl submitted by +// Bruce Barr, schmoost yahoo.com, May/June 2003. +#ifndef BOOST_GRAPH_RECURSIVE_DFS_HPP +#define BOOST_GRAPH_RECURSIVE_DFS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { + + template + class DFSVisitorConcept { + public: + void constraints() { + function_requires< CopyConstructibleConcept >(); + vis.initialize_vertex(u, g); + vis.start_vertex(u, g); + vis.discover_vertex(u, g); + vis.examine_edge(e, g); + vis.tree_edge(e, g); + vis.back_edge(e, g); + vis.forward_or_cross_edge(e, g); + vis.finish_vertex(u, g); + } + private: + Visitor vis; + Graph g; + typename graph_traits::vertex_descriptor u; + typename graph_traits::edge_descriptor e; + }; + + namespace detail { + + struct nontruth2 { + template + bool operator()(const T&, const T2&) const { return false; } + }; + + +// Define BOOST_RECURSIVE_DFS to use older, recursive version. +// It is retained for a while in order to perform performance +// comparison. +#ifndef BOOST_RECURSIVE_DFS + + // If the vertex u and the iterators ei and ei_end are thought of as the + // context of the algorithm, each push and pop from the stack could + // be thought of as a context shift. + // Each pass through "while (ei != ei_end)" may refer to the out-edges of + // an entirely different vertex, because the context of the algorithm + // shifts every time a white adjacent vertex is discovered. + // The corresponding context shift back from the adjacent vertex occurs + // after all of its out-edges have been examined. + // + // See http://lists.boost.org/MailArchives/boost/msg48752.php for FAQ. + + template + void depth_first_visit_impl + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor u, + DFSVisitor& vis, + ColorMap color, TerminatorFunc func = TerminatorFunc()) + { + function_requires >(); + function_requires >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadWritePropertyMapConcept >(); + typedef typename property_traits::value_type ColorValue; + function_requires< ColorValueConcept >(); + typedef color_traits Color; + typedef typename graph_traits::out_edge_iterator Iter; + typedef std::pair > VertexInfo; + + Iter ei, ei_end; + std::vector stack; + + // Possible optimization for vector + //stack.reserve(num_vertices(g)); + + typedef typename unwrap_reference::type TF; + + put(color, u, Color::gray()); + vis.discover_vertex(u, g); + boost::tie(ei, ei_end) = out_edges(u, g); + // Variable is needed to workaround a borland bug. + TF& fn = static_cast(func); + if (fn(u, g)) { + // If this vertex terminates the search, we push empty range + stack.push_back(std::make_pair(u, std::make_pair(ei_end, ei_end))); + } else { + stack.push_back(std::make_pair(u, std::make_pair(ei, ei_end))); + } + while (!stack.empty()) { + VertexInfo& back = stack.back(); + u = back.first; + boost::tie(ei, ei_end) = back.second; + stack.pop_back(); + while (ei != ei_end) { + Vertex v = target(*ei, g); + vis.examine_edge(*ei, g); + ColorValue v_color = get(color, v); + if (v_color == Color::white()) { + vis.tree_edge(*ei, g); + stack.push_back(std::make_pair(u, std::make_pair(++ei, ei_end))); + u = v; + put(color, u, Color::gray()); + vis.discover_vertex(u, g); + boost::tie(ei, ei_end) = out_edges(u, g); + if (fn(u, g)) { + ei = ei_end; + } + } else if (v_color == Color::gray()) { + vis.back_edge(*ei, g); + ++ei; + } else { + vis.forward_or_cross_edge(*ei, g); + ++ei; + } + } + put(color, u, Color::black()); + vis.finish_vertex(u, g); + } + } + +#else // BOOST_RECURSIVE_DFS is defined + + template + void depth_first_visit_impl + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor u, + DFSVisitor& vis, // pass-by-reference here, important! + ColorMap color, TerminatorFunc func) + { + function_requires >(); + function_requires >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadWritePropertyMapConcept >(); + typedef typename property_traits::value_type ColorValue; + function_requires< ColorValueConcept >(); + typedef color_traits Color; + typename graph_traits::out_edge_iterator ei, ei_end; + + put(color, u, Color::gray()); vis.discover_vertex(u, g); + + typedef typename unwrap_reference::type TF; + // Variable is needed to workaround a borland bug. + TF& fn = static_cast(func); + if (!fn(u, g)) + for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) { + Vertex v = target(*ei, g); vis.examine_edge(*ei, g); + ColorValue v_color = get(color, v); + if (v_color == Color::white()) { vis.tree_edge(*ei, g); + depth_first_visit_impl(g, v, vis, color, func); + } else if (v_color == Color::gray()) vis.back_edge(*ei, g); + else vis.forward_or_cross_edge(*ei, g); + } + put(color, u, Color::black()); vis.finish_vertex(u, g); + } + +#endif + + } // namespace detail + + template + void + depth_first_search(const VertexListGraph& g, DFSVisitor vis, ColorMap color, + typename graph_traits::vertex_descriptor start_vertex) + { + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires >(); + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + Vertex u = implicit_cast(*ui); + put(color, u, Color::white()); vis.initialize_vertex(u, g); + } + + if (start_vertex != implicit_cast(*vertices(g).first)){ vis.start_vertex(start_vertex, g); + detail::depth_first_visit_impl(g, start_vertex, vis, color, + detail::nontruth2()); + } + + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + Vertex u = implicit_cast(*ui); + ColorValue u_color = get(color, u); + if (u_color == Color::white()) { vis.start_vertex(u, g); + detail::depth_first_visit_impl(g, u, vis, color, detail::nontruth2()); + } + } + } + + template + void + depth_first_search(const VertexListGraph& g, DFSVisitor vis, ColorMap color) + { + typedef typename boost::graph_traits::vertex_iterator vi; + std::pair verts = vertices(g); + if (verts.first == verts.second) + return; + + depth_first_search(g, vis, color, *verts.first); + } + + template + class dfs_visitor { + public: + dfs_visitor() { } + dfs_visitor(Visitors vis) : m_vis(vis) { } + + template + void initialize_vertex(Vertex u, const Graph& g) { + invoke_visitors(m_vis, u, g, ::boost::on_initialize_vertex()); + } + template + void start_vertex(Vertex u, const Graph& g) { + invoke_visitors(m_vis, u, g, ::boost::on_start_vertex()); + } + template + void discover_vertex(Vertex u, const Graph& g) { + invoke_visitors(m_vis, u, g, ::boost::on_discover_vertex()); + } + template + void examine_edge(Edge u, const Graph& g) { + invoke_visitors(m_vis, u, g, ::boost::on_examine_edge()); + } + template + void tree_edge(Edge u, const Graph& g) { + invoke_visitors(m_vis, u, g, ::boost::on_tree_edge()); + } + template + void back_edge(Edge u, const Graph& g) { + invoke_visitors(m_vis, u, g, ::boost::on_back_edge()); + } + template + void forward_or_cross_edge(Edge u, const Graph& g) { + invoke_visitors(m_vis, u, g, ::boost::on_forward_or_cross_edge()); + } + template + void finish_vertex(Vertex u, const Graph& g) { + invoke_visitors(m_vis, u, g, ::boost::on_finish_vertex()); + } + + BOOST_GRAPH_EVENT_STUB(on_initialize_vertex,dfs) + BOOST_GRAPH_EVENT_STUB(on_start_vertex,dfs) + BOOST_GRAPH_EVENT_STUB(on_discover_vertex,dfs) + BOOST_GRAPH_EVENT_STUB(on_examine_edge,dfs) + BOOST_GRAPH_EVENT_STUB(on_tree_edge,dfs) + BOOST_GRAPH_EVENT_STUB(on_back_edge,dfs) + BOOST_GRAPH_EVENT_STUB(on_forward_or_cross_edge,dfs) + BOOST_GRAPH_EVENT_STUB(on_finish_vertex,dfs) + + protected: + Visitors m_vis; + }; + template + dfs_visitor + make_dfs_visitor(Visitors vis) { + return dfs_visitor(vis); + } + typedef dfs_visitor<> default_dfs_visitor; + + // Named Parameter Variant + template + void + depth_first_search(const VertexListGraph& g, + const bgl_named_params& params) + { + typedef typename boost::graph_traits::vertex_iterator vi; + std::pair verts = vertices(g); + if (verts.first == verts.second) + return; + using namespace boost::graph::keywords; + typedef bgl_named_params params_type; + BOOST_GRAPH_DECLARE_CONVERTED_PARAMETERS(params_type, params) + depth_first_search + (g, + arg_pack[_visitor | make_dfs_visitor(null_visitor())], + boost::detail::make_color_map_from_arg_pack(g, arg_pack), + arg_pack[_root_vertex | *vertices(g).first] + ); + } + + template + void depth_first_visit + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor u, + DFSVisitor vis, ColorMap color) + { + vis.start_vertex(u, g); + detail::depth_first_visit_impl(g, u, vis, color, detail::nontruth2()); + } + + template + void depth_first_visit + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor u, + DFSVisitor vis, ColorMap color, TerminatorFunc func = TerminatorFunc()) + { + vis.start_vertex(u, g); + detail::depth_first_visit_impl(g, u, vis, color, func); + } +} // namespace boost + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/adj_list_edge_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/adj_list_edge_iterator.hpp new file mode 100644 index 0000000000..12cb6ee97a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/adj_list_edge_iterator.hpp @@ -0,0 +1,117 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_DETAIL_ADJ_LIST_EDGE_ITERATOR_HPP +#define BOOST_GRAPH_DETAIL_ADJ_LIST_EDGE_ITERATOR_HPP + +#include +#include +#include + +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) +# define BOOST_GRAPH_NO_OPTIONAL +#endif + +#ifdef BOOST_GRAPH_NO_OPTIONAL +# define BOOST_GRAPH_MEMBER . +#else +# define BOOST_GRAPH_MEMBER -> +# include +#endif // ndef BOOST_GRAPH_NO_OPTIONAL + +namespace boost { + + namespace detail { + + template + class adj_list_edge_iterator { + typedef adj_list_edge_iterator self; + public: + typedef std::forward_iterator_tag iterator_category; + typedef typename OutEdgeIterator::value_type value_type; + typedef typename OutEdgeIterator::reference reference; + typedef typename OutEdgeIterator::pointer pointer; + typedef typename OutEdgeIterator::difference_type difference_type; + typedef difference_type distance_type; + + inline adj_list_edge_iterator() {} + + inline adj_list_edge_iterator(const self& x) + : vBegin(x.vBegin), vCurr(x.vCurr), vEnd(x.vEnd), + edges(x.edges), m_g(x.m_g) { } + + template + inline adj_list_edge_iterator(VertexIterator b, + VertexIterator c, + VertexIterator e, + const G& g) + : vBegin(b), vCurr(c), vEnd(e), m_g(&g) { + if ( vCurr != vEnd ) { + while ( vCurr != vEnd && out_degree(*vCurr, *m_g) == 0 ) + ++vCurr; + if ( vCurr != vEnd ) + edges = out_edges(*vCurr, *m_g); + } + } + + /*Note: + In the directed graph cases, it is fine. + For undirected graphs, one edge go through twice. + */ + inline self& operator++() { + ++edges BOOST_GRAPH_MEMBER first; + if (edges BOOST_GRAPH_MEMBER first == edges BOOST_GRAPH_MEMBER second) + { + ++vCurr; + while ( vCurr != vEnd && out_degree(*vCurr, *m_g) == 0 ) + ++vCurr; + if ( vCurr != vEnd ) + edges = out_edges(*vCurr, *m_g); + } + return *this; + } + inline self operator++(int) { + self tmp = *this; + ++(*this); + return tmp; + } + inline value_type operator*() const + { return *edges BOOST_GRAPH_MEMBER first; } + inline bool operator==(const self& x) const { + return vCurr == x.vCurr + && (vCurr == vEnd + || edges BOOST_GRAPH_MEMBER first == x.edges BOOST_GRAPH_MEMBER first); + } + inline bool operator!=(const self& x) const { + return vCurr != x.vCurr + || (vCurr != vEnd + && edges BOOST_GRAPH_MEMBER first != x.edges BOOST_GRAPH_MEMBER first); + } + protected: + VertexIterator vBegin; + VertexIterator vCurr; + VertexIterator vEnd; + +#ifdef BOOST_GRAPH_NO_OPTIONAL + std::pair edges; +#else + boost::optional > + edges; +#endif // ndef BOOST_GRAPH_NO_OPTIONAL + const Graph* m_g; + }; + + } // namespace detail + +} + +#undef BOOST_GRAPH_MEMBER + +#endif // BOOST_GRAPH_DETAIL_ADJ_LIST_EDGE_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/adjacency_list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/adjacency_list.hpp new file mode 100644 index 0000000000..0cbf5f4e9c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/adjacency_list.hpp @@ -0,0 +1,2837 @@ +// -*- c++ -*- +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2010 Thomas Claveirole +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_DETAIL_ADJACENCY_LIST_HPP +#define BOOST_GRAPH_DETAIL_ADJACENCY_LIST_HPP + +#include // for vertex_map in copy_impl +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Symbol truncation problems with MSVC, trying to shorten names. +#define stored_edge se_ +#define stored_edge_property sep_ +#define stored_edge_iter sei_ + +/* + Outline for this file: + + out_edge_iterator and in_edge_iterator implementation + edge_iterator for undirected graph + stored edge types (these object live in the out-edge/in-edge lists) + directed edges helper class + directed graph helper class + undirected graph helper class + bidirectional graph helper class + bidirectional graph helper class (without edge properties) + bidirectional graph helper class (with edge properties) + adjacency_list helper class + adj_list_impl class + vec_adj_list_impl class + adj_list_gen class + vertex property map + edge property map + + + Note: it would be nice to merge some of the undirected and + bidirectional code... it is awful similar. + */ + + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// Stay out of the way of the concept checking class +# define Graph Graph_ +#endif + +namespace boost { + + namespace detail { + + template + struct directed_category_traits { + typedef directed_tag directed_category; + }; + + template <> + struct directed_category_traits { + typedef directed_tag directed_category; + }; + template <> + struct directed_category_traits { + typedef undirected_tag directed_category; + }; + template <> + struct directed_category_traits { + typedef bidirectional_tag directed_category; + }; + + template + struct target_is { + target_is(const Vertex& v) : m_target(v) { } + template + bool operator()(const StoredEdge& e) const { + return e.get_target() == m_target; + } + Vertex m_target; + }; + + // O(E/V) + template + void erase_from_incidence_list(EdgeList& el, vertex_descriptor v, + allow_parallel_edge_tag) + { + boost::graph_detail::erase_if(el, detail::target_is(v)); + } + // O(log(E/V)) + template + void erase_from_incidence_list(EdgeList& el, vertex_descriptor v, + disallow_parallel_edge_tag) + { + typedef typename EdgeList::value_type StoredEdge; + el.erase(StoredEdge(v)); + } + + //========================================================================= + // Out-Edge and In-Edge Iterator Implementation + + template + struct out_edge_iter + : iterator_adaptor< + out_edge_iter + , BaseIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > + { + typedef iterator_adaptor< + out_edge_iter + , BaseIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > super_t; + + inline out_edge_iter() { } + inline out_edge_iter(const BaseIter& i, const VertexDescriptor& src) + : super_t(i), m_src(src) { } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor(m_src, (*this->base()).get_target(), + &(*this->base()).get_property()); + } + VertexDescriptor m_src; + }; + + template + struct in_edge_iter + : iterator_adaptor< + in_edge_iter + , BaseIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > + { + typedef iterator_adaptor< + in_edge_iter + , BaseIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > super_t; + + inline in_edge_iter() { } + inline in_edge_iter(const BaseIter& i, const VertexDescriptor& src) + : super_t(i), m_src(src) { } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor((*this->base()).get_target(), m_src, + &this->base()->get_property()); + } + VertexDescriptor m_src; + }; + + //========================================================================= + // Undirected Edge Iterator Implementation + + template + struct undirected_edge_iter + : iterator_adaptor< + undirected_edge_iter + , EdgeIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > + { + typedef iterator_adaptor< + undirected_edge_iter + , EdgeIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > super_t; + + undirected_edge_iter() {} + + explicit undirected_edge_iter(EdgeIter i) + : super_t(i) {} + + inline EdgeDescriptor + dereference() const { + return EdgeDescriptor( + (*this->base()).m_source + , (*this->base()).m_target + , &this->base()->get_property()); + } + }; + + //========================================================================= + // Edge Storage Types (stored in the out-edge/in-edge lists) + + template + class stored_edge + : public boost::equality_comparable1< stored_edge, + boost::less_than_comparable1< stored_edge > > + { + public: + typedef no_property property_type; + inline stored_edge() { } + inline stored_edge(Vertex target, const no_property& = no_property()) + : m_target(target) { } + // Need to write this explicitly so stored_edge_property can + // invoke Base::operator= (at least, for SGI MIPSPro compiler) + inline stored_edge& operator=(const stored_edge& x) { + m_target = x.m_target; + return *this; + } + inline Vertex& get_target() const { return m_target; } + inline const no_property& get_property() const { return s_prop; } + inline bool operator==(const stored_edge& x) const + { return m_target == x.get_target(); } + inline bool operator<(const stored_edge& x) const + { return m_target < x.get_target(); } + //protected: need to add hash<> as a friend + static no_property s_prop; + // Sometimes target not used as key in the set, and in that case + // it is ok to change the target. + mutable Vertex m_target; + }; + template + no_property stored_edge::s_prop; + + template + class stored_edge_property : public stored_edge { + typedef stored_edge_property self; + typedef stored_edge Base; + public: + typedef Property property_type; + inline stored_edge_property() { } + inline stored_edge_property(Vertex target, + const Property& p = Property()) + : stored_edge(target), m_property(new Property(p)) { } + stored_edge_property(const self& x) + : Base(x), m_property(const_cast(x).m_property) { } + self& operator=(const self& x) { + Base::operator=(x); + m_property = const_cast(x).m_property; + return *this; + } + inline Property& get_property() { return *m_property; } + inline const Property& get_property() const { return *m_property; } + protected: + // Holding the property by-value causes edge-descriptor + // invalidation for add_edge() with EdgeList=vecS. Instead we + // hold a pointer to the property. std::auto_ptr is not + // a perfect fit for the job, but it is darn close. + std::auto_ptr m_property; + }; + + + template + class stored_edge_iter + : public stored_edge + { + public: + typedef Property property_type; + inline stored_edge_iter() { } + inline stored_edge_iter(Vertex v) + : stored_edge(v) { } + inline stored_edge_iter(Vertex v, Iter i, void* = 0) + : stored_edge(v), m_iter(i) { } + inline Property& get_property() { return m_iter->get_property(); } + inline const Property& get_property() const { + return m_iter->get_property(); + } + inline Iter get_iter() const { return m_iter; } + protected: + Iter m_iter; + }; + + // For when the EdgeList is a std::vector. + // Want to make the iterator stable, so use an offset + // instead of an iterator into a std::vector + template + class stored_ra_edge_iter + : public stored_edge + { + typedef typename EdgeVec::iterator Iter; + public: + typedef Property property_type; + inline stored_ra_edge_iter() { } + inline stored_ra_edge_iter(Vertex v, Iter i = Iter(), + EdgeVec* edge_vec = 0) + : stored_edge(v), m_i(i - edge_vec->begin()), m_vec(edge_vec){ } + inline Property& get_property() { return (*m_vec)[m_i].get_property(); } + inline const Property& get_property() const { + return (*m_vec)[m_i].get_property(); + } + inline Iter get_iter() const { return m_vec->begin() + m_i; } + protected: + std::size_t m_i; + EdgeVec* m_vec; + }; + + } // namespace detail + + template + const typename property_value::type& + get(Tag property_tag, + const detail::stored_edge_property& e) + { + return get_property_value(e.get_property(), property_tag); + } + + template + const typename property_value::type& + get(Tag property_tag, + const detail::stored_edge_iter& e) + { + return get_property_value(e.get_property(), property_tag); + } + + template + const typename property_value::type& + get(Tag property_tag, + const detail::stored_ra_edge_iter& e) + { + return get_property_value(e.get_property(), property_tag); + } + + //========================================================================= + // Directed Edges Helper Class + + namespace detail { + + // O(E/V) + template + inline void + remove_directed_edge_dispatch(edge_descriptor, EdgeList& el, + StoredProperty& p) + { + for (typename EdgeList::iterator i = el.begin(); + i != el.end(); ++i) + if (&(*i).get_property() == &p) { + el.erase(i); + return; + } + } + + template + inline void + remove_directed_edge_if_dispatch(incidence_iterator first, + incidence_iterator last, + EdgeList& el, Predicate pred, + boost::allow_parallel_edge_tag) + { + // remove_if + while (first != last && !pred(*first)) + ++first; + incidence_iterator i = first; + if (first != last) + for (++i; i != last; ++i) + if (!pred(*i)) { + *first.base() = *i.base(); + ++first; + } + el.erase(first.base(), el.end()); + } + template + inline void + remove_directed_edge_if_dispatch(incidence_iterator first, + incidence_iterator last, + EdgeList& el, + Predicate pred, + boost::disallow_parallel_edge_tag) + { + for (incidence_iterator next = first; + first != last; first = next) { + ++next; + if (pred(*first)) + el.erase( first.base() ); + } + } + + template + inline void + undirected_remove_out_edge_if_dispatch(Graph& g, + incidence_iterator first, + incidence_iterator last, + EdgeList& el, Predicate pred, + boost::allow_parallel_edge_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + // remove_if + while (first != last && !pred(*first)) + ++first; + incidence_iterator i = first; + bool self_loop_removed = false; + if (first != last) + for (; i != last; ++i) { + if (self_loop_removed) { + /* With self loops, the descriptor will show up + * twice. The first time it will be removed, and now it + * will be skipped. + */ + self_loop_removed = false; + } + else if (!pred(*i)) { + *first.base() = *i.base(); + ++first; + } else { + if (source(*i, g) == target(*i, g)) self_loop_removed = true; + else { + // Remove the edge from the target + detail::remove_directed_edge_dispatch + (*i, + g.out_edge_list(target(*i, g)), + *(PropT*)(*i).get_property()); + } + + // Erase the edge property + g.m_edges.erase( (*i.base()).get_iter() ); + } + } + el.erase(first.base(), el.end()); + } + template + inline void + undirected_remove_out_edge_if_dispatch(Graph& g, + incidence_iterator first, + incidence_iterator last, + EdgeList& el, + Predicate pred, + boost::disallow_parallel_edge_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + for (incidence_iterator next = first; + first != last; first = next) { + ++next; + if (pred(*first)) { + if (source(*first, g) != target(*first, g)) { + // Remove the edge from the target + detail::remove_directed_edge_dispatch + (*first, + g.out_edge_list(target(*first, g)), + *(PropT*)(*first).get_property()); + } + + // Erase the edge property + g.m_edges.erase( (*first.base()).get_iter() ); + + // Erase the edge in the source + el.erase( first.base() ); + } + } + } + + // O(E/V) + template + inline void + remove_directed_edge_dispatch(edge_descriptor e, EdgeList& el, + no_property&) + { + for (typename EdgeList::iterator i = el.begin(); + i != el.end(); ++i) + if ((*i).get_target() == e.m_target) { + el.erase(i); + return; + } + } + + } // namespace detail + + template + struct directed_edges_helper { + + // Placement of these overloaded remove_edge() functions + // inside the class avoids a VC++ bug. + + // O(E/V) + inline void + remove_edge(typename Config::edge_descriptor e) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(*this); + typename Config::OutEdgeList& el = g.out_edge_list(source(e, g)); + typedef typename Config::OutEdgeList::value_type::property_type PType; + detail::remove_directed_edge_dispatch(e, el, + *(PType*)e.get_property()); + } + + // O(1) + inline void + remove_edge(typename Config::out_edge_iterator iter) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(*this); + typename Config::edge_descriptor e = *iter; + typename Config::OutEdgeList& el = g.out_edge_list(source(e, g)); + el.erase(iter.base()); + } + + }; + + // O(1) + template + inline std::pair + edges(const directed_edges_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_iterator edge_iterator; + const graph_type& cg = static_cast(g_); + graph_type& g = const_cast(cg); + return std::make_pair( edge_iterator(g.vertex_set().begin(), + g.vertex_set().begin(), + g.vertex_set().end(), g), + edge_iterator(g.vertex_set().begin(), + g.vertex_set().end(), + g.vertex_set().end(), g) ); + } + + //========================================================================= + // Directed Graph Helper Class + + struct adj_list_dir_traversal_tag : + public virtual vertex_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual edge_list_graph_tag { }; + + template + struct directed_graph_helper + : public directed_edges_helper { + typedef typename Config::edge_descriptor edge_descriptor; + typedef adj_list_dir_traversal_tag traversal_category; + }; + + // O(E/V) + template + inline void + remove_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + detail::erase_from_incidence_list(g.out_edge_list(u), v, Cat()); + } + + template + inline void + remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, + directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typename Config::out_edge_iterator first, last; + boost::tie(first, last) = out_edges(u, g); + typedef typename Config::edge_parallel_category edge_parallel_category; + detail::remove_directed_edge_if_dispatch + (first, last, g.out_edge_list(u), pred, edge_parallel_category()); + } + + template + inline void + remove_edge_if(Predicate pred, directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + + typename Config::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + remove_out_edge_if(*vi, pred, g); + } + + template + inline void + remove_edge(EdgeOrIter e_or_iter, directed_graph_helper& g_) + { + g_.remove_edge(e_or_iter); + } + + // O(V + E) for allow_parallel_edges + // O(V * log(E/V)) for disallow_parallel_edges + template + inline void + clear_vertex(typename Config::vertex_descriptor u, + directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::vertex_iterator vi, viend; + for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi) + detail::erase_from_incidence_list(g.out_edge_list(*vi), u, Cat()); + g.out_edge_list(u).clear(); + // clear() should be a req of Sequence and AssociativeContainer, + // or maybe just Container + } + + template + inline void + clear_out_edges(typename Config::vertex_descriptor u, + directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + g.out_edge_list(u).clear(); + // clear() should be a req of Sequence and AssociativeContainer, + // or maybe just Container + } + + // O(V), could do better... + template + inline typename Config::edges_size_type + num_edges(const directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& g = static_cast(g_); + typename Config::edges_size_type num_e = 0; + typename Config::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + num_e += out_degree(*vi, g); + return num_e; + } + // O(1) for allow_parallel_edge_tag + // O(log(E/V)) for disallow_parallel_edge_tag + template + inline std::pair::edge_descriptor, bool> + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + directed_graph_helper& g_) + { + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::graph_type graph_type; + typedef typename Config::StoredEdge StoredEdge; + graph_type& g = static_cast(g_); + typename Config::OutEdgeList::iterator i; + bool inserted; + boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), + StoredEdge(v, p)); + return std::make_pair(edge_descriptor(u, v, &(*i).get_property()), + inserted); + } + // Did not use default argument here because that + // causes Visual C++ to get confused. + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + directed_graph_helper& g_) + { + typename Config::edge_property_type p; + return add_edge(u, v, p, g_); + } + //========================================================================= + // Undirected Graph Helper Class + + template + struct undirected_graph_helper; + + struct undir_adj_list_traversal_tag : + public virtual vertex_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual edge_list_graph_tag, + public virtual bidirectional_graph_tag { }; + + namespace detail { + + // using class with specialization for dispatch is a VC++ workaround. + template + struct remove_undirected_edge_dispatch { + + // O(E/V) + template + static void + apply(edge_descriptor e, + undirected_graph_helper& g_, + StoredProperty& p) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + + typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g)); + typename Config::OutEdgeList::iterator out_i = out_el.begin(); + for (; out_i != out_el.end(); ++out_i) + if (&(*out_i).get_property() == &p) { + out_el.erase(out_i); + break; + } + typename Config::OutEdgeList& in_el = g.out_edge_list(target(e, g)); + typename Config::OutEdgeList::iterator in_i = in_el.begin(); + for (; in_i != in_el.end(); ++in_i) + if (&(*in_i).get_property() == &p) { + g.m_edges.erase((*in_i).get_iter()); + in_el.erase(in_i); + return; + } + } + }; + + template <> + struct remove_undirected_edge_dispatch { + // O(E/V) + template + static void + apply(edge_descriptor e, + undirected_graph_helper& g_, + no_property&) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + no_property* p = (no_property*)e.get_property(); + typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g)); + typename Config::OutEdgeList::iterator out_i = out_el.begin(); + for (; out_i != out_el.end(); ++out_i) + if (&(*out_i).get_property() == p) { + out_el.erase(out_i); + break; + } + typename Config::OutEdgeList& in_el = g.out_edge_list(target(e, g)); + typename Config::OutEdgeList::iterator in_i = in_el.begin(); + for (; in_i != in_el.end(); ++in_i) + if (&(*in_i).get_property() == p) { + g.m_edges.erase((*in_i).get_iter()); + in_el.erase(in_i); + return; + } + } + }; + + // O(E/V) + template + inline void + remove_edge_and_property(Graph& g, EdgeList& el, Vertex v, + boost::allow_parallel_edge_tag cat) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename EdgeList::value_type StoredEdge; + typename EdgeList::iterator i = el.begin(), end = el.end(); + for (; i != end; ++i) { + if ((*i).get_target() == v) { + // NOTE: Wihtout this skip, this loop will double-delete properties + // of loop edges. This solution is based on the observation that + // the incidence edges of a vertex with a loop are adjacent in the + // out edge list. This *may* actually hold for multisets also. + bool skip = (boost::next(i) != end && i->get_iter() == boost::next(i)->get_iter()); + g.m_edges.erase((*i).get_iter()); + if (skip) ++i; + } + } + detail::erase_from_incidence_list(el, v, cat); + } + // O(log(E/V)) + template + inline void + remove_edge_and_property(Graph& g, EdgeList& el, Vertex v, + boost::disallow_parallel_edge_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename EdgeList::value_type StoredEdge; + typename EdgeList::iterator i = el.find(StoredEdge(v)), end = el.end(); + if (i != end) { + g.m_edges.erase((*i).get_iter()); + el.erase(i); + } + } + + } // namespace detail + + template + struct list_edge // short name due to VC++ truncation and linker problems + : public boost::detail::edge_base + { + typedef EdgeProperty property_type; + typedef boost::detail::edge_base Base; + list_edge(Vertex u, Vertex v, const EdgeProperty& p = EdgeProperty()) + : Base(u, v), m_property(p) { } + EdgeProperty& get_property() { return m_property; } + const EdgeProperty& get_property() const { return m_property; } + // the following methods should never be used, but are needed + // to make SGI MIPSpro C++ happy + list_edge() { } + bool operator==(const list_edge&) const { return false; } + bool operator<(const list_edge&) const { return false; } + EdgeProperty m_property; + }; + + template + struct undirected_graph_helper { + + typedef undir_adj_list_traversal_tag traversal_category; + + // Placement of these overloaded remove_edge() functions + // inside the class avoids a VC++ bug. + + // O(E/V) + inline void + remove_edge(typename Config::edge_descriptor e) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::OutEdgeList::value_type::property_type PType; + detail::remove_undirected_edge_dispatch::apply + (e, *this, *(PType*)e.get_property()); + } + // O(E/V) + inline void + remove_edge(typename Config::out_edge_iterator iter) + { + this->remove_edge(*iter); + } + }; + + // Had to make these non-members to avoid accidental instantiation + // on SGI MIPSpro C++ + template + inline typename C::InEdgeList& + in_edge_list(undirected_graph_helper&, + typename C::vertex_descriptor v) + { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_out_edges; + } + template + inline const typename C::InEdgeList& + in_edge_list(const undirected_graph_helper&, + typename C::vertex_descriptor v) { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_out_edges; + } + + // O(E/V) + template + inline void + remove_edge(EdgeOrIter e, undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + g_.remove_edge(e); + } + + // O(E/V) or O(log(E/V)) + template + void + remove_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typedef typename Config::edge_parallel_category Cat; + detail::remove_edge_and_property(g, g.out_edge_list(u), v, Cat()); + detail::erase_from_incidence_list(g.out_edge_list(v), u, Cat()); + } + + template + void + remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, + undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::OutEdgeList::value_type::property_type PropT; + graph_type& g = static_cast(g_); + typename Config::out_edge_iterator first, last; + boost::tie(first, last) = out_edges(u, g); + typedef typename Config::edge_parallel_category Cat; + detail::undirected_remove_out_edge_if_dispatch + (g, first, last, g.out_edge_list(u), pred, Cat()); + } + template + void + remove_in_edge_if(typename Config::vertex_descriptor u, Predicate pred, + undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + remove_out_edge_if(u, pred, g_); + } + + // O(E/V * E) or O(log(E/V) * E) + template + void + remove_edge_if(Predicate pred, undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typename Config::edge_iterator ei, ei_end, next; + boost::tie(ei, ei_end) = edges(g); + for (next = ei; ei != ei_end; ei = next) { + ++next; + if (pred(*ei)) + remove_edge(*ei, g); + } + } + + // O(1) + template + inline std::pair + edges(const undirected_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_iterator edge_iterator; + const graph_type& cg = static_cast(g_); + graph_type& g = const_cast(cg); + return std::make_pair( edge_iterator(g.m_edges.begin()), + edge_iterator(g.m_edges.end()) ); + } + // O(1) + template + inline typename Config::edges_size_type + num_edges(const undirected_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& g = static_cast(g_); + return g.m_edges.size(); + } + // O(E/V * E/V) + template + inline void + clear_vertex(typename Config::vertex_descriptor u, + undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::iterator + ei = el.begin(), ei_end = el.end(); + for (; ei != ei_end; /* Increment below */ ) { + bool is_self_loop = (*ei).get_target() == u; + // Don't erase from our own incidence list in the case of a self-loop + // since we're clearing it anyway. + if (!is_self_loop) { + detail::erase_from_incidence_list + (g.out_edge_list((*ei).get_target()), u, Cat()); + typename Config::OutEdgeList::iterator ei_copy = ei; + ++ei; + if (!is_self_loop) g.m_edges.erase((*ei_copy).get_iter()); + } else { + ++ei; + } + } + g.out_edge_list(u).clear(); + } + // O(1) for allow_parallel_edge_tag + // O(log(E/V)) for disallow_parallel_edge_tag + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + undirected_graph_helper& g_) + { + typedef typename Config::StoredEdge StoredEdge; + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + + bool inserted; + typename Config::EdgeContainer::value_type e(u, v, p); + typename Config::EdgeContainer::iterator p_iter + = graph_detail::push(g.m_edges, e).first; + + typename Config::OutEdgeList::iterator i; + boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), + StoredEdge(v, p_iter, &g.m_edges)); + if (inserted) { + boost::graph_detail::push(g.out_edge_list(v), StoredEdge(u, p_iter, &g.m_edges)); + return std::make_pair(edge_descriptor(u, v, &p_iter->get_property()), + true); + } else { + g.m_edges.erase(p_iter); + return std::make_pair + (edge_descriptor(u, v, &i->get_iter()->get_property()), false); + } + } + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + undirected_graph_helper& g_) + { + typename Config::edge_property_type p; + return add_edge(u, v, p, g_); + } + + // O(1) + template + inline typename Config::degree_size_type + degree(typename Config::vertex_descriptor u, + const undirected_graph_helper& g_) + { + typedef typename Config::graph_type Graph; + const Graph& g = static_cast(g_); + return out_degree(u, g); + } + + template + inline std::pair + in_edges(typename Config::vertex_descriptor u, + const undirected_graph_helper& g_) + { + typedef typename Config::graph_type Graph; + const Graph& cg = static_cast(g_); + Graph& g = const_cast(cg); + typedef typename Config::in_edge_iterator in_edge_iterator; + return + std::make_pair(in_edge_iterator(g.out_edge_list(u).begin(), u), + in_edge_iterator(g.out_edge_list(u).end(), u)); + } + + template + inline typename Config::degree_size_type + in_degree(typename Config::vertex_descriptor u, + const undirected_graph_helper& g_) + { return degree(u, g_); } + + //========================================================================= + // Bidirectional Graph Helper Class + + struct bidir_adj_list_traversal_tag : + public virtual vertex_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual edge_list_graph_tag, + public virtual bidirectional_graph_tag { }; + + template + struct bidirectional_graph_helper + : public directed_edges_helper { + typedef bidir_adj_list_traversal_tag traversal_category; + }; + + // Had to make these non-members to avoid accidental instantiation + // on SGI MIPSpro C++ + template + inline typename C::InEdgeList& + in_edge_list(bidirectional_graph_helper&, + typename C::vertex_descriptor v) + { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_in_edges; + } + template + inline const typename C::InEdgeList& + in_edge_list(const bidirectional_graph_helper&, + typename C::vertex_descriptor v) { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_in_edges; + } + + template + inline void + remove_edge_if(Predicate pred, bidirectional_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typename Config::edge_iterator ei, ei_end, next; + boost::tie(ei, ei_end) = edges(g); + for (next = ei; ei != ei_end; ei = next) { + ++next; + if (pred(*ei)) + remove_edge(*ei, g); + } + } + + template + inline std::pair + in_edges(typename Config::vertex_descriptor u, + const bidirectional_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& cg = static_cast(g_); + graph_type& g = const_cast(cg); + typedef typename Config::in_edge_iterator in_edge_iterator; + return + std::make_pair(in_edge_iterator(in_edge_list(g, u).begin(), u), + in_edge_iterator(in_edge_list(g, u).end(), u)); + } + + // O(1) + template + inline std::pair + edges(const bidirectional_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_iterator edge_iterator; + const graph_type& cg = static_cast(g_); + graph_type& g = const_cast(cg); + return std::make_pair( edge_iterator(g.m_edges.begin()), + edge_iterator(g.m_edges.end()) ); + } + + //========================================================================= + // Bidirectional Graph Helper Class (with edge properties) + + + template + struct bidirectional_graph_helper_with_property + : public bidirectional_graph_helper + { + typedef typename Config::graph_type graph_type; + typedef typename Config::out_edge_iterator out_edge_iterator; + + std::pair + get_parallel_edge_sublist(typename Config::edge_descriptor e, + const graph_type& g, + void*) + { return out_edges(source(e, g), g); } + + std::pair + get_parallel_edge_sublist(typename Config::edge_descriptor e, + const graph_type& g, + setS*) + { return edge_range(source(e, g), target(e, g), g); } + + std::pair + get_parallel_edge_sublist(typename Config::edge_descriptor e, + const graph_type& g, + multisetS*) + { return edge_range(source(e, g), target(e, g), g); } + + std::pair + get_parallel_edge_sublist(typename Config::edge_descriptor e, + const graph_type& g, + hash_setS*) + { return edge_range(source(e, g), target(e, g), g); } + + // Placement of these overloaded remove_edge() functions + // inside the class avoids a VC++ bug. + + // O(E/V) or O(log(E/V)) + void + remove_edge(typename Config::edge_descriptor e) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + graph_type& g = static_cast(*this); + + typedef typename Config::edgelist_selector OutEdgeListS; + + std::pair rng = + get_parallel_edge_sublist(e, g, (OutEdgeListS*)(0)); + rng.first = std::find(rng.first, rng.second, e); + assert(rng.first != rng.second); + remove_edge(rng.first); + } + + inline void + remove_edge(typename Config::out_edge_iterator iter) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(*this); + typename Config::edge_descriptor e = *iter; + typename Config::OutEdgeList& oel = g.out_edge_list(source(e, g)); + typename Config::InEdgeList& iel = in_edge_list(g, target(e, g)); + typedef typename Config::OutEdgeList::value_type::property_type PType; + PType& p = *(PType*)e.get_property(); + detail::remove_directed_edge_dispatch(*iter, iel, p); + g.m_edges.erase(iter.base()->get_iter()); + oel.erase(iter.base()); + } + }; + + // O(E/V) for allow_parallel_edge_tag + // O(log(E/V)) for disallow_parallel_edge_tag + template + inline void + remove_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typedef typename Config::edge_parallel_category Cat; + detail::remove_edge_and_property(g, g.out_edge_list(u), v, Cat()); + detail::erase_from_incidence_list(in_edge_list(g, v), u, Cat()); + } + + // O(E/V) or O(log(E/V)) + template + inline void + remove_edge(EdgeOrIter e, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + g_.remove_edge(e); + } + + template + inline void + remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::OutEdgeList::value_type::property_type PropT; + graph_type& g = static_cast(g_); + + typedef typename Config::EdgeIter EdgeIter; + typedef std::vector Garbage; + Garbage garbage; + + // First remove the edges from the targets' in-edge lists and + // from the graph's edge set list. + typename Config::out_edge_iterator out_i, out_end; + for (boost::tie(out_i, out_end) = out_edges(u, g); out_i != out_end; ++out_i) + if (pred(*out_i)) { + detail::remove_directed_edge_dispatch + (*out_i, in_edge_list(g, target(*out_i, g)), + *(PropT*)(*out_i).get_property()); + // Put in garbage to delete later. Will need the properties + // for the remove_if of the out-edges. + garbage.push_back((*out_i.base()).get_iter()); + } + + // Now remove the edges from this out-edge list. + typename Config::out_edge_iterator first, last; + boost::tie(first, last) = out_edges(u, g); + typedef typename Config::edge_parallel_category Cat; + detail::remove_directed_edge_if_dispatch + (first, last, g.out_edge_list(u), pred, Cat()); + + // Now delete the edge properties from the g.m_edges list + for (typename Garbage::iterator i = garbage.begin(); + i != garbage.end(); ++i) + g.m_edges.erase(*i); + } + template + inline void + remove_in_edge_if(typename Config::vertex_descriptor v, Predicate pred, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::OutEdgeList::value_type::property_type PropT; + graph_type& g = static_cast(g_); + + typedef typename Config::EdgeIter EdgeIter; + typedef std::vector Garbage; + Garbage garbage; + + // First remove the edges from the sources' out-edge lists and + // from the graph's edge set list. + typename Config::in_edge_iterator in_i, in_end; + for (boost::tie(in_i, in_end) = in_edges(v, g); in_i != in_end; ++in_i) + if (pred(*in_i)) { + typename Config::vertex_descriptor u = source(*in_i, g); + detail::remove_directed_edge_dispatch + (*in_i, g.out_edge_list(u), *(PropT*)(*in_i).get_property()); + // Put in garbage to delete later. Will need the properties + // for the remove_if of the out-edges. + garbage.push_back((*in_i.base()).get_iter()); + } + // Now remove the edges from this in-edge list. + typename Config::in_edge_iterator first, last; + boost::tie(first, last) = in_edges(v, g); + typedef typename Config::edge_parallel_category Cat; + detail::remove_directed_edge_if_dispatch + (first, last, in_edge_list(g, v), pred, Cat()); + + // Now delete the edge properties from the g.m_edges list + for (typename Garbage::iterator i = garbage.begin(); + i != garbage.end(); ++i) + g.m_edges.erase(*i); + } + + // O(1) + template + inline typename Config::edges_size_type + num_edges(const bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& g = static_cast(g_); + return g.m_edges.size(); + } + // O(E/V * E/V) for allow_parallel_edge_tag + // O(E/V * log(E/V)) for disallow_parallel_edge_tag + template + inline void + clear_vertex(typename Config::vertex_descriptor u, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::iterator + ei = el.begin(), ei_end = el.end(); + for (; ei != ei_end; ++ei) { + detail::erase_from_incidence_list + (in_edge_list(g, (*ei).get_target()), u, Cat()); + g.m_edges.erase((*ei).get_iter()); + } + typename Config::InEdgeList& in_el = in_edge_list(g, u); + typename Config::InEdgeList::iterator + in_ei = in_el.begin(), in_ei_end = in_el.end(); + for (; in_ei != in_ei_end; ++in_ei) { + detail::erase_from_incidence_list + (g.out_edge_list((*in_ei).get_target()), u, Cat()); + g.m_edges.erase((*in_ei).get_iter()); + } + g.out_edge_list(u).clear(); + in_edge_list(g, u).clear(); + } + + template + inline void + clear_out_edges(typename Config::vertex_descriptor u, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::iterator + ei = el.begin(), ei_end = el.end(); + for (; ei != ei_end; ++ei) { + detail::erase_from_incidence_list + (in_edge_list(g, (*ei).get_target()), u, Cat()); + g.m_edges.erase((*ei).get_iter()); + } + g.out_edge_list(u).clear(); + } + + template + inline void + clear_in_edges(typename Config::vertex_descriptor u, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::InEdgeList& in_el = in_edge_list(g, u); + typename Config::InEdgeList::iterator + in_ei = in_el.begin(), in_ei_end = in_el.end(); + for (; in_ei != in_ei_end; ++in_ei) { + detail::erase_from_incidence_list + (g.out_edge_list((*in_ei).get_target()), u, Cat()); + g.m_edges.erase((*in_ei).get_iter()); + } + in_edge_list(g, u).clear(); + } + + // O(1) for allow_parallel_edge_tag + // O(log(E/V)) for disallow_parallel_edge_tag + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::StoredEdge StoredEdge; + bool inserted; + typename Config::EdgeContainer::value_type e(u, v, p); + typename Config::EdgeContainer::iterator p_iter + = graph_detail::push(g.m_edges, e).first; + typename Config::OutEdgeList::iterator i; + boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), + StoredEdge(v, p_iter, &g.m_edges)); + if (inserted) { + boost::graph_detail::push(in_edge_list(g, v), StoredEdge(u, p_iter, &g.m_edges)); + return std::make_pair(edge_descriptor(u, v, &p_iter->m_property), + true); + } else { + g.m_edges.erase(p_iter); + return std::make_pair(edge_descriptor(u, v, + &i->get_iter()->get_property()), + false); + } + } + + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + bidirectional_graph_helper_with_property& g_) + { + typename Config::edge_property_type p; + return add_edge(u, v, p, g_); + } + // O(1) + template + inline typename Config::degree_size_type + degree(typename Config::vertex_descriptor u, + const bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& g = static_cast(g_); + return in_degree(u, g) + out_degree(u, g); + } + + //========================================================================= + // Adjacency List Helper Class + + template + struct adj_list_helper : public Base + { + typedef typename Config::graph_type AdjList; + typedef typename Config::vertex_descriptor vertex_descriptor; + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::out_edge_iterator out_edge_iterator; + typedef typename Config::in_edge_iterator in_edge_iterator; + typedef typename Config::adjacency_iterator adjacency_iterator; + typedef typename Config::inv_adjacency_iterator inv_adjacency_iterator; + typedef typename Config::vertex_iterator vertex_iterator; + typedef typename Config::edge_iterator edge_iterator; + typedef typename Config::directed_category directed_category; + typedef typename Config::edge_parallel_category edge_parallel_category; + typedef typename Config::vertices_size_type vertices_size_type; + typedef typename Config::edges_size_type edges_size_type; + typedef typename Config::degree_size_type degree_size_type; + typedef typename Config::StoredEdge StoredEdge; + typedef typename Config::edge_property_type edge_property_type; + + typedef typename Config::global_edgelist_selector + global_edgelist_selector; + }; + + template + inline std::pair + adjacent_vertices(typename Config::vertex_descriptor u, + const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& cg = static_cast(g_); + AdjList& g = const_cast(cg); + typedef typename Config::adjacency_iterator adjacency_iterator; + typename Config::out_edge_iterator first, last; + boost::tie(first, last) = out_edges(u, g); + return std::make_pair(adjacency_iterator(first, &g), + adjacency_iterator(last, &g)); + } + template + inline std::pair + inv_adjacent_vertices(typename Config::vertex_descriptor u, + const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& cg = static_cast(g_); + AdjList& g = const_cast(cg); + typedef typename Config::inv_adjacency_iterator inv_adjacency_iterator; + typename Config::in_edge_iterator first, last; + boost::tie(first, last) = in_edges(u, g); + return std::make_pair(inv_adjacency_iterator(first, &g), + inv_adjacency_iterator(last, &g)); + } + template + inline std::pair + out_edges(typename Config::vertex_descriptor u, + const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + typedef typename Config::out_edge_iterator out_edge_iterator; + const AdjList& cg = static_cast(g_); + AdjList& g = const_cast(cg); + return + std::make_pair(out_edge_iterator(g.out_edge_list(u).begin(), u), + out_edge_iterator(g.out_edge_list(u).end(), u)); + } + template + inline std::pair + vertices(const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& cg = static_cast(g_); + AdjList& g = const_cast(cg); + return std::make_pair( g.vertex_set().begin(), g.vertex_set().end() ); + } + template + inline typename Config::vertices_size_type + num_vertices(const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& g = static_cast(g_); + return g.vertex_set().size(); + } + template + inline typename Config::degree_size_type + out_degree(typename Config::vertex_descriptor u, + const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& g = static_cast(g_); + return g.out_edge_list(u).size(); + } + template + inline std::pair + edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const adj_list_helper& g_) + { + typedef typename Config::graph_type Graph; + typedef typename Config::StoredEdge StoredEdge; + const Graph& cg = static_cast(g_); + typedef typename Config::out_edge_iterator out_edge_iterator; + const typename Config::OutEdgeList& el = cg.out_edge_list(u); + typename Config::OutEdgeList::const_iterator it = graph_detail:: + find(el, StoredEdge(v)); + return std::make_pair( + typename Config::edge_descriptor + (u, v, (it == el.end() ? 0 : &(*it).get_property())), + (it != el.end())); + } + + template + inline std::pair + edge_range(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const adj_list_helper& g_) + { + typedef typename Config::graph_type Graph; + typedef typename Config::StoredEdge StoredEdge; + const Graph& cg = static_cast(g_); + Graph& g = const_cast(cg); + typedef typename Config::out_edge_iterator out_edge_iterator; + typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::iterator first, last; + typename Config::EdgeContainer fake_edge_container; + boost::tie(first, last) = graph_detail:: + equal_range(el, StoredEdge(v, fake_edge_container.end(), + &fake_edge_container)); + return std::make_pair(out_edge_iterator(first, u), + out_edge_iterator(last, u)); + } + + template + inline typename Config::degree_size_type + in_degree(typename Config::vertex_descriptor u, + const directed_edges_helper& g_) + { + typedef typename Config::graph_type Graph; + const Graph& cg = static_cast(g_); + Graph& g = const_cast(cg); + return in_edge_list(g, u).size(); + } + + namespace detail { + template + inline + typename boost::property_map::type + get_dispatch(adj_list_helper&, Property, + boost::edge_property_tag) { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::type PA; + return PA(); + } + template + inline + typename boost::property_map::const_type + get_dispatch(const adj_list_helper&, Property, + boost::edge_property_tag) { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::const_type PA; + return PA(); + } + + template + inline + typename boost::property_map::type + get_dispatch(adj_list_helper& g, Property, + boost::vertex_property_tag) { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::type PA; + return PA(&static_cast(g)); + } + template + inline + typename boost::property_map::const_type + get_dispatch(const adj_list_helper& g, Property, + boost::vertex_property_tag) { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::const_type PA; + const Graph& cg = static_cast(g); + return PA(&cg); + } + + } // namespace detail + + // Implementation of the PropertyGraph interface + template + inline + typename boost::property_map::type + get(Property p, adj_list_helper& g) { + typedef typename property_kind::type Kind; + return detail::get_dispatch(g, p, Kind()); + } + template + inline + typename boost::property_map::const_type + get(Property p, const adj_list_helper& g) { + typedef typename property_kind::type Kind; + return detail::get_dispatch(g, p, Kind()); + } + + template + inline + typename boost::property_traits< + typename boost::property_map::type + >::reference + get(Property p, adj_list_helper& g, const Key& key) { + return get(get(p, g), key); + } + + template + inline + typename boost::property_traits< + typename boost::property_map::const_type + >::reference + get(Property p, const adj_list_helper& g, const Key& key) { + return get(get(p, g), key); + } + + template + inline void + put(Property p, adj_list_helper& g, + const Key& key, const Value& value) + { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::type Map; + Map pmap = get(p, static_cast(g)); + put(pmap, key, value); + } + + + //========================================================================= + // Generalize Adjacency List Implementation + + struct adj_list_tag { }; + + template + class adj_list_impl + : public adj_list_helper + { + typedef typename Config::OutEdgeList OutEdgeList; + typedef typename Config::InEdgeList InEdgeList; + typedef typename Config::StoredVertexList StoredVertexList; + public: + typedef typename Config::stored_vertex stored_vertex; + typedef typename Config::EdgeContainer EdgeContainer; + typedef typename Config::vertex_descriptor vertex_descriptor; + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::vertex_iterator vertex_iterator; + typedef typename Config::edge_iterator edge_iterator; + typedef typename Config::edge_parallel_category edge_parallel_category; + typedef typename Config::vertices_size_type vertices_size_type; + typedef typename Config::edges_size_type edges_size_type; + typedef typename Config::degree_size_type degree_size_type; + typedef typename Config::edge_property_type edge_property_type; + typedef adj_list_tag graph_tag; + + static vertex_descriptor null_vertex() + { + return 0; + } + + inline adj_list_impl() { } + + inline adj_list_impl(const adj_list_impl& x) { + copy_impl(x); + } + inline adj_list_impl& operator=(const adj_list_impl& x) { + this->clear(); + copy_impl(x); + return *this; + } + inline void clear() { + for (typename StoredVertexList::iterator i = m_vertices.begin(); + i != m_vertices.end(); ++i) + delete (stored_vertex*)*i; + m_vertices.clear(); + m_edges.clear(); + } + inline adj_list_impl(vertices_size_type num_vertices) { + for (vertices_size_type i = 0; i < num_vertices; ++i) + add_vertex(static_cast(*this)); + } + template + inline adj_list_impl(vertices_size_type num_vertices, + EdgeIterator first, EdgeIterator last) + { + vertex_descriptor* v = new vertex_descriptor[num_vertices]; + for (vertices_size_type i = 0; i < num_vertices; ++i) + v[i] = add_vertex(static_cast(*this)); + + while (first != last) { + add_edge(v[(*first).first], v[(*first).second], *this); + ++first; + } + delete [] v; + } + template + inline adj_list_impl(vertices_size_type num_vertices, + EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter) + { + vertex_descriptor* v = new vertex_descriptor[num_vertices]; + for (vertices_size_type i = 0; i < num_vertices; ++i) + v[i] = add_vertex(static_cast(*this)); + + while (first != last) { + add_edge(v[(*first).first], v[(*first).second], *ep_iter, *this); + ++first; + ++ep_iter; + } + delete [] v; + } + ~adj_list_impl() { + for (typename StoredVertexList::iterator i = m_vertices.begin(); + i != m_vertices.end(); ++i) + delete (stored_vertex*)*i; + } + // protected: + inline OutEdgeList& out_edge_list(vertex_descriptor v) { + stored_vertex* sv = (stored_vertex*)v; + return sv->m_out_edges; + } + inline const OutEdgeList& out_edge_list(vertex_descriptor v) const { + stored_vertex* sv = (stored_vertex*)v; + return sv->m_out_edges; + } + inline StoredVertexList& vertex_set() { return m_vertices; } + inline const StoredVertexList& vertex_set() const { return m_vertices; } + + inline void copy_impl(const adj_list_impl& x_) + { + const Derived& x = static_cast(x_); + + // Would be better to have a constant time way to get from + // vertices in x to the corresponding vertices in *this. + std::map vertex_map; + + // Copy the stored vertex objects by adding each vertex + // and copying its property object. + vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(x); vi != vi_end; ++vi) { + stored_vertex* v = (stored_vertex*)add_vertex(*this); + v->m_property = ((stored_vertex*)*vi)->m_property; + vertex_map[(stored_vertex*)*vi] = v; + } + // Copy the edges by adding each edge and copying its + // property object. + edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = edges(x); ei != ei_end; ++ei) { + edge_descriptor e; + bool inserted; + vertex_descriptor s = source(*ei,x), t = target(*ei,x); + boost::tie(e, inserted) = add_edge(vertex_map[(stored_vertex*)s], + vertex_map[(stored_vertex*)t], *this); + *((edge_property_type*)e.m_eproperty) + = *((edge_property_type*)(*ei).m_eproperty); + } + } + + + typename Config::EdgeContainer m_edges; + StoredVertexList m_vertices; + }; + + // O(1) + template + inline typename Config::vertex_descriptor + add_vertex(adj_list_impl& g_) + { + Derived& g = static_cast(g_); + typedef typename Config::stored_vertex stored_vertex; + stored_vertex* v = new stored_vertex; + typename Config::StoredVertexList::iterator pos; + bool inserted; + boost::tie(pos,inserted) = boost::graph_detail::push(g.m_vertices, v); + v->m_position = pos; + g.added_vertex(v); + return v; + } + // O(1) + template + inline typename Config::vertex_descriptor + add_vertex(const typename Config::vertex_property_type& p, + adj_list_impl& g_) + { + typedef typename Config::vertex_descriptor vertex_descriptor; + Derived& g = static_cast(g_); + if (optional v + = g.vertex_by_property(get_property_value(p, vertex_bundle))) + return *v; + + typedef typename Config::stored_vertex stored_vertex; + stored_vertex* v = new stored_vertex(p); + typename Config::StoredVertexList::iterator pos; + bool inserted; + boost::tie(pos,inserted) = boost::graph_detail::push(g.m_vertices, v); + v->m_position = pos; + g.added_vertex(v); + return v; + } + // O(1) + template + inline void remove_vertex(typename Config::vertex_descriptor u, + adj_list_impl& g_) + { + typedef typename Config::stored_vertex stored_vertex; + Derived& g = static_cast(g_); + g.removing_vertex(u); + stored_vertex* su = (stored_vertex*)u; + g.m_vertices.erase(su->m_position); + delete su; + } + // O(V) + template + inline typename Config::vertex_descriptor + vertex(typename Config::vertices_size_type n, + const adj_list_impl& g_) + { + const Derived& g = static_cast(g_); + typename Config::vertex_iterator i = vertices(g).first; + while (n--) ++i; // std::advance(i, n); (not VC++ portable) + return *i; + } + + //========================================================================= + // Vector-Backbone Adjacency List Implementation + + namespace detail { + + template + inline void + remove_vertex_dispatch(Graph& g, vertex_descriptor u, + boost::directed_tag) + { + typedef typename Graph::edge_parallel_category edge_parallel_category; + g.m_vertices.erase(g.m_vertices.begin() + u); + vertex_descriptor V = num_vertices(g); + if (u != V) { + for (vertex_descriptor v = 0; v < V; ++v) + reindex_edge_list(g.out_edge_list(v), u, edge_parallel_category()); + } + } + + template + inline void + remove_vertex_dispatch(Graph& g, vertex_descriptor u, + boost::undirected_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Graph::edge_parallel_category edge_parallel_category; + g.m_vertices.erase(g.m_vertices.begin() + u); + vertex_descriptor V = num_vertices(g); + for (vertex_descriptor v = 0; v < V; ++v) + reindex_edge_list(g.out_edge_list(v), u, + edge_parallel_category()); + typedef typename Graph::EdgeContainer Container; + typedef typename Container::iterator Iter; + Iter ei = g.m_edges.begin(), ei_end = g.m_edges.end(); + for (; ei != ei_end; ++ei) { + if (ei->m_source > u) + --ei->m_source; + if (ei->m_target > u) + --ei->m_target; + } + } + template + inline void + remove_vertex_dispatch(Graph& g, vertex_descriptor u, + boost::bidirectional_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Graph::edge_parallel_category edge_parallel_category; + g.m_vertices.erase(g.m_vertices.begin() + u); + vertex_descriptor V = num_vertices(g); + vertex_descriptor v; + if (u != V) { + for (v = 0; v < V; ++v) + reindex_edge_list(g.out_edge_list(v), u, + edge_parallel_category()); + for (v = 0; v < V; ++v) + reindex_edge_list(in_edge_list(g, v), u, + edge_parallel_category()); + + typedef typename Graph::EdgeContainer Container; + typedef typename Container::iterator Iter; + Iter ei = g.m_edges.begin(), ei_end = g.m_edges.end(); + for (; ei != ei_end; ++ei) { + if (ei->m_source > u) + --ei->m_source; + if (ei->m_target > u) + --ei->m_target; + } + } + } + + template + inline void + reindex_edge_list(EdgeList& el, vertex_descriptor u, + boost::allow_parallel_edge_tag) + { + typename EdgeList::iterator ei = el.begin(), e_end = el.end(); + for (; ei != e_end; ++ei) + if ((*ei).get_target() > u) + --(*ei).get_target(); + } + template + inline void + reindex_edge_list(EdgeList& el, vertex_descriptor u, + boost::disallow_parallel_edge_tag) + { + typename EdgeList::iterator ei = el.begin(), e_end = el.end(); + while (ei != e_end) { + typename EdgeList::value_type ce = *ei; + ++ei; + if (ce.get_target() > u) { + el.erase(ce); + --ce.get_target(); + el.insert(ce); + } + } + } + } // namespace detail + + struct vec_adj_list_tag { }; + + template + class vec_adj_list_impl + : public adj_list_helper + { + typedef typename Config::OutEdgeList OutEdgeList; + typedef typename Config::InEdgeList InEdgeList; + typedef typename Config::StoredVertexList StoredVertexList; + public: + typedef typename Config::vertex_descriptor vertex_descriptor; + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::out_edge_iterator out_edge_iterator; + typedef typename Config::edge_iterator edge_iterator; + typedef typename Config::directed_category directed_category; + typedef typename Config::vertices_size_type vertices_size_type; + typedef typename Config::edges_size_type edges_size_type; + typedef typename Config::degree_size_type degree_size_type; + typedef typename Config::StoredEdge StoredEdge; + typedef typename Config::stored_vertex stored_vertex; + typedef typename Config::EdgeContainer EdgeContainer; + typedef typename Config::edge_property_type edge_property_type; + typedef vec_adj_list_tag graph_tag; + + static vertex_descriptor null_vertex() + { + return (std::numeric_limits::max)(); + } + + inline vec_adj_list_impl() { } + + inline vec_adj_list_impl(const vec_adj_list_impl& x) { + copy_impl(x); + } + inline vec_adj_list_impl& operator=(const vec_adj_list_impl& x) { + this->clear(); + copy_impl(x); + return *this; + } + inline void clear() { + m_vertices.clear(); + m_edges.clear(); + } + + inline vec_adj_list_impl(vertices_size_type _num_vertices) + : m_vertices(_num_vertices) { } + + template + inline vec_adj_list_impl(vertices_size_type num_vertices, + EdgeIterator first, EdgeIterator last) + : m_vertices(num_vertices) + { + while (first != last) { + add_edge((*first).first, (*first).second, + static_cast(*this)); + ++first; + } + } + template + inline vec_adj_list_impl(vertices_size_type num_vertices, + EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter) + : m_vertices(num_vertices) + { + while (first != last) { + add_edge((*first).first, (*first).second, *ep_iter, + static_cast(*this)); + ++first; + ++ep_iter; + } + } + + // protected: + inline boost::integer_range vertex_set() const { + return boost::integer_range(0, m_vertices.size()); + } + inline OutEdgeList& out_edge_list(vertex_descriptor v) { + return m_vertices[v].m_out_edges; + } + inline const OutEdgeList& out_edge_list(vertex_descriptor v) const { + return m_vertices[v].m_out_edges; + } + inline void copy_impl(const vec_adj_list_impl& x_) + { + const Graph& x = static_cast(x_); + // Copy the stored vertex objects by adding each vertex + // and copying its property object. + for (vertices_size_type i = 0; i < num_vertices(x); ++i) { + vertex_descriptor v = add_vertex(*this); + m_vertices[v].m_property = x.m_vertices[i].m_property; + } + // Copy the edges by adding each edge and copying its + // property object. + edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = edges(x); ei != ei_end; ++ei) { + edge_descriptor e; + bool inserted; + boost::tie(e, inserted) = add_edge(source(*ei,x), target(*ei,x) , *this); + *((edge_property_type*)e.m_eproperty) + = *((edge_property_type*)(*ei).m_eproperty); + } + } + typename Config::EdgeContainer m_edges; + StoredVertexList m_vertices; + }; + // Had to make these non-members to avoid accidental instantiation + // on SGI MIPSpro C++ + template + inline typename C::InEdgeList& + in_edge_list(vec_adj_list_impl& g, + typename C::vertex_descriptor v) { + return g.m_vertices[v].m_in_edges; + } + template + inline const typename C::InEdgeList& + in_edge_list(const vec_adj_list_impl& g, + typename C::vertex_descriptor v) { + return g.m_vertices[v].m_in_edges; + } + + // O(1) + template + inline typename Config::vertex_descriptor + add_vertex(vec_adj_list_impl& g_) { + Graph& g = static_cast(g_); + g.m_vertices.resize(g.m_vertices.size() + 1); + g.added_vertex(g.m_vertices.size() - 1); + return g.m_vertices.size() - 1; + } + + template + inline typename Config::vertex_descriptor + add_vertex(const typename Config::vertex_property_type& p, + vec_adj_list_impl& g_) { + typedef typename Config::vertex_descriptor vertex_descriptor; + Graph& g = static_cast(g_); + if (optional v + = g.vertex_by_property(get_property_value(p, vertex_bundle))) + return *v; + typedef typename Config::stored_vertex stored_vertex; + g.m_vertices.push_back(stored_vertex(p)); + g.added_vertex(g.m_vertices.size() - 1); + return g.m_vertices.size() - 1; + } + + // Here we override the directed_graph_helper add_edge() function + // so that the number of vertices is automatically changed if + // either u or v is greater than the number of vertices. + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + vec_adj_list_impl& g_) + { + BOOST_USING_STD_MAX(); + typename Config::vertex_descriptor x = max BOOST_PREVENT_MACRO_SUBSTITUTION(u, v); + if (x >= num_vertices(g_)) + g_.m_vertices.resize(x + 1); + adj_list_helper& g = g_; + return add_edge(u, v, p, g); + } + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + vec_adj_list_impl& g_) + { + typename Config::edge_property_type p; + return add_edge(u, v, p, g_); + } + + + // O(V + E) + template + inline void remove_vertex(typename Config::vertex_descriptor v, + vec_adj_list_impl& g_) + { + typedef typename Config::directed_category Cat; + Graph& g = static_cast(g_); + g.removing_vertex(v); + detail::remove_vertex_dispatch(g, v, Cat()); + } + // O(1) + template + inline typename Config::vertex_descriptor + vertex(typename Config::vertices_size_type n, + const vec_adj_list_impl&) + { + return n; + } + + + namespace detail { + + //========================================================================= + // Adjacency List Generator + + template + struct adj_list_gen + { + typedef typename detail::is_random_access::type + is_rand_access; + typedef typename has_property::type has_edge_property; + typedef typename DirectedS::is_directed_t DirectedT; + typedef typename DirectedS::is_bidir_t BidirectionalT; + + struct config + { + typedef OutEdgeListS edgelist_selector; + typedef EdgeListS global_edgelist_selector; + + typedef Graph graph_type; + typedef EdgeProperty edge_property_type; + typedef VertexProperty vertex_property_type; + typedef GraphProperty graph_property_type; + typedef std::size_t vertices_size_type; + + typedef adjacency_list_traits + Traits; + + typedef typename Traits::directed_category directed_category; + typedef typename Traits::edge_parallel_category edge_parallel_category; + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::edge_descriptor edge_descriptor; + + typedef void* vertex_ptr; + + // need to reorganize this to avoid instantiating stuff + // that doesn't get used -JGS + + // VertexList and vertex_iterator + typedef typename container_gen::type SeqVertexList; + typedef boost::integer_range RandVertexList; + typedef typename mpl::if_::type VertexList; + + typedef typename VertexList::iterator vertex_iterator; + + // EdgeContainer and StoredEdge + + typedef typename container_gen >::type EdgeContainer; + + typedef typename mpl::and_::type >::type on_edge_storage; + + typedef typename mpl::if_::type edges_size_type; + + typedef typename EdgeContainer::iterator EdgeIter; + + typedef typename detail::is_random_access::type is_edge_ra; + + typedef typename mpl::if_, + typename mpl::if_, + stored_edge_iter + >::type + >::type StoredEdge; + + // Adjacency Types + + typedef typename container_gen::type + OutEdgeList; + typedef typename OutEdgeList::size_type degree_size_type; + typedef typename OutEdgeList::iterator OutEdgeIter; + + typedef boost::detail::iterator_traits OutEdgeIterTraits; + typedef typename OutEdgeIterTraits::iterator_category OutEdgeIterCat; + typedef typename OutEdgeIterTraits::difference_type OutEdgeIterDiff; + + typedef out_edge_iter< + OutEdgeIter, vertex_descriptor, edge_descriptor, OutEdgeIterDiff + > out_edge_iterator; + + typedef typename adjacency_iterator_generator::type adjacency_iterator; + + typedef OutEdgeList InEdgeList; + typedef OutEdgeIter InEdgeIter; + typedef OutEdgeIterCat InEdgeIterCat; + typedef OutEdgeIterDiff InEdgeIterDiff; + + typedef in_edge_iter< + InEdgeIter, vertex_descriptor, edge_descriptor, InEdgeIterDiff + > in_edge_iterator; + + typedef typename inv_adjacency_iterator_generator::type inv_adjacency_iterator; + + // Edge Iterator + + typedef boost::detail::iterator_traits EdgeIterTraits; + typedef typename EdgeIterTraits::iterator_category EdgeIterCat; + typedef typename EdgeIterTraits::difference_type EdgeIterDiff; + + typedef undirected_edge_iter< + EdgeIter + , edge_descriptor + , EdgeIterDiff + > UndirectedEdgeIter; // also used for bidirectional + + typedef adj_list_edge_iterator DirectedEdgeIter; + + typedef typename mpl::if_::type edge_iterator; + + // stored_vertex and StoredVertexList + typedef typename container_gen::type + SeqStoredVertexList; + struct seq_stored_vertex { + seq_stored_vertex() { } + seq_stored_vertex(const VertexProperty& p) : m_property(p) { } + OutEdgeList m_out_edges; + VertexProperty m_property; + typename SeqStoredVertexList::iterator m_position; + }; + struct bidir_seq_stored_vertex { + bidir_seq_stored_vertex() { } + bidir_seq_stored_vertex(const VertexProperty& p) : m_property(p) { } + OutEdgeList m_out_edges; + InEdgeList m_in_edges; + VertexProperty m_property; + typename SeqStoredVertexList::iterator m_position; + }; + struct rand_stored_vertex { + rand_stored_vertex() { } + rand_stored_vertex(const VertexProperty& p) : m_property(p) { } + OutEdgeList m_out_edges; + VertexProperty m_property; + }; + struct bidir_rand_stored_vertex { + bidir_rand_stored_vertex() { } + bidir_rand_stored_vertex(const VertexProperty& p) : m_property(p) { } + OutEdgeList m_out_edges; + InEdgeList m_in_edges; + VertexProperty m_property; + }; + typedef typename mpl::if_::type, + typename mpl::if_::type + >::type StoredVertex; + struct stored_vertex : public StoredVertex { + stored_vertex() { } + stored_vertex(const VertexProperty& p) : StoredVertex(p) { } + }; + + typedef typename container_gen::type + RandStoredVertexList; + typedef typename mpl::if_< is_rand_access, + RandStoredVertexList, SeqStoredVertexList>::type StoredVertexList; + }; // end of config + + + typedef typename mpl::if_, + typename mpl::if_, + undirected_graph_helper + >::type + >::type DirectedHelper; + + typedef typename mpl::if_, + adj_list_impl + >::type type; + + }; + + } // namespace detail + + //========================================================================= + // Vertex Property Maps + + template + struct adj_list_vertex_property_map + : public boost::put_get_helper< + Reference, + adj_list_vertex_property_map + > + { + typedef typename Graph::stored_vertex StoredVertex; + typedef ValueType value_type; + typedef Reference reference; + typedef typename Graph::vertex_descriptor key_type; + typedef boost::lvalue_property_map_tag category; + inline adj_list_vertex_property_map() { } + inline adj_list_vertex_property_map(const Graph*) { } + inline Reference operator[](key_type v) const { + StoredVertex* sv = (StoredVertex*)v; + return get_property_value(sv->m_property, Tag()); + } + inline Reference operator()(key_type v) const { + return this->operator[](v); + } + }; + + template + struct adj_list_vertex_all_properties_map + : public boost::put_get_helper + > + { + typedef typename Graph::stored_vertex StoredVertex; + typedef Property value_type; + typedef PropRef reference; + typedef typename Graph::vertex_descriptor key_type; + typedef boost::lvalue_property_map_tag category; + inline adj_list_vertex_all_properties_map() { } + inline adj_list_vertex_all_properties_map(const Graph*) { } + inline PropRef operator[](key_type v) const { + StoredVertex* sv = (StoredVertex*)v; + return sv->m_property; + } + inline PropRef operator()(key_type v) const { + return this->operator[](v); + } + }; + + template + struct vec_adj_list_vertex_property_map + : public boost::put_get_helper< + Reference, + vec_adj_list_vertex_property_map + > + { + typedef ValueType value_type; + typedef Reference reference; + typedef typename boost::graph_traits::vertex_descriptor key_type; + typedef boost::lvalue_property_map_tag category; + vec_adj_list_vertex_property_map() { } + vec_adj_list_vertex_property_map(GraphPtr g) : m_g(g) { } + inline Reference operator[](key_type v) const { + return get_property_value(m_g->m_vertices[v].m_property, Tag()); + } + inline Reference operator()(key_type v) const { + return this->operator[](v); + } + GraphPtr m_g; + }; + + template + struct vec_adj_list_vertex_all_properties_map + : public boost::put_get_helper + > + { + typedef Property value_type; + typedef PropertyRef reference; + typedef typename boost::graph_traits::vertex_descriptor key_type; + typedef boost::lvalue_property_map_tag category; + vec_adj_list_vertex_all_properties_map() { } + vec_adj_list_vertex_all_properties_map(GraphPtr g) : m_g(g) { } + inline PropertyRef operator[](key_type v) const { + return m_g->m_vertices[v].m_property; + } + inline PropertyRef operator()(key_type v) const { + return this->operator[](v); + } + GraphPtr m_g; + }; + + struct adj_list_any_vertex_pa { + template + struct bind_ { + typedef typename property_value::type value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + typedef adj_list_vertex_property_map + type; + typedef adj_list_vertex_property_map + const_type; + }; + }; + struct adj_list_all_vertex_pa { + template + struct bind_ { + typedef typename Graph::vertex_descriptor Vertex; + typedef adj_list_vertex_all_properties_map type; + typedef adj_list_vertex_all_properties_map const_type; + }; + }; + + template + struct vec_adj_list_vertex_id_map + : public boost::put_get_helper< + Vertex, vec_adj_list_vertex_id_map + > + { + typedef Vertex value_type; + typedef Vertex key_type; + typedef Vertex reference; + typedef boost::readable_property_map_tag category; + inline vec_adj_list_vertex_id_map() { } + template + inline vec_adj_list_vertex_id_map(const Graph&) { } + inline value_type operator[](key_type v) const { return v; } + inline value_type operator()(key_type v) const { return v; } + }; + + struct vec_adj_list_any_vertex_pa { + template + struct bind_ { + typedef typename property_value::type value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + typedef vec_adj_list_vertex_property_map + type; + typedef vec_adj_list_vertex_property_map + const_type; + }; + }; + struct vec_adj_list_id_vertex_pa { + template + struct bind_ { + typedef typename Graph::vertex_descriptor Vertex; + typedef vec_adj_list_vertex_id_map type; + typedef vec_adj_list_vertex_id_map const_type; + }; + }; + struct vec_adj_list_all_vertex_pa { + template + struct bind_ { + typedef typename Graph::vertex_descriptor Vertex; + typedef vec_adj_list_vertex_all_properties_map + type; + typedef vec_adj_list_vertex_all_properties_map + const_type; + }; + }; + namespace detail { + template + struct adj_list_choose_vertex_pa_helper { + typedef adj_list_any_vertex_pa type; + }; + template <> + struct adj_list_choose_vertex_pa_helper { + typedef adj_list_all_vertex_pa type; + }; + template + struct adj_list_choose_vertex_pa { + typedef typename adj_list_choose_vertex_pa_helper::type Helper; + typedef typename Helper::template bind_ Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + + + template + struct vec_adj_list_choose_vertex_pa_helper { + typedef vec_adj_list_any_vertex_pa type; + }; + template <> + struct vec_adj_list_choose_vertex_pa_helper { + typedef vec_adj_list_id_vertex_pa type; + }; + template <> + struct vec_adj_list_choose_vertex_pa_helper { + typedef vec_adj_list_all_vertex_pa type; + }; + template + struct vec_adj_list_choose_vertex_pa { + typedef typename vec_adj_list_choose_vertex_pa_helper::type Helper; + typedef typename Helper::template bind_ Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + } // namespace detail + + //========================================================================= + // Edge Property Map + + template + struct adj_list_edge_property_map + : public put_get_helper< + Ref, + adj_list_edge_property_map + > + { + typedef Value value_type; + typedef Ref reference; + typedef detail::edge_desc_impl key_type; + typedef boost::lvalue_property_map_tag category; + inline Ref operator[](key_type e) const { + Property& p = *(Property*)e.get_property(); + return get_property_value(p, Tag()); + } + inline Ref operator()(key_type e) const { + return this->operator[](e); + } + }; + + template + struct adj_list_edge_all_properties_map + : public put_get_helper + > + { + typedef Property value_type; + typedef PropRef reference; + typedef detail::edge_desc_impl key_type; + typedef boost::lvalue_property_map_tag category; + inline PropRef operator[](key_type e) const { + return *(PropPtr)e.get_property(); + } + inline PropRef operator()(key_type e) const { + return this->operator[](e); + } + }; + + // Edge Property Maps + + namespace detail { + struct adj_list_any_edge_pmap { + template + struct bind_ { + typedef typename property_value::type value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + typedef adj_list_edge_property_map + type; + typedef adj_list_edge_property_map + const_type; + }; + }; + struct adj_list_all_edge_pmap { + template + struct bind_ { + typedef adj_list_edge_all_properties_map + type; + typedef adj_list_edge_all_properties_map + const_type; + }; + }; + + template + struct adj_list_choose_edge_pmap_helper { + typedef adj_list_any_edge_pmap type; + }; + template <> + struct adj_list_choose_edge_pmap_helper { + typedef adj_list_all_edge_pmap type; + }; + template + struct adj_list_choose_edge_pmap { + typedef typename adj_list_choose_edge_pmap_helper::type Helper; + typedef typename Helper::template bind_ Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + struct adj_list_edge_property_selector { + template + struct bind_ { + typedef adj_list_choose_edge_pmap Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + }; + } // namespace detail + + template <> + struct edge_property_selector { + typedef detail::adj_list_edge_property_selector type; + }; + template <> + struct edge_property_selector { + typedef detail::adj_list_edge_property_selector type; + }; + + // Vertex Property Maps + + struct adj_list_vertex_property_selector { + template + struct bind_ { + typedef detail::adj_list_choose_vertex_pa Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + }; + template <> + struct vertex_property_selector { + typedef adj_list_vertex_property_selector type; + }; + + struct vec_adj_list_vertex_property_selector { + template + struct bind_ { + typedef detail::vec_adj_list_choose_vertex_pa Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + }; + template <> + struct vertex_property_selector { + typedef vec_adj_list_vertex_property_selector type; + }; + +} // namespace boost + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +namespace boost { + + #if BOOST_WORKAROUND( _STLPORT_VERSION, >= 0x500 ) + // STLport 5 already defines a hash specialization. + #else + template <> + struct hash< void* > // Need this when vertex_descriptor=void* + { + std::size_t + operator()(void* v) const { return (std::size_t)v; } + }; + #endif + + template + struct hash< boost::detail::stored_edge > + { + std::size_t + operator()(const boost::detail::stored_edge& e) const + { + return hash()(e.m_target); + } + }; + + template + struct hash< boost::detail::stored_edge_property > + { + std::size_t + operator()(const boost::detail::stored_edge_property& e) const + { + return hash()(e.m_target); + } + }; + + template + struct hash< boost::detail::stored_edge_iter > + { + std::size_t + operator()(const boost::detail::stored_edge_iter& e) const + { + return hash()(e.m_target); + } + }; + +} +#endif + + +#undef stored_edge +#undef stored_edge_property +#undef stored_edge_iter + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// Stay out of the way of the concept checking class +#undef Graph +#endif + +#endif // BOOST_GRAPH_DETAIL_DETAIL_ADJACENCY_LIST_CCT + +/* + Implementation Notes: + + Many of the public interface functions in this file would have been + more conveniently implemented as inline friend functions. + However there are a few compiler bugs that make that approach + non-portable. + + 1. g++ inline friend in namespace bug + 2. g++ using clause doesn't work with inline friends + 3. VC++ doesn't have Koenig lookup + + For these reasons, the functions were all written as non-inline free + functions, and static cast was used to convert from the helper + class to the adjacency_list derived class. + + Looking back, it might have been better to write out all functions + in terms of the adjacency_list, and then use a tag to dispatch + to the various helpers instead of using inheritance. + + */ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/array_binary_tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/array_binary_tree.hpp new file mode 100644 index 0000000000..78755556c8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/array_binary_tree.hpp @@ -0,0 +1,181 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_ARRAY_BINARY_TREE_HPP +#define BOOST_ARRAY_BINARY_TREE_HPP + +#include +#include +#include + +namespace boost { + +/* + * Note: array_binary_tree is a completey balanced binary tree. + */ +#if !defined BOOST_NO_STD_ITERATOR_TRAITS + template +#else + template +#endif +class array_binary_tree_node { +public: + typedef array_binary_tree_node ArrayBinaryTreeNode; + typedef RandomAccessIterator rep_iterator; +#if !defined BOOST_NO_STD_ITERATOR_TRAITS + typedef typename std::iterator_traits::difference_type + difference_type; + typedef typename std::iterator_traits::value_type + value_type; +#else + typedef int difference_type; + typedef ValueType value_type; +#endif + typedef difference_type size_type; + + struct children_type { + struct iterator + : boost::iterator + { // replace with iterator_adaptor implementation -JGS + + inline iterator() : i(0), n(0) { } + inline iterator(const iterator& x) : r(x.r), i(x.i), n(x.n), id(x.id) { } + inline iterator& operator=(const iterator& x) { + r = x.r; i = x.i; n = x.n; + /*egcs generate a warning*/ + id = x.id; + return *this; + } + inline iterator(rep_iterator rr, + size_type ii, + size_type nn, + const ID& _id) : r(rr), i(ii), n(nn), id(_id) { } + inline array_binary_tree_node operator*() { + return ArrayBinaryTreeNode(r, i, n, id); } + inline iterator& operator++() { ++i; return *this; } + inline iterator operator++(int) + { iterator t = *this; ++(*this); return t; } + inline bool operator==(const iterator& x) const { return i == x.i; } + inline bool operator!=(const iterator& x) const + { return !(*this == x); } + rep_iterator r; + size_type i; + size_type n; + ID id; + }; + inline children_type() : i(0), n(0) { } + inline children_type(const children_type& x) + : r(x.r), i(x.i), n(x.n), id(x.id) { } + inline children_type& operator=(const children_type& x) { + r = x.r; i = x.i; n = x.n; + /*egcs generate a warning*/ + id = x.id; + return *this; + } + inline children_type(rep_iterator rr, + size_type ii, + size_type nn, + const ID& _id) : r(rr), i(ii), n(nn), id(_id) { } + inline iterator begin() { return iterator(r, 2 * i + 1, n, id); } + inline iterator end() { return iterator(r, 2 * i + 1 + size(), n, id); } + inline size_type size() const { + size_type c = 2 * i + 1; + size_type s; + if (c + 1 < n) s = 2; + else if (c < n) s = 1; + else s = 0; + return s; + } + rep_iterator r; + size_type i; + size_type n; + ID id; + }; + inline array_binary_tree_node() : i(0), n(0) { } + inline array_binary_tree_node(const array_binary_tree_node& x) + : r(x.r), i(x.i), n(x.n), id(x.id) { } + inline ArrayBinaryTreeNode& operator=(const ArrayBinaryTreeNode& x) { + r = x.r; + i = x.i; + n = x.n; + /*egcs generate a warning*/ + id = x.id; + return *this; + } + inline array_binary_tree_node(rep_iterator start, + rep_iterator end, + rep_iterator pos, const ID& _id) + : r(start), i(pos - start), n(end - start), id(_id) { } + inline array_binary_tree_node(rep_iterator rr, + size_type ii, + size_type nn, const ID& _id) + : r(rr), i(ii), n(nn), id(_id) { } + inline value_type& value() { return *(r + i); } + inline const value_type& value() const { return *(r + i); } + inline ArrayBinaryTreeNode parent() const { + return ArrayBinaryTreeNode(r, (i - 1) / 2, n, id); + } + inline bool has_parent() const { return i != 0; } + inline children_type children() { return children_type(r, i, n, id); } + /* + inline void swap(array_binary_tree_node x) { + value_type tmp = x.value(); + x.value() = value(); + value() = tmp; + i = x.i; + } + */ + template + inline void swap(ArrayBinaryTreeNode x, ExternalData& edata ) { + using boost::get; + + value_type tmp = x.value(); + + /*swap external data*/ + edata[ get(id, tmp) ] = i; + edata[ get(id, value()) ] = x.i; + + x.value() = value(); + value() = tmp; + i = x.i; + } + inline const children_type children() const { + return children_type(r, i, n); + } + inline size_type index() const { return i; } + rep_iterator r; + size_type i; + size_type n; + ID id; +}; + +template > +struct compare_array_node { + typedef typename RandomAccessContainer::value_type value_type; + compare_array_node(const Compare& x) : comp(x) {} + compare_array_node(const compare_array_node& x) : comp(x.comp) {} + + template< class node_type > + inline bool operator()(const node_type& x, const node_type& y) { + return comp(x.value(), y.value()); + } + + template< class node_type > + inline bool operator()(const node_type& x, const node_type& y) const { + return comp(x.value(), y.value()); + } + Compare comp; +}; + +} // namespace boost + +#endif /* BOOST_ARRAY_BINARY_TREE_HPP */ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/compressed_sparse_row_struct.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/compressed_sparse_row_struct.hpp new file mode 100644 index 0000000000..4fb3c2269b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/compressed_sparse_row_struct.hpp @@ -0,0 +1,652 @@ +// Copyright 2005-2009 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Douglas Gregor +// Andrew Lumsdaine + +// Compressed sparse row graph type internal structure + +#ifndef BOOST_GRAPH_COMPRESSED_SPARSE_ROW_STRUCT_HPP +#define BOOST_GRAPH_COMPRESSED_SPARSE_ROW_STRUCT_HPP + +#ifndef BOOST_GRAPH_COMPRESSED_SPARSE_ROW_GRAPH_HPP +#error This file should only be included from boost/graph/compressed_sparse_row_graph.hpp +#endif + +#include +#include +#include +#include +#include +#include +#if 0 +#include // For some debugging code below +#endif +#include +#include +#include // For keep_all +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace detail { + // Forward declaration of CSR edge descriptor type, needed to pass to + // indexed_edge_properties. + template + class csr_edge_descriptor; + + // Add edge_index property map + template + struct csr_edge_index_map + { + typedef EdgeIndex value_type; + typedef EdgeIndex reference; + typedef csr_edge_descriptor key_type; + typedef readable_property_map_tag category; + }; + + template + inline EdgeIndex + get(const csr_edge_index_map&, + const csr_edge_descriptor& key) + { + return key.idx; + } + + /** Compressed sparse row graph internal structure. + * + * Vertex and EdgeIndex should be unsigned integral types and should + * specialize numeric_limits. + */ + template + class compressed_sparse_row_structure : + public detail::indexed_edge_properties< + compressed_sparse_row_structure, + EdgeProperty, + csr_edge_descriptor, + csr_edge_index_map > { + public: + typedef detail::indexed_edge_properties< + compressed_sparse_row_structure, + EdgeProperty, + csr_edge_descriptor, + csr_edge_index_map > + inherited_edge_properties; + + typedef Vertex vertices_size_type; + typedef Vertex vertex_descriptor; + typedef EdgeIndex edges_size_type; + + static vertex_descriptor null_vertex() { return vertex_descriptor(-1); } + + std::vector m_rowstart; + std::vector m_column; + + compressed_sparse_row_structure(Vertex numverts = 0) + : m_rowstart(numverts + 1, EdgeIndex(0)), m_column() + {} + + // Rebuild graph from number of vertices and multi-pass unsorted list of + // edges (filtered using source_pred and mapped using global_to_local) + template + void + assign_unsorted_multi_pass_edges(MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numlocalverts, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred) { + m_rowstart.clear(); + m_rowstart.resize(numlocalverts + 1, 0); + typedef std::pair edge_type; + typedef boost::transform_iterator, MultiPassInputIterator> source_iterator; + typedef boost::transform_iterator, MultiPassInputIterator> target_iterator; + source_iterator sources_begin(edge_begin, boost::graph::detail::project1st()); + source_iterator sources_end(edge_end, boost::graph::detail::project1st()); + target_iterator targets_begin(edge_begin, boost::graph::detail::project2nd()); + target_iterator targets_end(edge_end, boost::graph::detail::project2nd()); + + boost::graph::detail::count_starts + (sources_begin, sources_end, m_rowstart.begin(), numlocalverts, + source_pred, boost::make_property_map_function(global_to_local)); + + m_column.resize(m_rowstart.back()); + inherited_edge_properties::resize(m_rowstart.back()); + + boost::graph::detail::histogram_sort + (sources_begin, sources_end, m_rowstart.begin(), numlocalverts, + targets_begin, m_column.begin(), + source_pred, boost::make_property_map_function(global_to_local)); + } + + // Rebuild graph from number of vertices and multi-pass unsorted list of + // edges and their properties (filtered using source_pred and mapped using + // global_to_local) + template + void + assign_unsorted_multi_pass_edges(MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numlocalverts, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred) { + m_rowstart.clear(); + m_rowstart.resize(numlocalverts + 1, 0); + typedef std::pair edge_type; + typedef boost::transform_iterator, MultiPassInputIterator> source_iterator; + typedef boost::transform_iterator, MultiPassInputIterator> target_iterator; + source_iterator sources_begin(edge_begin, boost::graph::detail::project1st()); + source_iterator sources_end(edge_end, boost::graph::detail::project1st()); + target_iterator targets_begin(edge_begin, boost::graph::detail::project2nd()); + target_iterator targets_end(edge_end, boost::graph::detail::project2nd()); + + boost::graph::detail::count_starts + (sources_begin, sources_end, m_rowstart.begin(), numlocalverts, + source_pred, boost::make_property_map_function(global_to_local)); + + m_column.resize(m_rowstart.back()); + inherited_edge_properties::resize(m_rowstart.back()); + + boost::graph::detail::histogram_sort + (sources_begin, sources_end, m_rowstart.begin(), numlocalverts, + targets_begin, m_column.begin(), + ep_iter, inherited_edge_properties::begin(), + source_pred, boost::make_property_map_function(global_to_local)); + } + + // Assign from number of vertices and sorted list of edges + template + void assign_from_sorted_edges( + InputIterator edge_begin, InputIterator edge_end, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred, + vertices_size_type numlocalverts, + edges_size_type numedges_or_zero) { + m_column.clear(); + m_column.reserve(numedges_or_zero); + m_rowstart.resize(numlocalverts + 1); + EdgeIndex current_edge = 0; + Vertex current_vertex_plus_one = 1; + m_rowstart[0] = 0; + for (InputIterator ei = edge_begin; ei != edge_end; ++ei) { + if (!source_pred(ei->first)) continue; + Vertex src = get(global_to_local, ei->first); + Vertex tgt = ei->second; + for (; current_vertex_plus_one != src + 1; ++current_vertex_plus_one) + m_rowstart[current_vertex_plus_one] = current_edge; + m_column.push_back(tgt); + ++current_edge; + } + + // The remaining vertices have no edges + for (; current_vertex_plus_one != numlocalverts + 1; ++current_vertex_plus_one) + m_rowstart[current_vertex_plus_one] = current_edge; + + // Default-construct properties for edges + inherited_edge_properties::resize(m_column.size()); + } + + // Assign from number of vertices and sorted list of edges + template + void assign_from_sorted_edges( + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + const GlobalToLocal& global_to_local, + const SourcePred& source_pred, + vertices_size_type numlocalverts, + edges_size_type numedges_or_zero) { + // Reserving storage in advance can save us lots of time and + // memory, but it can only be done if we have forward iterators or + // the user has supplied the number of edges. + edges_size_type numedges = numedges_or_zero; + if (numedges == 0) { + typedef typename std::iterator_traits::iterator_category + category; + numedges = boost::graph::detail::reserve_count_for_single_pass(edge_begin, edge_end); + } + m_column.clear(); + m_column.reserve(numedges_or_zero); + inherited_edge_properties::clear(); + inherited_edge_properties::reserve(numedges_or_zero); + m_rowstart.resize(numlocalverts + 1); + EdgeIndex current_edge = 0; + Vertex current_vertex_plus_one = 1; + m_rowstart[0] = 0; + for (InputIterator ei = edge_begin; ei != edge_end; ++ei, ++ep_iter) { + if (!source_pred(ei->first)) continue; + Vertex src = get(global_to_local, ei->first); + Vertex tgt = ei->second; + for (; current_vertex_plus_one != src + 1; ++current_vertex_plus_one) + m_rowstart[current_vertex_plus_one] = current_edge; + m_column.push_back(tgt); + inherited_edge_properties::push_back(*ep_iter); + ++current_edge; + } + + // The remaining vertices have no edges + for (; current_vertex_plus_one != numlocalverts + 1; ++current_vertex_plus_one) + m_rowstart[current_vertex_plus_one] = current_edge; + } + + // Replace graph with sources and targets given, sorting them in-place, and + // using the given global-to-local property map to get local indices from + // global ones in the two arrays. + template + void assign_sources_and_targets_global(std::vector& sources, + std::vector& targets, + vertices_size_type numverts, + GlobalToLocal global_to_local) { + assert (sources.size() == targets.size()); + // Do an in-place histogram sort (at least that's what I think it is) to + // sort sources and targets + m_rowstart.clear(); + m_rowstart.resize(numverts + 1); + boost::graph::detail::count_starts + (sources.begin(), sources.end(), m_rowstart.begin(), numverts, + keep_all(), boost::make_property_map_function(global_to_local)); + boost::graph::detail::histogram_sort_inplace + (sources.begin(), m_rowstart.begin(), numverts, + targets.begin(), boost::make_property_map_function(global_to_local)); + // Now targets is the correct vector (properly sorted by source) for + // m_column + m_column.swap(targets); + inherited_edge_properties::resize(m_rowstart.back()); + } + + // Replace graph with sources and targets and edge properties given, sorting + // them in-place, and using the given global-to-local property map to get + // local indices from global ones in the two arrays. + template + void assign_sources_and_targets_global(std::vector& sources, + std::vector& targets, + std::vector& edge_props, + vertices_size_type numverts, + GlobalToLocal global_to_local) { + assert (sources.size() == targets.size()); + assert (sources.size() == edge_props.size()); + // Do an in-place histogram sort (at least that's what I think it is) to + // sort sources and targets + m_rowstart.clear(); + m_rowstart.resize(numverts + 1); + boost::graph::detail::count_starts + (sources.begin(), sources.end(), m_rowstart.begin(), numverts, + keep_all(), boost::make_property_map_function(global_to_local)); + boost::graph::detail::histogram_sort_inplace + (sources.begin(), m_rowstart.begin(), numverts, + targets.begin(), edge_props.begin(), + boost::make_property_map_function(global_to_local)); + // Now targets is the correct vector (properly sorted by source) for + // m_column, and edge_props for m_edge_properties + m_column.swap(targets); + this->m_edge_properties.swap(edge_props); + } + + // From any graph (slow and uses a lot of memory) + // Requires IncidenceGraph and a vertex index map + // Internal helper function + // Note that numedges must be doubled for undirected source graphs + template + void + assign(const Graph& g, const VertexIndexMap& vi, + vertices_size_type numverts, edges_size_type numedges) + { + m_rowstart.resize(numverts + 1); + m_column.resize(numedges); + inherited_edge_properties::resize(numedges); + EdgeIndex current_edge = 0; + typedef typename boost::graph_traits::vertex_descriptor g_vertex; + typedef typename boost::graph_traits::edge_descriptor g_edge; + typedef typename boost::graph_traits::out_edge_iterator + g_out_edge_iter; + + std::vector ordered_verts_of_g(numverts); + BGL_FORALL_VERTICES_T(v, g, Graph) { + ordered_verts_of_g[get(vertex_index, g, v)] = v; + } + for (Vertex i = 0; i != numverts; ++i) { + m_rowstart[i] = current_edge; + g_vertex v = ordered_verts_of_g[i]; + g_out_edge_iter ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(v, g); ei != ei_end; ++ei) { + m_column[current_edge++] = get(vi, target(*ei, g)); + } + } + m_rowstart[numverts] = current_edge; + } + + // Add edges from a sorted (smallest sources first) range of pairs and edge + // properties + template + void + add_edges_sorted_internal( + BidirectionalIteratorOrig first_sorted, + BidirectionalIteratorOrig last_sorted, + EPIterOrig ep_iter_sorted, + const GlobalToLocal& global_to_local) { + typedef boost::reverse_iterator BidirectionalIterator; + typedef boost::reverse_iterator EPIter; + // Flip sequence + BidirectionalIterator first(last_sorted); + BidirectionalIterator last(first_sorted); + typedef Vertex vertex_t; + typedef Vertex vertex_num; + typedef EdgeIndex edge_num; + edge_num new_edge_count = std::distance(first, last); + + EPIter ep_iter(ep_iter_sorted); + std::advance(ep_iter, -(std::ptrdiff_t)new_edge_count); + edge_num edges_added_before_i = new_edge_count; // Count increment to add to rowstarts + m_column.resize(m_column.size() + new_edge_count); + inherited_edge_properties::resize(inherited_edge_properties::size() + new_edge_count); + BidirectionalIterator current_new_edge = first, prev_new_edge = first; + EPIter current_new_edge_prop = ep_iter; + for (vertex_num i_plus_1 = m_rowstart.size() - 1; i_plus_1 > 0; --i_plus_1) { + vertex_num i = i_plus_1 - 1; + prev_new_edge = current_new_edge; + // edges_added_to_this_vertex = #mbrs of new_edges with first == i + edge_num edges_added_to_this_vertex = 0; + while (current_new_edge != last) { + if (get(global_to_local, current_new_edge->first) != i) break; + ++current_new_edge; + ++current_new_edge_prop; + ++edges_added_to_this_vertex; + } + edges_added_before_i -= edges_added_to_this_vertex; + // Invariant: edges_added_before_i = #mbrs of new_edges with first < i + edge_num old_rowstart = m_rowstart[i]; + edge_num new_rowstart = m_rowstart[i] + edges_added_before_i; + edge_num old_degree = m_rowstart[i + 1] - m_rowstart[i]; + edge_num new_degree = old_degree + edges_added_to_this_vertex; + // Move old edges forward (by #new_edges before this i) to make room + // new_rowstart > old_rowstart, so use copy_backwards + if (old_rowstart != new_rowstart) { + std::copy_backward(m_column.begin() + old_rowstart, + m_column.begin() + old_rowstart + old_degree, + m_column.begin() + new_rowstart + old_degree); + inherited_edge_properties::move_range(old_rowstart, old_rowstart + old_degree, new_rowstart); + } + // Add new edges (reversed because current_new_edge is a + // const_reverse_iterator) + BidirectionalIterator temp = current_new_edge; + EPIter temp_prop = current_new_edge_prop; + for (; temp != prev_new_edge; ++old_degree) { + --temp; + --temp_prop; + m_column[new_rowstart + old_degree] = temp->second; + inherited_edge_properties::write_by_index(new_rowstart + old_degree, *temp_prop); + } + m_rowstart[i + 1] = new_rowstart + new_degree; + if (edges_added_before_i == 0) break; // No more edges inserted before this point + // m_rowstart[i] will be fixed up on the next iteration (to avoid + // changing the degree of vertex i - 1); the last iteration never changes + // it (either because of the condition of the break or because + // m_rowstart[0] is always 0) + } + } + + }; + + template + class csr_edge_descriptor + { + public: + Vertex src; + EdgeIndex idx; + + csr_edge_descriptor(Vertex src, EdgeIndex idx): src(src), idx(idx) {} + csr_edge_descriptor(): src(0), idx(0) {} + + bool operator==(const csr_edge_descriptor& e) const {return idx == e.idx;} + bool operator!=(const csr_edge_descriptor& e) const {return idx != e.idx;} + bool operator<(const csr_edge_descriptor& e) const {return idx < e.idx;} + bool operator>(const csr_edge_descriptor& e) const {return idx > e.idx;} + bool operator<=(const csr_edge_descriptor& e) const {return idx <= e.idx;} + bool operator>=(const csr_edge_descriptor& e) const {return idx >= e.idx;} + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & src & idx; + } + }; + + // Common out edge and edge iterators + template + class csr_out_edge_iterator + : public iterator_facade, + typename CSRGraph::edge_descriptor, + std::random_access_iterator_tag, + const typename CSRGraph::edge_descriptor&, + typename int_t::fast> + { + public: + typedef typename CSRGraph::edges_size_type EdgeIndex; + typedef typename CSRGraph::edge_descriptor edge_descriptor; + typedef typename int_t::fast difference_type; + + csr_out_edge_iterator() {} + // Implicit copy constructor OK + explicit csr_out_edge_iterator(edge_descriptor edge) : m_edge(edge) { } + + public: // GCC 4.2.1 doesn't like the private-and-friend thing + // iterator_facade requirements + const edge_descriptor& dereference() const { return m_edge; } + + bool equal(const csr_out_edge_iterator& other) const + { return m_edge == other.m_edge; } + + void increment() { ++m_edge.idx; } + void decrement() { --m_edge.idx; } + void advance(difference_type n) { m_edge.idx += n; } + + difference_type distance_to(const csr_out_edge_iterator& other) const + { return other.m_edge.idx - m_edge.idx; } + + edge_descriptor m_edge; + + friend class iterator_core_access; + }; + + template + class csr_edge_iterator + : public iterator_facade, + typename CSRGraph::edge_descriptor, + boost::forward_traversal_tag, + typename CSRGraph::edge_descriptor> + { + private: + typedef typename CSRGraph::edge_descriptor edge_descriptor; + typedef typename CSRGraph::edges_size_type EdgeIndex; + + public: + csr_edge_iterator() : rowstart_array(0), current_edge(), end_of_this_vertex(0), total_num_edges(0) {} + + csr_edge_iterator(const CSRGraph& graph, + edge_descriptor current_edge, + EdgeIndex end_of_this_vertex) + : rowstart_array(&graph.m_forward.m_rowstart[0]), + current_edge(current_edge), + end_of_this_vertex(end_of_this_vertex), + total_num_edges(num_edges(graph)) {} + + public: // See above + friend class boost::iterator_core_access; + + edge_descriptor dereference() const {return current_edge;} + + bool equal(const csr_edge_iterator& o) const { + return current_edge == o.current_edge; + } + + void increment() { + ++current_edge.idx; + if (current_edge.idx == total_num_edges) return; + while (current_edge.idx == end_of_this_vertex) { + ++current_edge.src; + end_of_this_vertex = rowstart_array[current_edge.src + 1]; + } + } + + const EdgeIndex* rowstart_array; + edge_descriptor current_edge; + EdgeIndex end_of_this_vertex; + EdgeIndex total_num_edges; + }; + + // Only for bidirectional graphs + template + class csr_in_edge_iterator + : public iterator_facade, + typename CSRGraph::edge_descriptor, + boost::forward_traversal_tag, + typename CSRGraph::edge_descriptor> + { + public: + typedef typename CSRGraph::edges_size_type EdgeIndex; + typedef typename CSRGraph::edge_descriptor edge_descriptor; + + csr_in_edge_iterator(): m_graph(0) {} + // Implicit copy constructor OK + csr_in_edge_iterator(const CSRGraph& graph, + EdgeIndex index_in_backward_graph) + : m_index_in_backward_graph(index_in_backward_graph), m_graph(&graph) {} + + public: // See above + // iterator_facade requirements + edge_descriptor dereference() const { + return edge_descriptor( + m_graph->m_backward.m_column[m_index_in_backward_graph], + m_graph->m_backward.m_edge_properties[m_index_in_backward_graph]); + } + + bool equal(const csr_in_edge_iterator& other) const + { return m_index_in_backward_graph == other.m_index_in_backward_graph; } + + void increment() { ++m_index_in_backward_graph; } + void decrement() { --m_index_in_backward_graph; } + void advance(std::ptrdiff_t n) { m_index_in_backward_graph += n; } + + std::ptrdiff_t distance_to(const csr_in_edge_iterator& other) const + { return other.m_index_in_backward_graph - m_index_in_backward_graph; } + + EdgeIndex m_index_in_backward_graph; + const CSRGraph* m_graph; + + friend class iterator_core_access; + }; + + template + struct transpose_pair { + typedef std::pair result_type; + result_type operator()(const std::pair& p) const { + return result_type(p.second, p.first); + } + }; + + template + struct transpose_iterator_gen { + typedef typename std::iterator_traits::value_type vt; + typedef typename vt::first_type first_type; + typedef typename vt::second_type second_type; + typedef transpose_pair transpose; + typedef boost::transform_iterator type; + static type make(Iter it) { + return type(it, transpose()); + } + }; + + template + typename transpose_iterator_gen::type transpose_edges(Iter i) { + return transpose_iterator_gen::make(i); + } + + template + class edge_to_index_pair + { + typedef typename boost::graph_traits::vertices_size_type + vertices_size_type; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + + public: + typedef std::pair result_type; + + edge_to_index_pair() : g(0), index() { } + edge_to_index_pair(const GraphT& g, const VertexIndexMap& index) + : g(&g), index(index) + { } + + result_type operator()(edge_descriptor e) const + { + return result_type(get(index, source(e, *g)), get(index, target(e, *g))); + } + + private: + const GraphT* g; + VertexIndexMap index; + }; + + template + edge_to_index_pair + make_edge_to_index_pair(const GraphT& g, const VertexIndexMap& index) + { + return edge_to_index_pair(g, index); + } + + template + edge_to_index_pair + ::const_type> + make_edge_to_index_pair(const GraphT& g) + { + typedef typename boost::property_map::const_type + VertexIndexMap; + return edge_to_index_pair(g, + get(boost::vertex_index, + g)); + } + + template + boost::transform_iterator, Iter> + make_edge_to_index_pair_iter(const GraphT& g, const VertexIndexMap& index, + Iter it) { + return boost::transform_iterator, Iter>(it, edge_to_index_pair(g, index)); + } + +} // namespace detail + + template + struct hash > + { + std::size_t operator() + (detail::csr_edge_descriptor const& x) const + { + std::size_t hash = hash_value(x.src); + hash_combine(hash, x.idx); + return hash; + } + }; + +} // namespace boost + +#endif // BOOST_GRAPH_COMPRESSED_SPARSE_ROW_STRUCT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/connected_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/connected_components.hpp new file mode 100644 index 0000000000..0af7746012 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/connected_components.hpp @@ -0,0 +1,208 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_DETAIL_CONNECTED_COMPONENTS_HPP +#define BOOST_GRAPH_DETAIL_CONNECTED_COMPONENTS_HPP + +#if defined(__sgi) && !defined(__GNUC__) +#pragma set woff 1234 +#endif + +#include + +namespace boost { + + namespace detail { + + //========================================================================= + // Implementation details of connected_components + + // This is used both in the connected_components algorithm and in + // the kosaraju strong components algorithm during the second DFS + // traversal. + template + class components_recorder : public DFSVisitor + { + typedef typename property_traits::value_type comp_type; + public: + components_recorder(ComponentsPA c, + comp_type& c_count, + DFSVisitor v) + : DFSVisitor(v), m_component(c), m_count(c_count) {} + + template + void start_vertex(Vertex u, Graph& g) { + ++m_count; + DFSVisitor::start_vertex(u, g); + } + template + void discover_vertex(Vertex u, Graph& g) { + put(m_component, u, m_count); + DFSVisitor::discover_vertex(u, g); + } + protected: + ComponentsPA m_component; + comp_type& m_count; + }; + + template + class time_recorder : public DFSVisitor + { + public: + time_recorder(DiscoverTimeMap d, FinishTimeMap f, TimeT& t, DFSVisitor v) + : DFSVisitor(v), m_discover_time(d), m_finish_time(f), m_t(t) {} + + template + void discover_vertex(Vertex u, Graph& g) { + put(m_discover_time, u, ++m_t); + DFSVisitor::discover_vertex(u, g); + } + template + void finish_vertex(Vertex u, Graph& g) { + put(m_finish_time, u, ++m_t); + DFSVisitor::discover_vertex(u, g); + } + protected: + DiscoverTimeMap m_discover_time; + FinishTimeMap m_finish_time; + TimeT m_t; + }; + template + time_recorder + record_times(DiscoverTimeMap d, FinishTimeMap f, TimeT& t, DFSVisitor vis) + { + return time_recorder + (d, f, t, vis); + } + + //========================================================================= + // Implementation detail of dynamic_components + + + //------------------------------------------------------------------------- + // Helper functions for the component_index class + + // Record the representative vertices in the header array. + // Representative vertices now point to the component number. + + template + inline void + build_components_header(Parent p, + OutputIterator header, + Integer num_nodes) + { + Parent component = p; + Integer component_num = 0; + for (Integer v = 0; v != num_nodes; ++v) + if (p[v] == v) { + *header++ = v; + component[v] = component_num++; + } + } + + + // Pushes x onto the front of the list. The list is represented in + // an array. + template + inline void push_front(Next next, T& head, V x) + { + T tmp = head; + head = x; + next[x] = tmp; + } + + + // Create a linked list of the vertices in each component + // by reusing the representative array. + template + void + link_components(Parent1 component, Parent2 header, + Integer num_nodes, Integer num_components) + { + // Make the non-representative vertices point to their component + Parent1 representative = component; + for (Integer v = 0; v != num_nodes; ++v) + if (component[v] >= num_components || header[component[v]] != v) + component[v] = component[representative[v]]; + + // initialize the "head" of the lists to "NULL" + std::fill_n(header, num_components, num_nodes); + + // Add each vertex to the linked list for its component + Parent1 next = component; + for (Integer k = 0; k != num_nodes; ++k) + push_front(next, header[component[k]], k); + } + + + + template + void + construct_component_index(IndexContainer& index, HeaderContainer& header) + { + build_components_header(index.begin(), + std::back_inserter(header), + index.end() - index.begin()); + + link_components(index.begin(), header.begin(), + index.end() - index.begin(), + header.end() - header.begin()); + } + + + + template + class component_iterator + : boost::forward_iterator_helper< + component_iterator, + Integer, Distance,Integer*, Integer&> + { + public: + typedef component_iterator self; + + IndexIterator next; + Integer node; + + typedef std::forward_iterator_tag iterator_category; + typedef Integer value_type; + typedef Integer& reference; + typedef Integer* pointer; + typedef Distance difference_type; + + component_iterator() {} + component_iterator(IndexIterator x, Integer i) + : next(x), node(i) {} + Integer operator*() const { + return node; + } + self& operator++() { + node = next[node]; + return *this; + } + }; + + template + inline bool + operator==(const component_iterator& x, + const component_iterator& y) + { + return x.node == y.node; + } + + } // namespace detail + +} // namespace detail + +#if defined(__sgi) && !defined(__GNUC__) +#pragma reset woff 1234 +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/d_ary_heap.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/d_ary_heap.hpp new file mode 100644 index 0000000000..c3b3ef7fd5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/d_ary_heap.hpp @@ -0,0 +1,311 @@ +// +//======================================================================= +// Copyright 2009 Trustees of Indiana University +// Authors: Jeremiah J. Willcock, Andrew Lumsdaine +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_D_ARY_HEAP_HPP +#define BOOST_D_ARY_HEAP_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + // Swap two elements in a property map without assuming they model + // LvaluePropertyMap -- currently not used + template + inline void property_map_swap( + PropMap prop_map, + const typename boost::property_traits::key_type& ka, + const typename boost::property_traits::key_type& kb) { + typename boost::property_traits::value_type va = get(prop_map, ka); + put(prop_map, ka, get(prop_map, kb)); + put(prop_map, kb, va); + } + + namespace detail { + template + class fixed_max_size_vector { + boost::shared_array m_data; + std::size_t m_size; + + public: + typedef std::size_t size_type; + fixed_max_size_vector(std::size_t max_size) + : m_data(new Value[max_size]), m_size(0) {} + std::size_t size() const {return m_size;} + bool empty() const {return m_size == 0;} + Value& operator[](std::size_t i) {return m_data[i];} + const Value& operator[](std::size_t i) const {return m_data[i];} + void push_back(Value v) {m_data[m_size++] = v;} + void pop_back() {--m_size;} + Value& back() {return m_data[m_size - 1];} + const Value& back() const {return m_data[m_size - 1];} + }; + } + + // D-ary heap using an indirect compare operator (use identity_property_map + // as DistanceMap to get a direct compare operator). This heap appears to be + // commonly used for Dijkstra's algorithm for its good practical performance + // on some platforms; asymptotically, it has an O(lg N) decrease-key + // operation while that can be done in constant time on a relaxed heap. The + // implementation is mostly based on the binary heap page on Wikipedia and + // online sources that state that the operations are the same for d-ary + // heaps. This code is not based on the old Boost d-ary heap code. + // + // - d_ary_heap_indirect is a model of UpdatableQueue as is needed for + // dijkstra_shortest_paths. + // + // - Value must model Assignable. + // - Arity must be at least 2 (optimal value appears to be 4, both in my and + // third-party experiments). + // - IndexInHeapMap must be a ReadWritePropertyMap from Value to + // Container::size_type (to store the index of each stored value within the + // heap for decrease-key aka update). + // - DistanceMap must be a ReadablePropertyMap from Value to something + // (typedef'ed as distance_type). + // - Compare must be a BinaryPredicate used as a less-than operator on + // distance_type. + // - Container must be a random-access, contiguous container (in practice, + // the operations used probably require that it is std::vector). + // + template , + typename Container = std::vector > + class d_ary_heap_indirect { + BOOST_STATIC_ASSERT (Arity >= 2); + + public: + typedef typename Container::size_type size_type; + typedef Value value_type; + typedef typename boost::property_traits::value_type key_type; + typedef DistanceMap key_map; + + d_ary_heap_indirect(DistanceMap distance, + IndexInHeapPropertyMap index_in_heap, + const Compare& compare = Compare(), + const Container& data = Container()) + : compare(compare), data(data), distance(distance), + index_in_heap(index_in_heap) {} + /* Implicit copy constructor */ + /* Implicit assignment operator */ + + size_type size() const { + return data.size(); + } + + bool empty() const { + return data.empty(); + } + + void push(const Value& v) { + size_type index = data.size(); + data.push_back(v); + put(index_in_heap, v, index); + preserve_heap_property_up(index); + verify_heap(); + } + + Value& top() { + return data[0]; + } + + const Value& top() const { + return data[0]; + } + + void pop() { + put(index_in_heap, data[0], (size_type)(-1)); + if (data.size() != 1) { + data[0] = data.back(); + put(index_in_heap, data[0], 0); + data.pop_back(); + preserve_heap_property_down(); + verify_heap(); + } else { + data.pop_back(); + } + } + + // This function assumes the key has been updated (using an external write + // to the distance map or such) + // See http://coding.derkeiler.com/Archive/General/comp.theory/2007-05/msg00043.html + void update(const Value& v) { /* decrease-key */ + size_type index = get(index_in_heap, v); + preserve_heap_property_up(index); + verify_heap(); + } + + bool contains(const Value& v) const { + size_type index = get(index_in_heap, v); + return (index != (size_type)(-1)); + } + + void push_or_update(const Value& v) { /* insert if not present, else update */ + size_type index = get(index_in_heap, v); + if (index == (size_type)(-1)) { + index = data.size(); + data.push_back(v); + put(index_in_heap, v, index); + } + preserve_heap_property_up(index); + verify_heap(); + } + + DistanceMap keys() const { + return distance; + } + + private: + Compare compare; + Container data; + DistanceMap distance; + IndexInHeapPropertyMap index_in_heap; + + // The distances being compared using compare and that are stored in the + // distance map + typedef typename boost::property_traits::value_type distance_type; + + // Get the parent of a given node in the heap + static size_type parent(size_type index) { + return (index - 1) / Arity; + } + + // Get the child_idx'th child of a given node; 0 <= child_idx < Arity + static size_type child(size_type index, std::size_t child_idx) { + return index * Arity + child_idx + 1; + } + + // Swap two elements in the heap by index, updating index_in_heap + void swap_heap_elements(size_type index_a, size_type index_b) { + using std::swap; + Value value_a = data[index_a]; + Value value_b = data[index_b]; + data[index_a] = value_b; + data[index_b] = value_a; + put(index_in_heap, value_a, index_b); + put(index_in_heap, value_b, index_a); + } + + // Emulate the indirect_cmp that is now folded into this heap class + bool compare_indirect(const Value& a, const Value& b) const { + return compare(get(distance, a), get(distance, b)); + } + + // Verify that the array forms a heap; commented out by default + void verify_heap() const { + // This is a very expensive test so it should be disabled even when + // NDEBUG is not defined +#if 0 + for (size_t i = 1; i < data.size(); ++i) { + if (compare_indirect(data[i], data[parent(i)])) { + assert (!"Element is smaller than its parent"); + } + } +#endif + } + + // Starting at a node, move up the tree swapping elements to preserve the + // heap property + void preserve_heap_property_up(size_type index) { + size_type orig_index = index; + size_type num_levels_moved = 0; + // The first loop just saves swaps that need to be done in order to avoid + // aliasing issues in its search; there is a second loop that does the + // necessary swap operations + if (index == 0) return; // Do nothing on root + Value currently_being_moved = data[index]; + distance_type currently_being_moved_dist = + get(distance, currently_being_moved); + for (;;) { + if (index == 0) break; // Stop at root + size_type parent_index = parent(index); + Value parent_value = data[parent_index]; + if (compare(currently_being_moved_dist, get(distance, parent_value))) { + ++num_levels_moved; + index = parent_index; + continue; + } else { + break; // Heap property satisfied + } + } + // Actually do the moves -- move num_levels_moved elements down in the + // tree, then put currently_being_moved at the top + index = orig_index; + for (size_type i = 0; i < num_levels_moved; ++i) { + size_type parent_index = parent(index); + Value parent_value = data[parent_index]; + put(index_in_heap, parent_value, index); + data[index] = parent_value; + index = parent_index; + } + data[index] = currently_being_moved; + put(index_in_heap, currently_being_moved, index); + verify_heap(); + } + + // From the root, swap elements (each one with its smallest child) if there + // are any parent-child pairs that violate the heap property + void preserve_heap_property_down() { + if (data.empty()) return; + size_type index = 0; + Value currently_being_moved = data[0]; + distance_type currently_being_moved_dist = + get(distance, currently_being_moved); + size_type heap_size = data.size(); + Value* data_ptr = &data[0]; + for (;;) { + size_type first_child_index = child(index, 0); + if (first_child_index >= heap_size) break; /* No children */ + Value* child_base_ptr = data_ptr + first_child_index; + size_type smallest_child_index = 0; + distance_type smallest_child_dist = get(distance, child_base_ptr[smallest_child_index]); + if (first_child_index + Arity <= heap_size) { + // Special case for a statically known loop count (common case) + for (size_t i = 1; i < Arity; ++i) { + Value i_value = child_base_ptr[i]; + distance_type i_dist = get(distance, i_value); + if (compare(i_dist, smallest_child_dist)) { + smallest_child_index = i; + smallest_child_dist = i_dist; + } + } + } else { + for (size_t i = 1; i < heap_size - first_child_index; ++i) { + distance_type i_dist = get(distance, child_base_ptr[i]); + if (compare(i_dist, smallest_child_dist)) { + smallest_child_index = i; + smallest_child_dist = i_dist; + } + } + } + if (compare(smallest_child_dist, currently_being_moved_dist)) { + swap_heap_elements(smallest_child_index + first_child_index, index); + index = smallest_child_index + first_child_index; + continue; + } else { + break; // Heap property satisfied + } + } + verify_heap(); + } + + }; + +} // namespace boost + +#endif // BOOST_D_ARY_HEAP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/edge.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/edge.hpp new file mode 100644 index 0000000000..da085973a7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/edge.hpp @@ -0,0 +1,124 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_DETAIL_EDGE_HPP +#define BOOST_GRAPH_DETAIL_EDGE_HPP + +#if __GNUC__ < 3 +#include +#else +#include +#endif + +namespace boost { + + namespace detail { + + template + struct edge_base + { + inline edge_base() {} + inline edge_base(Vertex s, Vertex d) + : m_source(s), m_target(d) { } + Vertex m_source; + Vertex m_target; + }; + + template + class edge_desc_impl : public edge_base { + typedef edge_desc_impl self; + typedef edge_base Base; + public: + typedef void property_type; + + inline edge_desc_impl() : m_eproperty(0) {} + + inline edge_desc_impl(Vertex s, Vertex d, const property_type* eplug) + : Base(s,d), m_eproperty(const_cast(eplug)) { } + + property_type* get_property() { return m_eproperty; } + const property_type* get_property() const { return m_eproperty; } + + // protected: + property_type* m_eproperty; + }; + + template + inline bool + operator==(const detail::edge_desc_impl& a, + const detail::edge_desc_impl& b) + { + return a.get_property() == b.get_property(); + } + template + inline bool + operator!=(const detail::edge_desc_impl& a, + const detail::edge_desc_impl& b) + { + return ! (a.get_property() == b.get_property()); + } + + // Order edges according to the address of their property object + template + inline bool + operator<(const detail::edge_desc_impl& a, + const detail::edge_desc_impl& b) + { + return a.get_property() < b.get_property(); + } + template + inline bool + operator<=(const detail::edge_desc_impl& a, + const detail::edge_desc_impl& b) + { + return a.get_property() <= b.get_property(); + } + template + inline bool + operator>(const detail::edge_desc_impl& a, + const detail::edge_desc_impl& b) + { + return a.get_property() > b.get_property(); + } + template + inline bool + operator>=(const detail::edge_desc_impl& a, + const detail::edge_desc_impl& b) + { + return a.get_property() >= b.get_property(); + } + + } //namespace detail + +} // namespace boost + +namespace std { + +#if __GNUC__ < 3 + template + std::ostream& + operator<<(std::ostream& os, const boost::detail::edge_desc_impl& e) + { + return os << "(" << e.m_source << "," << e.m_target << ")"; + } +#else + template + std::basic_ostream& + operator<<(std::basic_ostream& os, + const boost::detail::edge_desc_impl& e) + { + return os << "(" << e.m_source << "," << e.m_target << ")"; + } +#endif + +} + + +#endif // BOOST_GRAPH_DETAIL_DETAIL_EDGE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/geodesic.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/geodesic.hpp new file mode 100644 index 0000000000..99edaf9e39 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/geodesic.hpp @@ -0,0 +1,130 @@ +// (C) Copyright 2007 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_DETAIL_GEODESIC_HPP +#define BOOST_GRAPH_DETAIL_GEODESIC_HPP + +#include +#include +#include +#include + +// TODO: Should this really be in detail? + +namespace boost +{ +// This is a very good discussion on centrality measures. While I can't +// say that this has been the motivating factor for the design and +// implementation of ths centrality framework, it does provide a single +// point of reference for defining things like degree and closeness +// centrality. Plus, the bibliography seems fairly complete. +// +// @article{citeulike:1144245, +// author = {Borgatti, Stephen P. and Everett, Martin G.}, +// citeulike-article-id = {1144245}, +// doi = {10.1016/j.socnet.2005.11.005}, +// journal = {Social Networks}, +// month = {October}, +// number = {4}, +// pages = {466--484}, +// priority = {0}, +// title = {A Graph-theoretic perspective on centrality}, +// url = {http://dx.doi.org/10.1016/j.socnet.2005.11.005}, +// volume = {28}, +// year = {2006} +// } +// } + +namespace detail { + // Note that this assumes T == property_traits::value_type + // and that the args and return of combine are also T. + template + inline Distance + combine_distances(const Graph& g, + DistanceMap dist, + Combinator combine, + Distance init) + { + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + function_requires< ReadablePropertyMapConcept >(); + function_requires< NumericValueConcept >(); + typedef numeric_values DistanceNumbers; + function_requires< AdaptableBinaryFunction >(); + + // If there's ever an infinite distance, then we simply return + // infinity. Note that this /will/ include the a non-zero + // distance-to-self in the combined values. However, this is usually + // zero, so it shouldn't be too problematic. + Distance ret = init; + VertexIterator i, end; + for(tie(i, end) = vertices(g); i != end; ++i) { + Vertex v = *i; + if(get(dist, v) != DistanceNumbers::infinity()) { + ret = combine(ret, get(dist, v)); + } + else { + ret = DistanceNumbers::infinity(); + break; + } + } + return ret; + } + + // Similar to std::plus, but maximizes parameters + // rather than adding them. + template + struct maximize : public std::binary_function + { + T operator ()(T x, T y) const + { BOOST_USING_STD_MAX(); return max BOOST_PREVENT_MACRO_SUBSTITUTION (x, y); } + }; + + // Another helper, like maximize() to help abstract functional + // concepts. This is trivially instantiated for builtin numeric + // types, but should be specialized for those types that have + // discrete notions of reciprocals. + template + struct reciprocal : public std::unary_function + { + typedef std::unary_function function_type; + typedef typename function_type::result_type result_type; + typedef typename function_type::argument_type argument_type; + T operator ()(T t) + { return T(1) / t; } + }; +} /* namespace detail */ + +// This type defines the basic facilities used for computing values +// based on the geodesic distances between vertices. Examples include +// closeness centrality and mean geodesic distance. +template +struct geodesic_measure +{ + typedef DistanceType distance_type; + typedef ResultType result_type; + typedef typename graph_traits::vertices_size_type size_type; + + typedef numeric_values distance_values; + typedef numeric_values result_values; + + static inline distance_type infinite_distance() + { return distance_values::infinity(); } + + static inline result_type infinite_result() + { return result_values::infinity(); } + + static inline result_type zero_result() + { return result_values::zero(); } +}; + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/histogram_sort.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/histogram_sort.hpp new file mode 100644 index 0000000000..742c6f9639 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/histogram_sort.hpp @@ -0,0 +1,286 @@ +// Copyright 2009 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Andrew Lumsdaine + +#ifndef BOOST_GRAPH_DETAIL_HISTOGRAM_SORT_HPP +#define BOOST_GRAPH_DETAIL_HISTOGRAM_SORT_HPP + +namespace boost { + namespace graph { + namespace detail { + +template +size_t +reserve_count_for_single_pass_helper(InputIterator, InputIterator, + std::input_iterator_tag) +{ + // Do nothing: we have no idea how much storage to reserve. + return 0; +} + +template +size_t +reserve_count_for_single_pass_helper(InputIterator first, InputIterator last, + std::random_access_iterator_tag) +{ + using std::distance; + typename std::iterator_traits::difference_type n = + distance(first, last); + return (size_t)n; +} + +template +size_t +reserve_count_for_single_pass(InputIterator first, InputIterator last) { + typedef typename std::iterator_traits::iterator_category + category; + return reserve_count_for_single_pass_helper(first, last, category()); +} + +template +void +count_starts + (KeyIterator begin, KeyIterator end, + RowstartIterator starts, // Must support numverts + 1 elements + VerticesSize numkeys, + KeyFilter key_filter, + KeyTransform key_transform) { + + typedef VerticesSize vertices_size_type; + typedef typename std::iterator_traits::value_type EdgeIndex; + + // Put the degree of each vertex v into m_rowstart[v + 1] + for (KeyIterator i = begin; i != end; ++i) { + if (key_filter(*i)) { + ++starts[key_transform(*i) + 1]; + } + } + + // Compute the partial sum of the degrees to get the actual values of + // m_rowstart + EdgeIndex start_of_this_row = 0; + starts[0] = start_of_this_row; + for (vertices_size_type i = 1; i <= numkeys; ++i) { + start_of_this_row += starts[i]; + starts[i] = start_of_this_row; + } +} + +template +void +histogram_sort(KeyIterator key_begin, KeyIterator key_end, + RowstartIterator rowstart, // Must support numkeys + 1 elements and be precomputed + NumKeys numkeys, + Value1InputIter values1_begin, + Value1OutputIter values1_out, + KeyFilter key_filter, + KeyTransform key_transform) { + + typedef NumKeys vertices_size_type; + typedef typename std::iterator_traits::value_type EdgeIndex; + + // Histogram sort the edges by their source vertices, putting the targets + // into m_column. The index current_insert_positions[v] contains the next + // location to insert out edges for vertex v. + std::vector + current_insert_positions(rowstart, rowstart + numkeys); + Value1InputIter v1i = values1_begin; + for (KeyIterator i = key_begin; i != key_end; ++i, ++v1i) { + if (key_filter(*i)) { + vertices_size_type source = key_transform(*i); + EdgeIndex insert_pos = current_insert_positions[source]; + ++current_insert_positions[source]; + values1_out[insert_pos] = *v1i; + } + } +} + +template +void +histogram_sort(KeyIterator key_begin, KeyIterator key_end, + RowstartIterator rowstart, // Must support numkeys + 1 elements and be precomputed + NumKeys numkeys, + Value1InputIter values1_begin, + Value1OutputIter values1_out, + Value2InputIter values2_begin, + Value2OutputIter values2_out, + KeyFilter key_filter, + KeyTransform key_transform) { + + typedef NumKeys vertices_size_type; + typedef typename std::iterator_traits::value_type EdgeIndex; + + // Histogram sort the edges by their source vertices, putting the targets + // into m_column. The index current_insert_positions[v] contains the next + // location to insert out edges for vertex v. + std::vector + current_insert_positions(rowstart, rowstart + numkeys); + Value1InputIter v1i = values1_begin; + Value2InputIter v2i = values2_begin; + for (KeyIterator i = key_begin; i != key_end; ++i, ++v1i, ++v2i) { + if (key_filter(*i)) { + vertices_size_type source = key_transform(*i); + EdgeIndex insert_pos = current_insert_positions[source]; + ++current_insert_positions[source]; + values1_out[insert_pos] = *v1i; + values2_out[insert_pos] = *v2i; + } + } +} + +template +void +histogram_sort_inplace(KeyIterator key_begin, + RowstartIterator rowstart, // Must support numkeys + 1 elements and be precomputed + NumKeys numkeys, + Value1Iter values1, + KeyTransform key_transform) { + + typedef NumKeys vertices_size_type; + typedef typename std::iterator_traits::value_type EdgeIndex; + + // 1. Copy m_rowstart (except last element) to get insert positions + std::vector insert_positions(rowstart, rowstart + numkeys); + // 2. Swap the sources and targets into place + for (size_t i = 0; i < rowstart[numkeys]; ++i) { + // While edge i is not in the right bucket: + while (!(i >= rowstart[key_transform(key_begin[i])] && i < insert_positions[key_transform(key_begin[i])])) { + // Add a slot in the right bucket + size_t target_pos = insert_positions[key_transform(key_begin[i])]++; + assert (target_pos < rowstart[key_transform(key_begin[i]) + 1]); + if (target_pos == i) continue; + // Swap this edge into place + using std::swap; + swap(key_begin[i], key_begin[target_pos]); + swap(values1[i], values1[target_pos]); + } + } +} + +template +void +histogram_sort_inplace(KeyIterator key_begin, + RowstartIterator rowstart, // Must support numkeys + 1 elements and be precomputed + NumKeys numkeys, + Value1Iter values1, + Value2Iter values2, + KeyTransform key_transform) { + + typedef NumKeys vertices_size_type; + typedef typename std::iterator_traits::value_type EdgeIndex; + + // 1. Copy m_rowstart (except last element) to get insert positions + std::vector insert_positions(rowstart, rowstart + numkeys); + // 2. Swap the sources and targets into place + for (size_t i = 0; i < rowstart[numkeys]; ++i) { + // While edge i is not in the right bucket: + while (!(i >= rowstart[key_transform(key_begin[i])] && i < insert_positions[key_transform(key_begin[i])])) { + // Add a slot in the right bucket + size_t target_pos = insert_positions[key_transform(key_begin[i])]++; + assert (target_pos < rowstart[key_transform(key_begin[i]) + 1]); + if (target_pos == i) continue; + // Swap this edge into place + using std::swap; + swap(key_begin[i], key_begin[target_pos]); + swap(values1[i], values1[target_pos]); + swap(values2[i], values2[target_pos]); + } + } +} + +template +void split_into_separate_coords(InputIterator begin, InputIterator end, + std::vector& firsts, + std::vector& seconds) { + firsts.clear(); + seconds.clear(); + size_t reserve_size + = detail::reserve_count_for_single_pass(begin, end); + firsts.reserve(reserve_size); + seconds.reserve(reserve_size); + for (; begin != end; ++begin) { + std::pair edge = *begin; + firsts.push_back(edge.first); + seconds.push_back(edge.second); + } +} + +template +void split_into_separate_coords_filtered + (InputIterator begin, InputIterator end, + std::vector& firsts, + std::vector& seconds, + const SourceFilter& filter) { + firsts.clear(); + seconds.clear(); + for (; begin != end; ++begin) { + std::pair edge = *begin; + if (filter(edge.first)) { + firsts.push_back(edge.first); + seconds.push_back(edge.second); + } + } +} + +template +void split_into_separate_coords_filtered + (InputIterator begin, InputIterator end, + PropInputIterator props, + std::vector& firsts, + std::vector& seconds, + std::vector& props_out, + const SourceFilter& filter) { + firsts.clear(); + seconds.clear(); + props_out.clear(); + for (; begin != end; ++begin) { + std::pair edge = *begin; + if (filter(edge.first)) { + firsts.push_back(edge.first); + seconds.push_back(edge.second); + props_out.push_back(*props); + } + ++props; + } +} + +template +struct project1st { + typedef typename Pair::first_type result_type; + const result_type& operator()(const Pair& p) const {return p.first;} +}; + +template +struct project2nd { + typedef typename Pair::second_type result_type; + const result_type& operator()(const Pair& p) const {return p.second;} +}; + + } + } +} + +#endif // BOOST_GRAPH_DETAIL_HISTOGRAM_SORT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/incidence_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/incidence_iterator.hpp new file mode 100644 index 0000000000..836ad15266 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/incidence_iterator.hpp @@ -0,0 +1,79 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_DETAIL_INCIDENCE_ITERATOR_HPP +#define BOOST_GRAPH_DETAIL_INCIDENCE_ITERATOR_HPP + +#include +#include + +// OBSOLETE + +namespace boost { + + namespace detail { + // EdgeDir tags + struct in_edge_tag { }; + struct out_edge_tag { }; + + template + struct bidir_incidence_iterator { + typedef bidir_incidence_iterator self; + typedef Edge edge_type; + typedef typename Edge::property_type EdgeProperty; + public: + typedef int difference_type; + typedef std::forward_iterator_tag iterator_category; + typedef edge_type reference; + typedef edge_type value_type; + typedef value_type* pointer; + inline bidir_incidence_iterator() {} + inline bidir_incidence_iterator(Iterator1D ii, Vertex src) + : i(ii), _src(src) { } + + inline self& operator++() { ++i; return *this; } + inline self operator++(int) { self tmp = *this; ++(*this); return tmp; } + + inline reference operator*() const { + return deref_helper(EdgeDir()); + } + inline self* operator->() { return this; } + + Iterator1D& iter() { return i; } + const Iterator1D& iter() const { return i; } + + Iterator1D i; + Vertex _src; + protected: + inline reference deref_helper(out_edge_tag) const { + return edge_type( _src, (*i).get_target(), &(*i).get_property() ); + } + inline reference deref_helper(in_edge_tag) const { + return edge_type((*i).get_target(), _src, &(*i).get_property() ); + } + }; + + template + inline bool operator==(const bidir_incidence_iterator& x, + const bidir_incidence_iterator& y) + { + return x.i == y.i; + } + template + inline bool operator!=(const bidir_incidence_iterator& x, + const bidir_incidence_iterator& y) + { + return x.i != y.i; + } + + + } +} +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/incremental_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/incremental_components.hpp new file mode 100644 index 0000000000..f66a3660f8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/incremental_components.hpp @@ -0,0 +1,77 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Copyright 2009 Trustees of Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Michael Hansen +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_DETAIL_INCREMENTAL_COMPONENTS_HPP +#define BOOST_GRAPH_DETAIL_INCREMENTAL_COMPONENTS_HPP + +#include + +namespace boost { + + namespace detail { + + // Iterator for a component index linked list. The contents of + // each array element represent the next index in the list. A + // special value (the maximum index + 1) is used to terminate a + // list. + template + class component_index_iterator : + boost::forward_iterator_helper, + typename std::iterator_traits::value_type, + typename std::iterator_traits::difference_type, + typename std::iterator_traits::pointer, + typename std::iterator_traits::reference> { + + private: + typedef component_index_iterator self; + + public: + typedef std::forward_iterator_tag iterator_category; + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::difference_type reference; + typedef typename std::iterator_traits::pointer pointer; + typedef typename std::iterator_traits::reference difference_type; + + // Constructor for "begin" iterator + component_index_iterator(IndexRandomAccessIterator index_iterator, + value_type begin_index) : + m_index_iterator(index_iterator), + m_current_index(begin_index) { } + + // Constructor for "end" iterator (end_index should be the linked + // list terminator). + component_index_iterator(value_type end_index) : + m_current_index(end_index) { } + + inline value_type operator*() const { + return (m_current_index); + } + + self& operator++() { + // Move to the next element in the linked list + m_current_index = m_index_iterator[m_current_index]; + return (*this); + } + + bool operator==(const self& other_iterator) const { + return (m_current_index == *other_iterator); + } + + protected: + IndexRandomAccessIterator m_index_iterator; + value_type m_current_index; + + }; // class component_index_iterator + + } // namespace detail + +} // namespace detail + +#endif // BOOST_GRAPH_DETAIL_INCREMENTAL_COMPONENTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/index.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/index.hpp new file mode 100644 index 0000000000..db1152f8c4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/index.hpp @@ -0,0 +1,74 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_DETAIL_INDEX_HPP +#define BOOST_GRAPH_DETAIL_INDEX_HPP + +#include + +// The structures in this module are responsible for selecting and defining +// types for accessing a builting index map. Note that the selection of these +// types requires the Graph parameter to model either VertexIndexGraph or +// EdgeIndexGraph. + +namespace boost +{ + namespace detail + { + template + struct vertex_indexer + { + typedef vertex_index_t index_type; + typedef typename property_map::type map_type; + typedef typename property_map::const_type const_map_type; + typedef typename property_traits::value_type value_type; + typedef typename graph_traits::vertex_descriptor key_type; + + static const_map_type index_map(const Graph& g) + { return get(vertex_index, g); } + + static map_type index_map(Graph& g) + { return get(vertex_index, g); } + + static value_type index(key_type k, const Graph& g) + { return get(vertex_index, g, k); } + }; + + template + struct edge_indexer + { + typedef edge_index_t index_type; + typedef typename property_map::type map_type; + typedef typename property_map::const_type const_map_type; + typedef typename property_traits::value_type value_type; + typedef typename graph_traits::edge_descriptor key_type; + + static const_map_type index_map(const Graph& g) + { return get(edge_index, g); } + + static map_type index_map(Graph& g) + { return get(edge_index, g); } + + static value_type index(key_type k, const Graph& g) + { return get(edge_index, g, k); } + }; + + // NOTE: The Graph parameter MUST be a model of VertexIndexGraph or + // VertexEdgeGraph - whichever type Key is selecting. + template + struct choose_indexer + { + typedef typename mpl::if_< + is_same::vertex_descriptor>, + vertex_indexer, + edge_indexer + >::type indexer_type; + typedef typename indexer_type::index_type index_type; + }; + } +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/indexed_properties.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/indexed_properties.hpp new file mode 100644 index 0000000000..e1f874b2cc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/indexed_properties.hpp @@ -0,0 +1,284 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Douglas Gregor +// Andrew Lumsdaine + +// Indexed properties -- used for CSR and CSR-like graphs + +#ifndef BOOST_GRAPH_INDEXED_PROPERTIES_HPP +#define BOOST_GRAPH_INDEXED_PROPERTIES_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace detail { + +template +class indexed_vertex_properties +{ +public: + typedef no_property vertex_property_type; + typedef Property vertex_bundled; + typedef iterator_property_map< + typename std::vector::iterator, + IndexMap> vertex_map_type; + typedef iterator_property_map< + typename std::vector::const_iterator, + IndexMap> const_vertex_map_type; + + // Directly access a vertex or edge bundle + Property& operator[](Descriptor v) + { return m_vertex_properties[get(vertex_index, derived(), v)]; } + + const Property& operator[](Descriptor v) const + { return m_vertex_properties[get(vertex_index, derived(), v)]; } + + vertex_map_type get_vertex_bundle(const IndexMap& index_map = IndexMap()) { + return vertex_map_type(m_vertex_properties.begin(), index_map); + } + + const_vertex_map_type get_vertex_bundle(const IndexMap& index_map = IndexMap()) const { + return const_vertex_map_type(m_vertex_properties.begin(), index_map); + } + +protected: + // Default-construct with no property values + indexed_vertex_properties() {} + + // Initialize with n default-constructed property values + indexed_vertex_properties(std::size_t n) : m_vertex_properties(n) { } + +public: + // Clear the properties vector + void clear() + { + m_vertex_properties.clear(); + } + + // Resize the properties vector + void resize(std::size_t n) + { + m_vertex_properties.resize(n); + } + + // Reserve space in the vector of properties + void reserve(std::size_t n) + { + m_vertex_properties.reserve(n); + } + + // Add a new property value to the back + void push_back(const Property& prop) + { + m_vertex_properties.push_back(prop); + } + + // Write an element by raw index + void write_by_index(std::size_t idx, const Property& prop) + { + m_vertex_properties[idx] = prop; + } + + // Access to the derived object + Derived& derived() { return *static_cast(this); } + + const Derived& derived() const + { return *static_cast(this); } + +public: // should be private, but friend templates not portable + std::vector m_vertex_properties; +}; + +template +class indexed_vertex_properties +{ + struct secret {}; + + public: + typedef no_property vertex_property_type; + typedef void vertex_bundled; + typedef secret vertex_map_type; + typedef secret const_vertex_map_type; + + secret operator[](secret) { return secret(); } + + vertex_map_type get_vertex_bundle() const { + return vertex_map_type(); + } + + protected: + // All operations do nothing. + indexed_vertex_properties() { } + indexed_vertex_properties(std::size_t) { } + +public: + void clear() { } + void resize(std::size_t) { } + void reserve(std::size_t) { } +}; + +template +class indexed_edge_properties +{ +public: + typedef no_property edge_property_type; + typedef Property edge_bundled; + typedef Property edge_push_back_type; + typedef iterator_property_map< + typename std::vector::iterator, + IndexMap> edge_map_type; + typedef iterator_property_map< + typename std::vector::const_iterator, + IndexMap> const_edge_map_type; + + // Directly access a edge or edge bundle + Property& operator[](Descriptor v) + { return m_edge_properties[get(edge_index, derived(), v)]; } + + const Property& operator[](Descriptor v) const + { return m_edge_properties[get(edge_index, derived(), v)]; } + + edge_map_type get_edge_bundle(const IndexMap& index_map = IndexMap()) { + return edge_map_type(m_edge_properties.begin(), index_map); + } + + const_edge_map_type get_edge_bundle(const IndexMap& index_map = IndexMap()) const { + return const_edge_map_type(m_edge_properties.begin(), index_map); + } + +protected: + // Default-construct with no property values + indexed_edge_properties() {} + + // Initialize with n default-constructed property values + indexed_edge_properties(std::size_t n) : m_edge_properties(n) { } + + // Get the size of the properties vector + std::size_t size() const + { + return m_edge_properties.size(); + } + + // Clear the properties vector + void clear() + { + m_edge_properties.clear(); + } + + // Resize the properties vector + void resize(std::size_t n) + { + m_edge_properties.resize(n); + } + + // Reserve space in the vector of properties + void reserve(std::size_t n) + { + m_edge_properties.reserve(n); + } + + // Write an element by raw index + void write_by_index(std::size_t idx, const Property& prop) + { + m_edge_properties[idx] = prop; + } + + public: + // Add a new property value to the back + void push_back(const Property& prop) + { + m_edge_properties.push_back(prop); + } + + // Move range of properties backwards + void move_range(std::size_t src_begin, std::size_t src_end, std::size_t dest_begin) { + std::copy_backward( + m_edge_properties.begin() + src_begin, + m_edge_properties.begin() + src_end, + m_edge_properties.begin() + dest_begin + (src_end - src_begin)); + } + + typedef typename std::vector::iterator iterator; + iterator begin() {return m_edge_properties.begin();} + iterator end() {return m_edge_properties.end();} + + private: + // Access to the derived object + Derived& derived() { return *static_cast(this); } + + const Derived& derived() const + { return *static_cast(this); } + +public: // should be private, but friend templates not portable + std::vector m_edge_properties; +}; + +struct dummy_no_property_iterator +: public boost::iterator_facade { + mutable no_property prop; + no_property& dereference() const {return prop;} + bool equal(const dummy_no_property_iterator&) const {return true;} + void increment() {} + void decrement() {} + void advance(std::ptrdiff_t) {} + std::ptrdiff_t distance_to(const dummy_no_property_iterator) const {return 0;} +}; + +template +class indexed_edge_properties +{ + struct secret {}; + + public: + typedef no_property edge_property_type; + typedef void edge_bundled; + typedef void* edge_push_back_type; + typedef secret edge_map_type; + typedef secret const_edge_map_type; + + secret operator[](secret) { return secret(); } + void write_by_index(std::size_t idx, const no_property& prop) {} + + edge_map_type get_edge_bundle(const IndexMap& = IndexMap()) const { + return edge_map_type(); + } + + protected: + // All operations do nothing. + indexed_edge_properties() { } + indexed_edge_properties(std::size_t) { } + std::size_t size() const {return 0;} + void clear() { } + void resize(std::size_t) { } + void reserve(std::size_t) { } + + public: + void push_back(const edge_push_back_type&) { } + void move_range(std::size_t src_begin, std::size_t src_end, std::size_t dest_begin) {} + + typedef dummy_no_property_iterator iterator; + iterator begin() {return dummy_no_property_iterator();} + iterator end() {return dummy_no_property_iterator();} + +}; + +} +} + +#endif // BOOST_GRAPH_INDEXED_PROPERTIES_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/is_same.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/is_same.hpp new file mode 100644 index 0000000000..07330d301e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/is_same.hpp @@ -0,0 +1,48 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_DETAIL_IS_SAME_HPP +#define BOOST_GRAPH_DETAIL_IS_SAME_HPP + +// Deprecate the use of this header. +// TODO: Remove this file from trunk/release in 1.41/1.42. +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) +# pragma message ("Warning: This header is deprecated. Please use: boost/type_traits/is_same.hpp") +#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) +# warning "This header is deprecated. Please use: boost/type_traits/is_same.hpp" +#endif + +#include + +namespace boost { + struct false_tag; + struct true_tag; + + namespace graph_detail { + +#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + template + struct is_same { + typedef boost::false_tag is_same_tag; + }; + template + struct is_same { + typedef boost::true_tag is_same_tag; + }; +#else + template + struct is_same { + enum { Unum = U::num, Vnum = V::num }; + typedef typename mpl::if_c< (Unum == Vnum), + boost::true_tag, boost::false_tag>::type is_same_tag; + }; +#endif + } // namespace graph_detail +} // namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/labeled_graph_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/labeled_graph_traits.hpp new file mode 100644 index 0000000000..6eb1060937 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/labeled_graph_traits.hpp @@ -0,0 +1,237 @@ +// Copyright (C) 2009 Andrew Sutton + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_LABELED_GRAPH_TRAITS_HPP +#define BOOST_GRAPH_LABELED_GRAPH_TRAITS_HPP + +#include + +namespace boost { + +// Extend the graph mutability traits (and metafunctions) to include options +// for labeled graphs. + +// NOTE: the label_vertex tag denotes the fact that you can basically assign +// arbitrary labels to vertices without modifying the actual graph. + +// TODO: We might also overlay the uniqueness/multiplicity of labels in this +// hierarchy also. For now, we just assumed that labels are unique. + +struct label_vertex_tag { }; +struct labeled_add_vertex_tag : virtual label_vertex_tag { }; +struct labeled_add_vertex_property_tag : virtual labeled_add_vertex_tag { }; +struct labeled_remove_vertex_tag { }; +struct labeled_add_edge_tag : virtual label_vertex_tag { }; +struct labeled_add_edge_property_tag : virtual labeled_add_edge_tag{ }; +struct labeled_remove_edge_tag { }; + +struct labeled_mutable_vertex_graph_tag + : virtual labeled_add_vertex_tag, virtual labeled_remove_vertex_tag +{ }; +struct labeled_mutable_vertex_property_graph_tag + : virtual labeled_add_vertex_property_tag, virtual labeled_remove_vertex_tag +{ }; +struct labeled_mutable_edge_graph_tag + : virtual labeled_add_edge_tag, virtual labeled_remove_edge_tag +{ }; +struct labeled_mutable_edge_property_graph_tag + : virtual labeled_add_edge_property_tag, virtual labeled_remove_edge_tag +{ }; + +struct labeled_graph_tag + : virtual label_vertex_tag +{ }; +struct labeled_mutable_graph_tag + : virtual labeled_mutable_vertex_graph_tag + , virtual labeled_mutable_edge_graph_tag +{ }; +struct labeled_mutable_property_graph_tag + : virtual labeled_mutable_vertex_property_graph_tag + , virtual labeled_mutable_edge_property_graph_tag +{ }; +struct labeled_add_only_property_graph_tag + : virtual labeled_add_vertex_property_tag + , virtual labeled_mutable_edge_property_graph_tag +{ }; + +// Metafunctions + +template +struct graph_has_add_vertex_by_label + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + labeled_add_vertex_tag + >::value + > +{ }; + +template +struct graph_has_add_vertex_by_label_with_property + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + labeled_add_vertex_property_tag + >::value + > +{ }; + +template +struct graph_has_remove_vertex_by_label + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + labeled_remove_vertex_tag + >::value + > +{ }; + +template +struct graph_has_add_edge_by_label + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + labeled_add_edge_tag + >::value + > +{ }; + +template +struct graph_has_add_edge_by_label_with_property + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + labeled_add_edge_property_tag + >::value + > +{ }; + +template +struct graph_has_remove_edge_by_label + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + labeled_remove_edge_tag + >::value + > +{ }; + +template +struct is_labeled_mutable_vertex_graph + : mpl::and_< + graph_has_add_vertex_by_label, + graph_has_remove_vertex_by_label + > +{ }; + +template +struct is_labeled_mutable_vertex_property_graph + : mpl::and_< + graph_has_add_vertex_by_label, + graph_has_remove_vertex_by_label + > +{ }; + +template +struct is_labeled_mutable_edge_graph + : mpl::and_< + graph_has_add_edge_by_label, + graph_has_remove_edge_by_label + > +{ }; + +template +struct is_labeled_mutable_edge_property_graph + : mpl::and_< + graph_has_add_edge_by_label, + graph_has_remove_edge_by_label + > +{ }; + +template +struct is_labeled_mutable_graph + : mpl::and_< + is_labeled_mutable_vertex_graph, + is_labeled_mutable_edge_graph + > +{ }; + +template +struct is_labeled_mutable_property_graph + : mpl::and_< + is_labeled_mutable_vertex_property_graph, + is_labeled_mutable_edge_property_graph + > +{ }; + +template +struct is_labeled_add_only_property_graph + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + labeled_add_only_property_graph_tag + >::value + > +{ }; + +template +struct is_labeled_graph + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + label_vertex_tag + >::value + > +{ }; + +template struct graph_mutability_traits; + +namespace graph_detail { + // The determine mutability metafunction computes a labeled mutability tag + // based on the mutability of the given graph type. This is used by the + // graph_mutability_traits specialization below. + template + struct determine_mutability { + typedef typename mpl::if_< + is_add_only_property_graph, + labeled_add_only_property_graph_tag, + typename mpl::if_< + is_mutable_property_graph, + labeled_mutable_property_graph_tag, + typename mpl::if_< + is_mutable_graph, + labeled_mutable_graph_tag, + typename mpl::if_< + is_mutable_edge_graph, + labeled_graph_tag, + typename graph_mutability_traits::category + >::type + >::type + >::type + >::type type; + }; +} // namespace graph_detail + +#define LABELED_GRAPH_PARAMS typename G, typename L, typename S +#define LABELED_GRAPH labeled_graph + +// Specialize mutability traits for for the labeled graph. +// This specialization depends on the mutability of the underlying graph type. +// If the underlying graph is fully mutable, this this is also fully mutable. +// Otherwise, it's different. +template +struct graph_mutability_traits< LABELED_GRAPH > { + typedef typename graph_detail::determine_mutability< + typename LABELED_GRAPH::graph_type + >::type category; +}; + +#undef LABELED_GRAPH_PARAMS +#undef LABELED_GRAPH + +} // namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/list_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/list_base.hpp new file mode 100644 index 0000000000..88d831650b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/list_base.hpp @@ -0,0 +1,220 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_LIST_BASE_HPP +#define BOOST_LIST_BASE_HPP + +#include + +// Perhaps this should go through formal review, and move to . + +/* + An alternate interface idea: + Extend the std::list functionality by creating remove/insert + functions that do not require the container object! + */ + +namespace boost { + namespace detail { + + //========================================================================= + // Linked-List Generic Implementation Functions + + template + inline Node + slist_insert_after(Node pos, Node x, + Next next) + { + next(x) = next(pos); + next(pos) = x; + return x; + } + + // return next(pos) or next(next(pos)) ? + template + inline Node + slist_remove_after(Node pos, + Next next) + { + Node n = next(pos); + next(pos) = next(n); + return n; + } + + template + inline Node + slist_remove_range(Node before_first, Node last, + Next next) + { + next(before_first) = last; + return last; + } + + template + inline Node + slist_previous(Node head, Node x, Node nil, + Next next) + { + while (head != nil && next(head) != x) + head = next(head); + return head; + } + + template + inline void + slist_splice_after(Node pos, Node before_first, Node before_last, + Next next) + { + if (pos != before_first && pos != before_last) { + Node first = next(before_first); + Node after = next(pos); + next(before_first) = next(before_last); + next(pos) = first; + next(before_last) = after; + } + } + + template + inline Node + slist_reverse(Node node, Node nil, + Next next) + { + Node result = node; + node = next(node); + next(result) = nil; + while(node) { + Node next = next(node); + next(node) = result; + result = node; + node = next; + } + return result; + } + + template + inline std::size_t + slist_size(Node head, Node nil, + Next next) + { + std::size_t s = 0; + for ( ; head != nil; head = next(head)) + ++s; + return s; + } + + template + class slist_iterator_policies + { + public: + explicit slist_iterator_policies(const Next& n, const Data& d) + : m_next(n), m_data(d) { } + + template + Reference dereference(type, const Node& x) const + { return m_data(x); } + + template + void increment(Node& x) const + { x = m_next(x); } + + template + bool equal(Node& x, Node& y) const + { return x == y; } + + protected: + Next m_next; + Data m_data; + }; + + //=========================================================================== + // Doubly-Linked List Generic Implementation Functions + + template + inline void + dlist_insert_before(Node pos, Node x, + Next next, Prev prev) + { + next(x) = pos; + prev(x) = prev(pos); + next(prev(pos)) = x; + prev(pos) = x; + } + + template + void + dlist_remove(Node pos, + Next next, Prev prev) + { + Node next_node = next(pos); + Node prev_node = prev(pos); + next(prev_node) = next_node; + prev(next_node) = prev_node; + } + + // This deletes every node in the list except the + // sentinel node. + template + inline void + dlist_clear(Node sentinel, Delete del) + { + Node i, tmp; + i = next(sentinel); + while (i != sentinel) { + tmp = i; + i = next(i); + del(tmp); + } + } + + template + inline bool + dlist_empty(Node dummy) + { + return next(dummy) == dummy; + } + + template + void + dlist_transfer(Node pos, Node first, Node last, + Next next, Prev prev) + { + if (pos != last) { + // Remove [first,last) from its old position + next(prev(last)) = pos; + next(prev(first)) = last; + next(prev(pos)) = first; + + // Splice [first,last) into its new position + Node tmp = prev(pos); + prev(pos) = prev(last); + prev(last) = prev(first); + prev(first) = tmp; + } + } + + template + class dlist_iterator_policies + : public slist_iterator_policies + { + typedef slist_iterator_policies Base; + public: + template + void decrement(Node& x) const + { x = m_prev(x); } + + dlist_iterator_policies(Next n, Prev p, Data d) + : Base(n,d), m_prev(p) { } + protected: + Prev m_prev; + }; + + } // namespace detail +} // namespace boost + +#endif // BOOST_LIST_BASE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/permutation.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/permutation.hpp new file mode 100644 index 0000000000..f1db906ab1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/permutation.hpp @@ -0,0 +1,205 @@ +// (C) Copyright Jeremy Siek 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_PERMUTATION_HPP +#define BOOST_PERMUTATION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +template +void permute_serial(Iter1 permuter, Iter1 last, Iter2 result) +{ +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + typedef std::ptrdiff_t D: +#else + typedef typename std::iterator_traits::difference_type D; +#endif + + D n = 0; + while (permuter != last) { + std::swap(result[n], result[*permuter]); + ++n; + ++permuter; + } +} + +template +void permute_copy(InIter first, InIter last, RandIterP p, RandIterR result) +{ +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + typedef std::ptrdiff_t i = 0; +#else + typename std::iterator_traits::difference_type i = 0; +#endif + for (; first != last; ++first, ++i) + result[p[i]] = *first; +} + +namespace detail { + +template +void permute_helper(RandIter first, RandIter last, RandIterPerm p, D, T) +{ + D i = 0, pi, n = last - first, cycle_start; + T tmp; + std::vector visited(n, false); + + while (i != n) { // continue until all elements have been processed + cycle_start = i; + tmp = first[i]; + do { // walk around a cycle + pi = p[i]; + visited[pi] = true; + std::swap(tmp, first[pi]); + i = pi; + } while (i != cycle_start); + + // find the next cycle + for (i = 0; i < n; ++i) + if (visited[i] == false) + break; + } +} + +} // namespace detail + +template +void permute(RandIter first, RandIter last, RandIterPerm p) +{ + detail::permute_helper(first, last, p, last - first, *first); +} + + +// Knuth 1.3.3, Vol. 1 p 176 +// modified for zero-based arrays +// time complexity? +// +// WARNING: T must be a signed integer! +template +void invert_permutation(PermIter X, PermIter Xend) +{ +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + typedef std::ptrdiff_t T: +#else + typedef typename std::iterator_traits::value_type T; +#endif + T n = Xend - X; + T m = n; + T j = -1; + + while (m > 0) { + T i = X[m-1] + 1; + if (i > 0) { + do { + X[m-1] = j - 1; + j = -m; + m = i; + i = X[m-1] + 1; + } while (i > 0); + i = j; + } + X[m-1] = -i - 1; + --m; + } +} + +// Takes a "normal" permutation array (and its inverse), and turns it +// into a BLAS-style permutation array (which can be thought of as a +// serialized permutation). +template +inline void serialize_permutation(Iter1 q, Iter1 q_end, Iter2 q_inv, Iter3 p) +{ +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + typedef std::ptrdiff_t P1; + typedef std::ptrdiff_t P2; + typedef std::ptrdiff_t D; +#else + typedef typename std::iterator_traits::value_type P1; + typedef typename std::iterator_traits::value_type P2; + typedef typename std::iterator_traits::difference_type D; +#endif + D n = q_end - q; + for (D i = 0; i < n; ++i) { + P1 qi = q[i]; + P2 qii = q_inv[i]; + *p++ = qii; + std::swap(q[i], q[qii]); + std::swap(q_inv[i], q_inv[qi]); + } +} + +// Not used anymore, leaving it here for future reference. +template +void merge_sort(Iter first, Iter last, Compare cmp) +{ + if (first + 1 < last) { + Iter mid = first + (last - first)/2; + merge_sort(first, mid, cmp); + merge_sort(mid, last, cmp); + std::inplace_merge(first, mid, last, cmp); + } +} + + +// time: N log N + 3N + ? +// space: 2N +template +inline void sortp(Iter first, Iter last, IterP p, Cmp cmp, Alloc alloc) +{ + typedef typename std::iterator_traits::value_type P; + typedef typename std::iterator_traits::difference_type D; + D n = last - first; + std::vector q(n); + for (D i = 0; i < n; ++i) + q[i] = i; + std::sort(make_shadow_iter(first, q.begin()), + make_shadow_iter(last, q.end()), + shadow_cmp(cmp)); + invert_permutation(q.begin(), q.end()); + std::copy(q.begin(), q.end(), p); +} + +template +inline void sortp(Iter first, Iter last, IterP p, Cmp cmp) +{ + typedef typename std::iterator_traits::value_type P; + sortp(first, last, p, cmp, std::allocator

()); +} + +template +inline void sortp(Iter first, Iter last, IterP p) +{ + typedef typename std::iterator_traits::value_type T; + typedef typename std::iterator_traits::value_type P; + sortp(first, last, p, std::less(), std::allocator

()); +} + +template +inline void sortv(Iter first, Iter last, IterP p, Cmp cmp, Alloc alloc) +{ + typedef typename std::iterator_traits::value_type P; + typedef typename std::iterator_traits::difference_type D; + D n = last - first; + std::vector q(n), q_inv(n); + for (D i = 0; i < n; ++i) + q_inv[i] = i; + std::sort(make_shadow_iter(first, q_inv.begin()), + make_shadow_iter(last, q_inv.end()), + shadow_cmp(cmp)); + std::copy(q_inv, q_inv.end(), q.begin()); + invert_permutation(q.begin(), q.end()); + serialize_permutation(q.begin(), q.end(), q_inv.end(), p); +} + + +} // namespace boost + +#endif // BOOST_PERMUTATION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/read_graphviz_new.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/read_graphviz_new.hpp new file mode 100644 index 0000000000..7c7986dcbe --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/read_graphviz_new.hpp @@ -0,0 +1,108 @@ +// Copyright 2004-9 Trustees of Indiana University + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// +// read_graphviz_new.hpp - +// Initialize a model of the BGL's MutableGraph concept and an associated +// collection of property maps using a graph expressed in the GraphViz +// DOT Language. +// +// Based on the grammar found at: +// http://www.graphviz.org/cvs/doc/info/lang.html +// +// Jeremiah rewrite used grammar found at: +// http://www.graphviz.org/doc/info/lang.html +// and page 34 or http://www.graphviz.org/pdf/dotguide.pdf +// +// See documentation for this code at: +// http://www.boost.org/libs/graph/doc/read-graphviz.html +// + +// Author: Jeremiah Willcock +// Ronald Garcia +// + +#ifndef BOOST_READ_GRAPHVIZ_NEW_HPP +#define BOOST_READ_GRAPHVIZ_NEW_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace read_graphviz_detail { + typedef std::string node_name; + typedef std::string subgraph_name; + + typedef std::map properties; + + struct node_and_port { + node_name name; + std::string angle; // Or empty if no angle + std::vector location; // Up to two identifiers + + friend inline bool operator==(const node_and_port& a, const node_and_port& b) { + return a.name == b.name && + a.angle == b.angle && + a.location == b.location; + } + + friend inline bool operator<(const node_and_port& a, const node_and_port& b) { + if (a.name != b.name) return a.name < b.name; + if (a.angle != b.angle) return a.angle < b.angle; + return a.location < b.location; + } + }; + + struct edge_info { + node_and_port source; + node_and_port target; + properties props; + }; + + struct parser_result { + bool graph_is_directed; + bool graph_is_strict; + std::map nodes; // Global set + std::vector edges; + std::map graph_props; // Root and subgraphs + }; + + // The actual parser, from libs/graph/src/read_graphviz_new.cpp + void parse_graphviz_from_string(const std::string& str, parser_result& result, bool want_directed); + + // Translate from those results to a graph + void translate_results_to_graph(const parser_result& r, ::boost::detail::graph::mutate_graph* mg); + +} // namespace read_graphviz_detail + +namespace detail { + namespace graph { + BOOST_GRAPH_DECL bool read_graphviz_new(const std::string& str, boost::detail::graph::mutate_graph* mg); + } // end namespace graph +} // end namespace detail + +template +bool read_graphviz_new(const std::string& str, + MutableGraph& graph, boost::dynamic_properties& dp, + std::string const& node_id = "node_id") { + boost::detail::graph::mutate_graph_impl mg(graph, dp, node_id); + return detail::graph::read_graphviz_new(str, &mg); +} + +} // namespace boost + +#endif // BOOST_READ_GRAPHVIZ_NEW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/read_graphviz_spirit.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/read_graphviz_spirit.hpp new file mode 100644 index 0000000000..4e8b22e5eb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/read_graphviz_spirit.hpp @@ -0,0 +1,612 @@ +// Copyright 2004-9 Trustees of Indiana University + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// +// read_graphviz_spirit.hpp - +// Initialize a model of the BGL's MutableGraph concept and an associated +// collection of property maps using a graph expressed in the GraphViz +// DOT Language. +// +// Based on the grammar found at: +// http://www.graphviz.org/cvs/doc/info/lang.html +// +// See documentation for this code at: +// http://www.boost.org/libs/graph/doc/read-graphviz.html +// + +// Author: Ronald Garcia +// + +#ifndef BOOST_READ_GRAPHVIZ_SPIRIT_HPP +#define BOOST_READ_GRAPHVIZ_SPIRIT_HPP + +// Phoenix/Spirit set these limits to 3, but I need more. +#define PHOENIX_LIMIT 6 +#define BOOST_SPIRIT_CLOSURE_LIMIT 6 + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for std::exception +#include +#include +#include +#include +#include +#include +#include + +namespace phoenix { +// Workaround: std::map::operator[] uses a different return type than all +// other standard containers. Phoenix doesn't account for that. +template +struct binary_operator, T1> +{ + typedef typename std::map::mapped_type& result_type; + static result_type eval(std::map& container, T1 const& index) + { return container[index]; } +}; +} // namespace phoenix + +namespace boost { +namespace detail { +namespace graph { + + +///////////////////////////////////////////////////////////////////////////// +// Application-specific type definitions +///////////////////////////////////////////////////////////////////////////// + +typedef std::set edges_t; +typedef std::set nodes_t; +typedef std::set ids_t; +typedef std::map edge_map_t; +typedef std::map node_map_t; +typedef std::map props_t; +typedef std::map subgraph_props_t; +typedef boost::function2 actor_t; +typedef std::vector edge_stack_t; +typedef std::map subgraph_nodes_t; +typedef std::map subgraph_edges_t; + + + +///////////////////////////////////////////////////////////////////////////// +// Stack frames used by semantic actions +///////////////////////////////////////////////////////////////////////////// +struct id_closure : boost::spirit::classic::closure { + member1 name; +}; + + +struct node_id_closure : boost::spirit::classic::closure { + member1 name; +}; + +struct attr_list_closure : boost::spirit::classic::closure { + member1 prop_actor; +}; + +struct property_closure : boost::spirit::classic::closure { + member1 key; + member2 value; +}; + +struct data_stmt_closure : boost::spirit::classic::closure { + member1 sources; + member2 dests; + member3 edge_stack; + member4 saw_node; + member5 active_node; +}; + +struct subgraph_closure : boost::spirit::classic::closure { + member1 nodes; + member2 edges; + member3 name; +}; + +///////////////////////////////////////////////////////////////////////////// +// Grammar and Actions for the DOT Language +///////////////////////////////////////////////////////////////////////////// + +// Grammar for a dot file. +struct dot_grammar : public boost::spirit::classic::grammar { + mutate_graph& graph_; + explicit dot_grammar(mutate_graph& graph) : graph_(graph) { } + + template + struct definition { + + definition(dot_grammar const& self) : self(self), subgraph_depth(0), + keyword_p("0-9a-zA-Z_") { + using namespace boost::spirit::classic; + using namespace phoenix; + + // RG - Future Work + // - Handle multi-line strings using \ line continuation + // - Make keywords case insensitive + ID + = ( lexeme_d[((alpha_p | ch_p('_')) >> *(alnum_p | ch_p('_')))] + | real_p + | lexeme_d[confix_p('"', *c_escape_ch_p, '"')] + | comment_nest_p('<', '>') + )[ID.name = construct_(arg1,arg2)] + ; + + a_list + = list_p( ID[(a_list.key = arg1), + (a_list.value = "true") + ] + >> !( ch_p('=') + >> ID[a_list.value = arg1]) + [phoenix::bind(&definition::call_prop_actor) + (var(*this),a_list.key,a_list.value)],!ch_p(',')); + + attr_list = +(ch_p('[') >> !a_list >> ch_p(']')); + + // RG - disregard port id's for now. + port_location + = (ch_p(':') >> ID) + | (ch_p(':') >> ch_p('(') >> ID >> ch_p(',') >> ID >> ch_p(')')) + ; + + port_angle = ch_p('@') >> ID; + + port + = port_location >> (!port_angle) + | port_angle >> (!port_location); + + + node_id + = ( ID[node_id.name = arg1] >> (!port) ) + [phoenix::bind(&definition::memoize_node)(var(*this))]; + + graph_stmt + = (ID[graph_stmt.key = arg1] >> + ch_p('=') >> + ID[graph_stmt.value = arg1]) + [phoenix::bind(&definition::call_graph_prop) + (var(*this),graph_stmt.key,graph_stmt.value)] + ; // Graph property. + + attr_stmt + = (as_lower_d[keyword_p("graph")] + >> attr_list(actor_t(phoenix::bind(&definition::default_graph_prop) + (var(*this),arg1,arg2)))) + | (as_lower_d[keyword_p("node")] + >> attr_list(actor_t(phoenix::bind(&definition::default_node_prop) + (var(*this),arg1,arg2)))) + | (as_lower_d[keyword_p("edge")] + >> attr_list(actor_t(phoenix::bind(&definition::default_edge_prop) + (var(*this),arg1,arg2)))) + ; + + // edge_head is set depending on the graph type (directed/undirected) + edgeop = ch_p('-') >> ch_p(boost::ref(edge_head)); + + edgeRHS + = +( edgeop[(data_stmt.sources = data_stmt.dests), + (data_stmt.dests = construct_())] + >> ( subgraph[data_stmt.dests = arg1] + | node_id[phoenix::bind(&definition::insert_node) + (var(*this),data_stmt.dests,arg1)] + ) + [phoenix::bind(&definition::activate_edge) + (var(*this),data_stmt.sources,data_stmt.dests, + var(edges), var(default_edge_props))] + ); + + + // To avoid backtracking, edge, node, and subgraph statements are + // processed as one nonterminal. + data_stmt + = ( subgraph[(data_stmt.dests = arg1),// will get moved in rhs + (data_stmt.saw_node = false)] + | node_id[(phoenix::bind(&definition::insert_node) + (var(*this),data_stmt.dests,arg1)), + (data_stmt.saw_node = true), +#ifdef BOOST_GRAPH_DEBUG + (std::cout << val("AcTive Node: ") << arg1 << "\n"), +#endif // BOOST_GRAPH_DEBUG + (data_stmt.active_node = arg1)] + ) >> if_p(edgeRHS)[ + !attr_list( + actor_t(phoenix::bind(&definition::edge_prop) + (var(*this),arg1,arg2))) + ].else_p[ + if_p(data_stmt.saw_node)[ + !attr_list( + actor_t(phoenix::bind(&definition::node_prop) + (var(*this),arg1,arg2))) + ] // otherwise it's a subgraph, nothing more to do. + ]; + + + stmt + = graph_stmt + | attr_stmt + | data_stmt + ; + + stmt_list = *( stmt >> !ch_p(';') ); + + subgraph + = !( as_lower_d[keyword_p("subgraph")] + >> (!ID[(subgraph.name = arg1), + (subgraph.nodes = (var(subgraph_nodes))[arg1]), + (subgraph.edges = (var(subgraph_edges))[arg1])]) + ) + >> ch_p('{')[++var(subgraph_depth)] + >> stmt_list + >> ch_p('}')[--var(subgraph_depth)] + [(var(subgraph_nodes))[subgraph.name] = subgraph.nodes] + [(var(subgraph_edges))[subgraph.name] = subgraph.edges] + + | as_lower_d[keyword_p("subgraph")] + >> ID[(subgraph.nodes = (var(subgraph_nodes))[arg1]), + (subgraph.edges = (var(subgraph_edges))[arg1])] + ; + + the_grammar + = (!as_lower_d[keyword_p("strict")]) + >> ( as_lower_d[keyword_p("graph")][ + (var(edge_head) = '-'), + (phoenix::bind(&definition::check_undirected)(var(*this)))] + | as_lower_d[keyword_p("digraph")][ + (var(edge_head) = '>'), + (phoenix::bind(&definition::check_directed)(var(*this)))] + ) + >> (!ID) >> ch_p('{') >> stmt_list >> ch_p('}'); + + } // definition() + + typedef boost::spirit::classic::rule rule_t; + + rule_t const& start() const { return the_grammar; } + + + // + // Semantic actions + // + + void check_undirected() { + if(self.graph_.is_directed()) + boost::throw_exception(boost::undirected_graph_error()); + } + + void check_directed() { + if(!self.graph_.is_directed()) + boost::throw_exception(boost::directed_graph_error()); + } + + void memoize_node() { + id_t const& node = node_id.name(); + props_t& node_props = default_node_props; + + if(nodes.find(node) == nodes.end()) { + nodes.insert(node); + self.graph_.do_add_vertex(node); + + node_map.insert(std::make_pair(node,ids_t())); + +#ifdef BOOST_GRAPH_DEBUG + std::cout << "Add new node " << node << std::endl; +#endif // BOOST_GRAPH_DEBUG + // Set the default properties for this edge + // RG: Here I would actually set the properties + for(props_t::iterator i = node_props.begin(); + i != node_props.end(); ++i) { + set_node_property(node,i->first,i->second); + } + if(subgraph_depth > 0) { + subgraph.nodes().insert(node); + // Set the subgraph's default properties as well + props_t& props = subgraph_node_props[subgraph.name()]; + for(props_t::iterator i = props.begin(); i != props.end(); ++i) { + set_node_property(node,i->first,i->second); + } + } + } else { +#ifdef BOOST_GRAPH_DEBUG + std::cout << "See node " << node << std::endl; +#endif // BOOST_GRAPH_DEBUG + } + } + + void activate_edge(nodes_t& sources, nodes_t& dests, edges_t& edges, + props_t& edge_props) { + edge_stack_t& edge_stack = data_stmt.edge_stack(); + for(nodes_t::iterator i = sources.begin(); i != sources.end(); ++i) { + for(nodes_t::iterator j = dests.begin(); j != dests.end(); ++j) { + // Create the edge and push onto the edge stack. +#ifdef BOOST_GRAPH_DEBUG + std::cout << "Edge " << *i << " to " << *j << std::endl; +#endif // BOOST_GRAPH_DEBUG + + edge_t edge = edge_t::new_edge(); + edge_stack.push_back(edge); + edges.insert(edge); + edge_map.insert(std::make_pair(edge,ids_t())); + + // Add the real edge. + self.graph_.do_add_edge(edge, *i, *j); + + // Set the default properties for this edge + for(props_t::iterator k = edge_props.begin(); + k != edge_props.end(); ++k) { + set_edge_property(edge,k->first,k->second); + } + if(subgraph_depth > 0) { + subgraph.edges().insert(edge); + // Set the subgraph's default properties as well + props_t& props = subgraph_edge_props[subgraph.name()]; + for(props_t::iterator k = props.begin(); k != props.end(); ++k) { + set_edge_property(edge,k->first,k->second); + } + } + } + } + } + + // node_prop - Assign the property for the current active node. + void node_prop(id_t const& key, id_t const& value) { + node_t& active_object = data_stmt.active_node(); + set_node_property(active_object, key, value); + } + + // edge_prop - Assign the property for the current active edges. + void edge_prop(id_t const& key, id_t const& value) { + edge_stack_t const& active_edges_ = data_stmt.edge_stack(); + for (edge_stack_t::const_iterator i = active_edges_.begin(); + i != active_edges_.end(); ++i) { + set_edge_property(*i,key,value); + } + } + + // default_graph_prop - Store as a graph property. + void default_graph_prop(id_t const& key, id_t const& value) { +#ifdef BOOST_GRAPH_DEBUG + std::cout << key << " = " << value << std::endl; +#endif // BOOST_GRAPH_DEBUG + self.graph_.set_graph_property(key, value); + } + + // default_node_prop - declare default properties for any future new nodes + void default_node_prop(id_t const& key, id_t const& value) { + nodes_t& nodes_ = + subgraph_depth == 0 ? nodes : subgraph.nodes(); + props_t& node_props_ = + subgraph_depth == 0 ? + default_node_props : + subgraph_node_props[subgraph.name()]; + + // add this to the selected list of default node properties. + node_props_[key] = value; + // for each node, set its property to default-constructed value + // if it hasn't been set already. + // set the dynamic property map value + for(nodes_t::iterator i = nodes_.begin(); i != nodes_.end(); ++i) + if(node_map[*i].find(key) == node_map[*i].end()) { + set_node_property(*i,key,id_t()); + } + } + + // default_edge_prop - declare default properties for any future new edges + void default_edge_prop(id_t const& key, id_t const& value) { + edges_t& edges_ = + subgraph_depth == 0 ? edges : subgraph.edges(); + props_t& edge_props_ = + subgraph_depth == 0 ? + default_edge_props : + subgraph_edge_props[subgraph.name()]; + + // add this to the list of default edge properties. + edge_props_[key] = value; + // for each edge, set its property to be empty string + // set the dynamic property map value + for(edges_t::iterator i = edges_.begin(); i != edges_.end(); ++i) + if(edge_map[*i].find(key) == edge_map[*i].end()) + set_edge_property(*i,key,id_t()); + } + + // helper function + void insert_node(nodes_t& nodes, id_t const& name) { + nodes.insert(name); + } + + void call_prop_actor(std::string const& lhs, std::string const& rhs) { + actor_t& actor = attr_list.prop_actor(); + // If first and last characters of the rhs are double-quotes, + // remove them. + if (!rhs.empty() && rhs[0] == '"' && rhs[rhs.size() - 1] == '"') + actor(lhs, rhs.substr(1, rhs.size()-2)); + else + actor(lhs,rhs); + } + + void call_graph_prop(std::string const& lhs, std::string const& rhs) { + // If first and last characters of the rhs are double-quotes, + // remove them. + if (!rhs.empty() && rhs[0] == '"' && rhs[rhs.size() - 1] == '"') + this->default_graph_prop(lhs, rhs.substr(1, rhs.size()-2)); + else + this->default_graph_prop(lhs,rhs); + } + + void set_node_property(node_t const& node, id_t const& key, + id_t const& value) { + + // Add the property key to the "set" table to avoid default overwrite + node_map[node].insert(key); + // Set the user's property map + self.graph_.set_node_property(key, node, value); +#ifdef BOOST_GRAPH_DEBUG + // Tell the world + std::cout << node << ": " << key << " = " << value << std::endl; +#endif // BOOST_GRAPH_DEBUG + } + + void set_edge_property(edge_t const& edge, id_t const& key, + id_t const& value) { + + // Add the property key to the "set" table to avoid default overwrite + edge_map[edge].insert(key); + // Set the user's property map + self.graph_.set_edge_property(key, edge, value); +#ifdef BOOST_GRAPH_DEBUG + // Tell the world +#if 0 // RG - edge representation changed, + std::cout << "(" << edge.first << "," << edge.second << "): " +#else + std::cout << "an edge: " +#endif // 0 + << key << " = " << value << std::endl; +#endif // BOOST_GRAPH_DEBUG + } + + // Variables explicitly initialized + dot_grammar const& self; + // if subgraph_depth > 0, then we're processing a subgraph. + int subgraph_depth; + + // Keywords; + const boost::spirit::classic::distinct_parser<> keyword_p; + // + // rules that make up the grammar + // + boost::spirit::classic::rule ID; + boost::spirit::classic::rule a_list; + boost::spirit::classic::rule attr_list; + rule_t port_location; + rule_t port_angle; + rule_t port; + boost::spirit::classic::rule node_id; + boost::spirit::classic::rule graph_stmt; + rule_t attr_stmt; + boost::spirit::classic::rule data_stmt; + boost::spirit::classic::rule subgraph; + rule_t edgeop; + rule_t edgeRHS; + rule_t stmt; + rule_t stmt_list; + rule_t the_grammar; + + + // The grammar uses edge_head to dynamically set the syntax for edges + // directed graphs: edge_head = '>', and so edgeop = "->" + // undirected graphs: edge_head = '-', and so edgeop = "--" + char edge_head; + + + // + // Support data structures + // + + nodes_t nodes; // list of node names seen + edges_t edges; // list of edges seen + node_map_t node_map; // remember the properties set for each node + edge_map_t edge_map; // remember the properties set for each edge + + subgraph_nodes_t subgraph_nodes; // per-subgraph lists of nodes + subgraph_edges_t subgraph_edges; // per-subgraph lists of edges + + props_t default_node_props; // global default node properties + props_t default_edge_props; // global default edge properties + subgraph_props_t subgraph_node_props; // per-subgraph default node properties + subgraph_props_t subgraph_edge_props; // per-subgraph default edge properties + }; // struct definition +}; // struct dot_grammar + + + +// +// dot_skipper - GraphViz whitespace and comment skipper +// +struct dot_skipper : public boost::spirit::classic::grammar +{ + dot_skipper() {} + + template + struct definition + { + definition(dot_skipper const& /*self*/) { + using namespace boost::spirit::classic; + using namespace phoenix; + // comment forms + skip = eol_p >> comment_p("#") + | space_p + | comment_p("//") +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) + | confix_p(str_p("/*") ,*anychar_p, str_p("*/")) +#else + | confix_p("/*" ,*anychar_p, "*/") +#endif + ; + +#ifdef BOOST_SPIRIT_DEBUG + BOOST_SPIRIT_DEBUG_RULE(skip); +#endif + } + + boost::spirit::classic::rule skip; + boost::spirit::classic::rule const& + start() const { return skip; } + }; // definition +}; // dot_skipper + +} // namespace graph +} // namespace detail + +template +bool read_graphviz_spirit(MultiPassIterator begin, MultiPassIterator end, + MutableGraph& graph, dynamic_properties& dp, + std::string const& node_id = "node_id") { + using namespace boost; + using namespace boost::spirit::classic; + + typedef MultiPassIterator iterator_t; + typedef skip_parser_iteration_policy< boost::detail::graph::dot_skipper> + iter_policy_t; + typedef scanner_policies scanner_policies_t; + typedef scanner scanner_t; + + ::boost::detail::graph::mutate_graph_impl + m_graph(graph, dp, node_id); + + ::boost::detail::graph::dot_grammar p(m_graph); + ::boost::detail::graph::dot_skipper skip_p; + + iter_policy_t iter_policy(skip_p); + scanner_policies_t policies(iter_policy); + + scanner_t scan(begin, end, policies); + + return p.parse(scan); +} + +} // namespace boost + +#endif // BOOST_READ_GRAPHVIZ_SPIRIT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/self_avoiding_walk.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/self_avoiding_walk.hpp new file mode 100644 index 0000000000..c171897f22 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/self_avoiding_walk.hpp @@ -0,0 +1,418 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_SELF_AVOIDING_WALK_HPP +#define BOOST_SELF_AVOIDING_WALK_HPP + +/* + This file defines necessary components for SAW. + + mesh language: (defined by myself to clearify what is what) + A triangle in mesh is called an triangle. + An edge in mesh is called an line. + A vertex in mesh is called a point. + + A triangular mesh corresponds to a graph in which a vertex is a + triangle and an edge(u, v) stands for triangle u and triangle v + share an line. + + After this point, a vertex always refers to vertex in graph, + therefore it is a traingle in mesh. + + */ + +#include +#include +#include +#include + +#define SAW_SENTINAL -1 + +namespace boost { + + template + struct triple { + T1 first; + T2 second; + T3 third; + triple(const T1& a, const T2& b, const T3& c) : first(a), second(b), third(c) {} + triple() : first(SAW_SENTINAL), second(SAW_SENTINAL), third(SAW_SENTINAL) {} + }; + + typedef triple Triple; + + /* Define a vertex property which has a triangle inside. Triangle is + represented by a triple. */ + struct triangle_tag { enum { num = 100 }; }; + typedef property triangle_property; + + /* Define an edge property with a line. A line is represented by a + pair. This is not required for SAW though. + */ + struct line_tag { enum { num = 101 }; }; + template struct line_property + : public property > { }; + + /*Precondition: Points in a Triangle are in order */ + template + inline void get_sharing(const Triangle& a, const Triangle& b, Line& l) + { + l.first = SAW_SENTINAL; + l.second = SAW_SENTINAL; + + if ( a.first == b.first ) { + l.first = a.first; + if ( a.second == b.second || a.second == b.third ) + l.second = a.second; + else if ( a.third == b.second || a.third == b.third ) + l.second = a.third; + + } else if ( a.first == b.second ) { + l.first = a.first; + if ( a.second == b.third ) + l.second = a.second; + else if ( a.third == b.third ) + l.second = a.third; + + } else if ( a.first == b.third ) { + l.first = a.first; + + + } else if ( a.second == b.first ) { + l.first = a.second; + if ( a.third == b.second || a.third == b.third ) + l.second = a.third; + + } else if ( a.second == b.second ) { + l.first = a.second; + if ( a.third == b.third ) + l.second = a.third; + + } else if ( a.second == b.third ) { + l.first = a.second; + + + } else if ( a.third == b.first + || a.third == b.second + || a.third == b.third ) + l.first = a.third; + + /*Make it in order*/ + if ( l.first > l.second ) { + typename Line::first_type i = l.first; + l.first = l.second; + l.second = i; + } + + } + + template + struct get_vertex_sharing { + typedef std::pair Pair; + get_vertex_sharing(const TriangleDecorator& _td) : td(_td) {} + inline Line operator()(const Vertex& u, const Vertex& v) const { + Line l; + get_sharing(td[u], td[v], l); + return l; + } + inline Line operator()(const Pair& u, const Vertex& v) const { + Line l; + get_sharing(td[u.first], td[v], l); + return l; + } + inline Line operator()(const Pair& u, const Pair& v) const { + Line l; + get_sharing(td[u.first], td[v.first], l); + return l; + } + TriangleDecorator td; + }; + + /* HList has to be a handle of data holder so that pass-by-value is + * in right logic. + * + * The element of HList is a pair of vertex and line. (remember a + * line is a pair of two ints.). That indicates the walk w from + * current vertex is across line. (If the first of line is -1, it is + * a point though. + */ + template < class TriangleDecorator, class HList, class IteratorD> + class SAW_visitor + : public bfs_visitor<>, public dfs_visitor<> + { + typedef typename boost::property_traits::value_type iter; + /*use boost shared_ptr*/ + typedef typename HList::element_type::value_type::second_type Line; + public: + + typedef tree_edge_tag category; + + inline SAW_visitor(TriangleDecorator _td, HList _hlist, IteratorD ia) + : td(_td), hlist(_hlist), iter_d(ia) {} + + template + inline void start_vertex(Vertex v, Graph&) { + Line l1; + l1.first = SAW_SENTINAL; + l1.second = SAW_SENTINAL; + hlist->push_front(std::make_pair(v, l1)); + iter_d[v] = hlist->begin(); + } + + /*Several symbols: + w(i): i-th triangle in walk w + w(i) |- w(i+1): w enter w(i+1) from w(i) over a line + w(i) ~> w(i+1): w enter w(i+1) from w(i) over a point + w(i) -> w(i+1): w enter w(i+1) from w(i) + w(i) ^ w(i+1): the line or point w go over from w(i) to w(i+1) + */ + template + bool tree_edge(Edge e, Graph& G) { + using std::make_pair; + typedef typename boost::graph_traits::vertex_descriptor Vertex; + Vertex tau = target(e, G); + Vertex i = source(e, G); + + get_vertex_sharing get_sharing_line(td); + + Line tau_i = get_sharing_line(tau, i); + + iter w_end = hlist->end(); + + iter w_i = iter_d[i]; + + iter w_i_m_1 = w_i; + iter w_i_p_1 = w_i; + + /*---------------------------------------------------------- + * true false + *========================================================== + *a w(i-1) |- w(i) w(i-1) ~> w(i) or w(i-1) is null + *---------------------------------------------------------- + *b w(i) |- w(i+1) w(i) ~> w(i+1) or no w(i+1) yet + *---------------------------------------------------------- + */ + + bool a = false, b = false; + + --w_i_m_1; + ++w_i_p_1; + b = ( w_i->second.first != SAW_SENTINAL ); + + if ( w_i_m_1 != w_end ) { + a = ( w_i_m_1->second.first != SAW_SENTINAL ); + } + + if ( a ) { + + if ( b ) { + /*Case 1: + + w(i-1) |- w(i) |- w(i+1) + */ + Line l1 = get_sharing_line(*w_i_m_1, tau); + + iter w_i_m_2 = w_i_m_1; + --w_i_m_2; + + bool c = true; + + if ( w_i_m_2 != w_end ) { + c = w_i_m_2->second != l1; + } + + if ( c ) { /* w(i-1) ^ tau != w(i-2) ^ w(i-1) */ + /*extension: w(i-1) -> tau |- w(i) */ + w_i_m_1->second = l1; + /*insert(pos, const T&) is to insert before pos*/ + iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); + + } else { /* w(i-1) ^ tau == w(i-2) ^ w(i-1) */ + /*must be w(i-2) ~> w(i-1) */ + + bool d = true; + //need to handle the case when w_i_p_1 is null + Line l3 = get_sharing_line(*w_i_p_1, tau); + if ( w_i_p_1 != w_end ) + d = w_i_p_1->second != l3; + if ( d ) { /* w(i+1) ^ tau != w(i+1) ^ w(i+2) */ + /*extension: w(i) |- tau -> w(i+1) */ + w_i->second = tau_i; + iter_d[tau] = hlist->insert(w_i_p_1, make_pair(tau, l3)); + } else { /* w(i+1) ^ tau == w(i+1) ^ w(i+2) */ + /*must be w(1+1) ~> w(i+2) */ + Line l5 = get_sharing_line(*w_i_m_1, *w_i_p_1); + if ( l5 != w_i_p_1->second ) { /* w(i-1) ^ w(i+1) != w(i+1) ^ w(i+2) */ + /*extension: w(i-2) -> tau |- w(i) |- w(i-1) -> w(i+1) */ + w_i_m_2->second = get_sharing_line(*w_i_m_2, tau); + iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); + w_i->second = w_i_m_1->second; + w_i_m_1->second = l5; + iter_d[w_i_m_1->first] = hlist->insert(w_i_p_1, *w_i_m_1); + hlist->erase(w_i_m_1); + } else { + /*mesh is tetrahedral*/ + // dont know what that means. + ; + } + } + + } + } else { + /*Case 2: + + w(i-1) |- w(i) ~> w(1+1) + */ + + if ( w_i->second.second == tau_i.first + || w_i->second.second == tau_i.second ) { /*w(i) ^ w(i+1) < w(i) ^ tau*/ + /*extension: w(i) |- tau -> w(i+1) */ + w_i->second = tau_i; + Line l1 = get_sharing_line(*w_i_p_1, tau); + iter_d[tau] = hlist->insert(w_i_p_1, make_pair(tau, l1)); + } else { /*w(i) ^ w(i+1) !< w(i) ^ tau*/ + Line l1 = get_sharing_line(*w_i_m_1, tau); + bool c = true; + iter w_i_m_2 = w_i_m_1; + --w_i_m_2; + if ( w_i_m_2 != w_end ) + c = l1 != w_i_m_2->second; + if (c) { /*w(i-1) ^ tau != w(i-2) ^ w(i-1)*/ + /*extension: w(i-1) -> tau |- w(i)*/ + w_i_m_1->second = l1; + iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); + } else { /*w(i-1) ^ tau == w(i-2) ^ w(i-1)*/ + /*must be w(i-2)~>w(i-1)*/ + /*extension: w(i-2) -> tau |- w(i) |- w(i-1) -> w(i+1)*/ + w_i_m_2->second = get_sharing_line(*w_i_m_2, tau); + iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); + w_i->second = w_i_m_1->second; + w_i_m_1->second = get_sharing_line(*w_i_m_1, *w_i_p_1); + iter_d[w_i_m_1->first] = hlist->insert(w_i_p_1, *w_i_m_1); + hlist->erase(w_i_m_1); + } + + } + + } + + } else { + + if ( b ) { + /*Case 3: + + w(i-1) ~> w(i) |- w(i+1) + */ + bool c = false; + if ( w_i_m_1 != w_end ) + c = ( w_i_m_1->second.second == tau_i.first) + || ( w_i_m_1->second.second == tau_i.second); + + if ( c ) { /*w(i-1) ^ w(i) < w(i) ^ tau*/ + /* extension: w(i-1) -> tau |- w(i) */ + if ( w_i_m_1 != w_end ) + w_i_m_1->second = get_sharing_line(*w_i_m_1, tau); + iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); + } else { + bool d = true; + Line l1; + l1.first = SAW_SENTINAL; + l1.second = SAW_SENTINAL; + if ( w_i_p_1 != w_end ) { + l1 = get_sharing_line(*w_i_p_1, tau); + d = l1 != w_i_p_1->second; + } + if (d) { /*w(i+1) ^ tau != w(i+1) ^ w(i+2)*/ + /*extension: w(i) |- tau -> w(i+1) */ + w_i->second = tau_i; + iter_d[tau] = hlist->insert(w_i_p_1, make_pair(tau, l1)); + } else { + /*must be w(i+1) ~> w(i+2)*/ + /*extension: w(i-1) -> w(i+1) |- w(i) |- tau -> w(i+2) */ + iter w_i_p_2 = w_i_p_1; + ++w_i_p_2; + + w_i_p_1->second = w_i->second; + iter_d[i] = hlist->insert(w_i_p_2, make_pair(i, tau_i)); + hlist->erase(w_i); + Line l2 = get_sharing_line(*w_i_p_2, tau); + iter_d[tau] = hlist->insert(w_i_p_2, make_pair(tau, l2)); + } + } + + } else { + /*Case 4: + + w(i-1) ~> w(i) ~> w(i+1) + + */ + bool c = false; + if ( w_i_m_1 != w_end ) { + c = (w_i_m_1->second.second == tau_i.first) + || (w_i_m_1->second.second == tau_i.second); + } + if ( c ) { /*w(i-1) ^ w(i) < w(i) ^ tau */ + /*extension: w(i-1) -> tau |- w(i) */ + if ( w_i_m_1 != w_end ) + w_i_m_1->second = get_sharing_line(*w_i_m_1, tau); + iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); + } else { + /*extension: w(i) |- tau -> w(i+1) */ + w_i->second = tau_i; + Line l1; + l1.first = SAW_SENTINAL; + l1.second = SAW_SENTINAL; + if ( w_i_p_1 != w_end ) + l1 = get_sharing_line(*w_i_p_1, tau); + iter_d[tau] = hlist->insert(w_i_p_1, make_pair(tau, l1)); + } + } + + } + + return true; + } + + protected: + TriangleDecorator td; /*a decorator for vertex*/ + HList hlist; + /*This must be a handle of list to record the SAW + The element type of the list is pair + */ + + IteratorD iter_d; + /*Problem statement: Need a fast access to w for triangle i. + *Possible solution: mantain an array to record. + iter_d[i] will return an iterator + which points to w(i), where i is a vertex + representing triangle i. + */ + }; + + template + inline + SAW_visitor + visit_SAW(Triangle t, HList hl, Iterator i) { + return SAW_visitor(t, hl, i); + } + + template + inline + SAW_visitor< random_access_iterator_property_map, + HList, random_access_iterator_property_map > + visit_SAW_ptr(Tri* t, HList hl, Iter* i) { + typedef random_access_iterator_property_map TriD; + typedef random_access_iterator_property_map IterD; + return SAW_visitor(t, hl, i); + } + + // should also have combo's of pointers, and also const :( + +} + +#endif /*BOOST_SAW_H*/ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/set_adaptor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/set_adaptor.hpp new file mode 100644 index 0000000000..90a64a2cd4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/set_adaptor.hpp @@ -0,0 +1,123 @@ +// (C) Copyright Jeremy Siek 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_SET_ADAPTOR_HPP +#define BOOST_SET_ADAPTOR_HPP + +#include +#include + +namespace boost { + + template + bool set_contains(const std::set& s, const T& x) { + return s.find(x) != s.end(); + } + + template + bool set_contains(const boost::unordered_set& s, const T& x) { + return s.find(x) != s.end(); + } + + template + bool set_equal(const std::set& x, + const std::set& y) + { + return x == y; + } + + // Not the same as lexicographical_compare_3way applied to std::set. + // this is equivalent semantically to bitset::operator<() + template + int set_lex_order(const std::set& x, + const std::set& y) + { + typename std::set::iterator + xi = x.begin(), yi = y.begin(), xend = x.end(), yend = y.end(); + for (; xi != xend && yi != yend; ++xi, ++yi) { + if (*xi < *yi) + return 1; + else if (*yi < *xi) + return -1; + } + if (xi == xend) + return (yi == yend) ? 0 : -1; + else + return 1; + } + + template + void set_clear(std::set& x) { + x.clear(); + } + + template + bool set_empty(const std::set& x) { + return x.empty(); + } + + template + void set_insert(std::set& x, const T& a) { + x.insert(a); + } + + template + void set_remove(std::set& x, const T& a) { + x.erase(a); + } + + template + void set_intersect(const std::set& x, + const std::set& y, + std::set& z) + { + z.clear(); + std::set_intersection(x.begin(), x.end(), + y.begin(), y.end(), + std::inserter(z)); + } + + template + void set_union(const std::set& x, + const std::set& y, + std::set& z) + { + z.clear(); + std::set_union(x.begin(), x.end(), + y.begin(), y.end(), + std::inserter(z)); + } + + template + void set_difference(const std::set& x, + const std::set& y, + std::set& z) + { + z.clear(); + std::set_difference(x.begin(), x.end(), + y.begin(), y.end(), + std::inserter(z, z.begin())); + } + + template + bool set_subset(const std::set& x, + const std::set& y) + { + return std::includes(x.begin(), x.end(), y.begin(), y.end()); + } + + // Shit, can't implement this without knowing the size of the + // universe. + template + void set_compliment(const std::set& x, + std::set& z) + { + z.clear(); + + } + +} // namespace boost + +#endif // BOOST_SET_ADAPTOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/shadow_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/shadow_iterator.hpp new file mode 100644 index 0000000000..6cd15384fc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/shadow_iterator.hpp @@ -0,0 +1,139 @@ +// (C) Copyright Jeremy Siek 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_SHADOW_ITERATOR_HPP +#define BOOST_SHADOW_ITERATOR_HPP + +#include +#include + +namespace boost { + + namespace detail { + + template + class shadow_proxy + : boost::operators< shadow_proxy > + { + typedef shadow_proxy self; + public: + inline shadow_proxy(A aa, B bb) : a(aa), b(bb) { } + inline shadow_proxy(const self& x) : a(x.a), b(x.b) { } + template + inline shadow_proxy(Self x) : a(x.a), b(x.b) { } + inline self& operator=(const self& x) { a = x.a; b = x.b; return *this; } + inline self& operator++() { ++a; return *this; } + inline self& operator--() { --a; return *this; } + inline self& operator+=(const self& x) { a += x.a; return *this; } + inline self& operator-=(const self& x) { a -= x.a; return *this; } + inline self& operator*=(const self& x) { a *= x.a; return *this; } + inline self& operator/=(const self& x) { a /= x.a; return *this; } + inline self& operator%=(const self& x) { return *this; } // JGS + inline self& operator&=(const self& x) { return *this; } // JGS + inline self& operator|=(const self& x) { return *this; } // JGS + inline self& operator^=(const self& x) { return *this; } // JGS + inline friend D operator-(const self& x, const self& y) { + return x.a - y.a; + } + inline bool operator==(const self& x) const { return a == x.a; } + inline bool operator<(const self& x) const { return a < x.a; } + // protected: + A a; + B b; + }; + + struct shadow_iterator_policies + { + template + void initialize(const iter_pair&) { } + + template + typename Iter::reference dereference(const Iter& i) const { + typedef typename Iter::reference R; + return R(*i.base().first, *i.base().second); + } + template + bool equal(const Iter& p1, const Iter& p2) const { + return p1.base().first == p2.base().first; + } + template + void increment(Iter& i) { ++i.base().first; ++i.base().second; } + + template + void decrement(Iter& i) { --i.base().first; --i.base().second; } + + template + bool less(const Iter& x, const Iter& y) const { + return x.base().first < y.base().first; + } + template + typename Iter::difference_type + distance(const Iter& x, const Iter& y) const { + return y.base().first - x.base().first; + } + template + void advance(Iter& p, D n) { p.base().first += n; p.base().second += n; } + }; + + } // namespace detail + + template + struct shadow_iterator_generator { + + // To use the iterator_adaptor we can't derive from + // random_access_iterator because we don't have a real reference. + // However, we want the STL algorithms to treat the shadow + // iterator like a random access iterator. + struct shadow_iterator_tag : public std::input_iterator_tag { + operator std::random_access_iterator_tag() { + return std::random_access_iterator_tag(); + }; + }; + typedef typename std::iterator_traits::value_type Aval; + typedef typename std::iterator_traits::value_type Bval; + typedef typename std::iterator_traits::reference Aref; + typedef typename std::iterator_traits::reference Bref; + typedef typename std::iterator_traits::difference_type D; + typedef detail::shadow_proxy V; + typedef detail::shadow_proxy R; + typedef iterator_adaptor< std::pair, + detail::shadow_iterator_policies, + V, R, V*, shadow_iterator_tag, + D> type; + }; + + // short cut for creating a shadow iterator + template + inline typename shadow_iterator_generator::type + make_shadow_iter(IterA a, IterB b) { + typedef typename shadow_iterator_generator::type Iter; + return Iter(std::make_pair(a,b)); + } + + template + struct shadow_cmp { + inline shadow_cmp(const Cmp& c) : cmp(c) { } + template + inline bool operator()(const ShadowProxy1& x, const ShadowProxy2& y) const + { + return cmp(x.a, y.a); + } + Cmp cmp; + }; + +} // namespace boost + +namespace std { + template + void swap(boost::detail::shadow_proxy x, + boost::detail::shadow_proxy y) + { + std::swap(x.a, y.a); + std::swap(x.b, y.b); + } +} + +#endif // BOOST_SHADOW_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/sparse_ordering.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/sparse_ordering.hpp new file mode 100644 index 0000000000..7a7350e6f0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/detail/sparse_ordering.hpp @@ -0,0 +1,198 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2004, 2005 Trustees of Indiana University +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, +// Doug Gregor, D. Kevin McGrath +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//=======================================================================// +#ifndef BOOST_GRAPH_DETAIL_SPARSE_ORDERING_HPP +#define BOOST_GRAPH_DETAIL_SPARSE_ORDERING_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + namespace sparse { + + // rcm_queue + // + // This is a custom queue type used in the + // *_ordering algorithms. + // In addition to the normal queue operations, the + // rcm_queue provides: + // + // int eccentricity() const; + // value_type spouse() const; + // + + // yes, it's a bad name...but it works, so use it + template < class Vertex, class DegreeMap, + class Container = std::deque > + class rcm_queue : public std::queue { + typedef std::queue base; + public: + typedef typename base::value_type value_type; + typedef typename base::size_type size_type; + + /* SGI queue has not had a contructor queue(const Container&) */ + inline rcm_queue(DegreeMap deg) + : _size(0), Qsize(1), eccen(-1), degree(deg) { } + + inline void pop() { + if ( !_size ) + Qsize = base::size(); + + base::pop(); + if ( _size == Qsize-1 ) { + _size = 0; + ++eccen; + } else + ++_size; + + } + + inline value_type& front() { + value_type& u = base::front(); + if ( _size == 0 ) + w = u; + else if (get(degree,u) < get(degree,w) ) + w = u; + return u; + } + + inline const value_type& front() const { + const value_type& u = base::front(); + if ( _size == 0 ) + w = u; + else if (get(degree,u) < get(degree,w) ) + w = u; + return u; + } + + inline value_type& top() { return front(); } + inline const value_type& top() const { return front(); } + + inline size_type size() const { return base::size(); } + + inline size_type eccentricity() const { return eccen; } + inline value_type spouse() const { return w; } + + protected: + size_type _size; + size_type Qsize; + int eccen; + mutable value_type w; + DegreeMap degree; + }; + + + template > + class sparse_ordering_queue : public boost::queue{ + public: + typedef typename Sequence::iterator iterator; + typedef typename Sequence::reverse_iterator reverse_iterator; + typedef queue base; + typedef typename Sequence::size_type size_type; + + inline iterator begin() { return this->c.begin(); } + inline reverse_iterator rbegin() { return this->c.rbegin(); } + inline iterator end() { return this->c.end(); } + inline reverse_iterator rend() { return this->c.rend(); } + inline Tp &operator[](int n) { return this->c[n]; } + inline size_type size() {return this->c.size(); } + protected: + //nothing + }; + + } // namespace sparse + + // Compute Pseudo peripheral + // + // To compute an approximated peripheral for a given vertex. + // Used in king_ordering algorithm. + // + template + Vertex + pseudo_peripheral_pair(Graph const& G, const Vertex& u, int& ecc, + ColorMap color, DegreeMap degree) + { + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + + sparse::rcm_queue Q(degree); + + typename boost::graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui) + if (get(color, *ui) != Color::red()) put(color, *ui, Color::white()); + breadth_first_visit(G, u, buffer(Q).color_map(color)); + + ecc = Q.eccentricity(); + return Q.spouse(); + } + + // Find a good starting node + // + // This is to find a good starting node for the + // king_ordering algorithm. "good" is in the sense + // of the ordering generated by RCM. + // + template + Vertex find_starting_node(Graph const& G, Vertex r, Color color, Degree degree) + { + Vertex x, y; + int eccen_r, eccen_x; + + x = pseudo_peripheral_pair(G, r, eccen_r, color, degree); + y = pseudo_peripheral_pair(G, x, eccen_x, color, degree); + + while (eccen_x > eccen_r) { + r = x; + eccen_r = eccen_x; + x = y; + y = pseudo_peripheral_pair(G, x, eccen_x, color, degree); + } + return x; + } + +template +class out_degree_property_map + : public put_get_helper::degree_size_type, + out_degree_property_map > +{ +public: + typedef typename graph_traits::vertex_descriptor key_type; + typedef typename graph_traits::degree_size_type value_type; + typedef value_type reference; + typedef readable_property_map_tag category; + out_degree_property_map(const Graph& g) : m_g(g) { } + value_type operator[](const key_type& v) const { + return out_degree(v, m_g); + } +private: + const Graph& m_g; +}; +template +inline out_degree_property_map +make_out_degree_map(const Graph& g) { + return out_degree_property_map(g); +} + +} // namespace boost + + +#endif // BOOST_GRAPH_KING_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/dijkstra_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/dijkstra_shortest_paths.hpp new file mode 100644 index 0000000000..5b39cb3853 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/dijkstra_shortest_paths.hpp @@ -0,0 +1,487 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +// +// Revision History: +// 04 April 2001: Added named parameter variant. (Jeremy Siek) +// 01 April 2001: Modified to use new header. (JMaddock) +// +#ifndef BOOST_GRAPH_DIJKSTRA_HPP +#define BOOST_GRAPH_DIJKSTRA_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_GRAPH_DIJKSTRA_TESTING +# include +#endif // BOOST_GRAPH_DIJKSTRA_TESTING + +namespace boost { + + /** + * @brief Updates a particular value in a queue used by Dijkstra's + * algorithm. + * + * This routine is called by Dijkstra's algorithm after it has + * decreased the distance from the source vertex to the given @p + * vertex. By default, this routine will just call @c + * Q.update(vertex). However, other queues may provide more + * specialized versions of this routine. + * + * @param Q the queue that will be updated. + * @param vertex the vertex whose distance has been updated + * @param old_distance the previous distance to @p vertex + */ + template + inline void + dijkstra_queue_update(Buffer& Q, Vertex vertex, DistanceType old_distance) + { + (void)old_distance; + Q.update(vertex); + } + +#ifdef BOOST_GRAPH_DIJKSTRA_TESTING + // This is a misnomer now: it now just refers to the "default heap", which is + // currently d-ary (d=4) but can be changed by a #define. + static bool dijkstra_relaxed_heap = true; +#endif + + template + struct DijkstraVisitorConcept { + void constraints() { + function_requires< CopyConstructibleConcept >(); + vis.initialize_vertex(u, g); + vis.discover_vertex(u, g); + vis.examine_vertex(u, g); + vis.examine_edge(e, g); + vis.edge_relaxed(e, g); + vis.edge_not_relaxed(e, g); + vis.finish_vertex(u, g); + } + Visitor vis; + Graph g; + typename graph_traits::vertex_descriptor u; + typename graph_traits::edge_descriptor e; + }; + + template + class dijkstra_visitor : public bfs_visitor { + public: + dijkstra_visitor() { } + dijkstra_visitor(Visitors vis) + : bfs_visitor(vis) { } + + template + void edge_relaxed(Edge e, Graph& g) { + invoke_visitors(this->m_vis, e, g, on_edge_relaxed()); + } + template + void edge_not_relaxed(Edge e, Graph& g) { + invoke_visitors(this->m_vis, e, g, on_edge_not_relaxed()); + } + private: + template + void tree_edge(Edge u, Graph& g) { } + }; + template + dijkstra_visitor + make_dijkstra_visitor(Visitors vis) { + return dijkstra_visitor(vis); + } + typedef dijkstra_visitor<> default_dijkstra_visitor; + + namespace detail { + + template + struct dijkstra_bfs_visitor + { + typedef typename property_traits::value_type D; + + dijkstra_bfs_visitor(UniformCostVisitor vis, UpdatableQueue& Q, + WeightMap w, PredecessorMap p, DistanceMap d, + BinaryFunction combine, BinaryPredicate compare, + D zero) + : m_vis(vis), m_Q(Q), m_weight(w), m_predecessor(p), m_distance(d), + m_combine(combine), m_compare(compare), m_zero(zero) { } + + template + void tree_edge(Edge e, Graph& g) { + bool decreased = relax(e, g, m_weight, m_predecessor, m_distance, + m_combine, m_compare); + if (decreased) + m_vis.edge_relaxed(e, g); + else + m_vis.edge_not_relaxed(e, g); + } + template + void gray_target(Edge e, Graph& g) { + D old_distance = get(m_distance, target(e, g)); + + bool decreased = relax(e, g, m_weight, m_predecessor, m_distance, + m_combine, m_compare); + if (decreased) { + dijkstra_queue_update(m_Q, target(e, g), old_distance); + m_vis.edge_relaxed(e, g); + } else + m_vis.edge_not_relaxed(e, g); + } + + template + void initialize_vertex(Vertex u, Graph& g) + { m_vis.initialize_vertex(u, g); } + template + void non_tree_edge(Edge, Graph&) { } + template + void discover_vertex(Vertex u, Graph& g) { m_vis.discover_vertex(u, g); } + template + void examine_vertex(Vertex u, Graph& g) { m_vis.examine_vertex(u, g); } + template + void examine_edge(Edge e, Graph& g) { + if (m_compare(get(m_weight, e), m_zero)) + boost::throw_exception(negative_edge()); + m_vis.examine_edge(e, g); + } + template + void black_target(Edge, Graph&) { } + template + void finish_vertex(Vertex u, Graph& g) { m_vis.finish_vertex(u, g); } + + UniformCostVisitor m_vis; + UpdatableQueue& m_Q; + WeightMap m_weight; + PredecessorMap m_predecessor; + DistanceMap m_distance; + BinaryFunction m_combine; + BinaryPredicate m_compare; + D m_zero; + }; + + } // namespace detail + + namespace detail { + template + struct vertex_property_map_generator_helper {}; + + template + struct vertex_property_map_generator_helper { + typedef boost::iterator_property_map type; + static type build(const Graph& g, const IndexMap& index, boost::scoped_array& array_holder) { + array_holder.reset(new Value[num_vertices(g)]); + std::fill(array_holder.get(), array_holder.get() + num_vertices(g), Value()); + return make_iterator_property_map(array_holder.get(), index); + } + }; + + template + struct vertex_property_map_generator_helper { + typedef boost::vector_property_map type; + static type build(const Graph& g, const IndexMap& index, boost::scoped_array& array_holder) { + return boost::make_vector_property_map(index); + } + }; + + template + struct vertex_property_map_generator { + typedef boost::is_base_and_derived< + boost::vertex_list_graph_tag, + typename boost::graph_traits::traversal_category> + known_num_vertices; + typedef vertex_property_map_generator_helper helper; + typedef typename helper::type type; + static type build(const Graph& g, const IndexMap& index, boost::scoped_array& array_holder) { + return helper::build(g, index, array_holder); + } + }; + } + + namespace detail { + template + struct default_color_map_generator_helper {}; + + template + struct default_color_map_generator_helper { + typedef boost::two_bit_color_map type; + static type build(const Graph& g, const IndexMap& index) { + size_t nv = num_vertices(g); + return boost::two_bit_color_map(nv, index); + } + }; + + template + struct default_color_map_generator_helper { + typedef boost::vector_property_map type; + static type build(const Graph& g, const IndexMap& index) { + return boost::make_vector_property_map(index); + } + }; + + template + struct default_color_map_generator { + typedef boost::is_base_and_derived< + boost::vertex_list_graph_tag, + typename boost::graph_traits::traversal_category> + known_num_vertices; + typedef default_color_map_generator_helper helper; + typedef typename helper::type type; + static type build(const Graph& g, const IndexMap& index) { + return helper::build(g, index); + } + }; + } + + // Call breadth first search with default color map. + template + inline void + dijkstra_shortest_paths_no_init + (const Graph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight, + IndexMap index_map, + Compare compare, Combine combine, DistZero zero, + DijkstraVisitor vis) + { + typedef + detail::default_color_map_generator + ColorMapHelper; + typedef typename ColorMapHelper::type ColorMap; + ColorMap color = + ColorMapHelper::build(g, index_map); + dijkstra_shortest_paths_no_init( g, s, predecessor, distance, weight, + index_map, compare, combine, zero, vis, + color); + } + + // Call breadth first search + template + inline void + dijkstra_shortest_paths_no_init + (const Graph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight, + IndexMap index_map, + Compare compare, Combine combine, DistZero zero, + DijkstraVisitor vis, ColorMap color) + { + typedef indirect_cmp IndirectCmp; + IndirectCmp icmp(distance, compare); + + typedef typename graph_traits::vertex_descriptor Vertex; + +#ifdef BOOST_GRAPH_DIJKSTRA_TESTING + if (!dijkstra_relaxed_heap) { + typedef mutable_queue, IndirectCmp, IndexMap> + MutableQueue; + + MutableQueue Q(num_vertices(g), icmp, index_map); + detail::dijkstra_bfs_visitor + bfs_vis(vis, Q, weight, predecessor, distance, combine, compare, zero); + + breadth_first_visit(g, s, Q, bfs_vis, color); + return; + } +#endif // BOOST_GRAPH_DIJKSTRA_TESTING + +#ifdef BOOST_GRAPH_DIJKSTRA_USE_RELAXED_HEAP + typedef relaxed_heap MutableQueue; + MutableQueue Q(num_vertices(g), icmp, index_map); +#else // Now the default: use a d-ary heap + boost::scoped_array index_in_heap_map_holder; + typedef + detail::vertex_property_map_generator + IndexInHeapMapHelper; + typedef typename IndexInHeapMapHelper::type IndexInHeapMap; + IndexInHeapMap index_in_heap = + IndexInHeapMapHelper::build(g, index_map, index_in_heap_map_holder); + typedef d_ary_heap_indirect + MutableQueue; + MutableQueue Q(distance, index_in_heap, compare); +#endif // Relaxed heap + + detail::dijkstra_bfs_visitor + bfs_vis(vis, Q, weight, predecessor, distance, combine, compare, zero); + + breadth_first_visit(g, s, Q, bfs_vis, color); + } + + // Initialize distances and call breadth first search with default color map + template + inline void + dijkstra_shortest_paths + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight, + IndexMap index_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis, + const bgl_named_params& + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(VertexListGraph,vertex_list_graph_tag)) + { + boost::two_bit_color_map color(num_vertices(g), index_map); + dijkstra_shortest_paths(g, s, predecessor, distance, weight, index_map, + compare, combine, inf, zero, vis, + color); + } + + // Initialize distances and call breadth first search + template + inline void + dijkstra_shortest_paths + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight, + IndexMap index_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis, ColorMap color) + { + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + vis.initialize_vertex(*ui, g); + put(distance, *ui, inf); + put(predecessor, *ui, *ui); + put(color, *ui, Color::white()); + } + put(distance, s, zero); + + dijkstra_shortest_paths_no_init(g, s, predecessor, distance, weight, + index_map, compare, combine, zero, vis, color); + } + + // Initialize distances and call breadth first search + template + inline void + dijkstra_shortest_paths + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight, + IndexMap index_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis) + { + dijkstra_shortest_paths(g, s, predecessor, distance, weight, index_map, + compare, combine, inf, zero, vis, + no_named_parameters()); + } + + namespace detail { + + // Handle defaults for PredecessorMap and + // Distance Compare, Combine, Inf and Zero + template + inline void + dijkstra_dispatch2 + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + DistanceMap distance, WeightMap weight, IndexMap index_map, + const Params& params) + { + // Default for predecessor map + dummy_property_map p_map; + + typedef typename property_traits::value_type D; + dijkstra_shortest_paths + (g, s, + choose_param(get_param(params, vertex_predecessor), p_map), + distance, weight, index_map, + choose_param(get_param(params, distance_compare_t()), + std::less()), + choose_param(get_param(params, distance_combine_t()), + closed_plus()), + choose_param(get_param(params, distance_inf_t()), + (std::numeric_limits::max)()), + choose_param(get_param(params, distance_zero_t()), + D()), + choose_param(get_param(params, graph_visitor), + make_dijkstra_visitor(null_visitor())), + params); + } + + template + inline void + dijkstra_dispatch1 + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + DistanceMap distance, WeightMap weight, IndexMap index_map, + const Params& params) + { + // Default for distance map + typedef typename property_traits::value_type D; + typename std::vector::size_type + n = is_default_param(distance) ? num_vertices(g) : 1; + std::vector distance_map(n); + + detail::dijkstra_dispatch2 + (g, s, choose_param(distance, make_iterator_property_map + (distance_map.begin(), index_map, + distance_map[0])), + weight, index_map, params); + } + } // namespace detail + + // Named Parameter Variant + template + inline void + dijkstra_shortest_paths + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params) + { + // Default for edge weight and vertex index map is to ask for them + // from the graph. Default for the visitor is null_visitor. + detail::dijkstra_dispatch1 + (g, s, + get_param(params, vertex_distance), + choose_const_pmap(get_param(params, edge_weight), g, edge_weight), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + params); + } + +} // namespace boost + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif + +#endif // BOOST_GRAPH_DIJKSTRA_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/dijkstra_shortest_paths_no_color_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/dijkstra_shortest_paths_no_color_map.hpp new file mode 100644 index 0000000000..443984ff0c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/dijkstra_shortest_paths_no_color_map.hpp @@ -0,0 +1,249 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2009 Trustees of Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Michael Hansen +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_DIJKSTRA_NO_COLOR_MAP_HPP +#define BOOST_GRAPH_DIJKSTRA_NO_COLOR_MAP_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + + // No init version + template + void dijkstra_shortest_paths_no_color_map_no_init + (const Graph& graph, + typename graph_traits::vertex_descriptor start_vertex, + PredecessorMap predecessor_map, + DistanceMap distance_map, + WeightMap weight_map, + VertexIndexMap index_map, + DistanceCompare distance_compare, + DistanceWeightCombine distance_weight_combine, + DistanceInfinity distance_infinity, + DistanceZero distance_zero, + DijkstraVisitor visitor) + { + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename property_traits::value_type Distance; + typedef typename property_traits::value_type Weight; + + typedef indirect_cmp DistanceIndirectCompare; + DistanceIndirectCompare + distance_indirect_compare(distance_map, distance_compare); + + // Choose vertex queue type +#if BOOST_GRAPH_DIJKSTRA_USE_RELAXED_HEAP + typedef relaxed_heap + VertexQueue; + VertexQueue vertex_queue(num_vertices(graph), + distance_indirect_compare, + index_map); +#else + // Default - use d-ary heap (d = 4) + typedef + detail::vertex_property_map_generator + IndexInHeapMapHelper; + typedef typename IndexInHeapMapHelper::type IndexInHeapMap; + typedef + d_ary_heap_indirect + VertexQueue; + + boost::scoped_array index_in_heap_map_holder; + IndexInHeapMap index_in_heap = + IndexInHeapMapHelper::build(graph, index_map, + index_in_heap_map_holder); + VertexQueue vertex_queue(distance_map, index_in_heap, distance_compare); +#endif + + // Add vertex to the queue + vertex_queue.push(start_vertex); + + // Starting vertex will always be the first discovered vertex + visitor.discover_vertex(start_vertex, graph); + + while (!vertex_queue.empty()) { + Vertex min_vertex = vertex_queue.top(); + vertex_queue.pop(); + + visitor.examine_vertex(min_vertex, graph); + + // Check if any other vertices can be reached + Distance min_vertex_distance = get(distance_map, min_vertex); + + if (!distance_compare(min_vertex_distance, distance_infinity)) { + // This is the minimum vertex, so all other vertices are unreachable + return; + } + + // Examine neighbors of min_vertex + typedef typename graph_traits::edge_descriptor Edge; + BGL_FORALL_OUTEDGES_T(min_vertex, current_edge, graph, Graph) { + visitor.examine_edge(current_edge, graph); + + // Check if the edge has a negative weight + if (distance_compare(get(weight_map, current_edge), distance_zero)) { + boost::throw_exception(negative_edge()); + } + + // Extract the neighboring vertex and get its distance + Vertex neighbor_vertex = target(current_edge, graph); + Distance neighbor_vertex_distance = get(distance_map, neighbor_vertex); + bool is_neighbor_undiscovered = + !distance_compare(neighbor_vertex_distance, distance_infinity); + + // Attempt to relax the edge + bool was_edge_relaxed = relax(current_edge, graph, weight_map, + predecessor_map, distance_map, + distance_weight_combine, distance_compare); + + if (was_edge_relaxed) { + vertex_queue.update(neighbor_vertex); + visitor.edge_relaxed(current_edge, graph); + } else { + visitor.edge_not_relaxed(current_edge, graph); + } + + if (is_neighbor_undiscovered) { + visitor.discover_vertex(neighbor_vertex, graph); + vertex_queue.push(neighbor_vertex); + } + } // end out edge iteration + + visitor.finish_vertex(min_vertex, graph); + } // end while queue not empty + } + + // Full init version + template + void dijkstra_shortest_paths_no_color_map + (const Graph& graph, + typename graph_traits::vertex_descriptor start_vertex, + PredecessorMap predecessor_map, + DistanceMap distance_map, + WeightMap weight_map, + VertexIndexMap index_map, + DistanceCompare distance_compare, + DistanceWeightCombine distance_weight_combine, + DistanceInfinity distance_infinity, + DistanceZero distance_zero, + DijkstraVisitor visitor) + { + // Initialize vertices + BGL_FORALL_VERTICES_T(current_vertex, graph, Graph) { + visitor.initialize_vertex(current_vertex, graph); + + // Default all distances to infinity + put(distance_map, current_vertex, distance_infinity); + + // Default all vertex predecessors to the vertex itself + put(predecessor_map, current_vertex, current_vertex); + } + + // Set distance for start_vertex to zero + put(distance_map, start_vertex, distance_zero); + + // Pass everything on to the no_init version + dijkstra_shortest_paths_no_color_map_no_init(graph, + start_vertex, predecessor_map, distance_map, weight_map, + index_map, distance_compare, distance_weight_combine, + distance_infinity, distance_zero, visitor); + } + + namespace detail { + + // Handle defaults for PredecessorMap, DistanceCompare, + // DistanceWeightCombine, DistanceInfinity and DistanceZero + template + inline void + dijkstra_no_color_map_dispatch2 + (const Graph& graph, + typename graph_traits::vertex_descriptor start_vertex, + DistanceMap distance_map, WeightMap weight_map, + VertexIndexMap index_map, const Params& params) + { + // Default for predecessor map + dummy_property_map predecessor_map; + + typedef typename property_traits::value_type DistanceType; + dijkstra_shortest_paths_no_color_map + (graph, start_vertex, + choose_param(get_param(params, vertex_predecessor), predecessor_map), + distance_map, weight_map, index_map, + choose_param(get_param(params, distance_compare_t()), + std::less()), + choose_param(get_param(params, distance_combine_t()), + closed_plus()), + choose_param(get_param(params, distance_inf_t()), + (std::numeric_limits::max)()), + choose_param(get_param(params, distance_zero_t()), + DistanceType()), + choose_param(get_param(params, graph_visitor), + make_dijkstra_visitor(null_visitor()))); + } + + template + inline void + dijkstra_no_color_map_dispatch1 + (const Graph& graph, + typename graph_traits::vertex_descriptor start_vertex, + DistanceMap distance_map, WeightMap weight_map, + IndexMap index_map, const Params& params) + { + // Default for distance map + typedef typename property_traits::value_type DistanceType; + typename std::vector::size_type + vertex_count = is_default_param(distance_map) ? num_vertices(graph) : 1; + + std::vector default_distance_map(vertex_count); + + detail::dijkstra_no_color_map_dispatch2 + (graph, start_vertex, choose_param(distance_map, + make_iterator_property_map(default_distance_map.begin(), index_map, + default_distance_map[0])), + weight_map, index_map, params); + } + } // namespace detail + + // Named parameter version + template + inline void + dijkstra_shortest_paths_no_color_map + (const Graph& graph, + typename graph_traits::vertex_descriptor start_vertex, + const bgl_named_params& params) + { + // Default for edge weight and vertex index map is to ask for them + // from the graph. Default for the visitor is null_visitor. + detail::dijkstra_no_color_map_dispatch1 + (graph, start_vertex, + get_param(params, vertex_distance), + choose_const_pmap(get_param(params, edge_weight), graph, edge_weight), + choose_const_pmap(get_param(params, vertex_index), graph, vertex_index), + params); + } + +} // namespace boost + +#endif // BOOST_GRAPH_DIJKSTRA_NO_COLOR_MAP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/dimacs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/dimacs.hpp new file mode 100644 index 0000000000..195ad3b651 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/dimacs.hpp @@ -0,0 +1,309 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Alex Breuer +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DIMACS_HPP +#define BOOST_GRAPH_DIMACS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace graph { + +class dimacs_exception : public std::exception {}; + +class dimacs_basic_reader { +public: + typedef std::size_t vertices_size_type; + typedef std::size_t edges_size_type; + typedef double vertex_weight_type; + typedef double edge_weight_type; + typedef std::pair edge_type; + enum incr_mode {edge, edge_weight}; + + dimacs_basic_reader( std::istream& in, bool want_weights = true ) : + inpt( in ), seen_edges( 0 ), want_weights(want_weights) + { + while( getline( inpt, buf ) && !buf.empty() && buf[0] == 'c' ); + + if( buf[0] != 'p' ) { + boost::throw_exception(dimacs_exception()); + } + + std::stringstream instr( buf ); + std::string junk; + + instr >> junk >> junk >> num_vertices >> num_edges; + read_edge_weights.push( -1 ); + incr( edge_weight ); + } + + //for a past the end iterator + dimacs_basic_reader() : inpt( std::cin ), num_vertices( 0 ), + num_edges( 0 ), seen_edges( 0 ), want_weights(false) {} + + edge_type edge_deref() { + assert( !read_edges.empty() ); + return read_edges.front(); + } + + inline edge_type* edge_ref() { + assert( !read_edges.empty() ); + return &read_edges.front(); + } + + inline edge_weight_type edge_weight_deref() { + assert( !read_edge_weights.empty() ); + return read_edge_weights.front(); + } + + inline dimacs_basic_reader incr( incr_mode mode ) { + if( mode == edge ) { + assert( !read_edges.empty() ); + read_edges.pop(); + } + else if( mode == edge_weight ) { + assert( !read_edge_weights.empty() ); + read_edge_weights.pop(); + } + + if( (mode == edge && read_edges.empty()) || + (mode == edge_weight && read_edge_weights.empty() )) { + + if( seen_edges > num_edges ) { + boost::throw_exception(dimacs_exception()); + } + + while( getline( inpt, buf ) && !buf.empty() && buf[0] == 'c' ); + + if( !inpt.eof() ) { + int source, dest, weight; + read_edge_line((char*) buf.c_str(), source, dest, weight); + + seen_edges++; + source--; + dest--; + + read_edges.push( edge_type( source, dest ) ); + if (want_weights) { + read_edge_weights.push( weight ); + } + } + assert( read_edges.size() < 100 ); + assert( read_edge_weights.size() < 100 ); + } + + // the 1000000 just happens to be about how many edges can be read in + // 10s +// if( !(seen_edges % 1000000) && !process_id( pg ) && mode == edge ) { +// std::cout << "read " << seen_edges << " edges" << std::endl; +// } + return *this; + } + + inline bool done_edges() { + return inpt.eof() && read_edges.size() == 0; + } + + inline bool done_edge_weights() { + return inpt.eof() && read_edge_weights.size() == 0; + } + + inline vertices_size_type n_vertices() { + return num_vertices; + } + + inline vertices_size_type processed_edges() { + return seen_edges - read_edges.size(); + } + + inline vertices_size_type processed_edge_weights() { + return seen_edges - read_edge_weights.size(); + } + + inline vertices_size_type n_edges() { + return num_edges; + } + +protected: + bool read_edge_line(char *linebuf, int &from, int &to, int &weight) + { + char *fs = NULL, *ts = NULL, *ws = NULL; + char *tmp = linebuf + 2; + + fs = tmp; + if ('e' == linebuf[0]) { + while (*tmp != '\n' && *tmp != '\0') { + if (*tmp == ' ') { + *tmp = '\0'; + ts = ++tmp; + break; + } + tmp++; + } + *tmp = '\0'; + if (NULL == fs || NULL == ts) return false; + from = atoi(fs); to = atoi(ts); weight = 0; + + } else if ('a' == linebuf[0]) { + while (*tmp != '\n' && *tmp != '\0') { + if (*tmp == ' ') { + *tmp = '\0'; + ts = ++tmp; + break; + } + tmp++; + } + while (*tmp != '\n' && *tmp != '\0') { + if (*tmp == ' ') { + *tmp = '\0'; + ws = ++tmp; + break; + } + tmp++; + } + while (*tmp != '\n' && *tmp != '\0') tmp++; + *tmp = '\0'; + if (fs == NULL || ts == NULL || ws == NULL) return false; + from = atoi(fs); to = atoi(ts) ; + if (want_weights) weight = atoi(ws); else weight = 0; + + } else { + return false; + } + + return true; + } + + std::queue read_edges; + std::queue read_edge_weights; + + std::istream& inpt; + std::string buf; + vertices_size_type num_vertices, num_edges, seen_edges; + bool want_weights; +}; + +template +class dimacs_edge_iterator { +public: + typedef dimacs_basic_reader::edge_type edge_type; + typedef dimacs_basic_reader::incr_mode incr_mode; + + typedef std::input_iterator_tag iterator_category; + typedef edge_type value_type; + typedef value_type reference; + typedef edge_type* pointer; + typedef std::ptrdiff_t difference_type; + + dimacs_edge_iterator( T& reader ) : + reader( reader ) {} + + inline dimacs_edge_iterator& operator++() { + reader.incr( dimacs_basic_reader::edge ); + return *this; + } + + inline edge_type operator*() { + return reader.edge_deref(); + } + + inline edge_type* operator->() { + return reader.edge_ref(); + } + + // don't expect this to do the right thing if you're not comparing against a + // general past-the-end-iterator made with the default constructor for + // dimacs_basic_reader + inline bool operator==( dimacs_edge_iterator arg ) { + if( reader.n_vertices() == 0 ) { + return arg.reader.done_edges(); + } + else if( arg.reader.n_vertices() == 0 ) { + return reader.done_edges(); + } + else { + return false; + } + return false; + } + + inline bool operator!=( dimacs_edge_iterator arg ) { + if( reader.n_vertices() == 0 ) { + return !arg.reader.done_edges(); + } + else if( arg.reader.n_vertices() == 0 ) { + return !reader.done_edges(); + } + else { + return true; + } + return true; + } + +private: + T& reader; +}; + +template +class dimacs_edge_weight_iterator { +public: + typedef dimacs_basic_reader::edge_weight_type edge_weight_type; + typedef dimacs_basic_reader::incr_mode incr_mode; + + dimacs_edge_weight_iterator( T& reader ) : reader( reader ) {} + + inline dimacs_edge_weight_iterator& operator++() { + reader.incr( dimacs_basic_reader::edge_weight ); + return *this; + } + + inline edge_weight_type operator*() { + return reader.edge_weight_deref(); + } + + // don't expect this to do the right thing if you're not comparing against a + // general past-the-end-iterator made with the default constructor for + // dimacs_basic_reader + inline bool operator==( dimacs_edge_weight_iterator arg ) { + if( reader.n_vertices() == 0 ) { + return arg.reader.done_edge_weights(); + } + else if( arg.reader.n_vertices() == 0 ) { + return reader.done_edge_weights(); + } + else { + return false; + } + return false; + } + + inline bool operator!=( dimacs_edge_weight_iterator arg ) { + if( reader.n_vertices() == 0 ) { + return !arg.reader.done_edge_weights(); + } + else if( arg.reader.n_vertices() == 0 ) { + return !reader.done_edge_weights(); + } + else { + return true; + } + return true; + } +private: + T& reader; +}; + +} } // end namespace boost::graph +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/directed_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/directed_graph.hpp new file mode 100644 index 0000000000..992546d46c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/directed_graph.hpp @@ -0,0 +1,684 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_DIRECTED_GRAPH_HPP +#define BOOST_GRAPH_DIRECTED_GRAPH_HPP + +#include +#include +#include + +namespace boost +{ +struct directed_graph_tag { }; + +/** + * The directed_graph class template is a simplified version of the BGL + * adjacency list. This class is provided for ease of use, but may not + * perform as well as custom-defined adjacency list classes. Instances of + * this template model the BidirectionalGraph, VertexIndexGraph, and + * EdgeIndexGraph concepts. The graph is also fully mutable, supporting + * both insertions and removals of vertices and edges. + * + * @note Special care must be taken when removing vertices or edges since + * those operations can invalidate the numbering of vertices. + */ +template < + typename VertexProp = no_property, + typename EdgeProp= no_property, + typename GraphProp= no_property> +class directed_graph +{ +public: + typedef typename graph_detail::graph_prop::property graph_property_type; + typedef typename graph_detail::graph_prop::bundle graph_bundled; + + typedef typename graph_detail::vertex_prop::property vertex_property_type; + typedef typename graph_detail::vertex_prop::bundle vertex_bundled; + + typedef typename graph_detail::edge_prop::property edge_property_type; + typedef typename graph_detail::edge_prop::bundle edge_bundled; + +private: + // Wrap the user-specified properties with an index. + typedef property vertex_property; + typedef property edge_property; + +public: + typedef adjacency_list< + listS, listS, bidirectionalS, + vertex_property, edge_property, GraphProp, + listS + > graph_type; + +private: + // storage selectors + typedef typename graph_type::vertex_list_selector vertex_list_selector; + typedef typename graph_type::edge_list_selector edge_list_selector; + typedef typename graph_type::out_edge_list_selector out_edge_list_selector; + typedef typename graph_type::directed_selector directed_selector; + +public: + // more commonly used graph types + typedef typename graph_type::stored_vertex stored_vertex; + typedef typename graph_type::vertices_size_type vertices_size_type; + typedef typename graph_type::edges_size_type edges_size_type; + typedef typename graph_type::degree_size_type degree_size_type; + typedef typename graph_type::vertex_descriptor vertex_descriptor; + typedef typename graph_type::edge_descriptor edge_descriptor; + + // iterator types + typedef typename graph_type::vertex_iterator vertex_iterator; + typedef typename graph_type::edge_iterator edge_iterator; + typedef typename graph_type::out_edge_iterator out_edge_iterator; + typedef typename graph_type::in_edge_iterator in_edge_iterator; + typedef typename graph_type::adjacency_iterator adjacency_iterator; + + // miscellaneous types + typedef directed_graph_tag graph_tag; + typedef typename graph_type::directed_category directed_category; + typedef typename graph_type::edge_parallel_category edge_parallel_category; + typedef typename graph_type::traversal_category traversal_category; + + typedef unsigned vertex_index_type; + typedef unsigned edge_index_type; + + directed_graph(GraphProp const& p = GraphProp()) + : m_graph(p), m_num_vertices(0), m_num_edges(0), m_max_vertex_index(0) + , m_max_edge_index(0) + { } + + directed_graph(directed_graph const& x) + : m_graph(x), m_num_vertices(x.m_num_vertices), m_num_edges(x.m_num_edges) + , m_max_vertex_index(x.m_max_vertex_index), m_max_edge_index(x.m_max_edge_index) + { } + + directed_graph(vertices_size_type n, GraphProp const& p = GraphProp()) + : m_graph(n, p), m_num_vertices(n), m_num_edges(0), m_max_vertex_index(n) + , m_max_edge_index(0) + { renumber_vertex_indices(); } + + template + directed_graph(EdgeIterator f, + EdgeIterator l, + vertices_size_type n, + edges_size_type m = 0, + GraphProp const& p = GraphProp()) + : m_graph(f, l, n, m, p), m_num_vertices(n), m_num_edges(0) + , m_max_vertex_index(n), m_max_edge_index(0) + { + // Unfortunately, we have to renumber the entire graph. + renumber_indices(); + + // Can't always guarantee that the number of edges is actually + // m if distance(f, l) != m (or is undefined). + m_num_edges = m_max_edge_index = boost::num_edges(m_graph); + } + + directed_graph& operator=(directed_graph const& g) { + if(&g != this) { + m_graph = g.m_graph; + m_num_vertices = g.m_num_vertices; + m_num_edges = g.m_num_edges; + m_max_vertex_index = g.m_max_vertex_index; + m_max_edge_index = g.m_max_edge_index; + } + return *this; + } + + // The impl_() methods are not part of the public interface. + graph_type& impl() + { return m_graph; } + + graph_type const& impl() const + { return m_graph; } + + // The following methods are not part of the public interface + vertices_size_type num_vertices() const + { return m_num_vertices; } + +private: + // This helper function manages the attribution of vertex indices. + vertex_descriptor make_index(vertex_descriptor v) { + boost::put(vertex_index, m_graph, v, m_max_vertex_index); + m_num_vertices++; + m_max_vertex_index++; + return v; + } +public: + vertex_descriptor add_vertex() + { return make_index(boost::add_vertex(m_graph)); } + + vertex_descriptor add_vertex(vertex_property_type const& p) + { return make_index(boost::add_vertex(vertex_property(0u, p), m_graph)); } + + void clear_vertex(vertex_descriptor v) + { + m_num_edges -= boost::degree(v, m_graph); + boost::clear_vertex(v, m_graph); + } + + void remove_vertex(vertex_descriptor v) + { + boost::remove_vertex(v, m_graph); + --m_num_vertices; + } + + edges_size_type num_edges() const + { return m_num_edges; } + +private: + // A helper fucntion for managing edge index attributes. + std::pair const& + make_index(std::pair const& x) + { + if(x.second) { + boost::put(edge_index, m_graph, x.first, m_max_edge_index); + ++m_num_edges; + ++m_max_edge_index; + } + return x; + } +public: + std::pair + add_edge(vertex_descriptor u, vertex_descriptor v) + { return make_index(boost::add_edge(u, v, m_graph)); } + + std::pair + add_edge(vertex_descriptor u, vertex_descriptor v, edge_property_type const& p) + { return make_index(boost::add_edge(u, v, edge_property(0u, p), m_graph)); } + + void remove_edge(vertex_descriptor u, vertex_descriptor v) + { + // find all edges, (u, v) + std::vector edges; + out_edge_iterator i, i_end; + for(boost::tie(i, i_end) = boost::out_edges(u, m_graph); i != i_end; ++i) { + if(boost::target(*i, m_graph) == v) { + edges.push_back(*i); + } + } + // remove all edges, (u, v) + typename std::vector::iterator + j = edges.begin(), j_end = edges.end(); + for( ; j != j_end; ++j) { + remove_edge(*j); + } + } + + void remove_edge(edge_iterator i) + { + remove_edge(*i); + } + + void remove_edge(edge_descriptor e) + { + boost::remove_edge(e, m_graph); + --m_num_edges; + } + + vertex_index_type max_vertex_index() const + { return m_max_vertex_index; } + + void + renumber_vertex_indices() + { + vertex_iterator i, end; + boost::tie(i, end) = vertices(m_graph); + m_max_vertex_index = renumber_vertex_indices(i, end, 0); + } + + void + remove_vertex_and_renumber_indices(vertex_iterator i) + { + vertex_iterator j = next(i), end = vertices(m_graph).second; + vertex_index_type n = get(vertex_index, m_graph, *i); + + // remove the offending vertex and renumber everything after + remove_vertex(*i); + m_max_vertex_index = renumber_vertex_indices(j, end, n); + } + + edge_index_type + max_edge_index() const + { return m_max_edge_index; } + + void + renumber_edge_indices() + { + edge_iterator i, end; + boost::tie(i, end) = edges(m_graph); + m_max_edge_index = renumber_edge_indices(i, end, 0); + } + + void + remove_edge_and_renumber_indices(edge_iterator i) + { + edge_iterator j = next(i), end = edges(m_graph).second; + edge_index_type n = get(edge_index, m_graph, *i); + + // remove the offending edge and renumber everything after + remove_edge(*i); + m_max_edge_index = renumber_edge_indices(j, end, n); + } + + void + renumber_indices() + { + renumber_vertex_indices(); + renumber_edge_indices(); + } + + // bundled property support +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + vertex_bundled& operator[](vertex_descriptor v) + { return m_graph[v]; } + + vertex_bundled const& operator[](vertex_descriptor v) const + { return m_graph[v]; } + + edge_bundled& operator[](edge_descriptor e) + { return m_graph[e]; } + + edge_bundled const& operator[](edge_descriptor e) const + { return m_graph[e]; } + + graph_bundled& operator[](graph_bundle_t) + { return get_property(*this); } + + graph_bundled const& operator[](graph_bundle_t) const + { return get_property(*this); } +#endif + + // Graph concepts + static vertex_descriptor null_vertex() + { return graph_type::null_vertex(); } + + void clear() + { + m_graph.clear(); + m_num_vertices = m_max_vertex_index = 0; + m_num_edges = m_max_edge_index = 0; + } + + void swap(directed_graph& g) + { + m_graph.swap(g); + std::swap(m_num_vertices, g.m_num_vertices); + std::swap(m_max_vertex_index, g.m_max_vertex_index); + std::swap(m_num_edges, g.m_num_edges); + std::swap(m_max_edge_index, g.m_max_edge_index); + } + +private: + vertices_size_type + renumber_vertex_indices(vertex_iterator i, + vertex_iterator end, + vertices_size_type n) + { + typedef typename property_map::type IndexMap; + IndexMap indices = get(vertex_index, m_graph); + for( ; i != end; ++i) { + indices[*i] = n++; + } + return n; + } + + vertices_size_type + renumber_edge_indices(edge_iterator i, + edge_iterator end, + vertices_size_type n) + { + typedef typename property_map::type IndexMap; + IndexMap indices = get(edge_index, m_graph); + for( ; i != end; ++i) { + indices[*i] = n++; + } + return n; + } + + graph_type m_graph; + vertices_size_type m_num_vertices; + edges_size_type m_num_edges; + vertex_index_type m_max_vertex_index; + edge_index_type m_max_edge_index; +}; + +#define DIRECTED_GRAPH_PARAMS typename VP, typename EP, typename GP +#define DIRECTED_GRAPH directed_graph + +// IncidenceGraph concepts +template +inline typename DIRECTED_GRAPH::vertex_descriptor +source(typename DIRECTED_GRAPH::edge_descriptor e, DIRECTED_GRAPH const& g) +{ return source(e, g.impl()); } + +template +inline typename DIRECTED_GRAPH::vertex_descriptor +target(typename DIRECTED_GRAPH::edge_descriptor e, DIRECTED_GRAPH const& g) +{ return target(e, g.impl()); } + +template +inline typename DIRECTED_GRAPH::degree_size_type +out_degree(typename DIRECTED_GRAPH::vertex_descriptor v, DIRECTED_GRAPH const& g) +{ return out_degree(v, g.impl()); } + +template +inline std::pair< + typename DIRECTED_GRAPH::out_edge_iterator, + typename DIRECTED_GRAPH::out_edge_iterator +> +out_edges(typename DIRECTED_GRAPH::vertex_descriptor v, + DIRECTED_GRAPH const& g) +{ return out_edges(v, g.impl()); } + +// BidirectionalGraph concepts +template +inline typename DIRECTED_GRAPH::degree_size_type +in_degree(typename DIRECTED_GRAPH::vertex_descriptor v, DIRECTED_GRAPH const& g) +{ return in_degree(v, g.impl()); } + +template +inline std::pair< + typename DIRECTED_GRAPH::in_edge_iterator, + typename DIRECTED_GRAPH::in_edge_iterator +> +in_edges(typename DIRECTED_GRAPH::vertex_descriptor v, + DIRECTED_GRAPH const& g) +{ return in_edges(v, g.impl()); } + + +template +inline typename DIRECTED_GRAPH::degree_size_type +degree(typename DIRECTED_GRAPH::vertex_descriptor v, DIRECTED_GRAPH const& g) +{ return degree(v, g.impl()); } + +// AdjacencyGraph concepts +template +inline std::pair< + typename DIRECTED_GRAPH::adjacency_iterator, + typename DIRECTED_GRAPH::adjacency_iterator + > +adjacent_vertices(typename DIRECTED_GRAPH::vertex_descriptor v, + DIRECTED_GRAPH const& g) +{ return adjacent_vertices(v, g.impl()); } + +template +typename DIRECTED_GRAPH::vertex_descriptor +vertex(typename DIRECTED_GRAPH::vertices_size_type n, + DIRECTED_GRAPH const& g) +{ return vertex(g.impl()); } + +template +std::pair +edge(typename DIRECTED_GRAPH::vertex_descriptor u, + typename DIRECTED_GRAPH::vertex_descriptor v, + DIRECTED_GRAPH const& g) +{ return edge(u, v, g.impl()); } + +// VertexListGraph concepts +template +inline typename DIRECTED_GRAPH::vertices_size_type +num_vertices(DIRECTED_GRAPH const& g) +{ return g.num_vertices(); } + +template +inline std::pair< + typename DIRECTED_GRAPH::vertex_iterator, + typename DIRECTED_GRAPH::vertex_iterator +> +vertices(DIRECTED_GRAPH const& g) +{ return vertices(g.impl()); } + +// EdgeListGraph concepts +template +inline typename DIRECTED_GRAPH::edges_size_type +num_edges(DIRECTED_GRAPH const& g) +{ return g.num_edges(); } + +template +inline std::pair< + typename DIRECTED_GRAPH::edge_iterator, + typename DIRECTED_GRAPH::edge_iterator +> +edges(DIRECTED_GRAPH const& g) +{ return edges(g.impl()); } + +// MutableGraph concepts +template +inline typename DIRECTED_GRAPH::vertex_descriptor +add_vertex(DIRECTED_GRAPH& g) +{ return g.add_vertex(); } + +template +inline typename DIRECTED_GRAPH::vertex_descriptor +add_vertex(typename DIRECTED_GRAPH::vertex_property_type const& p, + DIRECTED_GRAPH& g) +{ return g.add_vertex(p); } + +template +inline void +clear_vertex(typename DIRECTED_GRAPH::vertex_descriptor v, +DIRECTED_GRAPH& g) +{ return g.clear_vertex(v); } + +template +inline void +remove_vertex(typename DIRECTED_GRAPH::vertex_descriptor v, + DIRECTED_GRAPH& g) +{ return g.remove_vertex(v); } + +template +inline std::pair +add_edge(typename DIRECTED_GRAPH::vertex_descriptor u, + typename DIRECTED_GRAPH::vertex_descriptor v, + DIRECTED_GRAPH& g) +{ return g.add_edge(u, v); } + +template +inline std::pair +add_edge(typename DIRECTED_GRAPH::vertex_descriptor u, + typename DIRECTED_GRAPH::vertex_descriptor v, + typename DIRECTED_GRAPH::edge_property_type const& p, + DIRECTED_GRAPH& g) +{ return g.add_edge(u, v, p); } + +template +inline void remove_edge(typename DIRECTED_GRAPH::vertex_descriptor u, + typename DIRECTED_GRAPH::vertex_descriptor v, + DIRECTED_GRAPH& g) +{ return g.remove_edge(u, v); } + + +template +inline void remove_edge(typename DIRECTED_GRAPH::edge_descriptor e, DIRECTED_GRAPH& g) +{ return g.remove_edge(e); } + +template +inline void remove_edge(typename DIRECTED_GRAPH::edge_iterator i, DIRECTED_GRAPH& g) +{ return g.remove_edge(i); } + +template +inline void remove_edge_if(Predicate pred, DIRECTED_GRAPH& g) +{ return remove_edge_if(pred, g.impl()); } + +template +inline void +remove_out_edge_if(typename DIRECTED_GRAPH::vertex_descriptor v, + Predicate pred, + DIRECTED_GRAPH& g) +{ return remove_out_edge_if(v, pred, g.impl()); } + +template +inline void +remove_in_edge_if(typename DIRECTED_GRAPH::vertex_descriptor v, + Predicate pred, + DIRECTED_GRAPH& g) +{ return remove_in_edge_if(v, pred, g.impl()); } + +// Helper code for working with property maps +namespace detail +{ + struct directed_graph_vertex_property_selector { + template + struct bind_ { + typedef typename DirectedGraph::graph_type Graph; + typedef property_map PropertyMap; + typedef typename PropertyMap::type type; + typedef typename PropertyMap::const_type const_type; + }; + }; + + struct directed_graph_edge_property_selector { + template + struct bind_ { + typedef typename DirectedGraph::graph_type Graph; + typedef property_map PropertyMap; + typedef typename PropertyMap::type type; + typedef typename PropertyMap::const_type const_type; + }; + }; +} + +template <> +struct vertex_property_selector +{ typedef detail::directed_graph_vertex_property_selector type; }; + +template <> +struct edge_property_selector +{ typedef detail::directed_graph_edge_property_selector type; }; + +// PropertyGraph concepts +template +inline typename property_map::type +get(Property p, DIRECTED_GRAPH& g) +{ return get(p, g.impl()); } + +template +inline typename property_map::const_type +get(Property p, DIRECTED_GRAPH const& g) +{ return get(p, g.impl()); } + +template +inline typename property_traits< + typename property_map< + typename DIRECTED_GRAPH::graph_type, Property + >::const_type +>::value_type +get(Property p, DIRECTED_GRAPH const& g, Key const& k) +{ return get(p, g.impl(), k); } + +template +inline void put(Property p, DIRECTED_GRAPH& g, Key const& k, Value const& v) +{ put(p, g.impl(), k, v); } + +template +typename graph_property::type& +get_property(DIRECTED_GRAPH& g, Property p) +{ return get_property(g.impl(), p); } + +template +typename graph_property::type const& +get_property(DIRECTED_GRAPH const& g, Property p) +{ return get_property(g.impl(), p); } + +template +void +set_property(DIRECTED_GRAPH& g, Property p, Value v) +{ return set_property(g.impl(), p, v); } + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + +template +inline typename property_map::type +get(Type Bundle::* p, DIRECTED_GRAPH& g) { + typedef typename property_map< + DIRECTED_GRAPH, Type Bundle::* + >::type return_type; + return return_type(&g, p); +} + +template +inline typename property_map::const_type +get(Type Bundle::* p, DIRECTED_GRAPH const& g) { + typedef typename property_map< + DIRECTED_GRAPH, Type Bundle::* + >::const_type return_type; + return return_type(&g, p); +} + +template +inline Type get(Type Bundle::* p, DIRECTED_GRAPH const& g, Key const& k) +{ return get(p, g.impl(), k); } + +template +inline void put(Type Bundle::* p, DIRECTED_GRAPH& g, Key const& k, Value const& v) +{ put(p, g.impl(), k, v); } +#endif + +// Vertex index management + +template +inline typename DIRECTED_GRAPH::vertex_index_type +get_vertex_index(typename DIRECTED_GRAPH::vertex_descriptor v, + DIRECTED_GRAPH const& g) +{ return get(vertex_index, g, v); } + +template +typename DIRECTED_GRAPH::vertex_index_type +max_vertex_index(DIRECTED_GRAPH const& g) +{ return g.max_vertex_index(); } + +template +inline void +renumber_vertex_indices(DIRECTED_GRAPH& g) +{ g.renumber_vertex_indices(); } + +template +inline void +remove_vertex_and_renumber_indices(typename DIRECTED_GRAPH::vertex_iterator i, + DIRECTED_GRAPH& g) +{ g.remove_vertex_and_renumber_indices(i); } + +// Edge index management +template +inline typename DIRECTED_GRAPH::edge_index_type +get_edge_index(typename DIRECTED_GRAPH::edge_descriptor v, DIRECTED_GRAPH const& g) +{ return get(edge_index, g, v); } + +template +typename DIRECTED_GRAPH::edge_index_type +max_edge_index(DIRECTED_GRAPH const& g) +{ return g.max_edge_index(); } + +template +inline void renumber_edge_indices(DIRECTED_GRAPH& g) +{ g.renumber_edge_indices(); } + +template +inline void +remove_edge_and_renumber_indices(typename DIRECTED_GRAPH::edge_iterator i, + DIRECTED_GRAPH& g) +{ g.remove_edge_and_renumber_indices(i); } + +// Index management +template +inline void +renumber_indices(DIRECTED_GRAPH& g) +{ g.renumber_indices(); } + +// Mutability Traits +template +struct graph_mutability_traits { + typedef mutable_property_graph_tag category; +}; + +#undef DIRECTED_GRAPH_PARAMS +#undef DIRECTED_GRAPH + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjacency_list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjacency_list.hpp new file mode 100644 index 0000000000..8c01c535a4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjacency_list.hpp @@ -0,0 +1,3970 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. +// Copyright (C) 2007 Douglas Gregor + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +#ifndef BOOST_GRAPH_DISTRIBUTED_ADJACENCY_LIST_HPP +#define BOOST_GRAPH_DISTRIBUTED_ADJACENCY_LIST_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Callbacks +#include + +// Serialization +#include +#include +#include +#include + +// Named vertices +#include + +#include + +namespace boost { + + /// The type used to store an identifier that uniquely names a processor. + // NGE: I doubt we'll be running on more than 32768 procs for the time being + typedef /*int*/ short processor_id_type; + + // Tell which processor the target of an edge resides on (for + // directed graphs) or which processor the other end point of the + // edge resides on (for undirected graphs). + enum edge_target_processor_id_t { edge_target_processor_id }; + BOOST_INSTALL_PROPERTY(edge, target_processor_id); + + // For undirected graphs, tells whether the edge is locally owned. + enum edge_locally_owned_t { edge_locally_owned }; + BOOST_INSTALL_PROPERTY(edge, locally_owned); + + // For bidirectional graphs, stores the incoming edges. + enum vertex_in_edges_t { vertex_in_edges }; + BOOST_INSTALL_PROPERTY(vertex, in_edges); + + /// Tag class for directed, distributed adjacency list + struct directed_distributed_adj_list_tag + : public virtual distributed_graph_tag, + public virtual distributed_vertex_list_graph_tag, + public virtual distributed_edge_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag {}; + + /// Tag class for bidirectional, distributed adjacency list + struct bidirectional_distributed_adj_list_tag + : public virtual distributed_graph_tag, + public virtual distributed_vertex_list_graph_tag, + public virtual distributed_edge_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual bidirectional_graph_tag {}; + + /// Tag class for undirected, distributed adjacency list + struct undirected_distributed_adj_list_tag + : public virtual distributed_graph_tag, + public virtual distributed_vertex_list_graph_tag, + public virtual distributed_edge_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual bidirectional_graph_tag {}; + + namespace detail { + template + void + serialize(Archiver& ar, edge_base& e, + const unsigned int /*version*/) + { + ar & unsafe_serialize(e.m_source) + & unsafe_serialize(e.m_target); + } + + template + void + serialize(Archiver& ar, edge_desc_impl& e, + const unsigned int /*version*/) + { + ar & boost::serialization::base_object >(e) + & unsafe_serialize(e.m_eproperty); + } + } + + namespace detail { namespace parallel { + + /** + * A distributed vertex descriptor. These descriptors contain both + * the ID of the processor that owns the vertex and a local vertex + * descriptor that identifies the particular vertex for that + * processor. + */ + template + struct global_descriptor + { + typedef LocalDescriptor local_descriptor_type; + + global_descriptor() : owner(), local() { } + + global_descriptor(processor_id_type owner, LocalDescriptor local) + : owner(owner), local(local) { } + + processor_id_type owner; + LocalDescriptor local; + + /** + * A function object that, given a processor ID, generates + * distributed vertex descriptors from local vertex + * descriptors. This function object is used by the + * vertex_iterator of the distributed adjacency list. + */ + struct generator + { + typedef global_descriptor result_type; + typedef LocalDescriptor argument_type; + + generator() {} + generator(processor_id_type owner) : owner(owner) {} + + result_type operator()(argument_type v) const + { return result_type(owner, v); } + + private: + processor_id_type owner; + }; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & owner & unsafe_serialize(local); + } + }; + + /// Determine the process that owns the given descriptor + template + inline processor_id_type owner(const global_descriptor& v) + { return v.owner; } + + /// Determine the local portion of the given descriptor + template + inline LocalDescriptor local(const global_descriptor& v) + { return v.local; } + + /// Compare distributed vertex descriptors for equality + template + inline bool + operator==(const global_descriptor& u, + const global_descriptor& v) + { + return u.owner == v.owner && u.local == v.local; + } + + /// Compare distributed vertex descriptors for inequality + template + inline bool + operator!=(const global_descriptor& u, + const global_descriptor& v) + { return !(u == v); } + + template + inline bool + operator<(const global_descriptor& u, + const global_descriptor& v) + { + return (u.owner) < v.owner || (u.owner == v.owner && (u.local) < v.local); + } + + template + inline bool + operator<=(const global_descriptor& u, + const global_descriptor& v) + { + return u.owner <= v.owner || (u.owner == v.owner && u.local <= v.local); + } + + template + inline bool + operator>(const global_descriptor& u, + const global_descriptor& v) + { + return v < u; + } + + template + inline bool + operator>=(const global_descriptor& u, + const global_descriptor& v) + { + return v <= u; + } + + // DPG TBD: Add <, <=, >=, > for global descriptors + + /** + * A Readable Property Map that extracts a global descriptor pair + * from a global_descriptor. + */ + template + struct global_descriptor_property_map + { + typedef std::pair value_type; + typedef value_type reference; + typedef global_descriptor key_type; + typedef readable_property_map_tag category; + }; + + template + inline std::pair + get(global_descriptor_property_map, + global_descriptor x) + { + return std::pair(x.owner, x.local); + } + + /** + * A Readable Property Map that extracts the owner of a global + * descriptor. + */ + template + struct owner_property_map + { + typedef processor_id_type value_type; + typedef value_type reference; + typedef global_descriptor key_type; + typedef readable_property_map_tag category; + }; + + template + inline processor_id_type + get(owner_property_map, + global_descriptor x) + { + return x.owner; + } + + /** + * A Readable Property Map that extracts the local descriptor from + * a global descriptor. + */ + template + struct local_descriptor_property_map + { + typedef LocalDescriptor value_type; + typedef value_type reference; + typedef global_descriptor key_type; + typedef readable_property_map_tag category; + }; + + template + inline LocalDescriptor + get(local_descriptor_property_map, + global_descriptor x) + { + return x.local; + } + + /** + * Stores an incoming edge for a bidirectional distributed + * adjacency list. The user does not see this type directly, + * because it is just an implementation detail. + */ + template + struct stored_in_edge + { + stored_in_edge(processor_id_type sp, Edge e) + : source_processor(sp), e(e) {} + + processor_id_type source_processor; + Edge e; + }; + + /** + * A distributed edge descriptor. These descriptors contain the + * underlying edge descriptor, the processor IDs for both the + * source and the target of the edge, and a boolean flag that + * indicates which of the processors actually owns the edge. + */ + template + struct edge_descriptor + { + edge_descriptor(processor_id_type sp = processor_id_type(), + processor_id_type tp = processor_id_type(), + bool owns = false, Edge ld = Edge()) + : source_processor(sp), target_processor(tp), + source_owns_edge(owns), local(ld) {} + + processor_id_type owner() const + { + return source_owns_edge? source_processor : target_processor; + } + + /// The processor that the source vertex resides on + processor_id_type source_processor; + + /// The processor that the target vertex resides on + processor_id_type target_processor; + + /// True when the source processor owns the edge, false when the + /// target processor owns the edge. + bool source_owns_edge; + + /// The local edge descriptor. + Edge local; + + /** + * Function object that generates edge descriptors for the + * out_edge_iterator of the given distributed adjacency list + * from the edge descriptors of the underlying adjacency list. + */ + template + class out_generator + { + typedef typename Graph::directed_selector directed_selector; + + public: + typedef edge_descriptor result_type; + typedef Edge argument_type; + + out_generator() : g(0) {} + explicit out_generator(const Graph& g) : g(&g) {} + + result_type operator()(argument_type e) const + { return map(e, directed_selector()); } + + private: + result_type map(argument_type e, directedS) const + { + return result_type(g->processor(), + get(edge_target_processor_id, g->base(), e), + true, e); + } + + result_type map(argument_type e, bidirectionalS) const + { + return result_type(g->processor(), + get(edge_target_processor_id, g->base(), e), + true, e); + } + + result_type map(argument_type e, undirectedS) const + { + return result_type(g->processor(), + get(edge_target_processor_id, g->base(), e), + get(edge_locally_owned, g->base(), e), + e); + } + + const Graph* g; + }; + + /** + * Function object that generates edge descriptors for the + * in_edge_iterator of the given distributed adjacency list + * from the edge descriptors of the underlying adjacency list. + */ + template + class in_generator + { + typedef typename Graph::directed_selector DirectedS; + + public: + typedef typename boost::mpl::if_, + stored_in_edge, + Edge>::type argument_type; + typedef edge_descriptor result_type; + + in_generator() : g(0) {} + explicit in_generator(const Graph& g) : g(&g) {} + + result_type operator()(argument_type e) const + { return map(e, DirectedS()); } + + private: + /** + * For a bidirectional graph, we just generate the appropriate + * edge. No tricks. + */ + result_type map(argument_type e, bidirectionalS) const + { + return result_type(e.source_processor, + g->processor(), + true, + e.e); + } + + /** + * For an undirected graph, we generate descriptors for the + * incoming edges by swapping the source/target of the + * underlying edge descriptor (a hack). The target processor + * ID on the edge is actually the source processor for this + * edge, and our processor is the target processor. If the + * edge is locally owned, then it is owned by the target (us); + * otherwise it is owned by the source. + */ + result_type map(argument_type e, undirectedS) const + { + typename Graph::local_edge_descriptor local_edge(e); + // TBD: This is a very, VERY lame hack that takes advantage + // of our knowledge of the internals of the BGL + // adjacency_list. There should be a cleaner way to handle + // this... + using std::swap; + swap(local_edge.m_source, local_edge.m_target); + return result_type(get(edge_target_processor_id, g->base(), e), + g->processor(), + !get(edge_locally_owned, g->base(), e), + local_edge); + } + + const Graph* g; + }; + + private: + friend class boost::serialization::access; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar + & source_processor + & target_processor + & source_owns_edge + & local; + } + }; + + /// Determine the process that owns this edge + template + inline processor_id_type + owner(const edge_descriptor& e) + { return e.source_owns_edge? e.source_processor : e.target_processor; } + + /// Determine the local descriptor for this edge. + template + inline Edge + local(const edge_descriptor& e) + { return e.local; } + + /** + * A Readable Property Map that extracts the owner and local + * descriptor of an edge descriptor. + */ + template + struct edge_global_property_map + { + typedef std::pair value_type; + typedef value_type reference; + typedef edge_descriptor key_type; + typedef readable_property_map_tag category; + }; + + template + inline std::pair + get(edge_global_property_map, const edge_descriptor& e) + { + typedef std::pair result_type; + return result_type(e.source_owns_edge? e.source_processor + /* target owns edge*/: e.target_processor, + e.local); + } + + /** + * A Readable Property Map that extracts the owner of an edge + * descriptor. + */ + template + struct edge_owner_property_map + { + typedef processor_id_type value_type; + typedef value_type reference; + typedef edge_descriptor key_type; + typedef readable_property_map_tag category; + }; + + template + inline processor_id_type + get(edge_owner_property_map, const edge_descriptor& e) + { + return e.source_owns_edge? e.source_processor : e.target_processor; + } + + /** + * A Readable Property Map that extracts the local descriptor from + * an edge descriptor. + */ + template + struct edge_local_property_map + { + typedef Edge value_type; + typedef value_type reference; + typedef edge_descriptor key_type; + typedef readable_property_map_tag category; + }; + + template + inline Edge + get(edge_local_property_map, + const edge_descriptor& e) + { + return e.local; + } + + /** Compare distributed edge descriptors for equality. + * + * \todo need edge_descriptor to know if it is undirected so we + * can compare both ways. + */ + template + inline bool + operator==(const edge_descriptor& e1, + const edge_descriptor& e2) + { + return (e1.source_processor == e2.source_processor + && e1.target_processor == e2.target_processor + && e1.local == e2.local); + } + + /// Compare distributed edge descriptors for inequality. + template + inline bool + operator!=(const edge_descriptor& e1, + const edge_descriptor& e2) + { return !(e1 == e2); } + + /** + * Configuration for the distributed adjacency list. We use this + * parameter to store all of the configuration details for the + * implementation of the distributed adjacency list, which allows us to + * get at the distribution type in the maybe_named_graph. + */ + template + struct adjacency_list_config + { + typedef typename mpl::if_, + vecS, InVertexListS>::type + VertexListS; + + /// Introduce the target processor ID property for each edge + typedef property edge_property_with_id; + + /// For undirected graphs, introduce the locally-owned property for edges + typedef typename boost::mpl::if_, + property, + edge_property_with_id>::type + base_edge_property_type; + + /// The edge descriptor type for the local subgraph + typedef typename adjacency_list_traits::edge_descriptor + local_edge_descriptor; + + /// For bidirectional graphs, the type of an incoming stored edge + typedef stored_in_edge bidir_stored_edge; + + /// The container type that will store incoming edges for a + /// bidirectional graph. + typedef typename container_gen::type + in_edge_list_type; + + // Bidirectional graphs have an extra vertex property to store + // the incoming edges. + typedef typename boost::mpl::if_, + property, + VertexProperty>::type + base_vertex_property_type; + + // The type of the distributed adjacency list + typedef adjacency_list, + DirectedS, VertexProperty, EdgeProperty, + GraphProperty, EdgeListS> + graph_type; + + // The type of the underlying adjacency list implementation + typedef adjacency_list + inherited; + + typedef InDistribution in_distribution_type; + typedef typename inherited::vertices_size_type vertices_size_type; + + typedef typename ::boost::graph::distributed::select_distribution< + in_distribution_type, VertexProperty, vertices_size_type, + ProcessGroup>::type + base_distribution_type; + + typedef ::boost::graph::distributed::shuffled_distribution< + base_distribution_type> distribution_type; + + typedef VertexProperty vertex_property_type; + typedef EdgeProperty edge_property_type; + typedef ProcessGroup process_group_type; + + typedef VertexListS vertex_list_selector; + typedef OutEdgeListS out_edge_list_selector; + typedef DirectedS directed_selector; + typedef GraphProperty graph_property_type; + typedef EdgeListS edge_list_selector; + }; + + // Maybe initialize the indices of each vertex + template + void + maybe_initialize_vertex_indices(IteratorPair p, VertexIndexMap to_index, + read_write_property_map_tag) + { + typedef typename property_traits::value_type index_t; + index_t next_index = 0; + while (p.first != p.second) + put(to_index, *p.first++, next_index++); + } + + template + inline void + maybe_initialize_vertex_indices(IteratorPair p, VertexIndexMap to_index, + readable_property_map_tag) + { + // Do nothing + } + + template + inline void + maybe_initialize_vertex_indices(IteratorPair p, VertexIndexMap to_index) + { + typedef typename property_traits::category category; + maybe_initialize_vertex_indices(p, to_index, category()); + } + + template + inline void + maybe_initialize_vertex_indices(IteratorPair p, + ::boost::detail::error_property_not_found) + { } + + /*********************************************************************** + * Message Payloads * + ***********************************************************************/ + + /** + * Data stored with a msg_add_edge message, which requests the + * remote addition of an edge. + */ + template + struct msg_add_edge_data + { + msg_add_edge_data() { } + + msg_add_edge_data(Vertex source, Vertex target) + : source(source.local), target(target) { } + + /// The source of the edge; the processor will be the + /// receiving processor. + LocalVertex source; + + /// The target of the edge. + Vertex target; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & unsafe_serialize(source) & target; + } + }; + + /** + * Like @c msg_add_edge_data, but also includes a user-specified + * property value to be attached to the edge. + */ + template + struct msg_add_edge_with_property_data + : msg_add_edge_data, + maybe_store_property + { + private: + typedef msg_add_edge_data inherited_data; + typedef maybe_store_property inherited_property; + + public: + msg_add_edge_with_property_data() { } + + msg_add_edge_with_property_data(Vertex source, + Vertex target, + const EdgeProperty& property) + : inherited_data(source, target), + inherited_property(property) { } + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & boost::serialization::base_object(*this) + & boost::serialization::base_object(*this); + } + }; + + //------------------------------------------------------------------------ + // Distributed adjacency list property map details + /** + * Metafunction that extracts the given property from the given + * distributed adjacency list type. This could be implemented much + * more cleanly, but even newer versions of GCC (e.g., 3.2.3) + * cannot properly handle partial specializations involving + * enumerator types. + */ + template + struct get_adj_list_pmap + { + template + struct apply + { + typedef Graph graph_type; + typedef typename graph_type::process_group_type process_group_type; + typedef typename graph_type::inherited base_graph_type; + typedef typename property_map::type + local_pmap; + typedef typename property_map::const_type + local_const_pmap; + + typedef graph_traits traits; + typedef typename graph_type::local_vertex_descriptor local_vertex; + typedef typename property_traits::key_type local_key_type; + + typedef typename property_traits::value_type value_type; + + typedef typename property_map::const_type + vertex_global_map; + typedef typename property_map::const_type + edge_global_map; + + typedef typename mpl::if_c<(is_same::value), + vertex_global_map, edge_global_map>::type + global_map; + + public: + typedef ::boost::parallel::distributed_property_map< + process_group_type, global_map, local_pmap> type; + + typedef ::boost::parallel::distributed_property_map< + process_group_type, global_map, local_const_pmap> const_type; + }; + }; + + /** + * The local vertex index property map is actually a mapping from + * the local vertex descriptors to vertex indices. + */ + template<> + struct get_adj_list_pmap + { + template + struct apply + : ::boost::property_map + { }; + }; + + /** + * The vertex index property map maps from global descriptors + * (e.g., the vertex descriptor of a distributed adjacency list) + * to the underlying local index. It is not valid to use this + * property map with nonlocal descriptors. + */ + template<> + struct get_adj_list_pmap + { + template + struct apply + { + private: + typedef typename property_map::const_type + global_map; + + typedef property_map local; + + public: + typedef local_property_map type; + typedef local_property_map const_type; + }; + }; + + /** + * The vertex owner property map maps from vertex descriptors to + * the processor that owns the vertex. + */ + template<> + struct get_adj_list_pmap + { + template + struct apply + { + private: + typedef typename Graph::local_vertex_descriptor + local_vertex_descriptor; + public: + typedef global_descriptor_property_map type; + typedef type const_type; + }; + }; + + /** + * The vertex owner property map maps from vertex descriptors to + * the processor that owns the vertex. + */ + template<> + struct get_adj_list_pmap + { + template + struct apply + { + private: + typedef typename Graph::local_vertex_descriptor + local_vertex_descriptor; + public: + typedef owner_property_map type; + typedef type const_type; + }; + }; + + /** + * The vertex local property map maps from vertex descriptors to + * the local descriptor for that vertex. + */ + template<> + struct get_adj_list_pmap + { + template + struct apply + { + private: + typedef typename Graph::local_vertex_descriptor + local_vertex_descriptor; + public: + typedef local_descriptor_property_map type; + typedef type const_type; + }; + }; + + /** + * The edge global property map maps from edge descriptors to + * a pair of the owning processor and local descriptor. + */ + template<> + struct get_adj_list_pmap + { + template + struct apply + { + private: + typedef typename Graph::local_edge_descriptor + local_edge_descriptor; + public: + typedef edge_global_property_map type; + typedef type const_type; + }; + }; + + /** + * The edge owner property map maps from edge descriptors to + * the processor that owns the edge. + */ + template<> + struct get_adj_list_pmap + { + template + struct apply + { + private: + typedef typename Graph::local_edge_descriptor + local_edge_descriptor; + public: + typedef edge_owner_property_map type; + typedef type const_type; + }; + }; + + /** + * The edge local property map maps from edge descriptors to + * the local descriptor for that edge. + */ + template<> + struct get_adj_list_pmap + { + template + struct apply + { + private: + typedef typename Graph::local_edge_descriptor + local_edge_descriptor; + public: + typedef edge_local_property_map type; + typedef type const_type; + }; + }; + //------------------------------------------------------------------------ + + // Directed graphs do not have in edges, so this is a no-op + template + inline void + remove_in_edge(typename Graph::edge_descriptor, Graph&, directedS) + { } + + // Bidirectional graphs have in edges stored in the + // vertex_in_edges property. + template + inline void + remove_in_edge(typename Graph::edge_descriptor e, Graph& g, bidirectionalS) + { + typedef typename Graph::in_edge_list_type in_edge_list_type; + in_edge_list_type& in_edges = + get(vertex_in_edges, g.base())[target(e, g).local]; + typename in_edge_list_type::iterator i = in_edges.begin(); + while (i != in_edges.end() + && !(i->source_processor == source(e, g).owner) + && i->e == e.local) + ++i; + + assert(i != in_edges.end()); + in_edges.erase(i); + } + + // Undirected graphs have in edges stored as normal edges. + template + inline void + remove_in_edge(typename Graph::edge_descriptor e, Graph& g, undirectedS) + { + typedef typename Graph::inherited base_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + // TBD: can we make this more efficient? + // Removing edge (v, u). v is local + base_type& bg = g.base(); + vertex_descriptor u = source(e, g); + vertex_descriptor v = target(e, g); + if (v.owner != process_id(g.process_group())) { + using std::swap; + swap(u, v); + } + + typename graph_traits::out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(v.local, bg); ei != ei_end; ++ei) + { + if (target(*ei, g.base()) == u.local + // TBD: deal with parallel edges properly && *ei == e + && get(edge_target_processor_id, bg, *ei) == u.owner) { + remove_edge(ei, bg); + return; + } + } + + if (v.owner == process_id(g.process_group())) { + + } + } + + //------------------------------------------------------------------------ + // Lazy addition of edges + + // Work around the fact that an adjacency_list with vecS vertex + // storage automatically adds edges when the descriptor is + // out-of-range. + template + inline std::pair + add_local_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + vec_adj_list_impl& g_) + { + adj_list_helper& g = g_; + return add_edge(u, v, p, g); + } + + template + inline std::pair + add_local_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + boost::adj_list_impl& g) + { + return add_edge(u, v, p, g); + } + + template + struct msg_nonlocal_edge_data + : public detail::parallel::maybe_store_property + { + typedef EdgeProperty edge_property_type; + typedef EdgeDescriptor local_edge_descriptor; + typedef detail::parallel::maybe_store_property + inherited; + + msg_nonlocal_edge_data() {} + msg_nonlocal_edge_data(local_edge_descriptor e, + const edge_property_type& p) + : inherited(p), e(e) { } + + local_edge_descriptor e; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & boost::serialization::base_object(*this) & e; + } + }; + + template + struct msg_remove_edge_data + { + typedef EdgeDescriptor edge_descriptor; + msg_remove_edge_data() {} + explicit msg_remove_edge_data(edge_descriptor e) : e(e) {} + + edge_descriptor e; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & e; + } + }; + + } } // end namespace detail::parallel + + /** + * Adjacency list traits for a distributed adjacency list. Contains + * the vertex and edge descriptors, the directed-ness, and the + * parallel edges typedefs. + */ + template + struct adjacency_list_traits, + DirectedS> + { + private: + typedef typename mpl::if_, + vecS, + InVertexListS>::type VertexListS; + + typedef adjacency_list_traits + base_type; + + public: + typedef typename base_type::vertex_descriptor local_vertex_descriptor; + typedef typename base_type::edge_descriptor local_edge_descriptor; + + typedef typename boost::mpl::if_::type + >::type directed_category; + + typedef typename parallel_edge_traits::type + edge_parallel_category; + + typedef detail::parallel::global_descriptor + vertex_descriptor; + + typedef detail::parallel::edge_descriptor + edge_descriptor; + }; + +#define PBGL_DISTRIB_ADJLIST_TEMPLATE_PARMS \ + typename OutEdgeListS, typename ProcessGroup, typename InVertexListS, \ + typename InDistribution, typename DirectedS, typename VertexProperty, \ + typename EdgeProperty, typename GraphProperty, typename EdgeListS + +#define PBGL_DISTRIB_ADJLIST_TYPE \ + adjacency_list, \ + DirectedS, VertexProperty, EdgeProperty, GraphProperty, \ + EdgeListS> + +#define PBGL_DISTRIB_ADJLIST_TEMPLATE_PARMS_CONFIG \ + typename OutEdgeListS, typename ProcessGroup, typename InVertexListS, \ + typename InDistribution, typename VertexProperty, \ + typename EdgeProperty, typename GraphProperty, typename EdgeListS + +#define PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directed) \ + adjacency_list, \ + directed, VertexProperty, EdgeProperty, GraphProperty, \ + EdgeListS> + + /** A distributed adjacency list. + * + * This class template partial specialization defines a distributed + * (or "partitioned") adjacency list graph. The distributed + * adjacency list is similar to the standard Boost Graph Library + * adjacency list, which stores a list of vertices and for each + * verted the list of edges outgoing from the vertex (and, in some + * cases, also the edges incoming to the vertex). The distributed + * adjacency list differs in that it partitions the graph into + * several subgraphs that are then divided among different + * processors (or nodes within a cluster). The distributed adjacency + * list attempts to maintain a high degree of compatibility with the + * standard, non-distributed adjacency list. + * + * The graph is partitioned by vertex, with each processor storing + * all of the required information for a particular subset of the + * vertices, including vertex properties, outgoing edges, and (for + * bidirectional graphs) incoming edges. This information is + * accessible only on the processor that owns the vertex: for + * instance, if processor 0 owns vertex @c v, no other processor can + * directly access the properties of @c v or enumerate its outgoing + * edges. + * + * Edges in a graph may be entirely local (connecting two local + * vertices), but more often it is the case that edges are + * non-local, meaning that the two vertices they connect reside in + * different processes. Edge properties are stored with the + * originating vertex for directed and bidirectional graphs, and are + * therefore only accessible from the processor that owns the + * originating vertex. Other processors may query the source and + * target of the edge, but cannot access its properties. This is + * particularly interesting when accessing the incoming edges of a + * bidirectional graph, which are not guaranteed to be stored on the + * processor that is able to perform the iteration. For undirected + * graphs the situation is more complicated, since no vertex clearly + * owns the edges: the list of edges incident to a vertex may + * contain a mix of local and non-local edges. + * + * The distributed adjacency list is able to model several of the + * existing Graph concepts. It models the Graph concept because it + * exposes vertex and edge descriptors in the normal way; these + * descriptors model the GlobalDescriptor concept (because they have + * an owner and a local descriptor), and as such the distributed + * adjacency list models the DistributedGraph concept. The adjacency + * list also models the IncidenceGraph and AdjacencyGraph concepts, + * although this is only true so long as the domain of the valid + * expression arguments are restricted to vertices and edges stored + * locally. Likewise, bidirectional and undirected distributed + * adjacency lists model the BidirectionalGraph concept (vertex and + * edge domains must be respectived) and the distributed adjacency + * list models the MutableGraph concept (vertices and edges can only + * be added or removed locally). T he distributed adjacency list + * does not, however, model the VertexListGraph or EdgeListGraph + * concepts, because we can not efficiently enumerate all vertices + * or edges in the graph. Instead, the local subsets of vertices and + * edges can be enumerated (with the same syntax): the distributed + * adjacency list therefore models the DistributedVertexListGraph + * and DistributedEdgeListGraph concepts, because concurrent + * iteration over all of the vertices or edges stored on each + * processor will visit each vertex or edge. + * + * The distributed adjacency list is distinguished from the + * non-distributed version by the vertex list descriptor, which will + * be @c distributedS. Here, + * the VertexListS type plays the same role as the VertexListS type + * in the non-distributed adjacency list: it allows one to select + * the data structure that will be used to store the local + * vertices. The ProcessGroup type, on the other hand, is unique to + * distributed data structures: it is the type that abstracts a + * group of cooperating processes, and it used for process + * identification, communication, and synchronization, among other + * things. Different process group types represent different + * communication mediums (e.g., MPI, PVM, TCP) or different models + * of communication (LogP, CGM, BSP, synchronous, etc.). This + * distributed adjacency list assumes a model based on non-blocking + * sends. + * + * Distribution of vertices across different processors is + * accomplished in two different ways. When initially constructing + * the graph, the user may provide a distribution object (that + * models the Distribution concept), which will determine the + * distribution of vertices to each process. Additionally, the @c + * add_vertex and @c add_edge operations add vertices or edges + * stored on the local processor. For @c add_edge, this is + * accomplished by requiring that the source vertex of the new edge + * be local to the process executing @c add_edge. + * + * Internal properties of a distributed adjacency list are + * accessible in the same manner as internal properties for a + * non-distributed adjacency list for local vertices or + * edges. Access to properties for remote vertices or edges occurs + * with the same syntax, but involve communication with the owner of + * the information: for more information, refer to class template + * @ref distributed_property_map, which manages distributed + * property maps. Note that the distributed property maps created + * for internal properties determine their reduction operation via + * the metafunction @ref property_reduce, which for the vast + * majority of uses is correct behavior. + * + * Communication among the processes coordinating on a particular + * distributed graph relies on non-blocking message passing along + * with synchronization. Local portions of the distributed graph may + * be modified concurrently, including the introduction of non-local + * edges, but prior to accessing the graph it is recommended that + * the @c synchronize free function be invoked on the graph to clear + * up any pending interprocess communication and modifications. All + * processes will then be released from the synchronization barrier + * concurrently. + * + * \todo Determine precisely what we should do with nonlocal edges + * in undirected graphs. Our parallelization of certain algorithms + * relies on the ability to access edge property maps immediately + * (e.g., edge_weight_t), so it may be necessary to duplicate the + * edge properties in both processes (but then we need some form of + * coherence protocol). + * + * \todo What does the user do if @c property_reduce doesn't do the + * right thing? + */ + template + class adjacency_list, + DirectedS, VertexProperty, + EdgeProperty, GraphProperty, EdgeListS> + : // Support for named vertices + public graph::distributed::maybe_named_graph< + adjacency_list, + DirectedS, VertexProperty, + EdgeProperty, GraphProperty, EdgeListS>, + typename adjacency_list_traits, + DirectedS>::vertex_descriptor, + typename adjacency_list_traits, + DirectedS>::edge_descriptor, + detail::parallel::adjacency_list_config > + { + typedef detail::parallel::adjacency_list_config + config_type; + + typedef adjacency_list_traits, + DirectedS> + traits_type; + + typedef typename DirectedS::is_directed_t is_directed; + + typedef EdgeListS edge_list_selector; + + public: + /// The container type that will store incoming edges for a + /// bidirectional graph. + typedef typename config_type::in_edge_list_type in_edge_list_type; +// typedef typename inherited::edge_descriptor edge_descriptor; + + /// The type of the underlying adjacency list implementation + typedef typename config_type::inherited inherited; + + /// The type of properties stored in the local subgraph + /// Bidirectional graphs have an extra vertex property to store + /// the incoming edges. + typedef typename inherited::vertex_property_type + base_vertex_property_type; + + /// The type of the distributed adjacency list (this type) + typedef typename config_type::graph_type graph_type; + + /// Expose graph components and graph category + typedef typename traits_type::local_vertex_descriptor + local_vertex_descriptor; + typedef typename traits_type::local_edge_descriptor + local_edge_descriptor; + typedef typename traits_type::vertex_descriptor vertex_descriptor; + typedef typename traits_type::edge_descriptor edge_descriptor; + + typedef typename traits_type::directed_category directed_category; + typedef typename inherited::edge_parallel_category + edge_parallel_category; + typedef typename inherited::graph_tag graph_tag; + + // Current implementation requires the ability to have parallel + // edges in the underlying adjacency_list. Which processor each + // edge refers to is attached as an internal property. TBD: + // remove this restriction, which may require some rewriting. + BOOST_STATIC_ASSERT((is_same::value)); + + /** Determine the graph traversal category. + * + * A directed distributed adjacency list models the Distributed + * Graph, Incidence Graph, and Adjacency Graph + * concepts. Bidirectional and undirected graphs also model the + * Bidirectional Graph concept. Note that when modeling these + * concepts the domains of certain operations (e.g., in_edges) + * are restricted; see the distributed adjacency_list + * documentation. + */ + typedef typename boost::mpl::if_< + is_same, + directed_distributed_adj_list_tag, + typename boost::mpl::if_, + bidirectional_distributed_adj_list_tag, + undirected_distributed_adj_list_tag>::type> + ::type traversal_category; + + typedef typename inherited::degree_size_type degree_size_type; + typedef typename inherited::vertices_size_type vertices_size_type; + typedef typename inherited::edges_size_type edges_size_type; + typedef VertexProperty vertex_property_type; + typedef EdgeProperty edge_property_type; + typedef typename inherited::graph_property_type graph_property_type; + typedef typename inherited::vertex_bundled vertex_bundled; + typedef typename inherited::edge_bundled edge_bundled; + typedef typename inherited::graph_bundled graph_bundled; + + typedef typename container_gen::type + local_edge_list_type; + + private: + typedef typename boost::mpl::if_, + typename in_edge_list_type::const_iterator, + typename inherited::out_edge_iterator>::type + base_in_edge_iterator; + + typedef typename inherited::out_edge_iterator base_out_edge_iterator; + typedef typename graph_traits::edge_iterator + base_edge_iterator; + typedef typename inherited::edge_property_type base_edge_property_type; + + typedef typename local_edge_list_type::const_iterator + undirected_edge_iterator; + + typedef InDistribution in_distribution_type; + + typedef parallel::trigger_receive_context trigger_receive_context; + + public: + /// Iterator over the (local) vertices of the graph + typedef transform_iterator + vertex_iterator; + + /// Helper for out_edge_iterator + typedef typename edge_descriptor::template out_generator + out_edge_generator; + + /// Iterator over the outgoing edges of a vertex + typedef transform_iterator + out_edge_iterator; + + /// Helper for in_edge_iterator + typedef typename edge_descriptor::template in_generator + in_edge_generator; + + /// Iterator over the incoming edges of a vertex + typedef transform_iterator + in_edge_iterator; + + /// Iterator over the neighbors of a vertex + typedef boost::adjacency_iterator< + adjacency_list, vertex_descriptor, out_edge_iterator, + typename detail::iterator_traits + ::difference_type> + adjacency_iterator; + + /// Iterator over the (local) edges in a graph + typedef typename boost::mpl::if_, + undirected_edge_iterator, + transform_iterator + >::type + edge_iterator; + + public: + /// The type of the mixin for named vertices + typedef graph::distributed::maybe_named_graph + named_graph_mixin; + + /// Process group used for communication + typedef ProcessGroup process_group_type; + + /// How to refer to a process + typedef typename process_group_type::process_id_type process_id_type; + + /// Whether this graph is directed, undirected, or bidirectional + typedef DirectedS directed_selector; + + // Structure used for the lazy addition of vertices + struct lazy_add_vertex_with_property; + friend struct lazy_add_vertex_with_property; + + // Structure used for the lazy addition of edges + struct lazy_add_edge; + friend struct lazy_add_edge; + + // Structure used for the lazy addition of edges with properties + struct lazy_add_edge_with_property; + friend struct lazy_add_edge_with_property; + + /// default_distribution_type is the type of the distribution used if the + /// user didn't specify an explicit one + typedef typename graph::distributed::select_distribution< + InDistribution, VertexProperty, vertices_size_type, + ProcessGroup>::default_type + default_distribution_type; + + /// distribution_type is the type of the distribution instance stored in + /// the maybe_named_graph base class + typedef typename graph::distributed::select_distribution< + InDistribution, VertexProperty, vertices_size_type, + ProcessGroup>::type + base_distribution_type; + + typedef graph::distributed::shuffled_distribution< + base_distribution_type> distribution_type; + + private: + // FIXME: the original adjacency_list contained this comment: + // Default copy constructor and copy assignment operators OK??? TBD + // but the adj_list_impl contained these declarations: + adjacency_list(const adjacency_list& other); + adjacency_list& operator=(const adjacency_list& other); + + public: + adjacency_list(const ProcessGroup& pg = ProcessGroup()) + : named_graph_mixin(pg, default_distribution_type(pg, 0)), + m_local_graph(GraphProperty()), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + } + + adjacency_list(const ProcessGroup& pg, + const base_distribution_type& distribution) + : named_graph_mixin(pg, distribution), + m_local_graph(GraphProperty()), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + } + + adjacency_list(const GraphProperty& g, + const ProcessGroup& pg = ProcessGroup()) + : named_graph_mixin(pg, default_distribution_type(pg, 0)), + m_local_graph(g), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + } + + adjacency_list(vertices_size_type n, + const GraphProperty& p, + const ProcessGroup& pg, + const base_distribution_type& distribution) + : named_graph_mixin(pg, distribution), + m_local_graph(distribution.block_size(process_id(pg), n), p), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); + } + + adjacency_list(vertices_size_type n, + const ProcessGroup& pg, + const base_distribution_type& distribution) + : named_graph_mixin(pg, distribution), + m_local_graph(distribution.block_size(process_id(pg), n), GraphProperty()), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); + } + + adjacency_list(vertices_size_type n, + const GraphProperty& p, + const ProcessGroup& pg = ProcessGroup()) + : named_graph_mixin(pg, default_distribution_type(pg, n)), + m_local_graph(this->distribution().block_size(process_id(pg), n), p), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); + } + + adjacency_list(vertices_size_type n, + const ProcessGroup& pg = ProcessGroup()) + : named_graph_mixin(pg, default_distribution_type(pg, n)), + m_local_graph(this->distribution().block_size(process_id(pg), n), + GraphProperty()), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); + } + + /* + * We assume that every processor sees the same list of edges, so + * they skip over any that don't originate from themselves. This + * means that programs switching between a local and a distributed + * graph will keep the same semantics. + */ + template + adjacency_list(EdgeIterator first, EdgeIterator last, + vertices_size_type n, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& p = GraphProperty()) + : named_graph_mixin(pg, default_distribution_type(pg, n)), + m_local_graph(this->distribution().block_size(process_id(pg), n), p), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + + typedef typename config_type::VertexListS vertex_list_selector; + initialize(first, last, n, this->distribution(), vertex_list_selector()); + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); + + } + + template + adjacency_list(EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter, + vertices_size_type n, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& p = GraphProperty()) + : named_graph_mixin(pg, default_distribution_type(pg, n)), + m_local_graph(this->distribution().block_size(process_id(pg), n), p), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + + typedef typename config_type::VertexListS vertex_list_selector; + initialize(first, last, ep_iter, n, this->distribution(), + vertex_list_selector()); + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); + + } + + template + adjacency_list(EdgeIterator first, EdgeIterator last, + vertices_size_type n, + const ProcessGroup& pg, + const base_distribution_type& distribution, + const GraphProperty& p = GraphProperty()) + : named_graph_mixin(pg, distribution), + m_local_graph(distribution.block_size(process_id(pg), n), p), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + + typedef typename config_type::VertexListS vertex_list_selector; + initialize(first, last, n, this->distribution(), vertex_list_selector()); + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); + + } + + template + adjacency_list(EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter, + vertices_size_type n, + const ProcessGroup& pg, + const base_distribution_type& distribution, + const GraphProperty& p = GraphProperty()) + : named_graph_mixin(pg, distribution), + m_local_graph(this->distribution().block_size(process_id(pg), n), p), + process_group_(pg, graph::parallel::attach_distributed_object()) + { + setup_triggers(); + + typedef typename config_type::VertexListS vertex_list_selector; + initialize(first, last, ep_iter, n, distribution, + vertex_list_selector()); + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); + + } + + ~adjacency_list() + { + synchronize(process_group_); + } + + void clear() + { + base().clear(); + local_edges_.clear(); + named_graph_mixin::clearing_graph(); + } + + void swap(adjacency_list& other) + { + using std::swap; + + base().swap(other); + swap(process_group_, other.process_group_); + } + + static vertex_descriptor null_vertex() + { + return vertex_descriptor(processor_id_type(0), + inherited::null_vertex()); + } + + inherited& base() { return m_local_graph; } + const inherited& base() const { return m_local_graph; } + + processor_id_type processor() const { return process_id(process_group_); } + process_group_type process_group() const { return process_group_.base(); } + + local_edge_list_type& local_edges() { return local_edges_; } + const local_edge_list_type& local_edges() const { return local_edges_; } + + // Redistribute the vertices of the graph by placing each vertex + // v on the processor get(vertex_to_processor, v). + template + void redistribute(VertexProcessorMap vertex_to_processor); + + // Directly access a vertex or edge bundle + vertex_bundled& operator[](vertex_descriptor v) + { + assert(v.owner == processor()); + return base()[v.local]; + } + + const vertex_bundled& operator[](vertex_descriptor v) const + { + assert(v.owner == processor()); + return base()[v.local]; + } + + edge_bundled& operator[](edge_descriptor e) + { + assert(e.owner() == processor()); + return base()[e.local]; + } + + const edge_bundled& operator[](edge_descriptor e) const + { + assert(e.owner() == processor()); + return base()[e.local]; + } + + graph_bundled& operator[](graph_bundle_t) + { return get_property(*this); } + + graph_bundled const& operator[](graph_bundle_t) const + { return get_property(*this); } + + template + void save(std::string const& filename) const; + + template + void load(std::string const& filename); + + // Callback that will be invoked whenever a new vertex is added locally + boost::function on_add_vertex; + + // Callback that will be invoked whenever a new edge is added locally + boost::function on_add_edge; + + private: + // Request vertex->processor mapping for neighbors + template + void + request_in_neighbors(vertex_descriptor, + VertexProcessorMap, + directedS) { } + + // Request vertex->processor mapping for neighbors + template + void + request_in_neighbors(vertex_descriptor, + VertexProcessorMap, + undirectedS) { } + + // Request vertex->processor mapping for neighbors + template + void + request_in_neighbors(vertex_descriptor v, + VertexProcessorMap vertex_to_processor, + bidirectionalS); + + // Clear the list of in-edges, but don't tell the remote processor + void clear_in_edges_local(vertex_descriptor v, directedS) {} + void clear_in_edges_local(vertex_descriptor v, undirectedS) {} + + void clear_in_edges_local(vertex_descriptor v, bidirectionalS) + { get(vertex_in_edges, base())[v.local].clear(); } + + // Remove in-edges that have migrated + template + void + remove_migrated_in_edges(vertex_descriptor, + VertexProcessorMap, + directedS) { } + + // Remove in-edges that have migrated + template + void + remove_migrated_in_edges(vertex_descriptor, + VertexProcessorMap, + undirectedS) { } + + // Remove in-edges that have migrated + template + void + remove_migrated_in_edges(vertex_descriptor v, + VertexProcessorMap vertex_to_processor, + bidirectionalS); + + // Initialize the graph with the given edge list and vertex + // distribution. This variation works only when + // VertexListS=vecS, and we know how to create remote vertex + // descriptors based solely on the distribution. + template + void + initialize(EdgeIterator first, EdgeIterator last, + vertices_size_type, const base_distribution_type& distribution, + vecS); + + // Initialize the graph with the given edge list, edge + // properties, and vertex distribution. This variation works + // only when VertexListS=vecS, and we know how to create remote + // vertex descriptors based solely on the distribution. + template + void + initialize(EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter, + vertices_size_type, const base_distribution_type& distribution, + vecS); + + // Initialize the graph with the given edge list, edge + // properties, and vertex distribution. + template + void + initialize(EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter, + vertices_size_type n, + const base_distribution_type& distribution, + VertexListS); + + // Initialize the graph with the given edge list and vertex + // distribution. This is nearly identical to the one below it, + // for which I should be flogged. However, this version does use + // slightly less memory than the version that accepts an edge + // property iterator. + template + void + initialize(EdgeIterator first, EdgeIterator last, + vertices_size_type n, + const base_distribution_type& distribution, + VertexListS); + + public: + //--------------------------------------------------------------------- + // Build a vertex property instance for the underlying adjacency + // list from the given property instance of the type exposed to + // the user. + base_vertex_property_type + build_vertex_property(const vertex_property_type& p) + { return build_vertex_property(p, directed_selector()); } + + base_vertex_property_type + build_vertex_property(const vertex_property_type& p, directedS) + { + return base_vertex_property_type(p); + } + + base_vertex_property_type + build_vertex_property(const vertex_property_type& p, bidirectionalS) + { + return base_vertex_property_type(in_edge_list_type(), p); + } + + base_vertex_property_type + build_vertex_property(const vertex_property_type& p, undirectedS) + { + return base_vertex_property_type(p); + } + //--------------------------------------------------------------------- + + //--------------------------------------------------------------------- + // Build an edge property instance for the underlying adjacency + // list from the given property instance of the type exposed to + // the user. + base_edge_property_type build_edge_property(const edge_property_type& p) + { return build_edge_property(p, directed_selector()); } + + base_edge_property_type + build_edge_property(const edge_property_type& p, directedS) + { + return base_edge_property_type(0, p); + } + + base_edge_property_type + build_edge_property(const edge_property_type& p, bidirectionalS) + { + return base_edge_property_type(0, p); + } + + base_edge_property_type + build_edge_property(const edge_property_type& p, undirectedS) + { + typedef typename base_edge_property_type::next_type + edge_property_with_id; + return base_edge_property_type(true, edge_property_with_id(0, p)); + } + //--------------------------------------------------------------------- + + /** The set of messages that can be transmitted and received by + * a distributed adjacency list. This list will eventually be + * exhaustive, but is currently quite limited. + */ + enum { + /** + * Request to add or find a vertex with the given vertex + * property. The data will be a vertex_property_type + * structure. + */ + msg_add_vertex_with_property = 0, + + /** + * Request to add or find a vertex with the given vertex + * property, and request that the remote processor return the + * descriptor for the added/found edge. The data will be a + * vertex_property_type structure. + */ + msg_add_vertex_with_property_and_reply, + + /** + * Reply to a msg_add_vertex_* message, containing the local + * vertex descriptor that was added or found. + */ + msg_add_vertex_reply, + + /** + * Request to add an edge remotely. The data will be a + * msg_add_edge_data structure. + */ + msg_add_edge, + + /** + * Request to add an edge remotely. The data will be a + * msg_add_edge_with_property_data structure. + */ + msg_add_edge_with_property, + + /** + * Request to add an edge remotely and reply back with the + * edge descriptor. The data will be a + * msg_add_edge_data structure. + */ + msg_add_edge_with_reply, + + /** + * Request to add an edge remotely and reply back with the + * edge descriptor. The data will be a + * msg_add_edge_with_property_data structure. + */ + msg_add_edge_with_property_and_reply, + + /** + * Reply message responding to an @c msg_add_edge_with_reply + * or @c msg_add_edge_with_property_and_reply messages. The + * data will be a std::pair. + */ + msg_add_edge_reply, + + /** + * Indicates that a nonlocal edge has been created that should + * be added locally. Only valid for bidirectional and + * undirected graphs. The message carries a + * msg_nonlocal_edge_data structure. + */ + msg_nonlocal_edge, + + /** + * Indicates that a remote edge should be removed. This + * message does not exist for directedS graphs but may refer + * to either in-edges or out-edges for undirectedS graphs. + */ + msg_remove_edge, + + /** + * Indicates the number of vertices and edges that will be + * relocated from the source processor to the target + * processor. The data will be a pair. + */ + msg_num_relocated + }; + + typedef detail::parallel::msg_add_edge_data + msg_add_edge_data; + + typedef detail::parallel::msg_add_edge_with_property_data + msg_add_edge_with_property_data; + + typedef boost::detail::parallel::msg_nonlocal_edge_data< + edge_property_type,local_edge_descriptor> msg_nonlocal_edge_data; + + typedef boost::detail::parallel::msg_remove_edge_data + msg_remove_edge_data; + + void send_remove_edge_request(edge_descriptor e) + { + process_id_type dest = e.target_processor; + if (e.target_processor == process_id(process_group_)) + dest = e.source_processor; + send(process_group_, dest, msg_remove_edge, msg_remove_edge_data(e)); + } + + /// Process incoming messages. + void setup_triggers(); + + void + handle_add_vertex_with_property(int source, int tag, + const vertex_property_type&, + trigger_receive_context); + + local_vertex_descriptor + handle_add_vertex_with_property_and_reply(int source, int tag, + const vertex_property_type&, + trigger_receive_context); + + void + handle_add_edge(int source, int tag, const msg_add_edge_data& data, + trigger_receive_context); + + boost::parallel::detail::untracked_pair + handle_add_edge_with_reply(int source, int tag, + const msg_add_edge_data& data, + trigger_receive_context); + + void + handle_add_edge_with_property(int source, int tag, + const msg_add_edge_with_property_data&, + trigger_receive_context); + + boost::parallel::detail::untracked_pair + handle_add_edge_with_property_and_reply + (int source, int tag, const msg_add_edge_with_property_data&, + trigger_receive_context); + + void + handle_nonlocal_edge(int source, int tag, + const msg_nonlocal_edge_data& data, + trigger_receive_context); + + void + handle_remove_edge(int source, int tag, + const msg_remove_edge_data& data, + trigger_receive_context); + + protected: + /** Add an edge (locally) that was received from another + * processor. This operation is a no-op for directed graphs, + * because all edges reside on the local processor. For + * bidirectional graphs, this routine places the edge onto the + * list of incoming edges for the target vertex. For undirected + * graphs, the edge is placed along with all of the other edges + * for the target vertex, but it is marked as a non-local edge + * descriptor. + * + * \todo There is a potential problem here, where we could + * unintentionally allow duplicate edges in undirected graphs + * because the same edge is added on two different processors + * simultaneously. It's not an issue now, because we require + * that the graph allow parallel edges. Once we do support + * containers such as setS or hash_setS that disallow parallel + * edges we will need to deal with this. + */ + void + add_remote_edge(const msg_nonlocal_edge_data&, + processor_id_type, directedS) + { } + + + /** + * \overload + */ + void + add_remote_edge(const msg_nonlocal_edge_data& data, + processor_id_type other_proc, bidirectionalS) + { + typedef detail::parallel::stored_in_edge stored_edge; + + stored_edge edge(other_proc, data.e); + local_vertex_descriptor v = target(data.e, base()); + boost::graph_detail::push(get(vertex_in_edges, base())[v], edge); + } + + /** + * \overload + */ + void + add_remote_edge(const msg_nonlocal_edge_data& data, + processor_id_type other_proc, undirectedS) + { + std::pair edge = + detail::parallel::add_local_edge(target(data.e, base()), + source(data.e, base()), + build_edge_property(data.get_property()), base()); + assert(edge.second); + put(edge_target_processor_id, base(), edge.first, other_proc); + + if (edge.second && on_add_edge) + on_add_edge(edge_descriptor(processor(), other_proc, false, + edge.first), + *this); + } + + void + remove_local_edge(const msg_remove_edge_data&, processor_id_type, + directedS) + { } + + void + remove_local_edge(const msg_remove_edge_data& data, + processor_id_type other_proc, bidirectionalS) + { + /* When the source is local, we first check if the edge still + * exists (it may have been deleted locally) and, if so, + * remove it locally. + */ + vertex_descriptor src = source(data.e, *this); + vertex_descriptor tgt = target(data.e, *this); + + if (src.owner == process_id(process_group_)) { + base_out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(src.local, base()); + ei != ei_end; ++ei) { + // TBD: can't check the descriptor here, because it could + // have changed if we're allowing the removal of + // edges. Egads! + if (tgt.local == target(*ei, base()) + && get(edge_target_processor_id, base(), *ei) == other_proc) + break; + } + + if (ei != ei_end) boost::remove_edge(ei, base()); + + remove_local_edge_from_list(src, tgt, undirectedS()); + } else { + assert(tgt.owner == process_id(process_group_)); + in_edge_list_type& in_edges = + get(vertex_in_edges, base())[tgt.local]; + typename in_edge_list_type::iterator ei; + for (ei = in_edges.begin(); ei != in_edges.end(); ++ei) { + if (src.local == source(ei->e, base()) + && src.owner == ei->source_processor) + break; + } + + if (ei != in_edges.end()) in_edges.erase(ei); + } + } + + void + remove_local_edge(const msg_remove_edge_data& data, + processor_id_type other_proc, undirectedS) + { + vertex_descriptor local_vertex = source(data.e, *this); + vertex_descriptor remote_vertex = target(data.e, *this); + if (remote_vertex.owner == process_id(process_group_)) { + using std::swap; + swap(local_vertex, remote_vertex); + } + + // Remove the edge from the out-edge list, if it is there + { + base_out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(local_vertex.local, base()); + ei != ei_end; ++ei) { + // TBD: can't check the descriptor here, because it could + // have changed if we're allowing the removal of + // edges. Egads! + if (remote_vertex.local == target(*ei, base()) + && get(edge_target_processor_id, base(), *ei) == other_proc) + break; + } + + if (ei != ei_end) boost::remove_edge(ei, base()); + } + + remove_local_edge_from_list(local_vertex, remote_vertex, undirectedS()); + } + + public: + void + remove_local_edge_from_list(vertex_descriptor, vertex_descriptor, + directedS) + { + } + + void + remove_local_edge_from_list(vertex_descriptor, vertex_descriptor, + bidirectionalS) + { + } + + void + remove_local_edge_from_list(vertex_descriptor src, vertex_descriptor tgt, + undirectedS) + { + // TBD: At some point we'll be able to improve the speed here + // because we'll know when the edge can't be in the local + // list. + { + typename local_edge_list_type::iterator ei; + for (ei = local_edges_.begin(); ei != local_edges_.end(); ++ei) { + if ((source(*ei, *this) == src + && target(*ei, *this) == tgt) + || (source(*ei, *this) == tgt + && target(*ei, *this) == src)) + break; + } + + if (ei != local_edges_.end()) local_edges_.erase(ei); + } + + } + + private: + /// The local subgraph + inherited m_local_graph; + + /// The process group through which this distributed graph + /// communicates. + process_group_type process_group_; + + // TBD: should only be available for undirected graphs, but for + // now it'll just be empty for directed and bidirectional + // graphs. + local_edge_list_type local_edges_; + }; + + //------------------------------------------------------------------------ + // Lazy addition of vertices + template + struct PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_vertex_with_property + { + /// Construct a lazy request to add a vertex + lazy_add_vertex_with_property(adjacency_list& self, + const vertex_property_type& property) + : self(self), property(property), committed(false) { } + + /// Copying a lazy_add_vertex_with_property transfers the + /// responsibility for adding the vertex to the newly-constructed + /// object. + lazy_add_vertex_with_property(const lazy_add_vertex_with_property& other) + : self(other.self), property(other.property), + committed(other.committed) + { + other.committed = true; + } + + /// If the vertex has not yet been added, add the vertex but don't + /// wait for a reply. + ~lazy_add_vertex_with_property(); + + /// Returns commit(). + operator vertex_descriptor() const { return commit(); } + + // Add the vertex. This operation will block if the vertex is + // being added remotely. + vertex_descriptor commit() const; + + protected: + adjacency_list& self; + vertex_property_type property; + mutable bool committed; + + private: + // No copy-assignment semantics + void operator=(lazy_add_vertex_with_property&); + }; + + template + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_vertex_with_property:: + ~lazy_add_vertex_with_property() + { + /// If this vertex has already been created or will be created by + /// someone else, or if someone threw an exception, we will not + /// create the vertex now. + if (committed || std::uncaught_exception()) + return; + + committed = true; + + process_id_type owner + = static_cast(self).owner_by_property(property); + if (owner == self.processor()) { + /// Add the vertex locally. + vertex_descriptor v(owner, + add_vertex(self.build_vertex_property(property), + self.base())); + if (self.on_add_vertex) + self.on_add_vertex(v, self); + } + else + /// Ask the owner of this new vertex to add the vertex. We + /// don't need a reply. + send(self.process_group_, owner, msg_add_vertex_with_property, + property); + } + + template + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_vertex_with_property:: + commit() const + { + assert(!this->committed); + this->committed = true; + + process_id_type owner + = static_cast(self).owner_by_property(property); + local_vertex_descriptor local_v; + if (owner == self.processor()) + /// Add the vertex locally. + local_v = add_vertex(self.build_vertex_property(property), + self.base()); + else { + // Request that the remote process add the vertex immediately + send_oob_with_reply(self.process_group_, owner, + msg_add_vertex_with_property_and_reply, property, + local_v); + } + + vertex_descriptor v(owner, local_v); + if (self.on_add_vertex) + self.on_add_vertex(v, self); + + // Build the full vertex descriptor to return + return v; + } + + + /** + * Data structure returned from add_edge that will "lazily" add + * the edge, either when it is converted to a + * @c pair or when the most recent copy has + * been destroyed. + */ + template + struct PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge + { + /// Construct a lazy request to add an edge + lazy_add_edge(adjacency_list& self, + vertex_descriptor source, vertex_descriptor target) + : self(self), source(source), target(target), committed(false) { } + + /// Copying a lazy_add_edge transfers the responsibility for + /// adding the edge to the newly-constructed object. + lazy_add_edge(const lazy_add_edge& other) + : self(other.self), source(other.source), target(other.target), + committed(other.committed) + { + other.committed = true; + } + + /// If the edge has not yet been added, add the edge but don't + /// wait for a reply. + ~lazy_add_edge(); + + /// Returns commit(). + operator std::pair() const { return commit(); } + + // Add the edge. This operation will block if a remote edge is + // being added. + std::pair commit() const; + + protected: + std::pair + add_local_edge(const edge_property_type& property, directedS) const; + + std::pair + add_local_edge(const edge_property_type& property, bidirectionalS) const; + + std::pair + add_local_edge(const edge_property_type& property, undirectedS) const; + + adjacency_list& self; + vertex_descriptor source; + vertex_descriptor target; + mutable bool committed; + + private: + // No copy-assignment semantics + void operator=(lazy_add_edge&); + }; + + template + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge::~lazy_add_edge() + { + /// If this edge has already been created or will be created by + /// someone else, or if someone threw an exception, we will not + /// create the edge now. + if (committed || std::uncaught_exception()) + return; + + committed = true; + + if (source.owner == self.processor()) + this->add_local_edge(edge_property_type(), DirectedS()); + else + // Request that the remote processor add an edge and, but + // don't wait for a reply. + send(self.process_group_, source.owner, msg_add_edge, + msg_add_edge_data(source, target)); + } + + template + std::pair + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge::commit() const + { + assert(!committed); + committed = true; + + if (source.owner == self.processor()) + return this->add_local_edge(edge_property_type(), DirectedS()); + else { + // Request that the remote processor add an edge + boost::parallel::detail::untracked_pair result; + send_oob_with_reply(self.process_group_, source.owner, + msg_add_edge_with_reply, + msg_add_edge_data(source, target), result); + return result; + } + } + + // Add a local edge into a directed graph + template + std::pair + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge:: + add_local_edge(const edge_property_type& property, directedS) const + { + // Add the edge to the local part of the graph + std::pair inserted = + detail::parallel::add_local_edge(source.local, target.local, + self.build_edge_property(property), + self.base()); + + if (inserted.second) + // Keep track of the owner of the target + put(edge_target_processor_id, self.base(), inserted.first, + target.owner); + + // Compose the edge descriptor and return the result + edge_descriptor e(source.owner, target.owner, true, inserted.first); + + // Trigger the on_add_edge event + if (inserted.second && self.on_add_edge) + self.on_add_edge(e, self); + + return std::pair(e, inserted.second); + } + + template + std::pair + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge:: + add_local_edge(const edge_property_type& property, bidirectionalS) const + { + // Add the directed edge. + std::pair result + = this->add_local_edge(property, directedS()); + + if (result.second) { + if (target.owner == self.processor()) { + // Edge is local, so add the stored edge to the in_edges list + typedef detail::parallel::stored_in_edge + stored_edge; + + stored_edge e(self.processor(), result.first.local); + boost::graph_detail::push(get(vertex_in_edges, + self.base())[target.local], e); + } + else { + // Edge is remote, so notify the target's owner that an edge + // has been added. + if (self.process_group_.trigger_context() == graph::parallel::trc_out_of_band) + send_oob(self.process_group_, target.owner, msg_nonlocal_edge, + msg_nonlocal_edge_data(result.first.local, property)); + else + send(self.process_group_, target.owner, msg_nonlocal_edge, + msg_nonlocal_edge_data(result.first.local, property)); + } + } + + return result; + } + + template + std::pair + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge:: + add_local_edge(const edge_property_type& property, undirectedS) const + { + // Add the directed edge + std::pair result + = this->add_local_edge(property, directedS()); + + typedef detail::parallel::stored_in_edge + stored_edge; + + if (result.second) { + if (target.owner == self.processor()) { + // Edge is local, so add the new edge to the list + + // TODO: This is not what we want to do for an undirected + // edge, because we haven't linked the source and target's + // representations of those edges. + local_edge_descriptor return_edge = + detail::parallel::add_local_edge(target.local, source.local, + self.build_edge_property(property), + self.base()).first; + + put(edge_target_processor_id, self.base(), return_edge, + source.owner); + } + else { + // Edge is remote, so notify the target's owner that an edge + // has been added. + if (self.process_group_.trigger_context() == graph::parallel::trc_out_of_band) + send_oob(self.process_group_, target.owner, msg_nonlocal_edge, + msg_nonlocal_edge_data(result.first.local, property)); + else + send(self.process_group_, target.owner, msg_nonlocal_edge, + msg_nonlocal_edge_data(result.first.local, property)); + + } + + // Add this edge to the list of local edges + graph_detail::push(self.local_edges(), result.first); + } + + return result; + } + + + /** + * Data structure returned from add_edge that will "lazily" add + * the edge with its property, either when it is converted to a + * pair or when the most recent copy has + * been destroyed. + */ + template + struct PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge_with_property + : lazy_add_edge + { + /// Construct a lazy request to add an edge + lazy_add_edge_with_property(adjacency_list& self, + vertex_descriptor source, + vertex_descriptor target, + const edge_property_type& property) + : lazy_add_edge(self, source, target), property(property) { } + + /// Copying a lazy_add_edge transfers the responsibility for + /// adding the edge to the newly-constructed object. + lazy_add_edge_with_property(const lazy_add_edge& other) + : lazy_add_edge(other), property(other.property) { } + + /// If the edge has not yet been added, add the edge but don't + /// wait for a reply. + ~lazy_add_edge_with_property(); + + /// Returns commit(). + operator std::pair() const { return commit(); } + + // Add the edge. This operation will block if a remote edge is + // being added. + std::pair commit() const; + + private: + // No copy-assignment semantics + void operator=(lazy_add_edge_with_property&); + + edge_property_type property; + }; + + template + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge_with_property:: + ~lazy_add_edge_with_property() + { + /// If this edge has already been created or will be created by + /// someone else, or if someone threw an exception, we will not + /// create the edge now. + if (this->committed || std::uncaught_exception()) + return; + + this->committed = true; + + if (this->source.owner == this->self.processor()) + // Add a local edge + this->add_local_edge(property, DirectedS()); + else + // Request that the remote processor add an edge and, but + // don't wait for a reply. + send(this->self.process_group_, this->source.owner, + msg_add_edge_with_property, + msg_add_edge_with_property_data(this->source, this->target, + property)); + } + + template + std::pair + PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge_with_property:: + commit() const + { + assert(!this->committed); + this->committed = true; + + if (this->source.owner == this->self.processor()) + // Add a local edge + return this->add_local_edge(property, DirectedS()); + else { + // Request that the remote processor add an edge + boost::parallel::detail::untracked_pair result; + send_oob_with_reply(this->self.process_group_, this->source.owner, + msg_add_edge_with_property_and_reply, + msg_add_edge_with_property_data(this->source, + this->target, + property), + result); + return result; + } + } + + + /** + * Returns the set of vertices local to this processor. Note that + * although this routine matches a valid expression of a + * VertexListGraph, it does not meet the semantic requirements of + * VertexListGraph because it returns only local vertices (not all + * vertices). + */ + template + std::pair + vertices(const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE + ::vertex_descriptor Vertex; + + typedef typename Vertex::generator generator; + + return std::make_pair(make_transform_iterator(vertices(g.base()).first, + generator(g.processor())), + make_transform_iterator(vertices(g.base()).second, + generator(g.processor()))); + } + + /** + * Returns the number of vertices local to this processor. Note that + * although this routine matches a valid expression of a + * VertexListGraph, it does not meet the semantic requirements of + * VertexListGraph because it returns only a count of local vertices + * (not all vertices). + */ + template + typename PBGL_DISTRIB_ADJLIST_TYPE + ::vertices_size_type + num_vertices(const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + return num_vertices(g.base()); + } + + /*************************************************************************** + * Implementation of Incidence Graph concept + ***************************************************************************/ + /** + * Returns the source of edge @param e in @param g. + */ + template + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor + source(const detail::parallel::edge_descriptor& e, + const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE + ::vertex_descriptor Vertex; + return Vertex(e.source_processor, source(e.local, g.base())); + } + + /** + * Returns the target of edge @param e in @param g. + */ + template + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor + target(const detail::parallel::edge_descriptor& e, + const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE + ::vertex_descriptor Vertex; + return Vertex(e.target_processor, target(e.local, g.base())); + } + + /** + * Return the set of edges outgoing from a particular vertex. The + * vertex @param v must be local to the processor executing this + * routine. + */ + template + std::pair + out_edges(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + assert(v.owner == g.processor()); + + typedef PBGL_DISTRIB_ADJLIST_TYPE impl; + typedef typename impl::out_edge_generator generator; + + return std::make_pair( + make_transform_iterator(out_edges(v.local, g.base()).first, + generator(g)), + make_transform_iterator(out_edges(v.local, g.base()).second, + generator(g))); + } + + /** + * Return the number of edges outgoing from a particular vertex. The + * vertex @param v must be local to the processor executing this + * routine. + */ + template + typename PBGL_DISTRIB_ADJLIST_TYPE::degree_size_type + out_degree(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + assert(v.owner == g.processor()); + + return out_degree(v.local, g.base()); + } + + /*************************************************************************** + * Implementation of Bidirectional Graph concept + ***************************************************************************/ + /** + * Returns the set of edges incoming to a particular vertex. The + * vertex @param v must be local to the processor executing this + * routine. + */ + template + std::pair + in_edges(typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) + ::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) + { + assert(v.owner == g.processor()); + + typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) impl; + typedef typename impl::inherited base_graph_type; + typedef typename impl::in_edge_generator generator; + + + typename property_map::const_type + in_edges = get(vertex_in_edges, g.base()); + + return std::make_pair(make_transform_iterator(in_edges[v.local].begin(), + generator(g)), + make_transform_iterator(in_edges[v.local].end(), + generator(g))); + } + + /** + * \overload + */ + template + std::pair + in_edges(typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) + ::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) + { + assert(v.owner == g.processor()); + + typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) impl; + typedef typename impl::in_edge_generator generator; + + return std::make_pair( + make_transform_iterator(out_edges(v.local, g.base()).first, + generator(g)), + make_transform_iterator(out_edges(v.local, g.base()).second, + generator(g))); + } + + /** + * Returns the number of edges incoming to a particular vertex. The + * vertex @param v must be local to the processor executing this + * routine. + */ + template + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)::degree_size_type + in_degree(typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) + ::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) + { + assert(v.owner == g.processor()); + + return get(vertex_in_edges, g.base())[v.local].size(); + } + + /** + * \overload + */ + template + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)::degree_size_type + in_degree(typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) + ::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) + { + assert(v.owner == g.processor()); + + return out_degree(v.local, g.base()); + } + + /** + * Returns the number of edges incident on the given vertex. The + * vertex @param v must be local to the processor executing this + * routine. + */ + template + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) + ::degree_size_type + degree(typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) + ::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) + { + assert(v.owner == g.processor()); + return out_degree(v.local, g.base()); + } + + /** + * \overload + */ + template + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) + ::degree_size_type + degree(typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) + ::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) + { + assert(v.owner == g.processor()); + return out_degree(v, g) + in_degree(v, g); + } + + template + typename PBGL_DISTRIB_ADJLIST_TYPE::edges_size_type + num_edges(const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + return num_edges(g.base()); + } + + template + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)::edges_size_type + num_edges(const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) + { + return g.local_edges().size(); + } + + template + std::pair< + typename PBGL_DISTRIB_ADJLIST_TYPE::edge_iterator, + typename PBGL_DISTRIB_ADJLIST_TYPE::edge_iterator> + edges(const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE impl; + typedef typename impl::out_edge_generator generator; + + return std::make_pair(make_transform_iterator(edges(g.base()).first, + generator(g)), + make_transform_iterator(edges(g.base()).second, + generator(g))); + } + + template + std::pair< + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)::edge_iterator, + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)::edge_iterator> + edges(const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) + { + return std::make_pair(g.local_edges().begin(), g.local_edges().end()); + } + + template + inline + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor + vertex(typename PBGL_DISTRIB_ADJLIST_TYPE::vertices_size_type n, + const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor + vertex_descriptor; + + return vertex_descriptor(g.distribution()(n), g.distribution().local(n)); + } + + /*************************************************************************** + * Access to particular edges + ***************************************************************************/ + template + std::pair< + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)::edge_descriptor, + bool + > + edge(typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)::vertex_descriptor u, + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS) + ::edge_descriptor edge_descriptor; + + // For directed graphs, u must be local + assert(u.owner == process_id(g.process_group())); + + typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS) + ::out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) { + if (target(*ei, g) == v) return std::make_pair(*ei, true); + } + return std::make_pair(edge_descriptor(), false); + } + + template + std::pair< + typename PBGL_DISTRIB_ADJLIST_TYPE::edge_descriptor, + bool + > + edge(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor u, + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE + ::edge_descriptor edge_descriptor; + + // For bidirectional and undirected graphs, u must be local or v + // must be local + if (u.owner == process_id(g.process_group())) { + typename PBGL_DISTRIB_ADJLIST_TYPE::out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) { + if (target(*ei, g) == v) return std::make_pair(*ei, true); + } + return std::make_pair(edge_descriptor(), false); + } else if (v.owner == process_id(g.process_group())) { + typename PBGL_DISTRIB_ADJLIST_TYPE::in_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = in_edges(v, g); ei != ei_end; ++ei) { + if (source(*ei, g) == u) return std::make_pair(*ei, true); + } + return std::make_pair(edge_descriptor(), false); + } else { + assert(false); + exit(1); + } + } + +#if 0 + // TBD: not yet supported + std::pair + edge_range(vertex_descriptor u, vertex_descriptor v, + const adjacency_list& g); +#endif + + /*************************************************************************** + * Implementation of Adjacency Graph concept + ***************************************************************************/ + template + std::pair + adjacent_vertices(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, + const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE::adjacency_iterator iter; + return std::make_pair(iter(out_edges(v, g).first, &g), + iter(out_edges(v, g).second, &g)); + } + + /*************************************************************************** + * Implementation of Mutable Graph concept + ***************************************************************************/ + + /************************************************************************ + * add_edge + ************************************************************************/ + template + typename PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge + add_edge(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor u, + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, + PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge lazy_add_edge; + + return lazy_add_edge(g, u, v); + } + + template + typename PBGL_DISTRIB_ADJLIST_TYPE + ::lazy_add_edge_with_property + add_edge(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor u, + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, + typename PBGL_DISTRIB_ADJLIST_TYPE::edge_property_type const& p, + PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE + ::lazy_add_edge_with_property lazy_add_edge_with_property; + return lazy_add_edge_with_property(g, u, v, p); + } + + /************************************************************************ + * + * remove_edge + * + ************************************************************************/ + template + void + remove_edge(typename PBGL_DISTRIB_ADJLIST_TYPE::edge_descriptor e, + PBGL_DISTRIB_ADJLIST_TYPE& g) + { + assert(source(e, g).owner == g.processor() + || target(e, g).owner == g.processor()); + + if (target(e, g).owner == g.processor()) + detail::parallel::remove_in_edge(e, g, DirectedS()); + if (source(e, g).owner == g.processor()) + remove_edge(e.local, g.base()); + + g.remove_local_edge_from_list(source(e, g), target(e, g), DirectedS()); + + if (source(e, g).owner != g.processor() + || (target(e, g).owner != g.processor() + && !(is_same::value))) { + g.send_remove_edge_request(e); + } + } + + template + void + remove_edge(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor u, + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, + PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE + ::vertex_descriptor vertex_descriptor; + typedef typename PBGL_DISTRIB_ADJLIST_TYPE + ::edge_descriptor edge_descriptor; + std::pair the_edge = edge(u, v, g); + if (the_edge.second) remove_edge(the_edge.first, g); + } + + template + inline void + remove_edge(typename PBGL_DISTRIB_ADJLIST_TYPE::out_edge_iterator ei, + PBGL_DISTRIB_ADJLIST_TYPE& g) + { + remove_edge(*ei, g); + } + + template + inline void + remove_edge(typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS) + ::out_edge_iterator ei, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g) + { + assert(source(*ei, g).owner == g.processor()); + remove_edge(ei->local, g.base()); + } + + /************************************************************************ + * + * remove_out_edge_if + * + ************************************************************************/ + namespace parallel { namespace detail { + /** + * Function object that applies the underlying predicate to + * determine if an out-edge should be removed. If so, either + * removes the incoming edge (if it is stored locally) or sends a + * message to the owner of the target requesting that it remove + * the edge. + */ + template + struct remove_out_edge_predicate + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename Graph::local_edge_descriptor argument_type; + typedef typename Graph::directed_selector directed_selector; + typedef bool result_type; + + remove_out_edge_predicate(Graph& g, Predicate& predicate) + : g(g), predicate(predicate) { } + + bool operator()(const argument_type& le) + { + typedef typename edge_descriptor::template out_generator + generator; + + edge_descriptor e = generator(g)(le); + + if (predicate(e)) { + if (source(e, g).owner != target(e, g).owner + && !(is_same::value)) + g.send_remove_edge_request(e); + else + ::boost::detail::parallel::remove_in_edge(e, g, + directed_selector()); + + g.remove_local_edge_from_list(source(e, g), target(e, g), + directed_selector()); + return true; + } else return false; + } + + private: + Graph& g; + Predicate predicate; + }; + } } // end namespace parallel::detail + + template + inline void + remove_out_edge_if + (typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor u, + Predicate predicate, + PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE Graph; + typedef parallel::detail::remove_out_edge_predicate + Pred; + + assert(u.owner == g.processor()); + remove_out_edge_if(u.local, Pred(g, predicate), g.base()); + } + + /************************************************************************ + * + * remove_in_edge_if + * + ************************************************************************/ + namespace parallel { namespace detail { + /** + * Function object that applies the underlying predicate to + * determine if an in-edge should be removed. If so, either + * removes the outgoing edge (if it is stored locally) or sends a + * message to the owner of the target requesting that it remove + * the edge. Only required for bidirectional graphs. + */ + template + struct remove_in_edge_predicate + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef bool result_type; + + remove_in_edge_predicate(Graph& g, const Predicate& predicate) + : g(g), predicate(predicate) { } + + template + bool operator()(const StoredEdge& le) + { + typedef typename edge_descriptor::template in_generator + generator; + + edge_descriptor e = generator(g)(le); + + if (predicate(e)) { + if (source(e, g).owner != target(e, g).owner) + g.send_remove_edge_request(e); + else + remove_edge(source(e, g).local, target(e, g).local, g.base()); + return true; + } else return false; + } + + private: + Graph& g; + Predicate predicate; + }; + } } // end namespace parallel::detail + + template + inline void + remove_in_edge_if + (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) + ::vertex_descriptor u, + Predicate predicate, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) Graph; + typedef parallel::detail::remove_in_edge_predicate + Pred; + + assert(u.owner == g.processor()); + graph_detail::erase_if(get(vertex_in_edges, g.base())[u.local], + Pred(g, predicate)); + } + + template + inline void + remove_in_edge_if + (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) + ::vertex_descriptor u, + Predicate predicate, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) + { + remove_out_edge_if(u, predicate, g); + } + + /************************************************************************ + * + * remove_edge_if + * + ************************************************************************/ + namespace parallel { namespace detail { + /** + * Function object that applies the underlying predicate to + * determine if a directed edge can be removed. This only applies + * to directed graphs. + */ + template + struct remove_directed_edge_predicate + { + typedef typename Graph::local_edge_descriptor argument_type; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef bool result_type; + + remove_directed_edge_predicate(Graph& g, const Predicate& predicate) + : g(g), predicate(predicate) { } + + bool operator()(const argument_type& le) + { + typedef typename edge_descriptor::template out_generator + generator; + + edge_descriptor e = generator(g)(le); + return predicate(e); + } + + private: + Graph& g; + Predicate predicate; + }; + } } // end namespace parallel::detail + + template + inline void + remove_edge_if(Predicate predicate, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS) Graph; + typedef parallel::detail::remove_directed_edge_predicate Pred; + remove_edge_if(Pred(g, predicate), g.base()); + } + + template + inline void + remove_edge_if(Predicate predicate, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) Graph; + typedef parallel::detail::remove_out_edge_predicate Pred; + remove_edge_if(Pred(g, predicate), g.base()); + } + + namespace parallel { namespace detail { + /** + * Function object that applies the underlying predicate to + * determine if an undirected edge should be removed. If so, + * removes the local edges associated with the edge and + * (potentially) sends a message to the remote processor that also + * is removing this edge. + */ + template + struct remove_undirected_edge_predicate + { + typedef typename graph_traits::edge_descriptor argument_type; + typedef bool result_type; + + remove_undirected_edge_predicate(Graph& g, Predicate& predicate) + : g(g), predicate(predicate) { } + + bool operator()(const argument_type& e) + { + if (predicate(e)) { + if (source(e, g).owner != target(e, g).owner) + g.send_remove_edge_request(e); + if (target(e, g).owner == g.processor()) + ::boost::detail::parallel::remove_in_edge(e, g, undirectedS()); + if (source(e, g).owner == g.processor()) + remove_edge(e.local, g.base()); + return true; + } else return false; + } + + private: + Graph& g; + Predicate predicate; + }; + } } // end namespace parallel::detail + + template + inline void + remove_edge_if(Predicate predicate, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) Graph; + typedef parallel::detail::remove_undirected_edge_predicate Pred; + graph_detail::erase_if(g.local_edges(), Pred(g, predicate)); + } + + /************************************************************************ + * + * clear_vertex + * + ************************************************************************/ + namespace parallel { namespace detail { + struct always_true + { + typedef bool result_type; + + template bool operator()(const T&) const { return true; } + }; + } } // end namespace parallel::detail + + template + void + clear_vertex + (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) + ::vertex_descriptor u, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) + { + clear_out_edges(u, g); + clear_in_edges(u, g); + } + + template + void + clear_vertex + (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) + ::vertex_descriptor u, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) + { + remove_out_edge_if(u, parallel::detail::always_true(), g); + } + + /************************************************************************ + * + * clear_out_edges + * + ************************************************************************/ + template + void + clear_out_edges + (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)::vertex_descriptor u, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g) + { + assert(u.owner == g.processor()); + clear_out_edges(u.local, g.base()); + } + + template + void + clear_out_edges + (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) + ::vertex_descriptor u, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) + { + remove_out_edge_if(u, parallel::detail::always_true(), g); + } + + /************************************************************************ + * + * clear_in_edges + * + ************************************************************************/ + template + void + clear_in_edges + (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) + ::vertex_descriptor u, + PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) + { + remove_in_edge_if(u, parallel::detail::always_true(), g); + } + + /************************************************************************ + * + * add_vertex + * + ************************************************************************/ + template + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor + add_vertex(PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE graph_type; + typename graph_type::vertex_property_type p; + return add_vertex(p, g); + } + + template + typename PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_vertex_with_property + add_vertex(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_property_type const& p, + PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE + ::lazy_add_vertex_with_property lazy_add_vertex; + return lazy_add_vertex(g, p); + } + + /************************************************************************ + * + * remove_vertex + * + ************************************************************************/ + template + void + remove_vertex(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor u, + PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename PBGL_DISTRIB_ADJLIST_TYPE::graph_type graph_type; + typedef typename graph_type::named_graph_mixin named_graph_mixin; + assert(u.owner == g.processor()); + static_cast(static_cast(g)) + .removing_vertex(u); + g.distribution().clear(); + remove_vertex(u.local, g.base()); + } + + /*************************************************************************** + * Implementation of Property Graph concept + ***************************************************************************/ + template + struct property_map + : detail::parallel::get_adj_list_pmap + ::template apply + { }; + + template + struct property_map + : boost::detail::parallel::get_adj_list_pmap +// FIXME: in the original code the following was not const + ::template apply + { }; + + template + typename property_map::type + get(Property p, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE Graph; + typedef typename property_map::type result_type; + typedef typename property_traits::value_type value_type; + typedef typename property_reduce::template apply + reduce; + + typedef typename property_traits::key_type descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename mpl::if_, + vertex_global_t, edge_global_t>::type + global_map_t; + + return result_type(g.process_group(), get(global_map_t(), g), + get(p, g.base()), reduce()); + } + + template + typename property_map::const_type + get(Property p, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE Graph; + typedef typename property_map::const_type result_type; + typedef typename property_traits::value_type value_type; + typedef typename property_reduce::template apply + reduce; + + typedef typename property_traits::key_type descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename mpl::if_, + vertex_global_t, edge_global_t>::type + global_map_t; + + return result_type(g.process_group(), get(global_map_t(), g), + get(p, g.base()), reduce()); + } + + template + typename property_map::type + get(vertex_local_index_t, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + return get(vertex_local_index, g.base()); + } + + template + typename property_map::const_type + get(vertex_local_index_t, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + return get(vertex_local_index, g.base()); + } + + template + typename property_map::const_type + get(vertex_global_t, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + vertex_global_t>::const_type result_type; + return result_type(); + } + + template + typename property_map::const_type + get(vertex_global_t, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + vertex_global_t>::const_type result_type; + return result_type(); + } + + /// Retrieve a property map mapping from a vertex descriptor to its + /// owner. + template + typename property_map::type + get(vertex_owner_t, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + vertex_owner_t>::type result_type; + return result_type(); + } + + /// Retrieve a property map mapping from a vertex descriptor to its + /// owner. + template + typename property_map::const_type + get(vertex_owner_t, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + vertex_owner_t>::const_type result_type; + return result_type(); + } + + /// Retrieve the owner of a vertex + template + inline processor_id_type + get(vertex_owner_t, PBGL_DISTRIB_ADJLIST_TYPE&, + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v) + { + return v.owner; + } + + /// Retrieve the owner of a vertex + template + inline processor_id_type + get(vertex_owner_t, const PBGL_DISTRIB_ADJLIST_TYPE&, + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v) + { + return v.owner; + } + + /// Retrieve a property map that maps from a vertex descriptor to + /// its local descriptor. + template + typename property_map::type + get(vertex_local_t, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + vertex_local_t>::type result_type; + return result_type(); + } + + /// Retrieve a property map that maps from a vertex descriptor to + /// its local descriptor. + template + typename property_map::const_type + get(vertex_local_t, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + vertex_local_t>::const_type result_type; + return result_type(); + } + + /// Retrieve the local descriptor of a vertex + template + inline typename PBGL_DISTRIB_ADJLIST_TYPE::local_vertex_descriptor + get(vertex_local_t, PBGL_DISTRIB_ADJLIST_TYPE&, + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v) + { + return v.local; + } + + /// Retrieve the local descriptor of a vertex + template + inline typename PBGL_DISTRIB_ADJLIST_TYPE::local_vertex_descriptor + get(vertex_local_t, const PBGL_DISTRIB_ADJLIST_TYPE&, + typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v) + { + return v.local; + } + + + template + typename property_map::const_type + get(edge_global_t, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + edge_global_t>::const_type result_type; + return result_type(); + } + + template + typename property_map::const_type + get(edge_global_t, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + edge_global_t>::const_type result_type; + return result_type(); + } + + template + typename property_map::type + get(edge_owner_t, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + edge_owner_t>::type result_type; + return result_type(); + } + + template + typename property_map::const_type + get(edge_owner_t, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + edge_owner_t>::const_type result_type; + return result_type(); + } + + template + typename property_map::type + get(edge_local_t, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + edge_local_t>::type result_type; + return result_type(); + } + + template + typename property_map::const_type + get(edge_local_t, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef typename property_map< + PBGL_DISTRIB_ADJLIST_TYPE, + edge_local_t>::const_type result_type; + return result_type(); + } + + template + inline + typename property_traits::const_type + >::value_type + get(Property p, const PBGL_DISTRIB_ADJLIST_TYPE& g, const Key& key) + { + if (owner(key) == process_id(g.process_group())) + return get(p, g.base(), local(key)); + else + assert(false); + } + + template + void + put(Property p, PBGL_DISTRIB_ADJLIST_TYPE& g, const Key& key, const Value& v) + { + if (owner(key) == process_id(g.process_group())) + put(p, g.base(), local(key), v); + else + assert(false); + } + + template + typename property_map::type + get(vertex_index_t vi, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE graph_type; + typedef typename property_map::type + result_type; + return result_type(g.process_group(), get(vertex_global, g), + get(vi, g.base())); + } + + template + typename property_map::const_type + get(vertex_index_t vi, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE graph_type; + typedef typename property_map::const_type + result_type; + return result_type(g.process_group(), get(vertex_global, g), + get(vi, g.base())); + } + + /*************************************************************************** + * Implementation of bundled properties + ***************************************************************************/ + template + struct property_map + : detail::parallel::get_adj_list_pmap + ::template apply + { }; + + template + struct property_map + : detail::parallel::get_adj_list_pmap + ::template apply + { }; + + template + typename property_map::type + get(T Bundle::* p, PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE Graph; + typedef typename property_map::type result_type; + typedef typename property_traits::value_type value_type; + typedef typename property_reduce::template apply + reduce; + + typedef typename property_traits::key_type descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename mpl::if_, + vertex_global_t, edge_global_t>::type + global_map_t; + + return result_type(g.process_group(), get(global_map_t(), g), + get(p, g.base()), reduce()); + } + + template + typename property_map::const_type + get(T Bundle::* p, const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE Graph; + typedef typename property_map::const_type result_type; + typedef typename property_traits::value_type value_type; + typedef typename property_reduce::template apply + reduce; + + typedef typename property_traits::key_type descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename mpl::if_, + vertex_global_t, edge_global_t>::type + global_map_t; + + return result_type(g.process_group(), get(global_map_t(), g), + get(p, g.base()), reduce()); + } + + /*************************************************************************** + * Implementation of DistributedGraph concept + ***************************************************************************/ + template + void synchronize(const PBGL_DISTRIB_ADJLIST_TYPE& g) + { + typedef PBGL_DISTRIB_ADJLIST_TYPE graph_type; + synchronize(g.process_group()); + } + + template + ProcessGroup + process_group(const PBGL_DISTRIB_ADJLIST_TYPE& g) + { return g.process_group(); } + + /*************************************************************************** + * Specializations of is_mpi_datatype for Serializable entities + ***************************************************************************/ + namespace mpi { + template + struct is_mpi_datatype > + : is_mpi_datatype { }; + + template + struct is_mpi_datatype > + : is_mpi_datatype > { }; + + template + struct is_mpi_datatype > + : is_mpi_datatype { }; + + template + struct is_mpi_datatype > + : is_mpi_datatype { }; + + template + struct is_mpi_datatype > + : is_mpi_datatype { }; + + template + struct is_mpi_datatype > + : mpl::and_, is_mpi_datatype > { }; + + + template + struct is_mpi_datatype > + : mpl::and_< + is_mpi_datatype >, + is_mpi_datatype > + {}; + + template + struct is_mpi_datatype< + boost::detail::parallel::msg_remove_edge_data > + : is_mpi_datatype {}; + } + + /*************************************************************************** + * Specializations of is_bitwise_serializable for Serializable entities + ***************************************************************************/ + namespace serialization { + template + struct is_bitwise_serializable > + : is_bitwise_serializable { }; + + template + struct is_bitwise_serializable > + : is_bitwise_serializable > { }; + + template + struct is_bitwise_serializable > + : is_bitwise_serializable { }; + + template + struct is_bitwise_serializable > + : is_bitwise_serializable { }; + + template + struct is_bitwise_serializable > + : is_bitwise_serializable { }; + + template + struct is_bitwise_serializable > + : mpl::and_, + is_bitwise_serializable > { }; + + template + struct is_bitwise_serializable > + : mpl::and_< + is_bitwise_serializable< + boost::detail::parallel::maybe_store_property >, + is_bitwise_serializable > + {}; + + template + struct is_bitwise_serializable< + boost::detail::parallel::msg_remove_edge_data > + : is_bitwise_serializable {}; + + template + struct implementation_level > + : mpl::int_ {}; + + template + struct implementation_level > + : mpl::int_ {}; + + template + struct implementation_level > + : mpl::int_ {}; + + template + struct implementation_level > + : mpl::int_ {}; + + template + struct implementation_level > + : mpl::int_ {}; + + template + struct implementation_level > + : mpl::int_ {}; + + template + struct implementation_level > + : mpl::int_ {}; + + template + struct implementation_level< + boost::detail::parallel::msg_remove_edge_data > + : mpl::int_ {}; + + template + struct tracking_level > + : mpl::int_ {}; + + template + struct tracking_level > + : mpl::int_ {}; + + template + struct tracking_level > + : mpl::int_ {}; + + template + struct tracking_level > + : mpl::int_ {}; + + template + struct tracking_level > + : mpl::int_ {}; + + template + struct tracking_level > + : mpl::int_ {}; + + template + struct tracking_level > + : mpl::int_ {}; + + template + struct tracking_level< + boost::detail::parallel::msg_remove_edge_data > + : mpl::int_ {}; + } + + // Hash function for global descriptors + template + struct hash > + { + typedef detail::parallel::global_descriptor argument_type; + std::size_t operator()(argument_type const& x) const + { + std::size_t hash = hash_value(x.owner); + hash_combine(hash, x.local); + return hash; + } + }; + + // Hash function for parallel edge descriptors + template + struct hash > + { + typedef detail::parallel::edge_descriptor argument_type; + + std::size_t operator()(argument_type const& x) const + { + std::size_t hash = hash_value(x.owner()); + hash_combine(hash, x.local); + return hash; + } + }; + +} // end namespace boost + +#include +#include +#include +#include + +#endif // BOOST_GRAPH_DISTRIBUTED_ADJACENCY_LIST_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/handlers.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/handlers.hpp new file mode 100644 index 0000000000..7c1e431e43 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/handlers.hpp @@ -0,0 +1,148 @@ +// Copyright (C) 2007 Douglas Gregor + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This file contains code for the distributed adjacency list's +// message handlers. It should not be included directly by users. + +#ifndef BOOST_GRAPH_DISTRIBUTED_ADJLIST_HANDLERS_HPP +#define BOOST_GRAPH_DISTRIBUTED_ADJLIST_HANDLERS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include + +namespace boost { + +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +setup_triggers() +{ + using boost::graph::parallel::simple_trigger; + + simple_trigger(process_group_, msg_add_vertex_with_property, this, + &adjacency_list::handle_add_vertex_with_property); + simple_trigger(process_group_, msg_add_vertex_with_property_and_reply, this, + &adjacency_list::handle_add_vertex_with_property_and_reply); + simple_trigger(process_group_, msg_add_edge, this, + &adjacency_list::handle_add_edge); + simple_trigger(process_group_, msg_add_edge_with_reply, this, + &adjacency_list::handle_add_edge_with_reply); + simple_trigger(process_group_, msg_add_edge_with_property, this, + &adjacency_list::handle_add_edge_with_property); + simple_trigger(process_group_, msg_add_edge_with_property_and_reply, this, + &adjacency_list::handle_add_edge_with_property_and_reply); + simple_trigger(process_group_, msg_nonlocal_edge, this, + &adjacency_list::handle_nonlocal_edge); + simple_trigger(process_group_, msg_remove_edge, this, + &adjacency_list::handle_remove_edge); +} + +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +handle_add_vertex_with_property(int source, int tag, + const vertex_property_type& data, + trigger_receive_context) +{ + vertex_descriptor v(this->processor(), + add_vertex(this->build_vertex_property(data), + this->base())); + if (on_add_vertex) + on_add_vertex(v, *this); +} + +template +typename PBGL_DISTRIB_ADJLIST_TYPE::local_vertex_descriptor +PBGL_DISTRIB_ADJLIST_TYPE:: +handle_add_vertex_with_property_and_reply(int source, int tag, + const vertex_property_type& data, + trigger_receive_context) +{ + // Try to find a vertex with this name + local_vertex_descriptor local_v + = add_vertex(this->build_vertex_property(data), this->base()); + + vertex_descriptor v(processor(), local_v); + if (on_add_vertex) + on_add_vertex(v, *this); + + return local_v; +} + +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +handle_add_edge(int source, int tag, const msg_add_edge_data& data, + trigger_receive_context) +{ + add_edge(vertex_descriptor(processor(), data.source), + data.target, *this); +} + +template +boost::parallel::detail::untracked_pair +PBGL_DISTRIB_ADJLIST_TYPE:: +handle_add_edge_with_reply(int source, int tag, const msg_add_edge_data& data, + trigger_receive_context) +{ + std::pair p = + add_edge(vertex_descriptor(processor(), data.source),data.target, *this); + return p; +} + +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +handle_add_edge_with_property(int source, int tag, + const msg_add_edge_with_property_data& data, + trigger_receive_context) +{ + add_edge(vertex_descriptor(processor(), data.source), + data.target, data.get_property(), *this); +} + +template +boost::parallel::detail::untracked_pair +PBGL_DISTRIB_ADJLIST_TYPE:: +handle_add_edge_with_property_and_reply + (int source, int tag, + const msg_add_edge_with_property_data& data, + trigger_receive_context) +{ + std::pair p = + add_edge(vertex_descriptor(processor(), data.source), + data.target, data.get_property(), *this); + return p; +} + +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +handle_nonlocal_edge(int source, int tag, + const msg_nonlocal_edge_data& data, + trigger_receive_context) +{ + add_remote_edge(data, source, directed_selector()); +} + +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +handle_remove_edge(int source, int tag, + const msg_remove_edge_data& data, + trigger_receive_context) +{ + remove_local_edge(data, source, directed_selector()); +} + +} + +#endif // BOOST_GRAPH_DISTRIBUTED_ADJLIST_HANDLERS_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/initialize.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/initialize.hpp new file mode 100644 index 0000000000..4bb85d4ef5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/initialize.hpp @@ -0,0 +1,319 @@ +// Copyright (C) 2007 Douglas Gregor + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This file contains code for the distributed adjacency list's +// initializations. It should not be included directly by users. + +#ifndef BOOST_GRAPH_DISTRIBUTED_ADJLIST_INITIALIZE_HPP +#define BOOST_GRAPH_DISTRIBUTED_ADJLIST_INITIALIZE_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +namespace boost { + +template +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +initialize(EdgeIterator first, EdgeIterator last, + vertices_size_type, const base_distribution_type& distribution, + vecS) +{ + process_id_type id = process_id(process_group_); + while (first != last) { + if ((process_id_type)distribution(first->first) == id) { + vertex_descriptor source(id, distribution.local(first->first)); + vertex_descriptor target(distribution(first->second), + distribution.local(first->second)); + add_edge(source, target, *this); + } + ++first; + } + + synchronize(process_group_); +} + +template +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +initialize(EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter, + vertices_size_type, const base_distribution_type& distribution, + vecS) +{ + process_id_type id = process_id(process_group_); + while (first != last) { + if (static_cast(distribution(first->first)) == id) { + vertex_descriptor source(id, distribution.local(first->first)); + vertex_descriptor target(distribution(first->second), + distribution.local(first->second)); + add_edge(source, target, *ep_iter, *this); + } + ++first; + ++ep_iter; + } + + synchronize(process_group_); +} + +template +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +initialize(EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter, + vertices_size_type n, const base_distribution_type& distribution, + VertexListS) +{ + using boost::parallel::inplace_all_to_all; + + typedef vertices_size_type vertex_number_t; + typedef typename std::iterator_traits::value_type + edge_property_init_t; + + typedef std::pair + st_pair; + typedef std::pair delayed_edge_t; + + process_group_type pg = process_group(); + process_id_type id = process_id(pg); + + // Vertex indices + std::vector index_to_vertex; + index_to_vertex.reserve(num_vertices(*this)); + BGL_FORALL_VERTICES_T(v, base(), inherited) + index_to_vertex.push_back(v); + + // The list of edges we can't add immediately. + std::vector delayed_edges; + + std::vector > descriptor_requests; + descriptor_requests.resize(num_processes(pg)); + + // Add all of the edges we can, up to the point where we run + // into a descriptor we don't know. + while (first != last) { + if (distribution(first->first) == id) { + if (distribution(first->second) != id) break; + vertex_descriptor source + (id, index_to_vertex[distribution.local(first->first)]); + vertex_descriptor target + (distribution(first->second), + index_to_vertex[distribution.local(first->second)]); + add_edge(source, target, *ep_iter, *this); + } + ++first; + ++ep_iter; + } + + // Queue all of the remaining edges and determine the set of + // descriptors we need to know about. + while (first != last) { + if (distribution(first->first) == id) { + vertex_descriptor source + (id, index_to_vertex[distribution.local(first->first)]); + process_id_type dest = distribution(first->second); + if (dest != id) { + descriptor_requests[dest] + .push_back(distribution.local(first->second)); + // Compact request list if we need to + if (descriptor_requests[dest].size() > + distribution.block_size(dest, n)) { + std::sort(descriptor_requests[dest].begin(), + descriptor_requests[dest].end()); + descriptor_requests[dest].erase( + std::unique(descriptor_requests[dest].begin(), + descriptor_requests[dest].end()), + descriptor_requests[dest].end()); + } + } + + // Save the edge for later + delayed_edges.push_back + (delayed_edge_t(st_pair(source, first->second), *ep_iter)); + } + ++first; + ++ep_iter; + } + + // Compact descriptor requests + for (process_id_type dest = 0; dest < num_processes(pg); ++dest) { + std::sort(descriptor_requests[dest].begin(), + descriptor_requests[dest].end()); + descriptor_requests[dest].erase( + std::unique(descriptor_requests[dest].begin(), + descriptor_requests[dest].end()), + descriptor_requests[dest].end()); + } + + // Send out all of the descriptor requests + std::vector > in_descriptor_requests; + in_descriptor_requests.resize(num_processes(pg)); + inplace_all_to_all(pg, descriptor_requests, in_descriptor_requests); + + // Reply to all of the descriptor requests + std::vector > + descriptor_responses; + descriptor_responses.resize(num_processes(pg)); + for (process_id_type dest = 0; dest < num_processes(pg); ++dest) { + for (std::size_t i = 0; i < in_descriptor_requests[dest].size(); ++i) { + local_vertex_descriptor v = + index_to_vertex[in_descriptor_requests[dest][i]]; + descriptor_responses[dest].push_back(v); + } + in_descriptor_requests[dest].clear(); + } + in_descriptor_requests.clear(); + inplace_all_to_all(pg, descriptor_responses); + + // Add the queued edges + for(typename std::vector::iterator i + = delayed_edges.begin(); i != delayed_edges.end(); ++i) { + process_id_type dest = distribution(i->first.second); + local_vertex_descriptor tgt_local; + if (dest == id) { + tgt_local = index_to_vertex[distribution.local(i->first.second)]; + } else { + std::vector& requests = descriptor_requests[dest]; + typename std::vector::iterator pos = + std::lower_bound(requests.begin(), requests.end(), + distribution.local(i->first.second)); + tgt_local = descriptor_responses[dest][pos - requests.begin()]; + } + add_edge(i->first.first, vertex_descriptor(dest, tgt_local), + i->second, *this); + } + synchronize(process_group_); +} + +template +template +void +PBGL_DISTRIB_ADJLIST_TYPE:: +initialize(EdgeIterator first, EdgeIterator last, + vertices_size_type n, const base_distribution_type& distribution, + VertexListS) +{ + using boost::parallel::inplace_all_to_all; + + typedef vertices_size_type vertex_number_t; + + typedef std::pair delayed_edge_t; + + process_group_type pg = process_group(); + process_id_type id = process_id(pg); + + // Vertex indices + std::vector index_to_vertex; + index_to_vertex.reserve(num_vertices(*this)); + BGL_FORALL_VERTICES_T(v, base(), inherited) + index_to_vertex.push_back(v); + + // The list of edges we can't add immediately. + std::vector delayed_edges; + + std::vector > descriptor_requests; + descriptor_requests.resize(num_processes(pg)); + + // Add all of the edges we can, up to the point where we run + // into a descriptor we don't know. + while (first != last) { + if (distribution(first->first) == id) { + if (distribution(first->second) != id) break; + vertex_descriptor source + (id, index_to_vertex[distribution.local(first->first)]); + vertex_descriptor target + (distribution(first->second), + index_to_vertex[distribution.local(first->second)]); + add_edge(source, target, *this); + } + ++first; + } + + // Queue all of the remaining edges and determine the set of + // descriptors we need to know about. + while (first != last) { + if (distribution(first->first) == id) { + vertex_descriptor source + (id, index_to_vertex[distribution.local(first->first)]); + process_id_type dest = distribution(first->second); + if (dest != id) { + descriptor_requests[dest] + .push_back(distribution.local(first->second)); + // Compact request list if we need to + if (descriptor_requests[dest].size() > + distribution.block_size(dest, n)) { + std::sort(descriptor_requests[dest].begin(), + descriptor_requests[dest].end()); + descriptor_requests[dest].erase( + std::unique(descriptor_requests[dest].begin(), + descriptor_requests[dest].end()), + descriptor_requests[dest].end()); + } + } + + // Save the edge for later + delayed_edges.push_back(delayed_edge_t(source, first->second)); + } + ++first; + } + + // Compact descriptor requests + for (process_id_type dest = 0; dest < num_processes(pg); ++dest) { + std::sort(descriptor_requests[dest].begin(), + descriptor_requests[dest].end()); + descriptor_requests[dest].erase( + std::unique(descriptor_requests[dest].begin(), + descriptor_requests[dest].end()), + descriptor_requests[dest].end()); + } + + // Send out all of the descriptor requests + std::vector > in_descriptor_requests; + in_descriptor_requests.resize(num_processes(pg)); + inplace_all_to_all(pg, descriptor_requests, in_descriptor_requests); + + // Reply to all of the descriptor requests + std::vector > + descriptor_responses; + descriptor_responses.resize(num_processes(pg)); + for (process_id_type dest = 0; dest < num_processes(pg); ++dest) { + for (std::size_t i = 0; i < in_descriptor_requests[dest].size(); ++i) { + local_vertex_descriptor v = + index_to_vertex[in_descriptor_requests[dest][i]]; + descriptor_responses[dest].push_back(v); + } + in_descriptor_requests[dest].clear(); + } + in_descriptor_requests.clear(); + inplace_all_to_all(pg, descriptor_responses); + + // Add the queued edges + for(typename std::vector::iterator i + = delayed_edges.begin(); i != delayed_edges.end(); ++i) { + process_id_type dest = distribution(i->second); + local_vertex_descriptor tgt_local; + if (dest == id) { + tgt_local = index_to_vertex[distribution.local(i->second)]; + } else { + std::vector& requests = descriptor_requests[dest]; + typename std::vector::iterator pos = + std::lower_bound(requests.begin(), requests.end(), + distribution.local(i->second)); + tgt_local = descriptor_responses[dest][pos - requests.begin()]; + } + add_edge(i->first, vertex_descriptor(dest, tgt_local), *this); + } + synchronize(process_group_); +} + +} // end namespace boost + +#endif // BOOST_GRAPH_DISTRIBUTED_ADJLIST_INITIALIZE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/redistribute.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/redistribute.hpp new file mode 100644 index 0000000000..064aaba191 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/redistribute.hpp @@ -0,0 +1,393 @@ +// Copyright (C) 2005-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +// +// Implements redistribution of vertices for a distributed adjacency +// list. This file should not be included by users. It will be +// included by the distributed adjacency list header. +// + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include + +namespace boost { namespace detail { namespace parallel { + +/* This structure contains a (vertex or edge) descriptor that is being + moved from one processor to another. It contains the properties for + that descriptor (if any). + */ +template +struct redistributed_descriptor : maybe_store_property +{ + typedef maybe_store_property inherited; + + redistributed_descriptor() { } + + redistributed_descriptor(const Descriptor& v, const DescriptorProperty& p) + : inherited(p), descriptor(v) { } + + Descriptor descriptor; + +private: + friend class boost::serialization::access; + + template + void serialize(Archiver& ar, unsigned int /*version*/) + { + ar & boost::serialization::base_object(*this) + & unsafe_serialize(descriptor); + } +}; + +/* Predicate that returns true if the target has migrated. */ +template +struct target_migrated_t +{ + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + + target_migrated_t(VertexProcessorMap vertex_to_processor, const Graph& g) + : vertex_to_processor(vertex_to_processor), g(g) { } + + bool operator()(Edge e) const + { + typedef global_descriptor DVertex; + processor_id_type owner = get(edge_target_processor_id, g, e); + return get(vertex_to_processor, DVertex(owner, target(e, g))) != owner; + } + +private: + VertexProcessorMap vertex_to_processor; + const Graph& g; +}; + +template +inline target_migrated_t +target_migrated(VertexProcessorMap vertex_to_processor, const Graph& g) +{ return target_migrated_t(vertex_to_processor, g); } + +/* Predicate that returns true if the source of an in-edge has migrated. */ +template +struct source_migrated_t +{ + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + + source_migrated_t(VertexProcessorMap vertex_to_processor, const Graph& g) + : vertex_to_processor(vertex_to_processor), g(g) { } + + bool operator()(stored_in_edge e) const + { + return get(vertex_to_processor, DVertex(e.source_processor, source(e.e, g))) + != e.source_processor; + } + +private: + VertexProcessorMap vertex_to_processor; + const Graph& g; +}; + +template +inline source_migrated_t +source_migrated(VertexProcessorMap vertex_to_processor, const Graph& g) +{ return source_migrated_t(vertex_to_processor, g); } + +/* Predicate that returns true if the target has migrated. */ +template +struct source_or_target_migrated_t +{ + typedef typename graph_traits::edge_descriptor Edge; + + source_or_target_migrated_t(VertexProcessorMap vertex_to_processor, + const Graph& g) + : vertex_to_processor(vertex_to_processor), g(g) { } + + bool operator()(Edge e) const + { + return get(vertex_to_processor, source(e, g)) != source(e, g).owner + || get(vertex_to_processor, target(e, g)) != target(e, g).owner; + } + +private: + VertexProcessorMap vertex_to_processor; + const Graph& g; +}; + +template +inline source_or_target_migrated_t +source_or_target_migrated(VertexProcessorMap vertex_to_processor, +const Graph& g) +{ + typedef source_or_target_migrated_t result_type; + return result_type(vertex_to_processor, g); +} + +} } // end of namespace detail::parallel + +template +template +void +PBGL_DISTRIB_ADJLIST_TYPE +::request_in_neighbors(vertex_descriptor v, + VertexProcessorMap vertex_to_processor, + bidirectionalS) +{ + BGL_FORALL_INEDGES_T(v, e, *this, graph_type) + request(vertex_to_processor, source(e, *this)); +} + +template +template +void +PBGL_DISTRIB_ADJLIST_TYPE +::remove_migrated_in_edges(vertex_descriptor v, + VertexProcessorMap vertex_to_processor, + bidirectionalS) +{ + graph_detail::erase_if(get(vertex_in_edges, base())[v.local], + source_migrated(vertex_to_processor, base())); +} + +template +template +void +PBGL_DISTRIB_ADJLIST_TYPE +::redistribute(VertexProcessorMap vertex_to_processor) +{ + using boost::parallel::inplace_all_to_all; + + // When we have stable descriptors, we only move those descriptors + // that actually need to be moved. Otherwise, we essentially have to + // regenerate the entire graph. + const bool has_stable_descriptors = + is_same::value + || is_same::value + || is_same::value; + + typedef detail::parallel::redistributed_descriptor + redistributed_vertex; + typedef detail::parallel::redistributed_descriptor + redistributed_edge; + typedef std::pair num_relocated_pair; + + vertex_iterator vi, vi_end; + edge_iterator ei, ei_end; + + process_group_type pg = process_group(); + + // Initial synchronization makes sure that we have all of our ducks + // in a row. We don't want any outstanding add/remove messages + // coming in mid-redistribution! + synchronize(process_group_); + + // We cannot cope with eviction of ghost cells + vertex_to_processor.set_max_ghost_cells(0); + + process_id_type p = num_processes(pg); + + // Send vertices and edges to the processor where they will + // actually reside. This requires O(|V| + |E|) communication + std::vector > redistributed_vertices(p); + std::vector > redistributed_edges(p); + + // Build the sets of relocated vertices for each process and then do + // an all-to-all transfer. + for (boost::tie(vi, vi_end) = vertices(*this); vi != vi_end; ++vi) { + if (!has_stable_descriptors + || get(vertex_to_processor, *vi) != vi->owner) { + redistributed_vertices[get(vertex_to_processor, *vi)] + .push_back(redistributed_vertex(*vi, get(vertex_all_t(), base(), + vi->local))); + } + + // When our descriptors are stable, we need to determine which + // adjacent descriptors are stable to determine which edges will + // be removed. + if (has_stable_descriptors) { + BGL_FORALL_OUTEDGES_T(*vi, e, *this, graph_type) + request(vertex_to_processor, target(e, *this)); + request_in_neighbors(*vi, vertex_to_processor, directed_selector()); + } + } + + inplace_all_to_all(pg, redistributed_vertices); + + // If we have stable descriptors, we need to know where our neighbor + // vertices are moving. + if (has_stable_descriptors) + synchronize(vertex_to_processor); + + // Build the sets of relocated edges for each process and then do + // an all-to-all transfer. + for (boost::tie(ei, ei_end) = edges(*this); ei != ei_end; ++ei) { + vertex_descriptor src = source(*ei, *this); + vertex_descriptor tgt = target(*ei, *this); + if (!has_stable_descriptors + || get(vertex_to_processor, src) != src.owner + || get(vertex_to_processor, tgt) != tgt.owner) + redistributed_edges[get(vertex_to_processor, source(*ei, *this))] + .push_back(redistributed_edge(*ei, get(edge_all_t(), base(), + ei->local))); + } + inplace_all_to_all(pg, redistributed_edges); + + // A mapping from old vertex descriptors to new vertex + // descriptors. This is an STL map partly because I'm too lazy to + // build a real property map (which is hard in the general case) but + // also because it won't try to look in the graph itself, because + // the keys are all vertex descriptors that have been invalidated. + std::map old_to_new_vertex_map; + + if (has_stable_descriptors) { + // Clear out all vertices and edges that will have moved. There + // are several stages to this. + + // First, eliminate all outgoing edges from the (local) vertices + // that have been moved or whose targets have been moved. + BGL_FORALL_VERTICES_T(v, *this, graph_type) { + if (get(vertex_to_processor, v) != v.owner) { + clear_out_edges(v.local, base()); + clear_in_edges_local(v, directed_selector()); + } else { + remove_out_edge_if(v.local, + target_migrated(vertex_to_processor, base()), + base()); + remove_migrated_in_edges(v, vertex_to_processor, directed_selector()); + } + } + + // Next, eliminate locally-stored edges that have migrated (for + // undirected graphs). + graph_detail::erase_if(local_edges_, + source_or_target_migrated(vertex_to_processor, *this)); + + // Eliminate vertices that have migrated + for (boost::tie(vi, vi_end) = vertices(*this); vi != vi_end; /* in loop */) { + if (get(vertex_to_processor, *vi) != vi->owner) + remove_vertex((*vi++).local, base()); + else { + // Add the identity relation for vertices that have not migrated + old_to_new_vertex_map[*vi] = *vi; + ++vi; + } + } + } else { + // Clear out the local graph: the entire graph is in transit + clear(); + } + + // Add the new vertices to the graph. When we do so, update the old + // -> new vertex mapping both locally and for the owner of the "old" + // vertex. + { + typedef std::pair mapping_pair; + std::vector > mappings(p); + + for (process_id_type src = 0; src < p; ++src) { + for (typename std::vector::iterator vi = + redistributed_vertices[src].begin(); + vi != redistributed_vertices[src].end(); ++vi) { + vertex_descriptor new_vertex = + add_vertex(vi->get_property(), *this); + old_to_new_vertex_map[vi->descriptor] = new_vertex; + mappings[vi->descriptor.owner].push_back(mapping_pair(vi->descriptor, + new_vertex)); + } + + redistributed_vertices[src].clear(); + } + + inplace_all_to_all(pg, mappings); + + // Add the mappings we were sent into the old->new map. + for (process_id_type src = 0; src < p; ++src) + old_to_new_vertex_map.insert(mappings[src].begin(), mappings[src].end()); + } + + // Get old->new vertex mappings for all of the vertices we need to + // know about. + + // TBD: An optimization here might involve sending the + // request-response pairs without an explicit request step (for + // bidirectional and undirected graphs). However, it may not matter + // all that much given the cost of redistribution. + { + std::vector > vertex_map_requests(p); + std::vector > vertex_map_responses(p); + + // We need to know about all of the vertices incident on edges + // that have been relocated to this processor. Tell each processor + // what each other processor needs to know. + for (process_id_type src = 0; src < p; ++src) + for (typename std::vector::iterator ei = + redistributed_edges[src].begin(); + ei != redistributed_edges[src].end(); ++ei) { + vertex_descriptor need_vertex = target(ei->descriptor, *this); + if (old_to_new_vertex_map.find(need_vertex) + == old_to_new_vertex_map.end()) + { + old_to_new_vertex_map[need_vertex] = need_vertex; + vertex_map_requests[need_vertex.owner].push_back(need_vertex); + } + } + inplace_all_to_all(pg, + vertex_map_requests, + vertex_map_responses); + + // Process the requests made for vertices we own. Then perform yet + // another all-to-all swap. This one matches the requests we've + // made to the responses we were given. + for (process_id_type src = 0; src < p; ++src) + for (typename std::vector::iterator vi = + vertex_map_responses[src].begin(); + vi != vertex_map_responses[src].end(); ++vi) + *vi = old_to_new_vertex_map[*vi]; + inplace_all_to_all(pg, vertex_map_responses); + + // Matching the requests to the responses, update the old->new + // vertex map for all of the vertices we will need to know. + for (process_id_type src = 0; src < p; ++src) { + typedef typename std::vector::size_type size_type; + for (size_type i = 0; i < vertex_map_requests[src].size(); ++i) { + old_to_new_vertex_map[vertex_map_requests[src][i]] = + vertex_map_responses[src][i]; + } + } + } + + // Add edges to the graph by mapping the source and target. + for (process_id_type src = 0; src < p; ++src) { + for (typename std::vector::iterator ei = + redistributed_edges[src].begin(); + ei != redistributed_edges[src].end(); ++ei) { + add_edge(old_to_new_vertex_map[source(ei->descriptor, *this)], + old_to_new_vertex_map[target(ei->descriptor, *this)], + ei->get_property(), + *this); + } + + redistributed_edges[src].clear(); + } + + // Be sure that edge-addition messages are received now, completing + // the graph. + synchronize(process_group_); + + this->distribution().clear(); + + detail::parallel::maybe_initialize_vertex_indices(vertices(base()), + get(vertex_index, base())); +} + +} // end namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/serialization.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/serialization.hpp new file mode 100644 index 0000000000..d38e4d2d21 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/adjlist/serialization.hpp @@ -0,0 +1,1007 @@ +// Copyright Daniel Wallin 2007. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_DISTRIBUTED_ADJLIST_SERIALIZATION_070925_HPP +#define BOOST_GRAPH_DISTRIBUTED_ADJLIST_SERIALIZATION_070925_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +# include +# include +# include +# include +# include +# include + +namespace boost { + +namespace detail { namespace parallel +{ + + // Wraps a local descriptor, making it serializable. + template + struct serializable_local_descriptor + { + serializable_local_descriptor() + {} + + serializable_local_descriptor(Local local) + : local(local) + {} + + operator Local const&() const + { + return local; + } + + bool operator==(serializable_local_descriptor const& other) const + { + return local == other.local; + } + + bool operator<(serializable_local_descriptor const& other) const + { + return local < other.local; + } + + template + void serialize(Archive& ar, const unsigned int /*version*/) + { + ar & unsafe_serialize(local); + } + + Local local; + }; + + template + struct pending_edge + { + pending_edge( + Vertex source, Vertex target + , Properties properties, void* property_ptr + ) + : source(source) + , target(target) + , properties(properties) + , property_ptr(property_ptr) + {} + + Vertex source; + Vertex target; + Properties properties; + void* property_ptr; + }; + + inline bool is_digit(char c) + { + return (bool)std::isdigit(c); + } + + inline std::vector + available_process_files(std::string const& filename) + { + if (!filesystem::exists(filename)) + return std::vector(); + + std::vector result; + + for (filesystem::directory_iterator i(filename), end; i != end; ++i) + { + if (!filesystem::is_regular(*i)) + boost::throw_exception(std::runtime_error("directory contains non-regular entries")); + +#if BOOST_VERSION >= 103600 + std::string process_name = i->path().filename(); +#else + std::string process_name = i->leaf(); +#endif + for (std::string::size_type i = 0; i < process_name.size(); ++i) + if (!is_digit(process_name[i])) + boost::throw_exception(std::runtime_error("directory contains files with invalid names")); + + result.push_back(boost::lexical_cast(process_name)); + } + + return result; + } + + template + void maybe_load_properties( + Archive& ar, char const* name, property& properties) + { + ar >> serialization::make_nvp(name, get_property_value(properties, Tag())); + maybe_load_properties(ar, name, static_cast(properties)); + } + + template + void maybe_load_properties( + Archive&, char const*, no_property&) + {} + + template + void maybe_load_properties( + Archive& ar, char const* name, Bundle& bundle) + { + ar >> serialization::make_nvp(name, bundle); + no_property prop; + maybe_load_properties(ar, name, prop); + } + + + + + + + template + struct graph_loader + { + typedef typename Graph::vertex_descriptor vertex_descriptor; + typedef typename Graph::local_vertex_descriptor local_vertex_descriptor; + typedef typename Graph::vertex_property_type vertex_property_type; + typedef typename Graph::edge_descriptor edge_descriptor; + typedef typename Graph::local_edge_descriptor local_edge_descriptor; + typedef typename Graph::edge_property_type edge_property_type; + typedef typename Graph::process_group_type process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + typedef typename Graph::directed_selector directed_selector; + typedef typename mpl::if_< + is_same, vecS, VertexListS + >::type vertex_list_selector; + typedef pending_edge + pending_edge_type; + typedef serializable_local_descriptor + serializable_vertex_descriptor; + + graph_loader(Graph& g, Archive& ar) + : m_g(g) + , m_ar(ar) + , m_pg(g.process_group()) + , m_requested_vertices(num_processes(m_pg)) + , m_remote_vertices(num_processes(m_pg)) + , m_property_ptrs(num_processes(m_pg)) + { + g.clear(); + load_prefix(); + load_vertices(); + load_edges(); + ar >> make_nvp("distribution", m_g.distribution()); + } + + private: + struct pending_in_edge + { + pending_in_edge( + vertex_descriptor u, vertex_descriptor v, void* property_ptr + ) + : u(u) + , v(v) + , property_ptr(property_ptr) + {} + + vertex_descriptor u; + vertex_descriptor v; + void* property_ptr; + }; + + bool is_root() const + { + return process_id(m_pg) == 0; + } + + template + serialization::nvp const make_nvp(char const* name, T& value) const + { + return serialization::nvp(name, value); + } + + void load_prefix(); + void load_vertices(); + + template + void maybe_load_and_store_local_vertex(Anything); + void maybe_load_and_store_local_vertex(vecS); + + void load_edges(); + void load_in_edges(bidirectionalS); + void load_in_edges(directedS); + void add_pending_in_edge( + vertex_descriptor u, vertex_descriptor v, void* property_ptr, vecS); + template + void add_pending_in_edge( + vertex_descriptor u, vertex_descriptor v, void* property_ptr, Anything); + template + void add_edge( + vertex_descriptor u, vertex_descriptor v + , edge_property_type const& property, void* property_ptr, Anything); + void add_edge( + vertex_descriptor u, vertex_descriptor v + , edge_property_type const& property, void* property_ptr, vecS); + void add_remote_vertex_request( + vertex_descriptor u, vertex_descriptor v, directedS); + void add_remote_vertex_request( + vertex_descriptor u, vertex_descriptor v, bidirectionalS); + void add_in_edge( + edge_descriptor const&, void*, directedS); + void add_in_edge( + edge_descriptor const& edge, void* old_property_ptr, bidirectionalS); + + void resolve_remote_vertices(directedS); + void resolve_remote_vertices(bidirectionalS); + vertex_descriptor resolve_remote_vertex(vertex_descriptor u) const; + vertex_descriptor resolve_remote_vertex(vertex_descriptor u, vecS) const; + template + vertex_descriptor resolve_remote_vertex(vertex_descriptor u, Anything) const; + + void resolve_property_ptrs(); + + void commit_pending_edges(vecS); + template + void commit_pending_edges(Anything); + void commit_pending_in_edges(directedS); + void commit_pending_in_edges(bidirectionalS); + + void* maybe_load_property_ptr(directedS) { return 0; } + void* maybe_load_property_ptr(bidirectionalS); + + Graph& m_g; + Archive& m_ar; + process_group_type m_pg; + + std::vector m_id_mapping; + + // Maps local vertices as loaded from the archive to + // the ones actually added to the graph. Only used + // when !vecS. + std::map m_local_vertices; + + // This is the list of remote vertex descriptors that we + // are going to receive from other processes. This is + // kept sorted so that we can determine the position of + // the matching vertex descriptor in m_remote_vertices. + std::vector > m_requested_vertices; + + // This is the list of remote vertex descriptors that + // we send and receive from other processes. + std::vector > m_remote_vertices; + + // ... + std::vector m_pending_edges; + + // The pending in-edges that will be added in the commit step, after + // the remote vertex descriptors has been resolved. Only used + // when bidirectionalS and !vecS. + std::vector m_pending_in_edges; + + std::vector > > m_property_ptrs; + }; + + template + void graph_loader::load_prefix() + { + typename process_group_type::process_size_type num_processes_; + m_ar >> make_nvp("num_processes", num_processes_); + + if (num_processes_ != num_processes(m_pg)) + boost::throw_exception(std::runtime_error("number of processes mismatch")); + + process_id_type old_id; + m_ar >> make_nvp("id", old_id); + + std::vector mapping; + m_ar >> make_nvp("mapping", mapping); + + // Fetch all the old id's from the other processes. + std::vector old_ids; + all_gather(m_pg, &old_id, &old_id+1, old_ids); + + m_id_mapping.resize(num_processes(m_pg), -1); + + for (process_id_type i = 0; i < num_processes(m_pg); ++i) + { +# ifdef PBGL_SERIALIZE_DEBUG + if (is_root()) + std::cout << i << " used to be " << old_ids[i] << "\n"; +# endif + assert(m_id_mapping[old_ids[i]] == -1); + m_id_mapping[old_ids[i]] = i; + } + + std::vector new_mapping( + mapping.size()); + + for (int i = 0; i < num_processes(m_pg); ++i) + { + new_mapping[mapping[old_ids[i]]] = i; + } + + m_g.distribution().assign_mapping( + new_mapping.begin(), new_mapping.end()); + } + + template + void graph_loader::load_vertices() + { + int V; + m_ar >> BOOST_SERIALIZATION_NVP(V); + +# ifdef PBGL_SERIALIZE_DEBUG + if (is_root()) + std::cout << "Loading vertices\n"; +# endif + + for (int i = 0; i < V; ++i) + { + maybe_load_and_store_local_vertex(vertex_list_selector()); + } + } + + template + template + void graph_loader::maybe_load_and_store_local_vertex(Anything) + { + // Load the original vertex descriptor + local_vertex_descriptor local; + m_ar >> make_nvp("local", unsafe_serialize(local)); + + // Load the properties + vertex_property_type property; + detail::parallel::maybe_load_properties(m_ar, "vertex_property", + property); + + // Add the vertex + vertex_descriptor v(process_id(m_pg), add_vertex(property, m_g.base())); + + if (m_g.on_add_vertex) + m_g.on_add_vertex(v, m_g); + + // Create the mapping from the "old" local descriptor to the new + // local descriptor. + m_local_vertices[local] = v.local; + } + + template + void graph_loader::maybe_load_and_store_local_vertex(vecS) + { + // Load the properties + vertex_property_type property; + detail::parallel::maybe_load_properties(m_ar, "vertex_property", + property); + + // Add the vertex + vertex_descriptor v(process_id(m_pg), + add_vertex(m_g.build_vertex_property(property), + m_g.base())); + + if (m_g.on_add_vertex) + m_g.on_add_vertex(v, m_g); + } + + template + void graph_loader::load_edges() + { + int E; + m_ar >> BOOST_SERIALIZATION_NVP(E); + +# ifdef PBGL_SERIALIZE_DEBUG + if (is_root()) + std::cout << "Loading edges\n"; +# endif + + for (int i = 0; i < E; ++i) + { + local_vertex_descriptor local_src; + process_id_type target_owner; + local_vertex_descriptor local_tgt; + + m_ar >> make_nvp("source", unsafe_serialize(local_src)); + m_ar >> make_nvp("target_owner", target_owner); + m_ar >> make_nvp("target", unsafe_serialize(local_tgt)); + + process_id_type new_src_owner = process_id(m_pg); + process_id_type new_tgt_owner = m_id_mapping[target_owner]; + + vertex_descriptor source(new_src_owner, local_src); + vertex_descriptor target(new_tgt_owner, local_tgt); + + edge_property_type properties; + detail::parallel::maybe_load_properties(m_ar, "edge_property", properties); + + void* property_ptr = maybe_load_property_ptr(directed_selector()); + add_edge(source, target, properties, property_ptr, vertex_list_selector()); + } + + load_in_edges(directed_selector()); + commit_pending_edges(vertex_list_selector()); + } + + template + void graph_loader::load_in_edges(bidirectionalS) + { + std::size_t I; + m_ar >> BOOST_SERIALIZATION_NVP(I); + +# ifdef PBGL_SERIALIZE_DEBUG + if (is_root()) + std::cout << "Loading in-edges\n"; +# endif + + for (int i = 0; i < I; ++i) + { + process_id_type src_owner; + local_vertex_descriptor local_src; + local_vertex_descriptor local_target; + void* property_ptr; + + m_ar >> make_nvp("src_owner", src_owner); + m_ar >> make_nvp("source", unsafe_serialize(local_src)); + m_ar >> make_nvp("target", unsafe_serialize(local_target)); + m_ar >> make_nvp("property_ptr", unsafe_serialize(property_ptr)); + + src_owner = m_id_mapping[src_owner]; + + vertex_descriptor u(src_owner, local_src); + vertex_descriptor v(process_id(m_pg), local_target); + + add_pending_in_edge(u, v, property_ptr, vertex_list_selector()); + } + } + + template + void graph_loader::load_in_edges(directedS) + {} + + template + void graph_loader::add_pending_in_edge( + vertex_descriptor u, vertex_descriptor v, void* property_ptr, vecS) + { + m_pending_in_edges.push_back(pending_in_edge(u,v,property_ptr)); + } + + template + template + void graph_loader::add_pending_in_edge( + vertex_descriptor u, vertex_descriptor v, void* property_ptr, Anything) + { + // u and v represent the out-edge here, meaning v is local + // to us, and u is always remote. + m_pending_in_edges.push_back(pending_in_edge(u,v,property_ptr)); + add_remote_vertex_request(v, u, bidirectionalS()); + } + + template + template + void graph_loader::add_edge( + vertex_descriptor u, vertex_descriptor v + , edge_property_type const& property, void* property_ptr, Anything) + { + m_pending_edges.push_back(pending_edge_type(u, v, property, property_ptr)); + add_remote_vertex_request(u, v, directed_selector()); + } + + template + void graph_loader::add_remote_vertex_request( + vertex_descriptor u, vertex_descriptor v, directedS) + { + // We have to request the remote vertex. + m_requested_vertices[owner(v)].push_back(local(v)); + } + + template + void graph_loader::add_remote_vertex_request( + vertex_descriptor u, vertex_descriptor v, bidirectionalS) + { + // If the edge spans to another process, we know + // that that process has a matching in-edge, so + // we can just send our vertex. No requests + // necessary. + if (owner(v) != m_g.processor()) + { + m_remote_vertices[owner(v)].push_back(local(u)); + m_requested_vertices[owner(v)].push_back(local(v)); + } + } + + template + void graph_loader::add_edge( + vertex_descriptor u, vertex_descriptor v + , edge_property_type const& property, void* property_ptr, vecS) + { + std::pair inserted = + detail::parallel::add_local_edge( + local(u), local(v) + , m_g.build_edge_property(property), m_g.base()); + assert(inserted.second); + put(edge_target_processor_id, m_g.base(), inserted.first, owner(v)); + + edge_descriptor e(owner(u), owner(v), true, inserted.first); + + if (inserted.second && m_g.on_add_edge) + m_g.on_add_edge(e, m_g); + + add_in_edge(e, property_ptr, directed_selector()); + } + + template + void graph_loader::add_in_edge( + edge_descriptor const&, void*, directedS) + {} + + template + void graph_loader::add_in_edge( + edge_descriptor const& edge, void* old_property_ptr, bidirectionalS) + { + if (owner(target(edge, m_g)) == m_g.processor()) + { + detail::parallel::stored_in_edge + e(m_g.processor(), local(edge)); + boost::graph_detail::push(get( + vertex_in_edges, m_g.base())[local(target(edge, m_g))], e); + } + else + { + // We send the (old,new) property pointer pair to + // the remote process. This could be optimized to + // only send the new one -- the ordering can be + // made implicit because the old pointer value is + // stored on the remote process. + // + // Doing that is a little bit more complicated, but + // in case it turns out it's important we can do it. + void* property_ptr = local(edge).get_property(); + m_property_ptrs[owner(target(edge, m_g))].push_back( + unsafe_pair(old_property_ptr, property_ptr)); + } + } + + template + void graph_loader::resolve_property_ptrs() + { +# ifdef PBGL_SERIALIZE_DEBUG + if (is_root()) + std::cout << "Resolving property pointers\n"; +# endif + + for (int i = 0; i < num_processes(m_pg); ++i) + { + std::sort( + m_property_ptrs[i].begin(), m_property_ptrs[i].end()); + } + + boost::parallel::inplace_all_to_all(m_pg, m_property_ptrs); + } + + template + void graph_loader::resolve_remote_vertices(directedS) + { + for (int i = 0; i < num_processes(m_pg); ++i) + { + std::sort(m_requested_vertices[i].begin(), m_requested_vertices[i].end()); + } + + boost::parallel::inplace_all_to_all( + m_pg, m_requested_vertices, m_remote_vertices); + + for (int i = 0; i < num_processes(m_pg); ++i) + { + BOOST_FOREACH(serializable_vertex_descriptor& u, m_remote_vertices[i]) + { + u = m_local_vertices[u]; + } + } + + boost::parallel::inplace_all_to_all(m_pg, m_remote_vertices); + } + + template + void graph_loader::resolve_remote_vertices(bidirectionalS) + { +# ifdef PBGL_SERIALIZE_DEBUG + if (is_root()) + std::cout << "Resolving remote vertices\n"; +# endif + + for (int i = 0; i < num_processes(m_pg); ++i) + { + std::sort(m_requested_vertices[i].begin(), m_requested_vertices[i].end()); + std::sort(m_remote_vertices[i].begin(), m_remote_vertices[i].end()); + + BOOST_FOREACH(serializable_vertex_descriptor& u, m_remote_vertices[i]) + { + u = m_local_vertices[u]; + } + } + + boost::parallel::inplace_all_to_all(m_pg, m_remote_vertices); + + for (int i = 0; i < num_processes(m_pg); ++i) + assert(m_remote_vertices[i].size() == m_requested_vertices[i].size()); + } + + template + void graph_loader::commit_pending_edges(vecS) + { + commit_pending_in_edges(directed_selector()); + } + + template + template + void graph_loader::commit_pending_edges(Anything) + { + resolve_remote_vertices(directed_selector()); + + BOOST_FOREACH(pending_edge_type const& e, m_pending_edges) + { + vertex_descriptor u = resolve_remote_vertex(e.source); + vertex_descriptor v = resolve_remote_vertex(e.target); + add_edge(u, v, e.properties, e.property_ptr, vecS()); + } + + commit_pending_in_edges(directed_selector()); + } + + template + void graph_loader::commit_pending_in_edges(directedS) + {} + + template + void graph_loader::commit_pending_in_edges(bidirectionalS) + { + resolve_property_ptrs(); + + BOOST_FOREACH(pending_in_edge const& e, m_pending_in_edges) + { + vertex_descriptor u = resolve_remote_vertex(e.u, vertex_list_selector()); + vertex_descriptor v = resolve_remote_vertex(e.v, vertex_list_selector()); + + typedef detail::parallel::stored_in_edge stored_edge; + + std::vector >::iterator i = std::lower_bound( + m_property_ptrs[owner(u)].begin() + , m_property_ptrs[owner(u)].end() + , unsafe_pair(e.property_ptr, 0) + ); + + if (i == m_property_ptrs[owner(u)].end() + || i->first != e.property_ptr) + { + assert(false); + } + + local_edge_descriptor local_edge(local(u), local(v), i->second); + stored_edge edge(owner(u), local_edge); + boost::graph_detail::push( + get(vertex_in_edges, m_g.base())[local(v)], edge); + } + } + + template + typename graph_loader::vertex_descriptor + graph_loader::resolve_remote_vertex( + vertex_descriptor u) const + { + if (owner(u) == process_id(m_pg)) + { + return vertex_descriptor( + process_id(m_pg), m_local_vertices.find(local(u))->second); + } + + typename std::vector::const_iterator + i = std::lower_bound( + m_requested_vertices[owner(u)].begin() + , m_requested_vertices[owner(u)].end() + , serializable_vertex_descriptor(local(u)) + ); + + if (i == m_requested_vertices[owner(u)].end() + || *i != local(u)) + { + assert(false); + } + + local_vertex_descriptor local = + m_remote_vertices[owner(u)][m_requested_vertices[owner(u)].end() - i]; + return vertex_descriptor(owner(u), local); + } + + template + typename graph_loader::vertex_descriptor + graph_loader::resolve_remote_vertex( + vertex_descriptor u, vecS) const + { + return u; + } + + template + template + typename graph_loader::vertex_descriptor + graph_loader::resolve_remote_vertex( + vertex_descriptor u, Anything) const + { + return resolve_remote_vertex(u); + } + + template + void* + graph_loader::maybe_load_property_ptr(bidirectionalS) + { + void* ptr; + m_ar >> make_nvp("property_ptr", unsafe_serialize(ptr)); + return ptr; + } + +template +void maybe_save_local_descriptor(Archive& ar, D const&, vecS) +{} + +template +void maybe_save_local_descriptor(Archive& ar, D const& d, NotVecS) +{ + ar << serialization::make_nvp( + "local", unsafe_serialize(const_cast(d))); +} + +template +void maybe_save_properties( + Archive&, char const*, no_property const&) +{} + +template +void maybe_save_properties( + Archive& ar, char const* name, property const& properties) +{ + ar & serialization::make_nvp(name, get_property_value(properties, Tag())); + maybe_save_properties(ar, name, static_cast(properties)); +} + +template +void save_in_edges(Archive& ar, Graph const& g, directedS) +{} + +// We need to save the edges in the base edge +// list, and the in_edges that are stored in the +// vertex_in_edges vertex property. +template +void save_in_edges(Archive& ar, Graph const& g, bidirectionalS) +{ + typedef typename Graph::process_group_type + process_group_type; + typedef typename process_group_type::process_id_type + process_id_type; + typedef typename graph_traits< + Graph>::vertex_descriptor vertex_descriptor; + typedef typename vertex_descriptor::local_descriptor_type + local_vertex_descriptor; + typedef typename graph_traits< + Graph>::edge_descriptor edge_descriptor; + + process_id_type id = g.processor(); + + typedef std::pair in_edge; + std::vector saved_in_edges; + + BGL_FORALL_VERTICES_T(v, g, Graph) + { + BOOST_FOREACH(edge_descriptor const& e, in_edges(v, g)) + { + // Only save the in_edges that isn't owned by this process. + if (owner(e) == id) + continue; + + saved_in_edges.push_back(e); + } + } + + std::size_t I = saved_in_edges.size(); + ar << BOOST_SERIALIZATION_NVP(I); + + BOOST_FOREACH(edge_descriptor const& e, saved_in_edges) + { + process_id_type src_owner = owner(source(e,g)); + local_vertex_descriptor local_src = local(source(e,g)); + local_vertex_descriptor local_target = local(target(e,g)); + void* property_ptr = local(e).get_property(); + + using serialization::make_nvp; + + ar << make_nvp("src_owner", src_owner); + ar << make_nvp("source", unsafe_serialize(local_src)); + ar << make_nvp("target", unsafe_serialize(local_target)); + ar << make_nvp("property_ptr", unsafe_serialize(property_ptr)); + } +} + +template +void maybe_save_property_ptr(Archive&, Edge const&, directedS) +{} + +template +void maybe_save_property_ptr(Archive& ar, Edge const& e, bidirectionalS) +{ + void* ptr = local(e).get_property(); + ar << serialization::make_nvp("property_ptr", unsafe_serialize(ptr)); +} + +template +void save_edges(Archive& ar, Graph const& g, DirectedS) +{ + typedef typename Graph::process_group_type + process_group_type; + typedef typename process_group_type::process_id_type + process_id_type; + typedef typename graph_traits< + Graph>::vertex_descriptor vertex_descriptor; + typedef typename graph_traits< + Graph>::edge_descriptor edge_descriptor; + + // We retag the property list here so that bundled properties are + // properly placed into property. + typedef typename boost::detail::retag_property_list< + edge_bundle_t, + typename Graph::edge_property_type>::type + edge_property_type; + + int E = num_edges(g); + ar << BOOST_SERIALIZATION_NVP(E); + + // For *directed* graphs, we can just save + // the edge list and be done. + // + // For *bidirectional* graphs, we need to also + // save the "vertex_in_edges" property map, + // because it might contain in-edges that + // are not locally owned. + BGL_FORALL_EDGES_T(e, g, Graph) + { + vertex_descriptor src(source(e, g)); + vertex_descriptor tgt(target(e, g)); + + typename vertex_descriptor::local_descriptor_type + local_u(local(src)); + typename vertex_descriptor::local_descriptor_type + local_v(local(tgt)); + + process_id_type target_owner = owner(tgt); + + using serialization::make_nvp; + + ar << make_nvp("source", unsafe_serialize(local_u)); + ar << make_nvp("target_owner", target_owner); + ar << make_nvp("target", unsafe_serialize(local_v)); + + maybe_save_properties( + ar, "edge_property" + , static_cast(get(edge_all_t(), g, e)) + ); + + maybe_save_property_ptr(ar, e, DirectedS()); + } + + save_in_edges(ar, g, DirectedS()); +} + +}} // namespace detail::parallel + +template +template +void PBGL_DISTRIB_ADJLIST_TYPE::load(std::string const& filename) +{ + typedef typename config_type::VertexListS vertex_list_selector; + + process_group_type pg = process_group(); + process_id_type id = process_id(pg); + + synchronize(pg); + + std::vector disk_files = detail::parallel::available_process_files(filename); + std::sort(disk_files.begin(), disk_files.end()); + + // Negotiate which process gets which file. Serialized. + std::vector consumed_files; + int picked_file = -1; + + if (id > 0) + receive_oob(pg, id-1, 0, consumed_files); + + std::sort(consumed_files.begin(), consumed_files.end()); + std::vector available_files; + std::set_difference( + disk_files.begin(), disk_files.end() + , consumed_files.begin(), consumed_files.end() + , std::back_inserter(available_files) + ); + + if (available_files.empty()) + boost::throw_exception(std::runtime_error("no file available")); + + // back() used for debug purposes. Making sure the + // ranks are shuffled. + picked_file = available_files.back(); + +# ifdef PBGL_SERIALIZE_DEBUG + std::cout << id << " picked " << picked_file << "\n"; +# endif + + consumed_files.push_back(picked_file); + + if (id < num_processes(pg) - 1) + send_oob(pg, id+1, 0, consumed_files); + + std::string local_filename = filename + "/" + + lexical_cast(picked_file); + + std::ifstream in(local_filename.c_str(), std::ios_base::binary); + IStreamConstructibleArchive ar(in); + + detail::parallel::graph_loader< + graph_type, IStreamConstructibleArchive, InVertexListS + > loader(*this, ar); + +# ifdef PBGL_SERIALIZE_DEBUG + std::cout << "Process " << id << " done loading.\n"; +# endif + + synchronize(pg); +} + +template +template +void PBGL_DISTRIB_ADJLIST_TYPE::save(std::string const& filename) const +{ + // We retag the property list here so that bundled properties are + // properly placed into property. + typedef typename boost::detail::retag_property_list< + vertex_bundle_t, vertex_property_type + >::type vertex_property_type; + + typedef typename config_type::VertexListS vertex_list_selector; + + process_group_type pg = process_group(); + process_id_type id = process_id(pg); + + if (filesystem::exists(filename) && !filesystem::is_directory(filename)) + boost::throw_exception(std::runtime_error("entry exists, but is not a directory")); + + filesystem::remove_all(filename); + filesystem::create_directory(filename); + + synchronize(pg); + + std::string local_filename = filename + "/" + + lexical_cast(id); + + std::ofstream out(local_filename.c_str(), std::ios_base::binary); + OStreamConstructibleArchive ar(out); + + using serialization::make_nvp; + + typename process_group_type::process_size_type num_processes_ = num_processes(pg); + ar << make_nvp("num_processes", num_processes_); + ar << BOOST_SERIALIZATION_NVP(id); + ar << make_nvp("mapping", this->distribution().mapping()); + + int V = num_vertices(*this); + ar << BOOST_SERIALIZATION_NVP(V); + + BGL_FORALL_VERTICES_T(v, *this, graph_type) + { + local_vertex_descriptor local_descriptor(local(v)); + detail::parallel::maybe_save_local_descriptor( + ar, local_descriptor, vertex_list_selector()); + detail::parallel::maybe_save_properties( + ar, "vertex_property" + , static_cast(get(vertex_all_t(), *this, v)) + ); + } + + detail::parallel::save_edges(ar, *this, directed_selector()); + + ar << make_nvp("distribution", this->distribution()); +} + +} // namespace boost + +#endif // BOOST_GRAPH_DISTRIBUTED_ADJLIST_SERIALIZATION_070925_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/betweenness_centrality.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/betweenness_centrality.hpp new file mode 100644 index 0000000000..1f327da980 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/betweenness_centrality.hpp @@ -0,0 +1,1724 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PARALLEL_BRANDES_BETWEENNESS_CENTRALITY_HPP +#define BOOST_GRAPH_PARALLEL_BRANDES_BETWEENNESS_CENTRALITY_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +// #define COMPUTE_PATH_COUNTS_INLINE + +#include +#include +#include +#include +#include + +// For additive_reducer +#include +#include +#include +#include +#include + +#include +#include +#include + +// NGE - Needed for minstd_rand at L807, should pass vertex list +// or generator instead +#include + +#include +#include +#include + +// Appending reducer +template +struct append_reducer { + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + template + T operator()(const K&) const { return T(); } + + template + T operator()(const K&, const T& x, const T& y) const + { + T z(x.begin(), x.end()); + for (typename T::const_iterator iter = y.begin(); iter != y.end(); ++iter) + if (std::find(z.begin(), z.end(), *iter) == z.end()) + z.push_back(*iter); + + return z; + } +}; + +namespace boost { + + namespace serialization { + + // TODO(nge): Write generalized serialization for tuples + template + void serialize(Archive & ar, + boost::tuple& t, + const unsigned int) + { + ar & boost::tuples::get<0>(t); + ar & boost::tuples::get<1>(t); + ar & boost::tuples::get<2>(t); + ar & boost::tuples::get<3>(t); + } + + } // serialization + + template + class get_owner_of_first_tuple_element { + + public: + typedef typename property_traits::value_type owner_type; + + get_owner_of_first_tuple_element(OwnerMap owner) : owner(owner) { } + + owner_type get_owner(Tuple t) { return get(owner, boost::tuples::get<0>(t)); } + + private: + OwnerMap owner; + }; + + template + typename get_owner_of_first_tuple_element::owner_type + get(get_owner_of_first_tuple_element o, Tuple t) + { return o.get_owner(t); } + + template + class get_owner_of_first_pair_element { + + public: + typedef typename property_traits::value_type owner_type; + + get_owner_of_first_pair_element(OwnerMap owner) : owner(owner) { } + + template + owner_type get_owner(std::pair p) { return get(owner, p.first); } + + private: + OwnerMap owner; + }; + + template + typename get_owner_of_first_pair_element::owner_type + get(get_owner_of_first_pair_element o, std::pair p) + { return o.get_owner(p); } + + namespace graph { namespace parallel { namespace detail { + + template + class betweenness_centrality_msg_value + { + typedef typename property_traits::value_type distance_type; + typedef typename property_traits::value_type incoming_type; + typedef typename incoming_type::value_type incoming_value_type; + + public: + typedef std::pair type; + + static type create(distance_type dist, incoming_value_type source) + { return std::make_pair(dist, source); } + }; + + + /************************************************************************/ + /* Delta-stepping Betweenness Centrality */ + /************************************************************************/ + + template + class betweenness_centrality_delta_stepping_impl { + // Could inherit from delta_stepping_impl to get run() method + // but for the time being it's just reproduced here + + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::degree_size_type Degree; + typedef typename property_traits::value_type Dist; + typedef typename property_traits::value_type IncomingType; + typedef typename boost::graph::parallel::process_group_type::type + ProcessGroup; + + typedef std::list Bucket; + typedef typename Bucket::iterator BucketIterator; + typedef typename std::vector::size_type BucketIndex; + + typedef betweenness_centrality_msg_value + MessageValue; + + enum { + // Relax a remote vertex. The message contains a pair, the first part of which is the vertex whose + // tentative distance is being relaxed and the second part + // contains either the new distance (if there is no predecessor + // map) or a pair with the distance and predecessor. + msg_relax + }; + + public: + + // Must supply delta, ctor that guesses delta removed + betweenness_centrality_delta_stepping_impl(const Graph& g, + DistanceMap distance, + IncomingMap incoming, + EdgeWeightMap weight, + PathCountMap path_count, +#ifdef COMPUTE_PATH_COUNTS_INLINE + IsSettledMap is_settled, + VertexIndexMap vertex_index, +#endif + Dist delta); + + void run(Vertex s); + + private: + // Relax the edge (u, v), creating a new best path of distance x. + void relax(Vertex u, Vertex v, Dist x); + + // Synchronize all of the processes, by receiving all messages that + // have not yet been received. + void synchronize() + { + using boost::graph::parallel::synchronize; + synchronize(pg); + } + + // Setup triggers for msg_relax messages + void setup_triggers() + { + using boost::graph::parallel::simple_trigger; + simple_trigger(pg, msg_relax, this, + &betweenness_centrality_delta_stepping_impl::handle_msg_relax); + } + + void handle_msg_relax(int /*source*/, int /*tag*/, + const std::pair& data, + trigger_receive_context) + { relax(data.second.second, data.first, data.second.first); } + + const Graph& g; + IncomingMap incoming; + DistanceMap distance; + EdgeWeightMap weight; + PathCountMap path_count; +#ifdef COMPUTE_PATH_COUNTS_INLINE + IsSettledMap is_settled; + VertexIndexMap vertex_index; +#endif + Dist delta; + ProcessGroup pg; + typename property_map::const_type owner; + typename property_map::const_type local; + + // A "property map" that contains the position of each vertex in + // whatever bucket it resides in. + std::vector position_in_bucket; + + // Bucket data structure. The ith bucket contains all local vertices + // with (tentative) distance in the range [i*delta, + // (i+1)*delta). + std::vector buckets; + + // This "dummy" list is used only so that we can initialize the + // position_in_bucket property map with non-singular iterators. This + // won't matter for most implementations of the C++ Standard + // Library, but it avoids undefined behavior and allows us to run + // with library "debug modes". + std::list dummy_list; + + // A "property map" that states which vertices have been deleted + // from the bucket in this iteration. + std::vector vertex_was_deleted; + }; + + template + betweenness_centrality_delta_stepping_impl< + Graph, DistanceMap, IncomingMap, EdgeWeightMap, PathCountMap +#ifdef COMPUTE_PATH_COUNTS_INLINE + , IsSettledMap, VertexIndexMap +#endif + >:: + betweenness_centrality_delta_stepping_impl(const Graph& g, + DistanceMap distance, + IncomingMap incoming, + EdgeWeightMap weight, + PathCountMap path_count, +#ifdef COMPUTE_PATH_COUNTS_INLINE + IsSettledMap is_settled, + VertexIndexMap vertex_index, +#endif + Dist delta) + : g(g), + incoming(incoming), + distance(distance), + weight(weight), + path_count(path_count), +#ifdef COMPUTE_PATH_COUNTS_INLINE + is_settled(is_settled), + vertex_index(vertex_index), +#endif + delta(delta), + pg(boost::graph::parallel::process_group_adl(g), attach_distributed_object()), + owner(get(vertex_owner, g)), + local(get(vertex_local, g)) + + { setup_triggers(); } + + template + void + betweenness_centrality_delta_stepping_impl< + Graph, DistanceMap, IncomingMap, EdgeWeightMap, PathCountMap +#ifdef COMPUTE_PATH_COUNTS_INLINE + , IsSettledMap, VertexIndexMap +#endif + >:: + run(Vertex s) + { + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typename process_group_type::process_id_type id = process_id(pg); + + Dist inf = (std::numeric_limits::max)(); + + // None of the vertices are stored in the bucket. + position_in_bucket.clear(); + position_in_bucket.resize(num_vertices(g), dummy_list.end()); + + // None of the vertices have been deleted + vertex_was_deleted.clear(); + vertex_was_deleted.resize(num_vertices(g), false); + + // No path from s to any other vertex, yet + BGL_FORALL_VERTICES_T(v, g, Graph) + put(distance, v, inf); + + // The distance to the starting node is zero + if (get(owner, s) == id) + // Put "s" into its bucket (bucket 0) + relax(s, s, 0); + else + // Note that we know the distance to s is zero + cache(distance, s, 0); + +#ifdef COMPUTE_PATH_COUNTS_INLINE + // Synchronize here to deliver initial relaxation since we don't + // synchronize at the beginning of the inner loop any more + synchronize(); + + // Incoming edge count map is an implementation detail and should + // be freed as soon as possible so build it here + typedef typename graph_traits::edges_size_type edges_size_type; + + std::vector incoming_edge_countS(num_vertices(g)); + iterator_property_map::iterator, VertexIndexMap> + incoming_edge_count(incoming_edge_countS.begin(), vertex_index); +#endif + + BucketIndex max_bucket = (std::numeric_limits::max)(); + BucketIndex current_bucket = 0; + do { +#ifdef COMPUTE_PATH_COUNTS_INLINE + // We need to clear the outgoing map after every bucket so just build it here + std::vector outgoingS(num_vertices(g)); + IncomingMap outgoing(outgoingS.begin(), vertex_index); + + outgoing.set_reduce(append_reducer()); +#else + // Synchronize with all of the other processes. + synchronize(); +#endif + + // Find the next bucket that has something in it. + while (current_bucket < buckets.size() + && (!buckets[current_bucket] || buckets[current_bucket]->empty())) + ++current_bucket; + if (current_bucket >= buckets.size()) + current_bucket = max_bucket; + + // Find the smallest bucket (over all processes) that has vertices + // that need to be processed. + using boost::parallel::all_reduce; + using boost::parallel::minimum; + current_bucket = all_reduce(pg, current_bucket, minimum()); + + if (current_bucket == max_bucket) + // There are no non-empty buckets in any process; exit. + break; + + // Contains the set of vertices that have been deleted in the + // relaxation of "light" edges. Note that we keep track of which + // vertices were deleted with the property map + // "vertex_was_deleted". + std::vector deleted_vertices; + + // Repeatedly relax light edges + bool nonempty_bucket; + do { + // Someone has work to do in this bucket. + + if (current_bucket < buckets.size() && buckets[current_bucket]) { + Bucket& bucket = *buckets[current_bucket]; + // For each element in the bucket + while (!bucket.empty()) { + Vertex u = bucket.front(); + + // Remove u from the front of the bucket + bucket.pop_front(); + + // Insert u into the set of deleted vertices, if it hasn't + // been done already. + if (!vertex_was_deleted[get(local, u)]) { + vertex_was_deleted[get(local, u)] = true; + deleted_vertices.push_back(u); + } + + // Relax each light edge. + Dist u_dist = get(distance, u); + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + if (get(weight, e) <= delta) // light edge + relax(u, target(e, g), u_dist + get(weight, e)); + } + } + + // Synchronize with all of the other processes. + synchronize(); + + // Is the bucket empty now? + nonempty_bucket = (current_bucket < buckets.size() + && buckets[current_bucket] + && !buckets[current_bucket]->empty()); + } while (all_reduce(pg, nonempty_bucket, std::logical_or())); + + // Relax heavy edges for each of the vertices that we previously + // deleted. + for (typename std::vector::iterator iter = deleted_vertices.begin(); + iter != deleted_vertices.end(); ++iter) { + // Relax each heavy edge. + Vertex u = *iter; + Dist u_dist = get(distance, u); + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + if (get(weight, e) > delta) // heavy edge + relax(u, target(e, g), u_dist + get(weight, e)); + +#ifdef COMPUTE_PATH_COUNTS_INLINE + // Set outgoing paths + IncomingType in = get(incoming, u); + for (typename IncomingType::iterator pred = in.begin(); pred != in.end(); ++pred) + if (get(owner, *pred) == id) { + IncomingType x = get(outgoing, *pred); + if (std::find(x.begin(), x.end(), u) == x.end()) + x.push_back(u); + put(outgoing, *pred, x); + } else { + IncomingType in; + in.push_back(u); + put(outgoing, *pred, in); + } + + // Set incoming edge counts + put(incoming_edge_count, u, in.size()); +#endif + } + +#ifdef COMPUTE_PATH_COUNTS_INLINE + synchronize(); // Deliver heavy edge relaxations and outgoing paths + + // Build Queue + typedef typename property_traits::value_type PathCountType; + typedef std::pair queue_value_type; + typedef typename property_map::const_type OwnerMap; + typedef typename get_owner_of_first_pair_element IndirectOwnerMap; + + typedef boost::queue local_queue_type; + typedef boost::graph::distributed::distributed_queue dist_queue_type; + + IndirectOwnerMap indirect_owner(owner); + dist_queue_type Q(pg, indirect_owner); + + // Find sources to initialize queue + BGL_FORALL_VERTICES_T(v, g, Graph) { + if (get(is_settled, v) && !(get(outgoing, v).empty())) { + put(incoming_edge_count, v, 1); + Q.push(std::make_pair(v, 0)); // Push this vertex with no additional path count + } + } + + // Set path counts for vertices in this bucket + while (!Q.empty()) { + queue_value_type t = Q.top(); Q.pop(); + Vertex v = t.first; + PathCountType p = t.second; + + put(path_count, v, get(path_count, v) + p); + put(incoming_edge_count, v, get(incoming_edge_count, v) - 1); + + if (get(incoming_edge_count, v) == 0) { + IncomingType out = get(outgoing, v); + for (typename IncomingType::iterator iter = out.begin(); iter != out.end(); ++iter) + Q.push(std::make_pair(*iter, get(path_count, v))); + } + } + + // Mark the vertices in this bucket settled + for (typename std::vector::iterator iter = deleted_vertices.begin(); + iter != deleted_vertices.end(); ++iter) + put(is_settled, *iter, true); + + // No need to clear path count map as it is never read/written remotely + // No need to clear outgoing map as it is re-alloced every bucket +#endif + + // Go to the next bucket: the current bucket must already be empty. + ++current_bucket; + } while (true); + + // Delete all of the buckets. + for (typename std::vector::iterator iter = buckets.begin(); + iter != buckets.end(); ++iter) { + if (*iter) { + delete *iter; + *iter = 0; + } + } + } + + template + void + betweenness_centrality_delta_stepping_impl< + Graph, DistanceMap, IncomingMap, EdgeWeightMap, PathCountMap +#ifdef COMPUTE_PATH_COUNTS_INLINE + , IsSettledMap, VertexIndexMap +#endif + >:: + relax(Vertex u, Vertex v, Dist x) + { + + if (x <= get(distance, v)) { + + // We're relaxing the edge to vertex v. + if (get(owner, v) == process_id(pg)) { + if (x < get(distance, v)) { + // Compute the new bucket index for v + BucketIndex new_index = static_cast(x / delta); + + // Make sure there is enough room in the buckets data structure. + if (new_index >= buckets.size()) buckets.resize(new_index + 1, 0); + + // Make sure that we have allocated the bucket itself. + if (!buckets[new_index]) buckets[new_index] = new Bucket; + + if (get(distance, v) != (std::numeric_limits::max)() + && !vertex_was_deleted[get(local, v)]) { + // We're moving v from an old bucket into a new one. Compute + // the old index, then splice it in. + BucketIndex old_index + = static_cast(get(distance, v) / delta); + buckets[new_index]->splice(buckets[new_index]->end(), + *buckets[old_index], + position_in_bucket[get(local, v)]); + } else { + // We're inserting v into a bucket for the first time. Put it + // at the end. + buckets[new_index]->push_back(v); + } + + // v is now at the last position in the new bucket + position_in_bucket[get(local, v)] = buckets[new_index]->end(); + --position_in_bucket[get(local, v)]; + + // Update tentative distance information and incoming, path_count + if (u != v) put(incoming, v, IncomingType(1, u)); + put(distance, v, x); + } // u != v covers initial source relaxation and self-loops + else if (x == get(distance, v) && u != v) { + + // Add incoming edge if it's not already in the list + IncomingType in = get(incoming, v); + if (std::find(in.begin(), in.end(), u) == in.end()) { + in.push_back(u); + put(incoming, v, in); + } + } + } else { + // The vertex is remote: send a request to the vertex's owner + send(pg, get(owner, v), msg_relax, + std::make_pair(v, MessageValue::create(x, u))); + + // Cache tentative distance information + cache(distance, v, x); + } + } + } + + /************************************************************************/ + /* Shortest Paths function object for betweenness centrality */ + /************************************************************************/ + + template + struct brandes_shortest_paths { + typedef typename property_traits::value_type weight_type; + + brandes_shortest_paths() + : weight(1), delta(0) { } + brandes_shortest_paths(weight_type delta) + : weight(1), delta(delta) { } + brandes_shortest_paths(WeightMap w) + : weight(w), delta(0) { } + brandes_shortest_paths(WeightMap w, weight_type delta) + : weight(w), delta(delta) { } + + template + void + operator()(Graph& g, + typename graph_traits::vertex_descriptor s, + IncomingMap incoming, + DistanceMap distance, + PathCountMap path_count +#ifdef COMPUTE_PATH_COUNTS_INLINE + , IsSettledMap is_settled, + VertexIndexMap vertex_index +#endif + ) + { + typedef typename property_traits::value_type + distance_type; + + typedef std::plus Combine; + typedef std::less Compare; + + // The "distance" map needs to act like one, retrieving the default + // value of infinity. + set_property_map_role(vertex_distance, distance); + + // Only calculate delta the first time operator() is called + // This presumes g is the same every time, but so does the fact + // that we're reusing the weight map + if (delta == 0) + set_delta(g); + + // TODO (NGE): Restructure the code so we don't have to construct + // impl every time? + betweenness_centrality_delta_stepping_impl< + Graph, DistanceMap, IncomingMap, WeightMap, PathCountMap +#ifdef COMPUTE_PATH_COUNTS_INLINE + , IsSettledMap, VertexIndexMap +#endif + > + impl(g, distance, incoming, weight, path_count, +#ifdef COMPUTE_PATH_COUNTS_INLINE + is_settled, vertex_index, +#endif + delta); + + impl.run(s); + } + + private: + + template + void + set_delta(const Graph& g) + { + using boost::parallel::all_reduce; + using boost::parallel::maximum; + using std::max; + + typedef typename graph_traits::degree_size_type Degree; + typedef weight_type Dist; + + // Compute the maximum edge weight and degree + Dist max_edge_weight = 0; + Degree max_degree = 0; + BGL_FORALL_VERTICES_T(u, g, Graph) { + max_degree = max BOOST_PREVENT_MACRO_SUBSTITUTION (max_degree, out_degree(u, g)); + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + max_edge_weight = max BOOST_PREVENT_MACRO_SUBSTITUTION (max_edge_weight, get(weight, e)); + } + + max_edge_weight = all_reduce(process_group(g), max_edge_weight, maximum()); + max_degree = all_reduce(process_group(g), max_degree, maximum()); + + // Take a guess at delta, based on what works well for random + // graphs. + delta = max_edge_weight / max_degree; + if (delta == 0) + delta = 1; + } + + WeightMap weight; + weight_type delta; + }; + + // Perform a single SSSP from the specified vertex and update the centrality map(s) + template + void + do_brandes_sssp(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, + DistanceMap distance, + DependencyMap dependency, + PathCountMap path_count, +#ifdef COMPUTE_PATH_COUNTS_INLINE + IsSettledMap is_settled, +#endif + VertexIndexMap vertex_index, + ShortestPaths shortest_paths, + typename graph_traits::vertex_descriptor s) + { + using boost::detail::graph::update_centrality; + using boost::graph::parallel::process_group; + + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::edges_size_type edges_size_type; + + typedef typename property_traits::value_type incoming_type; + typedef typename property_traits::value_type distance_type; + typedef typename property_traits::value_type dependency_type; + typedef typename property_traits::value_type path_count_type; + + typedef typename incoming_type::iterator incoming_iterator; + + typedef typename property_map::const_type OwnerMap; + OwnerMap owner = get(vertex_owner, g); + + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + process_group_type pg = process_group(g); + typename process_group_type::process_id_type id = process_id(pg); + + // TODO: Is it faster not to clear some of these maps? + // Initialize for this iteration + distance.clear(); + incoming.clear(); + path_count.clear(); + dependency.clear(); + BGL_FORALL_VERTICES_T(v, g, Graph) { + put(path_count, v, 0); + put(dependency, v, 0); + } + + if (get(owner, s) == id) { + put(incoming, s, incoming_type()); +#ifdef COMPUTE_PATH_COUNTS_INLINE + put(path_count, s, 1); + put(is_settled, s, true); +#endif + } + + // Execute the shortest paths algorithm. This will be either + // a weighted or unweighted customized breadth-first search, + shortest_paths(g, s, incoming, distance, path_count +#ifdef COMPUTE_PATH_COUNTS_INLINE + , is_settled, vertex_index +#endif + ); + +#ifndef COMPUTE_PATH_COUNTS_INLINE + + // + // TODO: Optimize case where source has no out-edges + // + + // Count of incoming edges to tell when all incoming edges have been relaxed in + // the induced shortest paths DAG + std::vector incoming_edge_countS(num_vertices(g)); + iterator_property_map::iterator, VertexIndexMap> + incoming_edge_count(incoming_edge_countS.begin(), vertex_index); + + BGL_FORALL_VERTICES_T(v, g, Graph) { + put(incoming_edge_count, v, get(incoming, v).size()); + } + + if (get(owner, s) == id) { + put(incoming_edge_count, s, 1); + put(incoming, s, incoming_type()); + } + + std::vector outgoingS(num_vertices(g)); + iterator_property_map::iterator, VertexIndexMap> + outgoing(outgoingS.begin(), vertex_index); + + outgoing.set_reduce(append_reducer()); + + // Mark forward adjacencies in DAG of shortest paths + + // TODO: It's possible to do this using edge flags but it's not currently done this way + // because during traversal of the DAG we would have to examine all out edges + // which would lead to more memory accesses and a larger cache footprint. + // + // In the bidirectional graph case edge flags would be an excellent way of marking + // edges in the DAG of shortest paths + BGL_FORALL_VERTICES_T(v, g, Graph) { + incoming_type i = get(incoming, v); + for (typename incoming_type::iterator iter = i.begin(); iter != i.end(); ++iter) { + if (get(owner, *iter) == id) { + incoming_type x = get(outgoing, *iter); + if (std::find(x.begin(), x.end(), v) == x.end()) + x.push_back(v); + put(outgoing, *iter, x); + } else { + incoming_type in; + in.push_back(v); + put(outgoing, *iter, in); + } + } + } + + synchronize(pg); + + // Traverse DAG induced by forward edges in dependency order and compute path counts + { + typedef std::pair queue_value_type; + typedef get_owner_of_first_pair_element IndirectOwnerMap; + + typedef boost::queue local_queue_type; + typedef boost::graph::distributed::distributed_queue dist_queue_type; + + IndirectOwnerMap indirect_owner(owner); + dist_queue_type Q(pg, indirect_owner); + + if (get(owner, s) == id) + Q.push(std::make_pair(s, 1)); + + while (!Q.empty()) { + queue_value_type t = Q.top(); Q.pop(); + vertex_descriptor v = t.first; + path_count_type p = t.second; + + put(path_count, v, get(path_count, v) + p); + put(incoming_edge_count, v, get(incoming_edge_count, v) - 1); + + if (get(incoming_edge_count, v) == 0) { + incoming_type out = get(outgoing, v); + for (typename incoming_type::iterator iter = out.begin(); iter != out.end(); ++iter) + Q.push(std::make_pair(*iter, get(path_count, v))); + } + } + } + +#endif // COMPUTE_PATH_COUNTS_INLINE + + // + // Compute dependencies + // + + + // Build the distributed_queue + // Value type consists of 1) target of update 2) source of update + // 3) dependency of source 4) path count of source + typedef boost::tuple + queue_value_type; + typedef get_owner_of_first_tuple_element IndirectOwnerMap; + + typedef boost::queue local_queue_type; + typedef boost::graph::distributed::distributed_queue dist_queue_type; + + IndirectOwnerMap indirect_owner(owner); + dist_queue_type Q(pg, indirect_owner); + + // Calculate number of vertices each vertex depends on, when a vertex has been pushed + // that number of times then we will update it + // AND Request path counts of sources of incoming edges + std::vector dependency_countS(num_vertices(g), 0); + iterator_property_map::iterator, VertexIndexMap> + dependency_count(dependency_countS.begin(), vertex_index); + + dependency_count.set_reduce(boost::graph::distributed::additive_reducer()); + + path_count.set_max_ghost_cells(0); + + BGL_FORALL_VERTICES_T(v, g, Graph) { + if (get(distance, v) < (std::numeric_limits::max)()) { + incoming_type el = get(incoming, v); + for (incoming_iterator vw = el.begin(); vw != el.end(); ++vw) { + if (get(owner, *vw) == id) + put(dependency_count, *vw, get(dependency_count, *vw) + 1); + else { + put(dependency_count, *vw, 1); + + // Request path counts + get(path_count, *vw); + } + + // request() doesn't work here, perhaps because we don't have a copy of this + // ghost cell already? + } + } + } + + synchronize(pg); + + // Push vertices with non-zero distance/path count and zero dependency count + BGL_FORALL_VERTICES_T(v, g, Graph) { + if (get(distance, v) < (std::numeric_limits::max)() + && get(dependency_count, v) == 0) + Q.push(boost::make_tuple(v, v, get(dependency, v), get(path_count, v))); + } + + dependency.set_max_ghost_cells(0); + while(!Q.empty()) { + + queue_value_type x = Q.top(); Q.pop(); + vertex_descriptor w = boost::tuples::get<0>(x); + vertex_descriptor source = boost::tuples::get<1>(x); + dependency_type dep = boost::tuples::get<2>(x); + path_count_type pc = boost::tuples::get<3>(x); + + cache(dependency, source, dep); + cache(path_count, source, pc); + + if (get(dependency_count, w) != 0) + put(dependency_count, w, get(dependency_count, w) - 1); + + if (get(dependency_count, w) == 0) { + + // Update dependency and centrality of sources of incoming edges + incoming_type el = get(incoming, w); + for (incoming_iterator vw = el.begin(); vw != el.end(); ++vw) { + vertex_descriptor v = *vw; + + assert(get(path_count, w) != 0); + + dependency_type factor = dependency_type(get(path_count, v)) + / dependency_type(get(path_count, w)); + factor *= (dependency_type(1) + get(dependency, w)); + + if (get(owner, v) == id) + put(dependency, v, get(dependency, v) + factor); + else + put(dependency, v, factor); + + update_centrality(edge_centrality_map, v, factor); + } + + if (w != s) + update_centrality(centrality, w, get(dependency, w)); + + // Push sources of edges in incoming edge list + for (incoming_iterator vw = el.begin(); vw != el.end(); ++vw) + Q.push(boost::make_tuple(*vw, w, get(dependency, w), get(path_count, w))); + } + } + } + + template + void + brandes_betweenness_centrality_impl(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, + DistanceMap distance, + DependencyMap dependency, + PathCountMap path_count, + VertexIndexMap vertex_index, + ShortestPaths shortest_paths, + Buffer sources) + { + using boost::detail::graph::init_centrality_map; + using boost::detail::graph::divide_centrality_by_two; + using boost::graph::parallel::process_group; + + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::edge_iterator edge_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertices_size_type vertices_size_type; + + typedef typename property_traits::value_type distance_type; + typedef typename property_traits::value_type dependency_type; + + // Initialize centrality + init_centrality_map(vertices(g), centrality); + init_centrality_map(edges(g), edge_centrality_map); + + // Set the reduction operation on the dependency map to be addition + dependency.set_reduce(boost::graph::distributed::additive_reducer()); + distance.set_reduce(boost::graph::distributed::choose_min_reducer()); + + // Don't allow remote procs to write incoming or path_count maps + // updating them is handled inside the betweenness_centrality_queue + incoming.set_consistency_model(0); + path_count.set_consistency_model(0); + + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + process_group_type pg = process_group(g); + +#ifdef COMPUTE_PATH_COUNTS_INLINE + // Build is_settled maps + std::vector is_settledS(num_vertices(g)); + typedef iterator_property_map::iterator, VertexIndexMap> + IsSettledMap; + + IsSettledMap is_settled(is_settledS.begin(), vertex_index); +#endif + + if (!sources.empty()) { + // DO SSSPs + while (!sources.empty()) { + do_brandes_sssp(g, centrality, edge_centrality_map, incoming, distance, + dependency, path_count, +#ifdef COMPUTE_PATH_COUNTS_INLINE + is_settled, +#endif + vertex_index, shortest_paths, sources.top()); + sources.pop(); + } + } else { // Exact Betweenness Centrality + typedef typename graph_traits::vertices_size_type vertices_size_type; + vertices_size_type n = num_vertices(g); + n = boost::parallel::all_reduce(pg, n, std::plus()); + + for (vertices_size_type i = 0; i < n; ++i) { + vertex_descriptor v = vertex(i, g); + + do_brandes_sssp(g, centrality, edge_centrality_map, incoming, distance, + dependency, path_count, +#ifdef COMPUTE_PATH_COUNTS_INLINE + is_settled, +#endif + vertex_index, shortest_paths, v); + } + } + + typedef typename graph_traits::directed_category directed_category; + const bool is_undirected = + is_convertible::value; + if (is_undirected) { + divide_centrality_by_two(vertices(g), centrality); + divide_centrality_by_two(edges(g), edge_centrality_map); + } + } + + template + void + do_sequential_brandes_sssp(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, + DistanceMap distance, + DependencyMap dependency, + PathCountMap path_count, + VertexIndexMap vertex_index, + ShortestPaths shortest_paths, + Stack& ordered_vertices, + typename graph_traits::vertex_descriptor v) + { + using boost::detail::graph::update_centrality; + + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + typedef typename property_traits::value_type incoming_type; + + // Initialize for this iteration + BGL_FORALL_VERTICES_T(w, g, Graph) { + // put(path_count, w, 0); + incoming[w].clear(); + put(dependency, w, 0); + } + + put(path_count, v, 1); + incoming[v].clear(); + + // Execute the shortest paths algorithm. This will be either + // Dijkstra's algorithm or a customized breadth-first search, + // depending on whether the graph is weighted or unweighted. + shortest_paths(g, v, ordered_vertices, incoming, distance, + path_count, vertex_index); + + while (!ordered_vertices.empty()) { + vertex_descriptor w = ordered_vertices.top(); + ordered_vertices.pop(); + + typedef typename property_traits::value_type + incoming_type; + typedef typename incoming_type::iterator incoming_iterator; + typedef typename property_traits::value_type + dependency_type; + + for (incoming_iterator vw = incoming[w].begin(); + vw != incoming[w].end(); ++vw) { + vertex_descriptor v = source(*vw, g); + dependency_type factor = dependency_type(get(path_count, v)) + / dependency_type(get(path_count, w)); + factor *= (dependency_type(1) + get(dependency, w)); + put(dependency, v, get(dependency, v) + factor); + update_centrality(edge_centrality_map, *vw, factor); + } + + if (w != v) { + update_centrality(centrality, w, get(dependency, w)); + } + } + } + + // Betweenness Centrality variant that duplicates graph across processors + // and parallizes SSSPs + // This function expects a non-distributed graph and property-maps + template + void + non_distributed_brandes_betweenness_centrality_impl(const ProcessGroup& pg, + const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, // P + DistanceMap distance, // d + DependencyMap dependency, // delta + PathCountMap path_count, // sigma + VertexIndexMap vertex_index, + ShortestPaths shortest_paths, + Buffer sources) + { + using boost::detail::graph::init_centrality_map; + using boost::detail::graph::divide_centrality_by_two; + using boost::graph::parallel::process_group; + + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::edge_iterator edge_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertices_size_type vertices_size_type; + + typedef typename property_traits::value_type distance_type; + + typedef ProcessGroup process_group_type; + + typename process_group_type::process_id_type id = process_id(pg); + typename process_group_type::process_size_type p = num_processes(pg); + + // Initialize centrality + init_centrality_map(vertices(g), centrality); + init_centrality_map(edges(g), edge_centrality_map); + + std::stack ordered_vertices; + + if (!sources.empty()) { + std::vector local_sources; + + for (int i = 0; i < id; ++i) if (!sources.empty()) sources.pop(); + while (!sources.empty()) { + local_sources.push_back(sources.top()); + + for (int i = 0; i < p; ++i) if (!sources.empty()) sources.pop(); + } + + // DO SSSPs + for(size_t i = 0; i < local_sources.size(); ++i) + do_sequential_brandes_sssp(g, centrality, edge_centrality_map, incoming, + distance, dependency, path_count, vertex_index, + shortest_paths, ordered_vertices, local_sources[i]); + + } else { // Exact Betweenness Centrality + typedef typename graph_traits::vertices_size_type vertices_size_type; + vertices_size_type n = num_vertices(g); + + for (vertices_size_type i = id; i < n; i += p) { + vertex_descriptor v = vertex(i, g); + + do_sequential_brandes_sssp(g, centrality, edge_centrality_map, incoming, + distance, dependency, path_count, vertex_index, + shortest_paths, ordered_vertices, v); + } + } + + typedef typename graph_traits::directed_category directed_category; + const bool is_undirected = + is_convertible::value; + if (is_undirected) { + divide_centrality_by_two(vertices(g), centrality); + divide_centrality_by_two(edges(g), edge_centrality_map); + } + + // Merge the centrality maps by summing the values at each vertex) + // TODO(nge): this copy-out, reduce, copy-in is lame + typedef typename property_traits::value_type centrality_type; + typedef typename property_traits::value_type edge_centrality_type; + + std::vector centrality_v(num_vertices(g)); + std::vector edge_centrality_v; + edge_centrality_v.reserve(num_edges(g)); + + BGL_FORALL_VERTICES_T(v, g, Graph) { + centrality_v[get(vertex_index, v)] = get(centrality, v); + } + + // Skip when EdgeCentralityMap is a dummy_property_map + if (!is_same::value) { + BGL_FORALL_EDGES_T(e, g, Graph) { + edge_centrality_v.push_back(get(edge_centrality_map, e)); + } + // NGE: If we trust that the order of elements in the vector isn't changed in the + // all_reduce below then this method avoids the need for an edge index map + } + + using boost::parallel::all_reduce; + + all_reduce(pg, ¢rality_v[0], ¢rality_v[centrality_v.size()], + ¢rality_v[0], std::plus()); + + if (edge_centrality_v.size()) + all_reduce(pg, &edge_centrality_v[0], &edge_centrality_v[edge_centrality_v.size()], + &edge_centrality_v[0], std::plus()); + + BGL_FORALL_VERTICES_T(v, g, Graph) { + put(centrality, v, centrality_v[get(vertex_index, v)]); + } + + // Skip when EdgeCentralityMap is a dummy_property_map + if (!is_same::value) { + int i = 0; + BGL_FORALL_EDGES_T(e, g, Graph) { + put(edge_centrality_map, e, edge_centrality_v[i]); + ++i; + } + } + } + +} } } // end namespace graph::parallel::detail + +template +void +brandes_betweenness_centrality(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, + DistanceMap distance, + DependencyMap dependency, + PathCountMap path_count, + VertexIndexMap vertex_index, + Buffer sources, + typename property_traits::value_type delta + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + typedef typename property_traits::value_type distance_type; + typedef static_property_map WeightMap; + + graph::parallel::detail::brandes_shortest_paths + shortest_paths(delta); + + graph::parallel::detail::brandes_betweenness_centrality_impl(g, centrality, + edge_centrality_map, + incoming, distance, + dependency, path_count, + vertex_index, + shortest_paths, + sources); +} + +template +void +brandes_betweenness_centrality(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, + DistanceMap distance, + DependencyMap dependency, + PathCountMap path_count, + VertexIndexMap vertex_index, + Buffer sources, + typename property_traits::value_type delta, + WeightMap weight_map + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + graph::parallel::detail::brandes_shortest_paths shortest_paths(weight_map, delta); + + graph::parallel::detail::brandes_betweenness_centrality_impl(g, centrality, + edge_centrality_map, + incoming, distance, + dependency, path_count, + vertex_index, + shortest_paths, + sources); +} + +namespace graph { namespace parallel { namespace detail { + template + void + brandes_betweenness_centrality_dispatch2(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + WeightMap weight_map, + VertexIndexMap vertex_index, + Buffer sources, + typename property_traits::value_type delta) + { + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename mpl::if_c<(is_same::value), + EdgeCentralityMap, + CentralityMap>::type a_centrality_map; + typedef typename property_traits::value_type + centrality_type; + + typename graph_traits::vertices_size_type V = num_vertices(g); + + std::vector > incoming(V); + std::vector distance(V); + std::vector dependency(V); + std::vector path_count(V); + + brandes_betweenness_centrality( + g, centrality, edge_centrality_map, + make_iterator_property_map(incoming.begin(), vertex_index), + make_iterator_property_map(distance.begin(), vertex_index), + make_iterator_property_map(dependency.begin(), vertex_index), + make_iterator_property_map(path_count.begin(), vertex_index), + vertex_index, unwrap_ref(sources), delta, + weight_map); + } + + // TODO: Should the type of the distance and dependency map depend on the + // value type of the centrality map? + template + void + brandes_betweenness_centrality_dispatch2(const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + VertexIndexMap vertex_index, + Buffer sources, + typename graph_traits::edges_size_type delta) + { + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename mpl::if_c<(is_same::value), + EdgeCentralityMap, + CentralityMap>::type a_centrality_map; + + typename graph_traits::vertices_size_type V = num_vertices(g); + + std::vector > incoming(V); + std::vector distance(V); + std::vector dependency(V); + std::vector path_count(V); + + brandes_betweenness_centrality( + g, centrality, edge_centrality_map, + make_iterator_property_map(incoming.begin(), vertex_index), + make_iterator_property_map(distance.begin(), vertex_index), + make_iterator_property_map(dependency.begin(), vertex_index), + make_iterator_property_map(path_count.begin(), vertex_index), + vertex_index, unwrap_ref(sources), delta); + } + + template + struct brandes_betweenness_centrality_dispatch1 + { + template + static void + run(const Graph& g, CentralityMap centrality, EdgeCentralityMap edge_centrality_map, + VertexIndexMap vertex_index, Buffer sources, + typename property_traits::value_type delta, WeightMap weight_map) + { + boost::graph::parallel::detail::brandes_betweenness_centrality_dispatch2( + g, centrality, edge_centrality_map, weight_map, vertex_index, sources, delta); + } + }; + + template<> + struct brandes_betweenness_centrality_dispatch1 + { + template + static void + run(const Graph& g, CentralityMap centrality, EdgeCentralityMap edge_centrality_map, + VertexIndexMap vertex_index, Buffer sources, + typename graph_traits::edges_size_type delta, + boost::detail::error_property_not_found) + { + boost::graph::parallel::detail::brandes_betweenness_centrality_dispatch2( + g, centrality, edge_centrality_map, vertex_index, sources, delta); + } + }; + +} } } // end namespace graph::parallel::detail + +template +void +brandes_betweenness_centrality(const Graph& g, + const bgl_named_params& params + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + typedef bgl_named_params named_params; + + typedef queue::vertex_descriptor> queue_t; + queue_t q; + + typedef typename property_value::type ew; + graph::parallel::detail::brandes_betweenness_centrality_dispatch1::run( + g, + choose_param(get_param(params, vertex_centrality), + dummy_property_map()), + choose_param(get_param(params, edge_centrality), + dummy_property_map()), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + choose_param(get_param(params, buffer_param_t()), boost::ref(q)), + choose_param(get_param(params, lookahead_t()), 0), + get_param(params, edge_weight)); +} + +template +void +brandes_betweenness_centrality(const Graph& g, CentralityMap centrality + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + typedef queue::vertex_descriptor> queue_t; + queue_t q; + + boost::graph::parallel::detail::brandes_betweenness_centrality_dispatch2( + g, centrality, dummy_property_map(), get(vertex_index, g), boost::ref(q), 0); +} + +template +void +brandes_betweenness_centrality(const Graph& g, CentralityMap centrality, + EdgeCentralityMap edge_centrality_map + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + typedef queue queue_t; + queue_t q; + + boost::graph::parallel::detail::brandes_betweenness_centrality_dispatch2( + g, centrality, edge_centrality_map, get(vertex_index, g), boost::ref(q), 0); +} + +template +void +non_distributed_brandes_betweenness_centrality(const ProcessGroup& pg, + const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, + DistanceMap distance, + DependencyMap dependency, + PathCountMap path_count, + VertexIndexMap vertex_index, + Buffer sources) +{ + typedef typename property_traits::value_type distance_type; + typedef static_property_map WeightMap; + + detail::graph::brandes_unweighted_shortest_paths shortest_paths; + + graph::parallel::detail::non_distributed_brandes_betweenness_centrality_impl(pg, g, centrality, + edge_centrality_map, + incoming, distance, + dependency, path_count, + vertex_index, + shortest_paths, + sources); +} + +template +void +non_distributed_brandes_betweenness_centrality(const ProcessGroup& pg, + const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + IncomingMap incoming, + DistanceMap distance, + DependencyMap dependency, + PathCountMap path_count, + VertexIndexMap vertex_index, + WeightMap weight_map, + Buffer sources) +{ + detail::graph::brandes_dijkstra_shortest_paths shortest_paths(weight_map); + + graph::parallel::detail::non_distributed_brandes_betweenness_centrality_impl(pg, g, centrality, + edge_centrality_map, + incoming, distance, + dependency, path_count, + vertex_index, + shortest_paths, + sources); +} + +namespace detail { namespace graph { + template + void + non_distributed_brandes_betweenness_centrality_dispatch2(const ProcessGroup& pg, + const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + WeightMap weight_map, + VertexIndexMap vertex_index, + Buffer sources) + { + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename mpl::if_c<(is_same::value), + EdgeCentralityMap, + CentralityMap>::type a_centrality_map; + typedef typename property_traits::value_type + centrality_type; + + typename graph_traits::vertices_size_type V = num_vertices(g); + + std::vector > incoming(V); + std::vector distance(V); + std::vector dependency(V); + std::vector path_count(V); + + non_distributed_brandes_betweenness_centrality( + pg, g, centrality, edge_centrality_map, + make_iterator_property_map(incoming.begin(), vertex_index), + make_iterator_property_map(distance.begin(), vertex_index), + make_iterator_property_map(dependency.begin(), vertex_index), + make_iterator_property_map(path_count.begin(), vertex_index), + vertex_index, weight_map, unwrap_ref(sources)); + } + + + template + void + non_distributed_brandes_betweenness_centrality_dispatch2(const ProcessGroup& pg, + const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + VertexIndexMap vertex_index, + Buffer sources) + { + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename mpl::if_c<(is_same::value), + EdgeCentralityMap, + CentralityMap>::type a_centrality_map; + typedef typename property_traits::value_type + centrality_type; + + typename graph_traits::vertices_size_type V = num_vertices(g); + + std::vector > incoming(V); + std::vector distance(V); + std::vector dependency(V); + std::vector path_count(V); + + non_distributed_brandes_betweenness_centrality( + pg, g, centrality, edge_centrality_map, + make_iterator_property_map(incoming.begin(), vertex_index), + make_iterator_property_map(distance.begin(), vertex_index), + make_iterator_property_map(dependency.begin(), vertex_index), + make_iterator_property_map(path_count.begin(), vertex_index), + vertex_index, unwrap_ref(sources)); + } + + template + struct non_distributed_brandes_betweenness_centrality_dispatch1 + { + template + static void + run(const ProcessGroup& pg, const Graph& g, CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, VertexIndexMap vertex_index, + Buffer sources, WeightMap weight_map) + { + non_distributed_brandes_betweenness_centrality_dispatch2(pg, g, centrality, edge_centrality_map, + weight_map, vertex_index, sources); + } + }; + + template<> + struct non_distributed_brandes_betweenness_centrality_dispatch1 + { + template + static void + run(const ProcessGroup& pg, const Graph& g, CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, VertexIndexMap vertex_index, + Buffer sources, detail::error_property_not_found) + { + non_distributed_brandes_betweenness_centrality_dispatch2(pg, g, centrality, edge_centrality_map, + vertex_index, sources); + } + }; + +} } // end namespace detail::graph + +template +void +non_distributed_brandes_betweenness_centrality(const ProcessGroup& pg, const Graph& g, + const bgl_named_params& params) +{ + typedef bgl_named_params named_params; + + typedef queue queue_t; + queue_t q; + + typedef typename property_value::type ew; + detail::graph::non_distributed_brandes_betweenness_centrality_dispatch1::run( + pg, g, + choose_param(get_param(params, vertex_centrality), + dummy_property_map()), + choose_param(get_param(params, edge_centrality), + dummy_property_map()), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + choose_param(get_param(params, buffer_param_t()), boost::ref(q)), + get_param(params, edge_weight)); +} + +template +void +non_distributed_brandes_betweenness_centrality(const ProcessGroup& pg, const Graph& g, + CentralityMap centrality) +{ + typedef queue queue_t; + queue_t q; + + detail::graph::non_distributed_brandes_betweenness_centrality_dispatch2( + pg, g, centrality, dummy_property_map(), get(vertex_index, g), boost::ref(q)); +} + +template +void +non_distributed_brandes_betweenness_centrality(const ProcessGroup& pg, const Graph& g, + CentralityMap centrality, Buffer sources) +{ + detail::graph::non_distributed_brandes_betweenness_centrality_dispatch2( + pg, g, centrality, dummy_property_map(), get(vertex_index, g), sources); +} + +template +void +non_distributed_brandes_betweenness_centrality(const ProcessGroup& pg, const Graph& g, + CentralityMap centrality, + EdgeCentralityMap edge_centrality_map, + Buffer sources) +{ + detail::graph::non_distributed_brandes_betweenness_centrality_dispatch2( + pg, g, centrality, edge_centrality_map, get(vertex_index, g), sources); +} + +// Compute the central point dominance of a graph. +// TODO: Make sure central point dominance works in parallel case +template +typename property_traits::value_type +central_point_dominance(const Graph& g, CentralityMap centrality + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + using std::max; + + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename property_traits::value_type centrality_type; + typedef typename graph_traits::vertices_size_type vertices_size_type; + + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + process_group_type pg = boost::graph::parallel::process_group(g); + + vertices_size_type n = num_vertices(g); + + using boost::parallel::all_reduce; + n = all_reduce(pg, n, std::plus()); + + // Find max centrality + centrality_type max_centrality(0); + vertex_iterator v, v_end; + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) { + max_centrality = (max)(max_centrality, get(centrality, *v)); + } + + // All reduce to get global max centrality + max_centrality = all_reduce(pg, max_centrality, boost::parallel::maximum()); + + // Compute central point dominance + centrality_type sum(0); + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) { + sum += (max_centrality - get(centrality, *v)); + } + + sum = all_reduce(pg, sum, std::plus()); + + return sum/(n-1); +} + +} // end namespace boost + +#endif // BOOST_GRAPH_PARALLEL_BRANDES_BETWEENNESS_CENTRALITY_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/boman_et_al_graph_coloring.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/boman_et_al_graph_coloring.hpp new file mode 100644 index 0000000000..c65f80fa61 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/boman_et_al_graph_coloring.hpp @@ -0,0 +1,372 @@ +// Copyright (C) 2005-2008 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_BOMAN_ET_AL_GRAPH_COLORING_HPP +#define BOOST_GRAPH_DISTRIBUTED_BOMAN_ET_AL_GRAPH_COLORING_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef PBGL_ACCOUNTING +# include +#endif // PBGL_ACCOUNTING + +namespace boost { namespace graph { namespace distributed { + +/************************************************************************** + * This source file implements the distributed graph coloring algorithm * + * by Boman et al in: * + * * + * Erik G. Boman, Doruk Bozdag, Umit Catalyurek, Assefaw H. Gebremedhin,* + * and Fredrik Manne. A Scalable Parallel Graph Coloring Algorithm for * + * Distributed Memory Computers. [unpublished preprint?] * + * * + **************************************************************************/ + +#ifdef PBGL_ACCOUNTING +struct boman_et_al_graph_coloring_stats_t +{ + /* The size of the blocks to step through (i.e., the parameter s). */ + std::size_t block_size; + + /* Total wall-clock time used by the algorithm.*/ + accounting::time_type execution_time; + + /* The number of conflicts that occurred during execution. */ + std::size_t conflicts; + + /* The number of supersteps. */ + std::size_t supersteps; + + /* The number of colors used. */ + std::size_t num_colors; + + template + void print(OutputStream& out) + { + out << "Problem = \"Coloring\"\n" + << "Algorithm = \"Boman et al\"\n" + << "Function = boman_et_al_graph_coloring\n" + << "(P) Block size = " << block_size << "\n" + << "Wall clock time = " << accounting::print_time(execution_time) + << "\nConflicts = " << conflicts << "\n" + << "Supersteps = " << supersteps << "\n" + << "(R) Colors = " << num_colors << "\n"; + } +}; + +static boman_et_al_graph_coloring_stats_t boman_et_al_graph_coloring_stats; +#endif + +namespace detail { + template + struct graph_coloring_reduce + { + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + template + T operator()(const Key&) const { return (std::numeric_limits::max)(); } + + template T operator()(const Key&, T, T y) const { return y; } + }; +} + +template +struct first_fit_color +{ + template + Color operator()(const std::vector& marked, T marked_true) + { + Color k = 0; + while (k < (Color)marked.size() && marked[k] == marked_true) + ++k; + return k; + } +}; + +template +typename property_traits::value_type +boman_et_al_graph_coloring + (const DistributedGraph& g, + ColorMap color, + typename graph_traits::vertices_size_type s, + ChooseColor choose_color, + VertexOrdering ordering, VertexIndexMap vertex_index) +{ + using namespace boost::graph::parallel; + using boost::parallel::all_reduce; + + typename property_map::const_type + owner = get(vertex_owner, g); + + typedef typename process_group_type::type + process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + typedef typename graph_traits::vertices_size_type + vertices_size_type; + typedef typename property_traits::value_type color_type; + typedef unsigned long long iterations_type; + typedef typename std::vector::iterator vertex_set_iterator; + typedef std::pair message_type; + +#ifdef PBGL_ACCOUNTING + boman_et_al_graph_coloring_stats.block_size = s; + boman_et_al_graph_coloring_stats.execution_time = accounting::get_time(); + boman_et_al_graph_coloring_stats.conflicts = 0; + boman_et_al_graph_coloring_stats.supersteps = 0; +#endif + + // Initialize color map + color_type no_color = (std::numeric_limits::max)(); + BGL_FORALL_VERTICES_T(v, g, DistributedGraph) + put(color, v, no_color); + color.set_reduce(detail::graph_coloring_reduce()); + + // Determine if we'll be using synchronous or asynchronous communication. + typedef typename process_group_type::communication_category + communication_category; + static const bool asynchronous = + is_convertible::value; + process_group_type pg = process_group(g); + + // U_i <- V_i + std::vector vertices_to_color(vertices(g).first, vertices(g).second); + + iterations_type iter_num = 1, outer_iter_num = 1; + std::vector marked; + std::vector marked_conflicting(num_vertices(g), 0); + std::vector sent_to_processors; + + std::size_t rounds = vertices_to_color.size() / s + + (vertices_to_color.size() % s == 0? 0 : 1); + rounds = all_reduce(pg, rounds, boost::parallel::maximum()); + +#ifdef PBGL_GRAPH_COLORING_DEBUG + std::cerr << "Number of rounds = " << rounds << std::endl; +#endif + + while (rounds > 0) { + if (!vertices_to_color.empty()) { + // Set of conflicting vertices + std::vector conflicting_vertices; + + vertex_set_iterator first = vertices_to_color.begin(); + while (first != vertices_to_color.end()) { + // For each subset of size s (or smaller for the last subset) + vertex_set_iterator start = first; + for (vertices_size_type counter = s; + first != vertices_to_color.end() && counter > 0; + ++first, --counter) { + // This vertex hasn't been sent to anyone yet + sent_to_processors.assign(num_processes(pg), false); + sent_to_processors[process_id(pg)] = true; + + // Mark all of the colors that we see + BGL_FORALL_OUTEDGES_T(*first, e, g, DistributedGraph) { + color_type k = get(color, target(e, g)); + if (k != no_color) { + if (k >= (color_type)marked.size()) marked.resize(k + 1, 0); + marked[k] = iter_num; + } + } + + // Find a color for this vertex + put(color, *first, choose_color(marked, iter_num)); + +#ifdef PBGL_GRAPH_COLORING_DEBUG + std::cerr << "Chose color " << get(color, *first) << " for vertex " + << *first << std::endl; +#endif + + // Send this vertex's color to the owner of the edge target. + BGL_FORALL_OUTEDGES_T(*first, e, g, DistributedGraph) { + if (!sent_to_processors[get(owner, target(e, g))]) { + send(pg, get(owner, target(e, g)), 17, + message_type(source(e, g), get(color, source(e, g)))); + sent_to_processors[get(owner, target(e, g))] = true; + } + } + + ++iter_num; + } + + // Synchronize for non-immediate process groups. + if (!asynchronous) { + --rounds; + synchronize(pg); + } + + // Receive boundary colors from other processors + while (optional > stp = probe(pg)) { + assert(stp->second == 17); + message_type msg; + receive(pg, stp->first, stp->second, msg); + cache(color, msg.first, msg.second); +#ifdef PBGL_GRAPH_COLORING_DEBUG + std::cerr << "Cached color " << msg.second << " for vertex " + << msg.first << std::endl; +#endif + } + + // Compute the set of conflicting vertices + // [start, first) contains all vertices in this subset + for (vertex_set_iterator vi = start; vi != first; ++vi) { + Vertex v = *vi; + BGL_FORALL_OUTEDGES_T(v, e, g, DistributedGraph) { + Vertex w = target(e, g); + if (get(owner, w) != process_id(pg) // boundary vertex + && marked_conflicting[get(vertex_index, v)] != outer_iter_num + && get(color, v) == get(color, w) + && ordering(v, w)) { + conflicting_vertices.push_back(v); + marked_conflicting[get(vertex_index, v)] = outer_iter_num; + put(color, v, no_color); +#ifdef PBGL_GRAPH_COLORING_DEBUG + std::cerr << "Vertex " << v << " has a conflict with vertex " + << w << std::endl; +#endif + break; + } + } + } + +#ifdef PBGL_ACCOUNTING + boman_et_al_graph_coloring_stats.conflicts += + conflicting_vertices.size(); +#endif + } + + if (asynchronous) synchronize(pg); + else { + while (rounds > 0) { + synchronize(pg); + --rounds; + } + } + conflicting_vertices.swap(vertices_to_color); + ++outer_iter_num; + } else { + if (asynchronous) synchronize(pg); + else { + while (rounds > 0) { + synchronize(pg); + --rounds; + } + } + } + + // Receive boundary colors from other processors + while (optional > stp = probe(pg)) { + assert(stp->second == 17); + message_type msg; + receive(pg, stp->first, stp->second, msg); + cache(color, msg.first, msg.second); + } + + rounds = vertices_to_color.size() / s + + (vertices_to_color.size() % s == 0? 0 : 1); + rounds = all_reduce(pg, rounds, boost::parallel::maximum()); + +#ifdef PBGL_ACCOUNTING + ++boman_et_al_graph_coloring_stats.supersteps; +#endif + } + + // Determine the number of colors used. + color_type num_colors = 0; + BGL_FORALL_VERTICES_T(v, g, DistributedGraph) { + color_type k = get(color, v); + assert(k != no_color); + if (k != no_color) { + if (k >= (color_type)marked.size()) marked.resize(k + 1, 0); // TBD: perf? + if (marked[k] != iter_num) { + marked[k] = iter_num; + ++num_colors; + } + } + } + + num_colors = + all_reduce(pg, num_colors, boost::parallel::maximum()); + + +#ifdef PBGL_ACCOUNTING + boman_et_al_graph_coloring_stats.execution_time = + accounting::get_time() - boman_et_al_graph_coloring_stats.execution_time; + + boman_et_al_graph_coloring_stats.conflicts = + all_reduce(pg, boman_et_al_graph_coloring_stats.conflicts, + std::plus()); + boman_et_al_graph_coloring_stats.num_colors = num_colors; +#endif + + return num_colors; +} + + +template +inline typename property_traits::value_type +boman_et_al_graph_coloring + (const DistributedGraph& g, ColorMap color, + typename graph_traits::vertices_size_type s, + ChooseColor choose_color, VertexOrdering ordering) +{ + return boman_et_al_graph_coloring(g, color, s, choose_color, ordering, + get(vertex_index, g)); +} + +template +inline typename property_traits::value_type +boman_et_al_graph_coloring + (const DistributedGraph& g, + ColorMap color, + typename graph_traits::vertices_size_type s, + ChooseColor choose_color) +{ + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + return boman_et_al_graph_coloring(g, color, s, choose_color, + std::less()); +} + +template +inline typename property_traits::value_type +boman_et_al_graph_coloring + (const DistributedGraph& g, + ColorMap color, + typename graph_traits::vertices_size_type s = 100) +{ + typedef typename property_traits::value_type Color; + return boman_et_al_graph_coloring(g, color, s, first_fit_color()); +} + +} } } // end namespace boost::graph::distributed + +namespace boost { namespace graph { +using distributed::boman_et_al_graph_coloring; +} } // end namespace boost::graph + +#endif // BOOST_GRAPH_DISTRIBUTED_BOMAN_ET_AL_GRAPH_COLORING_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/breadth_first_search.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/breadth_first_search.hpp new file mode 100644 index 0000000000..c987585f5f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/breadth_first_search.hpp @@ -0,0 +1,164 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PARALLEL_BFS_HPP +#define BOOST_GRAPH_PARALLEL_BFS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace detail { + /** @brief A unary predicate that decides when to push into a + * breadth-first search queue. + * + * This predicate stores a color map that is used to determine + * when to push. If it is provided with a key for which the color + * is white, it darkens the color to gray and returns true (so + * that the value will be pushed appropriately); if the color is + * not white, it returns false so that the vertex will be + * ignored. + */ + template + struct darken_and_push + { + typedef typename property_traits::key_type argument_type; + typedef bool result_type; + + explicit darken_and_push(const ColorMap& color) : color(color) { } + + bool operator()(const argument_type& value) const + { + typedef color_traits::value_type> + Color; + if (get(color, value) == Color::white()) { + put(color, value, Color::gray()); + return true; + } else { + return false; + } + } + + ColorMap color; + }; + + template + struct has_not_been_seen + { + typedef bool result_type; + + has_not_been_seen() { } + + has_not_been_seen(std::size_t n, IndexMap index_map) + : seen(n), index_map(index_map) {} + + template + result_type operator()(Key key) + { + bool result = seen[get(index_map, key)]; + seen[get(index_map, key)] = true; + return !result; + } + + void swap(has_not_been_seen& other) + { + using std::swap; + swap(seen, other.seen); + swap(index_map, other.index_map); + } + + private: + dynamic_bitset<> seen; + IndexMap index_map; + }; + + template + inline void + swap(has_not_been_seen& x, has_not_been_seen& y) + { + x.swap(y); + } + + template + inline void + parallel_bfs_helper + (DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + ColorMap color, + BFSVisitor vis, + BufferRef Q, + VertexIndexMap) + { + set_property_map_role(vertex_color, color); + color.set_consistency_model(0); + breadth_first_search(g, s, Q.ref, vis, color); + } + + template + void parallel_bfs_helper + (DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + ColorMap color, + BFSVisitor vis, + error_property_not_found, + VertexIndexMap vertex_index) + { + using boost::graph::parallel::process_group; + + typedef graph_traits Traits; + typedef typename Traits::vertex_descriptor Vertex; + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + + set_property_map_role(vertex_color, color); + color.set_consistency_model(0); + + // Buffer default + typedef typename property_map + ::const_type vertex_owner_map; + typedef boost::graph::distributed::distributed_queue< + process_group_type, vertex_owner_map, queue, + detail::darken_and_push > queue_t; + queue_t Q(process_group(g), + get(vertex_owner, g), + detail::darken_and_push(color)); + breadth_first_search(g, s, Q, vis, color); + } + + template + void bfs_helper + (DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + ColorMap color, + BFSVisitor vis, + const bgl_named_params& params, + BOOST_GRAPH_ENABLE_IF_MODELS(DistributedGraph, distributed_graph_tag, + void)*) + { + parallel_bfs_helper + (g, s, color, vis, get_param(params, buffer_param_t()), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index)); + } + } +} + +#endif // BOOST_GRAPH_PARALLEL_BFS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/compressed_sparse_row_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/compressed_sparse_row_graph.hpp new file mode 100644 index 0000000000..5c1d1bd97f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/compressed_sparse_row_graph.hpp @@ -0,0 +1,2152 @@ +// Copyright (C) 2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Jeremiah Willcock +// Andrew Lumsdaine + +// Distributed compressed sparse row graph type + +#ifndef BOOST_GRAPH_DISTRIBUTED_CSR_HPP +#define BOOST_GRAPH_DISTRIBUTED_CSR_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +// Distributed and sequential inplace ctors have the same signature so +// we need a separate tag for distributed inplace ctors +enum distributed_construct_inplace_from_sources_and_targets_t + {distributed_construct_inplace_from_sources_and_targets}; + +// The number of bits we reserve for the processor ID. +// DPG TBD: This is a hack. It will eventually be a run-time quantity. +static const int processor_bits = 8; + +// Tag class for a distributed CSR graph +struct distributed_csr_tag + : public virtual distributed_graph_tag, + public virtual distributed_vertex_list_graph_tag, + public virtual distributed_edge_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag {}; + +template +class compressed_sparse_row_graph< + directedS, VertexProperty, EdgeProperty, GraphProperty, + distributedS, + InEdgeIndex> +{ + typedef compressed_sparse_row_graph self_type; + + private: + /** + * Determine the type used to represent vertices in the graph. If + * the user has overridden the default, use the user's + * parameter. Otherwise, fall back to std::size_t. + */ + typedef typename mpl::if_, + std::size_t, + InVertex>::type Vertex; + + /** + * Determine the type used to represent edges in the graph. If + * the user has overridden the default (which is to be the same as + * the distributed vertex selector type), use the user's + * parameter. Otherwise, fall back to the value of @c Vertex. + */ + typedef typename mpl::if_ >, + Vertex, + InEdgeIndex>::type EdgeIndex; + + public: + /** + * The type of the CSR graph that will be stored locally. + */ + typedef compressed_sparse_row_graph + base_type; + + // ----------------------------------------------------------------- + // Graph concept requirements + typedef Vertex vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef directed_tag directed_category; + typedef allow_parallel_edge_tag edge_parallel_category; + typedef distributed_csr_tag traversal_category; + static vertex_descriptor null_vertex(); + + // ----------------------------------------------------------------- + // Distributed Vertex List Graph concept requirements + typedef Vertex vertices_size_type; + class vertex_iterator; + + // ----------------------------------------------------------------- + // Distributed Edge List Graph concept requirements + typedef EdgeIndex edges_size_type; + class edge_iterator; + + // ----------------------------------------------------------------- + // Incidence Graph concept requirements + typedef typename graph_traits::out_edge_iterator + out_edge_iterator; + typedef typename graph_traits::degree_size_type + degree_size_type; + + // ----------------------------------------------------------------- + // Adjacency Graph concept requirements + typedef typename graph_traits::adjacency_iterator + adjacency_iterator; + + // Note: This graph type does not model Bidirectional Graph. + // However, this typedef is required to satisfy graph_traits. + typedef void in_edge_iterator; + + // ----------------------------------------------------------------- + // Distributed Container concept requirements + typedef ProcessGroup process_group_type; + typedef boost::parallel::variant_distribution + distribution_type; + + // ----------------------------------------------------------------- + // Workarounds + // NOTE: This graph type does not have old-style graph properties. It only + // accepts bundles. + typedef no_property vertex_property_type; + typedef no_property edge_property_type; + typedef no_property graph_property_type; + typedef typename mpl::if_, + void****, + VertexProperty>::type vertex_bundled; + typedef typename mpl::if_, + void****, + EdgeProperty>::type edge_bundled; + typedef typename mpl::if_, + void****, + GraphProperty>::type graph_bundled; + + // ----------------------------------------------------------------- + // Useful types + typedef typename ProcessGroup::process_id_type process_id_type; + + // ----------------------------------------------------------------- + // Graph constructors + compressed_sparse_row_graph(const ProcessGroup& pg = ProcessGroup()) + : m_process_group(pg), m_distribution(parallel::block(pg, 0)) {} + + compressed_sparse_row_graph(const GraphProperty& prop, + const ProcessGroup& pg = ProcessGroup()) + : m_process_group(pg), m_distribution(parallel::block(pg, 0)) {} + + compressed_sparse_row_graph(vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup()) + : m_process_group(pg), m_distribution(parallel::block(pg, 0)), + m_base(numverts) + {} + + compressed_sparse_row_graph(vertices_size_type numverts, + const GraphProperty& prop, + const ProcessGroup& pg = ProcessGroup()) + : m_process_group(pg), m_distribution(parallel::block(pg, 0)), + m_base(numverts) + {} + + template + compressed_sparse_row_graph(vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist) + : m_process_group(pg), m_distribution(dist), m_base(numverts) {} + + template + compressed_sparse_row_graph(vertices_size_type numverts, + const GraphProperty& prop, + const ProcessGroup& pg, + const Distribution& dist) + : m_process_group(pg), m_distribution(dist), m_base(numverts) {} + + template + compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + edges_size_type numedges = 0, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + edges_size_type numedges = 0, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + std::vector& edge_props, + vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + std::vector& edge_props, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg = ProcessGroup(), + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + template + compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop = GraphProperty()); + + base_type& base() { return m_base; } + const base_type& base() const { return m_base; } + + process_group_type process_group() const { return m_process_group.base(); } + + distribution_type& distribution() { return m_distribution; } + const distribution_type& distribution() const { return m_distribution; } + + // Directly access a vertex or edge bundle + vertex_bundled& operator[](vertex_descriptor v) + { + std::pair locator + = get(vertex_global, *this, v); + assert(locator.first == process_id(m_process_group)); + return base().m_vertex_properties[locator.second]; + } + + const vertex_bundled& operator[](vertex_descriptor v) const + { + std::pair locator + = get(vertex_global, *this, v); + assert(locator.first == process_id(m_process_group)); + return base().m_process_group[locator.second]; + } + + edge_bundled& operator[](edge_descriptor e) + { + assert(get(vertex_owner, *this, e.src) == process_id(m_process_group)); + return base().m_edge_properties[e.idx]; + } + + const edge_bundled& operator[](edge_descriptor e) const + { + assert(get(vertex_owner, *this, e.src) == process_id(m_process_group)); + return base().m_edge_properties[e.idx]; + } + + // Create a vertex descriptor from a process ID and a local index. + vertex_descriptor + make_vertex_descriptor(process_id_type p, vertex_descriptor v) const + { + vertex_descriptor vertex_local_index_bits = + sizeof(vertex_descriptor) * CHAR_BIT - processor_bits; + return v | ((vertex_descriptor)p << vertex_local_index_bits); + } + + // Convert a local vertex descriptor into a global vertex descriptor + vertex_descriptor local_to_global_vertex(vertex_descriptor v) const + { + return make_vertex_descriptor(process_id(m_process_group), v); + } + + // Structural modification + vertex_descriptor add_vertex() + { + typename graph_traits::vertex_descriptor v + = boost::add_vertex(m_base); + + return make_vertex_descriptor(process_id(m_process_group), v); + } + + vertex_descriptor add_vertex(const vertex_bundled& p) + { + typename graph_traits::vertex_descriptor v + = boost::add_vertex(m_base, p); + + return make_vertex_descriptor(process_id(m_process_group), v); + } + + vertex_descriptor add_vertices(vertices_size_type count) + { + typename graph_traits::vertex_descriptor v + = boost::add_vertices(count, m_base); + + return make_vertex_descriptor(process_id(m_process_group), v); + } + + template + void + add_edges(InputIterator first, InputIterator last) + { boost::add_edges_global(first, last, get(vertex_local, *this), m_base); } + + template + void + add_edges(InputIterator first, InputIterator last, + EdgePropertyIterator ep_iter, + EdgePropertyIterator ep_iter_end) + { boost::add_edges_global(first, last, ep_iter, ep_iter_end, + get(vertex_local, *this), m_base); } + + template + void + add_edges_sorted(InputIterator first, InputIterator last) + { boost::add_edges_sorted_global(first, last, + get(vertex_local, *this), m_base); } + + template + void + add_edges_sorted(InputIterator first_sorted, InputIterator last_sorted, + EdgePropertyIterator ep_iter_sorted) + { boost::add_edges_sorted_global(first_sorted, last_sorted, ep_iter_sorted, + get(vertex_local, *this), m_base); } + + protected: + ProcessGroup m_process_group; + distribution_type m_distribution; + base_type m_base; +}; + +/** @brief Helper macro containing the template parameters for the + * distributed CSR graph. + * + * This macro contains all of the template parameters needed for the + * distributed compressed_sparse_row graph type. It is used to reduce + * the amount of typing required to declare free functions for this + * graph type. + */ +#define BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS \ + typename VertexProperty, typename EdgeProperty, \ + typename GraphProperty, typename ProcessGroup, typename InVertex, \ + typename InDistribution, typename InEdgeIndex + +/** @brief Helper macro containing the typical instantiation of the + * distributed CSR graph. + * + * This macro contains an instantiation of the distributed CSR graph + * type using the typical template parameters names (e.g., those + * provided by the macro @c + * BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS). It is used to reduce + * the amount of typing required to declare free functions for this + * graph type. + */ +#define BOOST_DISTRIB_CSR_GRAPH_TYPE \ + compressed_sparse_row_graph< \ + directedS, VertexProperty, EdgeProperty, GraphProperty, \ + distributedS, \ + InEdgeIndex> + +// ----------------------------------------------------------------- +// Graph concept operations +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +BOOST_DISTRIB_CSR_GRAPH_TYPE::null_vertex() +{ + return graph_traits::null_vertex(); +} + +// ----------------------------------------------------------------- +// Incidence Graph concept operations +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +source(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor e, + const BOOST_DISTRIB_CSR_GRAPH_TYPE&) +{ return e.src; } + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +target(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor e, + const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ return target(e, g.base()); } + +template +inline std::pair +out_edges(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor u, + const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type + edges_size_type; + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor ed; + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::out_edge_iterator it; + edges_size_type u_local = get(vertex_local, g, u); + edges_size_type u_row_start = g.base().m_forward.m_rowstart[u_local]; + edges_size_type next_row_start = g.base().m_forward.m_rowstart[u_local + 1]; + return std::make_pair(it(ed(u, u_row_start)), + it(ed(u, (std::max)(u_row_start, next_row_start)))); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::degree_size_type +out_degree(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor u, + const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + return out_degree(get(vertex_local, g, u), g.base()); +} + +// ----------------------------------------------------------------- +// DistributedGraph concept requirements +template +void synchronize(const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef BOOST_DISTRIB_CSR_GRAPH_TYPE graph_type; + synchronize(g.process_group()); +} + +template +ProcessGroup +process_group(const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ return g.process_group(); } + + +// ----------------------------------------------------------------- +// Adjacency Graph concept requirements +template +inline std::pair +adjacent_vertices(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor u, + const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + return adjacent_vertices(get(vertex_local, g, u), g.base()); +} + +// ----------------------------------------------------------------- +// Distributed Vertex List Graph concept operations +template +class BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_iterator + : public iterator_adaptor, + Vertex, + random_access_traversal_tag, + Vertex> +{ + typedef iterator_adaptor, + Vertex, + random_access_traversal_tag, + Vertex> inherited; + public: + vertex_iterator() {} + + explicit vertex_iterator(Vertex v, const self_type* graph) + : inherited(counting_iterator(v)), graph(graph) { } + + Vertex dereference() const + { + return graph->local_to_global_vertex(*(this->base_reference())); + } + + friend class iterator_core_access; + + private: + const self_type* graph; +}; + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::degree_size_type +num_vertices(const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + return num_vertices(g.base()); +} + +template +inline std::pair +vertices(const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_iterator + vertex_iterator; + return std::make_pair(vertex_iterator(0, &g), + vertex_iterator(num_vertices(g), &g)); +} + +// ----------------------------------------------------------------- +// Distributed Edge List Graph concept operations +template +class BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_iterator +{ + public: + typedef std::forward_iterator_tag iterator_category; + typedef edge_descriptor value_type; + + typedef const edge_descriptor* pointer; + + typedef edge_descriptor reference; + typedef typename int_t::fast difference_type; + + edge_iterator() : graph(0), current_edge(), end_of_this_vertex(0) {} + + edge_iterator(const compressed_sparse_row_graph& graph, + edge_descriptor current_edge, + EdgeIndex end_of_this_vertex) + : graph(&graph), local_src(current_edge.src), current_edge(current_edge), + end_of_this_vertex(end_of_this_vertex) + { + // The edge that comes in has a local source vertex. Make it global. + current_edge.src = graph.local_to_global_vertex(current_edge.src); + } + + // From InputIterator + reference operator*() const { return current_edge; } + pointer operator->() const { return ¤t_edge; } + + bool operator==(const edge_iterator& o) const { + return current_edge == o.current_edge; + } + bool operator!=(const edge_iterator& o) const { + return current_edge != o.current_edge; + } + + edge_iterator& operator++() + { + ++current_edge.idx; + while (current_edge.idx == end_of_this_vertex && local_src < num_vertices(*graph)-1) { + ++local_src; + current_edge.src = graph->local_to_global_vertex(local_src); + end_of_this_vertex = graph->base().m_forward.m_rowstart[local_src + 1]; + } + return *this; + } + + edge_iterator operator++(int) { + edge_iterator temp = *this; + ++*this; + return temp; + } + + private: + const compressed_sparse_row_graph* graph; + EdgeIndex local_src; + edge_descriptor current_edge; + EdgeIndex end_of_this_vertex; +}; + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type +num_edges(const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + return g.base().m_forward.m_column.size(); +} + +template +std::pair +edges(const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor Vertex; + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_iterator ei; + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor edgedesc; + if (g.base().m_forward.m_rowstart.size() == 1 || + g.base().m_forward.m_column.empty()) { + return std::make_pair(ei(), ei()); + } else { + // Find the first vertex that has outgoing edges + Vertex src = 0; + while (g.base().m_forward.m_rowstart[src + 1] == 0) ++src; + return std::make_pair(ei(g, edgedesc(src, 0), g.base().m_forward.m_rowstart[src + 1]), + ei(g, edgedesc(num_vertices(g), g.base().m_forward.m_column.size()), 0)); + } +} + +// ----------------------------------------------------------------- +// Graph constructors + +// Returns true if a vertex belongs to a process according to a distribution +template +struct local_vertex { + + local_vertex(OwnerMap owner, ProcessId id) + : owner(owner), id(id) {} + + template + bool operator()(Vertex x) + { return get(owner, x) == id; } + + template + bool operator()(Vertex x) const + { return get(owner, x) == id; } + +private: + OwnerMap owner; + ProcessId id; +}; + +// Returns true if a vertex belongs to a process according to a distribution +template +struct local_edge { + + local_edge(OwnerMap owner, ProcessId id) + : owner(owner), id(id) {} + + template + bool operator()(std::pair& x) + { return get(owner, x.first) == id; } + + template + bool operator()(const std::pair& x) const + { return get(owner, x.first) == id; } + +private: + OwnerMap owner; + ProcessId id; +}; + +// Turns an index iterator into a vertex iterator +template +class index_to_vertex_iterator { + +public: + typedef std::input_iterator_tag iterator_category; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef void difference_type; + + index_to_vertex_iterator(IndexIterator index, + const Graph& g) + : index(index), g(g), current(to_edge(*index)) {} + + reference operator*() { current = to_edge(*index); return current; } + pointer operator->() { current = to_edge(*index); return ¤t; } + + index_to_vertex_iterator& operator++() + { + ++index; + return *this; + } + + index_to_vertex_iterator operator++(int) + { + index_to_vertex_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const index_to_vertex_iterator& other) const + { return index == other.index; } + + bool operator!=(const index_to_vertex_iterator& other) const + { return !(*this == other); } + +private: + value_type to_edge(const typename std::iterator_traits::value_type& x) + { return std::make_pair(vertex(x.first, g), vertex(x.second, g)); } + + IndexIterator index; + const Graph& g; + value_type current; +}; + +template +struct index_to_vertex_func { + + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::vertices_size_type vertices_size_type; + typedef std::pair result_type; + typedef std::pair base_iterator_type; + + index_to_vertex_func(const Distribution& dist, const Graph& g) + : dist(dist), g(g) {} + + + result_type operator()(const base_iterator_type& p) const + { + return std::make_pair(vertex(p.first, g), vertex(p.second, g)); + } + +private: + const Distribution& dist; + const Graph& g; +}; + +// NGE: This method only works with iterators that have a difference_type, +// the index_to_vertex_iterator class above is retained for compatibility +// with BGL generators which have no difference_type +template +boost::transform_iterator, IndexIterator> +make_index_to_vertex_iterator(IndexIterator it, const Distribution& dist, + const Graph& g) { + return boost::make_transform_iterator( + it, index_to_vertex_func(dist, g)); +} + +// Forward declaration of csr_vertex_owner_map +template class csr_vertex_owner_map; + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(edges_are_unsorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(edges_are_unsorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(edges_are_unsorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + ep_iter, + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_unsorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(edges_are_unsorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + ep_iter, + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + edges_size_type numedges, // This is not used as there is no appropriate BGL ctor + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(edges_are_sorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + m_distribution.block_size(process_id(m_process_group), numverts), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(edges_are_sorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + m_distribution.block_size(process_id(m_process_group), numverts), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + edges_size_type numedges, // This is not used as there is no appropriate BGL ctor + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(edges_are_sorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + ep_iter, + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + m_distribution.block_size(process_id(m_process_group), numverts), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_sorted_t, + InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(edges_are_sorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + ep_iter, + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + m_distribution.block_size(process_id(m_process_group), numverts), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(edges_are_unsorted_multi_pass_global, + make_index_to_vertex_iterator(edge_begin, parallel::block(m_process_group, numverts), *this), + make_index_to_vertex_iterator(edge_end, parallel::block(m_process_group, numverts), *this), + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(edges_are_unsorted_multi_pass_global, + make_index_to_vertex_iterator(edge_begin, parallel::block(m_process_group, numverts), *this), + make_index_to_vertex_iterator(edge_end, parallel::block(m_process_group, numverts), *this), + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ } + + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(edges_are_unsorted_multi_pass_global, + make_index_to_vertex_iterator(edge_begin, parallel::block(m_process_group, numverts), *this), + make_index_to_vertex_iterator(edge_end, parallel::block(m_process_group, numverts), *this), + ep_iter, + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t, + MultiPassInputIterator edge_begin, + MultiPassInputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(edges_are_unsorted_multi_pass_global, + make_index_to_vertex_iterator(edge_begin, parallel::block(m_process_group, numverts), *this), + make_index_to_vertex_iterator(edge_end, parallel::block(m_process_group, numverts), *this), + ep_iter, + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ } + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + vertices_size_type numverts, + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(m_distribution.block_size(process_id(m_process_group), numverts)) +{ + // Convert linear indices to global indices + for (edges_size_type i = 0; i < sources.size(); ++i) { + sources[i] = m_distribution.local(sources[i]); + targets[i] = make_vertex_descriptor(m_distribution(targets[i]), + m_distribution.local(targets[i])); + } + + m_base.assign_sources_and_targets_global( + sources, targets, m_distribution.block_size(process_id(m_process_group), numverts), + identity_property_map()); + + // TODO: set property on m_base? +} + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(m_distribution.block_size(process_id(m_process_group), numverts)) +{ + // Convert linear indices to global indices + for (edges_size_type i = 0; i < sources.size(); ++i) { + sources[i] = m_distribution.local(sources[i]); + targets[i] = make_vertex_descriptor(m_distribution(targets[i]), + m_distribution.local(targets[i])); + } + + m_base.assign_sources_and_targets_global( + sources, targets, m_distribution.block_size(process_id(m_process_group), numverts), + identity_property_map()); + + // TODO: set property on m_base? +} + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + std::vector& edge_props, + vertices_size_type numverts, + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(m_distribution.block_size(process_id(m_process_group), numverts)) +{ + // Convert linear indices to global indices + for (edges_size_type i = 0; i < sources.size(); ++i) { + sources[i] = m_distribution.local(sources[i]); + targets[i] = make_vertex_descriptor(m_distribution(targets[i]), + m_distribution.local(targets[i])); + } + + m_base.assign_sources_and_targets_global( + sources, targets, edge_props, + m_distribution.block_size(process_id(m_process_group), numverts), + identity_property_map()); + + // TODO: set property on m_base? +} + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targets_t, + std::vector& sources, + std::vector& targets, + std::vector& edge_props, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(m_distribution.block_size(process_id(m_process_group), numverts)) +{ + // Convert linear indices to global indices + for (edges_size_type i = 0; i < sources.size(); ++i) { + sources[i] = m_distribution.local(sources[i]); + targets[i] = make_vertex_descriptor(m_distribution(targets[i]), + m_distribution.local(targets[i])); + } + + m_base.assign_sources_and_targets_global( + sources, targets, edge_props, + m_distribution.block_size(process_id(m_process_group), numverts), + identity_property_map()); + + // TODO: set property on m_base? +} + +// +// Old (untagged) ctors, these default to the unsorted sequential ctors +// +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(parallel::block(m_process_group, numverts)), + m_base(edges_are_unsorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) + +{ +} + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const GraphProperty& prop) + : m_process_group(pg), + + m_distribution(parallel::block(m_process_group, numverts)), + m_base(edges_are_unsorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + ep_iter, + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ +} + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(edges_are_unsorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ +} + +template +template +BOOST_DISTRIB_CSR_GRAPH_TYPE:: +compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end, + EdgePropertyIterator ep_iter, + vertices_size_type numverts, + const ProcessGroup& pg, + const Distribution& dist, + const GraphProperty& prop) + : m_process_group(pg), + m_distribution(dist), + m_base(edges_are_unsorted_global, + index_to_vertex_iterator(edge_begin, *this), + index_to_vertex_iterator(edge_end, *this), + m_distribution.block_size(process_id(m_process_group), numverts), + get(vertex_local, *this), + local_vertex, + process_id_type> (get(vertex_owner, *this), process_id(pg)), + prop) +{ +} + +// ----------------------------------------------------------------- +// Vertex Global Property Map +template +class csr_vertex_global_map +{ + public: + // ----------------------------------------------------------------- + // Readable Property Map concept requirements + typedef std::pair value_type; + typedef value_type reference; + typedef Key key_type; + typedef readable_property_map_tag category; +}; + +template +inline std::pair +get(csr_vertex_global_map, + typename csr_vertex_global_map::key_type k) +{ + const int local_index_bits = sizeof(Key) * CHAR_BIT - processor_bits; + const Key local_index_mask = Key(-1) >> processor_bits; + + return std::pair(k >> local_index_bits, + k & local_index_mask); +} + +template +class property_map +{ + public: + typedef csr_vertex_global_map< + typename ProcessGroup::process_id_type, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor> type; + typedef type const_type; +}; + +template +inline +typename property_map::type +get(vertex_global_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::type result_type; + return result_type(); +} + +template +inline +std::pair +get(vertex_global_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + return get(vertex_global, + const_cast(g), + k); +} + +template +inline +typename property_map::const_type +get(vertex_global_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::const_type result_type; + return result_type(); +} + +template +inline +std::pair +get(vertex_global_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor + vertex_descriptor; + typedef std::pair + result_type; + const int local_index_bits = + sizeof(vertex_descriptor) * CHAR_BIT - processor_bits; + const vertex_descriptor local_index_mask = + vertex_descriptor(-1) >> processor_bits; + + return result_type(k >> local_index_bits, k & local_index_mask); +} + +// ----------------------------------------------------------------- +// Extra, common functions +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +vertex(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertices_size_type i, + const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + return g.make_vertex_descriptor(g.distribution()(i), + g.distribution().local(i)); +} + +// Unlike for an adjacency_matrix, edge_range and edge take lg(out_degree(i)) +// time +template +inline std::pair +edge_range(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor i, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor j, + const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor Vertex; + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type EdgeIndex; + typedef typename std::vector::const_iterator adj_iter; + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter; + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor edge_desc; + std::pair raw_adjacencies = adjacent_vertices(i, g); + std::pair adjacencies = + std::equal_range(raw_adjacencies.first, raw_adjacencies.second, j); + EdgeIndex idx_begin = adjacencies.first - g.base().m_forward.m_column.begin(); + EdgeIndex idx_end = adjacencies.second - g.base().m_forward.m_column.begin(); + return std::make_pair(out_edge_iter(edge_desc(i, idx_begin)), + out_edge_iter(edge_desc(i, idx_end))); +} + +template +inline std::pair +edge(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor i, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor j, + const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter; + std::pair range = edge_range(i, j, g); + if (range.first == range.second) + return std::make_pair(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor(), + false); + else + return std::make_pair(*range.first, true); +} + +// A helper that turns requests for property maps for const graphs +// into property maps for non-const graphs. +template +class property_map +{ + public: + typedef typename property_map + ::const_type type; + typedef type const_type; +}; + +// ----------------------------------------------------------------- +// Structural modifiers + +#if 0 +template +typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +add_vertex(BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ return g.add_vertex(); } + +template +typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +add_vertex(const typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_bundled& p, + BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ return g.add_vertex(p); } + +template +typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +add_vertices(typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertices_size_type count, + BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ return g.add_vertices(count); } + +template +void +add_edges(InputIterator first, InputIterator last, + BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ g.add_edges(first, last); } + +template +void +add_edges(InputIterator first, InputIterator last, + EdgePropertyIterator ep_iter, + EdgePropertyIterator ep_iter_end, + BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ return g.add_edges(first, last, ep_iter, ep_iter_end); } + +template +void +add_edges_sorted(InputIterator first, InputIterator last, + BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ return g.add_edges_sorted(first, last); } + +template +void +add_edges_sorted(InputIterator first_sorted, InputIterator last_sorted, + EdgePropertyIterator ep_iter_sorted, + BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ g.add_edges_sorted(first_sorted, last_sorted, ep_iter_sorted); } +#endif + +// ----------------------------------------------------------------- +// Vertex Owner Property Map +template +class csr_vertex_owner_map +{ + public: + // ----------------------------------------------------------------- + // Readable Property Map concept requirements + typedef ProcessID value_type; + typedef value_type reference; + typedef Key key_type; + typedef readable_property_map_tag category; +}; + +template +inline ProcessID +get(csr_vertex_owner_map pm, + typename csr_vertex_owner_map::key_type k) +{ + const int local_index_bits = sizeof(Key) * CHAR_BIT - processor_bits; + return k >> local_index_bits; +} + +template +class property_map +{ + public: + typedef csr_vertex_owner_map< + typename ProcessGroup::process_id_type, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor> type; + typedef type const_type; +}; + +template +inline +typename property_map::type +get(vertex_owner_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::type result_type; + return result_type(); +} + +template +inline typename ProcessGroup::process_id_type +get(vertex_owner_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + return get(vertex_owner, + const_cast(g), + k); +} + +template +inline +typename property_map::const_type +get(vertex_owner_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::const_type result_type; + return result_type(); +} + +template +inline typename ProcessGroup::process_id_type +get(vertex_owner_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor + vertex_descriptor; + const int local_index_bits = + sizeof(vertex_descriptor) * CHAR_BIT - processor_bits; + return k >> local_index_bits; +} + +// ----------------------------------------------------------------- +// Vertex Local Property Map +template +class csr_vertex_local_map +{ + public: + // ----------------------------------------------------------------- + // Readable Property Map concept requirements + typedef Key value_type; + typedef value_type reference; + typedef Key key_type; + typedef readable_property_map_tag category; +}; + +template +inline Key +get(csr_vertex_local_map pm, + typename csr_vertex_local_map::key_type k) +{ + const Key local_index_mask = Key(-1) >> processor_bits; + return k & local_index_mask; +} + +template +class property_map +{ + public: + typedef csr_vertex_local_map< + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor> type; + typedef type const_type; +}; + +template +inline +typename property_map::type +get(vertex_local_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::type result_type; + return result_type(); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +get(vertex_local_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + return get(vertex_local, + const_cast(g), + k); +} + +template +inline +typename property_map::const_type +get(vertex_local_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::const_type result_type; + return result_type(); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor +get(vertex_local_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor + vertex_descriptor; + const vertex_descriptor local_index_mask = + vertex_descriptor(-1) >> processor_bits; + return k & local_index_mask; +} + +// ----------------------------------------------------------------- +// Vertex Index Property Map +template +class property_map +{ + typedef typename property_map::const_type + global_map; + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::process_group_type + process_group_type; + + typedef property_map local; + +public: + typedef local_property_map type; + typedef local_property_map const_type; +}; + +template +inline +typename property_map::type +get(vertex_index_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::type result_type; + + return result_type(g.process_group(), get(vertex_global, g), + get(vertex_local, g)); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertices_size_type +get(vertex_index_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + return get(vertex_local, g, k); +} + +template +inline +typename property_map::const_type +get(vertex_index_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::const_type result_type; + return result_type(g.process_group(), get(vertex_global, g), + get(vertex_local, g)); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertices_size_type +get(vertex_index_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + return get(vertex_local, g, k); +} + +// ----------------------------------------------------------------- +// Vertex Local Index Property Map +template +class property_map + : public property_map { }; + +template +inline +typename property_map::type +get(vertex_local_index_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + return get(vertex_local, g); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertices_size_type +get(vertex_local_index_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + return get(vertex_local, g, k); +} + +template +inline +typename property_map::const_type +get(vertex_local_index_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + return get(vertex_local, g); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertices_size_type +get(vertex_local_index_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor k) +{ + return get(vertex_local, g, k); +} + +// ----------------------------------------------------------------- +// Edge Global Property Map +template +class csr_edge_global_map +{ + public: + // ----------------------------------------------------------------- + // Readable Property Map concept requirements + typedef std::pair value_type; + typedef value_type reference; + typedef detail::csr_edge_descriptor key_type; + typedef readable_property_map_tag category; +}; + +template +inline std::pair +get(csr_edge_global_map pm, + typename csr_edge_global_map::key_type k) +{ + const int local_index_bits = sizeof(Vertex) * CHAR_BIT - processor_bits; + return std::pair(k.src >> local_index_bits, k.idx); +} + +template +class property_map +{ + public: + typedef csr_edge_global_map< + typename ProcessGroup::process_id_type, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type> type; + typedef type const_type; +}; + +template +inline +typename property_map::type +get(edge_global_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::type result_type; + return result_type(); +} + +template +inline +std::pair +get(edge_global_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor k) +{ + return get(edge_global, + const_cast(g), + k); +} + +template +inline +typename property_map::const_type +get(edge_global_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::const_type result_type; + return result_type(); +} + +template +inline +std::pair +get(edge_global_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor k) +{ + typedef typename BOOST_DISTRIB_CSR_GRAPH_TYPE::vertex_descriptor + vertex_descriptor; + + const int local_index_bits = + sizeof(vertex_descriptor) * CHAR_BIT - processor_bits; + + typedef std::pair + result_type; + + return result_type(k.src >> local_index_bits, k.idx); +} + +// ----------------------------------------------------------------- +// Edge Index Property Map +template +class property_map +{ + typedef typename property_map + ::type global_map; + + public: + typedef local_property_map< + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::process_group_type, + global_map, + identity_property_map> type; + typedef type const_type; +}; + +template +inline +typename property_map::type +get(edge_index_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::type result_type; + return result_type(g.process_group(), get(edge_global, g), + identity_property_map()); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type +get(edge_index_t, BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor k) +{ + return k.idx; +} + +template +inline +typename property_map::const_type +get(edge_index_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef typename property_map + ::const_type result_type; + return result_type(g.process_group(), get(edge_global, g), + identity_property_map()); +} + +template +inline typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edges_size_type +get(edge_index_t, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g, + typename BOOST_DISTRIB_CSR_GRAPH_TYPE::edge_descriptor k) +{ + return k.idx; +} + +/* Common traits for getting vertex_bundle and edge_bundle maps */ + +namespace detail { + template struct get_bundles; + + template + class get_bundles { + typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph; + typedef typename Graph::process_group_type process_group_type; + + // Extract the global property map for our key type. + typedef typename property_map::const_type vertex_global_map; + typedef typename property_traits::value_type vertex_locator; + typedef typename property_map::const_type edge_global_map; + typedef typename property_traits::value_type edge_locator; + + // Build the local property map + typedef bundle_property_map, + typename vertex_locator::second_type, + VertexProperty, + T> vertex_local_pmap; + + // Build the local const property map + typedef bundle_property_map, + typename vertex_locator::second_type, + VertexProperty, + const T> vertex_local_const_pmap; + + // Build the local property map + typedef bundle_property_map, + typename edge_locator::second_type, + EdgeProperty, + T> edge_local_pmap; + + // Build the local const property map + typedef bundle_property_map, + typename edge_locator::second_type, + EdgeProperty, + const T> edge_local_const_pmap; + + public: + typedef ::boost::parallel::distributed_property_map< + process_group_type, vertex_global_map, vertex_local_pmap> vertex_map_type; + + typedef ::boost::parallel::distributed_property_map< + process_group_type, vertex_global_map, vertex_local_const_pmap> vertex_map_const_type; + + typedef ::boost::parallel::distributed_property_map< + process_group_type, edge_global_map, edge_local_pmap> edge_map_type; + + typedef ::boost::parallel::distributed_property_map< + process_group_type, edge_global_map, edge_local_const_pmap> edge_map_const_type; + + }; + + template struct get_full_bundles; + + template + class get_full_bundles { // For vertex_bundle_t and edge_bundle_t + typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph; + typedef typename Graph::process_group_type process_group_type; + + // Extract the global property map for our key type. + typedef typename property_map::const_type vertex_global_map; + typedef typename property_traits::value_type vertex_locator; + typedef typename property_map::const_type edge_global_map; + typedef typename property_traits::value_type edge_locator; + + // Build the local property maps + typedef typename property_map::type vertex_local_pmap; + typedef typename property_map::const_type vertex_local_const_pmap; + typedef typename property_map::type edge_local_pmap; + typedef typename property_map::const_type edge_local_const_pmap; + + public: + typedef ::boost::parallel::distributed_property_map< + process_group_type, vertex_global_map, vertex_local_pmap> vertex_map_type; + + typedef ::boost::parallel::distributed_property_map< + process_group_type, vertex_global_map, vertex_local_const_pmap> vertex_map_const_type; + + typedef ::boost::parallel::distributed_property_map< + process_group_type, edge_global_map, edge_local_pmap> edge_map_type; + + typedef ::boost::parallel::distributed_property_map< + process_group_type, edge_global_map, edge_local_const_pmap> edge_map_const_type; + + }; +} + +template +struct property_map +{ + typedef typename detail::get_full_bundles::vertex_map_type type; + typedef typename detail::get_full_bundles::vertex_map_const_type const_type; +}; + +template +struct property_map +{ + typedef typename detail::get_full_bundles::edge_map_type type; + typedef typename detail::get_full_bundles::edge_map_const_type const_type; +}; + +// ----------------------------------------------------------------- +// Bundled Properties +template +class property_map +{ + typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph; + typedef typename Graph::process_group_type process_group_type; + +public: + typedef typename mpl::if_, + typename detail::get_bundles::vertex_map_type, + typename detail::get_bundles::edge_map_type> + ::type type; + + typedef typename mpl::if_, + typename detail::get_bundles::vertex_map_const_type, + typename detail::get_bundles::edge_map_const_type> + ::type const_type; +}; + +namespace detail { + // Retrieve the local bundle_property_map corresponding to a + // non-const vertex property. + template + inline bundle_property_map, + typename Graph::vertex_descriptor, + typename Graph::vertex_bundled, T> + get_distrib_csr_bundle(T Bundle::* p, Graph& g, mpl::true_) + { + typedef bundle_property_map, + typename Graph::vertex_descriptor, + typename Graph::vertex_bundled, T> result_type; + return result_type(&g.base().vertex_properties().m_vertex_properties, p); + } + + // Retrieve the local bundle_property_map corresponding to a + // const vertex property. + template + inline bundle_property_map, + typename Graph::vertex_descriptor, + typename Graph::vertex_bundled, const T> + get_distrib_csr_bundle(T Bundle::* p, const Graph& g, mpl::true_) + { + typedef bundle_property_map< + const std::vector, + typename Graph::vertex_descriptor, + typename Graph::vertex_bundled, const T> result_type; + return result_type(&g.base().vertex_properties().m_vertex_properties, p); + } + + // Retrieve the local bundle_property_map corresponding to a + // non-const edge property. + template + inline bundle_property_map, + typename Graph::edges_size_type, + typename Graph::edge_bundled, T> + get_distrib_csr_bundle(T Bundle::* p, Graph& g, mpl::false_) + { + typedef bundle_property_map, + typename Graph::edges_size_type, + typename Graph::edge_bundled, T> result_type; + return result_type(&g.base().edge_properties().m_edge_properties, p); + } + + // Retrieve the local bundle_property_map corresponding to a + // const edge property. + template + inline bundle_property_map, + typename Graph::edges_size_type, + typename Graph::edge_bundled, const T> + get_distrib_csr_bundle(T Bundle::* p, const Graph& g, mpl::false_) + { + typedef bundle_property_map< + const std::vector, + typename Graph::edges_size_type, + typename Graph::edge_bundled, const T> result_type; + return result_type(&g.base().edge_properties().m_edge_properties, p); + } +} + +template +typename property_map::type +get(T Bundle::* p, BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph; + typedef typename property_map::type result_type; + + // Resolver + typedef typename property_traits::value_type value_type; + typedef typename property_reduce::template apply + reduce; + + typedef typename property_traits::key_type descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename mpl::if_, + vertex_global_t, edge_global_t>::type + global_map_t; + + return result_type(g.process_group(), get(global_map_t(), g), + detail::get_distrib_csr_bundle + (p, g, mpl::bool_::value>()), + reduce()); +} + +template +typename property_map::const_type +get(T Bundle::* p, const BOOST_DISTRIB_CSR_GRAPH_TYPE& g) +{ + typedef BOOST_DISTRIB_CSR_GRAPH_TYPE Graph; + typedef typename property_map::const_type result_type; + + // Resolver + typedef typename property_traits::value_type value_type; + typedef typename property_reduce::template apply + reduce; + + typedef typename property_traits::key_type descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename mpl::if_, + vertex_global_t, edge_global_t>::type + global_map_t; + + return result_type(g.process_group(), get(global_map_t(), g), + detail::get_distrib_csr_bundle + (p, g, mpl::bool_::value>()), + reduce()); +} + +namespace mpi { + template + struct is_mpi_datatype > + : mpl::true_ { }; +} + +namespace serialization { + template + struct is_bitwise_serializable > + : mpl::true_ { }; + + template + struct implementation_level > + : mpl::int_ {} ; + + template + struct tracking_level > + : mpl::int_ {} ; + +} + +} // end namespace boost + +#endif // BOOST_GRAPH_DISTRIBUTED_CSR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/concepts.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/concepts.hpp new file mode 100644 index 0000000000..ae1a6951c8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/concepts.hpp @@ -0,0 +1,216 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +// +// Distributed graph concepts and helpers +// + +#ifndef BOOST_GRAPH_DISTRIBUTED_CONCEPTS_HPP +#define BOOST_GRAPH_DISTRIBUTED_CONCEPTS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include + +#if BOOST_VERSION >= 103500 +# include +#endif + +namespace boost { + +class distributed_graph_tag { }; +class distributed_vertex_list_graph_tag { }; +class distributed_edge_list_graph_tag { }; + +#if BOOST_VERSION >= 103500 + namespace concepts { +#endif + +#if BOOST_VERSION < 103500 + +template +struct DistributedVertexListGraphConcept +{ + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::traversal_category + traversal_category; + void constraints() { + function_requires< GraphConcept >(); + function_requires< MultiPassInputIteratorConcept >(); + function_requires< ConvertibleConcept >(); + +#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK + // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if + // you want to use vector_as_graph, it is! I'm sure the graph + // library leaves these out all over the place. Probably a + // redesign involving specializing a template with a static + // member function is in order :( + using boost::vertices; +#endif + p = vertices(g); + v = *p.first; + const_constraints(g); + } + void const_constraints(const G& cg) { +#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK + // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if + // you want to use vector_as_graph, it is! I'm sure the graph + // library leaves these out all over the place. Probably a + // redesign involving specializing a template with a static + // member function is in order :( + using boost::vertices; +#endif + + p = vertices(cg); + v = *p.first; + V = num_vertices(cg); + } + std::pair p; + typename graph_traits::vertex_descriptor v; + G g; + vertices_size_type V; +}; + +template +struct DistributedEdgeListGraphConcept +{ + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::edge_iterator edge_iterator; + typedef typename graph_traits::edges_size_type edges_size_type; + typedef typename graph_traits::traversal_category + traversal_category; + void constraints() { + function_requires< GraphConcept >(); + function_requires< MultiPassInputIteratorConcept >(); + function_requires< DefaultConstructibleConcept >(); + function_requires< EqualityComparableConcept >(); + function_requires< AssignableConcept >(); + function_requires< ConvertibleConcept >(); + + p = edges(g); + e = *p.first; + u = source(e, g); + v = target(e, g); + const_constraints(g); + } + void const_constraints(const G& cg) { + p = edges(cg); + E = num_edges(cg); + e = *p.first; + u = source(e, cg); + v = target(e, cg); + } + std::pair p; + typename graph_traits::vertex_descriptor u, v; + typename graph_traits::edge_descriptor e; + edges_size_type E; + G g; +}; +#else + BOOST_concept(DistributedVertexListGraph,(G)) + : Graph + { + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::traversal_category + traversal_category; + ~DistributedVertexListGraph() { + BOOST_CONCEPT_ASSERT((MultiPassInputIterator)); + BOOST_CONCEPT_ASSERT((Convertible)); + +#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK + // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if + // you want to use vector_as_graph, it is! I'm sure the graph + // library leaves these out all over the place. Probably a + // redesign involving specializing a template with a static + // member function is in order :( + using boost::vertices; +#endif + p = vertices(g); + v = *p.first; + const_constraints(g); + } + void const_constraints(const G& cg) { +#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK + // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if + // you want to use vector_as_graph, it is! I'm sure the graph + // library leaves these out all over the place. Probably a + // redesign involving specializing a template with a static + // member function is in order :( + using boost::vertices; +#endif + + p = vertices(cg); + v = *p.first; + V = num_vertices(cg); + } + std::pair p; + typename graph_traits::vertex_descriptor v; + G g; + vertices_size_type V; + }; + + BOOST_concept(DistributedEdgeListGraph,(G)) + : Graph + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::edge_iterator edge_iterator; + typedef typename graph_traits::edges_size_type edges_size_type; + typedef typename graph_traits::traversal_category + traversal_category; + ~DistributedEdgeListGraph() { + BOOST_CONCEPT_ASSERT((MultiPassInputIterator)); + BOOST_CONCEPT_ASSERT((DefaultConstructible)); + BOOST_CONCEPT_ASSERT((EqualityComparable)); + BOOST_CONCEPT_ASSERT((Assignable)); + BOOST_CONCEPT_ASSERT((Convertible)); + + p = edges(g); + e = *p.first; + u = source(e, g); + v = target(e, g); + const_constraints(g); + } + void const_constraints(const G& cg) { + p = edges(cg); + E = num_edges(cg); + e = *p.first; + u = source(e, cg); + v = target(e, cg); + } + std::pair p; + typename graph_traits::vertex_descriptor u, v; + typename graph_traits::edge_descriptor e; + edges_size_type E; + G g; + }; +#endif + +#if BOOST_VERSION >= 103500 + } // end namespace concepts + + using concepts::DistributedVertexListGraphConcept; + using concepts::DistributedEdgeListGraphConcept; +#endif +} // end namespace boost + +#if BOOST_VERSION >= 103500 +# include +#endif + +#endif // BOOST_GRAPH_DISTRIBUTED_CONCEPTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/connected_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/connected_components.hpp new file mode 100644 index 0000000000..1072b7c455 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/connected_components.hpp @@ -0,0 +1,766 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Nick Edmonds +// Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PARALLEL_CC_HPP +#define BOOST_GRAPH_PARALLEL_CC_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PBGL_IN_PLACE_MERGE /* In place merge instead of sorting */ +//#define PBGL_SORT_ASSERT /* Assert sorted for in place merge */ + +/* Explicit sychronization in pointer doubling step? */ +#define PBGL_EXPLICIT_SYNCH +//#define PBGL_CONSTRUCT_METAGRAPH +#ifdef PBGL_CONSTRUCT_METAGRAPH +# define MAX_VERTICES_IN_METAGRAPH 10000 +#endif + +namespace boost { namespace graph { namespace distributed { + namespace cc_detail { + enum connected_components_message { + edges_msg, req_parents_msg, parents_msg, root_adj_msg + }; + + template + struct metaVertex { + metaVertex() {} + metaVertex(const Vertex& v) : name(v) {} + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & name; + } + + Vertex name; + }; + +#ifdef PBGL_CONSTRUCT_METAGRAPH + // Build meta-graph on result of local connected components + template + void + build_local_metagraph(const Graph& g, ParentMap p, RootIterator r, + RootIterator r_end, AdjacencyMap& adj) + { + // TODO: Static assert that AdjacencyMap::value_type is std::vector + + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + BOOST_STATIC_ASSERT((is_same >::value)); + + using boost::graph::parallel::process_group; + + process_group_type pg = process_group(g); + process_id_type id = process_id(pg); + + if (id != 0) { + + // Send component roots and their associated edges to P0 + for ( ; r != r_end; ++r ) { + std::vector adjs(1, *r); // Root + adjs.reserve(adjs.size() + adj[*r].size()); + for (typename std::vector::iterator iter = adj[*r].begin(); + iter != adj[*r].end(); ++iter) + adjs.push_back(get(p, *iter)); // Adjacencies + + send(pg, 0, root_adj_msg, adjs); + } + } + + synchronize(pg); + + if (id == 0) { + typedef metaVertex VertexProperties; + + typedef boost::adjacency_list metaGraph; + typedef typename graph_traits::vertex_descriptor + meta_vertex_descriptor; + + std::map vertex_map; + std::vector > edges; + + // Receive remote roots and edges + while (optional > m = probe(pg)) { + assert(m->second == root_adj_msg); + + std::vector adjs; + receive(pg, m->first, m->second, adjs); + + vertex_map[adjs[0]] = graph_traits::null_vertex(); + for (typename std::vector::iterator iter + = ++adjs.begin(); iter != adjs.end(); ++iter) + edges.push_back(std::make_pair(adjs[0], *iter)); + } + + // Add local roots and edges + for ( ; r != r_end; ++r ) { + vertex_map[*r] = graph_traits::null_vertex(); + edges.reserve(edges.size() + adj[*r].size()); + for (typename std::vector::iterator iter = adj[*r].begin(); + iter != adj[*r].end(); ++iter) + edges.push_back(std::make_pair(*r, get(p, *iter))); + } + + // Build local meta-graph + metaGraph mg; + + // Add vertices with property to map back to distributed graph vertex + for (typename std::map::iterator + iter = vertex_map.begin(); iter != vertex_map.end(); ++iter) + vertex_map[iter->first] + = add_vertex(metaVertex(iter->first), mg); + + // Build meta-vertex map + typename property_map::type + metaVertexMap = get(&VertexProperties::name, mg); + + typename std::vector > + ::iterator edge_iter = edges.begin(); + for ( ; edge_iter != edges.end(); ++edge_iter) + add_edge(vertex_map[edge_iter->first], vertex_map[edge_iter->second], mg); + + edges.clear(); + + // Call connected_components on it + typedef typename property_map::type + meta_index_map_type; + meta_index_map_type meta_index = get(vertex_index, mg); + + std::vector mg_component_vec(num_vertices(mg)); + typedef iterator_property_map::iterator, + meta_index_map_type> + meta_components_map_type; + meta_components_map_type mg_component(mg_component_vec.begin(), + meta_index); + std::size_t num_comp = connected_components(mg, mg_component); + + // Update Parent pointers + std::vector roots(num_comp, graph_traits::null_vertex()); + + BGL_FORALL_VERTICES_T(v, mg, metaGraph) { + size_t component = get(mg_component, v); + if (roots[component] == graph_traits::null_vertex() || + get(meta_index, v) < get(meta_index, roots[component])) + roots[component] = v; + } + + // Set all the local parent pointers + BGL_FORALL_VERTICES_T(v, mg, metaGraph) { + // Problem in value being put (3rd parameter) + put(p, get(metaVertexMap, v), get(metaVertexMap, roots[get(mg_component, v)])); + } + } + + synchronize(p); + } +#endif + + /* Function object used to remove internal vertices and vertices > + the current vertex from the adjacent vertex lists at each + root */ + template + class cull_adjacency_list + { + public: + cull_adjacency_list(const Vertex v, const ParentMap p) : v(v), p(p) {} + bool operator() (const Vertex x) { return (get(p, x) == v || x == v); } + + private: + const Vertex v; + const ParentMap p; + }; + + /* Comparison operator used to choose targets for hooking s.t. vertices + that are hooked to are evenly distributed across processors */ + template + class hashed_vertex_compare + { + public: + hashed_vertex_compare (const OwnerMap& o, const LocalMap& l) + : owner(o), local(l) { } + + template + bool operator() (const Vertex x, const Vertex y) + { + if (get(local, x) < get(local, y)) + return true; + else if (get(local, x) == get(local, y)) + return (get(owner, x) < get(owner, y)); + return false; + } + + private: + OwnerMap owner; + LocalMap local; + }; + +#ifdef PBGL_EXPLICIT_SYNCH + template + void + request_parent_map_entries(const Graph& g, ParentMap p, + std::vector& parent_requests) + { + typedef typename boost::graph::parallel::process_group_type + ::type process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + + process_group_type pg = process_group(g); + + /* + This should probably be send_oob_with_reply, especially when Dave + finishes prefetch-batching + */ + + // Send root requests + for (process_id_type i = 0; i < num_processes(pg); ++i) { + if (!parent_requests[i].empty()) { + std::vector reqs(parent_requests[i].begin(), + parent_requests[i].end()); + send(pg, i, req_parents_msg, reqs); + } + } + + synchronize(pg); + + // Receive root requests and reply to them + while (optional > m = probe(pg)) { + std::vector requests; + receive(pg, m->first, m->second, requests); + for (std::size_t i = 0; i < requests.size(); ++i) + requests[i] = get(p, requests[i]); + send(pg, m->first, parents_msg, requests); + } + + synchronize(pg); + + // Receive requested parents + std::vector responses; + for (process_id_type i = 0; i < num_processes(pg); ++i) { + if (!parent_requests[i].empty()) { + receive(pg, i, parents_msg, responses); + std::size_t parent_idx = 0; + for (typename VertexList::iterator v = parent_requests[i].begin(); + v != parent_requests[i].end(); ++v, ++parent_idx) + put(p, *v, responses[parent_idx]); + } + } + } +#endif + + template + void + parallel_connected_components(DistributedGraph& g, ParentMap p) + { + using boost::connected_components; + + typedef typename graph_traits::adjacency_iterator + adjacency_iterator; + typedef typename graph_traits::out_edge_iterator + out_edge_iterator; + typedef typename graph_traits::edge_iterator + edge_iterator; + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef typename graph_traits::edge_descriptor + edge_descriptor; + + typedef typename boost::graph::parallel::process_group_type + ::type process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + + using boost::graph::parallel::process_group; + + process_group_type pg = process_group(g); + process_id_type id = process_id(pg); + + // TODO (NGE): Should old_roots, roots, and completed_roots be std::list + adjacency_iterator av1, av2; + std::vector old_roots; + typename std::vector::iterator liter; + typename std::vector::iterator aliter; + typename std::map > adj; + + typedef typename property_map::const_type + OwnerMap; + OwnerMap owner = get(vertex_owner, g); + typedef typename property_map::const_type + LocalMap; + LocalMap local = get(vertex_local, g); + + // We need to hold on to all of the parent pointers + p.set_max_ghost_cells(0); + + // + // STAGE 1 : Compute local components + // + local_subgraph ls(g); + typedef typename property_map, + vertex_index_t>::type local_index_map_type; + local_index_map_type local_index = get(vertex_index, ls); + + // Compute local connected components + std::vector ls_components_vec(num_vertices(ls)); + typedef iterator_property_map::iterator, + local_index_map_type> + ls_components_map_type; + ls_components_map_type ls_component(ls_components_vec.begin(), + local_index); + std::size_t num_comp = connected_components(ls, ls_component); + + std::vector + roots(num_comp, graph_traits::null_vertex()); + + BGL_FORALL_VERTICES_T(v, g, DistributedGraph) { + size_t component = get(ls_component, v); + if (roots[component] == graph_traits::null_vertex() || + get(local_index, v) < get(local_index, roots[component])) + roots[component] = v; + } + + // Set all the local parent pointers + BGL_FORALL_VERTICES_T(v, g, DistributedGraph) { + put(p, v, roots[get(ls_component, v)]); + } + + if (num_processes(pg) == 1) return; + + // Build adjacency list for all roots + BGL_FORALL_VERTICES_T(v, g, DistributedGraph) { + std::vector& my_adj = adj[get(p, v)]; + for (boost::tie(av1, av2) = adjacent_vertices(v, g); + av1 != av2; ++av1) { + if (get(owner, *av1) != id) my_adj.push_back(*av1); + } + } + + // For all vertices adjacent to a local vertex get p(v) + for ( liter = roots.begin(); liter != roots.end(); ++liter ) { + std::vector& my_adj = adj[*liter]; + for ( aliter = my_adj.begin(); aliter != my_adj.end(); ++aliter ) + request(p, *aliter); + } + synchronize(p); + + // Update adjacency list at root to make sure all adjacent + // vertices are roots of remote components + for ( liter = roots.begin(); liter != roots.end(); ++liter ) + { + std::vector& my_adj = adj[*liter]; + for ( aliter = my_adj.begin(); aliter != my_adj.end(); ++aliter ) + *aliter = get(p, *aliter); + + my_adj.erase + (remove_if(my_adj.begin(), my_adj.end(), + cull_adjacency_list(*liter, p) ), + my_adj.end()); + // This sort needs to be here to make sure the initial + // adjacency list is sorted + sort(my_adj.begin(), my_adj.end(), std::less()); + my_adj.erase(unique(my_adj.begin(), my_adj.end()), my_adj.end()); + } + + // Get p(v) for the new adjacent roots + p.clear(); + for ( liter = roots.begin(); liter != roots.end(); ++liter ) { + std::vector& my_adj = adj[*liter]; + for ( aliter = my_adj.begin(); aliter != my_adj.end(); ++aliter ) + request(p, *aliter); + } +#ifdef PBGL_EXPLICIT_SYNCH + synchronize(p); +#endif + + // Lastly, remove roots with no adjacent vertices, this is + // unnecessary but will speed up sparse graphs + for ( liter = roots.begin(); liter != roots.end(); /*in loop*/) + { + if ( adj[*liter].empty() ) + liter = roots.erase(liter); + else + ++liter; + } + +#ifdef PBGL_CONSTRUCT_METAGRAPH + /* TODO: If the number of roots is sufficiently small, we can + use a 'problem folding' approach like we do in MST + to gather all the roots and their adjacencies on one proc + and solve for the connected components of the meta-graph */ + using boost::parallel::all_reduce; + std::size_t num_roots = all_reduce(pg, roots.size(), std::plus()); + if (num_roots < MAX_VERTICES_IN_METAGRAPH) { + build_local_metagraph(g, p, roots.begin(), roots.end(), adj); + + // For each vertex in g, p(v) = p(p(v)), assign parent of leaf + // vertices from first step to final parent + BGL_FORALL_VERTICES_T(v, g, DistributedGraph) { + put(p, v, get(p, get(p, v))); + } + + synchronize(p); + + return; + } +#endif + + // + // Parallel Phase + // + + std::vector completed_roots; + hashed_vertex_compare v_compare(owner, local); + bool any_hooked; + vertex_descriptor new_root; + + std::size_t steps = 0; + + do { + ++steps; + + // Pull in new parents for hooking phase + synchronize(p); + + // + // Hooking + // + bool hooked = false; + completed_roots.clear(); + for ( liter = roots.begin(); liter != roots.end(); ) + { + new_root = graph_traits::null_vertex(); + std::vector& my_adj = adj[*liter]; + for ( aliter = my_adj.begin(); aliter != my_adj.end(); ++aliter ) + // try to hook to better adjacent vertex + if ( v_compare( get(p, *aliter), *liter ) ) + new_root = get(p, *aliter); + + if ( new_root != graph_traits::null_vertex() ) + { + hooked = true; + put(p, *liter, new_root); + old_roots.push_back(*liter); + completed_roots.push_back(*liter); + liter = roots.erase(liter); + } + else + ++liter; + } + + // + // Pointer jumping, perform until new roots determined + // + + // TODO: Implement cycle reduction rules to reduce this from + // O(n) to O(log n) [n = cycle length] + bool all_done; + std::size_t parent_root_count; + + std::size_t double_steps = 0; + + do { + ++double_steps; +#ifndef PBGL_EXPLICIT_SYNCH + // Get p(p(v)) for all old roots, and p(v) for all current roots + for ( liter = old_roots.begin(); liter != old_roots.end(); ++liter ) + request(p, get(p, *liter)); + + synchronize(p); +#else + // Build root requests + typedef std::set VertexSet; + std::vector parent_requests(num_processes(pg)); + for ( liter = old_roots.begin(); liter != old_roots.end(); ++liter ) + { + vertex_descriptor p1 = *liter; + if (get(owner, p1) != id) parent_requests[get(owner, p1)].insert(p1); + vertex_descriptor p2 = get(p, p1); + if (get(owner, p2) != id) parent_requests[get(owner, p2)].insert(p2); + } + + request_parent_map_entries(g, p, parent_requests); +#endif + // Perform a pointer jumping step on all old roots + for ( liter = old_roots.begin(); liter != old_roots.end(); ++liter ) + put(p, *liter, get(p, get(p, *liter))); + + // make sure the parent of all old roots is itself a root + parent_root_count = 0; + for ( liter = old_roots.begin(); liter != old_roots.end(); ++liter ) + if ( get(p, *liter) == get(p, get(p, *liter)) ) + parent_root_count++; + + bool done = parent_root_count == old_roots.size(); + + all_reduce(pg, &done, &done+1, &all_done, + std::logical_and()); + } while ( !all_done ); +#ifdef PARALLEL_BGL_DEBUG + if (id == 0) std::cerr << double_steps << " doubling steps.\n"; +#endif + // + // Add adjacent vertices of just completed roots to adjacent + // vertex list at new parent + // + typename std::vector outgoing_edges; + for ( liter = completed_roots.begin(); liter != completed_roots.end(); + ++liter ) + { + vertex_descriptor new_parent = get(p, *liter); + + if ( get(owner, new_parent) == id ) + { + std::vector& my_adj = adj[new_parent]; + my_adj.reserve(my_adj.size() + adj[*liter].size()); + my_adj.insert( my_adj.end(), + adj[*liter].begin(), adj[*liter].end() ); +#ifdef PBGL_IN_PLACE_MERGE +#ifdef PBGL_SORT_ASSERT + assert(__gnu_cxx::is_sorted(my_adj.begin(), + my_adj.end() - adj[*liter].size(), + std::less())); + assert(__gnu_cxx::is_sorted(my_adj.end() - adj[*liter].size(), + my_adj.end(), + std::less())); +#endif + std::inplace_merge(my_adj.begin(), + my_adj.end() - adj[*liter].size(), + my_adj.end(), + std::less()); +#endif + + + } + else if ( adj[*liter].begin() != adj[*liter].end() ) + { + outgoing_edges.clear(); + outgoing_edges.reserve(adj[*liter].size() + 1); + // First element is the destination of the adjacency list + outgoing_edges.push_back(new_parent); + outgoing_edges.insert(outgoing_edges.end(), + adj[*liter].begin(), adj[*liter].end() ); + send(pg, get(owner, new_parent), edges_msg, outgoing_edges); + adj[*liter].clear(); + } + } + synchronize(pg); + + // Receive edges sent by remote nodes and add them to the + // indicated vertex's adjacency list + while (optional > m + = probe(pg)) + { + std::vector incoming_edges; + receive(pg, m->first, edges_msg, incoming_edges); + typename std::vector::iterator aviter + = incoming_edges.begin(); + ++aviter; + + std::vector& my_adj = adj[incoming_edges[0]]; + + my_adj.reserve(my_adj.size() + incoming_edges.size() - 1); + my_adj.insert( my_adj.end(), aviter, incoming_edges.end() ); + +#ifdef PBGL_IN_PLACE_MERGE + std::size_t num_incoming_edges = incoming_edges.size(); +#ifdef PBGL_SORT_ASSERT + assert(__gnu_cxx::is_sorted(my_adj.begin(), + my_adj.end() - (num_incoming_edges-1), + std::less())); + assert(__gnu_cxx::is_sorted(my_adj.end() - (num_incoming_edges-1), + my_adj.end(), + std::less())); +#endif + std::inplace_merge(my_adj.begin(), + my_adj.end() - (num_incoming_edges - 1), + my_adj.end(), + std::less()); +#endif + + } + + + // Remove any adjacent vertices that are in the same component + // as a root from that root's list + for ( liter = roots.begin(); liter != roots.end(); ++liter ) + { + // We can probably get away without sorting and removing + // duplicates Though sorting *may* cause root + // determination to occur faster by choosing the root with + // the most potential to hook to at each step + std::vector& my_adj = adj[*liter]; + my_adj.erase + (remove_if(my_adj.begin(), my_adj.end(), + cull_adjacency_list(*liter, p) ), + my_adj.end()); +#ifndef PBGL_IN_PLACE_MERGE + sort(my_adj.begin(), my_adj.end(), + std::less() ); +#endif + my_adj.erase(unique(my_adj.begin(), my_adj.end()), my_adj.end()); + } + + // Reduce result of empty root list test + all_reduce(pg, &hooked, &hooked+1, &any_hooked, + std::logical_or()); + } while ( any_hooked ); +#ifdef PARALLEL_BGL_DEBUG + if (id == 0) std::cerr << steps << " iterations.\n"; +#endif + // + // Finalize + // + + // For each vertex in g, p(v) = p(p(v)), assign parent of leaf + // vertices from first step to final parent + BGL_FORALL_VERTICES_T(v, g, DistributedGraph) { + put(p, v, get(p, get(p, v))); + } + + synchronize(p); + } + + } // end namespace cc_detail + + template + typename property_traits::value_type + number_components_from_parents(const Graph& g, ParentMap p, ComponentMap c) + { + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typedef typename property_traits::value_type + ComponentMapType; + + process_group_type pg = process_group(g); + + /* Build list of roots */ + std::vector my_roots, all_roots; + + BGL_FORALL_VERTICES_T(v, g, Graph) { + if( find( my_roots.begin(), my_roots.end(), get(p, v) ) + == my_roots.end() ) + my_roots.push_back( get(p, v) ); + } + + all_gather(pg, my_roots.begin(), my_roots.end(), all_roots); + + /* Number components */ + std::map comp_numbers; + ComponentMapType c_num = 0; + + // Compute component numbers + for (std::size_t i = 0; i < all_roots.size(); i++ ) + if ( comp_numbers.count(all_roots[i]) == 0 ) + comp_numbers[all_roots[i]] = c_num++; + + // Broadcast component numbers + BGL_FORALL_VERTICES_T(v, g, Graph) { + put( c, v, comp_numbers[get(p, v)] ); + } + + // Broadcast number of components + if (process_id(pg) == 0) { + typedef typename process_group_type::process_size_type + process_size_type; + for (process_size_type dest = 1, n = num_processes(pg); + dest != n; ++dest) + send(pg, dest, 0, c_num); + } + synchronize(pg); + + if (process_id(pg) != 0) receive(pg, 0, 0, c_num); + + synchronize(c); + + return c_num; + } + + template + int + number_components_from_parents(const Graph& g, ParentMap p, + dummy_property_map) + { + using boost::parallel::all_reduce; + + // Count local roots. + int num_roots = 0; + BGL_FORALL_VERTICES_T(v, g, Graph) + if (get(p, v) == v) ++num_roots; + return all_reduce(g.process_group(), num_roots, std::plus()); + } + + template + typename property_traits::value_type + connected_components + (const Graph& g, ComponentMap c, ParentMap p + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, distributed_graph_tag)) + { + cc_detail::parallel_connected_components(g, p); + return number_components_from_parents(g, p, c); + } + + /* Construct ParentMap by default */ + template + typename property_traits::value_type + connected_components + ( const Graph& g, ComponentMap c + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, distributed_graph_tag) ) + { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + std::vector x(num_vertices(g)); + + return connected_components + (g, c, + make_iterator_property_map(x.begin(), get(vertex_index, g))); + } +} // end namespace distributed + +using distributed::connected_components; +} // end namespace graph + +using graph::distributed::connected_components; +} // end namespace boost + +#endif // BOOST_GRAPH_PARALLEL_CC_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/connected_components_parallel_search.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/connected_components_parallel_search.hpp new file mode 100644 index 0000000000..8e4d286c3d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/connected_components_parallel_search.hpp @@ -0,0 +1,408 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Brian Barrett +// Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PARALLEL_CC_PS_HPP +#define BOOST_GRAPH_PARALLEL_CC_PS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// Connected components algorithm based on a parallel search. +// +// Every N nodes starts a parallel search from the first vertex in +// their local vertex list during the first superstep (the other nodes +// remain idle during the first superstep to reduce the number of +// conflicts in numbering the components). At each superstep, all new +// component mappings from remote nodes are handled. If there is no +// work from remote updates, a new vertex is removed from the local +// list and added to the work queue. +// +// Components are allocated from the component_value_allocator object, +// which ensures that a given component number is unique in the +// system, currently by using the rank and number of processes to +// stride allocations. +// +// When two components are discovered to actually be the same +// component, a mapping is created in the collisions object. The +// lower component number is prefered in the resolution, so component +// numbering resolution is consistent. After the search has exhausted +// all vertices in the graph, the mapping is shared with all +// processes, and they independently resolve the comonent mapping (so +// O((N * NP) + (V * NP)) work, in O(N + V) time, where N is the +// number of mappings and V is the number of local vertices). This +// phase can likely be significantly sped up if a clever algorithm for +// the reduction can be found. +namespace boost { namespace graph { namespace distributed { + namespace cc_ps_detail { + // Local object for allocating component numbers. There are two + // places this happens in the code, and I was getting sick of them + // getting out of sync. Components are not tightly packed in + // numbering, but are numbered to ensure each rank has its own + // independent sets of numberings. + template + class component_value_allocator { + public: + component_value_allocator(int num, int size) : + last(0), num(num), size(size) + { + } + + component_value_type allocate(void) + { + component_value_type ret = num + (last * size); + last++; + return ret; + } + + private: + component_value_type last; + int num; + int size; + }; + + + // Map of the "collisions" between component names in the global + // component mapping. TO make cleanup easier, component numbers + // are added, pointing to themselves, when a new component is + // found. In order to make the results deterministic, the lower + // component number is always taken. The resolver will drill + // through the map until it finds a component entry that points to + // itself as the next value, allowing some cleanup to happen at + // update() time. Attempts are also made to update the mapping + // when new entries are created. + // + // Note that there's an assumption that the entire mapping is + // shared during the end of the algorithm, but before component + // name resolution. + template + class collision_map { + public: + collision_map() : num_unique(0) + { + } + + // add new component mapping first time component is used. Own + // function only so that we can sanity check there isn't already + // a mapping for that component number (which would be bad) + void add(const component_value_type &a) + { + assert(collisions.count(a) == 0); + collisions[a] = a; + } + + // add a mapping between component values saying they're the + // same component + void add(const component_value_type &a, const component_value_type &b) + { + component_value_type high, low, tmp; + if (a > b) { + high = a; + low = b; + } else { + high = b; + low = a; + } + + if (collisions.count(high) != 0 && collisions[high] != low) { + tmp = collisions[high]; + if (tmp > low) { + collisions[tmp] = low; + collisions[high] = low; + } else { + collisions[low] = tmp; + collisions[high] = tmp; + } + } else { + collisions[high] = low; + } + + } + + // get the "real" component number for the given component. + // Used to resolve mapping at end of run. + component_value_type update(component_value_type a) + { + assert(num_unique > 0); + assert(collisions.count(a) != 0); + return collisions[a]; + } + + // collapse the collisions tree, so that update is a one lookup + // operation. Count unique components at the same time. + void uniqify(void) + { + typename std::map::iterator i, end; + + end = collisions.end(); + for (i = collisions.begin() ; i != end ; ++i) { + if (i->first == i->second) { + num_unique++; + } else { + i->second = collisions[i->second]; + } + } + } + + // get the number of component entries that have an associated + // component number of themselves, which are the real components + // used in the final mapping. This is the number of unique + // components in the graph. + int unique(void) + { + assert(num_unique > 0); + return num_unique; + } + + // "serialize" into a vector for communication. + std::vector serialize(void) + { + std::vector ret; + typename std::map::iterator i, end; + + end = collisions.end(); + for (i = collisions.begin() ; i != end ; ++i) { + ret.push_back(i->first); + ret.push_back(i->second); + } + + return ret; + } + + private: + std::map collisions; + int num_unique; + }; + + + // resolver to handle remote updates. The resolver will add + // entries into the collisions map if required, and if it is the + // first time the vertex has been touched, it will add the vertex + // to the remote queue. Note that local updates are handled + // differently, in the main loop (below). + + // BWB - FIX ME - don't need graph anymore - can pull from key value of Component Map. + template + struct update_reducer { + BOOST_STATIC_CONSTANT(bool, non_default_resolver = false); + + typedef typename property_traits::value_type component_value_type; + typedef typename property_traits::key_type vertex_descriptor; + + update_reducer(work_queue *q, + cc_ps_detail::collision_map *collisions, + processor_id_type pg_id) : + q(q), collisions(collisions), pg_id(pg_id) + { + } + + // ghost cell initialization routine. This should never be + // called in this imlementation. + template + component_value_type operator()(const K&) const + { + return component_value_type(0); + } + + // resolver for remote updates. I'm not entirely sure why, but + // I decided to not change the value of the vertex if it's + // already non-infinite. It doesn't matter in the end, as we'll + // touch every vertex in the cleanup phase anyway. If the + // component is currently infinite, set to the new component + // number and add the vertex to the work queue. If it's not + // infinite, we've touched it already so don't add it to the + // work queue. Do add a collision entry so that we know the two + // components are the same. + component_value_type operator()(const vertex_descriptor &v, + const component_value_type& current, + const component_value_type& update) const + { + const component_value_type max = (std::numeric_limits::max)(); + component_value_type ret = current; + + if (max == current) { + q->push(v); + ret = update; + } else if (current != update) { + collisions->add(current, update); + } + + return ret; + } + + // So for whatever reason, the property map can in theory call + // the resolver with a local descriptor in addition to the + // standard global descriptor. As far as I can tell, this code + // path is never taken in this implementation, but I need to + // have this code here to make it compile. We just make a + // global descriptor and call the "real" operator(). + template + component_value_type operator()(const K& v, + const component_value_type& current, + const component_value_type& update) const + { + return (*this)(vertex_descriptor(pg_id, v), current, update); + } + + private: + work_queue *q; + collision_map *collisions; + boost::processor_id_type pg_id; + }; + + } // namespace cc_ps_detail + + + template + typename property_traits::value_type + connected_components_ps(const Graph& g, ComponentMap c) + { + using boost::graph::parallel::process_group; + + typedef typename property_traits::value_type component_value_type; + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph::parallel::process_group_type + ::type process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + typedef typename property_map + ::const_type vertex_owner_map; + typedef std::queue work_queue; + + static const component_value_type max_component = + (std::numeric_limits::max)(); + typename property_map::const_type + owner = get(vertex_owner, g); + + // standard who am i? stuff + process_group_type pg = process_group(g); + process_id_type id = process_id(pg); + + // Initialize every vertex to have infinite component number + BGL_FORALL_VERTICES_T(v, g, Graph) put(c, v, max_component); + + vertex_iterator current, end; + boost::tie(current, end) = vertices(g); + + cc_ps_detail::component_value_allocator cva(process_id(pg), num_processes(pg)); + cc_ps_detail::collision_map collisions; + work_queue q; // this is intentionally a local data structure + c.set_reduce(cc_ps_detail::update_reducer(&q, &collisions, id)); + + // add starting work + while (true) { + bool useful_found = false; + component_value_type val = cva.allocate(); + put(c, *current, val); + collisions.add(val); + q.push(*current); + if (0 != out_degree(*current, g)) useful_found = true; + ++current; + if (useful_found) break; + } + + // Run the loop until everyone in the system is done + bool global_done = false; + while (!global_done) { + + // drain queue of work for this superstep + while (!q.empty()) { + vertex_descriptor v = q.front(); + q.pop(); + // iterate through outedges of the vertex currently being + // examined, setting their component to our component. There + // is no way to end up in the queue without having a component + // number already. + + BGL_FORALL_ADJ_T(v, peer, g, Graph) { + component_value_type my_component = get(c, v); + + // update other vertex with our component information. + // Resolver will handle remote collisions as well as whether + // to put the vertex on the work queue or not. We have to + // handle local collisions and work queue management + if (id == get(owner, peer)) { + if (max_component == get(c, peer)) { + put(c, peer, my_component); + q.push(peer); + } else if (my_component != get(c, peer)) { + collisions.add(my_component, get(c, peer)); + } + } else { + put(c, peer, my_component); + } + } + } + + // synchronize / start a new superstep. + synchronize(pg); + global_done = all_reduce(pg, (q.empty() && (current == end)), boost::parallel::minimum()); + + // If the queue is currently empty, add something to do to start + // the current superstep (supersteps start at the sync, not at + // the top of the while loop as one might expect). Down at the + // bottom of the while loop so that not everyone starts the + // algorithm with something to do, to try to reduce component + // name conflicts + if (q.empty()) { + bool useful_found = false; + for ( ; current != end && !useful_found ; ++current) { + if (max_component == get(c, *current)) { + component_value_type val = cva.allocate(); + put(c, *current, val); + collisions.add(val); + q.push(*current); + if (0 != out_degree(*current, g)) useful_found = true; + } + } + } + } + + // share component mappings + std::vector global; + std::vector mine = collisions.serialize(); + all_gather(pg, mine.begin(), mine.end(), global); + for (size_t i = 0 ; i < global.size() ; i += 2) { + collisions.add(global[i], global[i + 1]); + } + collisions.uniqify(); + + // update the component mappings + BGL_FORALL_VERTICES_T(v, g, Graph) { + put(c, v, collisions.update(get(c, v))); + } + + return collisions.unique(); + } + +} // end namespace distributed + +} // end namespace graph + +} // end namespace boost + +#endif // BOOST_GRAPH_PARALLEL_CC_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp new file mode 100644 index 0000000000..7f8d9f5297 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp @@ -0,0 +1,664 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +/************************************************************************** + * This source file implements the variation on Dijkstra's algorithm * + * presented by Crauser et al. in: * + * * + * Andreas Crauser, Kurt Mehlhorn, Ulrich Meyer, and Peter * + * Sanders. A Parallelization of Dijkstra's Shortest Path * + * Algorithm. In Lubos Brim, Jozef Gruska, and Jiri Zlatuska, * + * editors, Mathematical Foundations of Computer Science (MFCS), * + * volume 1450 of Lecture Notes in Computer Science, pages * + * 722--731, 1998. Springer. * + * * + * This implementation is, however, restricted to the distributed-memory * + * case, where the work is distributed by virtue of the vertices being * + * distributed. In a shared-memory (single address space) context, we * + * would want to add an explicit balancing step. * + **************************************************************************/ +#ifndef BOOST_GRAPH_CRAUSER_ET_AL_SHORTEST_PATHS_HPP +#define BOOST_GRAPH_CRAUSER_ET_AL_SHORTEST_PATHS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef PBGL_ACCOUNTING +# include +# include +#endif // PBGL_ACCOUNTING + +#ifdef MUTABLE_QUEUE +# include +#endif + +namespace boost { namespace graph { namespace distributed { + +#ifdef PBGL_ACCOUNTING +struct crauser_et_al_shortest_paths_stats_t +{ + /* Total wall-clock time used by the algorithm.*/ + accounting::time_type execution_time; + + /* The number of vertices deleted in each superstep. */ + std::vector deleted_vertices; + + template + void print(OutputStream& out) + { + double avg_deletions = std::accumulate(deleted_vertices.begin(), + deleted_vertices.end(), + 0.0); + avg_deletions /= deleted_vertices.size(); + + out << "Problem = \"Single-Source Shortest Paths\"\n" + << "Algorithm = \"Crauser et al\"\n" + << "Function = crauser_et_al_shortest_paths\n" + << "Wall clock time = " << accounting::print_time(execution_time) + << "\nSupersteps = " << deleted_vertices.size() << "\n" + << "Avg. deletions per superstep = " << avg_deletions << "\n"; + } +}; + +static crauser_et_al_shortest_paths_stats_t crauser_et_al_shortest_paths_stats; +#endif + +namespace detail { + + /************************************************************************ + * Function objects that perform distance comparisons modified by the * + * minimum or maximum edge weights. * + ************************************************************************/ + template + struct min_in_distance_compare + : std::binary_function + { + min_in_distance_compare(DistanceMap d, MinInWeightMap m, + Combine combine, Compare compare) + : distance_map(d), min_in_weight(m), combine(combine), + compare(compare) + { + } + + bool operator()(const Vertex& x, const Vertex& y) const + { + return compare(combine(get(distance_map, x), -get(min_in_weight, x)), + combine(get(distance_map, y), -get(min_in_weight, y))); + } + + private: + DistanceMap distance_map; + MinInWeightMap min_in_weight; + Combine combine; + Compare compare; + }; + + template + struct min_out_distance_compare + : std::binary_function + { + min_out_distance_compare(DistanceMap d, MinOutWeightMap m, + Combine combine, Compare compare) + : distance_map(d), min_out_weight(m), combine(combine), + compare(compare) + { + } + + bool operator()(const Vertex& x, const Vertex& y) const + { + return compare(combine(get(distance_map, x), get(min_out_weight, x)), + combine(get(distance_map, y), get(min_out_weight, y))); + } + + private: + DistanceMap distance_map; + MinOutWeightMap min_out_weight; + Combine combine; + Compare compare; + }; + /************************************************************************/ + + /************************************************************************ + * Dijkstra queue that implements Crauser et al.'s criteria. This queue * + * actually stores three separate priority queues, to help expose all * + * vertices that can be processed in a single phase. * + ************************************************************************/ + template + class crauser_et_al_dijkstra_queue + : public graph::detail::remote_update_set< + crauser_et_al_dijkstra_queue< + Graph, Combine, Compare, VertexIndexMap, DistanceMap, + PredecessorMap, MinOutWeightMap, MinInWeightMap>, + typename boost::graph::parallel::process_group_type::type, + typename dijkstra_msg_value::type, + typename property_map::const_type> + { + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef crauser_et_al_dijkstra_queue self_type; + typedef dijkstra_msg_value msg_value_creator; + typedef typename msg_value_creator::type msg_value_type; + typedef typename graph_traits::vertices_size_type + vertices_size_type; + typedef typename property_map::const_type + OwnerPropertyMap; + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typedef graph::detail::remote_update_set + inherited; + + // Priority queue for tentative distances + typedef indirect_cmp dist_queue_compare_type; + + typedef typename property_traits::value_type distance_type; + +#ifdef MUTABLE_QUEUE + typedef mutable_queue, + dist_queue_compare_type, VertexIndexMap> dist_queue_type; + +#else + typedef relaxed_heap dist_queue_type; +#endif // MUTABLE_QUEUE + + // Priority queue for OUT criteria + typedef min_out_distance_compare + out_queue_compare_type; + +#ifdef MUTABLE_QUEUE + typedef mutable_queue, + out_queue_compare_type, VertexIndexMap> out_queue_type; + +#else + typedef relaxed_heap out_queue_type; +#endif // MUTABLE_QUEUE + + // Priority queue for IN criteria + typedef min_in_distance_compare + in_queue_compare_type; + +#ifdef MUTABLE_QUEUE + typedef mutable_queue, + in_queue_compare_type, VertexIndexMap> in_queue_type; + +#else + typedef relaxed_heap in_queue_type; +#endif // MUTABLE_QUEUE + + typedef typename process_group_type::process_id_type process_id_type; + + public: + typedef typename dist_queue_type::size_type size_type; + typedef typename dist_queue_type::value_type value_type; + + crauser_et_al_dijkstra_queue(const Graph& g, + const Combine& combine, + const Compare& compare, + const VertexIndexMap& id, + const DistanceMap& distance_map, + const PredecessorMap& predecessor_map, + const MinOutWeightMap& min_out_weight, + const MinInWeightMap& min_in_weight) + : inherited(boost::graph::parallel::process_group(g), get(vertex_owner, g)), + dist_queue(num_vertices(g), + dist_queue_compare_type(distance_map, compare), + id), + out_queue(num_vertices(g), + out_queue_compare_type(distance_map, min_out_weight, + combine, compare), + id), + in_queue(num_vertices(g), + in_queue_compare_type(distance_map, min_in_weight, + combine, compare), + id), + g(g), + distance_map(distance_map), + predecessor_map(predecessor_map), + min_out_weight(min_out_weight), + min_in_weight(min_in_weight), + min_distance(0), + min_out_distance(0) +#ifdef PBGL_ACCOUNTING + , local_deletions(0) +#endif + { } + + void push(const value_type& x) + { + msg_value_type msg_value = + msg_value_creator::create(get(distance_map, x), + predecessor_value(get(predecessor_map, x))); + inherited::update(x, msg_value); + } + + void update(const value_type& x) { push(x); } + + void pop() + { + // Remove from distance queue + dist_queue.remove(top_vertex); + + // Remove from OUT queue + out_queue.remove(top_vertex); + + // Remove from IN queue + in_queue.remove(top_vertex); + +#ifdef PBGL_ACCOUNTING + ++local_deletions; +#endif + } + + vertex_descriptor& top() { return top_vertex; } + const vertex_descriptor& top() const { return top_vertex; } + + bool empty() + { + inherited::collect(); + + // If there are no suitable messages, wait until we get something + while (!has_suitable_vertex()) { + if (do_synchronize()) return true; + } + // Return true only if nobody has any messages; false if we + // have suitable messages + return false; + } + + bool do_synchronize() + { + using boost::parallel::all_reduce; + using boost::parallel::minimum; + + inherited::synchronize(); + + // TBD: could use combine here, but then we need to stop using + // minimum() as the function object. + distance_type local_distances[2]; + local_distances[0] = + dist_queue.empty()? (std::numeric_limits::max)() + : get(distance_map, dist_queue.top()); + + local_distances[1] = + out_queue.empty()? (std::numeric_limits::max)() + : (get(distance_map, out_queue.top()) + + get(min_out_weight, out_queue.top())); + + distance_type distances[2]; + all_reduce(this->process_group, local_distances, local_distances + 2, + distances, minimum()); + min_distance = distances[0]; + min_out_distance = distances[1]; + +#ifdef PBGL_ACCOUNTING + std::size_t deletions = 0; + all_reduce(this->process_group, &local_deletions, &local_deletions + 1, + &deletions, std::plus()); + if (process_id(this->process_group) == 0) { + crauser_et_al_shortest_paths_stats.deleted_vertices.push_back(deletions); + } + local_deletions = 0; + assert(deletions > 0); +#endif + + return min_distance == (std::numeric_limits::max)(); + } + + private: + vertex_descriptor predecessor_value(vertex_descriptor v) const + { return v; } + + vertex_descriptor + predecessor_value(property_traits::reference) const + { return graph_traits::null_vertex(); } + + bool has_suitable_vertex() const + { + if (!dist_queue.empty()) { + top_vertex = dist_queue.top(); + if (get(distance_map, dist_queue.top()) <= min_out_distance) + return true; + } + + if (!in_queue.empty()) { + top_vertex = in_queue.top(); + return (get(distance_map, top_vertex) + - get(min_in_weight, top_vertex)) <= min_distance; + } + return false; + } + + public: + void + receive_update(process_id_type source, vertex_descriptor vertex, + distance_type distance) + { + // Update the queue if the received distance is better than + // the distance we know locally + if (distance < get(distance_map, vertex) + || (distance == get(distance_map, vertex) + && source == process_id(this->process_group))) { + // Update the local distance map + put(distance_map, vertex, distance); + + bool is_in_queue = dist_queue.contains(vertex); + + if (!is_in_queue) { + dist_queue.push(vertex); + out_queue.push(vertex); + in_queue.push(vertex); + } + else { + dist_queue.update(vertex); + out_queue.update(vertex); + in_queue.update(vertex); + } + } + } + + void + receive_update(process_id_type source, vertex_descriptor vertex, + std::pair p) + { + if (p.first <= get(distance_map, vertex)) { + put(predecessor_map, vertex, p.second); + receive_update(source, vertex, p.first); + } + } + + private: + dist_queue_type dist_queue; + out_queue_type out_queue; + in_queue_type in_queue; + mutable value_type top_vertex; + const Graph& g; + DistanceMap distance_map; + PredecessorMap predecessor_map; + MinOutWeightMap min_out_weight; + MinInWeightMap min_in_weight; + distance_type min_distance; + distance_type min_out_distance; +#ifdef PBGL_ACCOUNTING + std::size_t local_deletions; +#endif + }; + /************************************************************************/ + + /************************************************************************ + * Initialize the property map that contains the minimum incoming edge * + * weight for each vertex. There are separate implementations for * + * directed, bidirectional, and undirected graph. * + ************************************************************************/ + template + void + initialize_min_in_weights(const Graph& g, MinInWeightMap min_in_weight, + WeightMap weight, Inf inf, Compare compare, + directed_tag, incidence_graph_tag) + { + // Send minimum weights off to the owners + set_property_map_role(vertex_distance, min_in_weight); + BGL_FORALL_VERTICES_T(v, g, Graph) { + BGL_FORALL_OUTEDGES_T(v, e, g, Graph) { + if (get(weight, e) < get(min_in_weight, target(e, g))) + put(min_in_weight, target(e, g), get(weight, e)); + } + } + + using boost::graph::parallel::process_group; + synchronize(process_group(g)); + + // Replace any infinities with zeros + BGL_FORALL_VERTICES_T(v, g, Graph) { + if (get(min_in_weight, v) == inf) put(min_in_weight, v, 0); + } + } + + template + void + initialize_min_in_weights(const Graph& g, MinInWeightMap min_in_weight, + WeightMap weight, Inf inf, Compare compare, + directed_tag, bidirectional_graph_tag) + { +#if 0 + typename property_map::const_type + local = get(vertex_local, g); + + // This code assumes that the properties of the in-edges are + // available locally. This is not necessarily the case, so don't + // do this yet. + set_property_map_role(vertex_distance, min_in_weight); + BGL_FORALL_VERTICES_T(v, g, Graph) { + if (in_edges(v, g).first != in_edges(v, g).second) { + std::cerr << "weights(" << g.distribution().global(get(local, v)) + << ") = "; + BGL_FORALL_INEDGES_T(v, e, g, Graph) { + std::cerr << get(weight, e) << ' '; + } + std::cerr << std::endl; + put(min_in_weight, v, + *std::min_element + (make_property_map_iterator(weight, in_edges(v, g).first), + make_property_map_iterator(weight, in_edges(v, g).second), + compare)); + } else { + put(min_in_weight, v, 0); + } + std::cerr << "miw(" << g.distribution().global(get(local, v)) << ") = " + << get(min_in_weight, v) << std::endl; + } +#else + initialize_min_in_weights(g, min_in_weight, weight, inf, compare, + directed_tag(), incidence_graph_tag()); +#endif + } + + template + inline void + initialize_min_in_weights(const Graph&, MinInWeightMap, WeightMap, Inf, + Compare, undirected_tag, bidirectional_graph_tag) + { + // In weights are the same as out weights, so do nothing + } + /************************************************************************/ + + + /************************************************************************ + * Initialize the property map that contains the minimum outgoing edge * + * weight for each vertex. * + ************************************************************************/ + template + void + initialize_min_out_weights(const Graph& g, MinOutWeightMap min_out_weight, + WeightMap weight, Compare compare) + { + typedef typename property_traits::value_type weight_type; + + BGL_FORALL_VERTICES_T(v, g, Graph) { + if (out_edges(v, g).first != out_edges(v, g).second) { + put(min_out_weight, v, + *std::min_element + (make_property_map_iterator(weight, out_edges(v, g).first), + make_property_map_iterator(weight, out_edges(v, g).second), + compare)); + if (get(min_out_weight, v) < weight_type(0)) + boost::throw_exception(negative_edge()); + } + } + } + + /************************************************************************/ + +} // end namespace detail + +template +void +crauser_et_al_shortest_paths + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight, + IndexMap index_map, ColorMap color_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis) +{ + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + typedef typename graph_traits::vertex_descriptor + Vertex; + typedef typename graph_traits::vertices_size_type + vertices_size_type; + +#ifdef PBGL_ACCOUNTING + crauser_et_al_shortest_paths_stats.deleted_vertices.clear(); + crauser_et_al_shortest_paths_stats.execution_time = accounting::get_time(); +#endif + + // Property map that stores the lowest edge weight outgoing from + // each vertex. If a vertex has no out-edges, the stored weight + // is zero. + typedef typename property_traits::value_type weight_type; + typedef iterator_property_map MinOutWeightMap; + std::vector min_out_weights_vec(num_vertices(g), inf); + MinOutWeightMap min_out_weight(&min_out_weights_vec.front(), index_map); + detail::initialize_min_out_weights(g, min_out_weight, weight, compare); + + // Property map that stores the lowest edge weight incoming to + // each vertex. For undirected graphs, this will just be a + // shallow copy of the version for outgoing edges. + typedef typename graph_traits::directed_category + directed_category; + const bool is_undirected = + is_same::value; + typedef MinOutWeightMap MinInWeightMap; + std::vector + min_in_weights_vec(is_undirected? 1 : num_vertices(g), inf); + MinInWeightMap min_in_weight(&min_in_weights_vec.front(), index_map); + typedef typename graph_traits::traversal_category + category; + detail::initialize_min_in_weights(g, min_in_weight, weight, inf, compare, + directed_category(), category()); + + // Initialize local portion of property maps + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + put(distance, *ui, inf); + put(predecessor, *ui, *ui); + } + put(distance, s, zero); + + // Dijkstra Queue + typedef detail::crauser_et_al_dijkstra_queue + + Queue; + + Queue Q(g, combine, compare, index_map, distance, predecessor, + min_out_weight, is_undirected? min_out_weight : min_in_weight); + + // Parallel Dijkstra visitor + ::boost::detail::dijkstra_bfs_visitor< + DijkstraVisitor, Queue, WeightMap, + boost::parallel::caching_property_map, + boost::parallel::caching_property_map, Combine, Compare + > bfs_vis(vis, Q, weight, + boost::parallel::make_caching_property_map(predecessor), + boost::parallel::make_caching_property_map(distance), + combine, compare, zero); + + set_property_map_role(vertex_color, color_map); + set_property_map_role(vertex_distance, distance); + + breadth_first_search(g, s, Q, bfs_vis, color_map); + +#ifdef PBGL_ACCOUNTING + crauser_et_al_shortest_paths_stats.execution_time = + accounting::get_time() - crauser_et_al_shortest_paths_stats.execution_time; +#endif +} + +template +void +crauser_et_al_shortest_paths + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight) +{ + typedef typename property_traits::value_type distance_type; + + std::vector colors(num_vertices(g), white_color); + + crauser_et_al_shortest_paths(g, s, predecessor, distance, weight, + get(vertex_index, g), + make_iterator_property_map(&colors[0], + get(vertex_index, g)), + std::less(), + closed_plus(), + (std::numeric_limits::max)(), + distance_type(), + dijkstra_visitor<>()); +} + +template +void +crauser_et_al_shortest_paths + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance) +{ + crauser_et_al_shortest_paths(g, s, predecessor, distance, + get(edge_weight, g)); +} + +} // end namespace distributed + +#ifdef PBGL_ACCOUNTING +using distributed::crauser_et_al_shortest_paths_stats; +#endif + +using distributed::crauser_et_al_shortest_paths; + + +} } // end namespace boost::graph + +#endif // BOOST_GRAPH_CRAUSER_ET_AL_SHORTEST_PATHS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/dehne_gotz_min_spanning_tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/dehne_gotz_min_spanning_tree.hpp new file mode 100644 index 0000000000..4554dbbaf5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/dehne_gotz_min_spanning_tree.hpp @@ -0,0 +1,938 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +/** + * This header implements four distributed algorithms to compute + * the minimum spanning tree (actually, minimum spanning forest) of a + * graph. All of the algorithms were implemented as specified in the + * paper by Dehne and Gotz: + * + * Frank Dehne and Silvia Gotz. Practical Parallel Algorithms for Minimum + * Spanning Trees. In Symposium on Reliable Distributed Systems, + * pages 366--371, 1998. + * + * There are four algorithm variants implemented. + */ + +#ifndef BOOST_DEHNE_GOTZ_MIN_SPANNING_TREE_HPP +#define BOOST_DEHNE_GOTZ_MIN_SPANNING_TREE_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace graph { namespace distributed { + +namespace detail { + /** + * Binary function object type that selects the (edge, weight) pair + * with the minimum weight. Used within a Boruvka merge step to select + * the candidate edges incident to each supervertex. + */ + struct smaller_weighted_edge + { + template + std::pair + operator()(const std::pair& x, + const std::pair& y) const + { return x.second < y.second? x : y; } + }; + + /** + * Unary predicate that determines if the source and target vertices + * of the given edge have the same representative within a disjoint + * sets data structure. Used to indicate when an edge is now a + * self-loop because of supervertex merging in Boruvka's algorithm. + */ + template + class do_has_same_supervertex + { + public: + typedef typename graph_traits::edge_descriptor edge_descriptor; + + do_has_same_supervertex(DisjointSets& dset, const Graph& g) + : dset(dset), g(g) { } + + bool operator()(edge_descriptor e) + { return dset.find_set(source(e, g)) == dset.find_set(target(e, g)); } + + private: + DisjointSets& dset; + const Graph& g; + }; + + /** + * Build a @ref do_has_same_supervertex object. + */ + template + inline do_has_same_supervertex + has_same_supervertex(DisjointSets& dset, const Graph& g) + { return do_has_same_supervertex(dset, g); } + + /** \brief A single distributed Boruvka merge step. + * + * A distributed Boruvka merge step involves computing (globally) + * the minimum weight edges incident on each supervertex and then + * merging supervertices along these edges. Once supervertices are + * merged, self-loops are eliminated. + * + * The set of parameters passed to this algorithm is large, and + * considering this algorithm in isolation there are several + * redundancies. However, the more asymptotically efficient + * distributed MSF algorithms require mixing Boruvka steps with the + * merging of local MSFs (implemented in + * merge_local_minimum_spanning_trees_step): the interaction of the + * two algorithms mandates the addition of these parameters. + * + * \param pg The process group over which communication should be + * performed. Within the distributed Boruvka algorithm, this will be + * equivalent to \code process_group(g); however, in the context of + * the mixed MSF algorithms, the process group @p pg will be a + * (non-strict) process subgroup of \code process_group(g). + * + * \param g The underlying graph on which the MSF is being + * computed. The type of @p g must model DistributedGraph, but there + * are no other requirements because the edge and (super)vertex + * lists are passed separately. + * + * \param weight_map Property map containing the weights of each + * edge. The type of this property map must model + * ReadablePropertyMap and must support caching. + * + * \param out An output iterator that will be written with the set + * of edges selected to build the MSF. Every process within the + * process group @p pg will receive all edges in the MSF. + * + * \param dset Disjoint sets data structure mapping from vertices in + * the graph @p g to their representative supervertex. + * + * \param supervertex_map Mapping from supervertex descriptors to + * indices. + * + * \param supervertices A vector containing all of the + * supervertices. Will be modified to include only the remaining + * supervertices after merging occurs. + * + * \param edge_list The list of edges that remain in the graph. This + * list will be pruned to remove self-loops once MSF edges have been + * found. + */ + template + OutputIterator + boruvka_merge_step(ProcessGroup pg, const Graph& g, WeightMap weight_map, + OutputIterator out, + disjoint_sets& dset, + SupervertexMap supervertex_map, + std::vector& supervertices, + EdgeList& edge_list) + { + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef typename graph_traits::vertices_size_type + vertices_size_type; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename EdgeList::iterator edge_iterator; + typedef typename property_traits::value_type + weight_type; + typedef boost::parallel::detail::untracked_pair w_edge; + typedef typename property_traits::value_type + supervertex_index; + + smaller_weighted_edge min_edge; + weight_type inf = (std::numeric_limits::max)(); + + // Renumber the supervertices + for (std::size_t i = 0; i < supervertices.size(); ++i) + put(supervertex_map, supervertices[i], i); + + // BSP-B1: Find local minimum-weight edges for each supervertex + std::vector candidate_edges(supervertices.size(), + w_edge(edge_descriptor(), inf)); + for (edge_iterator ei = edge_list.begin(); ei != edge_list.end(); ++ei) { + weight_type w = get(weight_map, *ei); + supervertex_index u = + get(supervertex_map, dset.find_set(source(*ei, g))); + supervertex_index v = + get(supervertex_map, dset.find_set(target(*ei, g))); + + if (u != v) { + candidate_edges[u] = min_edge(candidate_edges[u], w_edge(*ei, w)); + candidate_edges[v] = min_edge(candidate_edges[v], w_edge(*ei, w)); + } + } + + // BSP-B2 (a): Compute global minimum edges for each supervertex + all_reduce(pg, + &candidate_edges[0], + &candidate_edges[0] + candidate_edges.size(), + &candidate_edges[0], min_edge); + + // BSP-B2 (b): Use the edges to compute sequentially the new + // connected components and emit the edges. + for (vertices_size_type i = 0; i < candidate_edges.size(); ++i) { + if (candidate_edges[i].second != inf) { + edge_descriptor e = candidate_edges[i].first; + vertex_descriptor u = dset.find_set(source(e, g)); + vertex_descriptor v = dset.find_set(target(e, g)); + if (u != v) { + // Emit the edge, but cache the weight so everyone knows it + cache(weight_map, e, candidate_edges[i].second); + *out++ = e; + + // Link the two supervertices + dset.link(u, v); + + // Whichever vertex was reparented will be removed from the + // list of supervertices. + vertex_descriptor victim = u; + if (dset.find_set(u) == u) victim = v; + supervertices[get(supervertex_map, victim)] = + graph_traits::null_vertex(); + } + } + } + + // BSP-B3: Eliminate self-loops + edge_list.erase(std::remove_if(edge_list.begin(), edge_list.end(), + has_same_supervertex(dset, g)), + edge_list.end()); + + // TBD: might also eliminate multiple edges between supervertices + // when the edges do not have the best weight, but this is not + // strictly necessary. + + // Eliminate supervertices that have been absorbed + supervertices.erase(std::remove(supervertices.begin(), + supervertices.end(), + graph_traits::null_vertex()), + supervertices.end()); + + return out; + } + + /** + * An edge descriptor adaptor that reroutes the source and target + * edges to different vertices, but retains the original edge + * descriptor for, e.g., property maps. This is used when we want to + * turn a set of edges in the overall graph into a set of edges + * between supervertices. + */ + template + struct supervertex_edge_descriptor + { + typedef supervertex_edge_descriptor self_type; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + + Vertex source; + Vertex target; + Edge e; + + operator Edge() const { return e; } + + friend inline bool operator==(const self_type& x, const self_type& y) + { return x.e == y.e; } + + friend inline bool operator!=(const self_type& x, const self_type& y) + { return x.e != y.e; } + }; + + template + inline typename supervertex_edge_descriptor::Vertex + source(supervertex_edge_descriptor se, const Graph&) + { return se.source; } + + template + inline typename supervertex_edge_descriptor::Vertex + target(supervertex_edge_descriptor se, const Graph&) + { return se.target; } + + /** + * Build a supervertex edge descriptor from a normal edge descriptor + * using the given disjoint sets data structure to identify + * supervertex representatives. + */ + template + struct build_supervertex_edge_descriptor + { + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + + typedef Edge argument_type; + typedef supervertex_edge_descriptor result_type; + + build_supervertex_edge_descriptor() : g(0), dsets(0) { } + + build_supervertex_edge_descriptor(const Graph& g, DisjointSets& dsets) + : g(&g), dsets(&dsets) { } + + result_type operator()(argument_type e) const + { + result_type result; + result.source = dsets->find_set(source(e, *g)); + result.target = dsets->find_set(target(e, *g)); + result.e = e; + return result; + } + + private: + const Graph* g; + DisjointSets* dsets; + }; + + template + inline build_supervertex_edge_descriptor + make_supervertex_edge_descriptor(const Graph& g, DisjointSets& dsets) + { return build_supervertex_edge_descriptor(g, dsets); } + + template + struct identity_function + { + typedef T argument_type; + typedef T result_type; + + result_type operator()(argument_type x) const { return x; } + }; + + template + class is_not_msf_edge + { + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + + public: + is_not_msf_edge(const Graph& g, DisjointSets dset, EdgeMapper edge_mapper) + : g(g), dset(dset), edge_mapper(edge_mapper) { } + + bool operator()(Edge e) + { + Vertex u = dset.find_set(source(edge_mapper(e), g)); + Vertex v = dset.find_set(target(edge_mapper(e), g)); + if (u == v) return true; + else { + dset.link(u, v); + return false; + } + } + + private: + const Graph& g; + DisjointSets dset; + EdgeMapper edge_mapper; + }; + + template + void + sorted_mutating_kruskal(const Graph& g, + ForwardIterator first_vertex, + ForwardIterator last_vertex, + EdgeList& edge_list, EdgeMapper edge_mapper, + RankMap rank_map, ParentMap parent_map) + { + typedef disjoint_sets DisjointSets; + + // Build and initialize disjoint-sets data structure + DisjointSets dset(rank_map, parent_map); + for (ForwardIterator v = first_vertex; v != last_vertex; ++v) + dset.make_set(*v); + + is_not_msf_edge + remove_non_msf_edges(g, dset, edge_mapper); + edge_list.erase(std::remove_if(edge_list.begin(), edge_list.end(), + remove_non_msf_edges), + edge_list.end()); + } + + /** + * Merge local minimum spanning forests from p processes into + * minimum spanning forests on p/D processes (where D is the tree + * factor, currently fixed at 3), eliminating unnecessary edges in + * the process. + * + * As with @ref boruvka_merge_step, this routine has many + * parameters, not all of which make sense within the limited + * context of this routine. The parameters are required for the + * Boruvka and local MSF merging steps to interoperate. + * + * \param pg The process group on which local minimum spanning + * forests should be merged. The top (D-1)p/D processes will be + * eliminated, and a new process subgroup containing p/D processors + * will be returned. The value D is a constant factor that is + * currently fixed to 3. + * + * \param g The underlying graph whose MSF is being computed. It must model + * the DistributedGraph concept. + * + * \param first_vertex Iterator to the first vertex in the graph + * that should be considered. While the local MSF merging algorithm + * typically operates on the entire vertex set, within the hybrid + * distributed MSF algorithms this will refer to the first + * supervertex. + * + * \param last_vertex The past-the-end iterator for the vertex list. + * + * \param edge_list The list of local edges that will be + * considered. For the p/D processes that remain, this list will + * contain edges in the MSF known to the vertex after other + * processes' edge lists have been merged. The edge list must be + * sorted in order of increasing weight. + * + * \param weight Property map containing the weights of each + * edge. The type of this property map must model + * ReadablePropertyMap and must support caching. + * + * \param global_index Mapping from vertex descriptors to a global + * index. The type must model ReadablePropertyMap. + * + * \param edge_mapper A function object that can remap edge descriptors + * in the edge list to any alternative edge descriptor. This + * function object will be the identity function when a pure merging + * of local MSFs is required, but may be a mapping to a supervertex + * edge when the local MSF merging occurs on a supervertex + * graph. This function object saves us the trouble of having to + * build a supervertex graph adaptor. + * + * \param already_local_msf True when the edge list already + * constitutes a local MSF. If false, Kruskal's algorithm will first + * be applied to the local edge list to select MSF edges. + * + * \returns The process subgroup containing the remaining p/D + * processes. If the size of this process group is greater than one, + * the MSF edges contained in the edge list do not constitute an MSF + * for the entire graph. + */ + template + ProcessGroup + merge_local_minimum_spanning_trees_step(ProcessGroup pg, + const Graph& g, + ForwardIterator first_vertex, + ForwardIterator last_vertex, + EdgeList& edge_list, + WeightMap weight, + GlobalIndexMap global_index, + EdgeMapper edge_mapper, + bool already_local_msf) + { + typedef typename ProcessGroup::process_id_type process_id_type; + typedef typename EdgeList::value_type edge_descriptor; + typedef typename property_traits::value_type weight_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + // The tree factor, often called "D" + process_id_type const tree_factor = 3; + process_id_type num_procs = num_processes(pg); + process_id_type id = process_id(pg); + process_id_type procs_left = (num_procs + tree_factor - 1) / tree_factor; + std::size_t n = std::size_t(last_vertex - first_vertex); + + if (!already_local_msf) { + // Compute local minimum spanning forest. We only care about the + // edges in the MSF, because only edges in the local MSF can be in + // the global MSF. + std::vector ranks(n); + std::vector parents(n); + detail::sorted_mutating_kruskal + (g, first_vertex, last_vertex, + edge_list, edge_mapper, + make_iterator_property_map(ranks.begin(), global_index), + make_iterator_property_map(parents.begin(), global_index)); + } + + typedef std::pair w_edge; + + // Order edges based on their weights. + indirect_cmp > cmp_edge_weight(weight); + + if (id < procs_left) { + // The p/D processes that remain will receive local MSF edges from + // D-1 other processes. + synchronize(pg); + for (process_id_type from_id = procs_left + id; from_id < num_procs; + from_id += procs_left) { + std::size_t num_incoming_edges; + receive(pg, from_id, 0, num_incoming_edges); + if (num_incoming_edges > 0) { + std::vector incoming_edges(num_incoming_edges); + receive(pg, from_id, 1, &incoming_edges[0], num_incoming_edges); + + edge_list.reserve(edge_list.size() + num_incoming_edges); + for (std::size_t i = 0; i < num_incoming_edges; ++i) { + cache(weight, incoming_edges[i].first, incoming_edges[i].second); + edge_list.push_back(incoming_edges[i].first); + } + std::inplace_merge(edge_list.begin(), + edge_list.end() - num_incoming_edges, + edge_list.end(), + cmp_edge_weight); + } + } + + // Compute the local MSF from union of the edges in the MSFs of + // all children. + std::vector ranks(n); + std::vector parents(n); + detail::sorted_mutating_kruskal + (g, first_vertex, last_vertex, + edge_list, edge_mapper, + make_iterator_property_map(ranks.begin(), global_index), + make_iterator_property_map(parents.begin(), global_index)); + } else { + // The (D-1)p/D processes that are dropping out of further + // computations merely send their MSF edges to their parent + // process in the process tree. + send(pg, id % procs_left, 0, edge_list.size()); + if (edge_list.size() > 0) { + std::vector outgoing_edges; + outgoing_edges.reserve(edge_list.size()); + for (std::size_t i = 0; i < edge_list.size(); ++i) { + outgoing_edges.push_back(std::make_pair(edge_list[i], + get(weight, edge_list[i]))); + } + send(pg, id % procs_left, 1, &outgoing_edges[0], + outgoing_edges.size()); + } + synchronize(pg); + } + + // Return a process subgroup containing the p/D parent processes + return process_subgroup(pg, + make_counting_iterator(process_id_type(0)), + make_counting_iterator(procs_left)); + } +} // end namespace detail + +// --------------------------------------------------------------------- +// Dense Boruvka MSF algorithm +// --------------------------------------------------------------------- +template +OutputIterator +dense_boruvka_minimum_spanning_tree(const Graph& g, WeightMap weight_map, + OutputIterator out, + VertexIndexMap index_map, + RankMap rank_map, ParentMap parent_map, + SupervertexMap supervertex_map) +{ + using boost::graph::parallel::process_group; + + typedef typename graph_traits::traversal_category traversal_category; + + BOOST_STATIC_ASSERT((is_convertible::value)); + + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + // Don't throw away cached edge weights + weight_map.set_max_ghost_cells(0); + + // Initialize the disjoint sets structures + disjoint_sets dset(rank_map, parent_map); + vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + dset.make_set(*vi); + + std::vector supervertices; + supervertices.assign(vertices(g).first, vertices(g).second); + + // Use Kruskal's algorithm to find the minimum spanning forest + // considering only the local edges. The resulting edges are not + // necessarily going to be in the final minimum spanning + // forest. However, any edge not part of the local MSF cannot be a + // part of the global MSF, so we should have eliminated some edges + // from consideration. + std::vector edge_list; + kruskal_minimum_spanning_tree + (make_vertex_and_edge_range(g, vertices(g).first, vertices(g).second, + edges(g).first, edges(g).second), + std::back_inserter(edge_list), + boost::weight_map(weight_map). + vertex_index_map(index_map)); + + // While the number of supervertices is decreasing, keep executing + // Boruvka steps to identify additional MSF edges. This loop will + // execute log |V| times. + vertices_size_type old_num_supervertices; + do { + old_num_supervertices = supervertices.size(); + out = detail::boruvka_merge_step(process_group(g), g, + weight_map, out, + dset, supervertex_map, supervertices, + edge_list); + } while (supervertices.size() < old_num_supervertices); + + return out; +} + +template +OutputIterator +dense_boruvka_minimum_spanning_tree(const Graph& g, WeightMap weight_map, + OutputIterator out, VertexIndex i_map) +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + std::vector ranks(num_vertices(g)); + std::vector parents(num_vertices(g)); + std::vector supervertices(num_vertices(g)); + + return dense_boruvka_minimum_spanning_tree + (g, weight_map, out, i_map, + make_iterator_property_map(ranks.begin(), i_map), + make_iterator_property_map(parents.begin(), i_map), + make_iterator_property_map(supervertices.begin(), i_map)); +} + +template +OutputIterator +dense_boruvka_minimum_spanning_tree(const Graph& g, WeightMap weight_map, + OutputIterator out) +{ + return dense_boruvka_minimum_spanning_tree(g, weight_map, out, + get(vertex_index, g)); +} + +// --------------------------------------------------------------------- +// Merge local MSFs MSF algorithm +// --------------------------------------------------------------------- +template +OutputIterator +merge_local_minimum_spanning_trees(const Graph& g, WeightMap weight, + OutputIterator out, + GlobalIndexMap global_index) +{ + using boost::graph::parallel::process_group_type; + using boost::graph::parallel::process_group; + + typedef typename graph_traits::traversal_category traversal_category; + + BOOST_STATIC_ASSERT((is_convertible::value)); + + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + // Don't throw away cached edge weights + weight.set_max_ghost_cells(0); + + // Compute the initial local minimum spanning forests + std::vector edge_list; + kruskal_minimum_spanning_tree + (make_vertex_and_edge_range(g, vertices(g).first, vertices(g).second, + edges(g).first, edges(g).second), + std::back_inserter(edge_list), + boost::weight_map(weight).vertex_index_map(global_index)); + + // Merge the local MSFs from p processes into p/D processes, + // reducing the number of processes in each step. Continue looping + // until either (a) the current process drops out or (b) only one + // process remains in the group. This loop will execute log_D p + // times. + typename process_group_type::type pg = process_group(g); + while (pg && num_processes(pg) > 1) { + pg = detail::merge_local_minimum_spanning_trees_step + (pg, g, vertices(g).first, vertices(g).second, + edge_list, weight, global_index, + detail::identity_function(), true); + } + + // Only process 0 has the entire edge list, so emit it to the output + // iterator. + if (pg && process_id(pg) == 0) { + out = std::copy(edge_list.begin(), edge_list.end(), out); + } + + synchronize(process_group(g)); + return out; +} + +template +inline OutputIterator +merge_local_minimum_spanning_trees(const Graph& g, WeightMap weight, + OutputIterator out) +{ + return merge_local_minimum_spanning_trees(g, weight, out, + get(vertex_index, g)); +} + +// --------------------------------------------------------------------- +// Boruvka-then-merge MSF algorithm +// --------------------------------------------------------------------- +template +OutputIterator +boruvka_then_merge(const Graph& g, WeightMap weight, OutputIterator out, + GlobalIndexMap index, RankMap rank_map, + ParentMap parent_map, SupervertexMap supervertex_map) +{ + using std::log; + using boost::graph::parallel::process_group_type; + using boost::graph::parallel::process_group; + + typedef typename graph_traits::traversal_category traversal_category; + + BOOST_STATIC_ASSERT((is_convertible::value)); + + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + // Don't throw away cached edge weights + weight.set_max_ghost_cells(0); + + // Compute the initial local minimum spanning forests + std::vector edge_list; + kruskal_minimum_spanning_tree + (make_vertex_and_edge_range(g, vertices(g).first, vertices(g).second, + edges(g).first, edges(g).second), + std::back_inserter(edge_list), + boost::weight_map(weight). + vertex_index_map(index)); + + // Initialize the disjoint sets structures for Boruvka steps + disjoint_sets dset(rank_map, parent_map); + vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + dset.make_set(*vi); + + // Construct the initial set of supervertices (all vertices) + std::vector supervertices; + supervertices.assign(vertices(g).first, vertices(g).second); + + // Continue performing Boruvka merge steps until the number of + // supervertices reaches |V| / (log_D p)^2. + const std::size_t tree_factor = 3; // TBD: same as above! should be param + double log_d_p = log((double)num_processes(process_group(g))) + / log((double)tree_factor); + vertices_size_type target_supervertices = + vertices_size_type(num_vertices(g) / (log_d_p * log_d_p)); + vertices_size_type old_num_supervertices; + while (supervertices.size() > target_supervertices) { + old_num_supervertices = supervertices.size(); + out = detail::boruvka_merge_step(process_group(g), g, + weight, out, dset, + supervertex_map, supervertices, + edge_list); + if (supervertices.size() == old_num_supervertices) + return out; + } + + // Renumber the supervertices + for (std::size_t i = 0; i < supervertices.size(); ++i) + put(supervertex_map, supervertices[i], i); + + // Merge local MSFs on the supervertices. (D-1)p/D processors drop + // out each iteration, so this loop executes log_D p times. + typename process_group_type::type pg = process_group(g); + bool have_msf = false; + while (pg && num_processes(pg) > 1) { + pg = detail::merge_local_minimum_spanning_trees_step + (pg, g, supervertices.begin(), supervertices.end(), + edge_list, weight, supervertex_map, + detail::make_supervertex_edge_descriptor(g, dset), + have_msf); + have_msf = true; + } + + // Only process 0 has the complete list of _supervertex_ MST edges, + // so emit those to the output iterator. This is not the complete + // list of edges in the MSF, however: the Boruvka steps in the + // beginning of the algorithm emitted any edges used to merge + // supervertices. + if (pg && process_id(pg) == 0) + out = std::copy(edge_list.begin(), edge_list.end(), out); + + synchronize(process_group(g)); + return out; +} + +template +inline OutputIterator +boruvka_then_merge(const Graph& g, WeightMap weight, OutputIterator out, + GlobalIndexMap index) +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertices_size_type vertices_size_type; + std::vector ranks(num_vertices(g)); + std::vector parents(num_vertices(g)); + std::vector supervertex_indices(num_vertices(g)); + + return boruvka_then_merge + (g, weight, out, index, + make_iterator_property_map(ranks.begin(), index), + make_iterator_property_map(parents.begin(), index), + make_iterator_property_map(supervertex_indices.begin(), index)); +} + +template +inline OutputIterator +boruvka_then_merge(const Graph& g, WeightMap weight, OutputIterator out) +{ return boruvka_then_merge(g, weight, out, get(vertex_index, g)); } + +// --------------------------------------------------------------------- +// Boruvka-mixed-merge MSF algorithm +// --------------------------------------------------------------------- +template +OutputIterator +boruvka_mixed_merge(const Graph& g, WeightMap weight, OutputIterator out, + GlobalIndexMap index, RankMap rank_map, + ParentMap parent_map, SupervertexMap supervertex_map) +{ + using boost::graph::parallel::process_group_type; + using boost::graph::parallel::process_group; + + typedef typename graph_traits::traversal_category traversal_category; + + BOOST_STATIC_ASSERT((is_convertible::value)); + + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + // Don't throw away cached edge weights + weight.set_max_ghost_cells(0); + + // Initialize the disjoint sets structures for Boruvka steps + disjoint_sets dset(rank_map, parent_map); + vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + dset.make_set(*vi); + + // Construct the initial set of supervertices (all vertices) + std::vector supervertices; + supervertices.assign(vertices(g).first, vertices(g).second); + + // Compute the initial local minimum spanning forests + std::vector edge_list; + kruskal_minimum_spanning_tree + (make_vertex_and_edge_range(g, vertices(g).first, vertices(g).second, + edges(g).first, edges(g).second), + std::back_inserter(edge_list), + boost::weight_map(weight). + vertex_index_map(index)); + + if (num_processes(process_group(g)) == 1) { + return std::copy(edge_list.begin(), edge_list.end(), out); + } + + // Like the merging local MSFs algorithm and the Boruvka-then-merge + // algorithm, each iteration of this loop reduces the number of + // processes by a constant factor D, and therefore we require log_D + // p iterations. Note also that the number of edges in the edge list + // decreases geometrically, giving us an efficient distributed MSF + // algorithm. + typename process_group_type::type pg = process_group(g); + vertices_size_type old_num_supervertices; + while (pg && num_processes(pg) > 1) { + // A single Boruvka step. If this doesn't change anything, we're done + old_num_supervertices = supervertices.size(); + out = detail::boruvka_merge_step(pg, g, weight, out, dset, + supervertex_map, supervertices, + edge_list); + if (old_num_supervertices == supervertices.size()) { + edge_list.clear(); + break; + } + + // Renumber the supervertices + for (std::size_t i = 0; i < supervertices.size(); ++i) + put(supervertex_map, supervertices[i], i); + + // A single merging of local MSTs, which reduces the number of + // processes we're using by a constant factor D. + pg = detail::merge_local_minimum_spanning_trees_step + (pg, g, supervertices.begin(), supervertices.end(), + edge_list, weight, supervertex_map, + detail::make_supervertex_edge_descriptor(g, dset), + true); + + } + + // Only process 0 has the complete edge list, so emit it for the + // user. Note that list edge list only contains the MSF edges in the + // final supervertex graph: all of the other edges were used to + // merge supervertices and have been emitted by the Boruvka steps, + // although only process 0 has received the complete set. + if (pg && process_id(pg) == 0) + out = std::copy(edge_list.begin(), edge_list.end(), out); + + synchronize(process_group(g)); + return out; +} + +template +inline OutputIterator +boruvka_mixed_merge(const Graph& g, WeightMap weight, OutputIterator out, + GlobalIndexMap index) +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertices_size_type vertices_size_type; + std::vector ranks(num_vertices(g)); + std::vector parents(num_vertices(g)); + std::vector supervertex_indices(num_vertices(g)); + + return boruvka_mixed_merge + (g, weight, out, index, + make_iterator_property_map(ranks.begin(), index), + make_iterator_property_map(parents.begin(), index), + make_iterator_property_map(supervertex_indices.begin(), index)); +} + +template +inline OutputIterator +boruvka_mixed_merge(const Graph& g, WeightMap weight, OutputIterator out) +{ return boruvka_mixed_merge(g, weight, out, get(vertex_index, g)); } + +} // end namespace distributed + +using distributed::dense_boruvka_minimum_spanning_tree; +using distributed::merge_local_minimum_spanning_trees; +using distributed::boruvka_then_merge; +using distributed::boruvka_mixed_merge; + +} } // end namespace boost::graph + + +#endif // BOOST_DEHNE_GOTZ_MIN_SPANNING_TREE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/delta_stepping_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/delta_stepping_shortest_paths.hpp new file mode 100644 index 0000000000..ab1655b474 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/delta_stepping_shortest_paths.hpp @@ -0,0 +1,513 @@ +// Copyright (C) 2007 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +/************************************************************************** + * This source file implements the Delta-stepping algorithm: * + * * + * Ulrich Meyer and Peter Sanders. Parallel Shortest Path for Arbitrary * + * Graphs. In Proceedings from the 6th International Euro-Par * + * Conference on Parallel Processing, pages 461--470, 2000. * + * * + * Ulrich Meyer, Peter Sanders: [Delta]-stepping: A Parallelizable * + * Shortest Path Algorithm. J. Algorithms 49(1): 114-152, 2003. * + * * + * There are several potential optimizations we could still perform for * + * this algorithm implementation: * + * * + * - Implement "shortcuts", which bound the number of reinsertions * + * in a single bucket (to one). The computation of shortcuts looks * + * expensive in a distributed-memory setting, but it could be * + * ammortized over many queries. * + * * + * - The size of the "buckets" data structure can be bounded to * + * max_edge_weight/delta buckets, if we treat the buckets as a * + * circular array. * + * * + * - If we partition light/heavy edges ahead of time, we could improve * + * relaxation performance by only iterating over the right portion * + * of the out-edge list each time. * + * * + * - Implement a more sophisticated algorithm for guessing "delta", * + * based on the shortcut-finding algorithm. * + **************************************************************************/ +#ifndef BOOST_GRAPH_DELTA_STEPPING_SHORTEST_PATHS_HPP +#define BOOST_GRAPH_DELTA_STEPPING_SHORTEST_PATHS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for std::pair +#include // for std::logical_or +#include // for all_reduce +#include +#include // for std::min, std::max +#include + +#ifdef PBGL_DELTA_STEPPING_DEBUG +# include // for std::cerr +#endif + +namespace boost { namespace graph { namespace distributed { + +template +class delta_stepping_impl { + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::degree_size_type Degree; + typedef typename property_traits::value_type Dist; + typedef typename boost::graph::parallel::process_group_type::type + ProcessGroup; + + typedef std::list Bucket; + typedef typename Bucket::iterator BucketIterator; + typedef typename std::vector::size_type BucketIndex; + + typedef detail::dijkstra_msg_value MessageValue; + + enum { + // Relax a remote vertex. The message contains a pair, the first part of which is the vertex whose + // tentative distance is being relaxed and the second part + // contains either the new distance (if there is no predecessor + // map) or a pair with the distance and predecessor. + msg_relax + }; + +public: + delta_stepping_impl(const Graph& g, + PredecessorMap predecessor, + DistanceMap distance, + EdgeWeightMap weight, + Dist delta); + + delta_stepping_impl(const Graph& g, + PredecessorMap predecessor, + DistanceMap distance, + EdgeWeightMap weight); + + void run(Vertex s); + +private: + // Relax the edge (u, v), creating a new best path of distance x. + void relax(Vertex u, Vertex v, Dist x); + + // Synchronize all of the processes, by receiving all messages that + // have not yet been received. + void synchronize(); + + // Handle a relax message that contains only the target and + // distance. This kind of message will be received when the + // predecessor map is a dummy_property_map. + void handle_relax_message(Vertex v, Dist x) { relax(v, v, x); } + + // Handle a relax message that contains the source (predecessor), + // target, and distance. This kind of message will be received when + // the predecessor map is not a dummy_property_map. + void handle_relax_message(Vertex v, const std::pair& p) + { relax(p.second, v, p.first); } + + // Setup triggers for msg_relax messages + void setup_triggers(); + + void handle_msg_relax(int /*source*/, int /*tag*/, + const std::pair& data, + trigger_receive_context) + { handle_relax_message(data.first, data.second); } + + const Graph& g; + PredecessorMap predecessor; + DistanceMap distance; + EdgeWeightMap weight; + Dist delta; + ProcessGroup pg; + typename property_map::const_type owner; + typename property_map::const_type local; + + // A "property map" that contains the position of each vertex in + // whatever bucket it resides in. + std::vector position_in_bucket; + + // Bucket data structure. The ith bucket contains all local vertices + // with (tentative) distance in the range [i*delta, + // (i+1)*delta). + std::vector buckets; + + // This "dummy" list is used only so that we can initialize the + // position_in_bucket property map with non-singular iterators. This + // won't matter for most implementations of the C++ Standard + // Library, but it avoids undefined behavior and allows us to run + // with library "debug modes". + std::list dummy_list; + + // A "property map" that states which vertices have been deleted + // from the bucket in this iteration. + std::vector vertex_was_deleted; +}; + +template +delta_stepping_impl:: +delta_stepping_impl(const Graph& g, + PredecessorMap predecessor, + DistanceMap distance, + EdgeWeightMap weight, + Dist delta) + : g(g), + predecessor(predecessor), + distance(distance), + weight(weight), + delta(delta), + pg(boost::graph::parallel::process_group_adl(g), attach_distributed_object()), + owner(get(vertex_owner, g)), + local(get(vertex_local, g)) +{ + setup_triggers(); +} + +template +delta_stepping_impl:: +delta_stepping_impl(const Graph& g, + PredecessorMap predecessor, + DistanceMap distance, + EdgeWeightMap weight) + : g(g), + predecessor(predecessor), + distance(distance), + weight(weight), + pg(boost::graph::parallel::process_group_adl(g), attach_distributed_object()), + owner(get(vertex_owner, g)), + local(get(vertex_local, g)) +{ + using boost::parallel::all_reduce; + using boost::parallel::maximum; + using std::max; + + // Compute the maximum edge weight and degree + Dist max_edge_weight = 0; + Degree max_degree = 0; + BGL_FORALL_VERTICES_T(u, g, Graph) { + max_degree = max BOOST_PREVENT_MACRO_SUBSTITUTION (max_degree, out_degree(u, g)); + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + max_edge_weight = max BOOST_PREVENT_MACRO_SUBSTITUTION (max_edge_weight, get(weight, e)); + } + + max_edge_weight = all_reduce(pg, max_edge_weight, maximum()); + max_degree = all_reduce(pg, max_degree, maximum()); + + // Take a guess at delta, based on what works well for random + // graphs. + delta = max_edge_weight / max_degree; + if (delta == 0) + delta = 1; + + setup_triggers(); +} + +template +void +delta_stepping_impl:: +run(Vertex s) +{ + Dist inf = (std::numeric_limits::max)(); + + // None of the vertices are stored in the bucket. + position_in_bucket.clear(); + position_in_bucket.resize(num_vertices(g), dummy_list.end()); + + // None of the vertices have been deleted + vertex_was_deleted.clear(); + vertex_was_deleted.resize(num_vertices(g), false); + + // No path from s to any other vertex, yet + BGL_FORALL_VERTICES_T(v, g, Graph) + put(distance, v, inf); + + // The distance to the starting node is zero + if (get(owner, s) == process_id(pg)) + // Put "s" into its bucket (bucket 0) + relax(s, s, 0); + else + // Note that we know the distance to s is zero + cache(distance, s, 0); + + BucketIndex max_bucket = (std::numeric_limits::max)(); + BucketIndex current_bucket = 0; + do { + // Synchronize with all of the other processes. + synchronize(); + + // Find the next bucket that has something in it. + while (current_bucket < buckets.size() + && (!buckets[current_bucket] || buckets[current_bucket]->empty())) + ++current_bucket; + if (current_bucket >= buckets.size()) + current_bucket = max_bucket; + +#ifdef PBGL_DELTA_STEPPING_DEBUG + std::cerr << "#" << process_id(pg) << ": lowest bucket is #" + << current_bucket << std::endl; +#endif + // Find the smallest bucket (over all processes) that has vertices + // that need to be processed. + using boost::parallel::all_reduce; + using boost::parallel::minimum; + current_bucket = all_reduce(pg, current_bucket, minimum()); + + if (current_bucket == max_bucket) + // There are no non-empty buckets in any process; exit. + break; + +#ifdef PBGL_DELTA_STEPPING_DEBUG + if (process_id(pg) == 0) + std::cerr << "Processing bucket #" << current_bucket << std::endl; +#endif + + // Contains the set of vertices that have been deleted in the + // relaxation of "light" edges. Note that we keep track of which + // vertices were deleted with the property map + // "vertex_was_deleted". + std::vector deleted_vertices; + + // Repeatedly relax light edges + bool nonempty_bucket; + do { + // Someone has work to do in this bucket. + + if (current_bucket < buckets.size() && buckets[current_bucket]) { + Bucket& bucket = *buckets[current_bucket]; + // For each element in the bucket + while (!bucket.empty()) { + Vertex u = bucket.front(); + +#ifdef PBGL_DELTA_STEPPING_DEBUG + std::cerr << "#" << process_id(pg) << ": processing vertex " + << get(vertex_global, g, u).second << "@" + << get(vertex_global, g, u).first + << std::endl; +#endif + + // Remove u from the front of the bucket + bucket.pop_front(); + + // Insert u into the set of deleted vertices, if it hasn't + // been done already. + if (!vertex_was_deleted[get(local, u)]) { + vertex_was_deleted[get(local, u)] = true; + deleted_vertices.push_back(u); + } + + // Relax each light edge. + Dist u_dist = get(distance, u); + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + if (get(weight, e) <= delta) // light edge + relax(u, target(e, g), u_dist + get(weight, e)); + } + } + + // Synchronize with all of the other processes. + synchronize(); + + // Is the bucket empty now? + nonempty_bucket = (current_bucket < buckets.size() + && buckets[current_bucket] + && !buckets[current_bucket]->empty()); + } while (all_reduce(pg, nonempty_bucket, std::logical_or())); + + // Relax heavy edges for each of the vertices that we previously + // deleted. + for (typename std::vector::iterator iter = deleted_vertices.begin(); + iter != deleted_vertices.end(); ++iter) { + // Relax each heavy edge. + Vertex u = *iter; + Dist u_dist = get(distance, u); + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + if (get(weight, e) > delta) // heavy edge + relax(u, target(e, g), u_dist + get(weight, e)); + } + + // Go to the next bucket: the current bucket must already be empty. + ++current_bucket; + } while (true); + + // Delete all of the buckets. + for (typename std::vector::iterator iter = buckets.begin(); + iter != buckets.end(); ++iter) { + if (*iter) { + delete *iter; + *iter = 0; + } + } +} + +template +void +delta_stepping_impl:: +relax(Vertex u, Vertex v, Dist x) +{ +#ifdef PBGL_DELTA_STEPPING_DEBUG + std::cerr << "#" << process_id(pg) << ": relax(" + << get(vertex_global, g, u).second << "@" + << get(vertex_global, g, u).first << ", " + << get(vertex_global, g, v).second << "@" + << get(vertex_global, g, v).first << ", " + << x << ")" << std::endl; +#endif + + if (x < get(distance, v)) { + // We're relaxing the edge to vertex v. + if (get(owner, v) == process_id(pg)) { + // Compute the new bucket index for v + BucketIndex new_index = static_cast(x / delta); + + // Make sure there is enough room in the buckets data structure. + if (new_index >= buckets.size()) buckets.resize(new_index + 1, 0); + + // Make sure that we have allocated the bucket itself. + if (!buckets[new_index]) buckets[new_index] = new Bucket; + + if (get(distance, v) != (std::numeric_limits::max)() + && !vertex_was_deleted[get(local, v)]) { + // We're moving v from an old bucket into a new one. Compute + // the old index, then splice it in. + BucketIndex old_index + = static_cast(get(distance, v) / delta); + buckets[new_index]->splice(buckets[new_index]->end(), + *buckets[old_index], + position_in_bucket[get(local, v)]); + } else { + // We're inserting v into a bucket for the first time. Put it + // at the end. + buckets[new_index]->push_back(v); + } + + // v is now at the last position in the new bucket + position_in_bucket[get(local, v)] = buckets[new_index]->end(); + --position_in_bucket[get(local, v)]; + + // Update predecessor and tentative distance information + put(predecessor, v, u); + put(distance, v, x); + } else { +#ifdef PBGL_DELTA_STEPPING_DEBUG + std::cerr << "#" << process_id(pg) << ": sending relax(" + << get(vertex_global, g, u).second << "@" + << get(vertex_global, g, u).first << ", " + << get(vertex_global, g, v).second << "@" + << get(vertex_global, g, v).first << ", " + << x << ") to " << get(owner, v) << std::endl; + +#endif + // The vertex is remote: send a request to the vertex's owner + send(pg, get(owner, v), msg_relax, + std::make_pair(v, MessageValue::create(x, u))); + + // Cache tentative distance information + cache(distance, v, x); + } + } +} + +template +void +delta_stepping_impl:: +synchronize() +{ + using boost::graph::parallel::synchronize; + + // Synchronize at the process group level. + synchronize(pg); + + // Receive any relaxation request messages. +// typedef typename ProcessGroup::process_id_type process_id_type; +// while (optional > stp = probe(pg)) { +// // Receive the relaxation message +// assert(stp->second == msg_relax); +// std::pair data; +// receive(pg, stp->first, stp->second, data); + +// // Turn it into a "relax" call +// handle_relax_message(data.first, data.second); +// } +} + +template +void +delta_stepping_impl:: +setup_triggers() +{ + using boost::graph::parallel::simple_trigger; + + simple_trigger(pg, msg_relax, this, + &delta_stepping_impl::handle_msg_relax); +} + +template +void +delta_stepping_shortest_paths + (const Graph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, EdgeWeightMap weight, + typename property_traits::value_type delta) +{ + // The "distance" map needs to act like one, retrieving the default + // value of infinity. + set_property_map_role(vertex_distance, distance); + + // Construct the implementation object, which will perform all of + // the actual work. + delta_stepping_impl + impl(g, predecessor, distance, weight, delta); + + // Run the delta-stepping algorithm. The results will show up in + // "predecessor" and "weight". + impl.run(s); +} + +template +void +delta_stepping_shortest_paths + (const Graph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, EdgeWeightMap weight) +{ + // The "distance" map needs to act like one, retrieving the default + // value of infinity. + set_property_map_role(vertex_distance, distance); + + // Construct the implementation object, which will perform all of + // the actual work. + delta_stepping_impl + impl(g, predecessor, distance, weight); + + // Run the delta-stepping algorithm. The results will show up in + // "predecessor" and "weight". + impl.run(s); +} + +} } } // end namespace boost::graph::distributed + +#endif // BOOST_GRAPH_DELTA_STEPPING_SHORTEST_PATHS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/depth_first_search.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/depth_first_search.hpp new file mode 100644 index 0000000000..d64f08531d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/depth_first_search.hpp @@ -0,0 +1,306 @@ +// Copyright (C) 2004-2008 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_DFS_HPP +#define BOOST_GRAPH_DISTRIBUTED_DFS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace graph { namespace distributed { namespace detail { + template + class parallel_dfs + { + typedef typename graph_traits::vertex_iterator + vertex_iterator; + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef typename graph_traits::out_edge_iterator + out_edge_iterator; + + typedef typename boost::graph::parallel::process_group_type + ::type process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + + /** + * The first vertex in the pair is the local node (i) and the + * second vertex in the pair is the (possibly remote) node (j). + */ + typedef boost::parallel::detail::untracked_pair vertex_pair; + + typedef typename property_traits::value_type color_type; + typedef color_traits Color; + + // Message types + enum { discover_msg = 10, return_msg = 50, visited_msg = 100 , done_msg = 150}; + + + public: + parallel_dfs(const DistributedGraph& g, ColorMap color, + ParentMap parent, ExploreMap explore, + VertexIndexMap index_map, DFSVisitor vis) + : g(g), color(color), parent(parent), explore(explore), + index_map(index_map), vis(vis), pg(process_group(g)), + owner(get(vertex_owner, g)), next_out_edge(num_vertices(g)) + { } + + void run(vertex_descriptor s) + { + vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) { + put(color, *vi, Color::white()); + put(parent, *vi, *vi); + put(explore, *vi, *vi); + next_out_edge[get(index_map, *vi)] = out_edges(*vi, g).first; + vis.initialize_vertex(*vi, g); + } + + vis.start_vertex(s, g); + + if (get(owner, s) == process_id(pg)) { + send_oob(pg, get(owner, s), discover_msg, vertex_pair(s, s)); + } + + bool done = false; + while (!done) { + std::pair msg = *pg.poll(true); + + switch (msg.second) { + case discover_msg: + { + vertex_pair p; + receive_oob(pg, msg.first, msg.second, p); + + if (p.first != p.second) { + // delete j from nomessage(j) + if (get(color, p.second) != Color::black()) + local_put(color, p.second, Color::gray()); + + if (recover(p)) break; + } + + if (get(color, p.first) == Color::white()) { + put(color, p.first, Color::gray()); + put(parent, p.first, p.second); + + vis.discover_vertex(p.first, g); + + if (shift_center_of_activity(p.first)) break; + + out_edge_iterator ei, ei_end; + for (boost::tie(ei,ei_end) = out_edges(p.first, g); ei != ei_end; ++ei) + { + // Notify everyone who may not know that the source + // vertex has been visited. They can then mark the + // corresponding color map entry gray. + if (get(parent, p.first) != target(*ei, g) + && get(explore, p.first) != target(*ei, g)) { + vertex_pair visit(target(*ei, g), p.first); + + send_oob(pg, get(owner, target(*ei, g)), visited_msg, visit); + } + } + } + } + break; + + case visited_msg: + { + vertex_pair p; + receive_oob(pg, msg.first, msg.second, p); + + // delete j from nomessage(j) + if (get(color, p.second) != Color::black()) + local_put(color, p.second, Color::gray()); + + recover(p); + } + break; + + case return_msg: + { + vertex_pair p; + receive_oob(pg, msg.first, msg.second, p); + + // delete j from nomessage(i) + local_put(color, p.second, Color::black()); + + shift_center_of_activity(p.first); + } + break; + + case done_msg: + { + receive_oob(pg, msg.first, msg.second, done); + + // Propagate done message downward in tree + done = true; + process_id_type id = process_id(pg); + process_id_type left = 2*id + 1; + process_id_type right = left + 1; + if (left < num_processes(pg)) + send_oob(pg, left, done_msg, done); + if (right < num_processes(pg)) + send_oob(pg, right, done_msg, done); + } + break; + + default: + assert(false); + } + } + } + + private: + bool recover(const vertex_pair& p) + { + if (get(explore, p.first) == p.second) { + return shift_center_of_activity(p.first); + } + else + return false; + } + + bool shift_center_of_activity(vertex_descriptor i) + { + for (out_edge_iterator ei = next_out_edge[get(index_map, i)], + ei_end = out_edges(i, g).second; + ei != ei_end; ++ei) { + vis.examine_edge(*ei, g); + + vertex_descriptor k = target(*ei, g); + color_type target_color = get(color, k); + if (target_color == Color::black()) vis.forward_or_cross_edge(*ei, g); + else if (target_color == Color::gray()) vis.back_edge(*ei, g); + else { + put(explore, i, k); + vis.tree_edge(*ei, g); + vertex_pair p(k, i); + send_oob(pg, get(owner, k), discover_msg, p); + next_out_edge[get(index_map, i)] = ++ei; + return false; + } + } + + next_out_edge[get(index_map, i)] = out_edges(i, g).second; + put(explore, i, i); + put(color, i, Color::black()); + vis.finish_vertex(i, g); + + if (get(parent, i) == i) { + send_oob(pg, 0, done_msg, true); + return true; + } + else { + vertex_pair ret(get(parent, i), i); + send_oob(pg, get(owner, ret.first), return_msg, ret); + } + return false; + } + + const DistributedGraph& g; + ColorMap color; + ParentMap parent; + ExploreMap explore; + VertexIndexMap index_map; + DFSVisitor vis; + process_group_type pg; + typename property_map::const_type owner; + std::vector next_out_edge; + }; + } // end namespace detail + + template + void + tsin_depth_first_visit + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + DFSVisitor vis, ColorMap color, ParentMap parent, ExploreMap explore, + VertexIndexMap index_map) + { + typedef typename graph_traits::directed_category + directed_category; + BOOST_STATIC_ASSERT( + (is_convertible::value)); + + set_property_map_role(vertex_color, color); + graph::distributed::detail::parallel_dfs + do_dfs(g, color, parent, explore, index_map, vis); + do_dfs.run(s); + + using boost::graph::parallel::process_group; + synchronize(process_group(g)); + } + + template + void + tsin_depth_first_visit + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + DFSVisitor vis, + VertexIndexMap index_map) + { + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + + std::vector colors(num_vertices(g)); + std::vector parent(num_vertices(g)); + std::vector explore(num_vertices(g)); + tsin_depth_first_visit + (g, s, + vis, + make_iterator_property_map(colors.begin(), index_map), + make_iterator_property_map(parent.begin(), index_map), + make_iterator_property_map(explore.begin(), index_map), + index_map); + } + + template + void + tsin_depth_first_visit + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + DFSVisitor vis) + { + tsin_depth_first_visit(g, s, vis, get(vertex_index, g)); + } +} // end namespace distributed + +using distributed::tsin_depth_first_visit; + +} // end namespace graph + +template +void +depth_first_visit + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + DFSVisitor vis) +{ + graph::tsin_depth_first_visit(g, s, vis, get(vertex_index, g)); +} + +} // end namespace boost + +#endif // BOOST_GRAPH_DISTRIBUTED_DFS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/dijkstra_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/dijkstra_shortest_paths.hpp new file mode 100644 index 0000000000..0597689167 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/dijkstra_shortest_paths.hpp @@ -0,0 +1,50 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP +#define BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include + +namespace boost { namespace graph { namespace distributed { namespace detail { + +/********************************************************************** + * Dijkstra queue message data * + **********************************************************************/ +template +class dijkstra_msg_value +{ + typedef typename property_traits::value_type distance_type; + typedef typename property_traits::value_type + predecessor_type; + +public: + typedef std::pair type; + + static type create(distance_type dist, predecessor_type pred) + { return std::make_pair(dist, pred); } +}; + +template +class dijkstra_msg_value +{ + typedef typename property_traits::key_type vertex_descriptor; +public: + typedef typename property_traits::value_type type; + + static type create(type dist, vertex_descriptor) { return dist; } +}; +/**********************************************************************/ + +} } } } // end namespace boost::graph::distributed::detail + +#endif // BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/filtered_queue.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/filtered_queue.hpp new file mode 100644 index 0000000000..9871b70daf --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/filtered_queue.hpp @@ -0,0 +1,108 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_FILTERED_QUEUE_HPP +#define BOOST_FILTERED_QUEUE_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include + +namespace boost { + +/** Queue adaptor that filters elements pushed into the queue + * according to some predicate. + */ +template +class filtered_queue +{ + public: + typedef Buffer buffer_type; + typedef Predicate predicate_type; + typedef typename Buffer::value_type value_type; + typedef typename Buffer::size_type size_type; + + /** + * Constructs a new filtered queue with an initial buffer and a + * predicate. + * + * @param buffer the initial buffer + * @param pred the predicate + */ + explicit + filtered_queue(const buffer_type& buffer = buffer_type(), + const predicate_type& pred = predicate_type()) + : buffer(buffer), pred(pred) {} + + /** Push a value into the queue. + * + * If the predicate returns @c true for @p x, pushes @p x into the + * buffer. + */ + void push(const value_type& x) { if (pred(x)) buffer.push(x); } + + /** Pop the front element off the buffer. + * + * @pre @c !empty() + */ + void pop() { buffer.pop(); } + + /** Retrieve the front (top) element in the buffer. + * + * @pre @c !empty() + */ + value_type& top() { return buffer.top(); } + + /** + * \overload + */ + const value_type& top() const { return buffer.top(); } + + /** Determine the number of elements in the buffer. */ + size_type size() const { return buffer.size(); } + + /** Determine if the buffer is empty. */ + bool empty() const { return buffer.empty(); } + + /** Get a reference to the underlying buffer. */ + buffer_type& base() { return buffer; } + const buffer_type& base() const { return buffer; } + + /** Swap the contents of this with @p other. */ + void swap(filtered_queue& other) + { + using std::swap; + swap(buffer, other.buffer); + swap(pred, other.pred); + } + + private: + buffer_type buffer; + predicate_type pred; +}; + +/** Create a filtered queue. */ +template +inline filtered_queue +make_filtered_queue(const Buffer& buffer, const Predicate& pred) +{ return filtered_queue(buffer, pred); } + +/** Swap a filtered_queue. */ +template +inline void +swap(filtered_queue& x, + filtered_queue& y) +{ + x.swap(y); +} + +} // end namespace boost + +#endif // BOOST_FILTERED_QUEUE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/mpi_process_group.ipp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/mpi_process_group.ipp new file mode 100644 index 0000000000..ef49232884 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/mpi_process_group.ipp @@ -0,0 +1,1007 @@ +// -*- C++ -*- + +// Copyright (C) 2004-2008 The Trustees of Indiana University. +// Copyright (C) 2007 Douglas Gregor +// Copyright (C) 2007 Matthias Troyer + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +// Matthias Troyer + +//#define PBGL_PROCESS_GROUP_DEBUG + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// #define PBGL_PROCESS_GROUP_DEBUG + +#ifdef PBGL_PROCESS_GROUP_DEBUG +# include +#endif + +namespace boost { namespace graph { namespace distributed { + +struct mpi_process_group::impl +{ + + typedef mpi_process_group::message_header message_header; + typedef mpi_process_group::outgoing_messages outgoing_messages; + + /** + * Stores the incoming messages from a particular processor. + * + * @todo Evaluate whether we should use a deque instance, which + * would reduce could reduce the cost of "receiving" messages and + allow us to deallocate memory earlier, but increases the time + spent in the synchronization step. + */ + struct incoming_messages { + incoming_messages(); + ~incoming_messages() {} + + std::vector headers; + buffer_type buffer; + std::vector::iterator> next_header; + }; + + struct batch_request { + MPI_Request request; + buffer_type buffer; + }; + + // send once we have a certain number of messages or bytes in the buffer + // these numbers need to be tuned, we keep them small at first for testing + std::size_t batch_header_number; + std::size_t batch_buffer_size; + std::size_t batch_message_size; + + /** + * The actual MPI communicator used to transmit data. + */ + boost::mpi::communicator comm; + + /** + * The MPI communicator used to transmit out-of-band replies. + */ + boost::mpi::communicator oob_reply_comm; + + /// Outgoing message information, indexed by destination processor. + std::vector outgoing; + + /// Incoming message information, indexed by source processor. + std::vector incoming; + + /// The numbers of processors that have entered a synchronization stage + std::vector processors_synchronizing_stage; + + /// The synchronization stage of a processor + std::vector synchronizing_stage; + + /// Number of processors still sending messages + std::vector synchronizing_unfinished; + + /// Number of batches sent since last synchronization stage + std::vector number_sent_batches; + + /// Number of batches received minus number of expected batches + std::vector number_received_batches; + + + /// The context of the currently-executing trigger, or @c trc_none + /// if no trigger is executing. + trigger_receive_context trigger_context; + + /// Non-zero indicates that we're processing batches + /// Increment this when processing patches, + /// decrement it when you're done. + int processing_batches; + + /** + * Contains all of the active blocks corresponding to attached + * distributed data structures. + */ + blocks_type blocks; + + /// Whether we are currently synchronizing + bool synchronizing; + + /// The MPI requests for posted sends of oob messages + std::vector requests; + + /// The MPI buffers for posted irecvs of oob messages + std::map buffers; + + /// Queue for message batches received while already processing messages + std::queue > new_batches; + /// Maximum encountered size of the new_batches queue + std::size_t max_received; + + /// The MPI requests and buffers for batchess being sent + std::list sent_batches; + /// Maximum encountered size of the sent_batches list + std::size_t max_sent; + + /// Pre-allocated requests in a pool + std::vector batch_pool; + /// A stack controlling which batches are available + std::stack free_batches; + + void free_sent_batches(); + + // Tag allocator + detail::tag_allocator allocated_tags; + + impl(std::size_t num_headers, std::size_t buffers_size, + communicator_type parent_comm); + ~impl(); + +private: + void set_batch_size(std::size_t header_num, std::size_t buffer_sz); +}; + +inline trigger_receive_context mpi_process_group::trigger_context() const +{ + return impl_->trigger_context; +} + +template +void +mpi_process_group::send_impl(int dest, int tag, const T& value, + mpl::true_ /*is_mpi_datatype*/) const +{ + assert(tag < msg_reserved_first || tag > msg_reserved_last); + + impl::outgoing_messages& outgoing = impl_->outgoing[dest]; + + // Start constructing the message header + impl::message_header header; + header.source = process_id(*this); + header.tag = tag; + header.offset = outgoing.buffer.size(); + + boost::mpi::packed_oarchive oa(impl_->comm, outgoing.buffer); + oa << value; + +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << "SEND: " << process_id(*this) << " -> " << dest << ", tag = " + << tag << ", bytes = " << packed_size << std::endl; +#endif + + // Store the header + header.bytes = outgoing.buffer.size() - header.offset; + outgoing.headers.push_back(header); + + maybe_send_batch(dest); +} + + +template +void +mpi_process_group::send_impl(int dest, int tag, const T& value, + mpl::false_ /*is_mpi_datatype*/) const +{ + assert(tag < msg_reserved_first || tag > msg_reserved_last); + + impl::outgoing_messages& outgoing = impl_->outgoing[dest]; + + // Start constructing the message header + impl::message_header header; + header.source = process_id(*this); + header.tag = tag; + header.offset = outgoing.buffer.size(); + + // Serialize into the buffer + boost::mpi::packed_oarchive out(impl_->comm, outgoing.buffer); + out << value; + + // Store the header + header.bytes = outgoing.buffer.size() - header.offset; + outgoing.headers.push_back(header); + maybe_send_batch(dest); + +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << "SEND: " << process_id(*this) << " -> " << dest << ", tag = " + << tag << ", bytes = " << header.bytes << std::endl; +#endif +} + +template +inline void +send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, const T& value) +{ + pg.send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), value, + boost::mpi::is_mpi_datatype()); +} + +template +typename enable_if, void>::type +send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, const T values[], std::size_t n) +{ + pg.send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), + boost::serialization::make_array(values,n), + boost::mpl::true_()); +} + +template +typename disable_if, void>::type +mpi_process_group:: +array_send_impl(int dest, int tag, const T values[], std::size_t n) const +{ + assert(tag < msg_reserved_first || tag > msg_reserved_last); + + impl::outgoing_messages& outgoing = impl_->outgoing[dest]; + + // Start constructing the message header + impl::message_header header; + header.source = process_id(*this); + header.tag = tag; + header.offset = outgoing.buffer.size(); + + // Serialize into the buffer + boost::mpi::packed_oarchive out(impl_->comm, outgoing.buffer); + out << n; + + for (std::size_t i = 0; i < n; ++i) + out << values[i]; + + // Store the header + header.bytes = outgoing.buffer.size() - header.offset; + outgoing.headers.push_back(header); + maybe_send_batch(dest); + +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << "SEND: " << process_id(*this) << " -> " << dest << ", tag = " + << tag << ", bytes = " << header.bytes << std::endl; +#endif +} + +template +typename disable_if, void>::type +send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, const T values[], std::size_t n) +{ + pg.array_send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), + values, n); +} + +template +void +send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, InputIterator first, InputIterator last) +{ + typedef typename std::iterator_traits::value_type value_type; + std::vector values(first, last); + if (values.empty()) send(pg, dest, tag, static_cast(0), 0); + else send(pg, dest, tag, &values[0], values.size()); +} + +template +bool +mpi_process_group::receive_impl(int source, int tag, T& value, + mpl::true_ /*is_mpi_datatype*/) const +{ +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << "RECV: " << process_id(*this) << " <- " << source << ", tag = " + << tag << std::endl; +#endif + + impl::incoming_messages& incoming = impl_->incoming[source]; + + // Find the next header with the right tag + std::vector::iterator header = + incoming.next_header[my_block_number()]; + while (header != incoming.headers.end() && header->tag != tag) ++header; + + // If no header is found, notify the caller + if (header == incoming.headers.end()) return false; + + // Unpack the data + if (header->bytes > 0) { + boost::mpi::packed_iarchive ia(impl_->comm, incoming.buffer, + archive::no_header, header->offset); + ia >> value; + } + + // Mark this message as received + header->tag = -1; + + // Move the "next header" indicator to the next unreceived message + while (incoming.next_header[my_block_number()] != incoming.headers.end() + && incoming.next_header[my_block_number()]->tag == -1) + ++incoming.next_header[my_block_number()]; + + if (incoming.next_header[my_block_number()] == incoming.headers.end()) { + bool finished = true; + for (std::size_t i = 0; i < incoming.next_header.size() && finished; ++i) { + if (incoming.next_header[i] != incoming.headers.end()) finished = false; + } + + if (finished) { + std::vector no_headers; + incoming.headers.swap(no_headers); + buffer_type empty_buffer; + incoming.buffer.swap(empty_buffer); + for (std::size_t i = 0; i < incoming.next_header.size(); ++i) + incoming.next_header[i] = incoming.headers.end(); + } + } + + return true; +} + +template +bool +mpi_process_group::receive_impl(int source, int tag, T& value, + mpl::false_ /*is_mpi_datatype*/) const +{ + impl::incoming_messages& incoming = impl_->incoming[source]; + + // Find the next header with the right tag + std::vector::iterator header = + incoming.next_header[my_block_number()]; + while (header != incoming.headers.end() && header->tag != tag) ++header; + + // If no header is found, notify the caller + if (header == incoming.headers.end()) return false; + + // Deserialize the data + boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, + archive::no_header, header->offset); + in >> value; + + // Mark this message as received + header->tag = -1; + + // Move the "next header" indicator to the next unreceived message + while (incoming.next_header[my_block_number()] != incoming.headers.end() + && incoming.next_header[my_block_number()]->tag == -1) + ++incoming.next_header[my_block_number()]; + + if (incoming.next_header[my_block_number()] == incoming.headers.end()) { + bool finished = true; + for (std::size_t i = 0; i < incoming.next_header.size() && finished; ++i) { + if (incoming.next_header[i] != incoming.headers.end()) finished = false; + } + + if (finished) { + std::vector no_headers; + incoming.headers.swap(no_headers); + buffer_type empty_buffer; + incoming.buffer.swap(empty_buffer); + for (std::size_t i = 0; i < incoming.next_header.size(); ++i) + incoming.next_header[i] = incoming.headers.end(); + } + } + + return true; +} + +template +typename disable_if, bool>::type +mpi_process_group:: +array_receive_impl(int source, int tag, T* values, std::size_t& n) const +{ + impl::incoming_messages& incoming = impl_->incoming[source]; + + // Find the next header with the right tag + std::vector::iterator header = + incoming.next_header[my_block_number()]; + while (header != incoming.headers.end() && header->tag != tag) ++header; + + // If no header is found, notify the caller + if (header == incoming.headers.end()) return false; + + // Deserialize the data + boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, + archive::no_header, header->offset); + std::size_t num_sent; + in >> num_sent; + if (num_sent > n) + std::cerr << "ERROR: Have " << num_sent << " items but only space for " + << n << " items\n"; + + for (std::size_t i = 0; i < num_sent; ++i) + in >> values[i]; + n = num_sent; + + // Mark this message as received + header->tag = -1; + + // Move the "next header" indicator to the next unreceived message + while (incoming.next_header[my_block_number()] != incoming.headers.end() + && incoming.next_header[my_block_number()]->tag == -1) + ++incoming.next_header[my_block_number()]; + + if (incoming.next_header[my_block_number()] == incoming.headers.end()) { + bool finished = true; + for (std::size_t i = 0; i < incoming.next_header.size() && finished; ++i) { + if (incoming.next_header[i] != incoming.headers.end()) finished = false; + } + + if (finished) { + std::vector no_headers; + incoming.headers.swap(no_headers); + buffer_type empty_buffer; + incoming.buffer.swap(empty_buffer); + for (std::size_t i = 0; i < incoming.next_header.size(); ++i) + incoming.next_header[i] = incoming.headers.end(); + } + } + + return true; +} + +// Construct triggers +template +void mpi_process_group::trigger(int tag, const Handler& handler) +{ + assert(block_num); + install_trigger(tag,my_block_number(),shared_ptr( + new trigger_launcher(*this, tag, handler))); +} + +template +void mpi_process_group::trigger_with_reply(int tag, const Handler& handler) +{ + assert(block_num); + install_trigger(tag,my_block_number(),shared_ptr( + new reply_trigger_launcher(*this, tag, handler))); +} + +template +void mpi_process_group::global_trigger(int tag, const Handler& handler, + std::size_t sz) +{ + if (sz==0) // normal trigger + install_trigger(tag,0,shared_ptr( + new global_trigger_launcher(*this, tag, handler))); + else // trigger with irecv + install_trigger(tag,0,shared_ptr( + new global_irecv_trigger_launcher(*this, tag, handler,sz))); + +} + +namespace detail { + +template +void do_oob_receive(mpi_process_group const& self, + int source, int tag, Type& data, mpl::true_ /*is_mpi_datatype*/) +{ + using boost::mpi::get_mpi_datatype; + + //self.impl_->comm.recv(source,tag,data); + MPI_Recv(&data, 1, get_mpi_datatype(data), source, tag, self.impl_->comm, + MPI_STATUS_IGNORE); +} + +template +void do_oob_receive(mpi_process_group const& self, + int source, int tag, Type& data, mpl::false_ /*is_mpi_datatype*/) +{ + // self.impl_->comm.recv(source,tag,data); + // Receive the size of the data packet + boost::mpi::status status; + status = self.impl_->comm.probe(source, tag); + +#if BOOST_VERSION >= 103600 + int size = status.count().get(); +#else + int size; + MPI_Status& mpi_status = status; + MPI_Get_count(&mpi_status, MPI_PACKED, &size); +#endif + + // Receive the data packed itself + boost::mpi::packed_iarchive in(self.impl_->comm); + in.resize(size); + MPI_Recv(in.address(), size, MPI_PACKED, source, tag, self.impl_->comm, + MPI_STATUS_IGNORE); + + // Deserialize the data + in >> data; +} + +template +void do_oob_receive(mpi_process_group const& self, int source, int tag, Type& data) +{ + do_oob_receive(self, source, tag, data, + boost::mpi::is_mpi_datatype()); +} + + +} // namespace detail + + +template +void +mpi_process_group::trigger_launcher:: +receive(mpi_process_group const&, int source, int tag, + trigger_receive_context context, int block) const +{ +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << (out_of_band? "OOB trigger" : "Trigger") + << " receive from source " << source << " and tag " << tag + << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; +#endif + + Type data; + + if (context == trc_out_of_band) { + // Receive the message directly off the wire + int realtag = self.encode_tag( + block == -1 ? self.my_block_number() : block, tag); + detail::do_oob_receive(self,source,realtag,data); + } + else + // Receive the message out of the local buffer + boost::graph::distributed::receive(self, source, tag, data); + + // Pass the message off to the handler + handler(source, tag, data, context); +} + +template +void +mpi_process_group::reply_trigger_launcher:: +receive(mpi_process_group const&, int source, int tag, + trigger_receive_context context, int block) const +{ +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << (out_of_band? "OOB reply trigger" : "Reply trigger") + << " receive from source " << source << " and tag " << tag + << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; +#endif + assert(context == trc_out_of_band); + + boost::parallel::detail::untracked_pair data; + + // Receive the message directly off the wire + int realtag = self.encode_tag(block == -1 ? self.my_block_number() : block, + tag); + detail::do_oob_receive(self, source, realtag, data); + + // Pass the message off to the handler and send the result back to + // the source. + send_oob(self, source, data.first, + handler(source, tag, data.second, context), -2); +} + +template +void +mpi_process_group::global_trigger_launcher:: +receive(mpi_process_group const& self, int source, int tag, + trigger_receive_context context, int block) const +{ +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << (out_of_band? "OOB trigger" : "Trigger") + << " receive from source " << source << " and tag " << tag + << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; +#endif + + Type data; + + if (context == trc_out_of_band) { + // Receive the message directly off the wire + int realtag = self.encode_tag( + block == -1 ? self.my_block_number() : block, tag); + detail::do_oob_receive(self,source,realtag,data); + } + else + // Receive the message out of the local buffer + boost::graph::distributed::receive(self, source, tag, data); + + // Pass the message off to the handler + handler(self, source, tag, data, context); +} + + +template +void +mpi_process_group::global_irecv_trigger_launcher:: +receive(mpi_process_group const& self, int source, int tag, + trigger_receive_context context, int block) const +{ +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << (out_of_band? "OOB trigger" : "Trigger") + << " receive from source " << source << " and tag " << tag + << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; +#endif + + Type data; + + if (context == trc_out_of_band) { + return; + } + assert (context == trc_irecv_out_of_band); + + // force posting of new MPI_Irecv, even though buffer is already allocated + boost::mpi::packed_iarchive ia(self.impl_->comm,self.impl_->buffers[tag]); + ia >> data; + // Start a new receive + prepare_receive(self,tag,true); + // Pass the message off to the handler + handler(self, source, tag, data, context); +} + + +template +void +mpi_process_group::global_irecv_trigger_launcher:: +prepare_receive(mpi_process_group const& self, int tag, bool force) const +{ +#ifdef PBGL_PROCESS_GROUP_DEBUG + std::cerr << ("Posting Irecv for trigger") + << " receive with tag " << tag << std::endl; +#endif + if (self.impl_->buffers.find(tag) == self.impl_->buffers.end()) { + self.impl_->buffers[tag].resize(buffer_size); + force = true; + } + assert(static_cast(self.impl_->buffers[tag].size()) >= buffer_size); + + //BOOST_MPL_ASSERT(mpl::not_ >); + if (force) { + self.impl_->requests.push_back(MPI_Request()); + MPI_Request* request = &self.impl_->requests.back(); + MPI_Irecv(&self.impl_->buffers[tag].front(),buffer_size, + MPI_PACKED,MPI_ANY_SOURCE,tag,self.impl_->comm,request); + } +} + + +template +inline mpi_process_group::process_id_type +receive(const mpi_process_group& pg, int tag, T& value) +{ + for (std::size_t source = 0; source < pg.impl_->incoming.size(); ++source) { + if (pg.receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), + value, boost::mpi::is_mpi_datatype())) + return source; + } + assert (false); +} + +template +typename + enable_if, + std::pair >::type +receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) +{ + for (std::size_t source = 0; source < pg.impl_->incoming.size(); ++source) { + bool result = + pg.receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), + boost::serialization::make_array(values,n), + boost::mpl::true_()); + if (result) + return std::make_pair(source, n); + } + assert(false); +} + +template +typename + disable_if, + std::pair >::type +receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) +{ + for (std::size_t source = 0; source < pg.impl_->incoming.size(); ++source) { + if (pg.array_receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), + values, n)) + return std::make_pair(source, n); + } + assert(false); +} + +template +mpi_process_group::process_id_type +receive(const mpi_process_group& pg, + mpi_process_group::process_id_type source, int tag, T& value) +{ + if (pg.receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), + value, boost::mpi::is_mpi_datatype())) + return source; + else { + fprintf(stderr, + "Process %d failed to receive a message from process %d with tag %d in block %d.\n", + process_id(pg), source, tag, pg.my_block_number()); + + assert(false); + exit(1); + } +} + +template +typename + enable_if, + std::pair >::type +receive(const mpi_process_group& pg, int source, int tag, T values[], + std::size_t n) +{ + if (pg.receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), + boost::serialization::make_array(values,n), + boost::mpl::true_())) + return std::make_pair(source,n); + else { + fprintf(stderr, + "Process %d failed to receive a message from process %d with tag %d in block %d.\n", + process_id(pg), source, tag, pg.my_block_number()); + + assert(false); + exit(1); + } +} + +template +typename + disable_if, + std::pair >::type +receive(const mpi_process_group& pg, int source, int tag, T values[], + std::size_t n) +{ + pg.array_receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), + values, n); + + return std::make_pair(source, n); +} + +template +T* +all_reduce(const mpi_process_group& pg, T* first, T* last, T* out, + BinaryOperation bin_op) +{ + synchronize(pg); + + bool inplace = first == out; + + if (inplace) out = new T [last-first]; + + boost::mpi::all_reduce(boost::mpi::communicator(communicator(pg), + boost::mpi::comm_attach), + first, last-first, out, bin_op); + + if (inplace) { + std::copy(out, out + (last-first), first); + delete [] out; + return last; + } + + return out; +} + +template +void +broadcast(const mpi_process_group& pg, T& val, + mpi_process_group::process_id_type root) +{ + // broadcast the seed + boost::mpi::communicator comm(communicator(pg),boost::mpi::comm_attach); + boost::mpi::broadcast(comm,val,root); +} + + +template +T* +scan(const mpi_process_group& pg, T* first, T* last, T* out, + BinaryOperation bin_op) +{ + synchronize(pg); + + bool inplace = first == out; + + if (inplace) out = new T [last-first]; + + boost::mpi::scan(communicator(pg), first, last-first, out, bin_op); + + if (inplace) { + std::copy(out, out + (last-first), first); + delete [] out; + return last; + } + + return out; +} + + +template +void +all_gather(const mpi_process_group& pg, InputIterator first, + InputIterator last, std::vector& out) +{ + synchronize(pg); + + // Stick a copy of the local values into a vector, so we can broadcast it + std::vector local_values(first, last); + + // Collect the number of vertices stored in each process + int size = local_values.size(); + std::vector sizes(num_processes(pg)); + int result = MPI_Allgather(&size, 1, MPI_INT, + &sizes[0], 1, MPI_INT, + communicator(pg)); + assert(result == MPI_SUCCESS); + + // Adjust sizes based on the number of bytes + std::transform(sizes.begin(), sizes.end(), sizes.begin(), + std::bind2nd(std::multiplies(), sizeof(T))); + + // Compute displacements + std::vector displacements; + displacements.reserve(sizes.size() + 1); + displacements.push_back(0); + std::partial_sum(sizes.begin(), sizes.end(), + std::back_inserter(displacements)); + + // Gather all of the values + out.resize(displacements.back() / sizeof(T)); + if (!out.empty()) { + result = MPI_Allgatherv(local_values.empty()? (void*)&local_values + /* local results */: (void*)&local_values[0], + local_values.size() * sizeof(T), + MPI_BYTE, + &out[0], &sizes[0], &displacements[0], MPI_BYTE, + communicator(pg)); + } + assert(result == MPI_SUCCESS); +} + +template +mpi_process_group +process_subgroup(const mpi_process_group& pg, + InputIterator first, InputIterator last) +{ +/* + boost::mpi::group current_group = communicator(pg).group(); + boost::mpi::group new_group = current_group.include(first,last); + boost::mpi::communicator new_comm(communicator(pg),new_group); + return mpi_process_group(new_comm); +*/ + std::vector ranks(first, last); + + MPI_Group current_group; + int result = MPI_Comm_group(communicator(pg), ¤t_group); + assert(result == MPI_SUCCESS); + + MPI_Group new_group; + result = MPI_Group_incl(current_group, ranks.size(), &ranks[0], &new_group); + assert(result == MPI_SUCCESS); + + MPI_Comm new_comm; + result = MPI_Comm_create(communicator(pg), new_group, &new_comm); + assert(result == MPI_SUCCESS); + + result = MPI_Group_free(&new_group); + assert(result == MPI_SUCCESS); + result = MPI_Group_free(¤t_group); + assert(result == MPI_SUCCESS); + + if (new_comm != MPI_COMM_NULL) { + mpi_process_group result_pg(boost::mpi::communicator(new_comm,boost::mpi::comm_attach)); + result = MPI_Comm_free(&new_comm); + assert(result == 0); + return result_pg; + } else { + return mpi_process_group(mpi_process_group::create_empty()); + } + +} + + +template +Receiver* mpi_process_group::get_receiver() +{ + return impl_->blocks[my_block_number()]->on_receive + .template target(); +} + +template +typename enable_if >::type +receive_oob(const mpi_process_group& pg, + mpi_process_group::process_id_type source, int tag, T& value, int block) +{ + using boost::mpi::get_mpi_datatype; + + // Determine the actual message we expect to receive, and which + // communicator it will come by. + std::pair actual + = pg.actual_communicator_and_tag(tag, block); + + // Post a non-blocking receive that waits until we complete this request. + MPI_Request request; + MPI_Irecv(&value, 1, get_mpi_datatype(value), + source, actual.second, actual.first, &request); + + int done = 0; + do { + MPI_Test(&request, &done, MPI_STATUS_IGNORE); + if (!done) + pg.poll(/*wait=*/false, block); + } while (!done); +} + +template +typename disable_if >::type +receive_oob(const mpi_process_group& pg, + mpi_process_group::process_id_type source, int tag, T& value, int block) +{ + // Determine the actual message we expect to receive, and which + // communicator it will come by. + std::pair actual + = pg.actual_communicator_and_tag(tag, block); + + boost::optional status; + do { + status = actual.first.iprobe(source, actual.second); + if (!status) + pg.poll(); + } while (!status); + + //actual.first.recv(status->source(), status->tag(),value); + + // Allocate the receive buffer + boost::mpi::packed_iarchive in(actual.first); + +#if BOOST_VERSION >= 103600 + in.resize(status->count().get()); +#else + int size; + MPI_Status mpi_status = *status; + MPI_Get_count(&mpi_status, MPI_PACKED, &size); + in.resize(size); +#endif + + // Receive the message data + MPI_Recv(in.address(), in.size(), MPI_PACKED, + status->source(), status->tag(), actual.first, MPI_STATUS_IGNORE); + + // Unpack the message data + in >> value; +} + + +template +typename enable_if >::type +send_oob_with_reply(const mpi_process_group& pg, + mpi_process_group::process_id_type dest, + int tag, const SendT& send_value, ReplyT& reply_value, + int block) +{ + detail::tag_allocator::token reply_tag = pg.impl_->allocated_tags.get_tag(); + send_oob(pg, dest, tag, boost::parallel::detail::make_untracked_pair( + (int)reply_tag, send_value), block); + receive_oob(pg, dest, reply_tag, reply_value); +} + +template +typename disable_if >::type +send_oob_with_reply(const mpi_process_group& pg, + mpi_process_group::process_id_type dest, + int tag, const SendT& send_value, ReplyT& reply_value, + int block) +{ + detail::tag_allocator::token reply_tag = pg.impl_->allocated_tags.get_tag(); + send_oob(pg, dest, tag, + boost::parallel::detail::make_untracked_pair((int)reply_tag, + send_value), block); + receive_oob(pg, dest, reply_tag, reply_value); +} + +} } } // end namespace boost::graph::distributed diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/queue.ipp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/queue.ipp new file mode 100644 index 0000000000..f37ff25f2f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/queue.ipp @@ -0,0 +1,177 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#include +#include +#include +#include +#include +#include +#include + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +namespace boost { namespace graph { namespace distributed { + +template +BOOST_DISTRIBUTED_QUEUE_TYPE:: +distributed_queue(const ProcessGroup& process_group, const OwnerMap& owner, + const Buffer& buffer, bool polling) + : process_group(process_group, attach_distributed_object()), + owner(owner), + buffer(buffer), + polling(polling) +{ + if (!polling) + outgoing_buffers.reset( + new outgoing_buffers_t(num_processes(process_group))); + + setup_triggers(); +} + +template +BOOST_DISTRIBUTED_QUEUE_TYPE:: +distributed_queue(const ProcessGroup& process_group, const OwnerMap& owner, + const Buffer& buffer, const UnaryPredicate& pred, + bool polling) + : process_group(process_group, attach_distributed_object()), + owner(owner), + buffer(buffer), + pred(pred), + polling(polling) +{ + if (!polling) + outgoing_buffers.reset( + new outgoing_buffers_t(num_processes(process_group))); + + setup_triggers(); +} + +template +BOOST_DISTRIBUTED_QUEUE_TYPE:: +distributed_queue(const ProcessGroup& process_group, const OwnerMap& owner, + const UnaryPredicate& pred, bool polling) + : process_group(process_group, attach_distributed_object()), + owner(owner), + pred(pred), + polling(polling) +{ + if (!polling) + outgoing_buffers.reset( + new outgoing_buffers_t(num_processes(process_group))); + + setup_triggers(); +} + +template +void +BOOST_DISTRIBUTED_QUEUE_TYPE::push(const value_type& x) +{ + typename ProcessGroup::process_id_type dest = get(owner, x); + if (outgoing_buffers) + outgoing_buffers->at(dest).push_back(x); + else if (dest == process_id(process_group)) + buffer.push(x); + else + send(process_group, get(owner, x), msg_push, x); +} + +template +bool +BOOST_DISTRIBUTED_QUEUE_TYPE::empty() const +{ + /* Processes will stay here until the buffer is nonempty or + synchronization with the other processes indicates that all local + buffers are empty (and no messages are in transit). + */ + while (buffer.empty() && !do_synchronize()) ; + + return buffer.empty(); +} + +template +typename BOOST_DISTRIBUTED_QUEUE_TYPE::size_type +BOOST_DISTRIBUTED_QUEUE_TYPE::size() const +{ + empty(); + return buffer.size(); +} + +template +void BOOST_DISTRIBUTED_QUEUE_TYPE::setup_triggers() +{ + using boost::graph::parallel::simple_trigger; + + simple_trigger(process_group, msg_push, this, + &distributed_queue::handle_push); + simple_trigger(process_group, msg_multipush, this, + &distributed_queue::handle_multipush); +} + +template +void +BOOST_DISTRIBUTED_QUEUE_TYPE:: +handle_push(int /*source*/, int /*tag*/, const value_type& value, + trigger_receive_context) +{ + if (pred(value)) buffer.push(value); +} + +template +void +BOOST_DISTRIBUTED_QUEUE_TYPE:: +handle_multipush(int /*source*/, int /*tag*/, + const std::vector& values, + trigger_receive_context) +{ + for (std::size_t i = 0; i < values.size(); ++i) + if (pred(values[i])) buffer.push(values[i]); +} + +template +bool +BOOST_DISTRIBUTED_QUEUE_TYPE::do_synchronize() const +{ +#ifdef PBGL_ACCOUNTING + ++num_synchronizations; +#endif + + using boost::parallel::all_reduce; + using std::swap; + + typedef typename ProcessGroup::process_id_type process_id_type; + + if (outgoing_buffers) { + // Transfer all of the push requests + process_id_type id = process_id(process_group); + process_id_type np = num_processes(process_group); + for (process_id_type dest = 0; dest < np; ++dest) { + outgoing_buffer_t& outgoing = outgoing_buffers->at(dest); + std::size_t size = outgoing.size(); + if (size != 0) { + if (dest != id) { + send(process_group, dest, msg_multipush, outgoing); + } else { + for (std::size_t i = 0; i < size; ++i) + buffer.push(outgoing[i]); + } + outgoing.clear(); + } + } + } + synchronize(process_group); + + unsigned local_size = buffer.size(); + unsigned global_size = + all_reduce(process_group, local_size, std::plus()); + return global_size == 0; +} + +} } } // end namespace boost::graph::distributed diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/remote_update_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/remote_update_set.hpp new file mode 100644 index 0000000000..08f4316ad6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/remote_update_set.hpp @@ -0,0 +1,259 @@ +// Copyright (C) 2005-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DETAIL_REMOTE_UPDATE_SET_HPP +#define BOOST_GRAPH_DETAIL_REMOTE_UPDATE_SET_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace graph { namespace detail { + +template +void do_synchronize(ProcessGroup& pg) +{ + using boost::parallel::synchronize; + synchronize(pg); +} + +struct remote_set_queued {}; +struct remote_set_immediate {}; + +template +class remote_set_semantics +{ + BOOST_STATIC_CONSTANT + (bool, + queued = (is_convertible< + typename ProcessGroup::communication_category, + parallel::bsp_process_group_tag>::value)); + + public: + typedef typename mpl::if_c::type type; +}; + + +template::type> +class remote_update_set; + +/********************************************************************** + * Remote updating set that queues messages until synchronization * + **********************************************************************/ +template +class remote_update_set +{ + typedef typename property_traits::key_type Key; + typedef std::vector > Updates; + typedef typename Updates::size_type updates_size_type; + typedef typename Updates::value_type updates_pair_type; + +public: + +private: + typedef typename ProcessGroup::process_id_type process_id_type; + + enum message_kind { + /** Message containing the number of updates that will be sent in + * a msg_updates message that will immediately follow. This + * message will contain a single value of type + * updates_size_type. + */ + msg_num_updates, + + /** Contains (key, value) pairs with all of the updates from a + * particular source. The number of updates is variable, but will + * be provided in a msg_num_updates message that immediately + * preceeds this message. + * + */ + msg_updates + }; + + struct handle_messages + { + explicit + handle_messages(remote_update_set* self, const ProcessGroup& pg) + : self(self), update_sizes(num_processes(pg), 0) { } + + void operator()(process_id_type source, int tag) + { + switch(tag) { + case msg_num_updates: + { + // Receive the # of updates + updates_size_type num_updates; + receive(self->process_group, source, tag, num_updates); + + update_sizes[source] = num_updates; + } + break; + + case msg_updates: + { + updates_size_type num_updates = update_sizes[source]; + assert(num_updates); + + // Receive the actual updates + std::vector updates(num_updates); + receive(self->process_group, source, msg_updates, &updates[0], + num_updates); + + // Send updates to derived "receive_update" member + Derived* derived = static_cast(self); + for (updates_size_type u = 0; u < num_updates; ++u) + derived->receive_update(source, updates[u].first, updates[u].second); + + update_sizes[source] = 0; + } + break; + }; + } + + private: + remote_update_set* self; + std::vector update_sizes; + }; + friend struct handle_messages; + + protected: + remote_update_set(const ProcessGroup& pg, const OwnerMap& owner) + : process_group(pg, handle_messages(this, pg)), + updates(num_processes(pg)), owner(owner) { + } + + + void update(const Key& key, const Value& value) + { + if (get(owner, key) == process_id(process_group)) { + Derived* derived = static_cast(this); + derived->receive_update(get(owner, key), key, value); + } + else { + updates[get(owner, key)].push_back(std::make_pair(key, value)); + } + } + + void collect() { } + + void synchronize() + { + // Emit all updates and then remove them + process_id_type num_processes = updates.size(); + for (process_id_type p = 0; p < num_processes; ++p) { + if (!updates[p].empty()) { + send(process_group, p, msg_num_updates, updates[p].size()); + send(process_group, p, msg_updates, + &updates[p].front(), updates[p].size()); + updates[p].clear(); + } + } + + do_synchronize(process_group); + } + + ProcessGroup process_group; + + private: + std::vector updates; + OwnerMap owner; +}; + +/********************************************************************** + * Remote updating set that sends messages immediately * + **********************************************************************/ +template +class remote_update_set +{ + typedef typename property_traits::key_type Key; + typedef std::pair update_pair_type; + typedef typename std::vector::size_type updates_size_type; + +public: + typedef typename ProcessGroup::process_id_type process_id_type; + +private: + enum message_kind { + /** Contains a (key, value) pair that will be updated. */ + msg_update + }; + + struct handle_messages + { + explicit handle_messages(remote_update_set* self, const ProcessGroup& pg) + : self(self) + { update_sizes.resize(num_processes(pg), 0); } + + void operator()(process_id_type source, int tag) + { + // Receive the # of updates + assert(tag == msg_update); + update_pair_type update; + receive(self->process_group, source, tag, update); + + // Send update to derived "receive_update" member + Derived* derived = static_cast(self); + derived->receive_update(source, update.first, update.second); + } + + private: + std::vector update_sizes; + remote_update_set* self; + }; + friend struct handle_messages; + + protected: + remote_update_set(const ProcessGroup& pg, const OwnerMap& owner) + : process_group(pg, handle_messages(this, pg)), owner(owner) { } + + void update(const Key& key, const Value& value) + { + if (get(owner, key) == process_id(process_group)) { + Derived* derived = static_cast(this); + derived->receive_update(get(owner, key), key, value); + } + else + send(process_group, get(owner, key), msg_update, + update_pair_type(key, value)); + } + + void collect() + { + typedef std::pair probe_type; + handle_messages handler(this, process_group); + while (optional stp = probe(process_group)) + if (stp->second == msg_update) handler(stp->first, stp->second); + } + + void synchronize() + { + do_synchronize(process_group); + } + + ProcessGroup process_group; + OwnerMap owner; +}; + +} } } // end namespace boost::graph::detail + +#endif // BOOST_GRAPH_DETAIL_REMOTE_UPDATE_SET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/tag_allocator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/tag_allocator.hpp new file mode 100644 index 0000000000..2734039270 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/detail/tag_allocator.hpp @@ -0,0 +1,84 @@ +// -*- C++ -*- + +// Copyright (C) 2007 Douglas Gregor + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_GRAPH_DISTRIBUTED_TAG_ALLOCATOR_HPP +#define BOOST_GRAPH_DISTRIBUTED_TAG_ALLOCATOR_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include + +namespace boost { namespace graph { namespace distributed { namespace detail { + +/** + * \brief The tag allocator allows clients to request unique tags that + * can be used for one-time communications. + * + * The tag allocator hands out tag values from a predefined maximum + * (given in the constructor) moving downward. Tags are provided one + * at a time via a @c token. When the @c token goes out of scope, the + * tag is returned and may be reallocated. These tags should be used, + * for example, for one-time communication of values. + */ +class tag_allocator { +public: + class token; + friend class token; + + /** + * Construct a new tag allocator that provides unique tags starting + * with the value @p top_tag and moving lower, as necessary. + */ + explicit tag_allocator(int top_tag) : bottom(top_tag) { } + + /** + * Retrieve a new tag. The token itself holds onto the tag, which + * will be released when the token is destroyed. + */ + token get_tag(); + +private: + int bottom; + std::vector freed; +}; + +/** + * A token used to represent an allocated tag. + */ +class tag_allocator::token { +public: + /// Transfer ownership of the tag from @p other. + token(const token& other); + + /// De-allocate the tag, if this token still owns it. + ~token(); + + /// Retrieve the tag allocated for this task. + operator int() const { return tag_; } + +private: + /// Create a token with a specific tag from the given tag_allocator + token(tag_allocator* allocator, int tag) + : allocator(allocator), tag_(tag) { } + + /// Undefined: tokens are not copy-assignable + token& operator=(const token&); + + /// The allocator from which this tag was allocated. + tag_allocator* allocator; + + /// The stored tag flag. If -1, this token does not own the tag. + mutable int tag_; + + friend class tag_allocator; +}; + +} } } } // end namespace boost::graph::distributed::detail + +#endif // BOOST_GRAPH_DISTRIBUTED_TAG_ALLOCATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/dijkstra_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/dijkstra_shortest_paths.hpp new file mode 100644 index 0000000000..f72fa11a50 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/dijkstra_shortest_paths.hpp @@ -0,0 +1,205 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PARALLEL_DIJKSTRA_HPP +#define BOOST_GRAPH_PARALLEL_DIJKSTRA_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include + +namespace boost { + + namespace graph { namespace detail { + + + template + struct parallel_dijkstra_impl2 + { + template + static void + run(const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, + typename property_traits::value_type lookahead, + WeightMap weight, IndexMap index_map, ColorMap color_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis) + { + eager_dijkstra_shortest_paths(g, s, predecessor, distance, lookahead, + weight, index_map, color_map, compare, + combine, inf, zero, vis); + } + }; + + template<> + struct parallel_dijkstra_impl2< ::boost::detail::error_property_not_found > + { + template + static void + run(const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, + ::boost::detail::error_property_not_found, + WeightMap weight, IndexMap index_map, ColorMap color_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis) + { + crauser_et_al_shortest_paths(g, s, predecessor, distance, weight, + index_map, color_map, compare, combine, + inf, zero, vis); + } + }; + + template + struct parallel_dijkstra_impl + { + template + static void + run(const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, + Lookahead lookahead, + WeightMap weight, IndexMap index_map, ColorMap color_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis) + { + graph::detail::parallel_dijkstra_impl2 + ::run(g, s, predecessor, distance, lookahead, weight, index_map, + color_map, compare, combine, inf, zero, vis); + } + }; + + template<> + struct parallel_dijkstra_impl< ::boost::detail::error_property_not_found > + { + private: + template + static void + run_impl(const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, + Lookahead lookahead, WeightMap weight, IndexMap index_map, + ColorMap color_map, Compare compare, Combine combine, + DistInf inf, DistZero zero, DijkstraVisitor vis) + { + BGL_FORALL_VERTICES_T(u, g, DistributedGraph) + BGL_FORALL_OUTEDGES_T(u, e, g, DistributedGraph) + local_put(color_map, target(e, g), white_color); + + graph::detail::parallel_dijkstra_impl2 + ::run(g, s, predecessor, distance, lookahead, weight, index_map, + color_map, compare, combine, inf, zero, vis); + } + + public: + template + static void + run(const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, + Lookahead lookahead, WeightMap weight, IndexMap index_map, + ::boost::detail::error_property_not_found, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis) + { + typedef typename graph_traits::vertices_size_type + vertices_size_type; + + vertices_size_type n = num_vertices(g); + std::vector colors(n, white_color); + + run_impl(g, s, predecessor, distance, lookahead, weight, index_map, + make_iterator_property_map(colors.begin(), index_map), + compare, combine, inf, zero, vis); + } + }; + } } // end namespace graph::detail + + + /** Dijkstra's single-source shortest paths algorithm for distributed + * graphs. + * + * Also implements the heuristics of: + * + * Andreas Crauser, Kurt Mehlhorn, Ulrich Meyer, and Peter + * Sanders. A Parallelization of Dijkstra's Shortest Path + * Algorithm. In Lubos Brim, Jozef Gruska, and Jiri Zlatuska, + * editors, Mathematical Foundations of Computer Science (MFCS), + * volume 1450 of Lecture Notes in Computer Science, pages + * 722--731, 1998. Springer. + */ + template + inline + void + dijkstra_shortest_paths + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight, + IndexMap index_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis, + const bgl_named_params& params + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(DistributedGraph,distributed_graph_tag)) + { + typedef typename graph_traits::vertices_size_type + vertices_size_type; + + // Build a distributed property map for vertex colors, if we need it + bool use_default_color_map + = is_default_param(get_param(params, vertex_color)); + vertices_size_type n = use_default_color_map? num_vertices(g) : 1; + std::vector color(n, white_color); + typedef iterator_property_map::iterator, + IndexMap> DefColorMap; + DefColorMap color_map(color.begin(), index_map); + + typedef typename property_value< bgl_named_params, + vertex_color_t>::type color_map_type; + + graph::detail::parallel_dijkstra_impl + ::run(g, s, predecessor, distance, + get_param(params, lookahead_t()), + weight, index_map, + get_param(params, vertex_color), + compare, combine, inf, zero, vis); + } +} // end namespace boost + +#endif // BOOST_GRAPH_PARALLEL_DIJKSTRA_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/distributed_graph_utility.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/distributed_graph_utility.hpp new file mode 100644 index 0000000000..058b9887d8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/distributed_graph_utility.hpp @@ -0,0 +1,154 @@ +// Copyright (C) 2005-2006 The Trustees of Indiana University. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Peter Gottschling +// Douglas Gregor +// Andrew Lumsdaine + +#include +#include + +#ifndef BOOST_GRAPH_DISTRIBUTED_GRAPH_UTILITY_INCLUDE +#define BOOST_GRAPH_DISTRIBUTED_GRAPH_UTILITY_INCLUDE + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +namespace boost { namespace graph { + + template + void property_on_inedges(Property p, const Graph& g) + { + BGL_FORALL_VERTICES_T(u, g, Graph) + BGL_FORALL_INEDGES_T(u, e, g, Graph) + request(p, e); + synchronize(p); + } + + // For reverse graphs + template + void property_on_outedges(Property p, const Graph& g) + { + BGL_FORALL_VERTICES_T(u, g, Graph) + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + request(p, e); + synchronize(p); + } + + template + void property_on_successors(Property p, const Graph& g) + { + BGL_FORALL_VERTICES_T(u, g, Graph) + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + request(p, target(e, g)); + synchronize(p); + } + + template + void property_on_predecessors(Property p, const Graph& g) + { + BGL_FORALL_VERTICES_T(u, g, Graph) + BGL_FORALL_INEDGES_T(u, e, g, Graph) + request(p, source(e, g)); + synchronize(p); + } + + // Like successors and predecessors but saves one synchronize (and a call) + template + void property_on_adjacents(Property p, const Graph& g) + { + BGL_FORALL_VERTICES_T(u, g, Graph) { + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) + request(p, target(e, g)); + BGL_FORALL_INEDGES_T(u, e, g, Graph) + request(p, source(e, g)); + } + synchronize(p); + } + + template + void copy_vertex_property(PropertyIn p_in, PropertyOut p_out, Graph& g) + { + BGL_FORALL_VERTICES_T(u, g, Graph) + put(p_out, u, get(p_in, g)); + } + + template + void copy_edge_property(PropertyIn p_in, PropertyOut p_out, Graph& g) + { + BGL_FORALL_EDGES_T(e, g, Graph) + put(p_out, e, get(p_in, g)); + } + + + namespace distributed { + + // Define global_index global(graph); + // Then global(v) returns global index of v + template + struct global_index + { + typedef typename property_map::const_type + VertexIndexMap; + typedef typename property_map::const_type + VertexGlobalMap; + + explicit global_index(Graph const& g) + : global_index_map(process_group(g), num_vertices(g), get(vertex_index, g), + get(vertex_global, g)) {} + + int operator() (typename graph_traits::vertex_descriptor v) + { return get(global_index_map, v); } + + protected: + boost::parallel::global_index_map + global_index_map; + }; + + template + struct additive_reducer { + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + template + T operator()(const K&) const { return T(0); } + + template + T operator()(const K&, const T& local, const T& remote) const { return local + remote; } + }; + + template + struct choose_min_reducer { + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + template + T operator()(const K&) const { return (std::numeric_limits::max)(); } + + template + T operator()(const K&, const T& x, const T& y) const + { return x < y ? x : y; } + }; + + // To use a property map syntactically like a function + template + struct property_map_reader + { + explicit property_map_reader(PropertyMap pm) : pm(pm) {} + + template + typename PropertyMap::value_type + operator() (const T& v) + { + return get(pm, v); + } + private: + PropertyMap pm; + }; + + } // namespace distributed + +}} // namespace boost::graph + +#endif // BOOST_GRAPH_DISTRIBUTED_GRAPH_UTILITY_INCLUDE diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp new file mode 100644 index 0000000000..a516daf790 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp @@ -0,0 +1,446 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +/************************************************************************** + * This source file implements a variation on distributed Dijkstra's * + * algorithm that can expose additional parallelism by permitting * + * vertices within a certain distance from the minimum to be processed, * + * even though they may not be at their final distance. This can * + * introduce looping, but the algorithm will still terminate so long as * + * there are no negative loops. * + **************************************************************************/ +#ifndef BOOST_GRAPH_EAGER_DIJKSTRA_SHORTEST_PATHS_HPP +#define BOOST_GRAPH_EAGER_DIJKSTRA_SHORTEST_PATHS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef PBGL_ACCOUNTING +# include +# include +#endif // PBGL_ACCOUNTING + +#ifdef MUTABLE_QUEUE +# include +#endif + +namespace boost { namespace graph { namespace distributed { + +#ifdef PBGL_ACCOUNTING +struct eager_dijkstra_shortest_paths_stats_t +{ + /* The value of the lookahead parameter. */ + double lookahead; + + /* Total wall-clock time used by the algorithm.*/ + accounting::time_type execution_time; + + /* The number of vertices deleted in each superstep. */ + std::vector deleted_vertices; + + template + void print(OutputStream& out) + { + double avg_deletions = std::accumulate(deleted_vertices.begin(), + deleted_vertices.end(), + 0.0); + avg_deletions /= deleted_vertices.size(); + + out << "Problem = \"Single-Source Shortest Paths\"\n" + << "Algorithm = \"Eager Dijkstra\"\n" + << "Function = eager_dijkstra_shortest_paths\n" + << "(P) Lookahead = " << lookahead << "\n" + << "Wall clock time = " << accounting::print_time(execution_time) + << "\nSupersteps = " << deleted_vertices.size() << "\n" + << "Avg. deletions per superstep = " << avg_deletions << "\n"; + } +}; + +static eager_dijkstra_shortest_paths_stats_t eager_dijkstra_shortest_paths_stats; +#endif + +namespace detail { + +// Borrowed from BGL's dijkstra_shortest_paths +template + struct parallel_dijkstra_bfs_visitor : bfs_visitor<> +{ + typedef typename property_traits::value_type distance_type; + + parallel_dijkstra_bfs_visitor(UniformCostVisitor vis, Queue& Q, + WeightMap w, PredecessorMap p, DistanceMap d, + BinaryFunction combine, BinaryPredicate compare, + distance_type zero) + : m_vis(vis), m_Q(Q), m_weight(w), m_predecessor(p), m_distance(d), + m_combine(combine), m_compare(compare), m_zero(zero) { } + + template + void initialize_vertex(Vertex u, Graph& g) + { m_vis.initialize_vertex(u, g); } + template + void discover_vertex(Vertex u, Graph& g) { m_vis.discover_vertex(u, g); } + template + void examine_vertex(Vertex u, Graph& g) { m_vis.examine_vertex(u, g); } + + /* Since the eager formulation of Parallel Dijkstra's algorithm can + loop, we may relax on *any* edge, not just those associated with + white and gray targets. */ + template + void examine_edge(Edge e, Graph& g) { + if (m_compare(get(m_weight, e), m_zero)) + boost::throw_exception(negative_edge()); + + m_vis.examine_edge(e, g); + + boost::parallel::caching_property_map c_pred(m_predecessor); + boost::parallel::caching_property_map c_dist(m_distance); + + distance_type old_distance = get(c_dist, target(e, g)); + + bool m_decreased = relax(e, g, m_weight, c_pred, c_dist, + m_combine, m_compare); + + /* On x86 Linux with optimization, we sometimes get into a + horrible case where m_decreased is true but the distance hasn't + actually changed. This occurs when the comparison inside + relax() occurs with the 80-bit precision of the x87 floating + point unit, but the difference is lost when the resulting + values are written back to lower-precision memory (e.g., a + double). With the eager Dijkstra's implementation, this results + in looping. */ + if (m_decreased && old_distance != get(c_dist, target(e, g))) { + m_Q.update(target(e, g)); + m_vis.edge_relaxed(e, g); + } else + m_vis.edge_not_relaxed(e, g); + } + template + void finish_vertex(Vertex u, Graph& g) { m_vis.finish_vertex(u, g); } + + UniformCostVisitor m_vis; + Queue& m_Q; + WeightMap m_weight; + PredecessorMap m_predecessor; + DistanceMap m_distance; + BinaryFunction m_combine; + BinaryPredicate m_compare; + distance_type m_zero; +}; + + /********************************************************************** + * Dijkstra queue that implements arbitrary "lookahead" * + **********************************************************************/ + template + class lookahead_dijkstra_queue + : public graph::detail::remote_update_set< + lookahead_dijkstra_queue< + Graph, Combine, Compare, VertexIndexMap, DistanceMap, + PredecessorMap>, + typename boost::graph::parallel::process_group_type::type, + typename dijkstra_msg_value::type, + typename property_map::const_type> + { + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef lookahead_dijkstra_queue self_type; + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typedef dijkstra_msg_value msg_value_creator; + typedef typename msg_value_creator::type msg_value_type; + typedef typename property_map::const_type + OwnerPropertyMap; + + typedef graph::detail::remote_update_set + inherited; + + // Priority queue for tentative distances + typedef indirect_cmp queue_compare_type; + + typedef typename property_traits::value_type distance_type; + +#ifdef MUTABLE_QUEUE + typedef mutable_queue, + queue_compare_type, VertexIndexMap> queue_type; + +#else + typedef relaxed_heap queue_type; +#endif // MUTABLE_QUEUE + + typedef typename process_group_type::process_id_type process_id_type; + + public: + typedef vertex_descriptor value_type; + + lookahead_dijkstra_queue(const Graph& g, + const Combine& combine, + const Compare& compare, + const VertexIndexMap& id, + const DistanceMap& distance_map, + const PredecessorMap& predecessor_map, + distance_type lookahead) + : inherited(boost::graph::parallel::process_group(g), get(vertex_owner, g)), + queue(num_vertices(g), queue_compare_type(distance_map, compare), id), + distance_map(distance_map), + predecessor_map(predecessor_map), + min_distance(0), + lookahead(lookahead) +#ifdef PBGL_ACCOUNTING + , local_deletions(0) +#endif + { } + + void push(const value_type& x) + { + msg_value_type msg_value = + msg_value_creator::create(get(distance_map, x), + predecessor_value(get(predecessor_map, x))); + inherited::update(x, msg_value); + } + + void update(const value_type& x) { push(x); } + + void pop() + { + queue.pop(); +#ifdef PBGL_ACCOUNTING + ++local_deletions; +#endif + } + + value_type& top() { return queue.top(); } + const value_type& top() const { return queue.top(); } + + bool empty() + { + inherited::collect(); + + // If there are no suitable messages, wait until we get something + while (!has_suitable_vertex()) { + if (do_synchronize()) return true; + } + + // Return true only if nobody has any messages; false if we + // have suitable messages + return false; + } + + private: + vertex_descriptor predecessor_value(vertex_descriptor v) const + { return v; } + + vertex_descriptor + predecessor_value(property_traits::reference) const + { return graph_traits::null_vertex(); } + + bool has_suitable_vertex() const + { + return (!queue.empty() + && get(distance_map, queue.top()) <= min_distance + lookahead); + } + + bool do_synchronize() + { + using boost::parallel::all_reduce; + using boost::parallel::minimum; + + inherited::synchronize(); + + // TBD: could use combine here, but then we need to stop using + // minimum() as the function object. + distance_type local_distance = + queue.empty()? (std::numeric_limits::max)() + : get(distance_map, queue.top()); + + all_reduce(this->process_group, &local_distance, &local_distance + 1, + &min_distance, minimum()); + +#ifdef PBGL_ACCOUNTING + std::size_t deletions = 0; + all_reduce(this->process_group, &local_deletions, &local_deletions + 1, + &deletions, std::plus()); + if (process_id(this->process_group) == 0) + eager_dijkstra_shortest_paths_stats.deleted_vertices + .push_back(deletions); + local_deletions = 0; + assert(deletions > 0); +#endif + + return min_distance == (std::numeric_limits::max)(); + } + + public: + void + receive_update(process_id_type source, vertex_descriptor vertex, + distance_type distance) + { + // Update the queue if the received distance is better than + // the distance we know locally + if (distance <= get(distance_map, vertex)) { + + // Update the local distance map + put(distance_map, vertex, distance); + + bool is_in_queue = queue.contains(vertex); + + if (!is_in_queue) + queue.push(vertex); + else + queue.update(vertex); + } + } + + void + receive_update(process_id_type source, vertex_descriptor vertex, + std::pair p) + { + if (p.first <= get(distance_map, vertex)) { + put(predecessor_map, vertex, p.second); + receive_update(source, vertex, p.first); + } + } + + private: + queue_type queue; + DistanceMap distance_map; + PredecessorMap predecessor_map; + distance_type min_distance; + distance_type lookahead; +#ifdef PBGL_ACCOUNTING + std::size_t local_deletions; +#endif + }; + /**********************************************************************/ +} // end namespace detail + +template +void +eager_dijkstra_shortest_paths + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, + typename property_traits::value_type lookahead, + WeightMap weight, IndexMap index_map, ColorMap color_map, + Compare compare, Combine combine, DistInf inf, DistZero zero, + DijkstraVisitor vis) +{ + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typedef typename graph_traits::vertex_descriptor + Vertex; + typedef typename graph_traits::vertices_size_type + vertices_size_type; + +#ifdef PBGL_ACCOUNTING + eager_dijkstra_shortest_paths_stats.deleted_vertices.clear(); + eager_dijkstra_shortest_paths_stats.lookahead = lookahead; + eager_dijkstra_shortest_paths_stats.execution_time = accounting::get_time(); +#endif + + // Initialize local portion of property maps + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + put(distance, *ui, inf); + put(predecessor, *ui, *ui); + } + put(distance, s, zero); + + // Dijkstra Queue + typedef detail::lookahead_dijkstra_queue + Queue; + + Queue Q(g, combine, compare, index_map, distance, + predecessor, lookahead); + + // Parallel Dijkstra visitor + detail::parallel_dijkstra_bfs_visitor + bfs_vis(vis, Q, weight, predecessor, distance, combine, compare, + zero); + + set_property_map_role(vertex_color, color_map); + set_property_map_role(vertex_distance, distance); + + breadth_first_search(g, s, Q, bfs_vis, color_map); + +#ifdef PBGL_ACCOUNTING + eager_dijkstra_shortest_paths_stats.execution_time = + accounting::get_time() + - eager_dijkstra_shortest_paths_stats.execution_time; +#endif +} + +template +void +eager_dijkstra_shortest_paths + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, + typename property_traits::value_type lookahead, + WeightMap weight) +{ + typedef typename property_traits::value_type distance_type; + + std::vector colors(num_vertices(g), white_color); + + eager_dijkstra_shortest_paths(g, s, predecessor, distance, lookahead, weight, + get(vertex_index, g), + make_iterator_property_map(&colors[0], + get(vertex_index, + g)), + std::less(), + closed_plus(), + distance_type(), + (std::numeric_limits::max)(), + dijkstra_visitor<>()); +} + +template +void +eager_dijkstra_shortest_paths + (const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, + typename property_traits::value_type lookahead) +{ + eager_dijkstra_shortest_paths(g, s, predecessor, distance, lookahead, + get(edge_weight, g)); +} +} // end namespace distributed + +#ifdef PBGL_ACCOUNTING +using distributed::eager_dijkstra_shortest_paths_stats; +#endif + +using distributed::eager_dijkstra_shortest_paths; + +} } // end namespace boost::graph + +#endif // BOOST_GRAPH_EAGER_DIJKSTRA_SHORTEST_PATHS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/filtered_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/filtered_graph.hpp new file mode 100644 index 0000000000..9677e4dd10 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/filtered_graph.hpp @@ -0,0 +1,51 @@ +// Copyright (C) 2004-2008 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Nick Edmonds +// Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP +#define BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include + +namespace boost { + namespace graph { + namespace parallel { + /// Retrieve the process group from a filtered graph + template + struct process_group_type > + : process_group_type { }; + + template + struct process_group_type > + : process_group_type { }; + } + + } + + /// Retrieve the process group from a filtered graph + template + inline typename graph::parallel::process_group_type::type + process_group(filtered_graph const& g) { + return process_group(g.m_g); + } + + /// Forward vertex() to vertex() of the base graph + template + typename graph_traits::vertex_descriptor + vertex(typename graph_traits::vertices_size_type i, + filtered_graph const& g) + { return vertex(i, g.m_g); } + +} + +#endif // BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/fruchterman_reingold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/fruchterman_reingold.hpp new file mode 100644 index 0000000000..a89aea3dd1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/fruchterman_reingold.hpp @@ -0,0 +1,384 @@ +// Copyright (C) 2005-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_FRUCHTERMAN_REINGOLD_HPP +#define BOOST_GRAPH_DISTRIBUTED_FRUCHTERMAN_REINGOLD_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include + +namespace boost { namespace graph { namespace distributed { + +class simple_tiling +{ + public: + simple_tiling(int columns, int rows, bool flip = true) + : columns(columns), rows(rows), flip(flip) + { + } + + // Convert from a position (x, y) in the tiled display into a + // processor ID number + int operator()(int x, int y) const + { + return flip? (rows - y - 1) * columns + x : y * columns + x; + } + + // Convert from a process ID to a position (x, y) in the tiled + // display + std::pair operator()(int id) + { + int my_col = id % columns; + int my_row = flip? rows - (id / columns) - 1 : id / columns; + return std::make_pair(my_col, my_row); + } + + int columns, rows; + + private: + bool flip; +}; + +// Force pairs function object that does nothing +struct no_force_pairs +{ + template + void operator()(const Graph&, const ApplyForce&) + { + } +}; + +// Computes force pairs in the distributed case. +template +class distributed_force_pairs_proxy +{ + public: + distributed_force_pairs_proxy(const PositionMap& position, + const DisplacementMap& displacement, + const LocalForces& local_forces, + const NonLocalForces& nonlocal_forces = NonLocalForces()) + : position(position), displacement(displacement), + local_forces(local_forces), nonlocal_forces(nonlocal_forces) + { + } + + template + void operator()(const Graph& g, ApplyForce apply_force) + { + // Flush remote displacements + displacement.flush(); + + // Receive updated positions for all of our neighbors + synchronize(position); + + // Reset remote displacements + displacement.reset(); + + // Compute local repulsive forces + local_forces(g, apply_force); + + // Compute neighbor repulsive forces + nonlocal_forces(g, apply_force); + } + + protected: + PositionMap position; + DisplacementMap displacement; + LocalForces local_forces; + NonLocalForces nonlocal_forces; +}; + +template +inline +distributed_force_pairs_proxy +make_distributed_force_pairs(const PositionMap& position, + const DisplacementMap& displacement, + const LocalForces& local_forces) +{ + typedef + distributed_force_pairs_proxy + result_type; + return result_type(position, displacement, local_forces); +} + +template +inline +distributed_force_pairs_proxy +make_distributed_force_pairs(const PositionMap& position, + const DisplacementMap& displacement, + const LocalForces& local_forces, + const NonLocalForces& nonlocal_forces) +{ + typedef + distributed_force_pairs_proxy + result_type; + return result_type(position, displacement, local_forces, nonlocal_forces); +} + +// Compute nonlocal force pairs based on the shared borders with +// adjacent tiles. +template +class neighboring_tiles_force_pairs +{ + public: + typedef typename property_traits::value_type Point; + typedef typename point_traits::component_type Dim; + + enum bucket_position { left, top, right, bottom, end_position }; + + neighboring_tiles_force_pairs(PositionMap position, Point origin, + Point extent, simple_tiling tiling) + : position(position), origin(origin), extent(extent), tiling(tiling) + { + } + + template + void operator()(const Graph& g, ApplyForce apply_force) + { + // TBD: Do this some smarter way + if (tiling.columns == 1 && tiling.rows == 1) + return; + + typedef typename graph_traits::vertex_descriptor vertex_descriptor; +#ifndef BOOST_NO_STDC_NAMESPACE + using std::sqrt; +#endif // BOOST_NO_STDC_NAMESPACE + + // TBD: num_vertices(g) should be the global number of vertices? + Dim two_k = Dim(2) * sqrt(extent[0] * extent[1] / num_vertices(g)); + + std::vector my_vertices[4]; + std::vector neighbor_vertices[4]; + + // Compute cutoff positions + Dim cutoffs[4]; + cutoffs[left] = origin[0] + two_k; + cutoffs[top] = origin[1] + two_k; + cutoffs[right] = origin[0] + extent[0] - two_k; + cutoffs[bottom] = origin[1] + extent[1] - two_k; + + // Compute neighbors + typename PositionMap::process_group_type pg = position.process_group(); + std::pair my_tile = tiling(process_id(pg)); + int neighbors[4] = { -1, -1, -1, -1 } ; + if (my_tile.first > 0) + neighbors[left] = tiling(my_tile.first - 1, my_tile.second); + if (my_tile.second > 0) + neighbors[top] = tiling(my_tile.first, my_tile.second - 1); + if (my_tile.first < tiling.columns - 1) + neighbors[right] = tiling(my_tile.first + 1, my_tile.second); + if (my_tile.second < tiling.rows - 1) + neighbors[bottom] = tiling(my_tile.first, my_tile.second + 1); + + // Sort vertices along the edges into buckets + BGL_FORALL_VERTICES_T(v, g, Graph) { + if (position[v][0] <= cutoffs[left]) my_vertices[left].push_back(v); + if (position[v][1] <= cutoffs[top]) my_vertices[top].push_back(v); + if (position[v][0] >= cutoffs[right]) my_vertices[right].push_back(v); + if (position[v][1] >= cutoffs[bottom]) my_vertices[bottom].push_back(v); + } + + // Send vertices to neighbors, and gather our neighbors' vertices + bucket_position pos; + for (pos = left; pos < end_position; pos = bucket_position(pos + 1)) { + if (neighbors[pos] != -1) { + send(pg, neighbors[pos], 0, my_vertices[pos].size()); + if (!my_vertices[pos].empty()) + send(pg, neighbors[pos], 1, + &my_vertices[pos].front(), my_vertices[pos].size()); + } + } + + // Pass messages around + synchronize(pg); + + // Receive neighboring vertices + for (pos = left; pos < end_position; pos = bucket_position(pos + 1)) { + if (neighbors[pos] != -1) { + std::size_t incoming_vertices; + receive(pg, neighbors[pos], 0, incoming_vertices); + + if (incoming_vertices) { + neighbor_vertices[pos].resize(incoming_vertices); + receive(pg, neighbors[pos], 1, &neighbor_vertices[pos].front(), + incoming_vertices); + } + } + } + + // For each neighboring vertex, we need to get its current position + for (pos = left; pos < end_position; pos = bucket_position(pos + 1)) + for (typename std::vector::iterator i = + neighbor_vertices[pos].begin(); + i != neighbor_vertices[pos].end(); + ++i) + request(position, *i); + synchronize(position); + + // Apply forces in adjacent bins. This is O(n^2) in the worst + // case. Oh well. + for (pos = left; pos < end_position; pos = bucket_position(pos + 1)) { + for (typename std::vector::iterator i = + my_vertices[pos].begin(); + i != my_vertices[pos].end(); + ++i) + for (typename std::vector::iterator j = + neighbor_vertices[pos].begin(); + j != neighbor_vertices[pos].end(); + ++j) + apply_force(*i, *j); + } + } + + protected: + PositionMap position; + Point origin; + Point extent; + simple_tiling tiling; +}; + +template +inline neighboring_tiles_force_pairs +make_neighboring_tiles_force_pairs + (PositionMap position, + typename property_traits::value_type origin, + typename property_traits::value_type extent, + simple_tiling tiling) +{ + return neighboring_tiles_force_pairs(position, origin, extent, + tiling); +} + +template +class distributed_cooling_proxy +{ + public: + typedef typename Cooling::result_type result_type; + + distributed_cooling_proxy(const DisplacementMap& displacement, + const Cooling& cooling) + : displacement(displacement), cooling(cooling) + { + } + + result_type operator()() + { + // Accumulate displacements computed on each processor + synchronize(displacement.data->process_group); + + // Allow the underlying cooling to occur + return cooling(); + } + + protected: + DisplacementMap displacement; + Cooling cooling; +}; + +template +inline distributed_cooling_proxy +make_distributed_cooling(const DisplacementMap& displacement, + const Cooling& cooling) +{ + typedef distributed_cooling_proxy result_type; + return result_type(displacement, cooling); +} + +template +struct point_accumulating_reducer { + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + template + Point operator()(const K&) const { return Point(); } + + template + Point operator()(const K&, const Point& p1, const Point& p2) const + { return Point(p1[0] + p2[0], p1[1] + p2[1]); } +}; + +template +void +fruchterman_reingold_force_directed_layout + (const Graph& g, + PositionMap position, + typename property_traits::value_type const& origin, + typename property_traits::value_type const& extent, + AttractiveForce attractive_force, + RepulsiveForce repulsive_force, + ForcePairs force_pairs, + Cooling cool, + DisplacementMap displacement) +{ + typedef typename property_traits::value_type Point; + + // Reduction in the displacement map involves summing the forces + displacement.set_reduce(point_accumulating_reducer()); + + // We need to track the positions of all of our neighbors + BGL_FORALL_VERTICES_T(u, g, Graph) + BGL_FORALL_ADJ_T(u, v, g, Graph) + request(position, v); + + // Invoke the "sequential" Fruchterman-Reingold implementation + boost::fruchterman_reingold_force_directed_layout + (g, position, origin, extent, + attractive_force, repulsive_force, + make_distributed_force_pairs(position, displacement, force_pairs), + make_distributed_cooling(displacement, cool), + displacement); +} + +template +void +fruchterman_reingold_force_directed_layout + (const Graph& g, + PositionMap position, + typename property_traits::value_type const& origin, + typename property_traits::value_type const& extent, + AttractiveForce attractive_force, + RepulsiveForce repulsive_force, + ForcePairs force_pairs, + Cooling cool, + DisplacementMap displacement, + simple_tiling tiling) +{ + typedef typename property_traits::value_type Point; + + // Reduction in the displacement map involves summing the forces + displacement.set_reduce(point_accumulating_reducer()); + + // We need to track the positions of all of our neighbors + BGL_FORALL_VERTICES_T(u, g, Graph) + BGL_FORALL_ADJ_T(u, v, g, Graph) + request(position, v); + + // Invoke the "sequential" Fruchterman-Reingold implementation + boost::fruchterman_reingold_force_directed_layout + (g, position, origin, extent, + attractive_force, repulsive_force, + make_distributed_force_pairs + (position, displacement, force_pairs, + make_neighboring_tiles_force_pairs(position, origin, extent, tiling)), + make_distributed_cooling(displacement, cool), + displacement); +} + +} } } // end namespace boost::graph::distributed + +#endif // BOOST_GRAPH_DISTRIBUTED_FRUCHTERMAN_REINGOLD_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/graphviz.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/graphviz.hpp new file mode 100644 index 0000000000..5fb9580ca8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/graphviz.hpp @@ -0,0 +1,294 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PARALLEL_GRAPHVIZ_HPP +#define BOOST_GRAPH_PARALLEL_GRAPHVIZ_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +template +struct graph_id_writer +{ + explicit graph_id_writer(const Graph& g) : g(g) { } + + void operator()(std::ostream& out) + { + out << " label=\"p" << process_id(g.process_group()) << "\";\n"; + } + + private: + const Graph& g; +}; + +template +struct paint_by_number_writer +{ + explicit paint_by_number_writer(NumberMap number) : number(number) { } + + template + void operator()(std::ostream& out, Descriptor k) + { + static const char* color_names[] = { + "blue", + "brown", + "cyan", + "darkgreen", + "darkorchid", + "darksalmon", + "darkviolet", + "deeppink", + "gold3", + "green", + "magenta", + "navy", + "red", + "yellow", + "palegreen", + "gray65", + "gray21", + "bisque2", + "greenyellow", + "indianred4", + "lightblue2", + "mediumspringgreen", + "orangered", + "orange" + }; + const int colors = sizeof(color_names) / sizeof(color_names[0]); + if (get(number, k) < colors) { + out << " [ style=\"filled\", fillcolor=\"" << color_names[get(number, k)] + << "\" ]"; + } else { + out << " [ label=\"(" << get(number, k) << ")\" ]"; + } + } + + private: + NumberMap number; +}; + +template +inline paint_by_number_writer +paint_by_number(NumberMap number) +{ return paint_by_number_writer(number); } + +template +void +write_graphviz(std::ostream& out, + const Graph& g, + VertexPropertiesWriter vpw, + EdgePropertiesWriter epw, + GraphPropertiesWriter gpw + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + typedef typename property_map::const_type + VertexIndexMap; + typedef typename property_map::const_type + VertexGlobalMap; + + static const bool is_undirected + = (is_base_and_derived::value + || is_same::value); + static const char* graph_kind = is_undirected? "graph" : "digraph"; + static const char* edge_kind = is_undirected? "--" : "->"; + + using boost::graph::parallel::process_group; + process_group_type pg = process_group(g); + + parallel::global_index_map + global_index(pg, num_vertices(g), get(vertex_index, g), + get(vertex_global, g)); + + std::ostringstream local_graph_out; + + local_graph_out << " subgraph cluster_" << process_id(pg) << " {\n"; + gpw(local_graph_out); + + typename graph_traits::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) { + + int global_idx = get(global_index, *vi); + local_graph_out << " n" << global_idx; + vpw(local_graph_out, *vi); + local_graph_out << ";\n"; + } + local_graph_out << " }\n\n"; + + + typename graph_traits::edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { + int source_idx = get(global_index, source(*ei, g)); + int target_idx = get(global_index, target(*ei, g)); + local_graph_out << " n" << source_idx << " " << edge_kind << " n" + << target_idx; + epw(local_graph_out, *ei); + local_graph_out << ";\n"; + } + + if (process_id(pg) == 0) { + out << graph_kind << " g {\n"; + out << local_graph_out.str(); + + synchronize(pg); + for (int i = 1; i < num_processes(pg); ++i) { + int len; + receive(pg, i, 0, len); + char* data = new char [len+1]; + data[len] = 0; + receive(pg, i, 1, data, len); + out << std::endl << data; + delete [] data; + } + out << "}\n"; + } else { + std::string result_str = local_graph_out.str(); + const char* data = result_str.c_str(); + + int len = result_str.length(); + send(pg, 0, 0, len); + send(pg, 0, 1, data, len); + synchronize(pg); + } + synchronize(pg); + synchronize(pg); + synchronize(pg); +} + +template +inline void +write_graphviz(std::ostream& out, + const Graph& g, + VertexPropertiesWriter vpw, + EdgePropertiesWriter epw + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + write_graphviz(out, g, vpw, epw, graph_id_writer(g)); +} + +template +inline void +write_graphviz(std::ostream& out, + const Graph& g, + VertexPropertiesWriter vpw + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + write_graphviz(out, g, vpw, default_writer()); +} + +template +inline void +write_graphviz(std::ostream& out, const Graph& g + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + write_graphviz(out, g, default_writer()); +} + +template +void +write_graphviz(const std::string& filename, + const Graph& g, + VertexPropertiesWriter vpw, + EdgePropertiesWriter epw, + GraphPropertiesWriter gpw + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + if (process_id(g.process_group()) == 0) { + std::ofstream out(filename.c_str()); + write_graphviz(out, g, vpw, epw, gpw); + } else { + write_graphviz(std::cout, g, vpw, epw, gpw); + } +} + +template +void +write_graphviz(const std::string& filename, + const Graph& g, + VertexPropertiesWriter vpw, + EdgePropertiesWriter epw + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + if (process_id(g.process_group()) == 0) { + std::ofstream out(filename.c_str()); + write_graphviz(out, g, vpw, epw); + } else { + write_graphviz(std::cout, g, vpw, epw); + } +} + +template +void +write_graphviz(const std::string& filename, + const Graph& g, + VertexPropertiesWriter vpw + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + if (process_id(g.process_group()) == 0) { + std::ofstream out(filename.c_str()); + write_graphviz(out, g, vpw); + } else { + write_graphviz(std::cout, g, vpw); + } +} + +template +void +write_graphviz(const std::string& filename, const Graph& g + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + if (process_id(g.process_group()) == 0) { + std::ofstream out(filename.c_str()); + write_graphviz(out, g); + } else { + write_graphviz(std::cout, g); + } +} + +template +void +write_graphviz(std::ostream& out, const Graph& g, + const dynamic_properties& dp, + const std::string& node_id = "node_id" + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,distributed_graph_tag)) +{ + write_graphviz + (out, g, + /*vertex_writer=*/dynamic_vertex_properties_writer(dp, node_id), + /*edge_writer=*/dynamic_properties_writer(dp)); +} + +} // end namespace boost + +#endif // BOOST_GRAPH_PARALLEL_GRAPHVIZ_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/hohberg_biconnected_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/hohberg_biconnected_components.hpp new file mode 100644 index 0000000000..249e8b0252 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/hohberg_biconnected_components.hpp @@ -0,0 +1,1129 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +// An implementation of Walter Hohberg's distributed biconnected +// components algorithm, from: +// +// Walter Hohberg. How to Find Biconnected Components in Distributed +// Networks. J. Parallel Distrib. Comput., 9(4):374-386, 1990. +// +#ifndef BOOST_GRAPH_DISTRIBUTED_HOHBERG_BICONNECTED_COMPONENTS_HPP +#define BOOST_GRAPH_DISTRIBUTED_HOHBERG_BICONNECTED_COMPONENTS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +/* You can define PBGL_HOHBERG_DEBUG to an integer value (1, 2, or 3) + * to enable debugging information. 1 includes only the phases of the + * algorithm and messages as their are received. 2 and 3 add + * additional levels of detail about internal data structures related + * to the algorithm itself. + * + * #define PBGL_HOHBERG_DEBUG 1 +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for std::pair +#include +#include // for std::find, std::mismatch +#include +#include +#include + +namespace boost { namespace graph { namespace distributed { + +namespace hohberg_detail { + enum message_kind { + /* A header for the PATH message, stating which edge the message + is coming on and how many vertices will be following. The data + structure communicated will be a path_header. */ + msg_path_header, + /* A message containing the vertices that make up a path. It will + always follow a msg_path_header and will contain vertex + descriptors, only. */ + msg_path_vertices, + /* A header for the TREE message, stating the value of gamma and + the number of vertices to come in the following + msg_tree_vertices. */ + msg_tree_header, + /* A message containing the vertices that make up the set of + vertices in the same bicomponent as the sender. It will always + follow a msg_tree_header and will contain vertex descriptors, + only. */ + msg_tree_vertices, + /* Provides a name for the biconnected component of the edge. */ + msg_name + }; + + // Payload for a msg_path_header message. + template + struct path_header + { + // The edge over which the path is being communicated + EdgeDescriptor edge; + + // The length of the path, i.e., the number of vertex descriptors + // that will be coming in the next msg_path_vertices message. + std::size_t path_length; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & edge & path_length; + } + }; + + // Payload for a msg_tree_header message. + template + struct tree_header + { + // The edge over which the tree is being communicated + Edge edge; + + // Gamma, which is the eta of the sender. + Vertex gamma; + + // The length of the list of vertices in the bicomponent, i.e., + // the number of vertex descriptors that will be coming in the + // next msg_tree_vertices message. + std::size_t bicomp_length; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & edge & gamma & bicomp_length; + } + }; + + // Payload for the msg_name message. + template + struct name_header + { + // The edge being communicated and named. + EdgeDescriptor edge; + + // The 0-based name of the component + std::size_t name; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & edge & name; + } + }; + + /* Computes the branch point between two paths. The branch point is + the last position at which both paths are equivalent, beyond + which the paths diverge. Both paths must have length > 0 and the + initial elements of the paths must be equal. This is guaranteed + in Hohberg's algorithm because all paths start at the + leader. Returns the value at the branch point. */ + template + T branch_point(const std::vector& p1, const std::vector& p2) + { + assert(!p1.empty()); + assert(!p2.empty()); + assert(p1.front() == p2.front()); + + typedef typename std::vector::const_iterator iterator; + + iterator mismatch_pos; + if (p1.size() <= p2.size()) + mismatch_pos = std::mismatch(p1.begin(), p1.end(), p2.begin()).first; + else + mismatch_pos = std::mismatch(p2.begin(), p2.end(), p1.begin()).first; + --mismatch_pos; + return *mismatch_pos; + } + + /* Computes the infimum of vertices a and b in the given path. The + infimum is the largest element that is on the paths from a to the + root and from b to the root. */ + template + T infimum(const std::vector& parent_path, T a, T b) + { + using std::swap; + + typedef typename std::vector::const_iterator iterator; + iterator first = parent_path.begin(), last = parent_path.end(); + +#if defined(PBGL_HOHBERG_DEBUG) and PBGL_HOHBERG_DEBUG > 2 + std::cerr << "infimum("; + for (iterator i = first; i != last; ++i) { + if (i != first) std::cerr << ' '; + std::cerr << local(*i) << '@' << owner(*i); + } + std::cerr << ", " << local(a) << '@' << owner(a) << ", " + << local(b) << '@' << owner(b) << ") = "; +#endif + + if (a == b) { +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 2 + std::cerr << local(a) << '@' << owner(a) << std::endl; +#endif + return a; + } + + // Try to find a or b, whichever is closest to the end + --last; + while (*last != a) { + // If we match b, swap the two so we'll be looking for b later. + if (*last == b) { swap(a,b); break; } + + if (last == first) { +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 2 + std::cerr << local(*first) << '@' << owner(*first) << std::endl; +#endif + return *first; + } + else --last; + } + + // Try to find b (which may originally have been a) + while (*last != b) { + if (last == first) { +#if defined(PBGL_HOHBERG_DEBUG) and PBGL_HOHBERG_DEBUG > 2 + std::cerr << local(*first) << '@' << owner(*first) << std::endl; +#endif + return *first; + } + else --last; + } + +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 2 + std::cerr << local(*last) << '@' << owner(*last) << std::endl; +#endif + // We've found b; it's the infimum. + return *last; + } +} // end namespace hohberg_detail + +/* A message that will be stored for each edge by Hohberg's algorithm. */ +template +struct hohberg_message +{ + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + + // Assign from a path message + void assign(const std::vector& path) + { + gamma = graph_traits::null_vertex(); + path_or_bicomp = path; + } + + // Assign from a tree message + void assign(Vertex gamma, const std::vector& in_same_bicomponent) + { + this->gamma = gamma; + path_or_bicomp = in_same_bicomponent; + } + + bool is_path() const { return gamma == graph_traits::null_vertex(); } + bool is_tree() const { return gamma != graph_traits::null_vertex(); } + + /// The "gamma" of a tree message, or null_vertex() for a path message + Vertex gamma; + + // Either the path for a path message or the in_same_bicomponent + std::vector path_or_bicomp; +}; + + +/* An abstraction of a vertex processor in Hohberg's algorithm. The + hohberg_vertex_processor class is responsible for processing + messages transmitted to it via its edges. */ +template +class hohberg_vertex_processor +{ + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + typedef typename boost::graph::parallel::process_group_type::type + ProcessGroup; + typedef std::vector path_t; + typedef typename path_t::iterator path_iterator; + + public: + hohberg_vertex_processor() + : phase(1), + parent(graph_traits::null_vertex()), + eta(graph_traits::null_vertex()) + { + } + + // Called to initialize a leader in the algorithm, which involves + // sending out the initial path messages and being ready to receive + // them. + void initialize_leader(Vertex alpha, const Graph& g); + + /// Handle a path message on edge e. The path will be destroyed by + /// this operation. + void + operator()(Edge e, path_t& path, const Graph& g); + + /// Handle a tree message on edge e. in_same_bicomponent will be + /// destroyed by this operation. + void + operator()(Edge e, Vertex gamma, path_t& in_same_bicomponent, + const Graph& g); + + // Handle a name message. + void operator()(Edge e, edges_size_type name, const Graph& g); + + // Retrieve the phase + unsigned char get_phase() const { return phase; } + + // Start the naming phase. The current phase must be 3 (echo), and + // the offset contains the offset at which this processor should + // begin when labelling its bicomponents. The offset is just a + // parallel prefix sum of the number of bicomponents in each + // processor that precedes it (globally). + void + start_naming_phase(Vertex alpha, const Graph& g, edges_size_type offset); + + /* Determine the number of bicomponents that we will be naming + * ourselves. + */ + edges_size_type num_starting_bicomponents(Vertex alpha, const Graph& g); + + // Fill in the edge component map with biconnected component + // numbers. + template + void fill_edge_map(Vertex alpha, const Graph& g, ComponentMap& component); + + protected: + /* Start the echo phase (phase 3) where we propagate information up + the tree. */ + void echo_phase(Vertex alpha, const Graph& g); + + /* Retrieve the index of edge in the out-edges list of target(e, g). */ + std::size_t get_edge_index(Edge e, const Graph& g); + + /* Retrieve the index of the edge incidence on v in the out-edges + list of vertex u. */ + std::size_t get_incident_edge_index(Vertex u, Vertex v, const Graph& g); + + /* Keeps track of which phase of the algorithm we are in. There are + * four phases plus the "finished" phase: + * + * 1) Building the spanning tree + * 2) Discovering cycles + * 3) Echoing back up the spanning tree + * 4) Labelling biconnected components + * 5) Finished + */ + unsigned char phase; + + /* The parent of this vertex in the spanning tree. This value will + be graph_traits::null_vertex() for the leader. */ + Vertex parent; + + /* The farthest ancestor up the tree that resides in the same + biconnected component as we do. This information is approximate: + we might not know about the actual farthest ancestor, but this is + the farthest one we've seen so far. */ + Vertex eta; + + /* The number of edges that have not yet transmitted any messages to + us. This starts at the degree of the vertex and decreases as we + receive messages. When this counter hits zero, we're done with + the second phase of the algorithm. In Hohberg's paper, the actual + remaining edge set E is stored with termination when all edges + have been removed from E, but we only need to detect termination + so the set E need not be explicitly represented. */ + degree_size_type num_edges_not_transmitted; + + /* The path from the root of the spanning tree to this vertex. This + vector will always store only the parts of the path leading up to + this vertex, and not the vertex itself. Thus, it will be empty + for the leader. */ + std::vector path_from_root; + + /* Structure containing all of the extra data we need to keep around + PER EDGE. This information can not be contained within a property + map, because it can't be shared among vertices without breaking + the algorithm. Decreasing the size of this structure will drastically */ + struct per_edge_data + { + hohberg_message msg; + std::vector M; + bool is_tree_edge; + degree_size_type partition; + }; + + /* Data for each edge in the graph. This structure will be indexed + by the position of the edge in the out_edges() list. */ + std::vector edge_data; + + /* The mapping from local partition numbers (0..n-1) to global + partition numbers. */ + std::vector local_to_global_partitions; + + friend class boost::serialization::access; + + // We cannot actually serialize a vertex processor, nor would we + // want to. However, the fact that we're putting instances into a + // distributed_property_map means that we need to have a serialize() + // function available. + template + void serialize(Archiver&, const unsigned int /*version*/) + { + assert(false); + } +}; + +template +void +hohberg_vertex_processor::initialize_leader(Vertex alpha, + const Graph& g) +{ + using namespace hohberg_detail; + + ProcessGroup pg = process_group(g); + + typename property_map::const_type + owner = get(vertex_owner, g); + + path_header header; + header.path_length = 1; + BGL_FORALL_OUTEDGES_T(alpha, e, g, Graph) { + header.edge = e; + send(pg, get(owner, target(e, g)), msg_path_header, header); + send(pg, get(owner, target(e, g)), msg_path_vertices, alpha); + } + + num_edges_not_transmitted = degree(alpha, g); + edge_data.resize(num_edges_not_transmitted); + phase = 2; +} + +template +void +hohberg_vertex_processor::operator()(Edge e, path_t& path, + const Graph& g) +{ + using namespace hohberg_detail; + + typename property_map::const_type + owner = get(vertex_owner, g); + +#ifdef PBGL_HOHBERG_DEBUG +// std::cerr << local(source(e, g)) << '@' << owner(source(e, g)) << " -> " +// << local(target(e, g)) << '@' << owner(target(e, g)) << ": path("; +// for (std::size_t i = 0; i < path.size(); ++i) { +// if (i > 0) std::cerr << ' '; +// std::cerr << local(path[i]) << '@' << owner(path[i]); +// } + std::cerr << "), phase = " << (int)phase << std::endl; +#endif + + // Get access to edge-specific data + if (edge_data.empty()) + edge_data.resize(degree(target(e, g), g)); + per_edge_data& edata = edge_data[get_edge_index(e, g)]; + + // Record the message. We'll need it in phase 3. + edata.msg.assign(path); + + // Note: "alpha" refers to the vertex "processor" receiving the + // message. + Vertex alpha = target(e, g); + + switch (phase) { + case 1: + { + num_edges_not_transmitted = degree(alpha, g) - 1; + edata.is_tree_edge = true; + parent = path.back(); + eta = parent; + edata.M.clear(); edata.M.push_back(parent); + + // Broadcast the path from the root to our potential children in + // the spanning tree. + path.push_back(alpha); + path_header header; + header.path_length = path.size(); + ProcessGroup pg = process_group(g); + BGL_FORALL_OUTEDGES_T(alpha, oe, g, Graph) { + // Skip the tree edge we just received + if (target(oe, g) != source(e, g)) { + header.edge = oe; + send(pg, get(owner, target(oe, g)), msg_path_header, header); + send(pg, get(owner, target(oe, g)), msg_path_vertices, &path[0], + header.path_length); + } + } + path.pop_back(); + + // Swap the old path in, to save some extra copying. Nobody + path_from_root.swap(path); + + // Once we have received our place in the spanning tree, move on + // to phase 2. + phase = 2; + + // If we only had only edge, skip to phase 3. + if (num_edges_not_transmitted == 0) + echo_phase(alpha, g); + return; + } + + case 2: + { + --num_edges_not_transmitted; + edata.is_tree_edge = false; + + // Determine if alpha (our vertex) is in the path + path_iterator pos = std::find(path.begin(), path.end(), alpha); + if (pos != path.end()) { + // Case A: There is a cycle alpha beta ... gamma alpha + // M(e) <- {beta, gammar} + edata.M.clear(); + ++pos; + // If pos == path.end(), we have a self-loop + if (pos != path.end()) { + // Add beta + edata.M.push_back(*pos); + ++pos; + } + // If pos == path.end(), we have a self-loop or beta == gamma + // (parallel edge). Otherwise, add gamma. + if (pos != path.end()) edata.M.push_back(path.back()); + } else { + // Case B: There is a cycle but we haven't seen alpha yet. + // M(e) = {parent, path.back()} + edata.M.clear(); + edata.M.push_back(path.back()); + if (parent != path.back()) edata.M.push_back(parent); + + // eta = inf(eta, bra(pi_t, pi)) + eta = infimum(path_from_root, eta, branch_point(path_from_root, path)); + } + if (num_edges_not_transmitted == 0) + echo_phase(alpha, g); + break; + } + + default: +// std::cerr << "Phase is " << int(phase) << "\n"; + assert(false); + } +} + +template +void +hohberg_vertex_processor::operator()(Edge e, Vertex gamma, + path_t& in_same_bicomponent, + const Graph& g) +{ + using namespace hohberg_detail; + +#ifdef PBGL_HOHBERG_DEBUG + std::cerr << local(source(e, g)) << '@' << owner(source(e, g)) << " -> " + << local(target(e, g)) << '@' << owner(target(e, g)) << ": tree(" + << local(gamma) << '@' << owner(gamma) << ", "; + for (std::size_t i = 0; i < in_same_bicomponent.size(); ++i) { + if (i > 0) std::cerr << ' '; + std::cerr << local(in_same_bicomponent[i]) << '@' + << owner(in_same_bicomponent[i]); + } + std::cerr << ", " << local(source(e, g)) << '@' << owner(source(e, g)) + << "), phase = " << (int)phase << std::endl; +#endif + + // Get access to edge-specific data + per_edge_data& edata = edge_data[get_edge_index(e, g)]; + + // Record the message. We'll need it in phase 3. + edata.msg.assign(gamma, in_same_bicomponent); + + // Note: "alpha" refers to the vertex "processor" receiving the + // message. + Vertex alpha = target(e, g); + Vertex beta = source(e, g); + + switch (phase) { + case 2: + --num_edges_not_transmitted; + edata.is_tree_edge = true; + + if (gamma == alpha) { + // Case C + edata.M.swap(in_same_bicomponent); + } else { + // Case D + edata.M.clear(); + edata.M.push_back(parent); + if (beta != parent) edata.M.push_back(beta); + eta = infimum(path_from_root, eta, gamma); + } + if (num_edges_not_transmitted == 0) + echo_phase(alpha, g); + break; + + default: + assert(false); + } +} + +template +void +hohberg_vertex_processor::operator()(Edge e, edges_size_type name, + const Graph& g) +{ + using namespace hohberg_detail; + +#ifdef PBGL_HOHBERG_DEBUG + std::cerr << local(source(e, g)) << '@' << owner(source(e, g)) << " -> " + << local(target(e, g)) << '@' << owner(target(e, g)) << ": name(" + << name << "), phase = " << (int)phase << std::endl; +#endif + + assert(phase == 4); + + typename property_map::const_type + owner = get(vertex_owner, g); + + // Send name messages along the spanning tree edges that are in the + // same bicomponent as the edge to our parent. + ProcessGroup pg = process_group(g); + + Vertex alpha = target(e, g); + + std::size_t idx = 0; + BGL_FORALL_OUTEDGES_T(alpha, e, g, Graph) { + per_edge_data& edata = edge_data[idx++]; + if (edata.is_tree_edge + && find(edata.M.begin(), edata.M.end(), parent) != edata.M.end() + && target(e, g) != parent) { + // Notify our children in the spanning tree of this name + name_header header; + header.edge = e; + header.name = name; + send(pg, get(owner, target(e, g)), msg_name, header); + } else if (target(e, g) == parent) { + // Map from local partition numbers to global bicomponent numbers + local_to_global_partitions[edata.partition] = name; + } + } + + // Final stage + phase = 5; +} + +template +typename hohberg_vertex_processor::edges_size_type +hohberg_vertex_processor:: +num_starting_bicomponents(Vertex alpha, const Graph& g) +{ + edges_size_type not_mapped = (std::numeric_limits::max)(); + + edges_size_type result = 0; + std::size_t idx = 0; + BGL_FORALL_OUTEDGES_T(alpha, e, g, Graph) { + per_edge_data& edata = edge_data[idx++]; + if (edata.is_tree_edge + && find(edata.M.begin(), edata.M.end(), parent) == edata.M.end()) { + // Map from local partition numbers to global bicomponent numbers + if (local_to_global_partitions[edata.partition] == not_mapped) + local_to_global_partitions[edata.partition] = result++; + } + } + +#ifdef PBGL_HOHBERG_DEBUG + std::cerr << local(alpha) << '@' << owner(alpha) << " has " << result + << " bicomponents originating at it." << std::endl; +#endif + + return result; +} + +template +template +void +hohberg_vertex_processor:: +fill_edge_map(Vertex alpha, const Graph& g, ComponentMap& component) +{ + std::size_t idx = 0; + BGL_FORALL_OUTEDGES_T(alpha, e, g, Graph) { + per_edge_data& edata = edge_data[idx++]; + local_put(component, e, local_to_global_partitions[edata.partition]); + +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 2 + std::cerr << "component(" + << local(source(e, g)) << '@' << owner(source(e, g)) << " -> " + << local(target(e, g)) << '@' << owner(target(e, g)) << ") = " + << local_to_global_partitions[edata.partition] + << " (partition = " << edata.partition << " of " + << local_to_global_partitions.size() << ")" << std::endl; +#endif + } +} + +template +void +hohberg_vertex_processor:: +start_naming_phase(Vertex alpha, const Graph& g, edges_size_type offset) +{ + using namespace hohberg_detail; + + assert(phase == 4); + + typename property_map::const_type + owner = get(vertex_owner, g); + + // Send name messages along the spanning tree edges of the + // components that we get to number. + ProcessGroup pg = process_group(g); + + bool has_more_children_to_name = false; + + // Map from local partition numbers to global bicomponent numbers + edges_size_type not_mapped = (std::numeric_limits::max)(); + for (std::size_t i = 0; i < local_to_global_partitions.size(); ++i) { + if (local_to_global_partitions[i] != not_mapped) + local_to_global_partitions[i] += offset; + } + + std::size_t idx = 0; + BGL_FORALL_OUTEDGES_T(alpha, e, g, Graph) { + per_edge_data& edata = edge_data[idx++]; + if (edata.is_tree_edge + && find(edata.M.begin(), edata.M.end(), parent) == edata.M.end()) { + // Notify our children in the spanning tree of this new name + name_header header; + header.edge = e; + header.name = local_to_global_partitions[edata.partition]; + send(pg, get(owner, target(e, g)), msg_name, header); + } else if (edata.is_tree_edge) { + has_more_children_to_name = true; + } +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 2 + std::cerr << "M[" << local(source(e, g)) << '@' << owner(source(e, g)) + << " -> " << local(target(e, g)) << '@' << owner(target(e, g)) + << "] = "; + for (std::size_t i = 0; i < edata.M.size(); ++i) { + std::cerr << local(edata.M[i]) << '@' << owner(edata.M[i]) << ' '; + } + std::cerr << std::endl; +#endif + } + + // See if we're done. + if (!has_more_children_to_name) + // Final stage + phase = 5; +} + +template +void +hohberg_vertex_processor::echo_phase(Vertex alpha, const Graph& g) +{ + using namespace hohberg_detail; + + typename property_map::const_type + owner = get(vertex_owner, g); + + /* We're entering the echo phase. */ + phase = 3; + + if (parent != graph_traits::null_vertex()) { + Edge edge_to_parent; + +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 1 + std::cerr << local(alpha) << '@' << owner(alpha) << " echo: parent = " + << local(parent) << '@' << owner(parent) << ", eta = " + << local(eta) << '@' << owner(eta) << ", Gamma = "; +#endif + + std::vector bicomp; + std::size_t e_index = 0; + BGL_FORALL_OUTEDGES_T(alpha, e, g, Graph) { + if (target(e, g) == parent && parent == eta) { + edge_to_parent = e; + if (find(bicomp.begin(), bicomp.end(), alpha) == bicomp.end()) { +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 1 + std::cerr << local(alpha) << '@' << owner(alpha) << ' '; +#endif + bicomp.push_back(alpha); + } + } else { + if (target(e, g) == parent) edge_to_parent = e; + + per_edge_data& edata = edge_data[e_index]; + + if (edata.msg.is_path()) { + path_iterator pos = std::find(edata.msg.path_or_bicomp.begin(), + edata.msg.path_or_bicomp.end(), + eta); + if (pos != edata.msg.path_or_bicomp.end()) { + ++pos; + if (pos != edata.msg.path_or_bicomp.end() + && find(bicomp.begin(), bicomp.end(), *pos) == bicomp.end()) { +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 1 + std::cerr << local(*pos) << '@' << owner(*pos) << ' '; +#endif + bicomp.push_back(*pos); + } + } + } else if (edata.msg.is_tree() && edata.msg.gamma == eta) { + for (path_iterator i = edata.msg.path_or_bicomp.begin(); + i != edata.msg.path_or_bicomp.end(); ++i) { + if (find(bicomp.begin(), bicomp.end(), *i) == bicomp.end()) { +#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 1 + std::cerr << local(*i) << '@' << owner(*i) << ' '; +#endif + bicomp.push_back(*i); + } + } + } + } + ++e_index; + } +#ifdef PBGL_HOHBERG_DEBUG + std::cerr << std::endl; +#endif + + // Send tree(eta, bicomp) to parent + tree_header header; + header.edge = edge_to_parent; + header.gamma = eta; + header.bicomp_length = bicomp.size(); + ProcessGroup pg = process_group(g); + send(pg, get(owner, parent), msg_tree_header, header); + send(pg, get(owner, parent), msg_tree_vertices, &bicomp[0], + header.bicomp_length); + } + + // Compute the partition of edges such that iff two edges e1 and e2 + // are in different subsets then M(e1) is disjoint from M(e2). + + // Start by putting each edge in a different partition + std::vector parent_vec(edge_data.size()); + degree_size_type idx = 0; + for (idx = 0; idx < edge_data.size(); ++idx) + parent_vec[idx] = idx; + + // Go through each edge e, performing a union() on the edges + // incident on all vertices in M[e]. + idx = 0; + BGL_FORALL_OUTEDGES_T(alpha, e, g, Graph) { + per_edge_data& edata = edge_data[idx++]; + + // Compute union of vertices in M + if (!edata.M.empty()) { + degree_size_type e1 = get_incident_edge_index(alpha, edata.M.front(), g); + while (parent_vec[e1] != e1) e1 = parent_vec[e1]; + + for (std::size_t i = 1; i < edata.M.size(); ++i) { + degree_size_type e2 = get_incident_edge_index(alpha, edata.M[i], g); + while (parent_vec[e2] != e2) e2 = parent_vec[e2]; + parent_vec[e2] = e1; + } + } + } + + edges_size_type not_mapped = (std::numeric_limits::max)(); + + // Determine the number of partitions + for (idx = 0; idx < parent_vec.size(); ++idx) { + if (parent_vec[idx] == idx) { + edge_data[idx].partition = local_to_global_partitions.size(); + local_to_global_partitions.push_back(not_mapped); + } + } + + // Assign partition numbers to each edge + for (idx = 0; idx < parent_vec.size(); ++idx) { + degree_size_type rep = parent_vec[idx]; + while (rep != parent_vec[rep]) rep = parent_vec[rep]; + edge_data[idx].partition = edge_data[rep].partition; + } + + // Enter the naming phase (but don't send anything yet). + phase = 4; +} + +template +std::size_t +hohberg_vertex_processor::get_edge_index(Edge e, const Graph& g) +{ + std::size_t result = 0; + BGL_FORALL_OUTEDGES_T(target(e, g), oe, g, Graph) { + if (source(e, g) == target(oe, g)) return result; + ++result; + } + assert(false); +} + +template +std::size_t +hohberg_vertex_processor::get_incident_edge_index(Vertex u, Vertex v, + const Graph& g) +{ + std::size_t result = 0; + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) { + if (target(e, g) == v) return result; + ++result; + } + assert(false); +} + +template +typename graph_traits::edges_size_type +hohberg_biconnected_components + (const Graph& g, + ComponentMap component, + InputIterator first, InputIterator last, + VertexProcessorMap vertex_processor) +{ + using namespace boost::graph::parallel; + using namespace hohberg_detail; + using boost::parallel::all_reduce; + + typename property_map::const_type + owner = get(vertex_owner, g); + + // The graph must be undirected + BOOST_STATIC_ASSERT( + (is_convertible::directed_category, + undirected_tag>::value)); + + // The graph must model Incidence Graph + function_requires< IncidenceGraphConcept >(); + + typedef typename graph_traits::edges_size_type edges_size_type; + typedef typename graph_traits::degree_size_type degree_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + // Retrieve the process group we will use for communication + typedef typename process_group_type::type process_group_type; + process_group_type pg = process_group(g); + + // Keeps track of the edges that we know to be tree edges. + std::vector tree_edges; + + // The leaders send out a path message to initiate the algorithm + while (first != last) { + vertex_descriptor leader = *first; + if (process_id(pg) == get(owner, leader)) + vertex_processor[leader].initialize_leader(leader, g); + ++first; + } + synchronize(pg); + + // Will hold the number of bicomponents in the graph. + edges_size_type num_bicomponents = 0; + + // Keep track of the path length that we should expect, based on the + // level in the breadth-first search tree. At present, this is only + // used as a sanity check. TBD: This could be used to decrease the + // amount of communication required per-edge (by about 4 bytes). + std::size_t path_length = 1; + + typedef std::vector path_t; + typedef typename path_t::iterator path_iterator; + + unsigned char minimum_phase = 5; + do { + while (optional > msg = probe(pg)) { + switch (msg->second) { + case msg_path_header: + { + // Receive the path header + path_header header; + receive(pg, msg->first, msg->second, header); + assert(path_length == header.path_length); + + // Receive the path itself + path_t path(path_length); + receive(pg, msg->first, msg_path_vertices, &path[0], path_length); + + edge_descriptor e = header.edge; + vertex_processor[target(e, g)](e, path, g); + } + break; + + case msg_path_vertices: + // Should be handled in msg_path_header case, unless we're going + // stateless. + assert(false); + break; + + case msg_tree_header: + { + // Receive the tree header + tree_header header; + receive(pg, msg->first, msg->second, header); + + // Receive the tree itself + path_t in_same_bicomponent(header.bicomp_length); + receive(pg, msg->first, msg_tree_vertices, &in_same_bicomponent[0], + header.bicomp_length); + + edge_descriptor e = header.edge; + vertex_processor[target(e, g)](e, header.gamma, in_same_bicomponent, + g); + } + break; + + case msg_tree_vertices: + // Should be handled in msg_tree_header case, unless we're + // going stateless. + assert(false); + break; + + case msg_name: + { + name_header header; + receive(pg, msg->first, msg->second, header); + edge_descriptor e = header.edge; + vertex_processor[target(e, g)](e, header.name, g); + } + break; + + default: + assert(false); + } + } + ++path_length; + + // Compute minimum phase locally + minimum_phase = 5; + unsigned char maximum_phase = 1; + BGL_FORALL_VERTICES_T(v, g, Graph) { + minimum_phase = (std::min)(minimum_phase, vertex_processor[v].get_phase()); + maximum_phase = (std::max)(maximum_phase, vertex_processor[v].get_phase()); + } + +#ifdef PBGL_HOHBERG_DEBUG + if (process_id(pg) == 0) + std::cerr << "<---------End of stage------------->" << std::endl; +#endif + // Compute minimum phase globally + minimum_phase = all_reduce(pg, minimum_phase, boost::mpi::minimum()); + +#ifdef PBGL_HOHBERG_DEBUG + if (process_id(pg) == 0) + std::cerr << "Minimum phase = " << (int)minimum_phase << std::endl; +#endif + + if (minimum_phase == 4 + && all_reduce(pg, maximum_phase, boost::mpi::maximum()) == 4) { + +#ifdef PBGL_HOHBERG_DEBUG + if (process_id(pg) == 0) + std::cerr << "<---------Naming phase------------->" << std::endl; +#endif + // Compute the biconnected component number offsets for each + // vertex. + std::vector local_offsets; + local_offsets.reserve(num_vertices(g)); + edges_size_type num_local_bicomponents = 0; + BGL_FORALL_VERTICES_T(v, g, Graph) { + local_offsets.push_back(num_local_bicomponents); + num_local_bicomponents += + vertex_processor[v].num_starting_bicomponents(v, g); + } + + synchronize(pg); + + // Find our the number of bicomponent names that will originate + // from each process. This tells us how many bicomponents are in + // the entire graph and what our global offset is for computing + // our own biconnected component names. + std::vector all_bicomponents(num_processes(pg)); + all_gather(pg, &num_local_bicomponents, &num_local_bicomponents + 1, + all_bicomponents); + num_bicomponents = 0; + edges_size_type my_global_offset = 0; + for (std::size_t i = 0; i < all_bicomponents.size(); ++i) { + if (i == (std::size_t)process_id(pg)) + my_global_offset = num_bicomponents; + num_bicomponents += all_bicomponents[i]; + } + + std::size_t index = 0; + BGL_FORALL_VERTICES_T(v, g, Graph) { + edges_size_type offset = my_global_offset + local_offsets[index++]; + vertex_processor[v].start_naming_phase(v, g, offset); + } + } + + synchronize(pg); + } while (minimum_phase < 5); + + // Number the edges appropriately. + BGL_FORALL_VERTICES_T(v, g, Graph) + vertex_processor[v].fill_edge_map(v, g, component); + + return num_bicomponents; +} + +template +typename graph_traits::edges_size_type +hohberg_biconnected_components + (const Graph& g, ComponentMap component, + InputIterator first, InputIterator last) + +{ + std::vector > + vertex_processors(num_vertices(g)); + return hohberg_biconnected_components + (g, component, first, last, + make_iterator_property_map(vertex_processors.begin(), + get(vertex_index, g))); +} + +template +typename graph_traits::edges_size_type +hohberg_biconnected_components(const Graph& g, ComponentMap component, + ParentMap parent) +{ + // We need the connected components of the graph, but we don't care + // about component numbers. + connected_components(g, dummy_property_map(), parent); + + // Each root in the parent map is a leader + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + std::vector leaders; + BGL_FORALL_VERTICES_T(v, g, Graph) + if (get(parent, v) == v) leaders.push_back(v); + + return hohberg_biconnected_components(g, component, + leaders.begin(), leaders.end()); +} + +template +typename graph_traits::edges_size_type +hohberg_biconnected_components(const Graph& g, ComponentMap component) +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + std::vector parents(num_vertices(g)); + return hohberg_biconnected_components + (g, component, make_iterator_property_map(parents.begin(), + get(vertex_index, g))); +} + +} } } // end namespace boost::graph::distributed + +#endif // BOOST_GRAPH_DISTRIBUTED_HOHBERG_BICONNECTED_COMPONENTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/local_subgraph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/local_subgraph.hpp new file mode 100644 index 0000000000..0029623175 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/local_subgraph.hpp @@ -0,0 +1,175 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_LOCAL_SUBGRAPH_HPP +#define BOOST_GRAPH_LOCAL_SUBGRAPH_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include + +namespace boost { + +namespace graph { namespace detail { + // Optionally, virtually derive from a base class + template struct derive_from_if; + template struct derive_from_if : virtual Base {}; + template struct derive_from_if {}; + + template + struct derive_from_if_tag_is : + derive_from_if<(is_base_and_derived::value + || is_same::value), + NewBase> + { + }; +} } // end namespace graph::detail + +template +class is_local_edge +{ +public: + typedef bool result_type; + typedef typename graph_traits::edge_descriptor + argument_type; + + is_local_edge() : g(0) {} + is_local_edge(DistributedGraph& g) : g(&g), owner(get(vertex_owner, g)) {} + + // Since either the source or target vertex must be local, the + // equivalence of their owners indicates a local edge. + result_type operator()(const argument_type& e) const + { return get(owner, source(e, *g)) == get(owner, target(e, *g)); } + +private: + DistributedGraph* g; + typename property_map::const_type owner; +}; + +template +class is_local_vertex +{ +public: + typedef bool result_type; + typedef typename graph_traits::vertex_descriptor + argument_type; + + is_local_vertex() : g(0) {} + is_local_vertex(DistributedGraph& g) : g(&g), owner(get(vertex_owner, g)) { } + + // Since either the source or target vertex must be local, the + // equivalence of their owners indicates a local edge. + result_type operator()(const argument_type& v) const + { + return get(owner, v) == process_id(process_group(*g)); + } + +private: + DistributedGraph* g; + typename property_map::const_type owner; +}; + +template +class local_subgraph + : public filtered_graph, + is_local_vertex > +{ + typedef filtered_graph, + is_local_vertex > + inherited; + typedef typename graph_traits::traversal_category + inherited_category; + +public: + struct traversal_category : + graph::detail::derive_from_if_tag_is, + graph::detail::derive_from_if_tag_is, + graph::detail::derive_from_if_tag_is, + graph::detail::derive_from_if_tag_is, + graph::detail::derive_from_if_tag_is, + graph::detail::derive_from_if_tag_is + { }; + + local_subgraph(DistributedGraph& g) + : inherited(g, + is_local_edge(g), + is_local_vertex(g)), + g(g) + { + } + + // Distributed Container + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + + process_group_type& process_group() + { + using boost::graph::parallel::process_group; + return process_group(g); + } + const process_group_type& process_group() const + { + using boost::graph::parallel::process_group; + return boost::graph::parallel::process_group(g); + } + + DistributedGraph& base() { return g; } + const DistributedGraph& base() const { return g; } + +private: + DistributedGraph& g; +}; + +template +class property_map, PropertyTag> + : public property_map { }; + +template +class property_map, PropertyTag> +{ + public: + typedef typename property_map::const_type + type; + typedef type const_type; +}; + +template +inline typename property_map, PropertyTag>::type +get(PropertyTag p, local_subgraph& g) +{ return get(p, g.base()); } + +template +inline typename property_map, PropertyTag> + ::const_type +get(PropertyTag p, const local_subgraph& g) +{ return get(p, g.base()); } + +template +inline local_subgraph +make_local_subgraph(DistributedGraph& g) +{ return local_subgraph(g); } + +} // end namespace boost + +#endif // BOOST_GRAPH_LOCAL_SUBGRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/mpi_process_group.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/mpi_process_group.hpp new file mode 100644 index 0000000000..e0ee579029 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/mpi_process_group.hpp @@ -0,0 +1,809 @@ +// Copyright (C) 2004-2008 The Trustees of Indiana University. +// Copyright (C) 2007 Douglas Gregor +// Copyright (C) 2007 Matthias Troyer + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Matthias Troyer +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_MPI_PROCESS_GROUP +#define BOOST_GRAPH_DISTRIBUTED_MPI_PROCESS_GROUP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +//#define NO_SPLIT_BATCHES +#define SEND_OOB_BSEND + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace graph { namespace distributed { + +// Process group tags +struct mpi_process_group_tag : virtual parallel::linear_process_group_tag { }; + +class mpi_process_group +{ + struct impl; + + public: + /// Number of tags available to each data structure. + static const int max_tags = 256; + + /** + * The type of a "receive" handler, that will be provided with + * (source, tag) pairs when a message is received. Users can provide a + * receive handler for a distributed data structure, for example, to + * automatically pick up and respond to messages as needed. + */ + typedef function receiver_type; + + /** + * The type of a handler for the on-synchronize event, which will be + * executed at the beginning of synchronize(). + */ + typedef function0 on_synchronize_event_type; + + /// Used as a tag to help create an "empty" process group. + struct create_empty {}; + + /// The type used to buffer message data + typedef boost::mpi::packed_oprimitive::buffer_type buffer_type; + + /// The type used to identify a process + typedef int process_id_type; + + /// The type used to count the number of processes + typedef int process_size_type; + + /// The type of communicator used to transmit data via MPI + typedef boost::mpi::communicator communicator_type; + + /// Classification of the capabilities of this process group + struct communication_category + : virtual parallel::bsp_process_group_tag, + virtual mpi_process_group_tag { }; + + // TBD: We can eliminate the "source" field and possibly the + // "offset" field. + struct message_header { + /// The process that sent the message + process_id_type source; + + /// The message tag + int tag; + + /// The offset of the message into the buffer + std::size_t offset; + + /// The length of the message in the buffer, in bytes + std::size_t bytes; + + template + void serialize(Archive& ar, int) + { + ar & source & tag & offset & bytes; + } + }; + + /** + * Stores the outgoing messages for a particular processor. + * + * @todo Evaluate whether we should use a deque instance, which + * would reduce could reduce the cost of "sending" messages but + * increases the time spent in the synchronization step. + */ + struct outgoing_messages { + outgoing_messages() {} + ~outgoing_messages() {} + + std::vector headers; + buffer_type buffer; + + template + void serialize(Archive& ar, int) + { + ar & headers & buffer; + } + + void swap(outgoing_messages& x) + { + headers.swap(x.headers); + buffer.swap(x.buffer); + } + }; + +private: + /** + * Virtual base from which every trigger will be launched. See @c + * trigger_launcher for more information. + */ + class trigger_base : boost::noncopyable + { + public: + explicit trigger_base(int tag) : tag_(tag) { } + + /// Retrieve the tag associated with this trigger + int tag() const { return tag_; } + + virtual ~trigger_base() { } + + /** + * Invoked to receive a message that matches a particular trigger. + * + * @param source the source of the message + * @param tag the (local) tag of the message + * @param context the context under which the trigger is being + * invoked + */ + virtual void + receive(mpi_process_group const& pg, int source, int tag, + trigger_receive_context context, int block=-1) const = 0; + + protected: + // The message tag associated with this trigger + int tag_; + }; + + /** + * Launches a specific handler in response to a trigger. This + * function object wraps up the handler function object and a buffer + * for incoming data. + */ + template + class trigger_launcher : public trigger_base + { + public: + explicit trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), self(self), handler(handler) + {} + + void + receive(mpi_process_group const& pg, int source, int tag, + trigger_receive_context context, int block=-1) const; + + private: + mpi_process_group& self; + mutable Handler handler; + }; + + /** + * Launches a specific handler with a message reply in response to a + * trigger. This function object wraps up the handler function + * object and a buffer for incoming data. + */ + template + class reply_trigger_launcher : public trigger_base + { + public: + explicit reply_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), self(self), handler(handler) + {} + + void + receive(mpi_process_group const& pg, int source, int tag, + trigger_receive_context context, int block=-1) const; + + private: + mpi_process_group& self; + mutable Handler handler; + }; + + template + class global_trigger_launcher : public trigger_base + { + public: + explicit global_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), handler(handler) + { + } + + void + receive(mpi_process_group const& pg, int source, int tag, + trigger_receive_context context, int block=-1) const; + + private: + mutable Handler handler; + // TBD: do not forget to cancel any outstanding Irecv when deleted, + // if we decide to use Irecv + }; + + template + class global_irecv_trigger_launcher : public trigger_base + { + public: + explicit global_irecv_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler, int sz) + : trigger_base(tag), handler(handler), buffer_size(sz) + { + prepare_receive(self,tag); + } + + void + receive(mpi_process_group const& pg, int source, int tag, + trigger_receive_context context, int block=-1) const; + + private: + void prepare_receive(mpi_process_group const& pg, int tag, bool force=false) const; + Handler handler; + int buffer_size; + // TBD: do not forget to cancel any outstanding Irecv when deleted, + // if we decide to use Irecv + }; + +public: + /** + * Construct a new BSP process group from an MPI communicator. The + * MPI communicator will be duplicated to create a new communicator + * for this process group to use. + */ + mpi_process_group(communicator_type parent_comm = communicator_type()); + + /** + * Construct a new BSP process group from an MPI communicator. The + * MPI communicator will be duplicated to create a new communicator + * for this process group to use. This constructor allows to tune the + * size of message batches. + * + * @param num_headers The maximum number of headers in a message batch + * + * @param buffer_size The maximum size of the message buffer in a batch. + * + */ + mpi_process_group( std::size_t num_headers, std::size_t buffer_size, + communicator_type parent_comm = communicator_type()); + + /** + * Construct a copy of the BSP process group for a new distributed + * data structure. This data structure will synchronize with all + * other members of the process group's equivalence class (including + * @p other), but will have its own set of tags. + * + * @param other The process group that this new process group will + * be based on, using a different set of tags within the same + * communication and synchronization space. + * + * @param handler A message handler that will be passed (source, + * tag) pairs for each message received by this data + * structure. The handler is expected to receive the messages + * immediately. The handler can be changed after-the-fact by + * calling @c replace_handler. + * + * @param out_of_band_receive An anachronism. TODO: remove this. + */ + mpi_process_group(const mpi_process_group& other, + const receiver_type& handler, + bool out_of_band_receive = false); + + /** + * Construct a copy of the BSP process group for a new distributed + * data structure. This data structure will synchronize with all + * other members of the process group's equivalence class (including + * @p other), but will have its own set of tags. + */ + mpi_process_group(const mpi_process_group& other, + attach_distributed_object, + bool out_of_band_receive = false); + + /** + * Create an "empty" process group, with no information. This is an + * internal routine that users should never need. + */ + explicit mpi_process_group(create_empty) {} + + /** + * Destroys this copy of the process group. + */ + ~mpi_process_group(); + + /** + * Replace the current message handler with a new message handler. + * + * @param handle The new message handler. + * @param out_of_band_receive An anachronism: remove this + */ + void replace_handler(const receiver_type& handler, + bool out_of_band_receive = false); + + /** + * Turns this process group into the process group for a new + * distributed data structure or object, allocating its own tag + * block. + */ + void make_distributed_object(); + + /** + * Replace the handler to be invoked at the beginning of synchronize. + */ + void + replace_on_synchronize_handler(const on_synchronize_event_type& handler = 0); + + /** + * Return the block number of the current data structure. A value of + * 0 indicates that this particular instance of the process group is + * not associated with any distributed data structure. + */ + int my_block_number() const { return block_num? *block_num : 0; } + + /** + * Encode a block number/tag pair into a single encoded tag for + * transmission. + */ + int encode_tag(int block_num, int tag) const + { return block_num * max_tags + tag; } + + /** + * Decode an encoded tag into a block number/tag pair. + */ + std::pair decode_tag(int encoded_tag) const + { return std::make_pair(encoded_tag / max_tags, encoded_tag % max_tags); } + + // @todo Actually write up the friend declarations so these could be + // private. + + // private: + + /** Allocate a block of tags for this instance. The block should not + * have been allocated already, e.g., my_block_number() == + * 0. Returns the newly-allocated block number. + */ + int allocate_block(bool out_of_band_receive = false); + + /** Potentially emit a receive event out of band. Returns true if an event + * was actually sent, false otherwise. + */ + bool maybe_emit_receive(int process, int encoded_tag) const; + + /** Emit a receive event. Returns true if an event was actually + * sent, false otherwise. + */ + bool emit_receive(int process, int encoded_tag) const; + + /** Emit an on-synchronize event to all block handlers. */ + void emit_on_synchronize() const; + + /** Retrieve a reference to the stored receiver in this block. */ + template + Receiver* get_receiver(); + + template + void + send_impl(int dest, int tag, const T& value, + mpl::true_ /*is_mpi_datatype*/) const; + + template + void + send_impl(int dest, int tag, const T& value, + mpl::false_ /*is_mpi_datatype*/) const; + + template + typename disable_if, void>::type + array_send_impl(int dest, int tag, const T values[], std::size_t n) const; + + template + bool + receive_impl(int source, int tag, T& value, + mpl::true_ /*is_mpi_datatype*/) const; + + template + bool + receive_impl(int source, int tag, T& value, + mpl::false_ /*is_mpi_datatype*/) const; + + // Receive an array of values + template + typename disable_if, bool>::type + array_receive_impl(int source, int tag, T* values, std::size_t& n) const; + + optional > probe() const; + + void synchronize() const; + + operator bool() { return impl_; } + + mpi_process_group base() const; + + /** + * Create a new trigger for a specific message tag. Triggers handle + * out-of-band messaging, and the handler itself will be called + * whenever a message is available. The handler itself accepts four + * arguments: the source of the message, the message tag (which will + * be the same as @p tag), the message data (of type @c Type), and a + * boolean flag that states whether the message was received + * out-of-band. The last will be @c true for out-of-band receives, + * or @c false for receives at the end of a synchronization step. + */ + template + void trigger(int tag, const Handler& handler); + + /** + * Create a new trigger for a specific message tag, along with a way + * to send a reply with data back to the sender. Triggers handle + * out-of-band messaging, and the handler itself will be called + * whenever a message is available. The handler itself accepts four + * arguments: the source of the message, the message tag (which will + * be the same as @p tag), the message data (of type @c Type), and a + * boolean flag that states whether the message was received + * out-of-band. The last will be @c true for out-of-band receives, + * or @c false for receives at the end of a synchronization + * step. The handler also returns a value, which will be routed back + * to the sender. + */ + template + void trigger_with_reply(int tag, const Handler& handler); + + template + void global_trigger(int tag, const Handler& handler, std::size_t buffer_size=0); + + + + /** + * Poll for any out-of-band messages. This routine will check if any + * out-of-band messages are available. Those that are available will + * be handled immediately, if possible. + * + * @returns if an out-of-band message has been received, but we are + * unable to actually receive the message, a (source, tag) pair will + * be returned. Otherwise, returns an empty optional. + * + * @param wait When true, we should block until a message comes in. + * + * @param synchronizing whether we are currently synchronizing the + * process group + */ + optional > + poll(bool wait = false, int block = -1, bool synchronizing = false) const; + + /** + * Determines the context of the trigger currently executing. If + * multiple triggers are executing (recursively), then the context + * for the most deeply nested trigger will be returned. If no + * triggers are executing, returns @c trc_none. This might be used, + * for example, to determine whether a reply to a message should + * itself be sent out-of-band or whether it can go via the normal, + * slower communication route. + */ + trigger_receive_context trigger_context() const; + + /// INTERNAL ONLY + void receive_batch(process_id_type source, outgoing_messages& batch) const; + + /// INTERNAL ONLY + /// + /// Determine the actual communicator and tag will be used for a + /// transmission with the given tag. + std::pair + actual_communicator_and_tag(int tag, int block) const; + + /// set the size of the message buffer used for buffered oob sends + + static void set_message_buffer_size(std::size_t s); + + /// get the size of the message buffer used for buffered oob sends + + static std::size_t message_buffer_size(); + static int old_buffer_size; + static void* old_buffer; +private: + + void install_trigger(int tag, int block, + shared_ptr const& launcher); + + void poll_requests(int block=-1) const; + + + // send a batch if the buffer is full now or would get full + void maybe_send_batch(process_id_type dest) const; + + // actually send a batch + void send_batch(process_id_type dest, outgoing_messages& batch) const; + void send_batch(process_id_type dest) const; + + void pack_headers() const; + + /** + * Process a batch of incoming messages immediately. + * + * @param source the source of these messages + */ + void process_batch(process_id_type source) const; + void receive_batch(boost::mpi::status& status) const; + + //void free_finished_sends() const; + + /// Status messages used internally by the process group + enum status_messages { + /// the first of the reserved message tags + msg_reserved_first = 126, + /// Sent from a processor when sending batched messages + msg_batch = 126, + /// Sent from a processor when sending large batched messages, larger than + /// the maximum buffer size for messages to be received by MPI_Irecv + msg_large_batch = 127, + /// Sent from a source processor to everyone else when that + /// processor has entered the synchronize() function. + msg_synchronizing = 128, + /// the last of the reserved message tags + msg_reserved_last = 128 + }; + + /** + * Description of a block of tags associated to a particular + * distributed data structure. This structure will live as long as + * the distributed data structure is around, and will be used to + * help send messages to the data structure. + */ + struct block_type + { + block_type() { } + + /// Handler for receive events + receiver_type on_receive; + + /// Handler executed at the start of synchronization + on_synchronize_event_type on_synchronize; + + /// Individual message triggers. Note: at present, this vector is + /// indexed by the (local) tag of the trigger. Any tags that + /// don't have triggers will have NULL pointers in that spot. + std::vector > triggers; + }; + + /** + * Data structure containing all of the blocks for the distributed + * data structures attached to a process group. + */ + typedef std::vector blocks_type; + + /// Iterator into @c blocks_type. + typedef blocks_type::iterator block_iterator; + + /** + * Deleter used to deallocate a block when its distributed data + * structure is destroyed. This type will be used as the deleter for + * @c block_num. + */ + struct deallocate_block; + + static std::vector message_buffer; + +public: + /** + * Data associated with the process group and all of its attached + * distributed data structures. + */ + shared_ptr impl_; + + /** + * When non-null, indicates that this copy of the process group is + * associated with a particular distributed data structure. The + * integer value contains the block number (a value > 0) associated + * with that data structure. The deleter for this @c shared_ptr is a + * @c deallocate_block object that will deallocate the associated + * block in @c impl_->blocks. + */ + shared_ptr block_num; + + /** + * Rank of this process, to avoid having to call rank() repeatedly. + */ + int rank; + + /** + * Number of processes in this process group, to avoid having to + * call communicator::size() repeatedly. + */ + int size; +}; + + + +inline mpi_process_group::process_id_type +process_id(const mpi_process_group& pg) +{ return pg.rank; } + +inline mpi_process_group::process_size_type +num_processes(const mpi_process_group& pg) +{ return pg.size; } + +mpi_process_group::communicator_type communicator(const mpi_process_group& pg); + +template +void +send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, const T& value); + +template +void +send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, InputIterator first, InputIterator last); + +template +inline void +send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, T* first, T* last) +{ send(pg, dest, tag, first, last - first); } + +template +inline void +send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, const T* first, const T* last) +{ send(pg, dest, tag, first, last - first); } + +template +mpi_process_group::process_id_type +receive(const mpi_process_group& pg, int tag, T& value); + +template +mpi_process_group::process_id_type +receive(const mpi_process_group& pg, + mpi_process_group::process_id_type source, int tag, T& value); + +optional > +probe(const mpi_process_group& pg); + +void synchronize(const mpi_process_group& pg); + +template +T* +all_reduce(const mpi_process_group& pg, T* first, T* last, T* out, + BinaryOperation bin_op); + +template +T* +scan(const mpi_process_group& pg, T* first, T* last, T* out, + BinaryOperation bin_op); + +template +void +all_gather(const mpi_process_group& pg, + InputIterator first, InputIterator last, std::vector& out); + +template +mpi_process_group +process_subgroup(const mpi_process_group& pg, + InputIterator first, InputIterator last); + +template +void +broadcast(const mpi_process_group& pg, T& val, + mpi_process_group::process_id_type root); + + +/******************************************************************* + * Out-of-band communication * + *******************************************************************/ + +template +typename enable_if >::type +send_oob(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, const T& value, int block=-1) +{ + using boost::mpi::get_mpi_datatype; + + // Determine the actual message tag we will use for the send, and which + // communicator we will use. + std::pair actual + = pg.actual_communicator_and_tag(tag, block); + +#ifdef SEND_OOB_BSEND + if (mpi_process_group::message_buffer_size()) { + MPI_Bsend(const_cast(&value), 1, get_mpi_datatype(value), dest, + actual.second, actual.first); + return; + } +#endif + MPI_Request request; + MPI_Isend(const_cast(&value), 1, get_mpi_datatype(value), dest, + actual.second, actual.first, &request); + + int done=0; + do { + pg.poll(); + MPI_Test(&request,&done,MPI_STATUS_IGNORE); + } while (!done); +} + +template +typename disable_if >::type +send_oob(const mpi_process_group& pg, mpi_process_group::process_id_type dest, + int tag, const T& value, int block=-1) +{ + using boost::mpi::packed_oarchive; + + // Determine the actual message tag we will use for the send, and which + // communicator we will use. + std::pair actual + = pg.actual_communicator_and_tag(tag, block); + + // Serialize the data into a buffer + packed_oarchive out(actual.first); + out << value; + std::size_t size = out.size(); + + // Send the actual message data +#ifdef SEND_OOB_BSEND + if (mpi_process_group::message_buffer_size()) { + MPI_Bsend(const_cast(out.address()), size, MPI_PACKED, + dest, actual.second, actual.first); + return; + } +#endif + MPI_Request request; + MPI_Isend(const_cast(out.address()), size, MPI_PACKED, + dest, actual.second, actual.first, &request); + + int done=0; + do { + pg.poll(); + MPI_Test(&request,&done,MPI_STATUS_IGNORE); + } while (!done); +} + +template +typename enable_if >::type +receive_oob(const mpi_process_group& pg, + mpi_process_group::process_id_type source, int tag, T& value, int block=-1); + +template +typename disable_if >::type +receive_oob(const mpi_process_group& pg, + mpi_process_group::process_id_type source, int tag, T& value, int block=-1); + +template +typename enable_if >::type +send_oob_with_reply(const mpi_process_group& pg, + mpi_process_group::process_id_type dest, + int tag, const SendT& send_value, ReplyT& reply_value, + int block = -1); + +template +typename disable_if >::type +send_oob_with_reply(const mpi_process_group& pg, + mpi_process_group::process_id_type dest, + int tag, const SendT& send_value, ReplyT& reply_value, + int block = -1); + +} } } // end namespace boost::graph::distributed + +BOOST_IS_BITWISE_SERIALIZABLE(boost::graph::distributed::mpi_process_group::message_header) +namespace boost { namespace mpi { + template<> + struct is_mpi_datatype : mpl::true_ { }; +} } // end namespace boost::mpi + +namespace std { +/// optimized swap for outgoing messages +inline void +swap(boost::graph::distributed::mpi_process_group::outgoing_messages& x, + boost::graph::distributed::mpi_process_group::outgoing_messages& y) +{ + x.swap(y); +} + + +} + +BOOST_CLASS_IMPLEMENTATION(boost::graph::distributed::mpi_process_group::outgoing_messages,object_serializable) +BOOST_CLASS_TRACKING(boost::graph::distributed::mpi_process_group::outgoing_messages,track_never) + +#include + +#endif // BOOST_PARALLEL_MPI_MPI_PROCESS_GROUP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/named_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/named_graph.hpp new file mode 100644 index 0000000000..83b00613b6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/named_graph.hpp @@ -0,0 +1,1239 @@ +// Copyright (C) 2007 Douglas Gregor +// Copyright (C) 2007 Hartmut Kaiser + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// TODO: +// - Cache (some) remote vertex names? +#ifndef BOOST_GRAPH_DISTRIBUTED_NAMED_GRAPH_HPP +#define BOOST_GRAPH_DISTRIBUTED_NAMED_GRAPH_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace graph { namespace distributed { + +using boost::parallel::trigger_receive_context; +using boost::detail::parallel::pair_with_property; + +/******************************************************************* + * Hashed distribution of named entities * + *******************************************************************/ + +template +struct hashed_distribution +{ + template + hashed_distribution(const ProcessGroup& pg, std::size_t /*num_vertices*/ = 0) + : n(num_processes(pg)) { } + + int operator()(const T& value) const + { + return hasher(value) % n; + } + + std::size_t n; + hash hasher; +}; + +/// Specialization for named graphs +template ::type> +struct select_distribution +{ +private: + /// The type used to name vertices in the graph + typedef typename remove_cv< + typename remove_reference< + typename ExtractName::result_type>::type>::type + vertex_name_type; + +public: + /** + * The @c type field provides a distribution object that maps + * vertex names to processors. The distribution object will be + * constructed with the process group over which communication will + * occur. The distribution object shall also be a function + * object mapping from the type of the name to a processor number + * in @c [0, @c p) (for @c p processors). By default, the mapping + * function uses the @c boost::hash value of the name, modulo @c p. + */ + typedef typename mpl::if_, + hashed_distribution, + InDistribution>::type + type; + + /// for named graphs the default type is the same as the stored distribution + /// type + typedef type default_type; +}; + +/// Specialization for non-named graphs +template +struct select_distribution +{ + /// the distribution type stored in the graph for non-named graphs should be + /// the variant_distribution type + typedef typename mpl::if_, + boost::parallel::variant_distribution, + InDistribution>::type type; + + /// default_type is used as the distribution functor for the + /// adjacency_list, it should be parallel::block by default + typedef typename mpl::if_, + boost::parallel::block, type>::type + default_type; +}; + + +/******************************************************************* + * Named graph mixin * + *******************************************************************/ + +/** + * named_graph is a mixin that provides names for the vertices of a + * graph, including a mapping from names to vertices. Graph types that + * may or may not be have vertex names (depending on the properties + * supplied by the user) should use maybe_named_graph. + * + * Template parameters: + * + * Graph: the graph type that derives from named_graph + * + * Vertex: the type of a vertex descriptor in Graph. Note: we cannot + * use graph_traits here, because the Graph is not yet defined. + * + * VertexProperty: the type of the property stored along with the + * vertex. + * + * ProcessGroup: the process group over which the distributed name + * graph mixin will communicate. + */ +template +class named_graph +{ +public: + /// Messages passed within the distributed named graph + enum message_kind { + /** + * Requests the addition of a vertex on a remote processor. The + * message data is a @c vertex_name_type. + */ + msg_add_vertex_name, + + /** + * Requests the addition of a vertex on a remote processor. The + * message data is a @c vertex_name_type. The remote processor + * will send back a @c msg_add_vertex_name_reply message + * containing the vertex descriptor. + */ + msg_add_vertex_name_with_reply, + + /** + * Requests the vertex descriptor corresponding to the given + * vertex name. The remote process will reply with a + * @c msg_find_vertex_reply message containing the answer. + */ + msg_find_vertex, + + /** + * Requests the addition of an edge on a remote processor. The + * data stored in these messages is a @c pair@, + * where @c source and @c target may be either names (of type @c + * vertex_name_type) or vertex descriptors, depending on what + * information we have locally. + */ + msg_add_edge_name_name, + msg_add_edge_vertex_name, + msg_add_edge_name_vertex, + + /** + * These messages are identical to msg_add_edge_*_*, except that + * the process actually adding the edge will send back a @c + * pair + */ + msg_add_edge_name_name_with_reply, + msg_add_edge_vertex_name_with_reply, + msg_add_edge_name_vertex_with_reply, + + /** + * Requests the addition of an edge with a property on a remote + * processor. The data stored in these messages is a @c + * pair>@, where @c + * source and @c target may be either names (of type @c + * vertex_name_type) or vertex descriptors, depending on what + * information we have locally. + */ + msg_add_edge_name_name_with_property, + msg_add_edge_vertex_name_with_property, + msg_add_edge_name_vertex_with_property, + + /** + * These messages are identical to msg_add_edge_*_*_with_property, + * except that the process actually adding the edge will send back + * a @c pair. + */ + msg_add_edge_name_name_with_reply_and_property, + msg_add_edge_vertex_name_with_reply_and_property, + msg_add_edge_name_vertex_with_reply_and_property + }; + + /// The vertex descriptor type + typedef Vertex vertex_descriptor; + + /// The edge descriptor type + typedef Edge edge_descriptor; + + /// The vertex property type + typedef typename Config::vertex_property_type vertex_property_type; + + /// The vertex property type + typedef typename Config::edge_property_type edge_property_type; + + /// The type used to extract names from the property structure + typedef typename internal_vertex_name::type + extract_name_type; + + /// The type used to name vertices in the graph + typedef typename remove_cv< + typename remove_reference< + typename extract_name_type::result_type>::type>::type + vertex_name_type; + + /// The type used to distribute named vertices in the graph + typedef typename Config::distribution_type distribution_type; + typedef typename Config::base_distribution_type base_distribution_type; + + /// The type used for communication in the distributed structure + typedef typename Config::process_group_type process_group_type; + + /// Type used to identify processes + typedef typename process_group_type::process_id_type process_id_type; + + /// a reference to this class, which is used for disambiguation of the + // add_vertex function + typedef named_graph named_graph_type; + + /// Structure returned when adding a vertex by vertex name + struct lazy_add_vertex; + friend struct lazy_add_vertex; + + /// Structure returned when adding an edge by vertex name + struct lazy_add_edge; + friend struct lazy_add_edge; + + /// Structure returned when adding an edge by vertex name with a property + struct lazy_add_edge_with_property; + friend struct lazy_add_edge_with_property; + + explicit named_graph(const process_group_type& pg); + + named_graph(const process_group_type& pg, const base_distribution_type& distribution); + + /// Set up triggers, but only for the BSP process group + void setup_triggers(); + + /// Retrieve the derived instance + Graph& derived() { return static_cast(*this); } + const Graph& derived() const { return static_cast(*this); } + + /// Retrieve the process group + process_group_type& process_group() { return process_group_; } + const process_group_type& process_group() const { return process_group_; } + + // Retrieve the named distribution + distribution_type& named_distribution() { return distribution_; } + const distribution_type& named_distribution() const { return distribution_; } + + /// Notify the named_graph that we have added the given vertex. This + /// is a no-op. + void added_vertex(Vertex) { } + + /// Notify the named_graph that we are removing the given + /// vertex. This is a no-op. + void removing_vertex(Vertex) { } + + /// Notify the named_graph that we are clearing the graph + void clearing_graph() { } + + /// Retrieve the owner of a given vertex based on the properties + /// associated with that vertex. This operation just returns the + /// number of the local processor, adding all vertices locally. + process_id_type owner_by_property(const vertex_property_type&); + +protected: + void + handle_add_vertex_name(int source, int tag, const vertex_name_type& msg, + trigger_receive_context); + + vertex_descriptor + handle_add_vertex_name_with_reply(int source, int tag, + const vertex_name_type& msg, + trigger_receive_context); + + boost::parallel::detail::untracked_pair + handle_find_vertex(int source, int tag, const vertex_name_type& msg, + trigger_receive_context); + + template + void handle_add_edge(int source, int tag, const boost::parallel::detail::untracked_pair& msg, + trigger_receive_context); + + template + boost::parallel::detail::untracked_pair + handle_add_edge_with_reply(int source, int tag, const boost::parallel::detail::untracked_pair& msg, + trigger_receive_context); + + template + void + handle_add_edge_with_property + (int source, int tag, + const pair_with_property& msg, + trigger_receive_context); + + template + boost::parallel::detail::untracked_pair + handle_add_edge_with_reply_and_property + (int source, int tag, + const pair_with_property& msg, + trigger_receive_context); + + /// The process group for this distributed data structure + process_group_type process_group_; + + /// The distribution we will use to map names to processors + distribution_type distribution_; +}; + +/// Helper macro containing the template parameters of named_graph +#define BGL_NAMED_GRAPH_PARAMS \ + typename Graph, typename Vertex, typename Edge, typename Config +/// Helper macro containing the named_graph<...> instantiation +#define BGL_NAMED_GRAPH \ + named_graph + +/** + * Data structure returned from add_vertex that will "lazily" add the + * vertex, either when it is converted to a @c vertex_descriptor or + * when the most recent copy has been destroyed. + */ +template +struct BGL_NAMED_GRAPH::lazy_add_vertex +{ + /// Construct a new lazyily-added vertex + lazy_add_vertex(named_graph& self, const vertex_name_type& name) + : self(self), name(name), committed(false) { } + + /// Transfer responsibility for adding the vertex from the source of + /// the copy to the newly-constructed opbject. + lazy_add_vertex(const lazy_add_vertex& other) + : self(self), name(other.name), committed(other.committed) + { + other.committed = true; + } + + /// If the vertex has not been added yet, add it + ~lazy_add_vertex(); + + /// Add the vertex and return its descriptor. This conversion can + /// only occur once, and only when this object is responsible for + /// creating the vertex. + operator vertex_descriptor() const { return commit(); } + + /// Add the vertex and return its descriptor. This can only be + /// called once, and only when this object is responsible for + /// creating the vertex. + vertex_descriptor commit() const; + +protected: + named_graph& self; + vertex_name_type name; + mutable bool committed; +}; + +template +BGL_NAMED_GRAPH::lazy_add_vertex::~lazy_add_vertex() +{ + typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; + + /// If this vertex has already been created or will be created by + /// someone else, or if someone threw an exception, we will not + /// create the vertex now. + if (committed || std::uncaught_exception()) + return; + + committed = true; + + process_id_type owner = self.named_distribution()(name); + if (owner == process_id(self.process_group())) + /// Add the vertex locally + add_vertex(self.derived().base().vertex_constructor(name), self.derived()); + else + /// Ask the owner of the vertex to add a vertex with this name + send(self.process_group(), owner, msg_add_vertex_name, name); +} + +template +typename BGL_NAMED_GRAPH::vertex_descriptor +BGL_NAMED_GRAPH::lazy_add_vertex::commit() const +{ + typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; + assert (!committed); + committed = true; + + process_id_type owner = self.named_distribution()(name); + if (owner == process_id(self.process_group())) + /// Add the vertex locally + return add_vertex(self.derived().base().vertex_constructor(name), + self.derived()); + else { + /// Ask the owner of the vertex to add a vertex with this name + vertex_descriptor result; + send_oob_with_reply(self.process_group(), owner, + msg_add_vertex_name_with_reply, name, result); + return result; + } +} + +/** + * Data structure returned from add_edge that will "lazily" add the + * edge, either when it is converted to a @c + * pair or when the most recent copy has been + * destroyed. + */ +template +struct BGL_NAMED_GRAPH::lazy_add_edge +{ + /// The graph's edge descriptor + typedef typename graph_traits::edge_descriptor edge_descriptor; + + /// Add an edge for the edge (u, v) based on vertex names + lazy_add_edge(BGL_NAMED_GRAPH& self, + const vertex_name_type& u_name, + const vertex_name_type& v_name) + : self(self), u(u_name), v(v_name), committed(false) { } + + /// Add an edge for the edge (u, v) based on a vertex descriptor and name + lazy_add_edge(BGL_NAMED_GRAPH& self, + vertex_descriptor u, + const vertex_name_type& v_name) + : self(self), u(u), v(v_name), committed(false) { } + + /// Add an edge for the edge (u, v) based on a vertex name and descriptor + lazy_add_edge(BGL_NAMED_GRAPH& self, + const vertex_name_type& u_name, + vertex_descriptor v) + : self(self), u(u_name), v(v), committed(false) { } + + /// Add an edge for the edge (u, v) based on vertex descriptors + lazy_add_edge(BGL_NAMED_GRAPH& self, + vertex_descriptor u, + vertex_descriptor v) + : self(self), u(u), v(v), committed(false) { } + + /// Copy a lazy_add_edge structure, which transfers responsibility + /// for adding the edge to the newly-constructed object. + lazy_add_edge(const lazy_add_edge& other) + : self(other.self), u(other.u), v(other.v), committed(other.committed) + { + other.committed = true; + } + + /// If the edge has not yet been added, add the edge but don't wait + /// for a reply. + ~lazy_add_edge(); + + /// Returns commit(). + operator std::pair() const { return commit(); } + + // Add the edge. This operation will block if a remote edge is + // being added. + std::pair commit() const; + +protected: + BGL_NAMED_GRAPH& self; + mutable variant u; + mutable variant v; + mutable bool committed; + +private: + // No copy-assignment semantics + void operator=(lazy_add_edge&); +}; + +template +BGL_NAMED_GRAPH::lazy_add_edge::~lazy_add_edge() +{ + typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; + + using boost::parallel::detail::make_untracked_pair; + + /// If this edge has already been created or will be created by + /// someone else, or if someone threw an exception, we will not + /// create the edge now. + if (committed || std::uncaught_exception()) + return; + + committed = true; + + if (vertex_name_type* v_name = boost::get(&v)) { + // We haven't resolved the target vertex to a descriptor yet, so + // it must not be local. Send a message to the owner of the target + // of the edge. If the owner of the target does not happen to own + // the source, it will resolve the target to a vertex descriptor + // and pass the message along to the owner of the source. + if (vertex_name_type* u_name = boost::get(&u)) + send(self.process_group(), self.distribution_(*v_name), + BGL_NAMED_GRAPH::msg_add_edge_name_name, + make_untracked_pair(*u_name, *v_name)); + else + send(self.process_group(), self.distribution_(*v_name), + BGL_NAMED_GRAPH::msg_add_edge_vertex_name, + make_untracked_pair(boost::get(u), *v_name)); + } else { + if (vertex_name_type* u_name = boost::get(&u)) + // We haven't resolved the source vertex to a descriptor yet, so + // it must not be local. Send a message to the owner of the + // source vertex requesting the edge addition. + send(self.process_group(), self.distribution_(*u_name), + BGL_NAMED_GRAPH::msg_add_edge_name_vertex, + make_untracked_pair(*u_name, boost::get(v))); + else + // We have descriptors for both of the vertices, either of which + // may be remote or local. Tell the owner of the source vertex + // to add the edge (it may be us!). + add_edge(boost::get(u), + boost::get(v), + self.derived()); + } +} + +template +std::pair::edge_descriptor, bool> +BGL_NAMED_GRAPH::lazy_add_edge::commit() const +{ + typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; + using boost::parallel::detail::make_untracked_pair; + + assert(!committed); + committed = true; + + /// The result we will return, if we are sending a message to + /// request that someone else add the edge. + boost::parallel::detail::untracked_pair result; + + /// The owner of the vertex "u" + process_id_type u_owner; + + process_id_type rank = process_id(self.process_group()); + if (const vertex_name_type* u_name = boost::get(&u)) { + /// We haven't resolved the source vertex to a descriptor yet, so + /// it must not be local. + u_owner = self.named_distribution()(*u_name); + + /// Send a message to the remote vertex requesting that it add the + /// edge. The message differs depending on whether we have a + /// vertex name or a vertex descriptor for the target. + if (const vertex_name_type* v_name = boost::get(&v)) + send_oob_with_reply(self.process_group(), u_owner, + BGL_NAMED_GRAPH::msg_add_edge_name_name_with_reply, + make_untracked_pair(*u_name, *v_name), result); + else + send_oob_with_reply(self.process_group(), u_owner, + BGL_NAMED_GRAPH::msg_add_edge_name_vertex_with_reply, + make_untracked_pair(*u_name, + boost::get(v)), + result); + } else { + /// We have resolved the source vertex to a descriptor, which may + /// either be local or remote. + u_owner + = get(vertex_owner, self.derived(), + boost::get(u)); + if (u_owner == rank) { + /// The source is local. If we need to, resolve the target vertex. + if (const vertex_name_type* v_name = boost::get(&v)) + v = add_vertex(*v_name, self.derived()); + + /// Add the edge using vertex descriptors + return add_edge(boost::get(u), + boost::get(v), + self.derived()); + } else { + /// The source is remote. Just send a message to its owner + /// requesting that the owner add the new edge, either directly + /// or via the derived class's add_edge function. + if (const vertex_name_type* v_name = boost::get(&v)) + send_oob_with_reply + (self.process_group(), u_owner, + BGL_NAMED_GRAPH::msg_add_edge_vertex_name_with_reply, + make_untracked_pair(boost::get(u), *v_name), + result); + else + return add_edge(boost::get(u), + boost::get(v), + self.derived()); + } + } + + // If we get here, the edge has been added remotely and "result" + // contains the result of that edge addition. + return result; +} + +/** + * Data structure returned from add_edge that will "lazily" add the + * edge with a property, either when it is converted to a @c + * pair or when the most recent copy has been + * destroyed. + */ +template +struct BGL_NAMED_GRAPH::lazy_add_edge_with_property +{ + /// The graph's edge descriptor + typedef typename graph_traits::edge_descriptor edge_descriptor; + + /// The Edge property type for our graph + typedef typename Config::edge_property_type edge_property_type; + + /// Add an edge for the edge (u, v) based on vertex names + lazy_add_edge_with_property(BGL_NAMED_GRAPH& self, + const vertex_name_type& u_name, + const vertex_name_type& v_name, + const edge_property_type& property) + : self(self), u(u_name), v(v_name), property(property), committed(false) + { + } + + /// Add an edge for the edge (u, v) based on a vertex descriptor and name + lazy_add_edge_with_property(BGL_NAMED_GRAPH& self, + vertex_descriptor u, + const vertex_name_type& v_name, + const edge_property_type& property) + : self(self), u(u), v(v_name), property(property), committed(false) { } + + /// Add an edge for the edge (u, v) based on a vertex name and descriptor + lazy_add_edge_with_property(BGL_NAMED_GRAPH& self, + const vertex_name_type& u_name, + vertex_descriptor v, + const edge_property_type& property) + : self(self), u(u_name), v(v), property(property), committed(false) { } + + /// Add an edge for the edge (u, v) based on vertex descriptors + lazy_add_edge_with_property(BGL_NAMED_GRAPH& self, + vertex_descriptor u, + vertex_descriptor v, + const edge_property_type& property) + : self(self), u(u), v(v), property(property), committed(false) { } + + /// Copy a lazy_add_edge_with_property structure, which transfers + /// responsibility for adding the edge to the newly-constructed + /// object. + lazy_add_edge_with_property(const lazy_add_edge_with_property& other) + : self(other.self), u(other.u), v(other.v), property(other.property), + committed(other.committed) + { + other.committed = true; + } + + /// If the edge has not yet been added, add the edge but don't wait + /// for a reply. + ~lazy_add_edge_with_property(); + + /// Returns commit(). + operator std::pair() const { return commit(); } + + // Add the edge. This operation will block if a remote edge is + // being added. + std::pair commit() const; + +protected: + BGL_NAMED_GRAPH& self; + mutable variant u; + mutable variant v; + edge_property_type property; + mutable bool committed; + +private: + // No copy-assignment semantics + void operator=(lazy_add_edge_with_property&); +}; + +template +BGL_NAMED_GRAPH::lazy_add_edge_with_property::~lazy_add_edge_with_property() +{ + typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; + using boost::detail::parallel::make_pair_with_property; + + /// If this edge has already been created or will be created by + /// someone else, or if someone threw an exception, we will not + /// create the edge now. + if (committed || std::uncaught_exception()) + return; + + committed = true; + + if (vertex_name_type* v_name = boost::get(&v)) { + // We haven't resolved the target vertex to a descriptor yet, so + // it must not be local. Send a message to the owner of the target + // of the edge. If the owner of the target does not happen to own + // the source, it will resolve the target to a vertex descriptor + // and pass the message along to the owner of the source. + if (vertex_name_type* u_name = boost::get(&u)) + send(self.process_group(), self.distribution_(*v_name), + BGL_NAMED_GRAPH::msg_add_edge_name_name_with_property, + make_pair_with_property(*u_name, *v_name, property)); + else + send(self.process_group(), self.distribution_(*v_name), + BGL_NAMED_GRAPH::msg_add_edge_vertex_name_with_property, + make_pair_with_property(boost::get(u), *v_name, + property)); + } else { + if (vertex_name_type* u_name = boost::get(&u)) + // We haven't resolved the source vertex to a descriptor yet, so + // it must not be local. Send a message to the owner of the + // source vertex requesting the edge addition. + send(self.process_group(), self.distribution_(*u_name), + BGL_NAMED_GRAPH::msg_add_edge_name_vertex_with_property, + make_pair_with_property(*u_name, boost::get(v), + property)); + else + // We have descriptors for both of the vertices, either of which + // may be remote or local. Tell the owner of the source vertex + // to add the edge (it may be us!). + add_edge(boost::get(u), + boost::get(v), + property, + self.derived()); + } +} + +template +std::pair::edge_descriptor, bool> +BGL_NAMED_GRAPH::lazy_add_edge_with_property::commit() const +{ + using boost::detail::parallel::make_pair_with_property; + typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; + assert(!committed); + committed = true; + + /// The result we will return, if we are sending a message to + /// request that someone else add the edge. + boost::parallel::detail::untracked_pair result; + + /// The owner of the vertex "u" + process_id_type u_owner; + + process_id_type rank = process_id(self.process_group()); + if (const vertex_name_type* u_name = boost::get(&u)) { + /// We haven't resolved the source vertex to a descriptor yet, so + /// it must not be local. + u_owner = self.named_distribution()(*u_name); + + /// Send a message to the remote vertex requesting that it add the + /// edge. The message differs depending on whether we have a + /// vertex name or a vertex descriptor for the target. + if (const vertex_name_type* v_name = boost::get(&v)) + send_oob_with_reply + (self.process_group(), u_owner, + BGL_NAMED_GRAPH::msg_add_edge_name_name_with_reply_and_property, + make_pair_with_property(*u_name, *v_name, property), + result); + else + send_oob_with_reply + (self.process_group(), u_owner, + BGL_NAMED_GRAPH::msg_add_edge_name_vertex_with_reply_and_property, + make_pair_with_property(*u_name, + boost::get(v), + property), + result); + } else { + /// We have resolved the source vertex to a descriptor, which may + /// either be local or remote. + u_owner + = get(vertex_owner, self.derived(), + boost::get(u)); + if (u_owner == rank) { + /// The source is local. If we need to, resolve the target vertex. + if (const vertex_name_type* v_name = boost::get(&v)) + v = add_vertex(*v_name, self.derived()); + + /// Add the edge using vertex descriptors + return add_edge(boost::get(u), + boost::get(v), + property, + self.derived()); + } else { + /// The source is remote. Just send a message to its owner + /// requesting that the owner add the new edge, either directly + /// or via the derived class's add_edge function. + if (const vertex_name_type* v_name = boost::get(&v)) + send_oob_with_reply + (self.process_group(), u_owner, + BGL_NAMED_GRAPH::msg_add_edge_vertex_name_with_reply_and_property, + make_pair_with_property(boost::get(u), *v_name, + property), + result); + else + return add_edge(boost::get(u), + boost::get(v), + property, + self.derived()); + } + } + + // If we get here, the edge has been added remotely and "result" + // contains the result of that edge addition. + return result; +} + +/// Construct the named_graph with a particular process group +template +BGL_NAMED_GRAPH::named_graph(const process_group_type& pg) + : process_group_(pg, parallel::attach_distributed_object()), + distribution_(pg) +{ + setup_triggers(); +} + +/// Construct the named_graph mixin with a particular process group +/// and distribution function +template +BGL_NAMED_GRAPH::named_graph(const process_group_type& pg, + const base_distribution_type& distribution) + : process_group_(pg, parallel::attach_distributed_object()), + distribution_(pg, distribution) +{ + setup_triggers(); +} + +template +void +BGL_NAMED_GRAPH::setup_triggers() +{ + using boost::graph::parallel::simple_trigger; + + simple_trigger(process_group_, msg_add_vertex_name, this, + &named_graph::handle_add_vertex_name); + simple_trigger(process_group_, msg_add_vertex_name_with_reply, this, + &named_graph::handle_add_vertex_name_with_reply); + simple_trigger(process_group_, msg_find_vertex, this, + &named_graph::handle_find_vertex); + simple_trigger(process_group_, msg_add_edge_name_name, this, + &named_graph::template handle_add_edge); + simple_trigger(process_group_, msg_add_edge_name_name_with_reply, this, + &named_graph::template handle_add_edge_with_reply + ); + simple_trigger(process_group_, msg_add_edge_name_vertex, this, + &named_graph::template handle_add_edge); + simple_trigger(process_group_, msg_add_edge_name_vertex_with_reply, this, + &named_graph::template handle_add_edge_with_reply + ); + simple_trigger(process_group_, msg_add_edge_vertex_name, this, + &named_graph::template handle_add_edge); + simple_trigger(process_group_, msg_add_edge_vertex_name_with_reply, this, + &named_graph::template handle_add_edge_with_reply + ); + simple_trigger(process_group_, msg_add_edge_name_name_with_property, this, + &named_graph:: + template handle_add_edge_with_property); + simple_trigger(process_group_, + msg_add_edge_name_name_with_reply_and_property, this, + &named_graph::template handle_add_edge_with_reply_and_property + ); + simple_trigger(process_group_, msg_add_edge_name_vertex_with_property, this, + &named_graph:: + template handle_add_edge_with_property); + simple_trigger(process_group_, + msg_add_edge_name_vertex_with_reply_and_property, this, + &named_graph::template handle_add_edge_with_reply_and_property + ); + simple_trigger(process_group_, msg_add_edge_vertex_name_with_property, this, + &named_graph:: + template handle_add_edge_with_property); + simple_trigger(process_group_, + msg_add_edge_vertex_name_with_reply_and_property, this, + &named_graph::template handle_add_edge_with_reply_and_property + ); +} + +/// Retrieve the vertex associated with the given name +template +optional +find_vertex(typename BGL_NAMED_GRAPH::vertex_name_type const& name, + const BGL_NAMED_GRAPH& g) +{ + typedef typename Graph::local_vertex_descriptor local_vertex_descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + // Determine the owner of this name + typename BGL_NAMED_GRAPH::process_id_type owner + = g.named_distribution()(name); + + if (owner == process_id(g.process_group())) { + // The vertex is local, so search for a mapping here + optional result + = find_vertex(name, g.derived().base()); + if (result) + return Vertex(owner, *result); + else + return optional(); + } + else { + // Ask the ownering process for the name of this vertex + boost::parallel::detail::untracked_pair result; + send_oob_with_reply(g.process_group(), owner, + BGL_NAMED_GRAPH::msg_find_vertex, name, result); + if (result.second) + return result.first; + else + return optional(); + } +} + +/// meta-function helping in figuring out if the given VertextProerty belongs to +/// a named graph +template +struct not_is_named_graph + : is_same::type, void> +{}; + +/// Retrieve the vertex associated with the given name +template +typename Graph::named_graph_type::lazy_add_vertex +add_vertex(typename Graph::vertex_name_type const& name, + Graph& g, + typename disable_if< + not_is_named_graph, + void*>::type = 0) +{ + return typename Graph::named_graph_type::lazy_add_vertex(g, name); +} + +/// Add an edge using vertex names to refer to the vertices +template +typename BGL_NAMED_GRAPH::lazy_add_edge +add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, + typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, + BGL_NAMED_GRAPH& g) +{ + typedef typename BGL_NAMED_GRAPH::lazy_add_edge lazy_add_edge; + typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; + + process_id_type rank = process_id(g.process_group()); + process_id_type u_owner = g.named_distribution()(u_name); + process_id_type v_owner = g.named_distribution()(v_name); + + // Resolve local vertex names before building the "lazy" edge + // addition structure. + if (u_owner == rank && v_owner == rank) + return lazy_add_edge(g, add_vertex(u_name, g), add_vertex(v_name, g)); + else if (u_owner == rank && v_owner != rank) + return lazy_add_edge(g, add_vertex(u_name, g), v_name); + else if (u_owner != rank && v_owner == rank) + return lazy_add_edge(g, u_name, add_vertex(v_name, g)); + else + return lazy_add_edge(g, u_name, v_name); +} + +template +typename BGL_NAMED_GRAPH::lazy_add_edge +add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, + typename BGL_NAMED_GRAPH::vertex_descriptor const& v, + BGL_NAMED_GRAPH& g) +{ + // Resolve local vertex names before building the "lazy" edge + // addition structure. + typedef typename BGL_NAMED_GRAPH::lazy_add_edge lazy_add_edge; + if (g.named_distribution()(u_name) == process_id(g.process_group())) + return lazy_add_edge(g, add_vertex(u_name, g), v); + else + return lazy_add_edge(g, u_name, v); +} + +template +typename BGL_NAMED_GRAPH::lazy_add_edge +add_edge(typename BGL_NAMED_GRAPH::vertex_descriptor const& u, + typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, + BGL_NAMED_GRAPH& g) +{ + // Resolve local vertex names before building the "lazy" edge + // addition structure. + typedef typename BGL_NAMED_GRAPH::lazy_add_edge lazy_add_edge; + if (g.named_distribution()(v_name) == process_id(g.process_group())) + return lazy_add_edge(g, u, add_vertex(v_name, g)); + else + return lazy_add_edge(g, u, v_name); +} + +/// Add an edge using vertex names to refer to the vertices +template +typename BGL_NAMED_GRAPH::lazy_add_edge_with_property +add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, + typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, + typename Graph::edge_property_type const& property, + BGL_NAMED_GRAPH& g) +{ + typedef typename BGL_NAMED_GRAPH::lazy_add_edge_with_property lazy_add_edge; + typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; + + process_id_type rank = process_id(g.process_group()); + process_id_type u_owner = g.named_distribution()(u_name); + process_id_type v_owner = g.named_distribution()(v_name); + + // Resolve local vertex names before building the "lazy" edge + // addition structure. + if (u_owner == rank && v_owner == rank) + return lazy_add_edge(g, add_vertex(u_name, g), add_vertex(v_name, g), + property); + else if (u_owner == rank && v_owner != rank) + return lazy_add_edge(g, add_vertex(u_name, g), v_name, property); + else if (u_owner != rank && v_owner == rank) + return lazy_add_edge(g, u_name, add_vertex(v_name, g), property); + else + return lazy_add_edge(g, u_name, v_name, property); +} + +template +typename BGL_NAMED_GRAPH::lazy_add_edge_with_property +add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, + typename BGL_NAMED_GRAPH::vertex_descriptor const& v, + typename Graph::edge_property_type const& property, + BGL_NAMED_GRAPH& g) +{ + // Resolve local vertex names before building the "lazy" edge + // addition structure. + typedef typename BGL_NAMED_GRAPH::lazy_add_edge_with_property lazy_add_edge; + if (g.named_distribution()(u_name) == process_id(g.process_group())) + return lazy_add_edge(g, add_vertex(u_name, g), v, property); + else + return lazy_add_edge(g, u_name, v, property); +} + +template +typename BGL_NAMED_GRAPH::lazy_add_edge_with_property +add_edge(typename BGL_NAMED_GRAPH::vertex_descriptor const& u, + typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, + typename Graph::edge_property_type const& property, + BGL_NAMED_GRAPH& g) +{ + // Resolve local vertex names before building the "lazy" edge + // addition structure. + typedef typename BGL_NAMED_GRAPH::lazy_add_edge_with_property lazy_add_edge; + if (g.named_distribution()(v_name) == process_id(g.process_group())) + return lazy_add_edge(g, u, add_vertex(v_name, g), property); + else + return lazy_add_edge(g, u, v_name, property); +} + +template +typename BGL_NAMED_GRAPH::process_id_type +BGL_NAMED_GRAPH::owner_by_property(const vertex_property_type& property) +{ + return distribution_(derived().base().extract_name(property)); +} + + +/******************************************************************* + * Message handlers * + *******************************************************************/ + +template +void +BGL_NAMED_GRAPH:: +handle_add_vertex_name(int /*source*/, int /*tag*/, + const vertex_name_type& msg, trigger_receive_context) +{ + add_vertex(msg, derived()); +} + +template +typename BGL_NAMED_GRAPH::vertex_descriptor +BGL_NAMED_GRAPH:: +handle_add_vertex_name_with_reply(int source, int /*tag*/, + const vertex_name_type& msg, + trigger_receive_context) +{ + return add_vertex(msg, derived()); +} + +template +boost::parallel::detail::untracked_pair +BGL_NAMED_GRAPH:: +handle_find_vertex(int source, int /*tag*/, const vertex_name_type& msg, + trigger_receive_context) +{ + using boost::parallel::detail::make_untracked_pair; + + optional v = find_vertex(msg, derived()); + if (v) + return make_untracked_pair(*v, true); + else + return make_untracked_pair(graph_traits::null_vertex(), false); +} + +template +template +void +BGL_NAMED_GRAPH:: +handle_add_edge(int source, int /*tag*/, const boost::parallel::detail::untracked_pair& msg, + trigger_receive_context) +{ + add_edge(msg.first, msg.second, derived()); +} + +template +template +boost::parallel::detail::untracked_pair +BGL_NAMED_GRAPH:: +handle_add_edge_with_reply(int source, int /*tag*/, const boost::parallel::detail::untracked_pair& msg, + trigger_receive_context) +{ + std::pair p = + add_edge(msg.first, msg.second, derived()); + return p; +} + +template +template +void +BGL_NAMED_GRAPH:: +handle_add_edge_with_property + (int source, int tag, + const pair_with_property& msg, + trigger_receive_context) +{ + add_edge(msg.first, msg.second, msg.get_property(), derived()); +} + +template +template +boost::parallel::detail::untracked_pair +BGL_NAMED_GRAPH:: +handle_add_edge_with_reply_and_property + (int source, int tag, + const pair_with_property& msg, + trigger_receive_context) +{ + std:: pair p = + add_edge(msg.first, msg.second, msg.get_property(), derived()); + return p; +} + +#undef BGL_NAMED_GRAPH +#undef BGL_NAMED_GRAPH_PARAMS + +/******************************************************************* + * Maybe named graph mixin * + *******************************************************************/ + +/** + * A graph mixin that can provide a mapping from names to vertices, + * and use that mapping to simplify creation and manipulation of + * graphs. + */ +template::type> +struct maybe_named_graph + : public named_graph +{ +private: + typedef named_graph inherited; + typedef typename Config::process_group_type process_group_type; + +public: + /// The type used to distribute named vertices in the graph + typedef typename Config::distribution_type distribution_type; + typedef typename Config::base_distribution_type base_distribution_type; + + explicit maybe_named_graph(const process_group_type& pg) : inherited(pg) { } + + maybe_named_graph(const process_group_type& pg, + const base_distribution_type& distribution) + : inherited(pg, distribution) { } + + distribution_type& distribution() { return this->distribution_; } + const distribution_type& distribution() const { return this->distribution_; } +}; + +/** + * A graph mixin that can provide a mapping from names to vertices, + * and use that mapping to simplify creation and manipulation of + * graphs. This partial specialization turns off this functionality + * when the @c VertexProperty does not have an internal vertex name. + */ +template +struct maybe_named_graph +{ +private: + typedef typename Config::process_group_type process_group_type; + typedef typename Config::vertex_property_type vertex_property_type; + +public: + typedef typename process_group_type::process_id_type process_id_type; + + /// The type used to distribute named vertices in the graph + typedef typename Config::distribution_type distribution_type; + typedef typename Config::base_distribution_type base_distribution_type; + + explicit maybe_named_graph(const process_group_type&) { } + + maybe_named_graph(const process_group_type& pg, + const base_distribution_type& distribution) + : distribution_(pg, distribution) { } + + /// Notify the named_graph that we have added the given vertex. This + /// is a no-op. + void added_vertex(Vertex) { } + + /// Notify the named_graph that we are removing the given + /// vertex. This is a no-op. + void removing_vertex(Vertex) { } + + /// Notify the named_graph that we are clearing the graph + void clearing_graph() { } + + /// Retrieve the owner of a given vertex based on the properties + /// associated with that vertex. This operation just returns the + /// number of the local processor, adding all vertices locally. + process_id_type owner_by_property(const vertex_property_type&) + { + return process_id(pg); + } + + distribution_type& distribution() { return distribution_; } + const distribution_type& distribution() const { return distribution_; } + +protected: + /// The process group of the graph + process_group_type pg; + + /// The distribution used for the graph + distribution_type distribution_; +}; + +} } } // end namespace boost::graph::distributed + +#endif // BOOST_GRAPH_DISTRIBUTED_NAMED_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/one_bit_color_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/one_bit_color_map.hpp new file mode 100644 index 0000000000..0a5704a1f6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/one_bit_color_map.hpp @@ -0,0 +1,116 @@ +// Copyright (C) 2006-2010 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Jeremiah Willcock +// Andrew Lumsdaine + +// Distributed version of the one-bit color map +#ifndef BOOST_DISTRIBUTED_ONE_BIT_COLOR_MAP_HPP +#define BOOST_DISTRIBUTED_ONE_BIT_COLOR_MAP_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include + +namespace boost { + +template +class one_bit_color_map > + : public parallel::distributed_property_map > +{ + typedef one_bit_color_map local_map; + + typedef parallel::distributed_property_map + inherited; + + typedef local_property_map + index_map_type; + +public: + one_bit_color_map(std::size_t inital_size, + const index_map_type& index = index_map_type()) + : inherited(index.process_group(), index.global(), + local_map(inital_size, index.base())) { } + + inherited& base() { return *this; } + const inherited& base() const { return *this; } +}; + +template +inline one_bit_color_type +get(one_bit_color_map > + const& pm, + typename property_traits::key_type key) +{ + return get(pm.base(), key); +} + +template +inline void +put(one_bit_color_map > + const& pm, + typename property_traits::key_type key, + one_bit_color_type value) +{ + put(pm.base(), key, value); +} + +template +class one_bit_color_map > + : public parallel::distributed_property_map< + ProcessGroup, GlobalMap, one_bit_color_map > +{ + typedef one_bit_color_map local_map; + + typedef parallel::distributed_property_map + inherited; + + typedef parallel::distributed_property_map + index_map_type; + +public: + one_bit_color_map(std::size_t inital_size, + const index_map_type& index = index_map_type()) + : inherited(index.process_group(), index.global(), + local_map(inital_size, index.base())) { } + + inherited& base() { return *this; } + const inherited& base() const { return *this; } +}; + +template +inline one_bit_color_type +get(one_bit_color_map< + parallel::distributed_property_map< + ProcessGroup, GlobalMap, one_bit_color_map > > const& pm, + typename property_traits::key_type key) +{ + return get(pm.base(), key); +} + +template +inline void +put(one_bit_color_map< + parallel::distributed_property_map< + ProcessGroup, GlobalMap, one_bit_color_map > > const& pm, + typename property_traits::key_type key, + one_bit_color_type value) +{ + put(pm.base(), key, value); +} + +} // end namespace boost + +#endif // BOOST_DISTRIBUTED_ONE_BIT_COLOR_MAP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/page_rank.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/page_rank.hpp new file mode 100644 index 0000000000..aae418fc73 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/page_rank.hpp @@ -0,0 +1,225 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. +// Copyright (C) 2002 Brad King and Douglas Gregor + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +// Brian Barrett +#ifndef BOOST_PARALLEL_GRAPH_PAGE_RANK_HPP +#define BOOST_PARALLEL_GRAPH_PAGE_RANK_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include + +// #define WANT_MPI_ONESIDED 1 + +namespace boost { namespace graph { namespace distributed { + +namespace detail { +#ifdef WANT_MPI_ONESIDED + template + void page_rank_step(const Graph& g, RankMap from_rank, MPI_Win to_win, + typename property_traits::value_type damping, + owner_map_t owner) + { + typedef typename property_traits::value_type rank_type; + int me, ret; + MPI_Comm_rank(MPI_COMM_WORLD, &me); + + // MPI_Accumulate is not required to store the value of the data + // being sent, only the address. The value of the memory location + // must not change until the end of the access epoch, meaning the + // call to MPI_Fence. We therefore store the updated value back + // into the from_rank map before the accumulate rather than using + // a temporary. We're going to reset the values in the from_rank + // before the end of page_rank_step() anyway, so this isn't a huge + // deal. But MPI-2 One-sided is an abomination. + BGL_FORALL_VERTICES_T(u, g, Graph) { + put(from_rank, u, (damping * get(from_rank, u) / out_degree(u, g))); + BGL_FORALL_ADJ_T(u, v, g, Graph) { + ret = MPI_Accumulate(&(from_rank[u]), + 1, MPI_DOUBLE, + get(owner, v), local(v), + 1, MPI_DOUBLE, MPI_SUM, to_win); + assert(MPI_SUCCESS == ret); + } + } + MPI_Win_fence(0, to_win); + + // Set new rank maps for the other map. Do this now to get around + // the stupid synchronization rules of MPI-2 One-sided + BGL_FORALL_VERTICES_T(v, g, Graph) put(from_rank, v, rank_type(1 - damping)); + } +#endif + + template + struct rank_accumulate_reducer { + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + template + T operator()(const K&) const { return T(0); } + + template + T operator()(const K&, const T& x, const T& y) const { return x + y; } + }; +} // end namespace detail + +template +void +page_rank_impl(const Graph& g, RankMap rank_map, Done done, + typename property_traits::value_type damping, + typename graph_traits::vertices_size_type n, + RankMap2 rank_map2) +{ + typedef typename property_traits::value_type rank_type; + + int me; + MPI_Comm_rank(MPI_COMM_WORLD, &me); + + typedef typename property_map + ::const_type vertex_owner_map; + typename property_map::const_type + owner = get(vertex_owner, g); + + typedef typename boost::graph::parallel::process_group_type + ::type process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + + process_group_type pg = process_group(g); + process_id_type id = process_id(pg); + + assert(me == id); + + rank_type initial_rank = rank_type(rank_type(1) / n); + BGL_FORALL_VERTICES_T(v, g, Graph) put(rank_map, v, initial_rank); + +#ifdef WANT_MPI_ONESIDED + + assert(sizeof(rank_type) == sizeof(double)); + + bool to_map_2 = true; + MPI_Win win, win2; + + MPI_Win_create(&(rank_map[*(vertices(g).first)]), + sizeof(double) * num_vertices(g), + sizeof(double), + MPI_INFO_NULL, MPI_COMM_WORLD, &win); + MPI_Win_set_name(win, "rank_map_win"); + MPI_Win_create(&(rank_map2[*(vertices(g).first)]), + sizeof(double) * num_vertices(g), + sizeof(double), + MPI_INFO_NULL, MPI_COMM_WORLD, &win2); + MPI_Win_set_name(win, "rank_map2_win"); + + // set initial rank maps for the first iteration... + BGL_FORALL_VERTICES_T(v, g, Graph) put(rank_map2, v, rank_type(1 - damping)); + + MPI_Win_fence(0, win); + MPI_Win_fence(0, win2); + + while ((to_map_2 && !done(rank_map, g)) || + (!to_map_2 && !done(rank_map2, g))) { + if (to_map_2) { + graph::distributed::detail::page_rank_step(g, rank_map, win2, damping, owner); + to_map_2 = false; + } else { + graph::distributed::detail::page_rank_step(g, rank_map2, win, damping, owner); + to_map_2 = true; + } + } + synchronize(boost::graph::parallel::process_group(g)); + + MPI_Win_free(&win); + MPI_Win_free(&win2); + +#else + // The ranks accumulate after each step. + rank_map.set_reduce(detail::rank_accumulate_reducer()); + rank_map2.set_reduce(detail::rank_accumulate_reducer()); + rank_map.set_consistency_model(boost::parallel::cm_flush | boost::parallel::cm_reset); + rank_map2.set_consistency_model(boost::parallel::cm_flush | boost::parallel::cm_reset); + + bool to_map_2 = true; + while ((to_map_2 && !done(rank_map, g)) || + (!to_map_2 && !done(rank_map2, g))) { + /** + * PageRank can implemented slightly more efficiently on a + * bidirectional graph than on an incidence graph. However, + * distributed PageRank requires that we have the rank of the + * source vertex available locally, so we force the incidence + * graph implementation, which pushes rank from source to + * target. + */ + typedef incidence_graph_tag category; + if (to_map_2) { + graph::detail::page_rank_step(g, rank_map, rank_map2, damping, + category()); + to_map_2 = false; + } else { + graph::detail::page_rank_step(g, rank_map2, rank_map, damping, + category()); + to_map_2 = true; + } + using boost::graph::parallel::process_group; + synchronize(process_group(g)); + } + + rank_map.reset(); +#endif + + if (!to_map_2) + BGL_FORALL_VERTICES_T(v, g, Graph) put(rank_map, v, get(rank_map2, v)); +} + +template +void +page_rank(const Graph& g, RankMap rank_map, Done done, + typename property_traits::value_type damping, + typename graph_traits::vertices_size_type n, + RankMap2 rank_map2 + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, distributed_graph_tag)) +{ + (page_rank_impl)(g, rank_map, done, damping, n, rank_map2); +} + +template +void +remove_dangling_links(MutableGraph& g + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(MutableGraph, + distributed_graph_tag)) +{ + typename graph_traits::vertices_size_type old_n; + do { + old_n = num_vertices(g); + + typename graph_traits::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; /* in loop */) { + typename graph_traits::vertex_descriptor v = *vi++; + if (out_degree(v, g) == 0) { + clear_vertex(v, g); + remove_vertex(v, g); + } + } + } while (num_vertices(g) < old_n); +} + +} // end namespace distributed + +using distributed::page_rank; +using distributed::remove_dangling_links; + +} } // end namespace boost::graph + +#endif // BOOST_PARALLEL_GRAPH_PAGE_RANK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/queue.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/queue.hpp new file mode 100644 index 0000000000..7e84272ab1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/queue.hpp @@ -0,0 +1,278 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_QUEUE_HPP +#define BOOST_GRAPH_DISTRIBUTED_QUEUE_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include + +namespace boost { namespace graph { namespace distributed { + +/// A unary predicate that always returns "true". +struct always_push +{ + template bool operator()(const T&) const { return true; } +}; + + + +/** A distributed queue adaptor. + * + * Class template @c distributed_queue implements a distributed queue + * across a process group. The distributed queue is an adaptor over an + * existing (local) queue, which must model the @ref Buffer + * concept. Each process stores a distinct copy of the local queue, + * from which it draws or removes elements via the @ref pop and @ref + * top members. + * + * The value type of the local queue must be a model of the @ref + * GlobalDescriptor concept. The @ref push operation of the + * distributed queue passes (via a message) the value to its owning + * processor. Thus, the elements within a particular local queue are + * guaranteed to have the process owning that local queue as an owner. + * + * Synchronization of distributed queues occurs in the @ref empty and + * @ref size functions, which will only return "empty" values (true or + * 0, respectively) when the entire distributed queue is empty. If the + * local queue is empty but the distributed queue is not, the + * operation will block until either condition changes. When the @ref + * size function of a nonempty queue returns, it returns the size of + * the local queue. These semantics were selected so that sequential + * code that processes elements in the queue via the following idiom + * can be parallelized via introduction of a distributed queue: + * + * distributed_queue<...> Q; + * Q.push(x); + * while (!Q.empty()) { + * // do something, that may push a value onto Q + * } + * + * In the parallel version, the initial @ref push operation will place + * the value @c x onto its owner's queue. All processes will + * synchronize at the call to empty, and only the process owning @c x + * will be allowed to execute the loop (@ref Q.empty() returns + * false). This iteration may in turn push values onto other remote + * queues, so when that process finishes execution of the loop body + * and all processes synchronize again in @ref empty, more processes + * may have nonempty local queues to execute. Once all local queues + * are empty, @ref Q.empty() returns @c false for all processes. + * + * The distributed queue can receive messages at two different times: + * during synchronization and when polling @ref empty. Messages are + * always received during synchronization, to ensure that accurate + * local queue sizes can be determines. However, whether @ref empty + * should poll for messages is specified as an option to the + * constructor. Polling may be desired when the order in which + * elements in the queue are processed is not important, because it + * permits fewer synchronization steps and less communication + * overhead. However, when more strict ordering guarantees are + * required, polling may be semantically incorrect. By disabling + * polling, one ensures that parallel execution using the idiom above + * will not process an element at a later "level" before an earlier + * "level". + * + * The distributed queue nearly models the @ref Buffer + * concept. However, the @ref push routine does not necessarily + * increase the result of @c size() by one (although the size of the + * global queue does increase by one). + */ +template +class distributed_queue +{ + typedef distributed_queue self_type; + + enum { + /** Message indicating a remote push. The message contains a + * single value x of type value_type that is to be pushed on the + * receiver's queue. + */ + msg_push, + /** Push many elements at once. */ + msg_multipush + }; + + public: + typedef ProcessGroup process_group_type; + typedef Buffer buffer_type; + typedef typename buffer_type::value_type value_type; + typedef typename buffer_type::size_type size_type; + + /** Construct a new distributed queue. + * + * Build a new distributed queue that communicates over the given @p + * process_group, whose local queue is initialized via @p buffer and + * which may or may not poll for messages. + */ + explicit + distributed_queue(const ProcessGroup& process_group, + const OwnerMap& owner, + const Buffer& buffer, + bool polling = false); + + /** Construct a new distributed queue. + * + * Build a new distributed queue that communicates over the given @p + * process_group, whose local queue is initialized via @p buffer and + * which may or may not poll for messages. + */ + explicit + distributed_queue(const ProcessGroup& process_group = ProcessGroup(), + const OwnerMap& owner = OwnerMap(), + const Buffer& buffer = Buffer(), + const UnaryPredicate& pred = UnaryPredicate(), + bool polling = false); + + /** Construct a new distributed queue. + * + * Build a new distributed queue that communicates over the given @p + * process_group, whose local queue is default-initalized and which + * may or may not poll for messages. + */ + distributed_queue(const ProcessGroup& process_group, const OwnerMap& owner, + const UnaryPredicate& pred, bool polling = false); + + /** Virtual destructor required with virtual functions. + * + */ + virtual ~distributed_queue() {} + + /** Push an element onto the distributed queue. + * + * The element will be sent to its owner process to be added to that + * process's local queue. If polling is enabled for this queue and + * the owner process is the current process, the value will be + * immediately pushed onto the local queue. + * + * Complexity: O(1) messages of size O(sizeof(value_type)) will be + * transmitted. + */ + void push(const value_type& x); + + /** Pop an element off the local queue. + * + * @p @c !empty() + */ + void pop() { buffer.pop(); } + + /** + * Return the element at the top of the local queue. + * + * @p @c !empty() + */ + value_type& top() { return buffer.top(); } + + /** + * \overload + */ + const value_type& top() const { return buffer.top(); } + + /** Determine if the queue is empty. + * + * When the local queue is nonempty, returns @c true. If the local + * queue is empty, synchronizes with all other processes in the + * process group until either (1) the local queue is nonempty + * (returns @c true) (2) the entire distributed queue is empty + * (returns @c false). + */ + bool empty() const; + + /** Determine the size of the local queue. + * + * The behavior of this routine is equivalent to the behavior of + * @ref empty, except that when @ref empty returns true this + * function returns the size of the local queue and when @ref empty + * returns false this function returns zero. + */ + size_type size() const; + + // private: + /** Synchronize the distributed queue and determine if all queues + * are empty. + * + * \returns \c true when all local queues are empty, or false if at least + * one of the local queues is nonempty. + * Defined as virtual for derived classes like depth_limited_distributed_queue. + */ + virtual bool do_synchronize() const; + + private: + // Setup triggers + void setup_triggers(); + + // Message handlers + void + handle_push(int source, int tag, const value_type& value, + trigger_receive_context); + + void + handle_multipush(int source, int tag, const std::vector& values, + trigger_receive_context); + + mutable ProcessGroup process_group; + OwnerMap owner; + mutable Buffer buffer; + UnaryPredicate pred; + bool polling; + + typedef std::vector outgoing_buffer_t; + typedef std::vector outgoing_buffers_t; + shared_ptr outgoing_buffers; +}; + +/// Helper macro containing the normal names for the template +/// parameters to distributed_queue. +#define BOOST_DISTRIBUTED_QUEUE_PARMS \ + typename ProcessGroup, typename OwnerMap, typename Buffer, \ + typename UnaryPredicate + +/// Helper macro containing the normal template-id for +/// distributed_queue. +#define BOOST_DISTRIBUTED_QUEUE_TYPE \ + distributed_queue + +/** Synchronize all processes involved with the given distributed queue. + * + * This function will synchronize all of the local queues for a given + * distributed queue, by ensuring that no additional messages are in + * transit. It is rarely required by the user, because most + * synchronization of distributed queues occurs via the @c empty or @c + * size methods. + */ +template +inline void +synchronize(const BOOST_DISTRIBUTED_QUEUE_TYPE& Q) +{ Q.do_synchronize(); } + +/// Construct a new distributed queue. +template +inline distributed_queue +make_distributed_queue(const ProcessGroup& process_group, + const OwnerMap& owner, + const Buffer& buffer, + bool polling = false) +{ + typedef distributed_queue result_type; + return result_type(process_group, owner, buffer, polling); +} + +} } } // end namespace boost::graph::distributed + +#include + +#undef BOOST_DISTRIBUTED_QUEUE_TYPE +#undef BOOST_DISTRIBUTED_QUEUE_PARMS + +#endif // BOOST_GRAPH_DISTRIBUTED_QUEUE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/reverse_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/reverse_graph.hpp new file mode 100644 index 0000000000..615aab8b91 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/reverse_graph.hpp @@ -0,0 +1,38 @@ +// Copyright (C) 2005-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Nick Edmonds +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_REVERSE_GRAPH_HPP +#define BOOST_GRAPH_DISTRIBUTED_REVERSE_GRAPH_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include + +namespace boost { + namespace graph { + namespace parallel { + /// Retrieve the process group from a reverse graph + template + struct process_group_type > + : process_group_type { }; + } + + } + + /// Retrieve the process group from a reverse graph + template + inline typename graph::parallel::process_group_type::type + process_group(reverse_graph const& g) { + return process_group(g.m_g); + } +} // namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/rmat_graph_generator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/rmat_graph_generator.hpp new file mode 100644 index 0000000000..8b6004339e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/rmat_graph_generator.hpp @@ -0,0 +1,163 @@ +// Copyright 2004, 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Nick Edmonds +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_RMAT_GENERATOR_HPP +#define BOOST_GRAPH_DISTRIBUTED_RMAT_GENERATOR_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include + +namespace boost { + + // Memory-scalable (amount of memory required will scale down + // linearly as the number of processes increases) generator, which + // requires an MPI process group. Run-time is slightly worse than + // the unique rmat generator. Edge list generated is sorted and + // unique. + template + class scalable_rmat_iterator + { + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + + public: + typedef std::input_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef void difference_type; + + // No argument constructor, set to terminating condition + scalable_rmat_iterator() + : gen(), done(true) + { } + + // Initialize for edge generation + scalable_rmat_iterator(ProcessGroup pg, Distribution distrib, + RandomGenerator& gen, vertices_size_type n, + edges_size_type m, double a, double b, double c, + double d, bool permute_vertices = true) + : gen(), done(false) + { + assert(a + b + c + d == 1); + int id = process_id(pg); + + this->gen.reset(new uniform_01(gen)); + + std::vector vertexPermutation; + if (permute_vertices) + generate_permutation_vector(gen, vertexPermutation, n); + + int SCALE = int(floor(log(double(n))/log(2.))); + boost::uniform_01 prob(gen); + + std::map edge_map; + + edges_size_type generated = 0, local_edges = 0; + do { + edges_size_type tossed = 0; + do { + vertices_size_type u, v; + boost::tie(u, v) = generate_edge(this->gen, n, SCALE, a, b, c, d); + + if (permute_vertices) { + u = vertexPermutation[u]; + v = vertexPermutation[v]; + } + + // Lowest vertex number always comes first (this + // means we don't have to worry about i->j and j->i + // being in the edge list) + if (u > v && is_same::value) + std::swap(u, v); + + if (distrib(u) == id || distrib(v) == id) { + if (edge_map.find(std::make_pair(u, v)) == edge_map.end()) { + edge_map[std::make_pair(u, v)] = true; + local_edges++; + } else { + tossed++; + + // special case - if both u and v are on same + // proc, ++ twice, since we divide by two (to + // cover the two process case) + if (distrib(u) == id && distrib(v) == id) + tossed++; + } + } + generated++; + + } while (generated < m); + tossed = all_reduce(pg, tossed, boost::parallel::sum()); + generated -= (tossed / 2); + } while (generated < m); + // NGE - Asking for more than n^2 edges will result in an infinite loop here + // Asking for a value too close to n^2 edges may as well + + values.reserve(local_edges); + typename std::map::reverse_iterator em_end = edge_map.rend(); + for (typename std::map::reverse_iterator em_i = edge_map.rbegin(); + em_i != em_end ; + ++em_i) { + values.push_back(em_i->first); + } + + current = values.back(); + values.pop_back(); + } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + scalable_rmat_iterator& operator++() + { + if (!values.empty()) { + current = values.back(); + values.pop_back(); + } else + done = true; + + return *this; + } + + scalable_rmat_iterator operator++(int) + { + scalable_rmat_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const scalable_rmat_iterator& other) const + { + return values.empty() && other.values.empty() && done && other.done; + } + + bool operator!=(const scalable_rmat_iterator& other) const + { return !(*this == other); } + + private: + + // Parameters + shared_ptr > gen; + + // Internal data structures + std::vector values; + value_type current; + bool done; + }; + +} // end namespace boost + +#endif // BOOST_GRAPH_DISTRIBUTED_RMAT_GENERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/selector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/selector.hpp new file mode 100644 index 0000000000..2e26c16901 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/selector.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_SELECTOR_HPP +#define BOOST_GRAPH_DISTRIBUTED_SELECTOR_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +namespace boost { + + /* The default local selector for a distributedS selector. */ + struct defaultS {}; + + /** + * Selector that specifies that the graph should be distributed + * among different processes organized based on the given process + * group. + */ + template + struct distributedS + { + typedef ProcessGroup process_group_type; + typedef LocalS local_selector; + typedef DistributionS distribution; + }; +} + +#endif // BOOST_GRAPH_DISTRIBUTED_SELECTOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/shuffled_distribution.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/shuffled_distribution.hpp new file mode 100644 index 0000000000..92bc0397f2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/shuffled_distribution.hpp @@ -0,0 +1,113 @@ +// Copyright Daniel Wallin 2007. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_SHUFFLED_DISTRIBUTION_070923_HPP +#define BOOST_SHUFFLED_DISTRIBUTION_070923_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +# include +# include + +namespace boost { namespace graph { namespace distributed { + +template +struct shuffled_distribution : BaseDistribution +{ + typedef std::size_t size_type; + + template + shuffled_distribution(ProcessGroup const& pg, BaseDistribution const& base) + : BaseDistribution(base) + , n(num_processes(pg)) + , mapping_(make_counting_iterator(size_type(0)), make_counting_iterator(n)) + , reverse_mapping(mapping_) + {} + + std::vector const& mapping() const + { + return mapping_; + } + + template + void assign_mapping(InputIterator first, InputIterator last) + { + mapping_.assign(first, last); + assert(mapping_.size() == n); + reverse_mapping.resize(mapping_.size()); + + for (std::vector::iterator i(mapping_.begin()); + i != mapping_.end(); ++i) + { + reverse_mapping[*i] = i - mapping_.begin(); + } + } + + BaseDistribution& base() + { + return *this; + } + + BaseDistribution const& base() const + { + return *this; + } + + template + size_type block_size(ProcessID id, size_type n) const + { + return base().block_size(reverse_mapping[id], n); + } + + template + size_type operator()(T const& value) const + { + return mapping_[base()(value)]; + } + + template + size_type start(ProcessID id) const + { + return base().start(reverse_mapping[id]); + } + + size_type local(size_type i) const + { + return base().local(i); + } + + size_type global(size_type i) const + { + return base().global(i); + } + + template + size_type global(ProcessID id, size_type n) const + { + return base().global(reverse_mapping[id], n); + } + + template + void serialize(Archive& ar, unsigned long /*version*/) + { + ar & serialization::make_nvp("base", base()); + } + + void clear() + { + base().clear(); + } + +private: + size_type n; + std::vector mapping_; + std::vector reverse_mapping; +}; + +}}} // namespace boost::graph::distributed + +#endif // BOOST_SHUFFLED_DISTRIBUTION_070923_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/st_connected.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/st_connected.hpp new file mode 100644 index 0000000000..b007442615 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/st_connected.hpp @@ -0,0 +1,186 @@ +// Copyright (C) 2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP +#define BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace graph { namespace distributed { + +namespace detail { + struct pair_and_or + { + std::pair + operator()(std::pair x, std::pair y) const + { + return std::pair(x.first && y.first, + x.second || y.second); + } + }; + +} // end namespace detail + +template +bool +st_connected(const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t, + ColorMap color, OwnerMap owner) +{ + using boost::graph::parallel::process_group; + using boost::graph::parallel::process_group_type; + using boost::parallel::all_reduce; + + typedef typename property_traits::value_type Color; + typedef color_traits ColorTraits; + typedef typename process_group_type::type ProcessGroup; + typedef typename ProcessGroup::process_id_type ProcessID; + typedef typename graph_traits::vertex_descriptor Vertex; + + // Set all vertices to white (unvisited) + BGL_FORALL_VERTICES_T(v, g, DistributedGraph) + put(color, v, ColorTraits::white()); + + // "color" plays the role of a color map, with no synchronization. + set_property_map_role(vertex_color, color); + color.set_consistency_model(0); + + // Vertices found from the source are grey + put(color, s, ColorTraits::gray()); + + // Vertices found from the target are green + put(color, t, ColorTraits::green()); + + ProcessGroup pg = process_group(g); + ProcessID rank = process_id(pg); + + // Build a local queue + queue Q; + if (get(owner, s) == rank) Q.push(s); + if (get(owner, t) == rank) Q.push(t); + + queue other_Q; + + while (true) { + bool found = false; + + // Process all vertices in the local queue + while (!found && !Q.empty()) { + Vertex u = Q.top(); Q.pop(); + Color u_color = get(color, u); + + BGL_FORALL_OUTEDGES_T(u, e, g, DistributedGraph) { + Vertex v = target(e, g); + Color v_color = get(color, v); + if (v_color == ColorTraits::white()) { + // We have not seen "v" before; mark it with the same color as u + Color u_color = get(color, u); + put(color, v, u_color); + + // Either push v into the local queue or send it off to its + // owner. + ProcessID v_owner = get(owner, v); + if (v_owner == rank) + other_Q.push(v); + else + send(pg, v_owner, 0, + std::make_pair(v, u_color == ColorTraits::gray())); + } else if (v_color != ColorTraits::black() && u_color != v_color) { + // Colors have collided. We're done! + found = true; + break; + } + } + + // u is done, so mark it black + put(color, u, ColorTraits::black()); + } + + // Ensure that all transmitted messages have been received. + synchronize(pg); + + // Move all of the send-to-self values into the local Q. + other_Q.swap(Q); + + if (!found) { + // Receive all messages + while (optional > msg = probe(pg)) { + std::pair data; + receive(pg, msg->first, msg->second, data); + + // Determine the colors of u and v, the source and target + // vertices (v is local). + Vertex v = data.first; + Color v_color = get(color, v); + Color u_color = data.second? ColorTraits::gray() : ColorTraits::green(); + if (v_color == ColorTraits::white()) { + // v had no color before, so give it u's color and push it + // into the queue. + Q.push(v); + put(color, v, u_color); + } else if (v_color != ColorTraits::black() && u_color != v_color) { + // Colors have collided. We're done! + found = true; + break; + } + } + } + + // Check if either all queues are empty or + std::pair results = all_reduce(pg, + boost::parallel::detail::make_untracked_pair(Q.empty(), found), + detail::pair_and_or()); + + // If someone found the answer, we're done! + if (results.second) + return true; + + // If all queues are empty, we're done. + if (results.first) + return false; + } +} + +template +inline bool +st_connected(const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t, + ColorMap color) +{ + return st_connected(g, s, t, color, get(vertex_owner, g)); +} + +template +inline bool +st_connected(const DistributedGraph& g, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t) +{ + return st_connected(g, s, t, + make_two_bit_color_map(num_vertices(g), + get(vertex_index, g))); +} + +} } } // end namespace boost::graph::distributed + +#endif // BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/strong_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/strong_components.hpp new file mode 100644 index 0000000000..d7de8b472f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/strong_components.hpp @@ -0,0 +1,987 @@ +// Copyright (C) 2004-2008 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Nick Edmonds +// Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_SCC_HPP +#define BOOST_GRAPH_DISTRIBUTED_SCC_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +// #define PBGL_SCC_DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef PBGL_SCC_DEBUG + #include + #include + #include + #include + #include // for ostringstream +#endif +#include +#include +#include + +#ifdef PBGL_SCC_DEBUG +# include +#endif /* PBGL_SCC_DEBUG */ + +// If your graph is likely to have large numbers of small strongly connected +// components then running the sequential SCC algorithm on the local subgraph +// and filtering components with no remote edges may increase performance +// #define FILTER_LOCAL_COMPONENTS + +namespace boost { namespace graph { namespace distributed { namespace detail { + +template +struct v_sets{ + std::vector pred, succ, intersect, ps_union; +}; + +/* Serialize vertex set */ +template +void +marshal_set( std::vector::vertex_descriptor> > in, + std::vector::vertex_descriptor>& out ) +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + for( std::size_t i = 0; i < in.size(); ++i ) { + out.insert( out.end(), graph_traits::null_vertex() ); + out.insert( out.end(), in[i].begin(), in[i].end() ); + } +} + +/* Un-serialize vertex set */ +template +void +unmarshal_set( std::vector::vertex_descriptor> in, + std::vector::vertex_descriptor> >& out ) +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertex_iterator vertex_iterator; + + while( !in.empty() ) { + typename std::vector::iterator end + = std::find( in.begin(), in.end(), graph_traits::null_vertex() ); + + if( end == in.begin() ) + in.erase( in.begin() ); + else { + out.push_back(std::vector()); + out[out.size() - 1].insert( out[out.size() - 1].end(), in.begin(), end ); + in.erase( in.begin(), end ); + } + } +} + +/* Determine if vertex is in subset */ +template +struct in_subset { + in_subset() : m_s(0) { } + in_subset(const Set& s) : m_s(&s) { } + + template + bool operator()(const Elt& x) const { + return ((*m_s).find(x) != (*m_s).end()); + } + +private: + const Set* m_s; +}; + +template +struct vertex_identity_property_map + : public boost::put_get_helper > +{ + typedef T key_type; + typedef T value_type; + typedef T reference; + typedef boost::readable_property_map_tag category; + + inline value_type operator[](const key_type& v) const { return v; } + inline void clear() { } +}; + +template +inline void synchronize( vertex_identity_property_map & ) { } + +/* BFS visitor for SCC */ +template +struct scc_discovery_visitor : bfs_visitor<> +{ + scc_discovery_visitor(SourceMap& sourceM) + : sourceM(sourceM) {} + + template + void tree_edge(Edge e, const Graph& g) + { + put(sourceM, target(e,g), get(sourceM, source(e,g))); + } + + private: + SourceMap& sourceM; +}; + +} } } } /* End namespace boost::graph::distributed::detail */ + +namespace boost { namespace graph { namespace distributed { + enum fhp_message_tags { fhp_edges_size_msg, fhp_add_edges_msg, fhp_pred_size_msg, + fhp_pred_msg, fhp_succ_size_msg, fhp_succ_msg }; + + template + void + fleischer_hendrickson_pinar_strong_components(const Graph& g, + VertexComponentMap c, + const ReverseGraph& gr, + IsoMapFR fr, IsoMapRF rf, + VertexIndexMap vertex_index_map) + { + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertex_iterator rev_vertex_iterator; + typedef typename graph_traits::vertex_descriptor rev_vertex_descriptor; + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + typedef iterator_property_map::iterator, + VertexIndexMap> ParentMap; + typedef iterator_property_map::iterator, + VertexIndexMap> ColorMap; + typedef iterator_property_map::iterator, + VertexIndexMap> Rev_ParentMap; + typedef std::vector > VertexPairVec; + + typedef typename property_map::const_type + OwnerMap; + + OwnerMap owner = get(vertex_owner, g); + + using boost::graph::parallel::process_group; + process_group_type pg = process_group(g); + process_id_type id = process_id(pg); + int num_procs = num_processes(pg); + int n = 0; + + int my_n = num_vertices(g); + all_reduce(pg, &my_n, &my_n+1, &n, std::plus()); + + // + // Initialization + // + +#ifdef PBGL_SCC_DEBUG + accounting::time_type start = accounting::get_time(); +#endif + + vertex_iterator vstart, vend; + rev_vertex_iterator rev_vstart, rev_vend; + std::vector > vertex_sets, new_vertex_sets; + + vertex_sets.push_back(std::vector()); + + // Remove vertices that do not have at least one in edge and one out edge + new_vertex_sets.push_back(std::vector()); + for( boost::tie(vstart, vend) = vertices(g); vstart != vend; vstart++ ) + if( out_degree( get(fr, *vstart), gr) > 0 && out_degree(*vstart, g) > 0 ) + new_vertex_sets[0].push_back( *vstart ); + + // Perform sequential SCC on local subgraph, filter all components with external + // edges, mark remaining components and remove them from vertex_sets +#ifdef FILTER_LOCAL_COMPONENTS + // This doesn't actually speed up SCC in connected graphs it seems, but it does work + // and may help in the case where there are lots of small strong components. + { + local_subgraph ls(g); + typedef typename property_map, vertex_index_t>::type + local_index_map_type; + local_index_map_type local_index = get(vertex_index, ls); + + std::vector ls_components_vec(num_vertices(ls)); + typedef iterator_property_map::iterator, local_index_map_type> + ls_components_map_type; + ls_components_map_type ls_component(ls_components_vec.begin(), local_index); + int num_comp = boost::strong_components(ls, ls_component); + + // Create map of components + std::map > local_comp_map; + typedef typename graph_traits >::vertex_iterator ls_vertex_iterator; + ls_vertex_iterator vstart, vend; + for( boost::tie(vstart,vend) = vertices(ls); vstart != vend; vstart++ ) + local_comp_map[get(ls_component, *vstart)].push_back( *vstart ); + + // Filter components that have no non-local edges + typedef typename graph_traits::adjacency_iterator adjacency_iterator; + typedef typename graph_traits::adjacency_iterator rev_adjacency_iterator; + adjacency_iterator abegin, aend; + rev_adjacency_iterator rev_abegin, rev_aend; + for( std::size_t i = 0; i < num_comp; ++i ) { + bool local = true; + for( std::size_t j = 0; j < local_comp_map[i].size(); j++ ) { + for( boost::tie(abegin,aend) = adjacent_vertices(local_comp_map[i][j], g); + abegin != aend; abegin++ ) + if( get(owner, *abegin) != id ) { + local = false; + break; + } + + if( local ) + for( boost::tie(rev_abegin,rev_aend) = adjacent_vertices(get(fr, local_comp_map[i][j]), gr); + rev_abegin != rev_aend; rev_abegin++ ) + if( get(owner, *rev_abegin) != id ) { + local = false; + break; + } + + if( !local ) break; + } + + if( local ) // Mark and remove from new_vertex_sets + for( std::size_t j = 0; j < local_comp_map[i].size(); j++ ) { + put( c, local_comp_map[i][j], local_comp_map[i][0] ); + typename std::vector::iterator pos = + std::find(new_vertex_sets[0].begin(), new_vertex_sets[0].end(), local_comp_map[i][j]); + if( pos != new_vertex_sets[0].end() ) + new_vertex_sets[0].erase(pos); + } + } + } +#endif // FILTER_LOCAL_COMPONENTS + + all_gather( pg, new_vertex_sets[0].begin(), new_vertex_sets[0].end(), vertex_sets[0] ); + new_vertex_sets.clear(); + +#ifdef PBGL_SCC_DEBUG + accounting::time_type end = accounting::get_time(); + if(id == 0) + std::cerr << "Trim local SCCs time = " << accounting::print_time(end - start) << " seconds.\n"; +#endif + + if( vertex_sets[0].empty() ) return; + + // + // Recursively determine SCCs + // + +#ifdef PBGL_SCC_DEBUG + int iterations = 0; +#endif + + // Only need to be able to map starting vertices for BFS from now on + fr.clear(); + + do { + +#ifdef PBGL_SCC_DEBUG + if(id == 0) { + printf("\n\nIteration %d:\n\n", iterations++); + + if( iterations > 1 ) { + end = accounting::get_time(); + std::cerr << "Running main loop destructors time = " << accounting::print_time(end - start) << " seconds.\n"; + } + + start = accounting::get_time(); + } +#endif + + // Get forward->reverse mappings for BFS start vertices + for (std::size_t i = 0; i < vertex_sets.size(); ++i) + get(fr, vertex_sets[i][0]); + synchronize(fr); + + // Determine local vertices to start BFS from + std::vector local_start; + for( std::size_t i = id; i < vertex_sets.size(); i += num_procs ) + local_start.push_back(vertex_sets[i][0]); + + if( local_start.empty() ) + local_start.push_back(vertex_sets[0][0]); + + + // Make filtered graphs + typedef std::set VertexSet; + typedef std::set Rev_VertexSet; + + VertexSet filter_set_g; + Rev_VertexSet filter_set_gr; + typename VertexSet::iterator fs; + + int active_vertices = 0; + for (std::size_t i = 0; i < vertex_sets.size(); i++) + active_vertices += vertex_sets[i].size(); + + // This is a completely random bound + if ( active_vertices < 0.05*n ) { + // TODO: This set insertion is ridiculously inefficient, make it an in-place-merge? + for (std::size_t i = 0; i < vertex_sets.size(); i++) + filter_set_g.insert(vertex_sets[i].begin(), vertex_sets[i].end()); + + for (fs = filter_set_g.begin(); fs != filter_set_g.end(); ++fs ) + filter_set_gr.insert(get(fr, *fs)); + } + + filtered_graph > + fg(g, keep_all(), detail::in_subset(filter_set_g)); + + filtered_graph > + fgr(gr, keep_all(), detail::in_subset(filter_set_gr)); + + // Add additional starting vertices to BFS queue + typedef filtered_queue, boost::detail::has_not_been_seen > + local_queue_type; + typedef boost::graph::distributed::distributed_queue + queue_t; + + typedef typename property_map::const_type + RevOwnerMap; + + typedef filtered_queue, boost::detail::has_not_been_seen > + rev_local_queue_type; + typedef boost::graph::distributed::distributed_queue + rev_queue_t; + + queue_t Q(process_group(g), + owner, + make_filtered_queue(queue(), + boost::detail::has_not_been_seen + (num_vertices(g), vertex_index_map)), + false); + + rev_queue_t Qr(process_group(gr), + get(vertex_owner, gr), + make_filtered_queue(queue(), + boost::detail::has_not_been_seen + (num_vertices(gr), vertex_index_map)), + false); + + for( std::size_t i = 1; i < local_start.size(); ++i ) { + Q.push(local_start[i]); + Qr.push(get(fr, local_start[i])); + } + +#ifdef PBGL_SCC_DEBUG + end = accounting::get_time(); + if(id == 0) + std::cerr << " Initialize BFS time = " << accounting::print_time(end - start) << " seconds.\n"; + start = accounting::get_time(); +#endif + +#ifdef PBGL_SCC_DEBUG + accounting::time_type start2 = accounting::get_time(); +#endif + + // Forward BFS + std::vector color_map_s(num_vertices(g)); + ColorMap color_map(color_map_s.begin(), vertex_index_map); + std::vector succ_map_s(num_vertices(g), graph_traits::null_vertex()); + ParentMap succ_map(succ_map_s.begin(), vertex_index_map); + + for( std::size_t i = 0; i < vertex_sets.size(); ++i ) + put(succ_map, vertex_sets[i][0], vertex_sets[i][0]); + +#ifdef PBGL_SCC_DEBUG + accounting::time_type end2 = accounting::get_time(); + if(id == 0) + std::cerr << " Initialize forward BFS time = " << accounting::print_time(end2 - start2) << " seconds.\n"; +#endif + + if (active_vertices < 0.05*n) + breadth_first_search(fg, local_start[0], Q, + detail::scc_discovery_visitor >, ParentMap> + (succ_map), + color_map); + else + breadth_first_search(g, local_start[0], Q, + detail::scc_discovery_visitor(succ_map), + color_map); + +#ifdef PBGL_SCC_DEBUG + start2 = accounting::get_time(); +#endif + + // Reverse BFS + color_map.clear(); // reuse color map since g and gr have same vertex index + std::vector pred_map_s(num_vertices(gr), graph_traits::null_vertex()); + Rev_ParentMap pred_map(pred_map_s.begin(), vertex_index_map); + + for( std::size_t i = 0; i < vertex_sets.size(); ++i ) + put(pred_map, get(fr, vertex_sets[i][0]), vertex_sets[i][0]); + +#ifdef PBGL_SCC_DEBUG + end2 = accounting::get_time(); + if(id == 0) + std::cerr << " Initialize reverse BFS time = " << accounting::print_time(end2 - start2) << " seconds.\n"; +#endif + + if (active_vertices < 0.05*n) + breadth_first_search(fgr, get(fr, local_start[0]), + Qr, + detail::scc_discovery_visitor >, Rev_ParentMap> + (pred_map), + color_map); + else + breadth_first_search(gr, get(fr, local_start[0]), + Qr, + detail::scc_discovery_visitor(pred_map), + color_map); + +#ifdef PBGL_SCC_DEBUG + end = accounting::get_time(); + if(id == 0) + std::cerr << " Perform forward and reverse BFS time = " << accounting::print_time(end - start) << " seconds.\n"; + start = accounting::get_time(); +#endif + + // Send predecessors and successors discovered by this proc to the proc responsible for + // this BFS tree + typedef struct detail::v_sets Vsets; + std::map set_map; + + std::map dest_map; + + std::vector successors(num_procs); + std::vector predecessors(num_procs); + + // Calculate destinations for messages + for (std::size_t i = 0; i < vertex_sets.size(); ++i) + dest_map[vertex_sets[i][0]] = i % num_procs; + + for( boost::tie(vstart, vend) = vertices(g); vstart != vend; vstart++ ) { + vertex_descriptor v = get(succ_map, *vstart); + if( v != graph_traits::null_vertex() ) { + if (dest_map[v] == id) + set_map[v].succ.push_back(*vstart); + else + successors[dest_map[v]].push_back( std::make_pair(v, *vstart) ); + } + } + + for( boost::tie(rev_vstart, rev_vend) = vertices(gr); rev_vstart != rev_vend; rev_vstart++ ) { + vertex_descriptor v = get(pred_map, *rev_vstart); + if( v != graph_traits::null_vertex() ) { + if (dest_map[v] == id) + set_map[v].pred.push_back(get(rf, *rev_vstart)); + else + predecessors[dest_map[v]].push_back( std::make_pair(v, get(rf, *rev_vstart)) ); + } + } + + // Send predecessor and successor messages + for (process_id_type i = 0; i < num_procs; ++i) { + if (!successors[i].empty()) { + send(pg, i, fhp_succ_size_msg, successors[i].size()); + send(pg, i, fhp_succ_msg, &successors[i][0], successors[i].size()); + } + if (!predecessors[i].empty()) { + send(pg, i, fhp_pred_size_msg, predecessors[i].size()); + send(pg, i, fhp_pred_msg, &predecessors[i][0], predecessors[i].size()); + } + } + synchronize(pg); + + // Receive predecessor and successor messages and handle them + while (optional > m = probe(pg)) { + assert(m->second == fhp_succ_size_msg || m->second == fhp_pred_size_msg); + std::size_t num_requests; + receive(pg, m->first, m->second, num_requests); + VertexPairVec requests(num_requests); + if (m->second == fhp_succ_size_msg) { + receive(pg, m->first, fhp_succ_msg, &requests[0], + num_requests); + + std::map added; + for (std::size_t i = 0; i < requests.size(); ++i) { + set_map[requests[i].first].succ.push_back(requests[i].second); + added[requests[i].first]++; + } + + // If order of vertex traversal in vertices() is std::less, + // then the successor sets will be in order + for (std::size_t i = 0; i < local_start.size(); ++i) + if (added[local_start[i]] > 0) + std::inplace_merge(set_map[local_start[i]].succ.begin(), + set_map[local_start[i]].succ.end() - added[local_start[i]], + set_map[local_start[i]].succ.end(), + std::less()); + + } else { + receive(pg, m->first, fhp_pred_msg, &requests[0], + num_requests); + + std::map added; + for (std::size_t i = 0; i < requests.size(); ++i) { + set_map[requests[i].first].pred.push_back(requests[i].second); + added[requests[i].first]++; + } + + if (boost::is_same, IsoMapRF>::value) + for (std::size_t i = 0; i < local_start.size(); ++i) + if (added[local_start[i]] > 0) + std::inplace_merge(set_map[local_start[i]].pred.begin(), + set_map[local_start[i]].pred.end() - added[local_start[i]], + set_map[local_start[i]].pred.end(), + std::less()); + } + } + +#ifdef PBGL_SCC_DEBUG + end = accounting::get_time(); + if(id == 0) + std::cerr << " All gather successors and predecessors time = " << accounting::print_time(end - start) << " seconds.\n"; + start = accounting::get_time(); +#endif + + // + // Filter predecessor and successor sets and perform set arithmetic + // + new_vertex_sets.clear(); + + if( std::size_t(id) < vertex_sets.size() ) { //If this proc has one or more unique starting points + + for( std::size_t i = 0; i < local_start.size(); ++i ) { + + vertex_descriptor v = local_start[i]; + + // Replace this sort with an in-place merges during receive step if possible + if (!boost::is_same, IsoMapRF>::value) + std::sort(set_map[v].pred.begin(), set_map[v].pred.end(), std::less()); + + // Limit predecessor and successor sets to members of the original set + std::vector temp; + + std::set_intersection( vertex_sets[id + i*num_procs].begin(), vertex_sets[id + i*num_procs].end(), + set_map[v].pred.begin(), set_map[v].pred.end(), + back_inserter(temp), + std::less()); + set_map[v].pred.clear(); + std::swap(set_map[v].pred, temp); + + std::set_intersection( vertex_sets[id + i*num_procs].begin(), vertex_sets[id + i*num_procs].end(), + set_map[v].succ.begin(), set_map[v].succ.end(), + back_inserter(temp), + std::less()); + set_map[v].succ.clear(); + std::swap(set_map[v].succ, temp); + + // Intersection(pred, succ) + std::set_intersection(set_map[v].pred.begin(), set_map[v].pred.end(), + set_map[v].succ.begin(), set_map[v].succ.end(), + back_inserter(set_map[v].intersect), + std::less()); + + // Union(pred, succ) + std::set_union(set_map[v].pred.begin(), set_map[v].pred.end(), + set_map[v].succ.begin(), set_map[v].succ.end(), + back_inserter(set_map[v].ps_union), + std::less()); + + new_vertex_sets.push_back(std::vector()); + // Original set - Union(pred, succ) + std::set_difference(vertex_sets[id + i*num_procs].begin(), vertex_sets[id + i*num_procs].end(), + set_map[v].ps_union.begin(), set_map[v].ps_union.end(), + back_inserter(new_vertex_sets[new_vertex_sets.size() - 1]), + std::less()); + + set_map[v].ps_union.clear(); + + new_vertex_sets.push_back(std::vector()); + // Pred - Intersect(pred, succ) + std::set_difference(set_map[v].pred.begin(), set_map[v].pred.end(), + set_map[v].intersect.begin(), set_map[v].intersect.end(), + back_inserter(new_vertex_sets[new_vertex_sets.size() - 1]), + std::less()); + + set_map[v].pred.clear(); + + new_vertex_sets.push_back(std::vector()); + // Succ - Intersect(pred, succ) + std::set_difference(set_map[v].succ.begin(), set_map[v].succ.end(), + set_map[v].intersect.begin(), set_map[v].intersect.end(), + back_inserter(new_vertex_sets[new_vertex_sets.size() - 1]), + std::less()); + + set_map[v].succ.clear(); + + // Label SCC just identified with the 'first' vertex in that SCC + for( std::size_t j = 0; j < set_map[v].intersect.size(); j++ ) + put(c, set_map[v].intersect[j], set_map[v].intersect[0]); + + set_map[v].intersect.clear(); + } + } + +#ifdef PBGL_SCC_DEBUG + end = accounting::get_time(); + if(id == 0) + std::cerr << " Perform set arithemetic time = " << accounting::print_time(end - start) << " seconds.\n"; + start = accounting::get_time(); +#endif + + // Remove sets of size 1 from new_vertex_sets + typename std::vector >::iterator vviter; + for( vviter = new_vertex_sets.begin(); vviter != new_vertex_sets.end(); /*in loop*/ ) + if( (*vviter).size() < 2 ) + vviter = new_vertex_sets.erase( vviter ); + else + vviter++; + + // All gather new sets and recur (gotta marshal and unmarshal sets first) + vertex_sets.clear(); + std::vector serial_sets, all_serial_sets; + detail::marshal_set( new_vertex_sets, serial_sets ); + all_gather( pg, serial_sets.begin(), serial_sets.end(), all_serial_sets ); + detail::unmarshal_set( all_serial_sets, vertex_sets ); + +#ifdef PBGL_SCC_DEBUG + end = accounting::get_time(); + if(id == 0) { + std::cerr << " Serialize and gather new vertex sets time = " << accounting::print_time(end - start) << " seconds.\n\n\n"; + + printf("Vertex sets: %d\n", (int)vertex_sets.size() ); + for( std::size_t i = 0; i < vertex_sets.size(); ++i ) + printf(" %d: %d\n", i, (int)vertex_sets[i].size() ); + } + start = accounting::get_time(); +#endif + + // HACK!?! -- This would be more properly implemented as a topological sort + // Remove vertices without an edge to another vertex in the set and an edge from another + // vertex in the set + typedef typename graph_traits::out_edge_iterator out_edge_iterator; + out_edge_iterator estart, eend; + typedef typename graph_traits::out_edge_iterator r_out_edge_iterator; + r_out_edge_iterator restart, reend; + for (std::size_t i = 0; i < vertex_sets.size(); ++i) { + std::vector new_set; + for (std::size_t j = 0; j < vertex_sets[i].size(); ++j) { + vertex_descriptor v = vertex_sets[i][j]; + if (get(owner, v) == id) { + boost::tie(estart, eend) = out_edges(v, g); + while (estart != eend && find(vertex_sets[i].begin(), vertex_sets[i].end(), + target(*estart,g)) == vertex_sets[i].end()) estart++; + if (estart != eend) { + boost::tie(restart, reend) = out_edges(get(fr, v), gr); + while (restart != reend && find(vertex_sets[i].begin(), vertex_sets[i].end(), + get(rf, target(*restart,g))) == vertex_sets[i].end()) restart++; + if (restart != reend) + new_set.push_back(v); + } + } + } + vertex_sets[i].clear(); + all_gather(pg, new_set.begin(), new_set.end(), vertex_sets[i]); + std::sort(vertex_sets[i].begin(), vertex_sets[i].end(), std::less()); + } +#ifdef PBGL_SCC_DEBUG + end = accounting::get_time(); + if(id == 0) + std::cerr << " Trim vertex sets time = " << accounting::print_time(end - start) << " seconds.\n\n\n"; + start = accounting::get_time(); +#endif + + } while ( !vertex_sets.empty() ); + + + // Label vertices not in a SCC as their own SCC + for( boost::tie(vstart, vend) = vertices(g); vstart != vend; vstart++ ) + if( get(c, *vstart) == graph_traits::null_vertex() ) + put(c, *vstart, *vstart); + + synchronize(c); + } + + template + void + build_reverse_graph( const Graph& g, ReverseGraph& gr, IsoMap& fr, IsoMap& rf ) + { + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::out_edge_iterator out_edge_iterator; + typedef typename boost::graph::parallel::process_group_type::type process_group_type; + typedef typename process_group_type::process_id_type process_id_type; + typedef std::vector > VertexPairVec; + + typedef typename graph_traits::directed_category directed_category; + + typename property_map::const_type + owner = get(vertex_owner, g); + + process_group_type pg = process_group(g); + process_id_type id = process_id(pg); + + int n; + vertex_iterator vstart, vend; + int num_procs = num_processes(pg); + + vertex_descriptor v; + out_edge_iterator oestart, oeend; + for( boost::tie(vstart, vend) = vertices(g); vstart != vend; vstart++ ) + { + v = add_vertex(gr); + put(fr, *vstart, v); + put(rf, v, *vstart); + } + + gr.distribution() = g.distribution(); + + int my_n = num_vertices(g); + all_reduce(pg, &my_n, &my_n+1, &n, std::plus()); + + for (int i = 0; i < n; ++i) + get(fr, vertex(i,g)); + synchronize(fr); + + // Add edges to gr + std::vector > new_edges; + for( boost::tie(vstart, vend) = vertices(g); vstart != vend; vstart++ ) + for( boost::tie(oestart, oeend) = out_edges(*vstart, g); oestart != oeend; oestart++ ) + new_edges.push_back( std::make_pair(get(fr, target(*oestart,g)), get(fr, source(*oestart, g))) ); + + std::vector edge_requests(num_procs); + + typename std::vector >::iterator iter; + for( iter = new_edges.begin(); iter != new_edges.end(); iter++ ) { + std::pair p1 = *iter; + if( get(owner, p1.first ) == id ) + add_edge( p1.first, p1.second, gr ); + else + edge_requests[get(owner, p1.first)].push_back(p1); + } + new_edges.clear(); + + // Send edge addition requests + for (process_id_type p = 0; p < num_procs; ++p) { + if (!edge_requests[p].empty()) { + VertexPairVec reqs(edge_requests[p].begin(), edge_requests[p].end()); + send(pg, p, fhp_edges_size_msg, reqs.size()); + send(pg, p, fhp_add_edges_msg, &reqs[0], reqs.size()); + } + } + synchronize(pg); + + // Receive edge addition requests and handle them + while (optional > m = probe(pg)) { + assert(m->second == fhp_edges_size_msg); + std::size_t num_requests; + receive(pg, m->first, m->second, num_requests); + VertexPairVec requests(num_requests); + receive(pg, m->first, fhp_add_edges_msg, &requests[0], + num_requests); + for( std::size_t i = 0; i < requests.size(); ++i ) + add_edge( requests[i].first, requests[i].second, gr ); + } + synchronize(gr); + } + + template + typename property_traits::value_type + number_components(const Graph& g, VertexComponentMap r, ComponentMap c) + { + typedef typename boost::graph::parallel::process_group_type::type process_group_type; + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename property_traits::value_type ComponentMapType; + std::vector my_roots, all_roots; + vertex_iterator vstart, vend; + + for( boost::tie(vstart, vend) = vertices(g); vstart != vend; vstart++ ) + if( find( my_roots.begin(), my_roots.end(), get(r, *vstart) ) == my_roots.end() ) + my_roots.push_back( get(r, *vstart) ); + + all_gather( process_group(g), my_roots.begin(), my_roots.end(), all_roots ); + + /* Number components */ + std::map comp_numbers; + ComponentMapType c_num = 0; + + // Compute component numbers + for (std::size_t i = 0; i < all_roots.size(); ++i ) + if ( comp_numbers.count(all_roots[i]) == 0 ) + comp_numbers[all_roots[i]] = c_num++; + + // Broadcast component numbers + for( boost::tie(vstart, vend) = vertices(g); vstart != vend; vstart++ ) + put( c, *vstart, comp_numbers[get(r,*vstart)] ); + + // Broadcast number of components + if (process_id(process_group(g)) == 0) { + typedef typename process_group_type::process_size_type + process_size_type; + for (process_size_type dest = 1, n = num_processes(process_group(g)); + dest != n; ++dest) + send(process_group(g), dest, 0, c_num); + } + + synchronize(process_group(g)); + + if (process_id(process_group(g)) != 0) receive(process_group(g), 0, 0, c_num); + + synchronize(c); + return c_num; + } + + + template + typename property_traits::value_type + fleischer_hendrickson_pinar_strong_components_impl + (const Graph& g, + ComponentMap c, + VertexComponentMap r, + VertexIndexMap vertex_index_map, + incidence_graph_tag) + { + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef iterator_property_map::iterator, + VertexIndexMap> IsoMap; + typename boost::graph::parallel::process_group_type::type pg = process_group(g); + +#ifdef PBGL_SCC_DEBUG + accounting::time_type start = accounting::get_time(); +#endif + + typedef adjacency_list::type, vecS>, + directedS > ReverseGraph; + + ReverseGraph gr(0, pg); + std::vector fr_s(num_vertices(g)); + std::vector rf_s(num_vertices(g)); + IsoMap fr(fr_s.begin(), vertex_index_map); // fr = forward->reverse + IsoMap rf(rf_s.begin(), vertex_index_map); // rf = reverse->forward + + build_reverse_graph(g, gr, fr, rf); + +#ifdef PBGL_SCC_DEBUG + accounting::time_type end = accounting::get_time(); + if(process_id(process_group(g)) == 0) + std::cerr << "Reverse graph initialization time = " << accounting::print_time(end - start) << " seconds.\n"; +#endif + + fleischer_hendrickson_pinar_strong_components(g, r, gr, fr, rf, + vertex_index_map); + + typename property_traits::value_type c_num = number_components(g, r, c); + + return c_num; + } + + template + typename property_traits::value_type + fleischer_hendrickson_pinar_strong_components_impl + (const Graph& g, + ComponentMap c, + VertexComponentMap r, + VertexIndexMap vertex_index_map, + bidirectional_graph_tag) + { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + reverse_graph gr(g); + detail::vertex_identity_property_map fr, rf; + + fleischer_hendrickson_pinar_strong_components(g, r, gr, fr, rf, + vertex_index_map); + + typename property_traits::value_type c_num + = number_components(g, r, c); + + return c_num; + } + + template + inline typename property_traits::value_type + fleischer_hendrickson_pinar_strong_components + (const Graph& g, + ComponentMap c, + VertexIndexMap vertex_index_map) + { + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef iterator_property_map::iterator, + VertexIndexMap> VertexComponentMap; + typename boost::graph::parallel::process_group_type::type pg + = process_group(g); + + if (num_processes(pg) == 1) { + local_subgraph ls(g); + return boost::strong_components(ls, c); + } + + // Create a VertexComponentMap for intermediate labeling of SCCs + std::vector r_s(num_vertices(g), graph_traits::null_vertex()); + VertexComponentMap r(r_s.begin(), vertex_index_map); + + return fleischer_hendrickson_pinar_strong_components_impl + (g, c, r, vertex_index_map, + typename graph_traits::traversal_category()); + } + + template + inline typename property_traits::value_type + fleischer_hendrickson_pinar_strong_components(const Graph& g, + ComponentMap c) + { + return fleischer_hendrickson_pinar_strong_components(g, c, get(vertex_index, g)); + } + +} // end namespace distributed + +using distributed::fleischer_hendrickson_pinar_strong_components; + +} // end namespace graph + +template +inline typename property_traits::value_type +strong_components + (const Graph& g, ComponentMap comp, + const bgl_named_params& + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, distributed_graph_tag)) +{ + return graph::fleischer_hendrickson_pinar_strong_components(g, comp); +} + +template +inline typename property_traits::value_type +strong_components + (const Graph& g, ComponentMap comp + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, distributed_graph_tag)) +{ + return graph::fleischer_hendrickson_pinar_strong_components(g, comp); +} + +} /* end namespace boost */ + +#endif // BOOST_GRAPH_DISTRIBUTED_SCC_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/two_bit_color_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/two_bit_color_map.hpp new file mode 100644 index 0000000000..d7ec6bdfe4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/two_bit_color_map.hpp @@ -0,0 +1,116 @@ +// Copyright (C) 2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Jeremiah Willcock +// Andrew Lumsdaine + +// Distributed version of the two-bit color map +#ifndef BOOST_DISTRIBUTED_TWO_BIT_COLOR_MAP_HPP +#define BOOST_DISTRIBUTED_TWO_BIT_COLOR_MAP_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include + +namespace boost { + +template +class two_bit_color_map > + : public parallel::distributed_property_map > +{ + typedef two_bit_color_map local_map; + + typedef parallel::distributed_property_map + inherited; + + typedef local_property_map + index_map_type; + +public: + two_bit_color_map(std::size_t inital_size, + const index_map_type& index = index_map_type()) + : inherited(index.process_group(), index.global(), + local_map(inital_size, index.base())) { } + + inherited& base() { return *this; } + const inherited& base() const { return *this; } +}; + +template +inline two_bit_color_type +get(two_bit_color_map > + const& pm, + typename property_traits::key_type key) +{ + return get(pm.base(), key); +} + +template +inline void +put(two_bit_color_map > + const& pm, + typename property_traits::key_type key, + two_bit_color_type value) +{ + put(pm.base(), key, value); +} + +template +class two_bit_color_map > + : public parallel::distributed_property_map< + ProcessGroup, GlobalMap, two_bit_color_map > +{ + typedef two_bit_color_map local_map; + + typedef parallel::distributed_property_map + inherited; + + typedef parallel::distributed_property_map + index_map_type; + +public: + two_bit_color_map(std::size_t inital_size, + const index_map_type& index = index_map_type()) + : inherited(index.process_group(), index.global(), + local_map(inital_size, index.base())) { } + + inherited& base() { return *this; } + const inherited& base() const { return *this; } +}; + +template +inline two_bit_color_type +get(two_bit_color_map< + parallel::distributed_property_map< + ProcessGroup, GlobalMap, two_bit_color_map > > const& pm, + typename property_traits::key_type key) +{ + return get(pm.base(), key); +} + +template +inline void +put(two_bit_color_map< + parallel::distributed_property_map< + ProcessGroup, GlobalMap, two_bit_color_map > > const& pm, + typename property_traits::key_type key, + two_bit_color_type value) +{ + put(pm.base(), key, value); +} + +} // end namespace boost + +#endif // BOOST_DISTRIBUTED_TWO_BIT_COLOR_MAP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/unsafe_serialize.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/unsafe_serialize.hpp new file mode 100644 index 0000000000..38ad8a6795 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/unsafe_serialize.hpp @@ -0,0 +1,85 @@ +// Copyright (C) 2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +// This file contains the "unsafe_serialize" routine, which transforms +// types they may not be serializable (such as void*) into +// serializable equivalents. +#ifndef PBGL_UNSAFE_SERIALIZE_HPP +#define PBGL_UNSAFE_SERIALIZE_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +BOOST_IS_BITWISE_SERIALIZABLE(void*) +namespace boost { namespace mpi { + template<> struct is_mpi_datatype : mpl::true_ { }; +} } // end namespace boost::mpi + +namespace boost { + typedef mpl::if_c<(sizeof(int) == sizeof(void*)), + int, + mpl::if_c<(sizeof(long) == sizeof(void*)), + long, + mpl::if_c<(sizeof(void*) <= sizeof(boost::intmax_t)), + boost::intmax_t, + void>::type + >::type + >::type ptr_serialize_type; + + BOOST_STATIC_ASSERT ((!boost::is_void::value)); + + template inline T& unsafe_serialize(T& x) { return x; } + + inline ptr_serialize_type& unsafe_serialize(void*& x) + { return reinterpret_cast(x); } + + // Force Boost.MPI to serialize a void* like a ptr_serialize_type + namespace mpi { + template<> inline MPI_Datatype get_mpi_datatype(void* const& x) + { + return get_mpi_datatype(); + } + } + + template + struct unsafe_pair + { + unsafe_pair() { } + unsafe_pair(const T& t, const U& u) : first(t), second(u) { } + unsafe_pair(const std::pair& p) : first(p.first), second(p.second) { } + T first; + U second; + + template + void serialize(Archiver& ar, const unsigned /*version*/) + { + ar & unsafe_serialize(first) & unsafe_serialize(second); + } + }; + + template + bool operator<(unsafe_pair const& x, unsafe_pair const& y) + { + return std::make_pair(x.first, x.second) < + std::make_pair(y.first, y.second); + } + +} // end namespace boost + +#endif // PBGL_UNSAFE_SERIALIZE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/vertex_list_adaptor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/vertex_list_adaptor.hpp new file mode 100644 index 0000000000..8928479a7a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/distributed/vertex_list_adaptor.hpp @@ -0,0 +1,403 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +#ifndef BOOST_VERTEX_LIST_ADAPTOR_HPP +#define BOOST_VERTEX_LIST_ADAPTOR_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace graph { + +// -------------------------------------------------------------------------- +// Global index map built from a distribution +// -------------------------------------------------------------------------- +template +class distribution_global_index_map +{ + public: + typedef std::size_t value_type; + typedef value_type reference; + typedef typename property_traits::key_type key_type; + typedef readable_property_map_tag category; + + distribution_global_index_map(const Distribution& distribution, + const OwnerPropertyMap& owner, + const LocalPropertyMap& local) + : distribution_(distribution), owner(owner), local(local) { } + + Distribution distribution_; + OwnerPropertyMap owner; + LocalPropertyMap local; +}; + +template +inline +typename distribution_global_index_map::value_type +get(const distribution_global_index_map& p, + typename distribution_global_index_map::key_type x) +{ + using boost::get; + return p.distribution_.global(get(p.owner, x), get(p.local, x)); +} + +template +inline +distribution_global_index_map< + Distribution, + typename property_map::const_type, + typename property_map::const_type> +make_distribution_global_index_map(const Graph& g, const Distribution& d) +{ + typedef distribution_global_index_map< + Distribution, + typename property_map::const_type, + typename property_map::const_type> + result_type; + return result_type(d, get(vertex_owner, g), get(vertex_local, g)); +} + +// -------------------------------------------------------------------------- +// Global index map built from a distributed index map and list of vertices +// -------------------------------------------------------------------------- +template +class stored_global_index_map : public IndexMap +{ + public: + typedef readable_property_map_tag category; + + stored_global_index_map(const IndexMap& index_map) : IndexMap(index_map) { + // When we have a global index, we need to always have the indices + // of every key we've seen + this->set_max_ghost_cells(0); + } +}; + +// -------------------------------------------------------------------------- +// Global index map support code +// -------------------------------------------------------------------------- +namespace detail { + template + inline void + initialize_global_index_map(const PropertyMap&, + ForwardIterator, ForwardIterator) + { } + + template + void + initialize_global_index_map(stored_global_index_map& p, + ForwardIterator first, ForwardIterator last) + { + using std::distance; + + typedef typename property_traits::value_type size_t; + + size_t n = distance(first, last); + for (size_t i = 0; i < n; ++i, ++first) local_put(p, *first, i); + } +} + +// -------------------------------------------------------------------------- +// Adapts a Distributed Vertex List Graph to a Vertex List Graph +// -------------------------------------------------------------------------- +template +class vertex_list_adaptor : public graph_traits +{ + typedef graph_traits inherited; + + typedef typename inherited::traversal_category base_traversal_category; + + public: + typedef typename inherited::vertex_descriptor vertex_descriptor; + typedef typename std::vector::iterator vertex_iterator; + typedef typename std::vector::size_type + vertices_size_type; + + struct traversal_category + : public virtual base_traversal_category, + public virtual vertex_list_graph_tag {}; + + vertex_list_adaptor(const Graph& g, + const GlobalIndexMap& index_map = GlobalIndexMap()) + : g(&g), index_map(index_map) + { + using boost::vertices; + + all_vertices_.reset(new std::vector()); + all_gather(process_group(), vertices(g).first, vertices(g).second, + *all_vertices_); + detail::initialize_global_index_map(this->index_map, + all_vertices_->begin(), + all_vertices_->end()); + } + + const Graph& base() const { return *g; } + + // -------------------------------------------------------------------------- + // Distributed Container + // -------------------------------------------------------------------------- + typedef typename boost::graph::parallel::process_group_type::type + process_group_type; + + process_group_type process_group() const + { + using boost::graph::parallel::process_group; + return process_group(*g); + } + + std::pair vertices() const + { return std::make_pair(all_vertices_->begin(), all_vertices_->end()); } + + vertices_size_type num_vertices() const { return all_vertices_->size(); } + + GlobalIndexMap get_index_map() const { return index_map; } + + private: + const Graph* g; + GlobalIndexMap index_map; + shared_ptr > all_vertices_; +}; + +template +inline vertex_list_adaptor +make_vertex_list_adaptor(const Graph& g, const GlobalIndexMap& index_map) +{ return vertex_list_adaptor(g, index_map); } + +namespace detail { + template + class default_global_index_map + { + typedef typename graph_traits::vertices_size_type value_type; + typedef typename property_map::const_type local_map; + + public: + typedef vector_property_map distributed_map; + typedef stored_global_index_map type; + }; +} + +template +inline +vertex_list_adaptor::type> +make_vertex_list_adaptor(const Graph& g) +{ + typedef typename detail::default_global_index_map::type + GlobalIndexMap; + typedef typename detail::default_global_index_map::distributed_map + DistributedMap; + typedef vertex_list_adaptor result_type; + return result_type(g, + GlobalIndexMap(DistributedMap(num_vertices(g), + get(vertex_index, g)))); +} + +// -------------------------------------------------------------------------- +// Incidence Graph +// -------------------------------------------------------------------------- +template +inline typename vertex_list_adaptor::vertex_descriptor +source(typename vertex_list_adaptor::edge_descriptor e, + const vertex_list_adaptor& g) +{ return source(e, g.base()); } + +template +inline typename vertex_list_adaptor::vertex_descriptor +target(typename vertex_list_adaptor::edge_descriptor e, + const vertex_list_adaptor& g) +{ return target(e, g.base()); } + +template +inline +std::pair::out_edge_iterator, + typename vertex_list_adaptor::out_edge_iterator> +out_edges(typename vertex_list_adaptor::vertex_descriptor v, + const vertex_list_adaptor& g) +{ return out_edges(v, g.base()); } + +template +inline typename vertex_list_adaptor::degree_size_type +out_degree(typename vertex_list_adaptor::vertex_descriptor v, + const vertex_list_adaptor& g) +{ return out_degree(v, g.base()); } + +// -------------------------------------------------------------------------- +// Bidirectional Graph +// -------------------------------------------------------------------------- +template +inline +std::pair::in_edge_iterator, + typename vertex_list_adaptor::in_edge_iterator> +in_edges(typename vertex_list_adaptor::vertex_descriptor v, + const vertex_list_adaptor& g) +{ return in_edges(v, g.base()); } + +template +inline typename vertex_list_adaptor::degree_size_type +in_degree(typename vertex_list_adaptor::vertex_descriptor v, + const vertex_list_adaptor& g) +{ return in_degree(v, g.base()); } + +template +inline typename vertex_list_adaptor::degree_size_type +degree(typename vertex_list_adaptor::vertex_descriptor v, + const vertex_list_adaptor& g) +{ return degree(v, g.base()); } + +// -------------------------------------------------------------------------- +// Adjacency Graph +// -------------------------------------------------------------------------- +template +inline +std::pair::adjacency_iterator, + typename vertex_list_adaptor::adjacency_iterator> +adjacent_vertices(typename vertex_list_adaptor::vertex_descriptor v, + const vertex_list_adaptor& g) +{ return adjacent_vertices(v, g.base()); } + + +// -------------------------------------------------------------------------- +// Vertex List Graph +// -------------------------------------------------------------------------- +template +inline +std::pair::vertex_iterator, + typename vertex_list_adaptor::vertex_iterator> +vertices(const vertex_list_adaptor& g) +{ return g.vertices(); } + +template +inline +typename vertex_list_adaptor::vertices_size_type +num_vertices(const vertex_list_adaptor& g) +{ return g.num_vertices(); } + +// -------------------------------------------------------------------------- +// Edge List Graph +// -------------------------------------------------------------------------- +template +inline +std::pair::edge_iterator, + typename vertex_list_adaptor::edge_iterator> +edges(const vertex_list_adaptor& g) +{ return edges(g.base()); } + +template +inline +typename vertex_list_adaptor::edges_size_type +num_edges(const vertex_list_adaptor& g) +{ return num_edges(g.base()); } + +// -------------------------------------------------------------------------- +// Property Graph +// -------------------------------------------------------------------------- +template +inline typename property_map::type +get(PropertyTag p, vertex_list_adaptor& g) +{ return get(p, g.base()); } + +template +inline typename property_map::const_type +get(PropertyTag p, const vertex_list_adaptor& g) +{ return get(p, g.base()); } + +template +inline typename property_traits< + typename property_map::type + >::value_type +get(PropertyTag p, const vertex_list_adaptor& g, + typename property_traits< + typename property_map::type + >::key_type const& x) +{ return get(p, g.base(), x); } + +template +inline void +put(PropertyTag p, vertex_list_adaptor& g, + typename property_traits< + typename property_map::type + >::key_type const& x, + typename property_traits< + typename property_map::type + >::value_type const& v) +{ return put(p, g.base(), x, v); } + +// -------------------------------------------------------------------------- +// Property Graph: vertex_index property +// -------------------------------------------------------------------------- +template +inline GlobalIndexMap +get(vertex_index_t, const vertex_list_adaptor& g) +{ return g.get_index_map(); } + +template +inline typename vertex_list_adaptor::vertices_size_type +get(vertex_index_t, const vertex_list_adaptor& g, + typename vertex_list_adaptor::vertex_descriptor x) +{ return get(g.get_index_map(), x); } + +// -------------------------------------------------------------------------- +// Adjacency Matrix Graph +// -------------------------------------------------------------------------- +template +std::pair::edge_descriptor, + bool> +edge(typename vertex_list_adaptor::vertex_descriptor u, + typename vertex_list_adaptor::vertex_descriptor v, + vertex_list_adaptor& g) +{ return edge(u, v, g.base()); } + +} } // end namespace boost::graph + +namespace boost { + +// -------------------------------------------------------------------------- +// Property Graph: vertex_index property +// -------------------------------------------------------------------------- +template +class property_map > +{ +public: + typedef GlobalIndexMap type; + typedef type const_type; +}; + +template +class property_map > +{ +public: + typedef GlobalIndexMap type; + typedef type const_type; +}; + +using graph::distribution_global_index_map; +using graph::make_distribution_global_index_map; +using graph::stored_global_index_map; +using graph::make_vertex_list_adaptor; +using graph::vertex_list_adaptor; + +} // end namespace boost + +#endif // BOOST_VERTEX_LIST_ADAPTOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/dll_import_export.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/dll_import_export.hpp new file mode 100644 index 0000000000..cc369d1d12 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/dll_import_export.hpp @@ -0,0 +1,30 @@ +//======================================================================= +// Copyright 2001 University of Notre Dame. +// Copyright 2003 Jeremy Siek +// Authors: Lie-Quan Lee, Jeremy Siek, and Douglas Gregor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP +#define BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP + +#include + +#ifdef BOOST_HAS_DECLSPEC +# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_DYN_LINK) +# ifdef BOOST_GRAPH_SOURCE +# define BOOST_GRAPH_DECL __declspec(dllexport) +# else +# define BOOST_GRAPH_DECL __declspec(dllimport) +# endif // BOOST_GRAPH_SOURCE +# endif // DYN_LINK +#endif // BOOST_HAS_DECLSPEC + +#ifndef BOOST_GRAPH_DECL +# define BOOST_GRAPH_DECL +#endif + +#endif // BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/dominator_tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/dominator_tree.hpp new file mode 100644 index 0000000000..db40cb73fa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/dominator_tree.hpp @@ -0,0 +1,491 @@ +//======================================================================= +// Copyright (C) 2005-2009 Jongsoo Park +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_DOMINATOR_HPP +#define BOOST_GRAPH_DOMINATOR_HPP + +#include +#include +#include +#include + +// Dominator tree computation + +namespace boost { + namespace detail { + /** + * An extended time_stamper which also records vertices for each dfs number + */ + template + class time_stamper_with_vertex_vector + : public base_visitor< + time_stamper_with_vertex_vector > + { + public : + typedef Tag event_filter; + time_stamper_with_vertex_vector(TimeMap timeMap, VertexVector& v, + TimeT& t) + : timeStamper_(timeMap, t), v_(v) { } + + template + void + operator()(const typename property_traits::key_type& v, + const Graph& g) + { + timeStamper_(v, g); + v_[timeStamper_.m_time] = v; + } + + private : + time_stamper timeStamper_; + VertexVector& v_; + }; + + /** + * A convenient way to create a time_stamper_with_vertex_vector + */ + template + time_stamper_with_vertex_vector + stamp_times_with_vertex_vector(TimeMap timeMap, VertexVector& v, TimeT& t, + Tag) + { + return time_stamper_with_vertex_vector(timeMap, v, t); + } + + template + class dominator_visitor + { + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertices_size_type VerticesSizeType; + + public : + /** + * @param g [in] the target graph of the dominator tree + * @param entry [in] the entry node of g + * @param domTreePredMap [out] the immediate dominator map + * (parent map in dominator tree) + */ + dominator_visitor(const Graph& g, const Vertex& entry, + DomTreePredMap domTreePredMap) + : semi_(num_vertices(g)), + ancestor_(num_vertices(g), graph_traits::null_vertex()), + samedom_(ancestor_), + best_(semi_), + semiMap_(make_iterator_property_map(semi_.begin(), + get(vertex_index, g))), + ancestorMap_(make_iterator_property_map(ancestor_.begin(), + get(vertex_index, g))), + bestMap_(make_iterator_property_map(best_.begin(), + get(vertex_index, g))), + buckets_(num_vertices(g)), + bucketMap_(make_iterator_property_map(buckets_.begin(), + get(vertex_index, g))), + entry_(entry), + domTreePredMap_(domTreePredMap), + numOfVertices_(num_vertices(g)), + samedomMap(make_iterator_property_map(samedom_.begin(), + get(vertex_index, g))) + { + } + + void + operator()(const Vertex& n, const TimeMap& dfnumMap, + const PredMap& parentMap, const Graph& g) + { + if (n == entry_) return; + + const Vertex p(get(parentMap, n)); + Vertex s(p); + + // 1. Calculate the semidominator of n, + // based on the semidominator thm. + // * Semidominator thm. : To find the semidominator of a node n, + // consider all predecessors v of n in the CFG (Control Flow Graph). + // - If v is a proper ancestor of n in the spanning tree + // (so dfnum(v) < dfnum(n)), then v is a candidate for semi(n) + // - If v is a non-ancestor of n (so dfnum(v) > dfnum(n)) + // then for each u that is an ancestor of v (or u = v), + // Let semi(u) be a candidate for semi(n) + // of all these candidates, the one with lowest dfnum is + // the semidominator of n. + + // For each predecessor of n + typename graph_traits::in_edge_iterator inItr, inEnd; + for (boost::tie(inItr, inEnd) = in_edges(n, g); inItr != inEnd; ++inItr) + { + const Vertex v = source(*inItr, g); + // To deal with unreachable nodes + if (get(dfnumMap, v) < 0 || get(dfnumMap, v) >= numOfVertices_) + continue; + + Vertex s2; + if (get(dfnumMap, v) <= get(dfnumMap, n)) + s2 = v; + else + s2 = get(semiMap_, ancestor_with_lowest_semi_(v, dfnumMap)); + + if (get(dfnumMap, s2) < get(dfnumMap, s)) + s = s2; + } + put(semiMap_, n, s); + + // 2. Calculation of n's dominator is deferred until + // the path from s to n has been linked into the forest + get(bucketMap_, s).push_back(n); + get(ancestorMap_, n) = p; + get(bestMap_, n) = n; + + // 3. Now that the path from p to v has been linked into + // the spanning forest, these lines calculate the dominator of v, + // based on the dominator thm., or else defer the calculation + // until y's dominator is known + // * Dominator thm. : On the spanning-tree path below semi(n) and + // above or including n, let y be the node + // with the smallest-numbered semidominator. Then, + // + // idom(n) = semi(n) if semi(y)=semi(n) or + // idom(y) if semi(y) != semi(n) + typename std::deque::iterator buckItr; + for (buckItr = get(bucketMap_, p).begin(); + buckItr != get(bucketMap_, p).end(); + ++buckItr) + { + const Vertex v(*buckItr); + const Vertex y(ancestor_with_lowest_semi_(v, dfnumMap)); + if (get(semiMap_, y) == get(semiMap_, v)) + put(domTreePredMap_, v, p); + else + put(samedomMap, v, y); + } + + get(bucketMap_, p).clear(); + } + + protected : + + /** + * Evaluate function in Tarjan's path compression + */ + const Vertex + ancestor_with_lowest_semi_(const Vertex& v, const TimeMap& dfnumMap) + { + const Vertex a(get(ancestorMap_, v)); + + if (get(ancestorMap_, a) != graph_traits::null_vertex()) + { + const Vertex b(ancestor_with_lowest_semi_(a, dfnumMap)); + + put(ancestorMap_, v, get(ancestorMap_, a)); + + if (get(dfnumMap, get(semiMap_, b)) < + get(dfnumMap, get(semiMap_, get(bestMap_, v)))) + put(bestMap_, v, b); + } + + return get(bestMap_, v); + } + + std::vector semi_, ancestor_, samedom_, best_; + PredMap semiMap_, ancestorMap_, bestMap_; + std::vector< std::deque > buckets_; + + iterator_property_map >::iterator, + IndexMap> bucketMap_; + + const Vertex& entry_; + DomTreePredMap domTreePredMap_; + const VerticesSizeType numOfVertices_; + + public : + + PredMap samedomMap; + }; + + } // namespace detail + + /** + * @brief Build dominator tree using Lengauer-Tarjan algorithm. + * It takes O((V+E)log(V+E)) time. + * + * @pre dfnumMap, parentMap and verticesByDFNum have dfs results corresponding + * indexMap. + * If dfs has already run before, + * this function would be good for saving computations. + * @pre Unreachable nodes must be masked as + * graph_traits::null_vertex in parentMap. + * @pre Unreachable nodes must be masked as + * (std::numeric_limits::max)() in dfnumMap. + * + * @param domTreePredMap [out] : immediate dominator map (parent map + * in dom. tree) + * + * @note reference Appel. p. 452~453. algorithm 19.9, 19.10. + * + * @todo : Optimization in Finding Dominators in Practice, Loukas Georgiadis + */ + template + void + lengauer_tarjan_dominator_tree_without_dfs + (const Graph& g, + const typename graph_traits::vertex_descriptor& entry, + const IndexMap& /*indexMap*/, + TimeMap dfnumMap, PredMap parentMap, VertexVector& verticesByDFNum, + DomTreePredMap domTreePredMap) + { + // Typedefs and concept check + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertices_size_type VerticesSizeType; + + function_requires< BidirectionalGraphConcept >(); + + const VerticesSizeType numOfVertices = num_vertices(g); + if (numOfVertices == 0) return; + + // 1. Visit each vertex in reverse post order and calculate sdom. + detail::dominator_visitor + visitor(g, entry, domTreePredMap); + + VerticesSizeType i; + for (i = 0; i < numOfVertices; ++i) + { + const Vertex u(verticesByDFNum[numOfVertices - 1 - i]); + if (u != graph_traits::null_vertex()) + visitor(u, dfnumMap, parentMap, g); + } + + // 2. Now all the deferred dominator calculations, + // based on the second clause of the dominator thm., are performed + for (i = 0; i < numOfVertices; ++i) + { + const Vertex n(verticesByDFNum[i]); + + if (n == entry || n == graph_traits::null_vertex()) + continue; + + Vertex u = get(visitor.samedomMap, n); + if (u != graph_traits::null_vertex()) + { + put(domTreePredMap, n, get(domTreePredMap, u)); + } + } + } + + /** + * Unlike lengauer_tarjan_dominator_tree_without_dfs, + * dfs is run in this function and + * the result is written to dfnumMap, parentMap, vertices. + * + * If the result of dfs required after this algorithm, + * this function can eliminate the need of rerunning dfs. + */ + template + void + lengauer_tarjan_dominator_tree + (const Graph& g, + const typename graph_traits::vertex_descriptor& entry, + const IndexMap& indexMap, + TimeMap dfnumMap, PredMap parentMap, VertexVector& verticesByDFNum, + DomTreePredMap domTreePredMap) + { + // Typedefs and concept check + typedef typename graph_traits::vertices_size_type VerticesSizeType; + + function_requires< BidirectionalGraphConcept >(); + + // 1. Depth first visit + const VerticesSizeType numOfVertices = num_vertices(g); + if (numOfVertices == 0) return; + + VerticesSizeType time = + (std::numeric_limits::max)(); + std::vector + colors(numOfVertices, color_traits::white()); + depth_first_visit + (g, entry, + make_dfs_visitor + (make_pair(record_predecessors(parentMap, on_tree_edge()), + detail::stamp_times_with_vertex_vector + (dfnumMap, verticesByDFNum, time, on_discover_vertex()))), + make_iterator_property_map(colors.begin(), indexMap)); + + // 2. Run main algorithm. + lengauer_tarjan_dominator_tree_without_dfs(g, entry, indexMap, dfnumMap, + parentMap, verticesByDFNum, + domTreePredMap); + } + + /** + * Use vertex_index as IndexMap and make dfnumMap, parentMap, verticesByDFNum + * internally. + * If we don't need the result of dfs (dfnumMap, parentMap, verticesByDFNum), + * this function would be more convenient one. + */ + template + void + lengauer_tarjan_dominator_tree + (const Graph& g, + const typename graph_traits::vertex_descriptor& entry, + DomTreePredMap domTreePredMap) + { + // typedefs + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertices_size_type VerticesSizeType; + typedef typename property_map::const_type IndexMap; + typedef + iterator_property_map::iterator, + IndexMap> TimeMap; + typedef + iterator_property_map::iterator, IndexMap> + PredMap; + + // Make property maps + const VerticesSizeType numOfVertices = num_vertices(g); + if (numOfVertices == 0) return; + + const IndexMap indexMap = get(vertex_index, g); + + std::vector dfnum(numOfVertices, 0); + TimeMap dfnumMap(make_iterator_property_map(dfnum.begin(), indexMap)); + + std::vector parent(numOfVertices, + graph_traits::null_vertex()); + PredMap parentMap(make_iterator_property_map(parent.begin(), indexMap)); + + std::vector verticesByDFNum(parent); + + // Run main algorithm + lengauer_tarjan_dominator_tree(g, entry, + indexMap, dfnumMap, parentMap, + verticesByDFNum, domTreePredMap); + } + + /** + * Muchnick. p. 182, 184 + * + * using iterative bit vector analysis + */ + template + void + iterative_bit_vector_dominator_tree + (const Graph& g, + const typename graph_traits::vertex_descriptor& entry, + const IndexMap& indexMap, + DomTreePredMap domTreePredMap) + { + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator vertexItr; + typedef typename graph_traits::vertices_size_type VerticesSizeType; + typedef + iterator_property_map >::iterator, + IndexMap> vertexSetMap; + + function_requires >(); + + // 1. Finding dominator + // 1.1. Initialize + const VerticesSizeType numOfVertices = num_vertices(g); + if (numOfVertices == 0) return; + + vertexItr vi, viend; + boost::tie(vi, viend) = vertices(g); + const std::set N(vi, viend); + + bool change = true; + + std::vector< std::set > dom(numOfVertices, N); + vertexSetMap domMap(make_iterator_property_map(dom.begin(), indexMap)); + get(domMap, entry).clear(); + get(domMap, entry).insert(entry); + + while (change) + { + change = false; + for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi) + { + if (*vi == entry) continue; + + std::set T(N); + + typename graph_traits::in_edge_iterator inItr, inEnd; + for (boost::tie(inItr, inEnd) = in_edges(*vi, g); inItr != inEnd; ++inItr) + { + const Vertex p = source(*inItr, g); + + std::set tempSet; + std::set_intersection(T.begin(), T.end(), + get(domMap, p).begin(), + get(domMap, p).end(), + std::inserter(tempSet, tempSet.begin())); + T.swap(tempSet); + } + + T.insert(*vi); + if (T != get(domMap, *vi)) + { + change = true; + get(domMap, *vi).swap(T); + } + } // end of for (boost::tie(vi, viend) = vertices(g) + } // end of while(change) + + // 2. Build dominator tree + for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi) + get(domMap, *vi).erase(*vi); + + Graph domTree(numOfVertices); + + for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi) + { + if (*vi == entry) continue; + + // We have to iterate through copied dominator set + const std::set tempSet(get(domMap, *vi)); + typename std::set::const_iterator s; + for (s = tempSet.begin(); s != tempSet.end(); ++s) + { + typename std::set::iterator t; + for (t = get(domMap, *vi).begin(); t != get(domMap, *vi).end(); ) + { + typename std::set::iterator old_t = t; + ++t; // Done early because t may become invalid + if (*old_t == *s) continue; + if (get(domMap, *s).find(*old_t) != get(domMap, *s).end()) + get(domMap, *vi).erase(old_t); + } + } + } + + for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi) + { + if (*vi != entry && get(domMap, *vi).size() == 1) + { + Vertex temp = *get(domMap, *vi).begin(); + put(domTreePredMap, *vi, temp); + } + } + } + + template + void + iterative_bit_vector_dominator_tree + (const Graph& g, + const typename graph_traits::vertex_descriptor& entry, + DomTreePredMap domTreePredMap) + { + typename property_map::const_type + indexMap = get(vertex_index, g); + + iterative_bit_vector_dominator_tree(g, entry, indexMap, domTreePredMap); + } +} // namespace boost + +#endif // BOOST_GRAPH_DOMINATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/eccentricity.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/eccentricity.hpp new file mode 100644 index 0000000000..99f80a452f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/eccentricity.hpp @@ -0,0 +1,113 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_ECCENTRICITY_HPP +#define BOOST_GRAPH_ECCENTRICITY_HPP + +#include +#include +#include + +namespace boost +{ +template +inline typename property_traits::value_type +eccentricity(const Graph& g, DistanceMap dist, Combinator combine) +{ + function_requires< GraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type Distance; + + return detail::combine_distances(g, dist, combine, Distance(0)); +} + +template +inline typename property_traits::value_type +eccentricity(const Graph& g, DistanceMap dist) +{ + function_requires< GraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type Distance; + + return eccentricity(g, dist, detail::maximize()); +} + +template +inline std::pair::value_type, + typename property_traits::value_type> +all_eccentricities(const Graph& g, const DistanceMatrix& dist, EccentricityMap ecc) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type DistanceMap; + function_requires< WritablePropertyMapConcept >(); + typedef typename property_traits::value_type Eccentricity; + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + + Eccentricity + r = numeric_values::infinity(), + d = numeric_values::zero(); + VertexIterator i, end; + boost::tie(i, end) = vertices(g); + for(boost::tie(i, end) = vertices(g); i != end; ++i) { + DistanceMap dm = get(dist, *i); + Eccentricity e = eccentricity(g, dm); + put(ecc, *i, e); + + // track the radius and diameter at the same time + r = min BOOST_PREVENT_MACRO_SUBSTITUTION (r, e); + d = max BOOST_PREVENT_MACRO_SUBSTITUTION (d, e); + } + return std::make_pair(r, d); +} + +template +inline std::pair::value_type, + typename property_traits::value_type> +radius_and_diameter(const Graph& g, EccentricityMap ecc) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type Eccentricity; + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + + VertexIterator i, end; + boost::tie(i, end) = vertices(g); + Eccentricity radius = get(ecc, *i); + Eccentricity diameter = get(ecc, *i); + for(i = boost::next(i); i != end; ++i) { + Eccentricity cur = get(ecc, *i); + radius = min BOOST_PREVENT_MACRO_SUBSTITUTION (radius, cur); + diameter = max BOOST_PREVENT_MACRO_SUBSTITUTION (diameter, cur); + } + return std::make_pair(radius, diameter); +} + + +template +inline typename property_traits::value_type +radius(const Graph& g, EccentricityMap ecc) +{ return radius_and_diameter(g, ecc).first; } + + +template +inline typename property_traits::value_type +diameter(const Graph& g, EccentricityMap ecc) +{ return radius_and_diameter(g, ecc).second; } + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/edge_connectivity.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/edge_connectivity.hpp new file mode 100644 index 0000000000..e255d84bc6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/edge_connectivity.hpp @@ -0,0 +1,183 @@ +//======================================================================= +// Copyright 2000 University of Notre Dame. +// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_EDGE_CONNECTIVITY +#define BOOST_EDGE_CONNECTIVITY + +// WARNING: not-yet fully tested! + +#include +#include +#include +#include +#include + +namespace boost { + + namespace detail { + + template + inline + std::pair::vertex_descriptor, + typename graph_traits::degree_size_type> + min_degree_vertex(Graph& g) + { + typedef graph_traits Traits; + typename Traits::vertex_descriptor p; + typedef typename Traits::degree_size_type size_type; + size_type delta = (std::numeric_limits::max)(); + + typename Traits::vertex_iterator i, iend; + for (boost::tie(i, iend) = vertices(g); i != iend; ++i) + if (degree(*i, g) < delta) { + delta = degree(*i, g); + p = *i; + } + return std::make_pair(p, delta); + } + + template + void neighbors(const Graph& g, + typename graph_traits::vertex_descriptor u, + OutputIterator result) + { + typename graph_traits::adjacency_iterator ai, aend; + for (boost::tie(ai, aend) = adjacent_vertices(u, g); ai != aend; ++ai) + *result++ = *ai; + } + + template + void neighbors(const Graph& g, + VertexIterator first, VertexIterator last, + OutputIterator result) + { + for (; first != last; ++first) + neighbors(g, *first, result); + } + + } // namespace detail + + // O(m n) + template + typename graph_traits::degree_size_type + edge_connectivity(VertexListGraph& g, OutputIterator disconnecting_set) + { + //------------------------------------------------------------------------- + // Type Definitions + typedef graph_traits Traits; + typedef typename Traits::vertex_iterator vertex_iterator; + typedef typename Traits::edge_iterator edge_iterator; + typedef typename Traits::out_edge_iterator out_edge_iterator; + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::degree_size_type degree_size_type; + typedef color_traits Color; + + typedef adjacency_list_traits Tr; + typedef typename Tr::edge_descriptor Tr_edge_desc; + typedef adjacency_list > > > + FlowGraph; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + //------------------------------------------------------------------------- + // Variable Declarations + vertex_descriptor u, v, p, k; + edge_descriptor e1, e2; + bool inserted; + vertex_iterator vi, vi_end; + edge_iterator ei, ei_end; + degree_size_type delta, alpha_star, alpha_S_k; + std::set S, neighbor_S; + std::vector S_star, non_neighbor_S; + std::vector color(num_vertices(g)); + std::vector pred(num_vertices(g)); + + //------------------------------------------------------------------------- + // Create a network flow graph out of the undirected graph + FlowGraph flow_g(num_vertices(g)); + + typename property_map::type + cap = get(edge_capacity, flow_g); + typename property_map::type + res_cap = get(edge_residual_capacity, flow_g); + typename property_map::type + rev_edge = get(edge_reverse, flow_g); + + for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { + u = source(*ei, g), v = target(*ei, g); + boost::tie(e1, inserted) = add_edge(u, v, flow_g); + cap[e1] = 1; + boost::tie(e2, inserted) = add_edge(v, u, flow_g); + cap[e2] = 1; // not sure about this + rev_edge[e1] = e2; + rev_edge[e2] = e1; + } + + //------------------------------------------------------------------------- + // The Algorithm + + boost::tie(p, delta) = detail::min_degree_vertex(g); + S_star.push_back(p); + alpha_star = delta; + S.insert(p); + neighbor_S.insert(p); + detail::neighbors(g, S.begin(), S.end(), + std::inserter(neighbor_S, neighbor_S.begin())); + + boost::tie(vi, vi_end) = vertices(g); + std::set_difference(vi, vi_end, + neighbor_S.begin(), neighbor_S.end(), + std::back_inserter(non_neighbor_S)); + + while (!non_neighbor_S.empty()) { // at most n - 1 times + k = non_neighbor_S.front(); + + alpha_S_k = edmonds_karp_max_flow + (flow_g, p, k, cap, res_cap, rev_edge, &color[0], &pred[0]); + + if (alpha_S_k < alpha_star) { + alpha_star = alpha_S_k; + S_star.clear(); + for (boost::tie(vi, vi_end) = vertices(flow_g); vi != vi_end; ++vi) + if (color[*vi] != Color::white()) + S_star.push_back(*vi); + } + S.insert(k); + neighbor_S.insert(k); + detail::neighbors(g, k, std::inserter(neighbor_S, neighbor_S.begin())); + non_neighbor_S.clear(); + boost::tie(vi, vi_end) = vertices(g); + std::set_difference(vi, vi_end, + neighbor_S.begin(), neighbor_S.end(), + std::back_inserter(non_neighbor_S)); + } + //------------------------------------------------------------------------- + // Compute edges of the cut [S*, ~S*] + std::vector in_S_star(num_vertices(g), false); + typename std::vector::iterator si; + for (si = S_star.begin(); si != S_star.end(); ++si) + in_S_star[*si] = true; + + degree_size_type c = 0; + for (si = S_star.begin(); si != S_star.end(); ++si) { + out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(*si, g); ei != ei_end; ++ei) + if (!in_S_star[target(*ei, g)]) { + *disconnecting_set++ = *ei; + ++c; + } + } + return c; + } + +} // namespace boost + +#endif // BOOST_EDGE_CONNECTIVITY diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/edge_list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/edge_list.hpp new file mode 100644 index 0000000000..5f0265efa7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/edge_list.hpp @@ -0,0 +1,304 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +#ifndef BOOST_GRAPH_EDGE_LIST_HPP +#define BOOST_GRAPH_EDGE_LIST_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + // + // The edge_list class is an EdgeListGraph module that is constructed + // from a pair of iterators whose value type is a pair of vertex + // descriptors. + // + // For example: + // + // typedef std::pair E; + // list elist; + // ... + // typedef edge_list::iterator> Graph; + // Graph g(elist.begin(), elist.end()); + // + // If the iterators are random access, then Graph::edge_descriptor + // is of Integral type, otherwise it is a struct, though it is + // convertible to an Integral type. + // + + struct edge_list_tag { }; + + // The implementation class for edge_list. + template + class edge_list_impl + { + public: + typedef D edge_id; + typedef T Vpair; + typedef typename Vpair::first_type V; + typedef V vertex_descriptor; + typedef edge_list_tag graph_tag; + typedef void edge_property_type; + + struct edge_descriptor + { + edge_descriptor() { } + edge_descriptor(EdgeIter p, edge_id id) : _ptr(p), _id(id) { } + operator edge_id() { return _id; } + EdgeIter _ptr; + edge_id _id; + }; + typedef edge_descriptor E; + + struct edge_iterator + { + typedef edge_iterator self; + typedef E value_type; + typedef E& reference; + typedef E* pointer; + typedef std::ptrdiff_t difference_type; + typedef std::input_iterator_tag iterator_category; + edge_iterator() { } + edge_iterator(EdgeIter iter) : _iter(iter), _i(0) { } + E operator*() { return E(_iter, _i); } + self& operator++() { ++_iter; ++_i; return *this; } + self operator++(int) { self t = *this; ++(*this); return t; } + bool operator==(const self& x) { return _iter == x._iter; } + bool operator!=(const self& x) { return _iter != x._iter; } + EdgeIter _iter; + edge_id _i; + }; + typedef void out_edge_iterator; + typedef void in_edge_iterator; + typedef void adjacency_iterator; + typedef void vertex_iterator; + }; + + template + std::pair::edge_iterator, + typename edge_list_impl::edge_iterator> + edges(const edge_list_impl& g_) { + const G& g = static_cast(g_); + typedef typename edge_list_impl::edge_iterator edge_iterator; + return std::make_pair(edge_iterator(g._first), edge_iterator(g._last)); + } + template + typename edge_list_impl::vertex_descriptor + source(typename edge_list_impl::edge_descriptor e, + const edge_list_impl&) { + return (*e._ptr).first; + } + template + typename edge_list_impl::vertex_descriptor + target(typename edge_list_impl::edge_descriptor e, + const edge_list_impl&) { + return (*e._ptr).second; + } + + template + class el_edge_property_map + : public put_get_helper >{ + public: + typedef E key_type; + typedef D value_type; + typedef D reference; + typedef readable_property_map_tag category; + + value_type operator[](key_type e) const { + return e._i; + } + }; + struct edge_list_edge_property_selector { + template + struct bind_ { + typedef el_edge_property_map type; + typedef type const_type; + }; + }; + template <> + struct edge_property_selector { + typedef edge_list_edge_property_selector type; + }; + + template + typename property_map< edge_list_impl, edge_index_t>::type + get(edge_index_t, const edge_list_impl&) { + typedef typename property_map< edge_list_impl, + edge_index_t>::type EdgeIndexMap; + return EdgeIndexMap(); + } + + template + inline D + get(edge_index_t, const edge_list_impl&, + typename edge_list_impl::edge_descriptor e) { + return e._i; + } + + // A specialized implementation for when the iterators are random access. + + struct edge_list_ra_tag { }; + + template + class edge_list_impl_ra + { + public: + typedef D edge_id; + typedef T Vpair; + typedef typename Vpair::first_type V; + typedef edge_list_ra_tag graph_tag; + typedef void edge_property_type; + + typedef edge_id edge_descriptor; + typedef V vertex_descriptor; + typedef typename boost::integer_range::iterator edge_iterator; + typedef void out_edge_iterator; + typedef void in_edge_iterator; + typedef void adjacency_iterator; + typedef void vertex_iterator; + }; + + template + std::pair::edge_iterator, + typename edge_list_impl_ra::edge_iterator> + edges(const edge_list_impl_ra& g_) + { + const G& g = static_cast(g_); + typedef typename edge_list_impl_ra::edge_iterator edge_iterator; + return std::make_pair(edge_iterator(0), edge_iterator(g._last - g._first)); + } + template + typename edge_list_impl_ra::vertex_descriptor + source(typename edge_list_impl_ra::edge_descriptor e, + const edge_list_impl_ra& g_) + { + const G& g = static_cast(g_); + return g._first[e].first; + } + template + typename edge_list_impl_ra::vertex_descriptor + target(typename edge_list_impl_ra::edge_descriptor e, + const edge_list_impl_ra& g_) + { + const G& g = static_cast(g_); + return g._first[e].second; + } + template + class el_ra_edge_property_map + : public put_get_helper >{ + public: + typedef E key_type; + typedef E value_type; + typedef E reference; + typedef readable_property_map_tag category; + + value_type operator[](key_type e) const { + return e; + } + }; + struct edge_list_ra_edge_property_selector { + template + struct bind_ { + typedef el_ra_edge_property_map type; + typedef type const_type; + }; + }; + template <> + struct edge_property_selector { + typedef edge_list_ra_edge_property_selector type; + }; + template + inline + typename property_map< edge_list_impl_ra, edge_index_t>::type + get(edge_index_t, const edge_list_impl_ra&) { + typedef typename property_map< edge_list_impl_ra, + edge_index_t>::type EdgeIndexMap; + return EdgeIndexMap(); + } + + template + inline D + get(edge_index_t, const edge_list_impl_ra&, + typename edge_list_impl_ra::edge_descriptor e) { + return e; + } + + + // Some helper classes for determining if the iterators are random access + template + struct is_random { + enum { RET = false }; + typedef mpl::false_ type; + }; + template <> + struct is_random { + enum { RET = true }; typedef mpl::true_ type; + }; + + // The edge_list class conditionally inherits from one of the + // above two classes. + + template ::value_type, + class D = typename std::iterator_traits::difference_type, + class Cat = typename std::iterator_traits::iterator_category> +#else + class T, + class D, + class Cat> +#endif + class edge_list + : public mpl::if_< typename is_random::type, + edge_list_impl_ra< edge_list, EdgeIter,T,D>, + edge_list_impl< edge_list, EdgeIter,T,D> + >::type + { + public: + typedef directed_tag directed_category; + typedef allow_parallel_edge_tag edge_parallel_category; + typedef edge_list_graph_tag traversal_category; + typedef std::size_t edges_size_type; + typedef std::size_t vertices_size_type; + typedef std::size_t degree_size_type; + edge_list(EdgeIter first, EdgeIter last) : _first(first), _last(last) { + m_num_edges = std::distance(first, last); + } + edge_list(EdgeIter first, EdgeIter last, edges_size_type E) + : _first(first), _last(last), m_num_edges(E) { } + + EdgeIter _first, _last; + edges_size_type m_num_edges; + }; + + template + std::size_t num_edges(const edge_list& el) { + return el.m_num_edges; + } + +#ifndef BOOST_NO_STD_ITERATOR_TRAITS + template + inline edge_list + make_edge_list(EdgeIter first, EdgeIter last) + { + return edge_list(first, last); + } +#endif + +} /* namespace boost */ + +#endif /* BOOST_GRAPH_EDGE_LIST_HPP */ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/edmonds_karp_max_flow.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/edmonds_karp_max_flow.hpp new file mode 100644 index 0000000000..43cc592d2e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/edmonds_karp_max_flow.hpp @@ -0,0 +1,250 @@ +//======================================================================= +// Copyright 2000 University of Notre Dame. +// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef EDMONDS_KARP_MAX_FLOW_HPP +#define EDMONDS_KARP_MAX_FLOW_HPP + +#include +#include +#include // for std::min and std::max +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + // The "labeling" algorithm from "Network Flows" by Ahuja, Magnanti, + // Orlin. I think this is the same as or very similar to the original + // Edmonds-Karp algorithm. This solves the maximum flow problem. + + namespace detail { + + template + filtered_graph > + residual_graph(Graph& g, ResCapMap residual_capacity) { + return filtered_graph > + (g, is_residual_edge(residual_capacity)); + } + + template + inline void + augment(Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + PredEdgeMap p, + ResCapMap residual_capacity, + RevEdgeMap reverse_edge) + { + typename graph_traits::edge_descriptor e; + typename graph_traits::vertex_descriptor u; + typedef typename property_traits::value_type FlowValue; + + // find minimum residual capacity along the augmenting path + FlowValue delta = (std::numeric_limits::max)(); + e = p[sink]; + do { + BOOST_USING_STD_MIN(); + delta = min BOOST_PREVENT_MACRO_SUBSTITUTION(delta, residual_capacity[e]); + u = source(e, g); + e = p[u]; + } while (u != src); + + // push delta units of flow along the augmenting path + e = p[sink]; + do { + residual_capacity[e] -= delta; + residual_capacity[reverse_edge[e]] += delta; + u = source(e, g); + e = p[u]; + } while (u != src); + } + + } // namespace detail + + template + typename property_traits::value_type + edmonds_karp_max_flow + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + CapacityEdgeMap cap, + ResidualCapacityEdgeMap res, + ReverseEdgeMap rev, + ColorMap color, + PredEdgeMap pred) + { + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + + typename graph_traits::vertex_iterator u_iter, u_end; + typename graph_traits::out_edge_iterator ei, e_end; + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) + for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei) + res[*ei] = cap[*ei]; + + color[sink] = Color::gray(); + while (color[sink] != Color::white()) { + boost::queue Q; + breadth_first_search + (detail::residual_graph(g, res), src, Q, + make_bfs_visitor(record_edge_predecessors(pred, on_tree_edge())), + color); + if (color[sink] != Color::white()) + detail::augment(g, src, sink, pred, res, rev); + } // while + + typename property_traits::value_type flow = 0; + for (boost::tie(ei, e_end) = out_edges(src, g); ei != e_end; ++ei) + flow += (cap[*ei] - res[*ei]); + return flow; + } // edmonds_karp_max_flow() + + namespace detail { + //------------------------------------------------------------------------- + // Handle default for color property map + + // use of class here is a VC++ workaround + template + struct edmonds_karp_dispatch2 { + template + static typename edge_capacity_value::type + apply + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + PredMap pred, + const bgl_named_params& params, + ColorMap color) + { + return edmonds_karp_max_flow + (g, src, sink, + choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity), + choose_pmap(get_param(params, edge_residual_capacity), + g, edge_residual_capacity), + choose_const_pmap(get_param(params, edge_reverse), g, edge_reverse), + color, pred); + } + }; + template<> + struct edmonds_karp_dispatch2 { + template + static typename edge_capacity_value::type + apply + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + PredMap pred, + const bgl_named_params& params, + detail::error_property_not_found) + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::vertices_size_type size_type; + size_type n = is_default_param(get_param(params, vertex_color)) ? + num_vertices(g) : 1; + std::vector color_vec(n); + return edmonds_karp_max_flow + (g, src, sink, + choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity), + choose_pmap(get_param(params, edge_residual_capacity), + g, edge_residual_capacity), + choose_const_pmap(get_param(params, edge_reverse), g, edge_reverse), + make_iterator_property_map(color_vec.begin(), choose_const_pmap + (get_param(params, vertex_index), + g, vertex_index), color_vec[0]), + pred); + } + }; + + //------------------------------------------------------------------------- + // Handle default for predecessor property map + + // use of class here is a VC++ workaround + template + struct edmonds_karp_dispatch1 { + template + static typename edge_capacity_value::type + apply(Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + const bgl_named_params& params, + PredMap pred) + { + typedef typename property_value< bgl_named_params, vertex_color_t>::type C; + return edmonds_karp_dispatch2::apply + (g, src, sink, pred, params, get_param(params, vertex_color)); + } + }; + template<> + struct edmonds_karp_dispatch1 { + + template + static typename edge_capacity_value::type + apply + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + const bgl_named_params& params, + detail::error_property_not_found) + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::vertices_size_type size_type; + size_type n = is_default_param(get_param(params, vertex_predecessor)) ? + num_vertices(g) : 1; + std::vector pred_vec(n); + + typedef typename property_value< bgl_named_params, vertex_color_t>::type C; + return edmonds_karp_dispatch2::apply + (g, src, sink, + make_iterator_property_map(pred_vec.begin(), choose_const_pmap + (get_param(params, vertex_index), + g, vertex_index), pred_vec[0]), + params, + get_param(params, vertex_color)); + } + }; + + } // namespace detail + + template + typename detail::edge_capacity_value::type + edmonds_karp_max_flow + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + const bgl_named_params& params) + { + typedef typename property_value< bgl_named_params, vertex_predecessor_t>::type Pred; + return detail::edmonds_karp_dispatch1::apply + (g, src, sink, params, get_param(params, vertex_predecessor)); + } + + template + typename property_traits< + typename property_map::const_type + >::value_type + edmonds_karp_max_flow + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) + { + bgl_named_params params(0); + return edmonds_karp_max_flow(g, src, sink, params); + } + +} // namespace boost + +#endif // EDMONDS_KARP_MAX_FLOW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/edmunds_karp_max_flow.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/edmunds_karp_max_flow.hpp new file mode 100644 index 0000000000..3697db2080 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/edmunds_karp_max_flow.hpp @@ -0,0 +1,19 @@ +//======================================================================= +// (c) Copyright Juergen Hunold 2008 +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_DEPRECATED_INCLUDE_EDMONDS_KARP_MAX_FLOW_HPP +#define BOOST_DEPRECATED_INCLUDE_EDMONDS_KARP_MAX_FLOW_HPP + +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) +# pragma message ("Warning: This header is deprecated. Please use: boost/graph/edmonds_karp_max_flow.hpp") +#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) +# warning "This header is deprecated. Please use: boost/graph/edmonds_karp_max_flow.hpp" +#endif + +#include + +#endif // BOOST_DEPRECATED_INCLUDE_EDMONDS_KARP_MAX_FLOW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/erdos_renyi_generator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/erdos_renyi_generator.hpp new file mode 100644 index 0000000000..a459441683 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/erdos_renyi_generator.hpp @@ -0,0 +1,195 @@ +// Copyright 2004, 2005 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_ERDOS_RENYI_GENERATOR_HPP +#define BOOST_GRAPH_ERDOS_RENYI_GENERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + class erdos_renyi_iterator + : public iterator_facade< + erdos_renyi_iterator, + std::pair::vertices_size_type, + typename graph_traits::vertices_size_type>, + std::input_iterator_tag, + const + std::pair::vertices_size_type, + typename graph_traits::vertices_size_type>&> + { + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + + BOOST_STATIC_CONSTANT + (bool, + is_undirected = (is_base_of::value)); + + public: + erdos_renyi_iterator() : gen(), n(0), edges(0), allow_self_loops(false) {} + erdos_renyi_iterator(RandomGenerator& gen, vertices_size_type n, + double fraction = 0.0, bool allow_self_loops = false) + : gen(&gen), n(n), edges(edges_size_type(fraction * n * n)), + allow_self_loops(allow_self_loops) + { + if (is_undirected) edges = edges / 2; + next(); + } + + erdos_renyi_iterator(RandomGenerator& gen, vertices_size_type n, + edges_size_type m, bool allow_self_loops = false) + : gen(&gen), n(n), edges(m), + allow_self_loops(allow_self_loops) + { + next(); + } + + const std::pair& + dereference() const { return current; } + + void increment() { + --edges; + next(); + } + + bool equal(const erdos_renyi_iterator& other) const + { return edges == other.edges; } + + private: + void next() + { + uniform_int rand_vertex(0, n-1); + current.first = rand_vertex(*gen); + do { + current.second = rand_vertex(*gen); + } while (current.first == current.second && !allow_self_loops); + } + + RandomGenerator* gen; + vertices_size_type n; + edges_size_type edges; + bool allow_self_loops; + std::pair current; + }; + + template + class sorted_erdos_renyi_iterator + : public iterator_facade< + sorted_erdos_renyi_iterator, + std::pair::vertices_size_type, + typename graph_traits::vertices_size_type>, + std::input_iterator_tag, + const + std::pair::vertices_size_type, + typename graph_traits::vertices_size_type>&> + { + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + + BOOST_STATIC_CONSTANT + (bool, + is_undirected = (is_base_of::value)); + + public: + sorted_erdos_renyi_iterator() + : gen(), rand_vertex(0.5), n(0), allow_self_loops(false) + , src((std::numeric_limits::max)()), + tgt_index(vertices_size_type(-1)), prob(.5) + { } + + // NOTE: The default probability has been changed to be the same as that + // used by the geometic distribution. It was previously 0.0, which would + // cause an assertion. + sorted_erdos_renyi_iterator(RandomGenerator& gen, vertices_size_type n, + double prob = 0.5, + bool loops = false) + : gen(), rand_vertex(1. - prob), n(n), allow_self_loops(loops), src(0) + , tgt_index(vertices_size_type(-1)), prob(prob) + { + this->gen.reset(new uniform_01(&gen)); + + if (prob == 0.0) {src = (std::numeric_limits::max)(); return;} + next(); + } + + const std::pair& + dereference() const { + return current; + } + + bool equal(const sorted_erdos_renyi_iterator& o) const { + return src == o.src && tgt_index == o.tgt_index; + } + + void increment() { + next(); + } + + private: + void next() + { + // In order to get the edges from the generator in sorted order, one + // effective (but slow) procedure would be to use a + // bernoulli_distribution for each legal (src, tgt_index) pair. Because of + // the O(|V|^2) cost of that, a geometric distribution is used. The + // geometric distribution tells how many times the + // bernoulli_distribution would need to be run until it returns true. + // Thus, this distribution can be used to step through the edges + // which are actually present. + assert (src != (std::numeric_limits::max)() && + src != n); + while (src != n) { + vertices_size_type increment = rand_vertex(*gen); + size_t tgt_index_limit = + (is_undirected ? src + 1 : n) + + (allow_self_loops ? 0 : -1); + if (tgt_index + increment >= tgt_index_limit) { + // Overflowed this source; go to the next one and try again. + ++src; + // This bias is because the geometric distribution always returns + // values >=1, and we want to allow 0 as a valid target. + tgt_index = vertices_size_type(-1); + continue; + } else { + tgt_index += increment; + current.first = src; + current.second = + tgt_index + + (!allow_self_loops && !is_undirected && tgt_index >= src ? 1 : 0); + break; + } + } + if (src == n) src = (std::numeric_limits::max)(); + } + + shared_ptr > gen; + geometric_distribution rand_vertex; + vertices_size_type n; + bool allow_self_loops; + vertices_size_type src, tgt_index; + std::pair current; + double prob; + }; + +} // end namespace boost + +#endif // BOOST_GRAPH_ERDOS_RENYI_GENERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/exception.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/exception.hpp new file mode 100644 index 0000000000..382d671928 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/exception.hpp @@ -0,0 +1,55 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_EXCEPTION_HPP +#define BOOST_GRAPH_EXCEPTION_HPP + +#include +#include + +namespace boost { + + struct bad_graph : public std::invalid_argument { + bad_graph(const std::string& what_arg) + : std::invalid_argument(what_arg) { } + }; + + struct not_a_dag : public bad_graph { + not_a_dag() + : bad_graph("The graph must be a DAG.") + { } + }; + + struct negative_edge : public bad_graph { + negative_edge() + : bad_graph("The graph may not contain an edge with negative weight.") + { } + }; + + struct negative_cycle : public bad_graph { + negative_cycle() + : bad_graph("The graph may not contain negative cycles.") + { } + }; + + struct not_connected : public bad_graph { + not_connected() + : bad_graph("The graph must be connected.") + { } + }; + + struct not_complete : public bad_graph { + not_complete() + : bad_graph("The graph must be complete.") + { } + }; + +} // namespace boost + +#endif // BOOST_GRAPH_EXCEPTION_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/exterior_property.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/exterior_property.hpp new file mode 100644 index 0000000000..af6df8180b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/exterior_property.hpp @@ -0,0 +1,117 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_EXTERIOR_PROPERTY_HPP +#define BOOST_GRAPH_EXTERIOR_PROPERTY_HPP + +#include +#include +#include + +namespace boost { +namespace detail { + // The vector matrix provides a little abstraction over vector + // types that makes matrices easier to work with. Note that it's + // non-copyable, meaning you should be passing it by value. + template + struct vector_matrix + { + typedef std::vector container_type; + typedef std::vector matrix_type; + + typedef container_type value_type; + typedef container_type& reference; + typedef const container_type const_reference; + typedef container_type* pointer; + typedef typename matrix_type::size_type size_type; + + // Instantiate the matrix over n elements (creates an nxn matrix). + // The graph has to be passed in order to ensure the index maps + // are constructed correctly when returning indexible elements. + inline vector_matrix(size_type n) + : m_matrix(n, container_type(n)) + { } + + inline reference operator [](size_type n) + { return m_matrix[n]; } + + inline const_reference operator [](size_type n) const + { return m_matrix[n]; } + + matrix_type m_matrix; + }; +} /* namespace detail */ + +/** + * The exterior_property metafunction defines an appropriate set of types for + * creating an exterior property. An exterior property is comprised of a both + * a container and a property map that acts as its abstraction. An extension + * of this metafunction will select an appropriate "matrix" property that + * records values for pairs of vertices. + * + * @todo This does not currently support the ability to define exterior + * properties for graph types that do not model the IndexGraph concepts. A + * solution should not be especially difficult, but will require an extension + * of type traits to affect the type selection. + */ +template +struct exterior_property +{ + typedef Key key_type; + typedef Value value_type; + + typedef std::vector container_type; + typedef container_property_map map_type; + + typedef detail::vector_matrix matrix_type; + typedef matrix_property_map matrix_map_type; + +private: + exterior_property() { } + exterior_property(const exterior_property&) { } +}; + +/** + * Define a the container and property map types requried to create an exterior + * vertex property for the given value type. The Graph parameter is required to + * model the VertexIndexGraph concept. + */ +template +struct exterior_vertex_property +{ + typedef exterior_property< + Graph, typename graph_traits::vertex_descriptor, Value + > property_type; + typedef typename property_type::key_type key_type; + typedef typename property_type::value_type value_type; + typedef typename property_type::container_type container_type; + typedef typename property_type::map_type map_type; + typedef typename property_type::matrix_type matrix_type; + typedef typename property_type::matrix_map_type matrix_map_type; +}; + +/** + * Define a the container and property map types requried to create an exterior + * edge property for the given value type. The Graph parameter is required to + * model the EdgeIndexGraph concept. + */ +template +struct exterior_edge_property +{ + typedef exterior_property< + Graph, typename graph_traits::edge_descriptor, Value + > property_type; + typedef typename property_type::key_type key_type; + typedef typename property_type::value_type value_type; + typedef typename property_type::container_type container_type; + typedef typename property_type::map_type map_type; + typedef typename property_type::matrix_type matrix_type; + typedef typename property_type::matrix_map_type matrix_map_type; +}; + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/filtered_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/filtered_graph.hpp new file mode 100644 index 0000000000..764b2d7d1c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/filtered_graph.hpp @@ -0,0 +1,536 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_FILTERED_GRAPH_HPP +#define BOOST_FILTERED_GRAPH_HPP + +#include +#include +#include +#include +#include + +namespace boost { + + //========================================================================= + // Some predicate classes. + + struct keep_all { + template + bool operator()(const T&) const { return true; } + }; + + // Keep residual edges (used in maximum-flow algorithms). + template + struct is_residual_edge { + is_residual_edge() { } + is_residual_edge(ResidualCapacityEdgeMap rcap) : m_rcap(rcap) { } + template + bool operator()(const Edge& e) const { + return 0 < get(m_rcap, e); + } + ResidualCapacityEdgeMap m_rcap; + }; + + template + struct is_in_subset { + is_in_subset() : m_s(0) { } + is_in_subset(const Set& s) : m_s(&s) { } + + template + bool operator()(const Elt& x) const { + return set_contains(*m_s, x); + } + const Set* m_s; + }; + + template + struct is_not_in_subset { + is_not_in_subset() : m_s(0) { } + is_not_in_subset(const Set& s) : m_s(&s) { } + + template + bool operator()(const Elt& x) const { + return !set_contains(*m_s, x); + } + const Set* m_s; + }; + + namespace detail { + + template + struct out_edge_predicate { + out_edge_predicate() { } + out_edge_predicate(EdgePredicate ep, VertexPredicate vp, + const Graph& g) + : m_edge_pred(ep), m_vertex_pred(vp), m_g(&g) { } + + template + bool operator()(const Edge& e) const { + return m_edge_pred(e) && m_vertex_pred(target(e, *m_g)); + } + EdgePredicate m_edge_pred; + VertexPredicate m_vertex_pred; + const Graph* m_g; + }; + + template + struct in_edge_predicate { + in_edge_predicate() { } + in_edge_predicate(EdgePredicate ep, VertexPredicate vp, + const Graph& g) + : m_edge_pred(ep), m_vertex_pred(vp), m_g(&g) { } + + template + bool operator()(const Edge& e) const { + return m_edge_pred(e) && m_vertex_pred(source(e, *m_g)); + } + EdgePredicate m_edge_pred; + VertexPredicate m_vertex_pred; + const Graph* m_g; + }; + + template + struct edge_predicate { + edge_predicate() { } + edge_predicate(EdgePredicate ep, VertexPredicate vp, + const Graph& g) + : m_edge_pred(ep), m_vertex_pred(vp), m_g(&g) { } + + template + bool operator()(const Edge& e) const { + return m_edge_pred(e) + && m_vertex_pred(source(e, *m_g)) && m_vertex_pred(target(e, *m_g)); + } + EdgePredicate m_edge_pred; + VertexPredicate m_vertex_pred; + const Graph* m_g; + }; + + } // namespace detail + + + //=========================================================================== + // Filtered Graph + + struct filtered_graph_tag { }; + + // This base class is a stupid hack to change overload resolution + // rules for the source and target functions so that they are a + // worse match than the source and target functions defined for + // pairs in graph_traits.hpp. I feel dirty. -JGS + template + struct filtered_graph_base { + typedef graph_traits Traits; + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::edge_descriptor edge_descriptor; + filtered_graph_base(const G& g) : m_g(g) { } + //protected: + const G& m_g; + }; + + template + class filtered_graph : public filtered_graph_base { + typedef filtered_graph_base Base; + typedef graph_traits Traits; + typedef filtered_graph self; + public: + typedef Graph graph_type; + typedef detail::out_edge_predicate OutEdgePred; + typedef detail::in_edge_predicate InEdgePred; + typedef detail::edge_predicate EdgePred; + + // Constructors + filtered_graph(const Graph& g, EdgePredicate ep) + : Base(g), m_edge_pred(ep) { } + + filtered_graph(const Graph& g, EdgePredicate ep, VertexPredicate vp) + : Base(g), m_edge_pred(ep), m_vertex_pred(vp) { } + + // Graph requirements + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::edge_descriptor edge_descriptor; + typedef typename Traits::directed_category directed_category; + typedef typename Traits::edge_parallel_category edge_parallel_category; + typedef typename Traits::traversal_category traversal_category; + + // IncidenceGraph requirements + typedef filter_iterator< + OutEdgePred, typename Traits::out_edge_iterator + > out_edge_iterator; + + typedef typename Traits::degree_size_type degree_size_type; + + // AdjacencyGraph requirements + typedef typename adjacency_iterator_generator::type adjacency_iterator; + + // BidirectionalGraph requirements + typedef filter_iterator< + InEdgePred, typename Traits::in_edge_iterator + > in_edge_iterator; + + // VertexListGraph requirements + typedef filter_iterator< + VertexPredicate, typename Traits::vertex_iterator + > vertex_iterator; + typedef typename Traits::vertices_size_type vertices_size_type; + + // EdgeListGraph requirements + typedef filter_iterator< + EdgePred, typename Traits::edge_iterator + > edge_iterator; + typedef typename Traits::edges_size_type edges_size_type; + + typedef filtered_graph_tag graph_tag; + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + // Bundled properties support + template + typename graph::detail::bundled_result::type& + operator[](Descriptor x) + { return const_cast(this->m_g)[x]; } + + template + typename graph::detail::bundled_result::type const& + operator[](Descriptor x) const + { return this->m_g[x]; } +#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES + + static vertex_descriptor null_vertex() + { + return Graph::null_vertex(); + } + + //private: + EdgePredicate m_edge_pred; + VertexPredicate m_vertex_pred; + }; + + // Do not instantiate these unless needed + template + struct vertex_property_type > { + typedef typename vertex_property_type::type type; + }; + + template + struct edge_property_type > { + typedef typename edge_property_type::type type; + }; + + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + template + struct vertex_bundle_type > + : vertex_bundle_type { }; + + template + struct edge_bundle_type > + : edge_bundle_type { }; +#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES + + //=========================================================================== + // Non-member functions for the Filtered Edge Graph + + // Helper functions + template + inline filtered_graph + make_filtered_graph(Graph& g, EdgePredicate ep) { + return filtered_graph(g, ep); + } + template + inline filtered_graph + make_filtered_graph(Graph& g, EdgePredicate ep, VertexPredicate vp) { + return filtered_graph(g, ep, vp); + } + + template + inline filtered_graph + make_filtered_graph(const Graph& g, EdgePredicate ep) { + return filtered_graph(g, ep); + } + template + inline filtered_graph + make_filtered_graph(const Graph& g, EdgePredicate ep, VertexPredicate vp) { + return filtered_graph(g, ep, vp); + } + + template + std::pair::vertex_iterator, + typename filtered_graph::vertex_iterator> + vertices(const filtered_graph& g) + { + typedef filtered_graph Graph; + typename graph_traits::vertex_iterator f, l; + boost::tie(f, l) = vertices(g.m_g); + typedef typename Graph::vertex_iterator iter; + return std::make_pair(iter(g.m_vertex_pred, f, l), + iter(g.m_vertex_pred, l, l)); + } + + template + std::pair::edge_iterator, + typename filtered_graph::edge_iterator> + edges(const filtered_graph& g) + { + typedef filtered_graph Graph; + typename Graph::EdgePred pred(g.m_edge_pred, g.m_vertex_pred, g); + typename graph_traits::edge_iterator f, l; + boost::tie(f, l) = edges(g.m_g); + typedef typename Graph::edge_iterator iter; + return std::make_pair(iter(pred, f, l), iter(pred, l, l)); + } + + // An alternative for num_vertices() and num_edges() would be to + // count the number in the filtered graph. This is problematic + // because of the interaction with the vertex indices... they would + // no longer go from 0 to num_vertices(), which would cause trouble + // for algorithms allocating property storage in an array. We could + // try to create a mapping to new recalibrated indices, but I don't + // see an efficient way to do this. + // + // However, the current solution is still unsatisfactory because + // the following semantic constraints no longer hold: + // boost::tie(vi, viend) = vertices(g); + // assert(std::distance(vi, viend) == num_vertices(g)); + + template + typename filtered_graph::vertices_size_type + num_vertices(const filtered_graph& g) { + return num_vertices(g.m_g); + } + + template + typename filtered_graph::edges_size_type + num_edges(const filtered_graph& g) { + return num_edges(g.m_g); + } + + template + typename filtered_graph_base::vertex_descriptor + source(typename filtered_graph_base::edge_descriptor e, + const filtered_graph_base& g) + { + return source(e, g.m_g); + } + + template + typename filtered_graph_base::vertex_descriptor + target(typename filtered_graph_base::edge_descriptor e, + const filtered_graph_base& g) + { + return target(e, g.m_g); + } + + template + std::pair::out_edge_iterator, + typename filtered_graph::out_edge_iterator> + out_edges(typename filtered_graph::vertex_descriptor u, + const filtered_graph& g) + { + typedef filtered_graph Graph; + typename Graph::OutEdgePred pred(g.m_edge_pred, g.m_vertex_pred, g); + typedef typename Graph::out_edge_iterator iter; + typename graph_traits::out_edge_iterator f, l; + boost::tie(f, l) = out_edges(u, g.m_g); + return std::make_pair(iter(pred, f, l), iter(pred, l, l)); + } + + template + typename filtered_graph::degree_size_type + out_degree(typename filtered_graph::vertex_descriptor u, + const filtered_graph& g) + { + typename filtered_graph::degree_size_type n = 0; + typename filtered_graph::out_edge_iterator f, l; + for (boost::tie(f, l) = out_edges(u, g); f != l; ++f) + ++n; + return n; + } + + template + std::pair::adjacency_iterator, + typename filtered_graph::adjacency_iterator> + adjacent_vertices(typename filtered_graph::vertex_descriptor u, + const filtered_graph& g) + { + typedef filtered_graph Graph; + typedef typename Graph::adjacency_iterator adjacency_iterator; + typename Graph::out_edge_iterator f, l; + boost::tie(f, l) = out_edges(u, g); + return std::make_pair(adjacency_iterator(f, const_cast(&g)), + adjacency_iterator(l, const_cast(&g))); + } + + template + std::pair::in_edge_iterator, + typename filtered_graph::in_edge_iterator> + in_edges(typename filtered_graph::vertex_descriptor u, + const filtered_graph& g) + { + typedef filtered_graph Graph; + typename Graph::InEdgePred pred(g.m_edge_pred, g.m_vertex_pred, g); + typedef typename Graph::in_edge_iterator iter; + typename graph_traits::in_edge_iterator f, l; + boost::tie(f, l) = in_edges(u, g.m_g); + return std::make_pair(iter(pred, f, l), iter(pred, l, l)); + } + + template + typename filtered_graph::degree_size_type + in_degree(typename filtered_graph::vertex_descriptor u, + const filtered_graph& g) + { + typename filtered_graph::degree_size_type n = 0; + typename filtered_graph::in_edge_iterator f, l; + for (boost::tie(f, l) = in_edges(u, g); f != l; ++f) + ++n; + return n; + } + + template + std::pair::edge_descriptor, bool> + edge(typename filtered_graph::vertex_descriptor u, + typename filtered_graph::vertex_descriptor v, + const filtered_graph& g) + { + typename graph_traits::edge_descriptor e; + bool exists; + boost::tie(e, exists) = edge(u, v, g.m_g); + return std::make_pair(e, exists && g.m_edge_pred(e)); + } + + template + std::pair::out_edge_iterator, + typename filtered_graph::out_edge_iterator> + edge_range(typename filtered_graph::vertex_descriptor u, + typename filtered_graph::vertex_descriptor v, + const filtered_graph& g) + { + typedef filtered_graph Graph; + typename Graph::OutEdgePred pred(g.m_edge_pred, g.m_vertex_pred, g); + typedef typename Graph::out_edge_iterator iter; + typename graph_traits::out_edge_iterator f, l; + boost::tie(f, l) = edge_range(u, v, g.m_g); + return std::make_pair(iter(pred, f, l), iter(pred, l, l)); + } + + + //=========================================================================== + // Property map + + template + struct property_map, Property> + : property_map {}; + + template + typename property_map::type + get(Property p, filtered_graph& g) + { + return get(p, const_cast(g.m_g)); + } + + template + typename property_map::const_type + get(Property p, const filtered_graph& g) + { + return get(p, (const G&)g.m_g); + } + + template + typename property_map_value::type + get(Property p, const filtered_graph& g, const Key& k) + { + return get(p, (const G&)g.m_g, k); + } + + template + void + put(Property p, const filtered_graph& g, const Key& k, + const Value& val) + { + put(p, const_cast(g.m_g), k, val); + } + + //=========================================================================== + // Some filtered subgraph specializations + + template + struct vertex_subset_filter { + typedef filtered_graph > type; + }; + template + inline typename vertex_subset_filter::type + make_vertex_subset_filter(Graph& g, const Set& s) { + typedef typename vertex_subset_filter::type Filter; + is_in_subset p(s); + return Filter(g, keep_all(), p); + } + + // This is misspelled, but present for backwards compatibility; new code + // should use the version below that has the correct spelling. + template + struct vertex_subset_compliment_filter { + typedef filtered_graph > type; + }; + template + inline typename vertex_subset_compliment_filter::type + make_vertex_subset_compliment_filter(Graph& g, const Set& s) { + typedef typename vertex_subset_compliment_filter::type Filter; + is_not_in_subset p(s); + return Filter(g, keep_all(), p); + } + + template + struct vertex_subset_complement_filter { + typedef filtered_graph > type; + }; + template + inline typename vertex_subset_complement_filter::type + make_vertex_subset_complement_filter(Graph& g, const Set& s) { + typedef typename vertex_subset_complement_filter::type Filter; + is_not_in_subset p(s); + return Filter(g, keep_all(), p); + } + + // Filter that uses a property map whose value_type is a boolean + template + struct property_map_filter { + + property_map_filter() { } + + property_map_filter(const PropertyMap& property_map) : + m_property_map(property_map) { } + + template + bool operator()(const Key& key) const { + return (get(m_property_map, key)); + } + + private : + PropertyMap m_property_map; + }; + +} // namespace boost + + +#endif // BOOST_FILTERED_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/floyd_warshall_shortest.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/floyd_warshall_shortest.hpp new file mode 100644 index 0000000000..48dba71267 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/floyd_warshall_shortest.hpp @@ -0,0 +1,251 @@ +// Copyright 2002 Rensselaer Polytechnic Institute + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Lauren Foutz +// Scott Hill + +/* + This file implements the functions + + template + bool floyd_warshall_initialized_all_pairs_shortest_paths( + const VertexListGraph& g, DistanceMatrix& d, + const bgl_named_params& params) + + AND + + template + bool floyd_warshall_all_pairs_shortest_paths( + const VertexAndEdgeListGraph& g, DistanceMatrix& d, + const bgl_named_params& params) +*/ + + +#ifndef BOOST_GRAPH_FLOYD_WARSHALL_HPP +#define BOOST_GRAPH_FLOYD_WARSHALL_HPP + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace detail { + template + T min_with_compare(const T& x, const T& y, const BinaryPredicate& compare) + { + if (compare(x, y)) return x; + else return y; + } + + template + bool floyd_warshall_dispatch(const VertexListGraph& g, + DistanceMatrix& d, const BinaryPredicate &compare, + const BinaryFunction &combine, const Infinity& inf, + const Zero& zero) + { + typename graph_traits::vertex_iterator + i, lasti, j, lastj, k, lastk; + + + for (boost::tie(k, lastk) = vertices(g); k != lastk; k++) + for (boost::tie(i, lasti) = vertices(g); i != lasti; i++) + if(d[*i][*k] != inf) + for (boost::tie(j, lastj) = vertices(g); j != lastj; j++) + if(d[*k][*j] != inf) + d[*i][*j] = + detail::min_with_compare(d[*i][*j], + combine(d[*i][*k], d[*k][*j]), + compare); + + + for (boost::tie(i, lasti) = vertices(g); i != lasti; i++) + if (compare(d[*i][*i], zero)) + return false; + return true; + } + } + + template + bool floyd_warshall_initialized_all_pairs_shortest_paths( + const VertexListGraph& g, DistanceMatrix& d, + const BinaryPredicate& compare, + const BinaryFunction& combine, const Infinity& inf, + const Zero& zero) + { + function_requires >(); + + return detail::floyd_warshall_dispatch(g, d, compare, combine, + inf, zero); + } + + + + template + bool floyd_warshall_all_pairs_shortest_paths( + const VertexAndEdgeListGraph& g, + DistanceMatrix& d, const WeightMap& w, + const BinaryPredicate& compare, const BinaryFunction& combine, + const Infinity& inf, const Zero& zero) + { + function_requires >(); + function_requires >(); + function_requires >(); + + typename graph_traits::vertex_iterator + firstv, lastv, firstv2, lastv2; + typename graph_traits::edge_iterator first, last; + + + for(boost::tie(firstv, lastv) = vertices(g); firstv != lastv; firstv++) + for(boost::tie(firstv2, lastv2) = vertices(g); firstv2 != lastv2; firstv2++) + d[*firstv][*firstv2] = inf; + + + for(boost::tie(firstv, lastv) = vertices(g); firstv != lastv; firstv++) + d[*firstv][*firstv] = zero; + + + for(boost::tie(first, last) = edges(g); first != last; first++) + { + if (d[source(*first, g)][target(*first, g)] != inf) { + d[source(*first, g)][target(*first, g)] = + detail::min_with_compare( + get(w, *first), + d[source(*first, g)][target(*first, g)], + compare); + } else + d[source(*first, g)][target(*first, g)] = get(w, *first); + } + + bool is_undirected = is_same::directed_category, + undirected_tag>::value; + if (is_undirected) + { + for(boost::tie(first, last) = edges(g); first != last; first++) + { + if (d[target(*first, g)][source(*first, g)] != inf) + d[target(*first, g)][source(*first, g)] = + detail::min_with_compare( + get(w, *first), + d[target(*first, g)][source(*first, g)], + compare); + else + d[target(*first, g)][source(*first, g)] = get(w, *first); + } + } + + + return detail::floyd_warshall_dispatch(g, d, compare, combine, + inf, zero); + } + + + namespace detail { + template + bool floyd_warshall_init_dispatch(const VertexListGraph& g, + DistanceMatrix& d, WeightMap /*w*/, + const bgl_named_params& params) + { + typedef typename property_traits::value_type WM; + + return floyd_warshall_initialized_all_pairs_shortest_paths(g, d, + choose_param(get_param(params, distance_compare_t()), + std::less()), + choose_param(get_param(params, distance_combine_t()), + closed_plus()), + choose_param(get_param(params, distance_inf_t()), + std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION()), + choose_param(get_param(params, distance_zero_t()), + WM())); + } + + + + template + bool floyd_warshall_noninit_dispatch(const VertexAndEdgeListGraph& g, + DistanceMatrix& d, WeightMap w, + const bgl_named_params& params) + { + typedef typename property_traits::value_type WM; + + return floyd_warshall_all_pairs_shortest_paths(g, d, w, + choose_param(get_param(params, distance_compare_t()), + std::less()), + choose_param(get_param(params, distance_combine_t()), + closed_plus()), + choose_param(get_param(params, distance_inf_t()), + std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION()), + choose_param(get_param(params, distance_zero_t()), + WM())); + } + + + } // namespace detail + + + + template + bool floyd_warshall_initialized_all_pairs_shortest_paths( + const VertexListGraph& g, DistanceMatrix& d, + const bgl_named_params& params) + { + return detail::floyd_warshall_init_dispatch(g, d, + choose_const_pmap(get_param(params, edge_weight), g, edge_weight), + params); + } + + template + bool floyd_warshall_initialized_all_pairs_shortest_paths( + const VertexListGraph& g, DistanceMatrix& d) + { + bgl_named_params params(0); + return detail::floyd_warshall_init_dispatch(g, d, + get(edge_weight, g), params); + } + + + + + template + bool floyd_warshall_all_pairs_shortest_paths( + const VertexAndEdgeListGraph& g, DistanceMatrix& d, + const bgl_named_params& params) + { + return detail::floyd_warshall_noninit_dispatch(g, d, + choose_const_pmap(get_param(params, edge_weight), g, edge_weight), + params); + } + + template + bool floyd_warshall_all_pairs_shortest_paths( + const VertexAndEdgeListGraph& g, DistanceMatrix& d) + { + bgl_named_params params(0); + return detail::floyd_warshall_noninit_dispatch(g, d, + get(edge_weight, g), params); + } + + +} // namespace boost + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/fruchterman_reingold.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/fruchterman_reingold.hpp new file mode 100644 index 0000000000..4ce502e83b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/fruchterman_reingold.hpp @@ -0,0 +1,442 @@ +// Copyright 2004, 2005 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_FRUCHTERMAN_REINGOLD_FORCE_DIRECTED_LAYOUT_HPP +#define BOOST_GRAPH_FRUCHTERMAN_REINGOLD_FORCE_DIRECTED_LAYOUT_HPP + +#include +#include +#include +#include +#include // For topology concepts +#include +#include +#include // for std::min and std::max +#include // for std::accumulate +#include // for std::sqrt and std::fabs +#include + +namespace boost { + +struct square_distance_attractive_force { + template + T + operator()(typename graph_traits::edge_descriptor, + T k, + T d, + const Graph&) const + { + return d * d / k; + } +}; + +struct square_distance_repulsive_force { + template + T + operator()(typename graph_traits::vertex_descriptor, + typename graph_traits::vertex_descriptor, + T k, + T d, + const Graph&) const + { + return k * k / d; + } +}; + +template +struct linear_cooling { + typedef T result_type; + + linear_cooling(std::size_t iterations) + : temp(T(iterations) / T(10)), step(0.1) { } + + linear_cooling(std::size_t iterations, T temp) + : temp(temp), step(temp / T(iterations)) { } + + T operator()() + { + T old_temp = temp; + temp -= step; + if (temp < T(0)) temp = T(0); + return old_temp; + } + + private: + T temp; + T step; +}; + +struct all_force_pairs +{ + template + void operator()(const Graph& g, ApplyForce apply_force) + { + typedef typename graph_traits::vertex_iterator vertex_iterator; + vertex_iterator v, end; + for (boost::tie(v, end) = vertices(g); v != end; ++v) { + vertex_iterator u = v; + for (++u; u != end; ++u) { + apply_force(*u, *v); + apply_force(*v, *u); + } + } + } +}; + +template +struct grid_force_pairs +{ + typedef typename property_traits::value_type Point; + BOOST_STATIC_ASSERT (Point::dimensions == 2); + typedef typename Topology::point_difference_type point_difference_type; + + template + explicit + grid_force_pairs(const Topology& topology, + PositionMap position, const Graph& g) + : topology(topology), position(position) + { + two_k = 2. * this->topology.volume(this->topology.extent()) / std::sqrt((double)num_vertices(g)); + } + + template + void operator()(const Graph& g, ApplyForce apply_force) + { + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef std::list bucket_t; + typedef std::vector buckets_t; + + std::size_t columns = std::size_t(topology.extent()[0] / two_k + 1.); + std::size_t rows = std::size_t(topology.extent()[1] / two_k + 1.); + buckets_t buckets(rows * columns); + vertex_iterator v, v_end; + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) { + std::size_t column = + std::size_t((get(position, *v)[0] + topology.extent()[0] / 2) / two_k); + std::size_t row = + std::size_t((get(position, *v)[1] + topology.extent()[1] / 2) / two_k); + + if (column >= columns) column = columns - 1; + if (row >= rows) row = rows - 1; + buckets[row * columns + column].push_back(*v); + } + + for (std::size_t row = 0; row < rows; ++row) + for (std::size_t column = 0; column < columns; ++column) { + bucket_t& bucket = buckets[row * columns + column]; + typedef typename bucket_t::iterator bucket_iterator; + for (bucket_iterator u = bucket.begin(); u != bucket.end(); ++u) { + // Repulse vertices in this bucket + bucket_iterator v = u; + for (++v; v != bucket.end(); ++v) { + apply_force(*u, *v); + apply_force(*v, *u); + } + + std::size_t adj_start_row = row == 0? 0 : row - 1; + std::size_t adj_end_row = row == rows - 1? row : row + 1; + std::size_t adj_start_column = column == 0? 0 : column - 1; + std::size_t adj_end_column = column == columns - 1? column : column + 1; + for (std::size_t other_row = adj_start_row; other_row <= adj_end_row; + ++other_row) + for (std::size_t other_column = adj_start_column; + other_column <= adj_end_column; ++other_column) + if (other_row != row || other_column != column) { + // Repulse vertices in this bucket + bucket_t& other_bucket + = buckets[other_row * columns + other_column]; + for (v = other_bucket.begin(); v != other_bucket.end(); ++v) { + double dist = + topology.distance(get(position, *u), get(position, *v)); + if (dist < two_k) apply_force(*u, *v); + } + } + } + } + } + + private: + const Topology& topology; + PositionMap position; + double two_k; +}; + +template +inline grid_force_pairs +make_grid_force_pairs + (const Topology& topology, + const PositionMap& position, const Graph& g) +{ return grid_force_pairs(topology, position, g); } + +template +void +scale_graph(const Graph& g, PositionMap position, const Topology& topology, + typename Topology::point_type upper_left, typename Topology::point_type lower_right) +{ + if (num_vertices(g) == 0) return; + + typedef typename Topology::point_type Point; + typedef typename Topology::point_difference_type point_difference_type; + + // Find min/max ranges + Point min_point = get(position, *vertices(g).first), max_point = min_point; + BGL_FORALL_VERTICES_T(v, g, Graph) { + min_point = topology.pointwise_min(min_point, get(position, v)); + max_point = topology.pointwise_max(max_point, get(position, v)); + } + + Point old_origin = topology.move_position_toward(min_point, 0.5, max_point); + Point new_origin = topology.move_position_toward(upper_left, 0.5, lower_right); + point_difference_type old_size = topology.difference(max_point, min_point); + point_difference_type new_size = topology.difference(lower_right, upper_left); + + // Scale to bounding box provided + BGL_FORALL_VERTICES_T(v, g, Graph) { + point_difference_type relative_loc = topology.difference(get(position, v), old_origin); + relative_loc = (relative_loc / old_size) * new_size; + put(position, v, topology.adjust(new_origin, relative_loc)); + } +} + +namespace detail { + template + void + maybe_jitter_point(const Topology& topology, + const PropMap& pm, Vertex v, + const typename Topology::point_type& p2) + { + double too_close = topology.norm(topology.extent()) / 10000.; + if (topology.distance(get(pm, v), p2) < too_close) { + put(pm, v, + topology.move_position_toward(get(pm, v), 1./200, + topology.random_point())); + } + } + + template + struct fr_apply_force + { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename Topology::point_type Point; + typedef typename Topology::point_difference_type PointDiff; + + fr_apply_force(const Topology& topology, + const PositionMap& position, + const DisplacementMap& displacement, + RepulsiveForce repulsive_force, double k, const Graph& g) + : topology(topology), position(position), displacement(displacement), + repulsive_force(repulsive_force), k(k), g(g) + { } + + void operator()(vertex_descriptor u, vertex_descriptor v) + { + if (u != v) { + // When the vertices land on top of each other, move the + // first vertex away from the boundaries. + maybe_jitter_point(topology, position, u, get(position, v)); + + double dist = topology.distance(get(position, u), get(position, v)); + typename Topology::point_difference_type dispv = get(displacement, v); + if (dist == 0.) { + for (std::size_t i = 0; i < Point::dimensions; ++i) { + dispv[i] += 0.01; + } + } else { + double fr = repulsive_force(u, v, k, dist, g); + dispv += (fr / dist) * + topology.difference(get(position, v), get(position, u)); + } + put(displacement, v, dispv); + } + } + + private: + const Topology& topology; + PositionMap position; + DisplacementMap displacement; + RepulsiveForce repulsive_force; + double k; + const Graph& g; + }; + +} // end namespace detail + +template +void +fruchterman_reingold_force_directed_layout + (const Graph& g, + PositionMap position, + const Topology& topology, + AttractiveForce attractive_force, + RepulsiveForce repulsive_force, + ForcePairs force_pairs, + Cooling cool, + DisplacementMap displacement) +{ + typedef typename Topology::point_type Point; + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_iterator edge_iterator; + + double volume = topology.volume(topology.extent()); + + // assume positions are initialized randomly + double k = pow(volume / num_vertices(g), 1. / (double)(Topology::point_difference_type::dimensions)); + + detail::fr_apply_force + apply_force(topology, position, displacement, repulsive_force, k, g); + + do { + // Calculate repulsive forces + vertex_iterator v, v_end; + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) + put(displacement, *v, typename Topology::point_difference_type()); + force_pairs(g, apply_force); + + // Calculate attractive forces + edge_iterator e, e_end; + for (boost::tie(e, e_end) = edges(g); e != e_end; ++e) { + vertex_descriptor v = source(*e, g); + vertex_descriptor u = target(*e, g); + + // When the vertices land on top of each other, move the + // first vertex away from the boundaries. + ::boost::detail::maybe_jitter_point(topology, position, u, get(position, v)); + + typename Topology::point_difference_type delta = + topology.difference(get(position, v), get(position, u)); + double dist = topology.distance(get(position, u), get(position, v)); + double fa = attractive_force(*e, k, dist, g); + + put(displacement, v, get(displacement, v) - (fa / dist) * delta); + put(displacement, u, get(displacement, u) + (fa / dist) * delta); + } + + if (double temp = cool()) { + // Update positions + BGL_FORALL_VERTICES_T (v, g, Graph) { + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + double disp_size = topology.norm(get(displacement, v)); + put(position, v, topology.adjust(get(position, v), get(displacement, v) * (min BOOST_PREVENT_MACRO_SUBSTITUTION (disp_size, temp) / disp_size))); + put(position, v, topology.bound(get(position, v))); + } + } else { + break; + } + } while (true); +} + +namespace detail { + template + struct fr_force_directed_layout + { + template + static void + run(const Graph& g, + PositionMap position, + const Topology& topology, + AttractiveForce attractive_force, + RepulsiveForce repulsive_force, + ForcePairs force_pairs, + Cooling cool, + DisplacementMap displacement, + const bgl_named_params&) + { + fruchterman_reingold_force_directed_layout + (g, position, topology, attractive_force, repulsive_force, + force_pairs, cool, displacement); + } + }; + + template<> + struct fr_force_directed_layout + { + template + static void + run(const Graph& g, + PositionMap position, + const Topology& topology, + AttractiveForce attractive_force, + RepulsiveForce repulsive_force, + ForcePairs force_pairs, + Cooling cool, + error_property_not_found, + const bgl_named_params& params) + { + typedef typename Topology::point_difference_type PointDiff; + std::vector displacements(num_vertices(g)); + fruchterman_reingold_force_directed_layout + (g, position, topology, attractive_force, repulsive_force, + force_pairs, cool, + make_iterator_property_map + (displacements.begin(), + choose_const_pmap(get_param(params, vertex_index), g, + vertex_index), + PointDiff())); + } + }; + +} // end namespace detail + +template +void +fruchterman_reingold_force_directed_layout + (const Graph& g, + PositionMap position, + const Topology& topology, + const bgl_named_params& params) +{ + typedef typename property_value, + vertex_displacement_t>::type D; + + detail::fr_force_directed_layout::run + (g, position, topology, + choose_param(get_param(params, attractive_force_t()), + square_distance_attractive_force()), + choose_param(get_param(params, repulsive_force_t()), + square_distance_repulsive_force()), + choose_param(get_param(params, force_pairs_t()), + make_grid_force_pairs(topology, position, g)), + choose_param(get_param(params, cooling_t()), + linear_cooling(100)), + get_param(params, vertex_displacement_t()), + params); +} + +template +void +fruchterman_reingold_force_directed_layout + (const Graph& g, + PositionMap position, + const Topology& topology) +{ + fruchterman_reingold_force_directed_layout + (g, position, topology, + attractive_force(square_distance_attractive_force())); +} + +} // end namespace boost + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif + +#endif // BOOST_GRAPH_FRUCHTERMAN_REINGOLD_FORCE_DIRECTED_LAYOUT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/geodesic_distance.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/geodesic_distance.hpp new file mode 100644 index 0000000000..a4d702749e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/geodesic_distance.hpp @@ -0,0 +1,210 @@ +// (C) Copyright Andrew Sutton 2007 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_GEODESIC_DISTANCE_HPP +#define BOOST_GRAPH_GEODESIC_DISTANCE_HPP + +#include +#include + +namespace boost +{ +template > +struct mean_geodesic_measure + : public geodesic_measure +{ + typedef geodesic_measure base_type; + typedef typename base_type::distance_type distance_type; + typedef typename base_type::result_type result_type; + + result_type operator ()(distance_type d, const Graph& g) + { + function_requires< VertexListGraphConcept >(); + function_requires< NumericValueConcept >(); + function_requires< NumericValueConcept >(); + function_requires< AdaptableBinaryFunctionConcept >(); + + return (d == base_type::infinite_distance()) + ? base_type::infinite_result() + : div(result_type(d), result_type(num_vertices(g) - 1)); + } + Divides div; +}; + +template +inline mean_geodesic_measure::value_type, double> +measure_mean_geodesic(const Graph&, DistanceMap) +{ + return mean_geodesic_measure::value_type, double>(); +} + +template +inline mean_geodesic_measure::value_type, T> +measure_mean_geodesic(const Graph&, DistanceMap) +{ + return mean_geodesic_measure::value_type, T>(); +} + +// This is a little different because it's expected that the result type +// should (must?) be the same as the distance type. There's a type of +// transitivity in this thinking... If the average of distances has type +// X then the average of x's should also be type X. Is there a case where this +// is not true? +// +// This type is a little under-genericized... It needs generic parameters +// for addition and division. +template +struct mean_graph_distance_measure + : public geodesic_measure +{ + typedef geodesic_measure base_type; + typedef typename base_type::distance_type distance_type; + typedef typename base_type::result_type result_type; + + inline result_type operator ()(distance_type d, const Graph& g) + { + function_requires< VertexListGraphConcept >(); + function_requires< NumericValueConcept >(); + + if(d == base_type::infinite_distance()) { + return base_type::infinite_result(); + } + else { + return d / result_type(num_vertices(g)); + } + } +}; + +template +inline mean_graph_distance_measure::value_type> +measure_graph_mean_geodesic(const Graph&, DistanceMap) +{ + typedef typename property_traits::value_type T; + return mean_graph_distance_measure(); +} + +template +inline typename Measure::result_type +mean_geodesic(const Graph& g, + DistanceMap dist, + Measure measure, + Combinator combine) +{ + function_requires< DistanceMeasureConcept >(); + typedef typename Measure::distance_type Distance; + + Distance n = detail::combine_distances(g, dist, combine, Distance(0)); + return measure(n, g); +} + +template +inline typename Measure::result_type +mean_geodesic(const Graph& g, DistanceMap dist, Measure measure) +{ + function_requires< DistanceMeasureConcept >(); + typedef typename Measure::distance_type Distance; + + return mean_geodesic(g, dist, measure, std::plus()); +} + +template +inline double +mean_geodesic(const Graph& g, DistanceMap dist) +{ return mean_geodesic(g, dist, measure_mean_geodesic(g, dist)); } + +template +inline T +mean_geodesic(const Graph& g, DistanceMap dist) +{ return mean_geodesic(g, dist, measure_mean_geodesic(g, dist)); } + + +template +inline typename property_traits::value_type +all_mean_geodesics(const Graph& g, + DistanceMatrixMap dist, + GeodesicMap geo, + Measure measure) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type DistanceMap; + function_requires< DistanceMeasureConcept >(); + typedef typename Measure::result_type Result; + function_requires< WritablePropertyMapConcept >(); + function_requires< NumericValueConcept >(); + + // NOTE: We could compute the mean geodesic here by performing additional + // computations (i.e., adding and dividing). However, I don't really feel + // like fully genericizing the entire operation yet so I'm not going to. + + Result inf = numeric_values::infinity(); + Result sum = numeric_values::zero(); + VertexIterator i, end; + for(tie(i, end) = vertices(g); i != end; ++i) { + DistanceMap dm = get(dist, *i); + Result r = mean_geodesic(g, dm, measure); + put(geo, *i, r); + + // compute the sum along with geodesics + if(r == inf) { + sum = inf; + } + else if(sum != inf) { + sum += r; + } + } + + // return the average of averages. + return sum / Result(num_vertices(g)); +} + +template +inline typename property_traits::value_type +all_mean_geodesics(const Graph& g, DistanceMatrixMap dist, GeodesicMap geo) +{ + function_requires< GraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type DistanceMap; + function_requires< WritablePropertyMapConcept >(); + typedef typename property_traits::value_type Result; + + return all_mean_geodesics(g, dist, geo, measure_mean_geodesic(g, DistanceMap())); +} + + +template +inline typename Measure::result_type +small_world_distance(const Graph& g, GeodesicMap geo, Measure measure) +{ + function_requires< DistanceMeasureConcept >(); + typedef typename Measure::result_type Result; + + Result sum = detail::combine_distances(g, geo, std::plus(), Result(0)); + return measure(sum, g); +} + +template +inline typename property_traits::value_type +small_world_distance(const Graph& g, GeodesicMap geo) +{ return small_world_distance(g, geo, measure_graph_mean_geodesic(g, geo)); } + +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_archetypes.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_archetypes.hpp new file mode 100644 index 0000000000..9b364bb814 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_archetypes.hpp @@ -0,0 +1,292 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_ARCHETYPES_HPP +#define BOOST_GRAPH_ARCHETYPES_HPP + +#include +#include +#include +#include + +namespace boost { // should use a different namespace for this + + namespace detail { + struct null_graph_archetype : public null_archetype<> { + struct traversal_category { }; + }; + } + + //=========================================================================== + template + struct incidence_graph_archetype : public Base + { + typedef typename Base::traversal_category base_trav_cat; + struct traversal_category + : public incidence_graph_tag, public base_trav_cat { }; +#if 0 + typedef immutable_graph_tag mutability_category; +#endif + typedef Vertex vertex_descriptor; + typedef unsigned int degree_size_type; + typedef unsigned int vertices_size_type; + typedef unsigned int edges_size_type; + struct edge_descriptor { + edge_descriptor() { } + edge_descriptor(const detail::dummy_constructor&) { } + bool operator==(const edge_descriptor&) const { return false; } + bool operator!=(const edge_descriptor&) const { return false; } + }; + typedef input_iterator_archetype out_edge_iterator; + + typedef Directed directed_category; + typedef ParallelCategory edge_parallel_category; + + typedef void adjacency_iterator; + typedef void in_edge_iterator; + typedef void vertex_iterator; + typedef void edge_iterator; + }; + template + V source(const typename incidence_graph_archetype::edge_descriptor&, + const incidence_graph_archetype& ) + { + return V(static_object::get()); + } + template + V target(const typename incidence_graph_archetype::edge_descriptor&, + const incidence_graph_archetype& ) + { + return V(static_object::get()); + } + + template + std::pair::out_edge_iterator, + typename incidence_graph_archetype::out_edge_iterator> + out_edges(const V&, const incidence_graph_archetype& ) + { + typedef typename incidence_graph_archetype::out_edge_iterator Iter; + return std::make_pair(Iter(), Iter()); + } + + template + typename incidence_graph_archetype::degree_size_type + out_degree(const V&, const incidence_graph_archetype& ) + { + return 0; + } + + //=========================================================================== + template + struct adjacency_graph_archetype : public Base + { + typedef typename Base::traversal_category base_trav_cat; + struct traversal_category + : public adjacency_graph_tag, public base_trav_cat { }; + typedef Vertex vertex_descriptor; + typedef unsigned int degree_size_type; + typedef unsigned int vertices_size_type; + typedef unsigned int edges_size_type; + typedef void edge_descriptor; + typedef input_iterator_archetype adjacency_iterator; + + typedef Directed directed_category; + typedef ParallelCategory edge_parallel_category; + + typedef void in_edge_iterator; + typedef void out_edge_iterator; + typedef void vertex_iterator; + typedef void edge_iterator; + }; + + template + std::pair::adjacency_iterator, + typename adjacency_graph_archetype::adjacency_iterator> + adjacent_vertices(const V&, const adjacency_graph_archetype& ) + { + typedef typename adjacency_graph_archetype::adjacency_iterator Iter; + return std::make_pair(Iter(), Iter()); + } + + template + typename adjacency_graph_archetype::degree_size_type + out_degree(const V&, const adjacency_graph_archetype& ) + { + return 0; + } + + //=========================================================================== + template + struct vertex_list_graph_archetype : public Base + { + typedef incidence_graph_archetype + Incidence; + typedef adjacency_graph_archetype + Adjacency; + + typedef typename Base::traversal_category base_trav_cat; + struct traversal_category + : public vertex_list_graph_tag, public base_trav_cat { }; +#if 0 + typedef immutable_graph_tag mutability_category; +#endif + typedef Vertex vertex_descriptor; + typedef unsigned int degree_size_type; + typedef typename Incidence::edge_descriptor edge_descriptor; + typedef typename Incidence::out_edge_iterator out_edge_iterator; + typedef typename Adjacency::adjacency_iterator adjacency_iterator; + + typedef input_iterator_archetype vertex_iterator; + typedef unsigned int vertices_size_type; + typedef unsigned int edges_size_type; + + typedef Directed directed_category; + typedef ParallelCategory edge_parallel_category; + + typedef void in_edge_iterator; + typedef void edge_iterator; + }; + + template + std::pair::vertex_iterator, + typename vertex_list_graph_archetype::vertex_iterator> + vertices(const vertex_list_graph_archetype& ) + { + typedef typename vertex_list_graph_archetype::vertex_iterator Iter; + return std::make_pair(Iter(), Iter()); + } + + template + typename vertex_list_graph_archetype::vertices_size_type + num_vertices(const vertex_list_graph_archetype& ) + { + return 0; + } + + // ambiguously inherited from incidence graph and adjacency graph + template + typename vertex_list_graph_archetype::degree_size_type + out_degree(const V&, const vertex_list_graph_archetype& ) + { + return 0; + } + + //=========================================================================== + + struct property_graph_archetype_tag { }; + + template + struct property_graph_archetype : public GraphArchetype + { + typedef property_graph_archetype_tag graph_tag; + typedef ValueArch vertex_property_type; + typedef ValueArch edge_property_type; + }; + + struct choose_edge_property_map_archetype { + template + struct bind_ { + typedef mutable_lvalue_property_map_archetype + type; + typedef lvalue_property_map_archetype + const_type; + }; + }; + template <> + struct edge_property_selector { + typedef choose_edge_property_map_archetype type; + }; + + struct choose_vertex_property_map_archetype { + template + struct bind_ { + typedef mutable_lvalue_property_map_archetype + type; + typedef lvalue_property_map_archetype + const_type; + }; + }; + + template <> + struct vertex_property_selector { + typedef choose_vertex_property_map_archetype type; + }; + + template + typename property_map, P>::type + get(P, property_graph_archetype&) { + typename property_map, P>::type pmap; + return pmap; + } + + template + typename property_map, P>::const_type + get(P, const property_graph_archetype&) { + typename property_map, P>::const_type pmap; + return pmap; + } + + template + typename property_traits, P>::const_type>::value_type + get(P p, const property_graph_archetype& g, K k) { + return get( get(p, g), k); + } + + template + void + put(P p, property_graph_archetype& g, + const Key& key, const V& value) + { + typedef typename boost::property_map, P>::type Map; + Map pmap = get(p, g); + put(pmap, key, value); + } + + struct color_value_archetype { + color_value_archetype() { } + color_value_archetype(detail::dummy_constructor) { } + bool operator==(const color_value_archetype& ) const { return true; } + bool operator!=(const color_value_archetype& ) const { return true; } + }; + template <> + struct color_traits { + static color_value_archetype white() + { + return color_value_archetype + (static_object::get()); + } + static color_value_archetype gray() + { + return color_value_archetype + (static_object::get()); + } + static color_value_archetype black() + { + return color_value_archetype + (static_object::get()); + } + }; + + template + class buffer_archetype { + public: + void push(const T&) {} + void pop() {} + T& top() { return static_object::get(); } + const T& top() const { return static_object::get(); } + bool empty() const { return true; } + }; + +} // namespace boost + + +#endif // BOOST_GRAPH_ARCHETYPES_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_as_tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_as_tree.hpp new file mode 100644 index 0000000000..3758c3f009 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_as_tree.hpp @@ -0,0 +1,154 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_GRAPH_AS_TREE_HPP +#define BOOST_GRAPH_GRAPH_AS_TREE_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + class graph_as_tree_base + { + typedef Derived Tree; + public: + typedef Node node_descriptor; + typedef ChIt children_iterator; + + graph_as_tree_base(Graph& g, Node root) : _g(g), _root(root) { } + + friend Node root(const Tree& t) { return t._root; } + + template + friend std::pair + children(N n, const Tree& t) { return adjacent_vertices(n, t._g); } + + template + friend Node parent(N n, const Tree& t) { + return boost::get(t.parent_pa(), n); + } + + Graph& _g; + Node _root; + }; + + struct graph_as_tree_tag { }; + + template ::vertex_descriptor +#endif + , class ChIt +#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + = typename graph_traits::adjacency_iterator +#endif + > + class graph_as_tree + : public graph_as_tree_base > + { + typedef graph_as_tree self; + typedef graph_as_tree_base super; + public: + graph_as_tree(Graph& g, Node root) : super(g, root) { } + + graph_as_tree(Graph& g, Node root, ParentMap p) : super(g, root), _p(p) { + breadth_first_search(g, root, + visitor(make_bfs_visitor + (record_predecessors(p, boost::on_tree_edge())))); + } + ParentMap parent_pa() const { return _p; } + typedef graph_as_tree_tag graph_tag; // for property_map + protected: + ParentMap _p; + }; + + + namespace detail { + + struct graph_as_tree_vertex_property_selector { + template + struct bind_ { + typedef typename GraphAsTree::base_type Graph; + typedef property_map PMap; + typedef typename PMap::type type; + typedef typename PMap::const_type const_type; + }; + }; + + struct graph_as_tree_edge_property_selector { + template + struct bind_ { + typedef typename GraphAsTree::base_type Graph; + typedef property_map PMap; + typedef typename PMap::type type; + typedef typename PMap::const_type const_type; + }; + }; + + } // namespace detail + + template <> + struct vertex_property_selector { + typedef detail::graph_as_tree_vertex_property_selector type; + }; + + template <> + struct edge_property_selector { + typedef detail::graph_as_tree_edge_property_selector type; + }; + + template + typename property_map::type + get(Property p, graph_as_tree& g) + { + return get(p, g._g); + } + + template + typename property_map::const_type + get(Property p, const graph_as_tree& g) + { + const Graph& gref = g._g; // in case GRef is non-const + return get(p, gref); + } + + template + typename property_traits< + typename property_map::const_type + >::value_type + get(Property p, const graph_as_tree& g, const Key& k) + { + return get(p, g._g, k); + } + + template + void + put(Property p, const graph_as_tree& g, const Key& k, + const Value& val) + { + put(p, g._g, k, val); + } + +} // namespace boost + +#endif // BOOST_GRAPH_GRAPH_AS_TREE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_concepts.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_concepts.hpp new file mode 100644 index 0000000000..7c2b2795b9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_concepts.hpp @@ -0,0 +1,606 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Copyright 2009, Andrew Sutton +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_CONCEPTS_HPP +#define BOOST_GRAPH_CONCEPTS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +namespace boost +{ +// dwa 2003/7/11 -- This clearly shouldn't be necessary, but if +// you want to use vector_as_graph, it is! I'm sure the graph +// library leaves these out all over the place. Probably a +// redesign involving specializing a template with a static +// member function is in order :( +// +// It is needed in order to allow us to write using boost::vertices as +// needed for ADL when using vector_as_graph below. +#if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) \ + && !BOOST_WORKAROUND(__GNUC__, <= 2) \ + && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# define BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK +#endif + +#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK +template +typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); +#endif + + namespace concepts { + BOOST_concept(MultiPassInputIterator,(T)) { + BOOST_CONCEPT_USAGE(MultiPassInputIterator) { + BOOST_CONCEPT_ASSERT((InputIterator)); + } + }; + + BOOST_concept(Graph,(G)) + { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::edge_parallel_category + edge_parallel_category; + + typedef typename graph_traits::traversal_category + traversal_category; + + BOOST_CONCEPT_USAGE(Graph) + { + BOOST_CONCEPT_ASSERT((DefaultConstructible)); + BOOST_CONCEPT_ASSERT((EqualityComparable)); + BOOST_CONCEPT_ASSERT((Assignable)); + } + G g; + }; + + BOOST_concept(IncidenceGraph,(G)) + : Graph + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::out_edge_iterator + out_edge_iterator; + + typedef typename graph_traits::traversal_category + traversal_category; + + BOOST_CONCEPT_USAGE(IncidenceGraph) { + BOOST_CONCEPT_ASSERT((MultiPassInputIterator)); + BOOST_CONCEPT_ASSERT((DefaultConstructible)); + BOOST_CONCEPT_ASSERT((EqualityComparable)); + BOOST_CONCEPT_ASSERT((Assignable)); + BOOST_CONCEPT_ASSERT((Convertible)); + + p = out_edges(u, g); + n = out_degree(u, g); + e = *p.first; + u = source(e, g); + v = target(e, g); + const_constraints(g); + } + void const_constraints(const G& cg) { + p = out_edges(u, cg); + n = out_degree(u, cg); + e = *p.first; + u = source(e, cg); + v = target(e, cg); + } + std::pair p; + typename graph_traits::vertex_descriptor u, v; + typename graph_traits::edge_descriptor e; + typename graph_traits::degree_size_type n; + G g; + }; + + BOOST_concept(BidirectionalGraph,(G)) + : IncidenceGraph + { + typedef typename graph_traits::in_edge_iterator + in_edge_iterator; + typedef typename graph_traits::traversal_category + traversal_category; + + BOOST_CONCEPT_USAGE(BidirectionalGraph) { + BOOST_CONCEPT_ASSERT((MultiPassInputIterator)); + BOOST_CONCEPT_ASSERT((Convertible)); + + p = in_edges(v, g); + n = in_degree(v, g); + e = *p.first; + const_constraints(g); + } + void const_constraints(const G& cg) { + p = in_edges(v, cg); + n = in_degree(v, cg); + e = *p.first; + } + std::pair p; + typename graph_traits::vertex_descriptor v; + typename graph_traits::edge_descriptor e; + typename graph_traits::degree_size_type n; + G g; + }; + + BOOST_concept(AdjacencyGraph,(G)) + : Graph + { + typedef typename graph_traits::adjacency_iterator + adjacency_iterator; + typedef typename graph_traits::traversal_category + traversal_category; + + BOOST_CONCEPT_USAGE(AdjacencyGraph) { + BOOST_CONCEPT_ASSERT((MultiPassInputIterator)); + BOOST_CONCEPT_ASSERT((Convertible)); + + p = adjacent_vertices(v, g); + v = *p.first; + const_constraints(g); + } + void const_constraints(const G& cg) { + p = adjacent_vertices(v, cg); + } + std::pair p; + typename graph_traits::vertex_descriptor v; + G g; + }; + + BOOST_concept(VertexListGraph,(G)) + : Graph + { + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::traversal_category + traversal_category; + + BOOST_CONCEPT_USAGE(VertexListGraph) { + BOOST_CONCEPT_ASSERT((MultiPassInputIterator)); + BOOST_CONCEPT_ASSERT((Convertible)); + +#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK + // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if + // you want to use vector_as_graph, it is! I'm sure the graph + // library leaves these out all over the place. Probably a + // redesign involving specializing a template with a static + // member function is in order :( + using boost::vertices; +#endif + p = vertices(g); + v = *p.first; + const_constraints(g); + } + void const_constraints(const G& cg) { +#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK + // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if + // you want to use vector_as_graph, it is! I'm sure the graph + // library leaves these out all over the place. Probably a + // redesign involving specializing a template with a static + // member function is in order :( + using boost::vertices; +#endif + + p = vertices(cg); + v = *p.first; + V = num_vertices(cg); + } + std::pair p; + typename graph_traits::vertex_descriptor v; + G g; + vertices_size_type V; + }; + + BOOST_concept(EdgeListGraph,(G)) + : Graph + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::edge_iterator edge_iterator; + typedef typename graph_traits::edges_size_type edges_size_type; + typedef typename graph_traits::traversal_category + traversal_category; + + BOOST_CONCEPT_USAGE(EdgeListGraph) { + BOOST_CONCEPT_ASSERT((MultiPassInputIterator)); + BOOST_CONCEPT_ASSERT((DefaultConstructible)); + BOOST_CONCEPT_ASSERT((EqualityComparable)); + BOOST_CONCEPT_ASSERT((Assignable)); + BOOST_CONCEPT_ASSERT((Convertible)); + + p = edges(g); + e = *p.first; + u = source(e, g); + v = target(e, g); + const_constraints(g); + } + void const_constraints(const G& cg) { + p = edges(cg); + E = num_edges(cg); + e = *p.first; + u = source(e, cg); + v = target(e, cg); + } + std::pair p; + typename graph_traits::vertex_descriptor u, v; + typename graph_traits::edge_descriptor e; + edges_size_type E; + G g; + }; + + BOOST_concept(VertexAndEdgeListGraph,(G)) + : VertexListGraph + , EdgeListGraph + { + }; + + // Where to put the requirement for this constructor? + // G g(n_vertices); + // Not in mutable graph, then LEDA graph's can't be models of + // MutableGraph. + BOOST_concept(EdgeMutableGraph,(G)) + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + + BOOST_CONCEPT_USAGE(EdgeMutableGraph) { + p = add_edge(u, v, g); + remove_edge(u, v, g); + remove_edge(e, g); + clear_vertex(v, g); + } + G g; + edge_descriptor e; + std::pair p; + typename graph_traits::vertex_descriptor u, v; + }; + + BOOST_concept(VertexMutableGraph,(G)) + { + + BOOST_CONCEPT_USAGE(VertexMutableGraph) { + v = add_vertex(g); + remove_vertex(v, g); + } + G g; + typename graph_traits::vertex_descriptor u, v; + }; + + BOOST_concept(MutableGraph,(G)) + : EdgeMutableGraph + , VertexMutableGraph + { + }; + + template + struct dummy_edge_predicate { + bool operator()(const edge_descriptor&) const { + return false; + } + }; + + BOOST_concept(MutableIncidenceGraph,(G)) + : MutableGraph + { + BOOST_CONCEPT_USAGE(MutableIncidenceGraph) { + remove_edge(iter, g); + remove_out_edge_if(u, p, g); + } + G g; + typedef typename graph_traits::edge_descriptor edge_descriptor; + dummy_edge_predicate p; + typename boost::graph_traits::vertex_descriptor u; + typename boost::graph_traits::out_edge_iterator iter; + }; + + BOOST_concept(MutableBidirectionalGraph,(G)) + : MutableIncidenceGraph + { + BOOST_CONCEPT_USAGE(MutableBidirectionalGraph) + { + remove_in_edge_if(u, p, g); + } + G g; + typedef typename graph_traits::edge_descriptor edge_descriptor; + dummy_edge_predicate p; + typename boost::graph_traits::vertex_descriptor u; + }; + + BOOST_concept(MutableEdgeListGraph,(G)) + : EdgeMutableGraph + { + BOOST_CONCEPT_USAGE(MutableEdgeListGraph) { + remove_edge_if(p, g); + } + G g; + typedef typename graph_traits::edge_descriptor edge_descriptor; + dummy_edge_predicate p; + }; + + BOOST_concept(VertexMutablePropertyGraph,(G)) + : VertexMutableGraph + { + BOOST_CONCEPT_USAGE(VertexMutablePropertyGraph) { + v = add_vertex(vp, g); + } + G g; + typename graph_traits::vertex_descriptor v; + typename vertex_property::type vp; + }; + + BOOST_concept(EdgeMutablePropertyGraph,(G)) + : EdgeMutableGraph + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + + BOOST_CONCEPT_USAGE(EdgeMutablePropertyGraph) { + p = add_edge(u, v, ep, g); + } + G g; + std::pair p; + typename graph_traits::vertex_descriptor u, v; + typename edge_property::type ep; + }; + + BOOST_concept(AdjacencyMatrix,(G)) + : Graph + { + typedef typename graph_traits::edge_descriptor edge_descriptor; + + BOOST_CONCEPT_USAGE(AdjacencyMatrix) { + p = edge(u, v, g); + const_constraints(g); + } + void const_constraints(const G& cg) { + p = edge(u, v, cg); + } + typename graph_traits::vertex_descriptor u, v; + std::pair p; + G g; + }; + + BOOST_concept(ReadablePropertyGraph,(G)(X)(Property)) + : Graph + { + typedef typename property_map::const_type const_Map; + + BOOST_CONCEPT_USAGE(ReadablePropertyGraph) + { + BOOST_CONCEPT_ASSERT((ReadablePropertyMapConcept)); + + const_constraints(g); + } + void const_constraints(const G& cg) { + const_Map pmap = get(Property(), cg); + pval = get(Property(), cg, x); + ignore_unused_variable_warning(pmap); + } + G g; + X x; + typename property_traits::value_type pval; + }; + + BOOST_concept(PropertyGraph,(G)(X)(Property)) + : ReadablePropertyGraph + { + typedef typename property_map::type Map; + BOOST_CONCEPT_USAGE(PropertyGraph) { + BOOST_CONCEPT_ASSERT((ReadWritePropertyMapConcept)); + + Map pmap = get(Property(), g); + pval = get(Property(), g, x); + put(Property(), g, x, pval); + ignore_unused_variable_warning(pmap); + } + G g; + X x; + typename property_traits::value_type pval; + }; + + BOOST_concept(LvaluePropertyGraph,(G)(X)(Property)) + : ReadablePropertyGraph + { + typedef typename property_map::type Map; + typedef typename property_map::const_type const_Map; + + BOOST_CONCEPT_USAGE(LvaluePropertyGraph) { + BOOST_CONCEPT_ASSERT((LvaluePropertyMapConcept)); + + pval = get(Property(), g, x); + put(Property(), g, x, pval); + } + G g; + X x; + typename property_traits::value_type pval; + }; + + // The *IndexGraph concepts are "semantic" graph concpepts. These can be + // applied to describe any graph that has an index map that can be accessed + // using the get(*_index, g) method. For example, adjacency lists with + // VertexSet == vecS are implicitly models of this concept. + // + // NOTE: We could require an associated type vertex_index_type, but that + // would mean propagating that type name into graph_traits and all of the + // other graph implementations. Much easier to simply call it unsigned. + + BOOST_concept(VertexIndexGraph,(Graph)) + { + BOOST_CONCEPT_USAGE(VertexIndexGraph) + { + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename property_map::type Map; + typedef unsigned Index; // This could be Graph::vertex_index_type + Map m = get(vertex_index, g); + Index x = get(vertex_index, g, Vertex()); + ignore_unused_variable_warning(m); + ignore_unused_variable_warning(x); + + // This is relaxed + renumber_vertex_indices(g); + + const_constraints(g); + } + void const_constraints(const Graph& g) + { + typedef typename property_map::const_type Map; + Map m = get(vertex_index, g); + ignore_unused_variable_warning(m); + } + private: + Graph g; + }; + + BOOST_concept(EdgeIndexGraph,(Graph)) + { + BOOST_CONCEPT_USAGE(EdgeIndexGraph) + { + typedef typename graph_traits::edge_descriptor Edge; + typedef typename property_map::type Map; + typedef unsigned Index; // This could be Graph::vertex_index_type + Map m = get(edge_index, g); + Index x = get(edge_index, g, Edge()); + ignore_unused_variable_warning(m); + ignore_unused_variable_warning(x); + + // This is relaxed + renumber_edge_indices(g); + + const_constraints(g); + } + void const_constraints(const Graph& g) + { + typedef typename property_map::const_type Map; + Map m = get(edge_index, g); + ignore_unused_variable_warning(m); + } + private: + Graph g; + }; + + BOOST_concept(ColorValue,(C)) + : EqualityComparable + , DefaultConstructible + { + BOOST_CONCEPT_USAGE(ColorValue) { + c = color_traits::white(); + c = color_traits::gray(); + c = color_traits::black(); + } + C c; + }; + + BOOST_concept(BasicMatrix,(M)(I)(V)) + { + BOOST_CONCEPT_USAGE(BasicMatrix) { + V& elt = A[i][j]; + const_constraints(A); + ignore_unused_variable_warning(elt); + } + void const_constraints(const M& cA) { + const V& elt = cA[i][j]; + ignore_unused_variable_warning(elt); + } + M A; + I i, j; + }; + + // The following concepts describe aspects of numberic values and measure + // functions. We're extending the notion of numeric values to include + // emulation for zero and infinity. + + BOOST_concept(NumericValue,(Numeric)) + { + BOOST_CONCEPT_USAGE(NumericValue) + { + function_requires< DefaultConstructible >(); + function_requires< CopyConstructible >(); + numeric_values::zero(); + numeric_values::infinity(); + } + }; + + BOOST_concept(DegreeMeasure,(Measure)(Graph)) + { + BOOST_CONCEPT_USAGE(DegreeMeasure) + { + typedef typename Measure::degree_type Degree; + typedef typename Measure::vertex_type Vertex; + + Degree d = m(Vertex(), g); + ignore_unused_variable_warning(d); + } + private: + Measure m; + Graph g; + }; + + BOOST_concept(DistanceMeasure,(Measure)(Graph)) + { + BOOST_CONCEPT_USAGE(DistanceMeasure) + { + typedef typename Measure::distance_type Distance; + typedef typename Measure::result_type Result; + Result r = m(Distance(), g); + ignore_unused_variable_warning(r); + } + private: + Measure m; + Graph g; + }; + +} /* namespace concepts */ + +using boost::concepts::MultiPassInputIteratorConcept; + +// Graph concepts +using boost::concepts::GraphConcept; +using boost::concepts::IncidenceGraphConcept; +using boost::concepts::BidirectionalGraphConcept; +using boost::concepts::AdjacencyGraphConcept; +using boost::concepts::VertexListGraphConcept; +using boost::concepts::EdgeListGraphConcept; +using boost::concepts::VertexAndEdgeListGraphConcept; +using boost::concepts::EdgeMutableGraphConcept; +using boost::concepts::VertexMutableGraphConcept; +using boost::concepts::MutableGraphConcept; +using boost::concepts::MutableIncidenceGraphConcept; +using boost::concepts::MutableBidirectionalGraphConcept; +using boost::concepts::MutableEdgeListGraphConcept; +using boost::concepts::VertexMutablePropertyGraphConcept; +using boost::concepts::EdgeMutablePropertyGraphConcept; +using boost::concepts::AdjacencyMatrixConcept; +using boost::concepts::ReadablePropertyGraphConcept; +using boost::concepts::PropertyGraphConcept; +using boost::concepts::LvaluePropertyGraphConcept; +using boost::concepts::VertexIndexGraphConcept; +using boost::concepts::EdgeIndexGraphConcept; + +// Utility concepts +using boost::concepts::ColorValueConcept; +using boost::concepts::BasicMatrixConcept; +using boost::concepts::NumericValueConcept; +using boost::concepts::DistanceMeasureConcept; +using boost::concepts::DegreeMeasureConcept; + + +} /* namespace boost */ +#include + +#endif /* BOOST_GRAPH_CONCEPTS_H */ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_mutability_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_mutability_traits.hpp new file mode 100644 index 0000000000..726d8d1411 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_mutability_traits.hpp @@ -0,0 +1,204 @@ +// Copyright (C) 2009 Andrew Sutton +// +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_MUTABILITY_TRAITS_HPP +#define BOOST_GRAPH_MUTABILITY_TRAITS_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +// The mutabiltiy categories classify graphs by their mutating operations +// on the edge and vertex sets. This is a substantially more refined +// categorization than the MutableGraph and MutablePropertyGraph denote. +// Currently, this framework is only used in the graph tests to help +// dispatch test to the correct places. However, there are probably some +// constructive or destructive algorithms (i.e., graph generators) that +// may use these to describe requirements on graph inputs. + +struct add_vertex_tag { }; +struct add_vertex_property_tag : virtual add_vertex_tag { }; +struct add_edge_tag { }; +struct add_edge_property_tag : virtual add_edge_tag { }; +struct remove_vertex_tag { }; +struct remove_edge_tag { }; + +struct mutable_vertex_graph_tag + : virtual add_vertex_tag, virtual remove_vertex_tag +{ }; +struct mutable_vertex_property_graph_tag + : virtual add_vertex_property_tag, virtual remove_vertex_tag +{ }; + +struct mutable_edge_graph_tag + : virtual add_edge_tag, virtual remove_edge_tag +{ }; +struct mutable_edge_property_graph_tag + : virtual add_edge_property_tag, virtual remove_edge_tag +{ }; + +struct mutable_graph_tag + : virtual mutable_vertex_graph_tag + , virtual mutable_edge_graph_tag +{ }; +struct mutable_property_graph_tag + : virtual mutable_vertex_property_graph_tag + , virtual mutable_edge_property_graph_tag +{ }; + +// Some graphs just don't like to be torn down. Note this only restricts +// teardown to the set of vertices, not the vertex set. +// TODO: Find a better name for this tag. +struct add_only_property_graph_tag + : virtual add_vertex_property_tag + , virtual mutable_edge_property_graph_tag +{ }; + +/** + * The graph_mutability_traits provide methods for determining the + * interfaces supported by graph classes for adding and removing vertices + * and edges. + */ +template +struct graph_mutability_traits { + typedef typename Graph::mutability_category category; +}; + +template +struct graph_has_add_vertex + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + add_vertex_tag + >::value + > +{ }; + +template +struct graph_has_add_vertex_with_property + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + add_vertex_property_tag + >::value + > +{ }; + + +template +struct graph_has_remove_vertex + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + remove_vertex_tag + >::value + > +{ }; + +template +struct graph_has_add_edge + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + add_edge_tag + >::value + > +{ }; + +template +struct graph_has_add_edge_with_property + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + add_edge_property_tag + >::value + > +{ }; + + +template +struct graph_has_remove_edge + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + remove_edge_tag + >::value + > +{ }; + + +template +struct is_mutable_vertex_graph + : mpl::and_< + graph_has_add_vertex, + graph_has_remove_vertex + > +{ }; + +template +struct is_mutable_vertex_property_graph + : mpl::and_< + graph_has_add_vertex_with_property, + graph_has_remove_vertex + > +{ }; + + +template +struct is_mutable_edge_graph + : mpl::and_< + graph_has_add_edge, + graph_has_remove_edge + > +{ }; + +template +struct is_mutable_edge_property_graph + : mpl::and_< + graph_has_add_edge_with_property, + graph_has_remove_edge + > +{ }; + + +template +struct is_mutable_graph + : mpl::and_< + is_mutable_vertex_graph, + is_mutable_edge_graph + > +{ }; + +template +struct is_mutable_property_graph + : mpl::and_< + is_mutable_vertex_property_graph, + is_mutable_edge_property_graph + > +{ }; + +template +struct is_add_only_property_graph + : mpl::bool_< + is_convertible< + typename graph_mutability_traits::category, + add_only_property_graph_tag + >::value + > +{ }; + +/** @name Mutability Traits Specializations */ +//@{ + +//@} + +} // namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_selectors.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_selectors.hpp new file mode 100644 index 0000000000..777ebefc94 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_selectors.hpp @@ -0,0 +1,38 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_SELECTORS_HPP +#define BOOST_GRAPH_SELECTORS_HPP + +#include + +namespace boost { + + //=========================================================================== + // Selectors for the Directed template parameter of adjacency_list + // and adjacency_matrix. + + struct directedS { enum { is_directed = true, is_bidir = false }; + typedef mpl::true_ is_directed_t; + typedef mpl::false_ is_bidir_t; + }; + struct undirectedS { + enum { is_directed = false, is_bidir = false }; + typedef mpl::false_ is_directed_t; + typedef mpl::false_ is_bidir_t; + }; + struct bidirectionalS { + enum { is_directed = true, is_bidir = true }; + typedef mpl::true_ is_directed_t; + typedef mpl::true_ is_bidir_t; + }; + +} // namespace boost + +#endif // BOOST_GRAPH_SELECTORS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_stats.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_stats.hpp new file mode 100644 index 0000000000..636c49137d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_stats.hpp @@ -0,0 +1,136 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Alex Breuer +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_GRAPH_STATS_HPP +#define BOOST_GRAPH_GRAPH_STATS_HPP + +#include +#include +#include + +namespace boost { namespace graph { + +template +struct sort_edge_by_origin { +public: + typedef typename graph_traits::edge_descriptor edge_type; + + explicit sort_edge_by_origin( Graph& g ) : g(g) {} + + inline bool operator()( edge_type a, edge_type b ) { + return source( a, g ) == source( b, g ) ? target( a, g ) < target( b, g ) : + source( a, g ) < source( b, g ); + } + +private: + Graph& g; +}; + +template +struct equal_edge { +public: + typedef typename graph_traits::edge_descriptor edge_type; + + explicit equal_edge( Graph& g ) : g(g) {} + + inline bool operator()( edge_type a, edge_type b ) { + return source( a, g ) == source( b, g ) && + target( a, g ) == target( b, g ); + } + +private: + Graph& g; +}; + +template +unsigned long num_dup_edges( Graph& g ) { + typedef typename graph_traits::edge_iterator e_iterator_type; + typedef typename graph_traits::edge_descriptor edge_type; + + std::list all_edges; + + BGL_FORALL_EDGES_T( e, g, Graph ) { + all_edges.push_back( e ); + } + + sort_edge_by_origin cmp1( g ); + all_edges.sort( cmp1 ); + equal_edge cmp2( g ); + all_edges.unique( cmp2 ); + + return num_edges( g ) - all_edges.size(); +} + + +template +std::map dup_edge_dist( Graph& g ) { + std::map dist; + typedef typename graph_traits::adjacency_iterator a_iterator_type; + typedef typename graph_traits::vertex_descriptor vertex_type; + + + BGL_FORALL_VERTICES_T( v, g, Graph ) { + std::list front_neighbors; + a_iterator_type a_iter, a_end; + for( boost::tie( a_iter, a_end ) = adjacent_vertices( v, g ); + a_iter != a_end; ++a_iter ) { + front_neighbors.push_back( *a_iter ); + } + + front_neighbors.sort(); + front_neighbors.unique(); + dist[out_degree( v, g ) - front_neighbors.size()] += 1; + } + return dist; +} + +template +std::map degree_dist( Graph& g ) { + std::map dist; + typedef typename graph_traits::adjacency_iterator a_iterator_type; + typedef typename graph_traits::vertex_descriptor vertex_type; + + BGL_FORALL_VERTICES_T( v, g, Graph ) { + dist[out_degree( v, g )] += 1; + } + + return dist; +} + +template +std::map weight_degree_dist( Graph& g ) { + std::map dist, n; + typedef typename graph_traits::adjacency_iterator a_iterator_type; + typedef typename graph_traits::vertex_descriptor vertex_type; + typedef typename property_map::const_type edge_map_type; + typedef typename property_traits::value_type + edge_weight_type; + + typename property_map::type em = get( edge_weight, g ); + + BGL_FORALL_VERTICES_T( v, g, Graph ) { + edge_weight_type tmp = 0; + BGL_FORALL_OUTEDGES_T( v, e, g, Graph ) { + tmp += em[e]; + } + n[out_degree( v, g )] += 1.; + dist[out_degree( v, g )] += tmp; + } + + for( std::map::iterator iter = dist.begin(); + iter != dist.end(); ++iter ) { + assert( n[iter->first] != 0 ); + dist[iter->first] /= n[iter->first]; + } + + return dist; +} + +}} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_test.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_test.hpp new file mode 100644 index 0000000000..fc4d9f0f93 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_test.hpp @@ -0,0 +1,384 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_TEST_HPP +#define BOOST_GRAPH_TEST_HPP + +#include +#include +#include +#include +#include +#include +#include // for connects +#include +#include + + +// UNDER CONSTRUCTION + +namespace boost { + + template + struct graph_test + { + + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename graph_traits::vertices_size_type v_size_t; + typedef typename graph_traits::degree_size_type deg_size_t; + typedef typename graph_traits::edges_size_type e_size_t; + typedef typename graph_traits::out_edge_iterator out_edge_iter; + typedef typename property_map::type index_map_t; + typedef iterator_property_map::iterator, + index_map_t,vertex_t,vertex_t&> IsoMap; + + struct ignore_vertex { + ignore_vertex() { } + ignore_vertex(vertex_t v) : v(v) { } + bool operator()(vertex_t x) const { return x != v; } + vertex_t v; + }; + struct ignore_edge { + ignore_edge() { } + ignore_edge(edge_t e) : e(e) { } + bool operator()(edge_t x) const { return x != e; } + edge_t e; + }; + struct ignore_edges { + ignore_edges(vertex_t s, vertex_t t, const Graph& g) + : s(s), t(t), g(g) { } + bool operator()(edge_t x) const { + return !(source(x, g) == s && target(x, g) == t); + } + vertex_t s; vertex_t t; const Graph& g; + }; + + //========================================================================= + // Traversal Operations + + void test_incidence_graph + (const std::vector& vertex_set, + const std::vector< std::pair >& edge_set, + const Graph& g) + { + typedef typename std::vector::const_iterator vertex_iter; + typedef typename std::vector< std::pair > + ::const_iterator edge_iter; + typedef typename graph_traits::out_edge_iterator out_edge_iter; + + for (vertex_iter ui = vertex_set.begin(); ui != vertex_set.end(); ++ui) { + vertex_t u = *ui; + std::vector adj; + for (edge_iter e = edge_set.begin(); e != edge_set.end(); ++e) + if (e->first == u) + adj.push_back(e->second); + + std::pair p = out_edges(u, g); + BOOST_CHECK(out_degree(u, g) == adj.size()); + BOOST_CHECK(deg_size_t(std::distance(p.first, p.second)) + == out_degree(u, g)); + for (; p.first != p.second; ++p.first) { + edge_t e = *p.first; + BOOST_CHECK(source(e, g) == u); + BOOST_CHECK(container_contains(adj, target(e, g)) == true); + } + } + } + + void test_bidirectional_graph + (const std::vector& vertex_set, + const std::vector< std::pair >& edge_set, + const Graph& g) + { + typedef typename std::vector::const_iterator vertex_iter; + typedef typename std::vector< std::pair > + ::const_iterator edge_iter; + typedef typename graph_traits::in_edge_iterator in_edge_iter; + + for (vertex_iter vi = vertex_set.begin(); vi != vertex_set.end(); ++vi) { + vertex_t v = *vi; + std::vector inv_adj; + for (edge_iter e = edge_set.begin(); e != edge_set.end(); ++e) + if (e->second == v) + inv_adj.push_back(e->first); + + std::pair p = in_edges(v, g); + BOOST_CHECK(in_degree(v, g) == inv_adj.size()); + BOOST_CHECK(deg_size_t(std::distance(p.first, p.second)) + == in_degree(v, g)); + for (; p.first != p.second; ++p.first) { + edge_t e = *p.first; + BOOST_CHECK(target(e, g) == v); + BOOST_CHECK(container_contains(inv_adj, source(e, g)) == true); + } + } + } + + void test_adjacency_graph + (const std::vector& vertex_set, + const std::vector< std::pair >& edge_set, + const Graph& g) + { + typedef typename std::vector::const_iterator vertex_iter; + typedef typename std::vector > + ::const_iterator edge_iter; + typedef typename graph_traits::adjacency_iterator adj_iter; + + for (vertex_iter ui = vertex_set.begin(); ui != vertex_set.end(); ++ui) { + vertex_t u = *ui; + std::vector adj; + for (edge_iter e = edge_set.begin(); e != edge_set.end(); ++e) + if (e->first == u) + adj.push_back(e->second); + + std::pair p = adjacent_vertices(u, g); + BOOST_CHECK(deg_size_t(std::distance(p.first, p.second)) == adj.size()); + for (; p.first != p.second; ++p.first) { + vertex_t v = *p.first; + BOOST_CHECK(container_contains(adj, v) == true); + } + } + } + + void test_vertex_list_graph + (const std::vector& vertex_set, const Graph& g) + { + typedef typename graph_traits::vertex_iterator v_iter; + std::pair p = vertices(g); + BOOST_CHECK(num_vertices(g) == vertex_set.size()); + v_size_t n = (size_t)std::distance(p.first, p.second); + BOOST_CHECK(n == num_vertices(g)); + for (; p.first != p.second; ++p.first) { + vertex_t v = *p.first; + BOOST_CHECK(container_contains(vertex_set, v) == true); + } + } + + void test_edge_list_graph + (const std::vector& vertex_set, + const std::vector< std::pair >& edge_set, + const Graph& g) + { + typedef typename graph_traits::edge_iterator e_iter; + std::pair p = edges(g); + BOOST_CHECK(num_edges(g) == edge_set.size()); + e_size_t m = std::distance(p.first, p.second); + BOOST_CHECK(m == num_edges(g)); + for (; p.first != p.second; ++p.first) { + edge_t e = *p.first; + BOOST_CHECK(find_if(edge_set, connects(source(e, g), target(e, g), g)) != boost::end(edge_set)); + BOOST_CHECK(container_contains(vertex_set, source(e, g)) == true); + BOOST_CHECK(container_contains(vertex_set, target(e, g)) == true); + } + } + + void test_adjacency_matrix + (const std::vector& vertex_set, + const std::vector< std::pair >& edge_set, + const Graph& g) + { + std::pair p; + for (typename std::vector > + ::const_iterator i = edge_set.begin(); + i != edge_set.end(); ++i) { + p = edge(i->first, i->second, g); + BOOST_CHECK(p.second == true); + BOOST_CHECK(source(p.first, g) == i->first); + BOOST_CHECK(target(p.first, g) == i->second); + } + typename std::vector::const_iterator j, k; + for (j = vertex_set.begin(); j != vertex_set.end(); ++j) + for (k = vertex_set.begin(); k != vertex_set.end(); ++k) { + p = edge(*j, *k, g); + if (p.second == true) + BOOST_CHECK(find_if(edge_set, + connects(source(p.first, g), target(p.first, g), g)) != boost::end(edge_set)); + } + } + + //========================================================================= + // Mutating Operations + + void test_add_vertex(Graph& g) + { + Graph cpy; + std::vector iso_vec(num_vertices(g)); + IsoMap iso_map(iso_vec.begin(), get(vertex_index, g)); + copy_graph(g, cpy, orig_to_copy(iso_map)); + + assert((verify_isomorphism(g, cpy, iso_map))); + + vertex_t v = add_vertex(g); + + BOOST_CHECK(num_vertices(g) == num_vertices(cpy) + 1); + + BOOST_CHECK(out_degree(v, g) == 0); + + // Make sure the rest of the graph stayed the same + BOOST_CHECK((verify_isomorphism + (make_filtered_graph(g, keep_all(), ignore_vertex(v)), cpy, + iso_map))); + } + + void test_add_edge(vertex_t u, vertex_t v, Graph& g) + { + Graph cpy; + std::vector iso_vec(num_vertices(g)); + IsoMap iso_map(iso_vec.begin(), get(vertex_index, g)); + copy_graph(g, cpy, orig_to_copy(iso_map)); + + bool parallel_edge_exists = container_contains(adjacent_vertices(u, g), v); + + std::pair p = add_edge(u, v, g); + edge_t e = p.first; + bool added = p.second; + + if (is_undirected(g) && u == v) // self edge + BOOST_CHECK(added == false); + else if (parallel_edge_exists) + BOOST_CHECK(allows_parallel_edges(g) && added == true + || !allows_parallel_edges(g) && added == false); + else + BOOST_CHECK(added == true); + + if (p.second == true) { // edge added + BOOST_CHECK(num_edges(g) == num_edges(cpy) + 1); + + BOOST_CHECK(container_contains(out_edges(u, g), e) == true); + + BOOST_CHECK((verify_isomorphism + (make_filtered_graph(g, ignore_edge(e)), cpy, iso_map))); + } + else { // edge not added + if (! (is_undirected(g) && u == v)) { + // e should be a parallel edge + BOOST_CHECK(source(e, g) == u); + BOOST_CHECK(target(e, g) == v); + } + // The graph should not be changed. + BOOST_CHECK((verify_isomorphism(g, cpy, iso_map))); + } + } // test_add_edge() + + + void test_remove_edge(vertex_t u, vertex_t v, Graph& g) + { + Graph cpy; + std::vector iso_vec(num_vertices(g)); + IsoMap iso_map(iso_vec.begin(), get(vertex_index, g)); + copy_graph(g, cpy, orig_to_copy(iso_map)); + + deg_size_t occurances = count(adjacent_vertices(u, g), v); + + remove_edge(u, v, g); + + BOOST_CHECK(num_edges(g) + occurances == num_edges(cpy)); + BOOST_CHECK((verify_isomorphism + (g, make_filtered_graph(cpy, ignore_edges(u,v,cpy)), + iso_map))); + } + + void test_remove_edge(edge_t e, Graph& g) + { + Graph cpy; + std::vector iso_vec(num_vertices(g)); + IsoMap iso_map(iso_vec.begin(), get(vertex_index, g)); + copy_graph(g, cpy, orig_to_copy(iso_map)); + + vertex_t u = source(e, g), v = target(e, g); + deg_size_t occurances = count(adjacent_vertices(u, g), v); + + remove_edge(e, g); + + BOOST_CHECK(num_edges(g) + 1 == num_edges(cpy)); + BOOST_CHECK(count(adjacent_vertices(u, g), v) + 1 == occurances); + BOOST_CHECK((verify_isomorphism + (g, make_filtered_graph(cpy, ignore_edge(e)), + iso_map))); + } + + void test_clear_vertex(vertex_t v, Graph& g) + { + Graph cpy; + std::vector iso_vec(num_vertices(g)); + IsoMap iso_map(iso_vec.begin(), get(vertex_index, g)); + copy_graph(g, cpy, orig_to_copy(iso_map)); + + clear_vertex(v, g); + + BOOST_CHECK(out_degree(v, g) == 0); + BOOST_CHECK(num_vertices(g) == num_vertices(cpy)); + BOOST_CHECK((verify_isomorphism + (g, make_filtered_graph(cpy, keep_all(), ignore_vertex(v)), + iso_map))); + } + + //========================================================================= + // Property Map + + template + void test_readable_vertex_property_graph + (const std::vector& vertex_prop, PropertyTag, const Graph& g) + { + typedef typename property_map::const_type const_Map; + const_Map pmap = get(PropertyTag(), g); + typename std::vector::const_iterator i = vertex_prop.begin(); + + for (typename boost::graph_traits::vertex_iterator + bgl_first_9 = vertices(g).first, bgl_last_9 = vertices(g).second; + bgl_first_9 != bgl_last_9; bgl_first_9 = bgl_last_9) + for (typename boost::graph_traits::vertex_descriptor v; + bgl_first_9 != bgl_last_9 ? (v = *bgl_first_9, true) : false; + ++bgl_first_9) { + //BGL_FORALL_VERTICES_T(v, g, Graph) { + typename property_traits::value_type + pval1 = get(pmap, v), pval2 = get(PropertyTag(), g, v); + BOOST_CHECK(pval1 == pval2); + BOOST_CHECK(pval1 == *i++); + } + } + + template + void test_vertex_property_graph + (const std::vector& vertex_prop, PropertyTag tag, Graph& g) + { + typedef typename property_map::type PMap; + PMap pmap = get(PropertyTag(), g); + typename std::vector::const_iterator i = vertex_prop.begin(); + for (typename boost::graph_traits::vertex_iterator + bgl_first_9 = vertices(g).first, bgl_last_9 = vertices(g).second; + bgl_first_9 != bgl_last_9; bgl_first_9 = bgl_last_9) + for (typename boost::graph_traits::vertex_descriptor v; + bgl_first_9 != bgl_last_9 ? (v = *bgl_first_9, true) : false; + ++bgl_first_9) + // BGL_FORALL_VERTICES_T(v, g, Graph) + put(pmap, v, *i++); + + test_readable_vertex_property_graph(vertex_prop, tag, g); + + BGL_FORALL_VERTICES_T(v, g, Graph) + put(pmap, v, vertex_prop[0]); + + typename std::vector::const_iterator j = vertex_prop.begin(); + BGL_FORALL_VERTICES_T(v, g, Graph) + put(PropertyTag(), g, v, *j++); + + test_readable_vertex_property_graph(vertex_prop, tag, g); + } + + + }; + + +} // namespace boost + +#include + +#endif // BOOST_GRAPH_TEST_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_traits.hpp new file mode 100644 index 0000000000..fd1b0415c8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_traits.hpp @@ -0,0 +1,353 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_TRAITS_HPP +#define BOOST_GRAPH_TRAITS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + struct graph_traits { + typedef typename G::vertex_descriptor vertex_descriptor; + typedef typename G::edge_descriptor edge_descriptor; + typedef typename G::adjacency_iterator adjacency_iterator; + typedef typename G::out_edge_iterator out_edge_iterator; + typedef typename G::in_edge_iterator in_edge_iterator; + typedef typename G::vertex_iterator vertex_iterator; + typedef typename G::edge_iterator edge_iterator; + + typedef typename G::directed_category directed_category; + typedef typename G::edge_parallel_category edge_parallel_category; + typedef typename G::traversal_category traversal_category; + + typedef typename G::vertices_size_type vertices_size_type; + typedef typename G::edges_size_type edges_size_type; + typedef typename G::degree_size_type degree_size_type; + + static inline vertex_descriptor null_vertex(); + }; + + template + inline typename graph_traits::vertex_descriptor + graph_traits::null_vertex() + { return G::null_vertex(); } + + // directed_category tags + struct directed_tag { }; + struct undirected_tag { }; + struct bidirectional_tag : public directed_tag { }; + + namespace detail { + inline bool is_directed(directed_tag) { return true; } + inline bool is_directed(undirected_tag) { return false; } + } + + /** Return true if the given graph is directed. */ + template + bool is_directed(const Graph&) { + typedef typename graph_traits::directed_category Cat; + return detail::is_directed(Cat()); + } + + /** Return true if the given graph is undirected. */ + template + bool is_undirected(const Graph& g) { + return !is_directed(g); + } + + /** @name Directed/Undirected Graph Traits */ + //@{ + namespace graph_detail { + template + struct is_directed_tag + : mpl::bool_::value> + { }; + } // namespace graph_detail + + template + struct is_directed_graph + : graph_detail::is_directed_tag< + typename graph_traits::directed_category + > + { }; + + template + struct is_undirected_graph + : mpl::not_< is_directed_graph > + { }; + //@} + + // edge_parallel_category tags + struct allow_parallel_edge_tag { }; + struct disallow_parallel_edge_tag { }; + + namespace detail { + inline bool allows_parallel(allow_parallel_edge_tag) { return true; } + inline bool allows_parallel(disallow_parallel_edge_tag) { return false; } + } + + template + bool allows_parallel_edges(const Graph&) { + typedef typename graph_traits::edge_parallel_category Cat; + return detail::allows_parallel(Cat()); + } + + /** @name Parallel Edges Traits */ + //@{ + /** + * The is_multigraph metafunction returns true if the graph allows + * parallel edges. Technically, a multigraph is a simple graph that + * allows parallel edges, but since there are no traits for the allowance + * or disallowance of loops, this is a moot point. + */ + template + struct is_multigraph + : mpl::bool_< + is_same< + typename graph_traits::edge_parallel_category, + allow_parallel_edge_tag + >::value + > + { }; + //@} + + // traversal_category tags + struct incidence_graph_tag { }; + struct adjacency_graph_tag { }; + struct bidirectional_graph_tag : virtual incidence_graph_tag { }; + struct vertex_list_graph_tag { }; + struct edge_list_graph_tag { }; + struct adjacency_matrix_tag { }; + + /** @name Taversal Category Traits + * These traits classify graph types by their supported methods of + * vertex and edge traversal. + */ + //@{ + template + struct is_incidence_graph + : mpl::bool_< + is_convertible< + typename graph_traits::traversal_category, + incidence_graph_tag + >::value + > + { }; + + template + struct is_bidirectional_graph + : mpl::bool_< + is_convertible< + typename graph_traits::traversal_category, + bidirectional_graph_tag + >::value + > + { }; + + template + struct is_vertex_list_graph + : mpl::bool_< + is_convertible< + typename graph_traits::traversal_category, + vertex_list_graph_tag + >::value + > + { }; + + template + struct is_edge_list_graph + : mpl::bool_< + is_convertible< + typename graph_traits::traversal_category, + edge_list_graph_tag + >::value + > + { }; + + template + struct is_adjacency_matrix + : mpl::bool_< + is_convertible< + typename graph_traits::traversal_category, + adjacency_matrix_tag + >::value + > + { }; + //@} + + /** @name Directed Graph Traits + * These metafunctions are used to fully classify directed vs. undirected + * graphs. Recall that an undirected graph is also bidirectional, but it + * cannot be both undirected and directed at the same time. + */ + //@{ + template + struct is_directed_unidirectional_graph + : mpl::and_< + is_directed_graph, mpl::not_< is_bidirectional_graph > + > + { }; + + template + struct is_directed_bidirectional_graph + : mpl::and_< + is_directed_graph, is_bidirectional_graph + > + { }; + //@} + + //?? not the right place ?? Lee + typedef boost::forward_traversal_tag multi_pass_input_iterator_tag; + + template + struct graph_property_type { + typedef typename G::graph_property_type type; + }; + template + struct edge_property_type { + typedef typename G::edge_property_type type; + }; + template + struct vertex_property_type { + typedef typename G::vertex_property_type type; + }; + + struct no_bundle { }; + struct no_graph_bundle : no_bundle { }; + struct no_vertex_bundle : no_bundle { }; + struct no_edge_bundle : no_bundle { }; + + template + struct graph_bundle_type { + typedef typename G::graph_bundled type; + }; + + template + struct vertex_bundle_type { + typedef typename G::vertex_bundled type; + }; + + template + struct edge_bundle_type { + typedef typename G::edge_bundled type; + }; + + namespace graph { namespace detail { + template + class bundled_result { + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename mpl::if_c<(is_same::value), + vertex_bundle_type, + edge_bundle_type >::type bundler; + public: + typedef typename bundler::type type; + }; + + } } // namespace graph::detail + + namespace graph_detail { + // A helper metafunction for determining whether or not a type is + // bundled. + template + struct is_no_bundle : mpl::bool_::value> + { }; + } // namespace graph_detail + + /** @name Graph Property Traits + * These metafunctions (along with those above), can be used to access the + * vertex and edge properties (bundled or otherwise) of vertices and + * edges. + */ + //@{ + template + struct has_graph_property + : mpl::not_< + typename detail::is_no_property< + typename graph_property_type::type + >::type + >::type + { }; + + template + struct has_bundled_graph_property + : mpl::not_< + graph_detail::is_no_bundle::type> + > + { }; + + template + struct has_vertex_property + : mpl::not_< + typename detail::is_no_property::type> + >::type + { }; + + template + struct has_bundled_vertex_property + : mpl::not_< + graph_detail::is_no_bundle::type> + > + { }; + + template + struct has_edge_property + : mpl::not_< + typename detail::is_no_property::type> + >::type + { }; + + template + struct has_bundled_edge_property + : mpl::not_< + graph_detail::is_no_bundle::type> + > + { }; + //@} + +} // namespace boost + +// Since pair is in namespace std, Koenig lookup will find source and +// target if they are also defined in namespace std. This is illegal, +// but the alternative is to put source and target in the global +// namespace which causes name conflicts with other libraries (like +// SUIF). +namespace std { + + /* Some helper functions for dealing with pairs as edges */ + template + T source(pair p, const G&) { return p.first; } + + template + T target(pair p, const G&) { return p.second; } + +} + +#if defined(__GNUC__) && defined(__SGI_STL_PORT) +// For some reason g++ with STLport does not see the above definition +// of source() and target() unless we bring them into the boost +// namespace. +namespace boost { + using std::source; + using std::target; +} +#endif + +#endif // BOOST_GRAPH_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_utility.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_utility.hpp new file mode 100644 index 0000000000..ba1fe3d833 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graph_utility.hpp @@ -0,0 +1,510 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_UTILITY_HPP +#define BOOST_GRAPH_UTILITY_HPP + +#include +#include +#include +#include +#include +#include + +#if !defined BOOST_NO_SLIST +# ifdef BOOST_SLIST_HEADER +# include BOOST_SLIST_HEADER +# else +# include +# endif +#endif + +#include +#include +#include +#include +// iota moved to detail/algorithm.hpp +#include + +namespace boost { + + // Provide an undirected graph interface alternative to the + // the source() and target() edge functions. + template + inline + std::pair::vertex_descriptor, + typename graph_traits::vertex_descriptor> + incident(typename graph_traits::edge_descriptor e, + UndirectedGraph& g) + { + return std::make_pair(source(e,g), target(e,g)); + } + + // Provide an undirected graph interface alternative + // to the out_edges() function. + template + inline + std::pair::out_edge_iterator, + typename graph_traits::out_edge_iterator> + incident_edges(typename graph_traits::vertex_descriptor u, + Graph& g) + { + return out_edges(u, g); + } + + template + inline typename graph_traits::vertex_descriptor + opposite(typename graph_traits::edge_descriptor e, + typename graph_traits::vertex_descriptor v, + const Graph& g) + { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + if (v == source(e, g)) + return target(e, g); + else if (v == target(e, g)) + return source(e, g); + else + return vertex_descriptor(); + } + + //=========================================================================== + // Some handy predicates + + template + struct incident_from_predicate { + incident_from_predicate(Vertex u, const Graph& g) + : m_u(u), m_g(g) { } + template + bool operator()(const Edge& e) const { + return source(e, m_g) == m_u; + } + Vertex m_u; + const Graph& m_g; + }; + template + inline incident_from_predicate + incident_from(Vertex u, const Graph& g) { + return incident_from_predicate(u, g); + } + + template + struct incident_to_predicate { + incident_to_predicate(Vertex u, const Graph& g) + : m_u(u), m_g(g) { } + template + bool operator()(const Edge& e) const { + return target(e, m_g) == m_u; + } + Vertex m_u; + const Graph& m_g; + }; + template + inline incident_to_predicate + incident_to(Vertex u, const Graph& g) { + return incident_to_predicate(u, g); + } + + template + struct incident_on_predicate { + incident_on_predicate(Vertex u, const Graph& g) + : m_u(u), m_g(g) { } + template + bool operator()(const Edge& e) const { + return source(e, m_g) == m_u || target(e, m_g) == m_u; + } + Vertex m_u; + const Graph& m_g; + }; + template + inline incident_on_predicate + incident_on(Vertex u, const Graph& g) { + return incident_on_predicate(u, g); + } + + template + struct connects_predicate { + connects_predicate(Vertex u, Vertex v, const Graph& g) + : m_u(u), m_v(v), m_g(g) { } + template + bool operator()(const Edge& e) const { + if (is_directed(m_g)) + return source(e, m_g) == m_u && target(e, m_g) == m_v; + else + return (source(e, m_g) == m_u && target(e, m_g) == m_v) + || (source(e, m_g) == m_v && target(e, m_g) == m_u); + } + Vertex m_u, m_v; + const Graph& m_g; + }; + template + inline connects_predicate + connects(Vertex u, Vertex v, const Graph& g) { + return connects_predicate(u, v, g); + } + + + // Need to convert all of these printing functions to take an ostream object + // -JGS + + template + void print_in_edges(const IncidenceGraph& G, Name name) + { + typename graph_traits::vertex_iterator ui,ui_end; + for (boost::tie(ui,ui_end) = vertices(G); ui != ui_end; ++ui) { + std::cout << get(name,*ui) << " <-- "; + typename graph_traits + ::in_edge_iterator ei, ei_end; + for(boost::tie(ei,ei_end) = in_edges(*ui,G); ei != ei_end; ++ei) + std::cout << get(name,source(*ei,G)) << " "; + std::cout << std::endl; + } + } + + template + void print_graph_dispatch(const IncidenceGraph& G, Name name, directed_tag) + { + typename graph_traits::vertex_iterator ui,ui_end; + for (boost::tie(ui,ui_end) = vertices(G); ui != ui_end; ++ui) { + std::cout << get(name,*ui) << " --> "; + typename graph_traits + ::out_edge_iterator ei, ei_end; + for(boost::tie(ei,ei_end) = out_edges(*ui,G); ei != ei_end; ++ei) + std::cout << get(name,target(*ei,G)) << " "; + std::cout << std::endl; + } + } + template + void print_graph_dispatch(const IncidenceGraph& G, Name name, undirected_tag) + { + typename graph_traits::vertex_iterator ui,ui_end; + for (boost::tie(ui,ui_end) = vertices(G); ui != ui_end; ++ui) { + std::cout << get(name,*ui) << " <--> "; + typename graph_traits + ::out_edge_iterator ei, ei_end; + for(boost::tie(ei,ei_end) = out_edges(*ui,G); ei != ei_end; ++ei) + std::cout << get(name,target(*ei,G)) << " "; + std::cout << std::endl; + } + } + template + void print_graph(const IncidenceGraph& G, Name name) + { + typedef typename graph_traits + ::directed_category Cat; + print_graph_dispatch(G, name, Cat()); + } + template + void print_graph(const IncidenceGraph& G) { + print_graph(G, get(vertex_index, G)); + } + + template + void print_edges(const EdgeListGraph& G, Name name) + { + typename graph_traits::edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = edges(G); ei != ei_end; ++ei) + std::cout << "(" << get(name, source(*ei, G)) + << "," << get(name, target(*ei, G)) << ") "; + std::cout << std::endl; + } + + template + void print_edges2(const EdgeListGraph& G, VertexName vname, EdgeName ename) + { + typename graph_traits::edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = edges(G); ei != ei_end; ++ei) + std::cout << get(ename, *ei) << "(" << get(vname, source(*ei, G)) + << "," << get(vname, target(*ei, G)) << ") "; + std::cout << std::endl; + } + + template + void print_vertices(const VertexListGraph& G, Name name) + { + typename graph_traits::vertex_iterator vi,vi_end; + for (boost::tie(vi,vi_end) = vertices(G); vi != vi_end; ++vi) + std::cout << get(name,*vi) << " "; + std::cout << std::endl; + } + + template + bool is_adj_dispatch(Graph& g, Vertex a, Vertex b, bidirectional_tag) + { + typedef typename graph_traits::edge_descriptor + edge_descriptor; + typename graph_traits::adjacency_iterator vi, viend, + adj_found; + boost::tie(vi, viend) = adjacent_vertices(a, g); + adj_found = std::find(vi, viend, b); + if (adj_found == viend) + return false; + + typename graph_traits::out_edge_iterator oi, oiend, + out_found; + boost::tie(oi, oiend) = out_edges(a, g); + out_found = std::find_if(oi, oiend, incident_to(b, g)); + if (out_found == oiend) + return false; + + typename graph_traits::in_edge_iterator ii, iiend, + in_found; + boost::tie(ii, iiend) = in_edges(b, g); + in_found = std::find_if(ii, iiend, incident_from(a, g)); + if (in_found == iiend) + return false; + + return true; + } + template + bool is_adj_dispatch(Graph& g, Vertex a, Vertex b, directed_tag) + { + typedef typename graph_traits::edge_descriptor + edge_descriptor; + typename graph_traits::adjacency_iterator vi, viend, found; + boost::tie(vi, viend) = adjacent_vertices(a, g); +#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 && defined(__SGI_STL_PORT) + // Getting internal compiler error with std::find() + found = viend; + for (; vi != viend; ++vi) + if (*vi == b) { + found = vi; + break; + } +#else + found = std::find(vi, viend, b); +#endif + if ( found == viend ) + return false; + + typename graph_traits::out_edge_iterator oi, oiend, + out_found; + boost::tie(oi, oiend) = out_edges(a, g); + +#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 && defined(__SGI_STL_PORT) + // Getting internal compiler error with std::find() + out_found = oiend; + for (; oi != oiend; ++oi) + if (target(*oi, g) == b) { + out_found = oi; + break; + } +#else + out_found = std::find_if(oi, oiend, incident_to(b, g)); +#endif + if (out_found == oiend) + return false; + return true; + } + template + bool is_adj_dispatch(Graph& g, Vertex a, Vertex b, undirected_tag) + { + return is_adj_dispatch(g, a, b, directed_tag()); + } + + template + bool is_adjacent(Graph& g, Vertex a, Vertex b) { + typedef typename graph_traits::directed_category Cat; + return is_adj_dispatch(g, a, b, Cat()); + } + + template + bool in_edge_set(Graph& g, Edge e) + { + typename Graph::edge_iterator ei, ei_end, found; + boost::tie(ei, ei_end) = edges(g); + found = std::find(ei, ei_end, e); + return found != ei_end; + } + + template + bool in_vertex_set(Graph& g, Vertex v) + { + typename Graph::vertex_iterator vi, vi_end, found; + boost::tie(vi, vi_end) = vertices(g); + found = std::find(vi, vi_end, v); + return found != vi_end; + } + + template + bool in_edge_set(Graph& g, Vertex u, Vertex v) + { + typename Graph::edge_iterator ei, ei_end; + for (boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) + if (source(*ei,g) == u && target(*ei,g) == v) + return true; + return false; + } + + // is x a descendant of y? + template + inline bool is_descendant + (typename property_traits::value_type x, + typename property_traits::value_type y, + ParentMap parent) + { + if (get(parent, x) == x) // x is the root of the tree + return false; + else if (get(parent, x) == y) + return true; + else + return is_descendant(get(parent, x), y, parent); + } + + // is y reachable from x? + template + inline bool is_reachable + (typename graph_traits::vertex_descriptor x, + typename graph_traits::vertex_descriptor y, + const IncidenceGraph& g, + VertexColorMap color) // should start out white for every vertex + { + typedef typename property_traits::value_type ColorValue; + dfs_visitor<> vis; + depth_first_visit(g, x, vis, color); + return get(color, y) != color_traits::white(); + } + + // Is the undirected graph connected? + // Is the directed graph strongly connected? + template + inline bool is_connected(const VertexListGraph& g, VertexColorMap color) + { + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typename graph_traits::vertex_iterator + ui, ui_end, vi, vi_end, ci, ci_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + if (*ui != *vi) { + for (boost::tie(ci, ci_end) = vertices(g); ci != ci_end; ++ci) + put(color, *ci, Color::white()); + if (! is_reachable(*ui, *vi, g, color)) + return false; + } + return true; + } + + template + bool is_self_loop + (typename graph_traits::edge_descriptor e, + const Graph& g) + { + return source(e, g) == target(e, g); + } + + + template + std::pair + make_list(const T1& t1, const T2& t2) + { return std::make_pair(t1, t2); } + + template + std::pair > + make_list(const T1& t1, const T2& t2, const T3& t3) + { return std::make_pair(t1, std::make_pair(t2, t3)); } + + template + std::pair > > + make_list(const T1& t1, const T2& t2, const T3& t3, const T4& t4) + { return std::make_pair(t1, std::make_pair(t2, std::make_pair(t3, t4))); } + + template + std::pair > > > + make_list(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) + { return std::make_pair(t1, std::make_pair(t2, std::make_pair(t3, std::make_pair(t4, t5)))); } + + namespace graph { + + // Functor for remove_parallel_edges: edge property of the removed edge is added to the remaining + template + struct add_removed_edge_property + { + add_removed_edge_property(EdgeProperty ep) : ep(ep) {} + + template + void operator() (Edge stay, Edge away) + { + put(ep, stay, get(ep, stay) + get(ep, away)); + } + EdgeProperty ep; + }; + + // Same as above: edge property is capacity here + template + struct add_removed_edge_capacity + : add_removed_edge_property::type> + { + typedef add_removed_edge_property::type> base; + add_removed_edge_capacity(Graph& g) : base(get(edge_capacity, g)) {} + }; + + template + bool has_no_vertices(const Graph& g) { + typedef typename boost::graph_traits::vertex_iterator vi; + std::pair p = vertices(g); + return (p.first == p.second); + } + + template + bool has_no_edges(const Graph& g) { + typedef typename boost::graph_traits::edge_iterator ei; + std::pair p = edges(g); + return (p.first == p.second); + } + + template + bool has_no_out_edges(const typename boost::graph_traits::vertex_descriptor& v, const Graph& g) { + typedef typename boost::graph_traits::out_edge_iterator ei; + std::pair p = out_edges(v, g); + return (p.first == p.second); + } + + } // namespace graph + + #include + + template + void copy_vertex_property(PropertyIn p_in, PropertyOut p_out, Graph& g) + { + BGL_FORALL_VERTICES_T(u, g, Graph) + put(p_out, u, get(p_in, g)); + } + + template + void copy_edge_property(PropertyIn p_in, PropertyOut p_out, Graph& g) + { + BGL_FORALL_EDGES_T(e, g, Graph) + put(p_out, e, get(p_in, g)); + } + + // Return true if property_map1 and property_map2 differ + // for any of the vertices in graph. + template + bool are_property_maps_different + (const PropertyMapFirst property_map1, + const PropertyMapSecond property_map2, + const Graph& graph) { + + BGL_FORALL_VERTICES_T(vertex, graph, Graph) { + if (get(property_map1, vertex) != + get(property_map2, vertex)) { + + return (true); + } + } + + return (false); + } + +} /* namespace boost */ + +#endif /* BOOST_GRAPH_UTILITY_HPP*/ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graphml.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graphml.hpp new file mode 100644 index 0000000000..6afa12c962 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graphml.hpp @@ -0,0 +1,350 @@ +// Copyright (C) 2006 Tiago de Paula Peixoto +// Copyright (C) 2004 The Trustees of Indiana University. +// +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Authors: Douglas Gregor +// Andrew Lumsdaine +// Tiago de Paula Peixoto + +#ifndef BOOST_GRAPH_GRAPHML_HPP +#define BOOST_GRAPH_GRAPHML_HPP + +#include +#include +#include +#include +#include +#include // for exceptions +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + +///////////////////////////////////////////////////////////////////////////// +// Graph reader exceptions +///////////////////////////////////////////////////////////////////////////// +struct parse_error: public graph_exception +{ + parse_error(const std::string& err) {error = err; statement = "parse error: " + error;} + virtual ~parse_error() throw() {} + virtual const char* what() const throw() {return statement.c_str();} + std::string statement; + std::string error; +}; + + +class mutate_graph +{ +public: + virtual ~mutate_graph() {} + virtual bool is_directed() const = 0; + + virtual boost::any do_add_vertex() = 0; + virtual std::pair do_add_edge(boost::any source, boost::any target) = 0; + + virtual void + set_graph_property(const std::string& name, const std::string& value, const std::string& value_type) = 0; + + virtual void + set_vertex_property(const std::string& name, boost::any vertex, const std::string& value, const std::string& value_type) = 0; + + virtual void + set_edge_property(const std::string& name, boost::any edge, const std::string& value, const std::string& value_type) = 0; +}; + +template +class mutate_graph_impl : public mutate_graph +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + public: + mutate_graph_impl(MutableGraph& g, dynamic_properties& dp) + : m_g(g), m_dp(dp) { } + + bool is_directed() const + { + return is_convertible::directed_category, + directed_tag>::value; + } + + virtual any do_add_vertex() + { + return any(add_vertex(m_g)); + } + + virtual std::pair do_add_edge(any source, any target) + { + std::pair retval = add_edge(any_cast(source), + any_cast(target), m_g); + return std::make_pair(any(retval.first), retval.second); + } + + virtual void + set_graph_property(const std::string& name, const std::string& value, const std::string& value_type) + { + bool type_found = false; + try + { + mpl::for_each(put_property + (name, m_dp, m_g, value, value_type, m_type_names, type_found)); + } + catch (bad_lexical_cast) + { + BOOST_THROW_EXCEPTION( + parse_error("invalid value \"" + value + "\" for key " + + name + " of type " + value_type)); + } + if (!type_found) + { + BOOST_THROW_EXCEPTION( + parse_error("unrecognized type \"" + value_type + + "\" for key " + name)); + } + + } + + virtual void + set_vertex_property(const std::string& name, any vertex, const std::string& value, const std::string& value_type) + { + bool type_found = false; + try + { + mpl::for_each(put_property + (name, m_dp, any_cast(vertex), + value, value_type, m_type_names, type_found)); + } + catch (bad_lexical_cast) + { + BOOST_THROW_EXCEPTION( + parse_error("invalid value \"" + value + "\" for key " + + name + " of type " + value_type)); + } + if (!type_found) + { + BOOST_THROW_EXCEPTION( + parse_error("unrecognized type \"" + value_type + + "\" for key " + name)); + } + + } + + virtual void + set_edge_property(const std::string& name, any edge, const std::string& value, const std::string& value_type) + { + bool type_found = false; + try + { + mpl::for_each(put_property + (name, m_dp, any_cast(edge), + value, value_type, m_type_names, type_found)); + } + catch (bad_lexical_cast) + { + BOOST_THROW_EXCEPTION( + parse_error("invalid value \"" + value + "\" for key " + + name + " of type " + value_type)); + } + if (!type_found) + { + BOOST_THROW_EXCEPTION( + parse_error("unrecognized type \"" + value_type + + "\" for key " + name)); + } + } + + template + class put_property + { + public: + put_property(const std::string& name, dynamic_properties& dp, const Key& key, + const std::string& value, const std::string& value_type, + const char** type_names, bool& type_found) + : m_name(name), m_dp(dp), m_key(key), m_value(value), + m_value_type(value_type), m_type_names(type_names), + m_type_found(type_found) {} + template + void operator()(Value) + { + if (m_value_type == m_type_names[mpl::find::type::pos::value]) + { + put(m_name, m_dp, m_key, lexical_cast(m_value)); + m_type_found = true; + } + } + private: + const std::string& m_name; + dynamic_properties& m_dp; + const Key& m_key; + const std::string& m_value; + const std::string& m_value_type; + const char** m_type_names; + bool& m_type_found; + }; + +protected: + MutableGraph& m_g; + dynamic_properties& m_dp; + typedef mpl::vector value_types; + static const char* m_type_names[]; +}; + +template +const char* mutate_graph_impl::m_type_names[] = {"boolean", "int", "long", "float", "double", "string"}; + +void BOOST_GRAPH_DECL +read_graphml(std::istream& in, mutate_graph& g); + +template +void +read_graphml(std::istream& in, MutableGraph& g, dynamic_properties& dp) +{ + mutate_graph_impl mg(g,dp); + read_graphml(in, mg); +} + +template +class get_type_name +{ +public: + get_type_name(const std::type_info& type, const char** type_names, std::string& type_name) + : m_type(type), m_type_names(type_names), m_type_name(type_name) {} + template + void operator()(Type) + { + if (typeid(Type) == m_type) + m_type_name = m_type_names[mpl::find::type::pos::value]; + } +private: + const std::type_info &m_type; + const char** m_type_names; + std::string &m_type_name; +}; + + +template +void +write_graphml(std::ostream& out, const Graph& g, VertexIndexMap vertex_index, + const dynamic_properties& dp, bool ordered_vertices=false) +{ + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + using boost::property_tree::xml_parser::encode_char_entities; + + BOOST_STATIC_CONSTANT(bool, + graph_is_directed = + (is_convertible::value)); + + out << "\n" + << "\n"; + + typedef mpl::vector value_types; + const char* type_names[] = {"boolean", "int", "int", "int", "int", "long", "long", "long", "long", "float", "double", "double", "string"}; + std::map graph_key_ids; + std::map vertex_key_ids; + std::map edge_key_ids; + int key_count = 0; + + // Output keys + for (dynamic_properties::const_iterator i = dp.begin(); i != dp.end(); ++i) + { + std::string key_id = "key" + lexical_cast(key_count++); + if (i->second->key() == typeid(Graph)) + vertex_key_ids[i->first] = key_id; + else if (i->second->key() == typeid(vertex_descriptor)) + vertex_key_ids[i->first] = key_id; + else if (i->second->key() == typeid(edge_descriptor)) + edge_key_ids[i->first] = key_id; + else + continue; + std::string type_name = "string"; + mpl::for_each(get_type_name(i->second->value(), type_names, type_name)); + out << " second->key() == typeid(Graph) ? "graph" : (i->second->key() == typeid(vertex_descriptor) ? "node" : "edge")) << "\"" + << " attr.name=\"" << i->first << "\"" + << " attr.type=\"" << type_name << "\"" + << " />\n"; + } + + out << " \n"; + + // Output graph data + for (dynamic_properties::const_iterator i = dp.begin(); i != dp.end(); ++i) + { + if (i->second->key() == typeid(Graph)) + { + out << " first] << "\">" + << encode_char_entities(i->second->get_string(g)) << "\n"; + } + } + + typedef typename graph_traits::vertex_iterator vertex_iterator; + vertex_iterator v, v_end; + for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) + { + out << " \n"; + // Output data + for (dynamic_properties::const_iterator i = dp.begin(); i != dp.end(); ++i) + { + if (i->second->key() == typeid(vertex_descriptor)) + { + out << " first] << "\">" + << encode_char_entities(i->second->get_string(*v)) << "\n"; + } + } + out << " \n"; + } + + typedef typename graph_traits::edge_iterator edge_iterator; + edge_iterator e, e_end; + typename graph_traits::edges_size_type edge_count = 0; + for (boost::tie(e, e_end) = edges(g); e != e_end; ++e) + { + out << " \n"; + + // Output data + for (dynamic_properties::const_iterator i = dp.begin(); i != dp.end(); ++i) + { + if (i->second->key() == typeid(edge_descriptor)) + { + out << " first] << "\">" + << encode_char_entities(i->second->get_string(*e)) << "\n"; + } + } + out << " \n"; + } + + out << " \n" + << "\n"; +} + + +template +void +write_graphml(std::ostream& out, const Graph& g, const dynamic_properties& dp, + bool ordered_vertices=false) +{ + write_graphml(out, g, get(vertex_index, g), dp, ordered_vertices); +} + +} // boost namespace + +#endif // BOOST_GRAPH_GRAPHML_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/graphviz.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/graphviz.hpp new file mode 100644 index 0000000000..1e6aeaf006 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/graphviz.hpp @@ -0,0 +1,855 @@ +//======================================================================= +// Copyright 2001 University of Notre Dame. +// Copyright 2003 Jeremy Siek +// Authors: Lie-Quan Lee, Jeremy Siek, and Douglas Gregor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPHVIZ_HPP +#define BOOST_GRAPHVIZ_HPP + +#include +#include +#include +#include +#include +#include // for FILE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + struct graphviz_io_traits { + static std::string name() { + return "digraph"; + } + static std::string delimiter() { + return "->"; + } }; + + template <> + struct graphviz_io_traits { + static std::string name() { + return "graph"; + } + static std::string delimiter() { + return "--"; + } + }; + + struct default_writer { + void operator()(std::ostream&) const { + } + template + void operator()(std::ostream&, const VorE&) const { + } + }; + + template + inline std::string escape_dot_string(const T& obj) { + using namespace boost::xpressive; + static sregex valid_unquoted_id = (((alpha | '_') >> *_w) | (!as_xpr('-') >> (('.' >> *_d) | (+_d >> !('.' >> *_d))))); + std::string s(boost::lexical_cast(obj)); + if (regex_match(s, valid_unquoted_id)) { + return s; + } else { + return "\"" + regex_replace(s, sregex(as_xpr('"')), "\\\"") + "\""; + } + } + + template + class label_writer { + public: + label_writer(Name _name) : name(_name) {} + template + void operator()(std::ostream& out, const VertexOrEdge& v) const { + out << "[label=" << escape_dot_string(get(name, v)) << "]"; + } + private: + Name name; + }; + template + inline label_writer + make_label_writer(Name n) { + return label_writer(n); + } + + enum edge_attribute_t { edge_attribute = 1111 }; + enum vertex_attribute_t { vertex_attribute = 2222 }; + enum graph_graph_attribute_t { graph_graph_attribute = 3333 }; + enum graph_vertex_attribute_t { graph_vertex_attribute = 4444 }; + enum graph_edge_attribute_t { graph_edge_attribute = 5555 }; + + BOOST_INSTALL_PROPERTY(edge, attribute); + BOOST_INSTALL_PROPERTY(vertex, attribute); + BOOST_INSTALL_PROPERTY(graph, graph_attribute); + BOOST_INSTALL_PROPERTY(graph, vertex_attribute); + BOOST_INSTALL_PROPERTY(graph, edge_attribute); + + + template + inline void write_attributes(const Attribute& attr, std::ostream& out) { + typename Attribute::const_iterator i, iend; + i = attr.begin(); + iend = attr.end(); + + while ( i != iend ) { + out << i->first << "=" << escape_dot_string(i->second); + ++i; + if ( i != iend ) + out << ", "; + } + } + + template + inline void write_all_attributes(Attributes attributes, + const std::string& name, + std::ostream& out) + { + typename Attributes::const_iterator i = attributes.begin(), + end = attributes.end(); + if (i != end) { + out << name << " [\n"; + write_attributes(attributes, out); + out << "];\n"; + } + } + + inline void write_all_attributes(detail::error_property_not_found, + const std::string&, + std::ostream&) + { + // Do nothing - no attributes exist + } + + + + + template + struct graph_attributes_writer + { + graph_attributes_writer(GraphGraphAttributes gg, + GraphNodeAttributes gn, + GraphEdgeAttributes ge) + : g_attributes(gg), n_attributes(gn), e_attributes(ge) { } + + void operator()(std::ostream& out) const { + write_all_attributes(g_attributes, "graph", out); + write_all_attributes(n_attributes, "node", out); + write_all_attributes(e_attributes, "edge", out); + } + GraphGraphAttributes g_attributes; + GraphNodeAttributes n_attributes; + GraphEdgeAttributes e_attributes; + }; + + template + graph_attributes_writer + make_graph_attributes_writer(const GAttrMap& g_attr, const NAttrMap& n_attr, + const EAttrMap& e_attr) { + return graph_attributes_writer + (g_attr, n_attr, e_attr); + } + + + template + graph_attributes_writer + ::type, + typename graph_property::type, + typename graph_property::type> + make_graph_attributes_writer(const Graph& g) + { + typedef typename graph_property::type + GAttrMap; + typedef typename graph_property::type + NAttrMap; + typedef typename graph_property::type + EAttrMap; + GAttrMap gam = get_property(g, graph_graph_attribute); + NAttrMap nam = get_property(g, graph_vertex_attribute); + EAttrMap eam = get_property(g, graph_edge_attribute); + graph_attributes_writer writer(gam, nam, eam); + return writer; + } + + template + struct attributes_writer { + attributes_writer(AttributeMap attr) + : attributes(attr) { } + + template + void operator()(std::ostream& out, const VorE& e) const { + this->write_attribute(out, attributes[e]); + } + + private: + template + void write_attribute(std::ostream& out, + const AttributeSequence& seq) const + { + if (!seq.empty()) { + out << "["; + write_attributes(seq, out); + out << "]"; + } + } + + void write_attribute(std::ostream&, + detail::error_property_not_found) const + { + } + AttributeMap attributes; + }; + + template + attributes_writer + ::const_type> + make_edge_attributes_writer(const Graph& g) + { + typedef typename property_map::const_type + EdgeAttributeMap; + return attributes_writer(get(edge_attribute, g)); + } + + template + attributes_writer + ::const_type> + make_vertex_attributes_writer(const Graph& g) + { + typedef typename property_map::const_type + VertexAttributeMap; + return attributes_writer(get(vertex_attribute, g)); + } + + template + inline void + write_graphviz + (std::ostream& out, const Graph& g, + VertexPropertiesWriter vpw, + EdgePropertiesWriter epw, + GraphPropertiesWriter gpw, + VertexID vertex_id + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) + { + BOOST_CONCEPT_ASSERT((EdgeListGraphConcept)); + + typedef typename graph_traits::directed_category cat_type; + typedef graphviz_io_traits Traits; + std::string name = "G"; + out << Traits::name() << " " << escape_dot_string(name) << " {" << std::endl; + + gpw(out); //print graph properties + + typename graph_traits::vertex_iterator i, end; + + for(boost::tie(i,end) = vertices(g); i != end; ++i) { + out << escape_dot_string(get(vertex_id, *i)); + vpw(out, *i); //print vertex attributes + out << ";" << std::endl; + } + typename graph_traits::edge_iterator ei, edge_end; + for(boost::tie(ei, edge_end) = edges(g); ei != edge_end; ++ei) { + out << escape_dot_string(get(vertex_id, source(*ei, g))) << Traits::delimiter() << escape_dot_string(get(vertex_id, target(*ei, g))) << " "; + epw(out, *ei); //print edge attributes + out << ";" << std::endl; + } + out << "}" << std::endl; + } + + template + inline void + write_graphviz(std::ostream& out, const Graph& g, + VertexPropertiesWriter vpw, + EdgePropertiesWriter epw, + GraphPropertiesWriter gpw + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) + { write_graphviz(out, g, vpw, epw, gpw, get(vertex_index, g)); } + +#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 + // ambiguous overload problem with VC++ + template + inline void + write_graphviz(std::ostream& out, const Graph& g + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) + { + default_writer dw; + default_writer gw; + write_graphviz(out, g, dw, dw, gw); + } +#endif + + template + inline void + write_graphviz(std::ostream& out, const Graph& g, VertexWriter vw + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) + { + default_writer dw; + default_writer gw; + write_graphviz(out, g, vw, dw, gw); + } + + template + inline void + write_graphviz(std::ostream& out, const Graph& g, + VertexWriter vw, EdgeWriter ew + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) + { + default_writer gw; + write_graphviz(out, g, vw, ew, gw); + } + + namespace detail { + + template + void write_graphviz_subgraph (std::ostream& out, + const subgraph& g, + RandomAccessIterator vertex_marker, + RandomAccessIterator edge_marker, + VertexID vertex_id) + { + typedef subgraph Graph; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::directed_category cat_type; + typedef graphviz_io_traits Traits; + + typedef typename graph_property::type NameType; + const NameType& g_name = get_property(g, graph_name); + + if ( g.is_root() ) + out << Traits::name() ; + else + out << "subgraph"; + + out << " " << escape_dot_string(g_name) << " {" << std::endl; + + typename Graph::const_children_iterator i_child, j_child; + + //print graph/node/edge attributes +#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 + typedef typename graph_property::type + GAttrMap; + typedef typename graph_property::type + NAttrMap; + typedef typename graph_property::type + EAttrMap; + GAttrMap gam = get_property(g, graph_graph_attribute); + NAttrMap nam = get_property(g, graph_vertex_attribute); + EAttrMap eam = get_property(g, graph_edge_attribute); + graph_attributes_writer writer(gam, nam, eam); + writer(out); +#else + make_graph_attributes_writer(g)(out); +#endif + + //print subgraph + for ( boost::tie(i_child,j_child) = g.children(); + i_child != j_child; ++i_child ) + write_graphviz_subgraph(out, *i_child, vertex_marker, edge_marker, + vertex_id); + + // Print out vertices and edges not in the subgraphs. + + typename graph_traits::vertex_iterator i, end; + typename graph_traits::edge_iterator ei, edge_end; + + for(boost::tie(i,end) = vertices(g); i != end; ++i) { + Vertex v = g.local_to_global(*i); + int pos = get(vertex_id, v); + if ( vertex_marker[pos] ) { + vertex_marker[pos] = false; + out << escape_dot_string(pos); +#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 + typedef typename property_map::const_type + VertexAttributeMap; + attributes_writer vawriter(get(vertex_attribute, + g.root())); + vawriter(out, v); +#else + make_vertex_attributes_writer(g.root())(out, v); +#endif + out << ";" << std::endl; + } + } + + for (boost::tie(ei, edge_end) = edges(g); ei != edge_end; ++ei) { + Vertex u = g.local_to_global(source(*ei,g)), + v = g.local_to_global(target(*ei, g)); + int pos = get(get(edge_index, g.root()), g.local_to_global(*ei)); + if ( edge_marker[pos] ) { + edge_marker[pos] = false; + out << escape_dot_string(get(vertex_id, u)) << " " << Traits::delimiter() + << " " << escape_dot_string(get(vertex_id, v)); +#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 + typedef typename property_map::const_type + EdgeAttributeMap; + attributes_writer eawriter(get(edge_attribute, g)); + eawriter(out, *ei); +#else + make_edge_attributes_writer(g)(out, *ei); //print edge properties +#endif + out << ";" << std::endl; + } + } + out << "}" << std::endl; + } + } // namespace detail + + // requires graph_name graph property + template + void write_graphviz(std::ostream& out, const subgraph& g) { + std::vector edge_marker(num_edges(g), true); + std::vector vertex_marker(num_vertices(g), true); + + detail::write_graphviz_subgraph(out, g, + vertex_marker.begin(), + edge_marker.begin(), + get(vertex_index, g)); + } + + template + void write_graphviz(const std::string& filename, const subgraph& g) { + std::ofstream out(filename.c_str()); + std::vector edge_marker(num_edges(g), true); + std::vector vertex_marker(num_vertices(g), true); + + detail::write_graphviz_subgraph(out, g, + vertex_marker.begin(), + edge_marker.begin(), + get(vertex_index, g)); + } + + template + void write_graphviz(std::ostream& out, const subgraph& g, + VertexID vertex_id) + { + std::vector edge_marker(num_edges(g), true); + std::vector vertex_marker(num_vertices(g), true); + + detail::write_graphviz_subgraph(out, g, + vertex_marker.begin(), + edge_marker.begin(), + vertex_id); + } + + template + void write_graphviz(const std::string& filename, const subgraph& g, + VertexID vertex_id) + { + std::ofstream out(filename.c_str()); + std::vector edge_marker(num_edges(g), true); + std::vector vertex_marker(num_vertices(g), true); + + detail::write_graphviz_subgraph(out, g, + vertex_marker.begin(), + edge_marker.begin(), + vertex_id); + } + +#if 0 + // This interface has not worked for a long time + typedef std::map GraphvizAttrList; + + typedef property + GraphvizVertexProperty; + + typedef property > + GraphvizEdgeProperty; + + typedef property > > > + GraphvizGraphProperty; + + typedef subgraph > + GraphvizDigraph; + + typedef subgraph > + GraphvizGraph; + + // These four require linking the BGL-Graphviz library: libbgl-viz.a + // from the /src directory. + // Library has not existed for a while + extern void read_graphviz(const std::string& file, GraphvizDigraph& g); + extern void read_graphviz(FILE* file, GraphvizDigraph& g); + + extern void read_graphviz(const std::string& file, GraphvizGraph& g); + extern void read_graphviz(FILE* file, GraphvizGraph& g); +#endif + + class dynamic_properties_writer + { + public: + dynamic_properties_writer(const dynamic_properties& dp) : dp(&dp) { } + + template + void operator()(std::ostream& out, Descriptor key) const + { + bool first = true; + for (dynamic_properties::const_iterator i = dp->begin(); + i != dp->end(); ++i) { + if (typeid(key) == i->second->key()) { + if (first) out << " ["; + else out << ", "; + first = false; + + out << i->first << "=" << escape_dot_string(i->second->get_string(key)); + } + } + + if (!first) out << "]"; + } + + private: + const dynamic_properties* dp; + }; + + class dynamic_vertex_properties_writer + { + public: + dynamic_vertex_properties_writer(const dynamic_properties& dp, + const std::string& node_id) + : dp(&dp), node_id(&node_id) { } + + template + void operator()(std::ostream& out, Descriptor key) const + { + bool first = true; + for (dynamic_properties::const_iterator i = dp->begin(); + i != dp->end(); ++i) { + if (typeid(key) == i->second->key() + && i->first != *node_id) { + if (first) out << " ["; + else out << ", "; + first = false; + + out << i->first << "=" << escape_dot_string(i->second->get_string(key)); + } + } + + if (!first) out << "]"; + } + + private: + const dynamic_properties* dp; + const std::string* node_id; + }; + + namespace graph { namespace detail { + + template + struct node_id_property_map + { + typedef std::string value_type; + typedef value_type reference; + typedef Vertex key_type; + typedef readable_property_map_tag category; + + node_id_property_map() {} + + node_id_property_map(const dynamic_properties& dp, + const std::string& node_id) + : dp(&dp), node_id(&node_id) { } + + const dynamic_properties* dp; + const std::string* node_id; + }; + + template + inline std::string + get(node_id_property_map pm, + typename node_id_property_map::key_type v) + { return get(*pm.node_id, *pm.dp, v); } + + } } // end namespace graph::detail + + template + inline void + write_graphviz_dp(std::ostream& out, const Graph& g, + const dynamic_properties& dp, + const std::string& node_id = "node_id" + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) + { + typedef typename graph_traits::vertex_descriptor Vertex; + write_graphviz_dp(out, g, dp, node_id, + graph::detail::node_id_property_map(dp, node_id)); + } + + template + void + write_graphviz_dp(std::ostream& out, const Graph& g, + const dynamic_properties& dp, const std::string& node_id, + VertexID id + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)) + { + write_graphviz + (out, g, + /*vertex_writer=*/dynamic_vertex_properties_writer(dp, node_id), + /*edge_writer=*/dynamic_properties_writer(dp), + /*graph_writer=*/default_writer(), + id); + } + +///////////////////////////////////////////////////////////////////////////// +// Graph reader exceptions +///////////////////////////////////////////////////////////////////////////// +struct graph_exception : public std::exception { + virtual ~graph_exception() throw() {} + virtual const char* what() const throw() = 0; +}; + +struct bad_parallel_edge : public graph_exception { + std::string from; + std::string to; + mutable std::string statement; + bad_parallel_edge(const std::string& i, const std::string& j) : + from(i), to(j) {} + + virtual ~bad_parallel_edge() throw() {} + const char* what() const throw() { + if(statement.empty()) + statement = + std::string("Failed to add parallel edge: (") + + from + "," + to + ")\n"; + + return statement.c_str(); + } +}; + +struct directed_graph_error : public graph_exception { + virtual ~directed_graph_error() throw() {} + virtual const char* what() const throw() { + return + "read_graphviz: " + "Tried to read a directed graph into an undirected graph."; + } +}; + +struct undirected_graph_error : public graph_exception { + virtual ~undirected_graph_error() throw() {} + virtual const char* what() const throw() { + return + "read_graphviz: " + "Tried to read an undirected graph into a directed graph."; + } +}; + +struct bad_graphviz_syntax: public graph_exception { + std::string errmsg; + bad_graphviz_syntax(const std::string& errmsg) + : errmsg(errmsg) {} + const char* what() const throw () {return errmsg.c_str();} + ~bad_graphviz_syntax() throw () {}; +}; + +namespace detail { namespace graph { + +typedef std::string id_t; +typedef id_t node_t; + +// edges are not uniquely determined by adjacent nodes +class edge_t { + int idx_; + explicit edge_t(int i) : idx_(i) {} +public: + static edge_t new_edge() { + static int idx = 0; + return edge_t(idx++); + }; + + bool operator==(const edge_t& rhs) const { + return idx_ == rhs.idx_; + } + bool operator<(const edge_t& rhs) const { + return idx_ < rhs.idx_; + } +}; + +class mutate_graph +{ + public: + virtual ~mutate_graph() {} + virtual bool is_directed() const = 0; + virtual void do_add_vertex(const node_t& node) = 0; + + virtual void + do_add_edge(const edge_t& edge, const node_t& source, const node_t& target) + = 0; + + virtual void + set_node_property(const id_t& key, const node_t& node, const id_t& value) = 0; + + virtual void + set_edge_property(const id_t& key, const edge_t& edge, const id_t& value) = 0; + + virtual void // RG: need new second parameter to support BGL subgraphs + set_graph_property(const id_t& key, const id_t& value) = 0; +}; + +template +class mutate_graph_impl : public mutate_graph +{ + typedef typename graph_traits::vertex_descriptor bgl_vertex_t; + typedef typename graph_traits::edge_descriptor bgl_edge_t; + + public: + mutate_graph_impl(MutableGraph& graph, dynamic_properties& dp, + std::string node_id_prop) + : graph_(graph), dp_(dp), node_id_prop_(node_id_prop) { } + + ~mutate_graph_impl() {} + + bool is_directed() const + { + return + boost::is_convertible< + typename boost::graph_traits::directed_category, + boost::directed_tag>::value; + } + + virtual void do_add_vertex(const node_t& node) + { + // Add the node to the graph. + bgl_vertex_t v = add_vertex(graph_); + + // Set up a mapping from name to BGL vertex. + bgl_nodes.insert(std::make_pair(node, v)); + + // node_id_prop_ allows the caller to see the real id names for nodes. + put(node_id_prop_, dp_, v, node); + } + + void + do_add_edge(const edge_t& edge, const node_t& source, const node_t& target) + { + std::pair result = + add_edge(bgl_nodes[source], bgl_nodes[target], graph_); + + if(!result.second) { + // In the case of no parallel edges allowed + boost::throw_exception(bad_parallel_edge(source, target)); + } else { + bgl_edges.insert(std::make_pair(edge, result.first)); + } + } + + void + set_node_property(const id_t& key, const node_t& node, const id_t& value) + { + put(key, dp_, bgl_nodes[node], value); + } + + void + set_edge_property(const id_t& key, const edge_t& edge, const id_t& value) + { + put(key, dp_, bgl_edges[edge], value); + } + + void + set_graph_property(const id_t& key, const id_t& value) + { + /* RG: pointer to graph prevents copying */ + put(key, dp_, &graph_, value); + } + + + protected: + MutableGraph& graph_; + dynamic_properties& dp_; + std::string node_id_prop_; + std::map bgl_nodes; + std::map bgl_edges; +}; + +} } } // end namespace boost::detail::graph + +#ifdef BOOST_GRAPH_USE_SPIRIT_PARSER +# ifndef BOOST_GRAPH_READ_GRAPHVIZ_ITERATORS +# define BOOST_GRAPH_READ_GRAPHVIZ_ITERATORS +# endif +# include +#else // New default parser +# include +#endif // BOOST_GRAPH_USE_SPIRIT_PARSER + +namespace boost { + +// Parse the passed string as a GraphViz dot file. +template +bool read_graphviz(const std::string& data, + MutableGraph& graph, + dynamic_properties& dp, + std::string const& node_id = "node_id") { +#ifdef BOOST_GRAPH_USE_SPIRIT_PARSER + return read_graphviz_spirit(data.begin(), data.end(), graph, dp, node_id); +#else // Non-Spirit parser + return read_graphviz_new(data,graph,dp,node_id); +#endif +} + +// Parse the passed iterator range as a GraphViz dot file. +template +bool read_graphviz(InputIterator user_first, + InputIterator user_last, + MutableGraph& graph, + dynamic_properties& dp, + std::string const& node_id = "node_id") { +#ifdef BOOST_GRAPH_USE_SPIRIT_PARSER + typedef InputIterator is_t; + typedef boost::spirit::classic::multi_pass iterator_t; + + iterator_t first(boost::spirit::classic::make_multi_pass(user_first)); + iterator_t last(boost::spirit::classic::make_multi_pass(user_last)); + + return read_graphviz_spirit(first, last, graph, dp, node_id); +#else // Non-Spirit parser + return read_graphviz_new(std::string(user_first, user_last), graph, dp, node_id); +#endif +} + +// Parse the passed stream as a GraphViz dot file. +template +bool read_graphviz(std::istream& in, MutableGraph& graph, + dynamic_properties& dp, + std::string const& node_id = "node_id") +{ + typedef std::istream_iterator is_t; + in >> std::noskipws; + return read_graphviz(is_t(in), is_t(), graph, dp, node_id); +} + +} // namespace boost + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif + +#endif // BOOST_GRAPHVIZ_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/grid_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/grid_graph.hpp new file mode 100644 index 0000000000..9eff52591c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/grid_graph.hpp @@ -0,0 +1,999 @@ +//======================================================================= +// Copyright 2009 Trustees of Indiana University. +// Authors: Michael Hansen, Andrew Lumsdaine +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_GRID_GRAPH_HPP +#define BOOST_GRAPH_GRID_GRAPH_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_GRID_GRAPH_TEMPLATE_PARAMS \ + std::size_t DimensionsT, typename VertexIndexT, \ + typename EdgeIndexT + +#define BOOST_GRID_GRAPH_TYPE \ + grid_graph + +#define BOOST_GRID_GRAPH_TYPE_MEM typename BOOST_GRID_GRAPH_TYPE:: + +#define BOOST_GRID_GRAPH_TYPE_TD(mem) \ + typedef typename BOOST_GRID_GRAPH_TYPE::mem mem + +#define BOOST_GRID_GRAPH_TRAITS_T \ + typename graph_traits + +namespace boost { + + // Class prototype for grid_graph + template + class grid_graph; + + //=================== + // Index Property Map + //=================== + + template + struct grid_graph_index_map { + public: + typedef Index value_type; + typedef Index reference_type; + typedef reference_type reference; + typedef Descriptor key_type; + typedef readable_property_map_tag category; + + grid_graph_index_map() { } + + grid_graph_index_map(const Graph& graph) : + m_graph(make_shared(graph)) { } + + value_type operator[](key_type key) const { + return (m_graph->index_of(key)); + } + + protected: + shared_ptr m_graph; + }; + + template + struct property_map { + typedef grid_graph_index_map type; + typedef type const_type; + }; + + template + struct property_map { + typedef grid_graph_index_map type; + typedef type const_type; + }; + + //================= + // Function Objects + //================= + + namespace detail { + + // vertex_at + template + struct grid_graph_vertex_at { + + typedef typename graph_traits::vertex_descriptor result_type; + + grid_graph_vertex_at() : m_graph(0) {} + + grid_graph_vertex_at(const Graph* graph) : + m_graph(graph) { } + + result_type + operator() + (typename graph_traits::vertices_size_type vertex_index) const { + return (vertex(vertex_index, *m_graph)); + } + + private: + const Graph* m_graph; + }; + + // out_edge_at + template + struct grid_graph_out_edge_at { + + private: + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + public: + typedef typename graph_traits::edge_descriptor result_type; + + grid_graph_out_edge_at() : m_vertex(), m_graph(0) {} + + grid_graph_out_edge_at(vertex_descriptor source_vertex, + const Graph* graph) : + m_vertex(source_vertex), + m_graph(graph) { } + + result_type + operator() + (typename graph_traits::degree_size_type out_edge_index) const { + return (out_edge_at(m_vertex, out_edge_index, *m_graph)); + } + + private: + vertex_descriptor m_vertex; + const Graph* m_graph; + }; + + // in_edge_at + template + struct grid_graph_in_edge_at { + + private: + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + + public: + typedef typename graph_traits::edge_descriptor result_type; + + grid_graph_in_edge_at() : m_vertex(), m_graph(0) {} + + grid_graph_in_edge_at(vertex_descriptor target_vertex, + const Graph* graph) : + m_vertex(target_vertex), + m_graph(graph) { } + + result_type + operator() + (typename graph_traits::degree_size_type in_edge_index) const { + return (in_edge_at(m_vertex, in_edge_index, *m_graph)); + } + + private: + vertex_descriptor m_vertex; + const Graph* m_graph; + }; + + // edge_at + template + struct grid_graph_edge_at { + + typedef typename graph_traits::edge_descriptor result_type; + + grid_graph_edge_at() : m_graph(0) {} + + grid_graph_edge_at(const Graph* graph) : + m_graph(graph) { } + + result_type + operator() + (typename graph_traits::edges_size_type edge_index) const { + return (edge_at(edge_index, *m_graph)); + } + + private: + const Graph* m_graph; + }; + + // adjacent_vertex_at + template + struct grid_graph_adjacent_vertex_at { + + public: + typedef typename graph_traits::vertex_descriptor result_type; + + grid_graph_adjacent_vertex_at(result_type source_vertex, + const Graph* graph) : + m_vertex(source_vertex), + m_graph(graph) { } + + result_type + operator() + (typename graph_traits::degree_size_type adjacent_index) const { + return (target(out_edge_at(m_vertex, adjacent_index, *m_graph), *m_graph)); + } + + private: + result_type m_vertex; + const Graph* m_graph; + }; + + } // namespace detail + + //=========== + // Grid Graph + //=========== + + template + class grid_graph { + + private: + typedef boost::array WrapDimensionArray; + grid_graph() { }; + + public: + + typedef grid_graph type; + + // sizes + typedef VertexIndex vertices_size_type; + typedef EdgeIndex edges_size_type; + typedef EdgeIndex degree_size_type; + + // descriptors + typedef boost::array vertex_descriptor; + typedef std::pair edge_descriptor; + + // vertex_iterator + typedef counting_iterator vertex_index_iterator; + typedef detail::grid_graph_vertex_at vertex_function; + typedef transform_iterator vertex_iterator; + + // edge_iterator + typedef counting_iterator edge_index_iterator; + typedef detail::grid_graph_edge_at edge_function; + typedef transform_iterator edge_iterator; + + // out_edge_iterator + typedef counting_iterator degree_iterator; + typedef detail::grid_graph_out_edge_at out_edge_function; + typedef transform_iterator out_edge_iterator; + + // in_edge_iterator + typedef detail::grid_graph_in_edge_at in_edge_function; + typedef transform_iterator in_edge_iterator; + + // adjacency_iterator + typedef detail::grid_graph_adjacent_vertex_at adjacent_vertex_function; + typedef transform_iterator adjacency_iterator; + + // categories + typedef undirected_tag directed_category; + typedef disallow_parallel_edge_tag edge_parallel_category; + struct traversal_category : virtual public incidence_graph_tag, + virtual public adjacency_graph_tag, + virtual public vertex_list_graph_tag, + virtual public edge_list_graph_tag, + virtual public bidirectional_graph_tag, + virtual public adjacency_matrix_tag { }; + + static inline vertex_descriptor null_vertex() + { + vertex_descriptor maxed_out_vertex; + std::fill(maxed_out_vertex.begin(), maxed_out_vertex.end(), + (std::numeric_limits::max)()); + + return (maxed_out_vertex); + } + + // Constructor that defaults to no wrapping for all dimensions. + grid_graph(vertex_descriptor dimension_lengths) : + m_dimension_lengths(dimension_lengths) { + + std::fill(m_wrap_dimension.begin(), + m_wrap_dimension.end(), false); + + precalculate(); + } + + // Constructor that allows for wrapping to be specified for all + // dimensions at once. + grid_graph(vertex_descriptor dimension_lengths, + bool wrap_all_dimensions) : + m_dimension_lengths(dimension_lengths) { + + std::fill(m_wrap_dimension.begin(), + m_wrap_dimension.end(), + wrap_all_dimensions); + + precalculate(); + } + + // Constructor that allows for individual dimension wrapping to be + // specified. + grid_graph(vertex_descriptor dimension_lengths, + WrapDimensionArray wrap_dimension) : + m_dimension_lengths(dimension_lengths), + m_wrap_dimension(wrap_dimension) { + + precalculate(); + } + + // Returns the number of dimensions in the graph + inline std::size_t dimensions() const { + return (Dimensions); + } + + // Returns the length of dimension [dimension_index] + inline vertices_size_type length(std::size_t dimension) const { + return (m_dimension_lengths[dimension]); + } + + // Returns a value indicating if dimension [dimension_index] wraps + inline bool wrapped(std::size_t dimension) const { + return (m_wrap_dimension[dimension]); + } + + // Gets the vertex that is [distance] units ahead of [vertex] in + // dimension [dimension_index]. + vertex_descriptor next + (vertex_descriptor vertex, + std::size_t dimension_index, + vertices_size_type distance = 1) const { + + vertices_size_type new_position = + vertex[dimension_index] + distance; + + if (wrapped(dimension_index)) { + new_position %= length(dimension_index); + } + else { + // Stop at the end of this dimension if necessary. + new_position = + (std::min)(new_position, + length(dimension_index) - 1); + } + + vertex[dimension_index] = new_position; + + return (vertex); + } + + // Gets the vertex that is [distance] units behind [vertex] in + // dimension [dimension_index]. + vertex_descriptor previous + (vertex_descriptor vertex, + std::size_t dimension_index, + vertices_size_type distance = 1) const { + + // We're assuming that vertices_size_type is unsigned, so we + // need to be careful about the math. + vertex[dimension_index] = + (distance > vertex[dimension_index]) ? + (wrapped(dimension_index) ? + (length(dimension_index) - (distance % length(dimension_index))) : 0) : + vertex[dimension_index] - distance; + + return (vertex); + } + + protected: + + // Returns the number of vertices in the graph + inline vertices_size_type num_vertices() const { + return (m_num_vertices); + } + + // Returns the number of edges in the graph + inline edges_size_type num_edges() const { + return (m_num_edges); + } + + // Returns the number of edges in dimension [dimension_index] + inline edges_size_type num_edges + (std::size_t dimension_index) const { + return (m_edge_count[dimension_index]); + } + + // Returns the index of [vertex] (See also vertex_at) + vertices_size_type index_of(vertex_descriptor vertex) const { + + vertices_size_type vertex_index = 0; + vertices_size_type index_multiplier = 1; + + for (std::size_t dimension_index = 0; + dimension_index < Dimensions; + ++dimension_index) { + + vertex_index += (vertex[dimension_index] * index_multiplier); + index_multiplier *= length(dimension_index); + } + + return (vertex_index); + } + + // Returns the vertex whose index is [vertex_index] (See also + // index_of(vertex_descriptor)) + vertex_descriptor vertex_at + (vertices_size_type vertex_index) const { + + array vertex; + vertices_size_type index_divider = 1; + + for (std::size_t dimension_index = 0; + dimension_index < Dimensions; + ++dimension_index) { + + vertex[dimension_index] = (vertex_index / index_divider) % + length(dimension_index); + + index_divider *= length(dimension_index); + } + + return (vertex); + } + + // Returns the edge whose index is [edge_index] (See also + // index_of(edge_descriptor)). NOTE: The index mapping is + // dependent upon dimension wrapping. + edge_descriptor edge_at(edges_size_type edge_index) const { + + // Edge indices are sorted into bins by dimension + std::size_t dimension_index = 0; + edges_size_type dimension_edges = num_edges(0); + + while (edge_index >= dimension_edges) { + edge_index -= dimension_edges; + ++dimension_index; + dimension_edges = num_edges(dimension_index); + } + + vertex_descriptor vertex_source, vertex_target; + bool is_forward = ((edge_index / (num_edges(dimension_index) / 2)) == 0); + + if (wrapped(dimension_index)) { + vertex_source = vertex_at(edge_index % num_vertices()); + vertex_target = is_forward ? + next(vertex_source, dimension_index) : + previous(vertex_source, dimension_index); + } + else { + + // Dimensions can wrap arbitrarily, so an index needs to be + // computed in a more complex manner. This is done by + // grouping the edges for each dimension together into "bins" + // and considering [edge_index] as an offset into the bin. + // Each bin consists of two parts: the "forward" looking edges + // and the "backward" looking edges for the dimension. + + edges_size_type vertex_offset = edge_index % num_edges(dimension_index); + + // Consider vertex_offset an index into the graph's vertex + // space but with the dimension [dimension_index] reduced in + // size by one. + vertices_size_type index_divider = 1; + + for (std::size_t dimension_index_iter = 0; + dimension_index_iter < Dimensions; + ++dimension_index_iter) { + + std::size_t dimension_length = (dimension_index_iter == dimension_index) ? + length(dimension_index_iter) - 1 : + length(dimension_index_iter); + + vertex_source[dimension_index_iter] = (vertex_offset / index_divider) % + dimension_length; + + index_divider *= dimension_length; + } + + if (is_forward) { + vertex_target = next(vertex_source, dimension_index); + } + else { + // Shift forward one more unit in the dimension for backward + // edges since the algorithm above will leave us one behind. + vertex_target = vertex_source; + ++vertex_source[dimension_index]; + } + + } // if (wrapped(dimension_index)) + + return (std::make_pair(vertex_source, vertex_target)); + } + + // Returns the index for [edge] (See also edge_at) + edges_size_type index_of(edge_descriptor edge) const { + vertex_descriptor source_vertex = source(edge, *this); + vertex_descriptor target_vertex = target(edge, *this); + + // Determine the dimension where the source and target vertices + // differ (should only be one if this is a valid edge). + std::size_t different_dimension_index = 0; + + while (source_vertex[different_dimension_index] == + target_vertex[different_dimension_index]) { + + ++different_dimension_index; + } + + edges_size_type edge_index = 0; + + // Offset the edge index into the appropriate "bin" (see edge_at + // for a more in-depth description). + for (std::size_t dimension_index = 0; + dimension_index < different_dimension_index; + ++dimension_index) { + + edge_index += num_edges(dimension_index); + } + + // Get the position of both vertices in the differing dimension. + vertices_size_type source_position = source_vertex[different_dimension_index]; + vertices_size_type target_position = target_vertex[different_dimension_index]; + + // Determine if edge is forward or backward + bool is_forward = true; + + if (wrapped(different_dimension_index)) { + + // If the dimension is wrapped, an edge is going backward if + // either A: its target precedes the source in the differing + // dimension and the vertices are adjacent or B: its source + // precedes the target and they're not adjacent. + if (((target_position < source_position) && + ((source_position - target_position) == 1)) || + ((source_position < target_position) && + ((target_position - source_position) > 1))) { + + is_forward = false; + } + } + else if (target_position < source_position) { + is_forward = false; + } + + // "Backward" edges are in the second half of the bin. + if (!is_forward) { + edge_index += (num_edges(different_dimension_index) / 2); + } + + // Finally, apply the vertex offset + if (wrapped(different_dimension_index)) { + edge_index += index_of(source_vertex); + } + else { + vertices_size_type index_multiplier = 1; + + if (!is_forward) { + --source_vertex[different_dimension_index]; + } + + for (std::size_t dimension_index = 0; + dimension_index < Dimensions; + ++dimension_index) { + + edge_index += (source_vertex[dimension_index] * index_multiplier); + index_multiplier *= (dimension_index == different_dimension_index) ? + length(dimension_index) - 1 : + length(dimension_index); + } + } + + return (edge_index); + } + + // Returns the number of out-edges for [vertex] + degree_size_type out_degree(vertex_descriptor vertex) const { + + degree_size_type out_edge_count = 0; + + for (std::size_t dimension_index = 0; + dimension_index < Dimensions; + ++dimension_index) { + + // If the vertex is on the edge of this dimension, then its + // number of out edges is dependent upon whether the dimension + // wraps or not. + if ((vertex[dimension_index] == 0) || + (vertex[dimension_index] == (length(dimension_index) - 1))) { + out_edge_count += (wrapped(dimension_index) ? 2 : 1); + } + else { + // Next and previous edges, regardless or wrapping + out_edge_count += 2; + } + } + + return (out_edge_count); + } + + // Returns an out-edge for [vertex] by index. Indices are in the + // range [0, out_degree(vertex)). + edge_descriptor out_edge_at + (vertex_descriptor vertex, + degree_size_type out_edge_index) const { + + edges_size_type edges_left = out_edge_index + 1; + std::size_t dimension_index = 0; + bool is_forward = false; + + // Walks the out edges of [vertex] and accommodates for dimension + // wrapping. + while (edges_left > 0) { + + if (!wrapped(dimension_index)) { + if (!is_forward && (vertex[dimension_index] == 0)) { + is_forward = true; + continue; + } + else if (is_forward && + (vertex[dimension_index] == (length(dimension_index) - 1))) { + is_forward = false; + ++dimension_index; + continue; + } + } + + --edges_left; + + if (edges_left > 0) { + is_forward = !is_forward; + + if (!is_forward) { + ++dimension_index; + } + } + } + + return (std::make_pair(vertex, is_forward ? + next(vertex, dimension_index) : + previous(vertex, dimension_index))); + } + + // Returns the number of in-edges for [vertex] + inline degree_size_type in_degree(vertex_descriptor vertex) const { + return (out_degree(vertex)); + } + + // Returns an in-edge for [vertex] by index. Indices are in the + // range [0, in_degree(vertex)). + edge_descriptor in_edge_at + (vertex_descriptor vertex, + edges_size_type in_edge_index) const { + + edge_descriptor out_edge = out_edge_at(vertex, in_edge_index); + return (std::make_pair(target(out_edge, *this), source(out_edge, *this))); + + } + + // Pre-computes the number of vertices and edges + void precalculate() { + m_num_vertices = + std::accumulate(m_dimension_lengths.begin(), + m_dimension_lengths.end(), 1, + std::multiplies()); + + // Calculate number of edges in each dimension + m_num_edges = 0; + + for (std::size_t dimension_index = 0; + dimension_index < Dimensions; + ++dimension_index) { + + if (wrapped(dimension_index)) { + m_edge_count[dimension_index] = num_vertices() * 2; + } + else { + m_edge_count[dimension_index] = + (num_vertices() - (num_vertices() / length(dimension_index))) * 2; + } + + m_num_edges += num_edges(dimension_index); + } + } + + const vertex_descriptor m_dimension_lengths; + WrapDimensionArray m_wrap_dimension; + vertices_size_type m_num_vertices; + + boost::array m_edge_count; + edges_size_type m_num_edges; + + public: + + //================ + // VertexListGraph + //================ + + template + friend inline std::pair + vertices(const BOOST_GRID_GRAPH_TYPE& graph) { + BOOST_GRID_GRAPH_TYPE_TD(vertex_iterator); + BOOST_GRID_GRAPH_TYPE_TD(vertex_function); + BOOST_GRID_GRAPH_TYPE_TD(vertex_index_iterator); + + return (std::make_pair + (vertex_iterator(vertex_index_iterator(0), + vertex_function(&graph)), + vertex_iterator(vertex_index_iterator(graph.num_vertices()), + vertex_function(&graph)))); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM vertices_size_type + num_vertices(const BOOST_GRID_GRAPH_TYPE& graph) { + return (graph.num_vertices()); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor + vertex(BOOST_GRID_GRAPH_TYPE_MEM vertices_size_type vertex_index, + const BOOST_GRID_GRAPH_TYPE& graph) { + + return (graph.vertex_at(vertex_index)); + } + + //=============== + // IncidenceGraph + //=============== + + template + friend inline std::pair + out_edges(BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex, + const BOOST_GRID_GRAPH_TYPE& graph) { + BOOST_GRID_GRAPH_TYPE_TD(degree_iterator); + BOOST_GRID_GRAPH_TYPE_TD(out_edge_function); + BOOST_GRID_GRAPH_TYPE_TD(out_edge_iterator); + + return (std::make_pair + (out_edge_iterator(degree_iterator(0), + out_edge_function(vertex, &graph)), + out_edge_iterator(degree_iterator(graph.out_degree(vertex)), + out_edge_function(vertex, &graph)))); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM degree_size_type + out_degree + (BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex, + const BOOST_GRID_GRAPH_TYPE& graph) { + return (graph.out_degree(vertex)); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM edge_descriptor + out_edge_at(BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex, + BOOST_GRID_GRAPH_TYPE_MEM degree_size_type out_edge_index, + const BOOST_GRID_GRAPH_TYPE& graph) { + return (graph.out_edge_at(vertex, out_edge_index)); + } + + //=============== + // AdjacencyGraph + //=============== + + template + friend typename std::pair + adjacent_vertices (BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex, + const BOOST_GRID_GRAPH_TYPE& graph) { + BOOST_GRID_GRAPH_TYPE_TD(degree_iterator); + BOOST_GRID_GRAPH_TYPE_TD(adjacent_vertex_function); + BOOST_GRID_GRAPH_TYPE_TD(adjacency_iterator); + + return (std::make_pair + (adjacency_iterator(degree_iterator(0), + adjacent_vertex_function(vertex, &graph)), + adjacency_iterator(degree_iterator(graph.out_degree(vertex)), + adjacent_vertex_function(vertex, &graph)))); + } + + //============== + // EdgeListGraph + //============== + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM edges_size_type + num_edges(const BOOST_GRID_GRAPH_TYPE& graph) { + return (graph.num_edges()); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM edge_descriptor + edge_at(BOOST_GRID_GRAPH_TYPE_MEM edges_size_type edge_index, + const BOOST_GRID_GRAPH_TYPE& graph) { + return (graph.edge_at(edge_index)); + } + + template + friend inline std::pair + edges(const BOOST_GRID_GRAPH_TYPE& graph) { + BOOST_GRID_GRAPH_TYPE_TD(edge_index_iterator); + BOOST_GRID_GRAPH_TYPE_TD(edge_function); + BOOST_GRID_GRAPH_TYPE_TD(edge_iterator); + + return (std::make_pair + (edge_iterator(edge_index_iterator(0), + edge_function(&graph)), + edge_iterator(edge_index_iterator(graph.num_edges()), + edge_function(&graph)))); + } + + //=================== + // BiDirectionalGraph + //=================== + + template + friend inline std::pair + in_edges(BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex, + const BOOST_GRID_GRAPH_TYPE& graph) { + BOOST_GRID_GRAPH_TYPE_TD(in_edge_function); + BOOST_GRID_GRAPH_TYPE_TD(degree_iterator); + BOOST_GRID_GRAPH_TYPE_TD(in_edge_iterator); + + return (std::make_pair + (in_edge_iterator(degree_iterator(0), + in_edge_function(vertex, &graph)), + in_edge_iterator(degree_iterator(graph.in_degree(vertex)), + in_edge_function(vertex, &graph)))); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM degree_size_type + in_degree (BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex, + const BOOST_GRID_GRAPH_TYPE& graph) { + return (graph.in_degree(vertex)); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM degree_size_type + degree (BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex, + const BOOST_GRID_GRAPH_TYPE& graph) { + return (graph.out_degree(vertex) * 2); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM edge_descriptor + in_edge_at(BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex, + BOOST_GRID_GRAPH_TYPE_MEM degree_size_type in_edge_index, + const BOOST_GRID_GRAPH_TYPE& graph) { + return (graph.in_edge_at(vertex, in_edge_index)); + } + + + //================== + // Adjacency Matrix + //================== + + template + friend std::pair + edge (BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor source_vertex, + BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor destination_vertex, + const BOOST_GRID_GRAPH_TYPE& graph) { + + std::pair edge_exists = + std::make_pair(std::make_pair(source_vertex, destination_vertex), false); + + for (std::size_t dimension_index = 0; + dimension_index < Dimensions; + ++dimension_index) { + + BOOST_GRID_GRAPH_TYPE_MEM vertices_size_type dim_difference = 0; + BOOST_GRID_GRAPH_TYPE_MEM vertices_size_type + source_dim = source_vertex[dimension_index], + dest_dim = destination_vertex[dimension_index]; + + dim_difference = (source_dim > dest_dim) ? + (source_dim - dest_dim) : (dest_dim - source_dim); + + if (dim_difference > 0) { + + // If we've already found a valid edge, this would mean that + // the vertices are really diagonal across dimensions and + // therefore not connected. + if (edge_exists.second) { + edge_exists.second = false; + break; + } + + // If the difference is one, the vertices are right next to + // each other and the edge is valid. The edge is still + // valid, though, if the dimension wraps and the vertices + // are on opposite ends. + if ((dim_difference == 1) || + (graph.wrapped(dimension_index) && + (((source_dim == 0) && (dest_dim == (graph.length(dimension_index) - 1))) || + ((dest_dim == 0) && (source_dim == (graph.length(dimension_index) - 1)))))) { + + edge_exists.second = true; + // Stay in the loop to check for diagonal vertices. + } + else { + + // Stop checking - the vertices are too far apart. + edge_exists.second = false; + break; + } + } + + } // for dimension_index + + return (edge_exists); + } + + + //============================= + // Index Property Map Functions + //============================= + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM vertices_size_type + get(vertex_index_t, + const BOOST_GRID_GRAPH_TYPE& graph, + BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor vertex) { + return (graph.index_of(vertex)); + } + + template + friend inline BOOST_GRID_GRAPH_TYPE_MEM edges_size_type + get(edge_index_t, + const BOOST_GRID_GRAPH_TYPE& graph, + BOOST_GRID_GRAPH_TYPE_MEM edge_descriptor edge) { + return (graph.index_of(edge)); + } + + template + friend inline grid_graph_index_map< + BOOST_GRID_GRAPH_TYPE, + BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor, + BOOST_GRID_GRAPH_TYPE_MEM vertices_size_type> + get(vertex_index_t, const BOOST_GRID_GRAPH_TYPE& graph) { + return (grid_graph_index_map< + BOOST_GRID_GRAPH_TYPE, + BOOST_GRID_GRAPH_TYPE_MEM vertex_descriptor, + BOOST_GRID_GRAPH_TYPE_MEM vertices_size_type>(graph)); + } + + template + friend inline grid_graph_index_map< + BOOST_GRID_GRAPH_TYPE, + BOOST_GRID_GRAPH_TYPE_MEM edge_descriptor, + BOOST_GRID_GRAPH_TYPE_MEM edges_size_type> + get(edge_index_t, const BOOST_GRID_GRAPH_TYPE& graph) { + return (grid_graph_index_map< + BOOST_GRID_GRAPH_TYPE, + BOOST_GRID_GRAPH_TYPE_MEM edge_descriptor, + BOOST_GRID_GRAPH_TYPE_MEM edges_size_type>(graph)); + } + + template + friend inline Index + get(const grid_graph_index_map& index_map, + const typename grid_graph_index_map::key_type& key) + { + return (index_map[key]); + } + + template + friend struct grid_graph_index_map; + + }; // grid_graph + +} // namespace boost + +#undef BOOST_GRID_GRAPH_TYPE +#undef BOOST_GRID_GRAPH_TYPE_TD +#undef BOOST_GRID_GRAPH_TYPE_MEM +#undef BOOST_GRID_GRAPH_TEMPLATE_PARAMS +#undef BOOST_GRID_GRAPH_TRAITS_T + +#endif // BOOST_GRAPH_GRID_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/gursoy_atun_layout.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/gursoy_atun_layout.hpp new file mode 100644 index 0000000000..b16a01f68f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/gursoy_atun_layout.hpp @@ -0,0 +1,358 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_GURSOY_ATUN_LAYOUT_HPP +#define BOOST_GRAPH_GURSOY_ATUN_LAYOUT_HPP + +// Gursoy-Atun graph layout, based on: +// "Neighbourhood Preserving Load Balancing: A Self-Organizing Approach" +// in EuroPar 2000, p. 234 of LNCS 1900 +// http://springerlink.metapress.com/link.asp?id=pcu07ew5rhexp9yt + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace detail { + +struct over_distance_limit : public std::exception {}; + +template +struct update_position_visitor { + typedef typename Topology::point_type Point; + PositionMap position_map; + NodeDistanceMap node_distance; + const Topology& space; + Point input_vector; + double distance_limit; + double learning_constant; + double falloff_ratio; + + typedef boost::on_examine_vertex event_filter; + + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + + update_position_visitor(PositionMap position_map, + NodeDistanceMap node_distance, + const Topology& space, + const Point& input_vector, + double distance_limit, + double learning_constant, + double falloff_ratio): + position_map(position_map), node_distance(node_distance), + space(space), + input_vector(input_vector), distance_limit(distance_limit), + learning_constant(learning_constant), falloff_ratio(falloff_ratio) {} + + void operator()(vertex_descriptor v, const Graph&) const + { +#ifndef BOOST_NO_STDC_NAMESPACE + using std::pow; +#endif + + if (get(node_distance, v) > distance_limit) + BOOST_THROW_EXCEPTION(over_distance_limit()); + Point old_position = get(position_map, v); + double distance = get(node_distance, v); + double fraction = + learning_constant * pow(falloff_ratio, distance * distance); + put(position_map, v, + space.move_position_toward(old_position, fraction, input_vector)); + } +}; + +template +struct gursoy_shortest +{ + template + static inline void + run(const Graph& g, typename graph_traits::vertex_descriptor s, + NodeDistanceMap node_distance, UpdatePosition& update_position, + EdgeWeightMap weight) + { + boost::dijkstra_shortest_paths(g, s, weight_map(weight). + visitor(boost::make_dijkstra_visitor(std::make_pair( + boost::record_distances(node_distance, boost::on_edge_relaxed()), + update_position)))); + } +}; + +template<> +struct gursoy_shortest +{ + template + static inline void + run(const Graph& g, typename graph_traits::vertex_descriptor s, + NodeDistanceMap node_distance, UpdatePosition& update_position, + dummy_property_map) + { + boost::breadth_first_search(g, s, + visitor(boost::make_bfs_visitor(std::make_pair( + boost::record_distances(node_distance, boost::on_tree_edge()), + update_position)))); + } +}; + +} // namespace detail + +template +void +gursoy_atun_step + (const VertexListAndIncidenceGraph& graph, + const Topology& space, + PositionMap position, + Diameter diameter, + double learning_constant, + VertexIndexMap vertex_index_map, + EdgeWeightMap weight) +{ +#ifndef BOOST_NO_STDC_NAMESPACE + using std::pow; + using std::exp; +#endif + + typedef typename graph_traits::vertex_iterator + vertex_iterator; + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef typename Topology::point_type point_type; + vertex_iterator i, iend; + std::vector distance_from_input_vector(num_vertices(graph)); + typedef boost::iterator_property_map::iterator, + VertexIndexMap, + double, double&> + DistanceFromInputMap; + DistanceFromInputMap distance_from_input(distance_from_input_vector.begin(), + vertex_index_map); + std::vector node_distance_map_vector(num_vertices(graph)); + typedef boost::iterator_property_map::iterator, + VertexIndexMap, + double, double&> + NodeDistanceMap; + NodeDistanceMap node_distance(node_distance_map_vector.begin(), + vertex_index_map); + point_type input_vector = space.random_point(); + vertex_descriptor min_distance_loc + = graph_traits::null_vertex(); + double min_distance = 0.0; + bool min_distance_unset = true; + for (boost::tie(i, iend) = vertices(graph); i != iend; ++i) { + double this_distance = space.distance(get(position, *i), input_vector); + put(distance_from_input, *i, this_distance); + if (min_distance_unset || this_distance < min_distance) { + min_distance = this_distance; + min_distance_loc = *i; + } + min_distance_unset = false; + } + assert (!min_distance_unset); // Graph must have at least one vertex + boost::detail::update_position_visitor< + PositionMap, NodeDistanceMap, Topology, + VertexListAndIncidenceGraph> + update_position(position, node_distance, space, + input_vector, diameter, learning_constant, + exp(-1. / (2 * diameter * diameter))); + std::fill(node_distance_map_vector.begin(), node_distance_map_vector.end(), 0); + try { + typedef detail::gursoy_shortest shortest; + shortest::run(graph, min_distance_loc, node_distance, update_position, + weight); + } catch (detail::over_distance_limit) { + /* Thrown to break out of BFS or Dijkstra early */ + } +} + +template +void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, + const Topology& space, + PositionMap position, + int nsteps, + double diameter_initial, + double diameter_final, + double learning_constant_initial, + double learning_constant_final, + VertexIndexMap vertex_index_map, + EdgeWeightMap weight) +{ +#ifndef BOOST_NO_STDC_NAMESPACE + using std::pow; + using std::exp; +#endif + + typedef typename graph_traits::vertex_iterator + vertex_iterator; + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef typename Topology::point_type point_type; + vertex_iterator i, iend; + double diameter_ratio = (double)diameter_final / diameter_initial; + double learning_constant_ratio = + learning_constant_final / learning_constant_initial; + std::vector distance_from_input_vector(num_vertices(graph)); + typedef boost::iterator_property_map::iterator, + VertexIndexMap, + double, double&> + DistanceFromInputMap; + DistanceFromInputMap distance_from_input(distance_from_input_vector.begin(), + vertex_index_map); + std::vector node_distance_map_vector(num_vertices(graph)); + typedef boost::iterator_property_map::iterator, + VertexIndexMap, double, double&> + NodeDistanceMap; + NodeDistanceMap node_distance(node_distance_map_vector.begin(), + vertex_index_map); + for (int round = 0; round < nsteps; ++round) { + double part_done = (double)round / (nsteps - 1); + int diameter = (int)(diameter_initial * pow(diameter_ratio, part_done)); + double learning_constant = + learning_constant_initial * pow(learning_constant_ratio, part_done); + gursoy_atun_step(graph, space, position, diameter, learning_constant, + vertex_index_map, weight); + } +} + +template +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, + const Topology& space, + PositionMap position, + int nsteps, + double diameter_initial, + double diameter_final, + double learning_constant_initial, + double learning_constant_final, + VertexIndexMap vertex_index_map, + EdgeWeightMap weight) +{ + typedef typename graph_traits::vertex_iterator + vertex_iterator; + vertex_iterator i, iend; + for (boost::tie(i, iend) = vertices(graph); i != iend; ++i) { + put(position, *i, space.random_point()); + } + gursoy_atun_refine(graph, space, + position, nsteps, + diameter_initial, diameter_final, + learning_constant_initial, learning_constant_final, + vertex_index_map, weight); +} + +template +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, + const Topology& space, + PositionMap position, + int nsteps, + double diameter_initial, + double diameter_final, + double learning_constant_initial, + double learning_constant_final, + VertexIndexMap vertex_index_map) +{ + gursoy_atun_layout(graph, space, position, nsteps, + diameter_initial, diameter_final, + learning_constant_initial, learning_constant_final, + vertex_index_map, dummy_property_map()); +} + +template +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, + const Topology& space, + PositionMap position, + int nsteps, + double diameter_initial, + double diameter_final = 1.0, + double learning_constant_initial = 0.8, + double learning_constant_final = 0.2) +{ + gursoy_atun_layout(graph, space, position, nsteps, diameter_initial, + diameter_final, learning_constant_initial, + learning_constant_final, get(vertex_index, graph)); +} + +template +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, + const Topology& space, + PositionMap position, + int nsteps) +{ +#ifndef BOOST_NO_STDC_NAMESPACE + using std::sqrt; +#endif + + gursoy_atun_layout(graph, space, position, nsteps, + sqrt((double)num_vertices(graph))); +} + +template +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, + const Topology& space, + PositionMap position) +{ + gursoy_atun_layout(graph, space, position, num_vertices(graph)); +} + +template +void +gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, + const Topology& space, + PositionMap position, + const bgl_named_params& params) +{ +#ifndef BOOST_NO_STDC_NAMESPACE + using std::sqrt; +#endif + + std::pair diam(sqrt(double(num_vertices(graph))), 1.0); + std::pair learn(0.8, 0.2); + gursoy_atun_layout(graph, space, position, + choose_param(get_param(params, iterations_t()), + num_vertices(graph)), + choose_param(get_param(params, diameter_range_t()), + diam).first, + choose_param(get_param(params, diameter_range_t()), + diam).second, + choose_param(get_param(params, learning_constant_range_t()), + learn).first, + choose_param(get_param(params, learning_constant_range_t()), + learn).second, + choose_const_pmap(get_param(params, vertex_index), graph, + vertex_index), + choose_param(get_param(params, edge_weight), + dummy_property_map())); +} + +} // namespace boost + +#endif // BOOST_GRAPH_GURSOY_ATUN_LAYOUT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/howard_cycle_ratio.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/howard_cycle_ratio.hpp new file mode 100644 index 0000000000..09c6522b86 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/howard_cycle_ratio.hpp @@ -0,0 +1,634 @@ +// Copyright (C) 2006-2009 Dmitry Bufistov and Andrey Parfenov + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_CYCLE_RATIO_HOWARD_HPP +#define BOOST_GRAPH_CYCLE_RATIO_HOWARD_HPP + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/** @file howard_cycle_ratio.hpp + * @brief The implementation of the maximum/minimum cycle ratio/mean algorithm. + * @author Dmitry Bufistov + * @author Andrey Parfenov + */ + +namespace boost { + + /** + * The mcr_float is like numeric_limits, but only for floating point types + * and only defines infinity() and epsilon(). This class is primarily used + * to encapsulate a less-precise epsilon than natively supported by the + * floating point type. + */ + template struct mcr_float { + typedef Float value_type; + + static Float infinity() + { return std::numeric_limits::infinity(); } + + static Float epsilon() + { return Float(-0.005); } + }; + + namespace detail { + + template struct + min_comparator_props { + typedef std::greater comparator; + static const int multiplier = 1; + }; + + template struct + max_comparator_props { + typedef std::less comparator; + static const int multiplier = -1; + }; + + template + struct float_wrapper { + typedef typename FloatTraits::value_type value_type; + typedef ComparatorProps comparator_props_t; + typedef typename ComparatorProps::comparator comparator; + + static value_type infinity() + { return FloatTraits::infinity() * ComparatorProps::multiplier; } + + static value_type epsilon() + { return FloatTraits::epsilon() * ComparatorProps::multiplier; } + + }; + + /*! @class mcr_howard + * @brief Calculates optimum (maximum/minimum) cycle ratio of a directed graph. + * Uses Howard's iteration policy algorithm.
(It is described in the paper + * "Experimental Analysis of the Fastest Optimum Cycle Ratio and Mean Algorithm" + * by Ali Dasdan). + */ + template + class mcr_howard + { + public: + typedef typename FloatTraits::value_type float_t; + typedef typename FloatTraits::comparator_props_t cmp_props_t; + typedef typename FloatTraits::comparator comparator_t; + typedef enum{ my_white = 0, my_black } my_color_type; + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename graph_traits::vertices_size_type vn_t; + typedef std::vector vp_t; + typedef typename boost::iterator_property_map< + typename vp_t::iterator, VertexIndexMap + > distance_map_t; //V -> float_t + + typedef typename std::vector ve_t; + typedef std::vector vcol_t; + typedef typename ::boost::iterator_property_map< + typename ve_t::iterator, VertexIndexMap + > policy_t; //Vertex -> Edge + typedef typename ::boost::iterator_property_map< + typename vcol_t::iterator, VertexIndexMap + > color_map_t; + + typedef typename std::list pinel_t;// The in_edges list of the policy graph + typedef typename std::vector inedges1_t; + typedef typename ::boost::iterator_property_map< + typename inedges1_t::iterator, VertexIndexMap + > inedges_t; + typedef typename std::vector critical_cycle_t; + + //Bad vertex flag. If true, then the vertex is "bad". + // Vertex is "bad" if its out_degree is equal to zero. + typedef typename boost::iterator_property_map< + std::vector::iterator, VertexIndexMap + > badv_t; + + /*! + * Constructor + * \param g = (V, E) - a directed multigraph. + * \param vim Vertex Index Map. Read property Map: V -> [0, num_vertices(g)). + * \param ewm edge weight map. Read property map: E -> R + * \param ew2m edge weight map. Read property map: E -> R+ + * \param infty A big enough value to guaranty that there exist a cycle with + * better ratio. + * \param cmp The compare operator for float_ts. + */ + mcr_howard(const Graph &g, VertexIndexMap vim, + EdgeWeight1 ewm, EdgeWeight2 ew2m) : + m_g(g), m_vim(vim), m_ew1m(ewm), m_ew2m(ew2m), + m_bound(mcr_bound()), + m_cr(m_bound), + m_V(num_vertices(m_g)), + m_dis(m_V, 0), m_dm(m_dis.begin(), m_vim), + m_policyc(m_V), m_policy(m_policyc.begin(), m_vim), + m_inelc(m_V), m_inel(m_inelc.begin(), m_vim), + m_badvc(m_V, false), m_badv(m_badvc.begin(), m_vim), + m_colcv(m_V), + m_col_bfs(m_V) + { } + + /*! + * \return maximum/minimum_{for all cycles C} + * [sum_{e in C} w1(e)] / [sum_{e in C} w2(e)], + * or FloatTraits::infinity() if graph has no cycles. + */ + float_t ocr_howard() + { + construct_policy_graph(); + int k = 0; + float_t mcr = 0; + do + { + mcr = policy_mcr(); + ++k; + } + while (try_improve_policy(mcr) && k < 100); //To avoid infinite loop + + const float_t eps_ = -0.00000001 * cmp_props_t::multiplier; + if (m_cmp(mcr, m_bound + eps_)) + { + return FloatTraits::infinity(); + } + else + { + return mcr; + } + } + virtual ~mcr_howard() {} + + protected: + virtual void store_critical_edge(edge_t, critical_cycle_t &) {} + virtual void store_critical_cycle(critical_cycle_t &) {} + + private: + /*! + * \return lower/upper bound for the maximal/minimal cycle ratio + */ + float_t mcr_bound() + { + typename graph_traits::vertex_iterator vi, vie; + typename graph_traits::out_edge_iterator oei, oeie; + float_t cz = (std::numeric_limits::max)(); //Closest to zero value + float_t s = 0; + const float_t eps_ = std::numeric_limits::epsilon(); + for (boost::tie(vi, vie) = vertices(m_g); vi != vie; ++vi) + { + for (boost::tie(oei, oeie) = out_edges(*vi, m_g); oei != oeie; ++oei) + { + s += std::abs(m_ew1m[*oei]); + float_t a = std::abs(m_ew2m[*oei]); + if ( a > eps_ && a < cz) + { + cz = a; + } + } + } + return cmp_props_t::multiplier * (s / cz); + } + + + /*! + * Constructs an arbitrary policy graph. + */ + void construct_policy_graph() + { + m_sink = graph_traits().null_vertex(); + typename graph_traits::vertex_iterator vi, vie; + typename graph_traits::out_edge_iterator oei, oeie; + for ( boost::tie(vi, vie) = vertices(m_g); vi != vie; ++vi ) + { + boost::tie(oei, oeie) = out_edges(*vi, m_g); + typename graph_traits::out_edge_iterator mei = + std::max_element(oei, oeie, + boost::bind(m_cmp, + boost::bind(&EdgeWeight1::operator[], m_ew1m, _1), + boost::bind(&EdgeWeight1::operator[], m_ew1m, _2) + ) + ); + if (mei == oeie) + { + if (m_sink == graph_traits().null_vertex()) + { + m_sink = *vi; + } + m_badv[*vi] = true; + m_inel[m_sink].push_back(*vi); + } + else + { + m_inel[target(*mei, m_g)].push_back(*vi); + m_policy[*vi] = *mei; + } + } + } + /*! Sets the distance value for all vertices "v" such that there is + * a path from "v" to "sv". It does "inverse" breadth first visit of the policy + * graph, starting from the vertex "sv". + */ + void mcr_bfv(vertex_t sv, float_t cr, color_map_t c) + { + boost::queue Q; + c[sv] = my_black; + Q.push(sv); + while (!Q.empty()) + { + vertex_t v = Q.top(); Q.pop(); + for (typename pinel_t::const_iterator itr = m_inel[v].begin(); + itr != m_inel[v].end(); ++itr) + //For all in_edges of the policy graph + { + if (*itr != sv) + { + if (m_badv[*itr]) + { + m_dm[*itr] = m_dm[v] + m_bound - cr; + } + else + { + m_dm[*itr] = m_dm[v] + m_ew1m[m_policy[*itr]] - + m_ew2m[m_policy[*itr]] * cr; + } + c[*itr] = my_black; + Q.push(*itr); + } + } + } + } + + /*! + * \param sv an arbitrary (undiscovered) vertex of the policy graph. + * \return a vertex in the policy graph that belongs to a cycle. + * Performs a depth first visit until a cycle edge is found. + */ + vertex_t find_cycle_vertex(vertex_t sv) + { + vertex_t gv = sv; + std::fill(m_colcv.begin(), m_colcv.end(), my_white); + color_map_t cm(m_colcv.begin(), m_vim); + do + { + cm[gv] = my_black; + if (! m_badv[gv]) + { + gv = target(m_policy[gv], m_g); + } + else + { + gv = m_sink; + } + } + while (cm[gv] != my_black); + return gv; + } + + /*! + * \param sv - vertex that belongs to a cycle in the policy graph. + */ + float_t cycle_ratio(vertex_t sv) + { + if (sv == m_sink) return m_bound; + std::pair sums_(float_t(0), float_t(0)); + vertex_t v = sv; + critical_cycle_t cc; + do + { + store_critical_edge(m_policy[v], cc); + sums_.first += m_ew1m[m_policy[v]]; + sums_.second += m_ew2m[m_policy[v]]; + v = target(m_policy[v], m_g); + } + while (v != sv); + float_t cr = sums_.first / sums_.second; + if ( m_cmp(m_cr, cr) ) + { + m_cr = cr; + store_critical_cycle(cc); + } + return cr; + } + + /*! + * Finds the optimal cycle ratio of the policy graph + */ + float_t policy_mcr() + { + std::fill(m_col_bfs.begin(), m_col_bfs.end(), my_white); + color_map_t vcm_ = color_map_t(m_col_bfs.begin(), m_vim); + typename graph_traits::vertex_iterator uv_itr, vie; + boost::tie(uv_itr, vie) = vertices(m_g); + float_t mcr = m_bound; + while ( (uv_itr = std::find_if(uv_itr, vie, + boost::bind(std::equal_to(), + my_white, + boost::bind(&color_map_t::operator[], vcm_, _1) + ) + ) + ) != vie ) + ///While there are undiscovered vertices + { + vertex_t gv = find_cycle_vertex(*uv_itr); + float_t cr = cycle_ratio(gv) ; + mcr_bfv(gv, cr, vcm_); + if ( m_cmp(mcr, cr) ) mcr = cr; + ++uv_itr; + } + return mcr; + } + + /*! + * Changes the edge m_policy[s] to the new_edge. + */ + void improve_policy(vertex_t s, edge_t new_edge) + { + vertex_t t = target(m_policy[s], m_g); + typename property_traits::value_type ti = m_vim[t]; + m_inelc[ti].erase( std::find(m_inelc[ti].begin(), m_inelc[ti].end(), s)); + m_policy[s] = new_edge; + t = target(new_edge, m_g); + m_inel[t].push_back(s); ///Maintain in_edge list + } + + /*! + * A negative cycle detector. + */ + bool try_improve_policy(float_t cr) + { + bool improved = false; + typename graph_traits::vertex_iterator vi, vie; + typename graph_traits::out_edge_iterator oei, oeie; + const float_t eps_ = FloatTraits::epsilon(); + for (boost::tie(vi, vie) = vertices(m_g); vi != vie; ++vi) + { + if (!m_badv[*vi]) + { + for (boost::tie(oei, oeie) = out_edges(*vi, m_g); oei != oeie; ++oei) + { + vertex_t t = target(*oei, m_g); + //Current distance from *vi to some vertex + float_t dis_ = m_ew1m[*oei] - m_ew2m[*oei] * cr + m_dm[t]; + if ( m_cmp(m_dm[*vi] + eps_, dis_) ) + { + improve_policy(*vi, *oei); + m_dm[*vi] = dis_; + improved = true; + } + } + } + else + { + float_t dis_ = m_bound - cr + m_dm[m_sink]; + if ( m_cmp(m_dm[*vi] + eps_, dis_) ) + { + m_dm[*vi] = dis_; + } + } + } + return improved; + } + private: + const Graph &m_g; + VertexIndexMap m_vim; + EdgeWeight1 m_ew1m; + EdgeWeight2 m_ew2m; + comparator_t m_cmp; + float_t m_bound; //> The lower/upper bound to the maximal/minimal cycle ratio + float_t m_cr; //>The best cycle ratio that has been found so far + + vn_t m_V; //>The number of the vertices in the graph + vp_t m_dis; //>Container for the distance map + distance_map_t m_dm; //>Distance map + + ve_t m_policyc; //>Container for the policy graph + policy_t m_policy; //>The interface for the policy graph + + inedges1_t m_inelc; //>Container fot in edges list + inedges_t m_inel; //>Policy graph, input edges list + + std::vector m_badvc; + badv_t m_badv; //Marks "bad" vertices + + vcol_t m_colcv, m_col_bfs; //Color maps + vertex_t m_sink; //To convert any graph to "good" + }; + + /*! \class mcr_howard1 + * \brief Finds optimum cycle raio and a critical cycle + */ + template + class mcr_howard1 : public + mcr_howard + { + public: + typedef mcr_howard inhr_t; + mcr_howard1(const Graph &g, VertexIndexMap vim, + EdgeWeight1 ewm, EdgeWeight2 ew2m) : + inhr_t(g, vim, ewm, ew2m) + { } + + void get_critical_cycle(typename inhr_t::critical_cycle_t &cc) + { return cc.swap(m_cc); } + + protected: + void store_critical_edge(typename inhr_t::edge_t ed, + typename inhr_t::critical_cycle_t &cc) + { cc.push_back(ed); } + + void store_critical_cycle(typename inhr_t::critical_cycle_t &cc) + { m_cc.swap(cc); } + + private: + typename inhr_t::critical_cycle_t m_cc; //Critical cycle + }; + + /*! + * \param g a directed multigraph. + * \param vim Vertex Index Map. A map V->[0, num_vertices(g)) + * \param ewm Edge weight1 map. + * \param ew2m Edge weight2 map. + * \param pcc pointer to the critical edges list. + * \return Optimum cycle ratio of g or FloatTraits::infinity() if g has no cycles. + */ + template + typename FT::value_type + optimum_cycle_ratio(const TG &g, TVIM vim, TEW1 ewm, TEW2 ew2m, EV* pcc) + { + typedef typename graph_traits::directed_category DirCat; + BOOST_STATIC_ASSERT((is_convertible::value == true)); + function_requires< IncidenceGraphConcept >(); + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadablePropertyMapConcept >(); + typedef typename graph_traits::edge_descriptor Edge; + function_requires< ReadablePropertyMapConcept >(); + function_requires< ReadablePropertyMapConcept >(); + + if(pcc == 0) { + return detail::mcr_howard( + g, vim, ewm, ew2m + ).ocr_howard(); + } + + detail::mcr_howard1 obj(g, vim, ewm, ew2m); + double ocr = obj.ocr_howard(); + obj.get_critical_cycle(*pcc); + return ocr; + } + } // namespace detail + +// Algorithms +// Maximum Cycle Ratio + +template < + typename FloatTraits, + typename Graph, + typename VertexIndexMap, + typename EdgeWeight1Map, + typename EdgeWeight2Map> +inline typename FloatTraits::value_type +maximum_cycle_ratio(const Graph &g, VertexIndexMap vim, EdgeWeight1Map ew1m, + EdgeWeight2Map ew2m, + std::vector::edge_descriptor>* pcc = 0, + FloatTraits = FloatTraits()) +{ + typedef detail::float_wrapper< + FloatTraits, detail::max_comparator_props + > Traits; + return detail::optimum_cycle_ratio(g, vim, ew1m, ew2m, pcc); +} + +template < + typename Graph, + typename VertexIndexMap, + typename EdgeWeight1Map, + typename EdgeWeight2Map> +inline double +maximum_cycle_ratio(const Graph &g, VertexIndexMap vim, + EdgeWeight1Map ew1m, EdgeWeight2Map ew2m, + std::vector::edge_descriptor>* pcc = 0) +{ return maximum_cycle_ratio(g, vim, ew1m, ew2m, pcc, mcr_float<>()); } + +// Minimum Cycle Ratio + +template < + typename FloatTraits, + typename Graph, + typename VertexIndexMap, + typename EdgeWeight1Map, + typename EdgeWeight2Map> +typename FloatTraits::value_type +minimum_cycle_ratio(const Graph &g, VertexIndexMap vim, + EdgeWeight1Map ew1m, EdgeWeight2Map ew2m, + std::vector::edge_descriptor> *pcc = 0, + FloatTraits = FloatTraits()) +{ + typedef detail::float_wrapper< + FloatTraits, detail::min_comparator_props + > Traits; + return detail::optimum_cycle_ratio(g, vim, ew1m, ew2m, pcc); +} + +template < + typename Graph, + typename VertexIndexMap, + typename EdgeWeight1Map, + typename EdgeWeight2Map> +inline double +minimum_cycle_ratio(const Graph &g, VertexIndexMap vim, + EdgeWeight1Map ew1m, EdgeWeight2Map ew2m, + std::vector::edge_descriptor>* pcc = 0) +{ return minimum_cycle_ratio(g, vim, ew1m, ew2m, pcc, mcr_float<>()); } + +// Maximum Cycle Mean + +template < + typename FloatTraits, + typename Graph, + typename VertexIndexMap, + typename EdgeWeightMap, + typename EdgeIndexMap> +inline typename FloatTraits::value_type +maximum_cycle_mean(const Graph &g, VertexIndexMap vim, + EdgeWeightMap ewm, EdgeIndexMap eim, + std::vector::edge_descriptor>* pcc = 0, + FloatTraits ft = FloatTraits()) +{ + typedef typename remove_const< + typename property_traits::value_type + >::type Weight; + typename std::vector ed_w2(boost::num_edges(g), 1); + return maximum_cycle_ratio(g, vim, ewm, + make_iterator_property_map(ed_w2.begin(), eim), + pcc, ft); +} + +template < + typename Graph, + typename VertexIndexMap, + typename EdgeWeightMap, + typename EdgeIndexMap> +inline double +maximum_cycle_mean(const Graph& g, VertexIndexMap vim, + EdgeWeightMap ewm, EdgeIndexMap eim, + std::vector::edge_descriptor>* pcc = 0) +{ return maximum_cycle_mean(g, vim, ewm, eim, pcc, mcr_float<>()); } + +// Minimum Cycle Mean + +template < + typename FloatTraits, + typename Graph, + typename VertexIndexMap, + typename EdgeWeightMap, + typename EdgeIndexMap> +inline typename FloatTraits::value_type +minimum_cycle_mean(const Graph &g, VertexIndexMap vim, + EdgeWeightMap ewm, EdgeIndexMap eim, + std::vector::edge_descriptor>* pcc = 0, + FloatTraits ft = FloatTraits()) +{ + typedef typename remove_const< + typename property_traits::value_type + >::type Weight; + typename std::vector ed_w2(boost::num_edges(g), 1); + return minimum_cycle_ratio(g, vim, ewm, + make_iterator_property_map(ed_w2.begin(), eim), + pcc, ft); +} + +template < + typename Graph, + typename VertexIndexMap, + typename EdgeWeightMap, + typename EdgeIndexMap> +inline double +minimum_cycle_mean(const Graph &g, VertexIndexMap vim, + EdgeWeightMap ewm, EdgeIndexMap eim, + std::vector::edge_descriptor>* pcc = 0) +{ return minimum_cycle_mean(g, vim, ewm, eim, pcc, mcr_float<>()); } + +} //namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/incremental_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/incremental_components.hpp new file mode 100644 index 0000000000..fff3a3244f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/incremental_components.hpp @@ -0,0 +1,231 @@ +// +//======================================================================= +// Copyright 1997-2001 University of Notre Dame. +// Copyright 2009 Trustees of Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Michael Hansen +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +#ifndef BOOST_INCREMENTAL_COMPONENTS_HPP +#define BOOST_INCREMENTAL_COMPONENTS_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + + // A connected component algorithm for the case when dynamically + // adding (but not removing) edges is common. The + // incremental_components() function is a preparing operation. Call + // same_component to check whether two vertices are in the same + // component, or use disjoint_set::find_set to determine the + // representative for a vertex. + + // This version of connected components does not require a full + // Graph. Instead, it just needs an edge list, where the vertices of + // each edge need to be of integer type. The edges are assumed to + // be undirected. The other difference is that the result is stored in + // a container, instead of just a decorator. The container should be + // empty before the algorithm is called. It will grow during the + // course of the algorithm. The container must be a model of + // BackInsertionSequence and RandomAccessContainer + // (std::vector is a good choice). After running the algorithm the + // index container will map each vertex to the representative + // vertex of the component to which it belongs. + // + // Adapted from an implementation by Alex Stepanov. The disjoint + // sets data structure is from Tarjan's "Data Structures and Network + // Algorithms", and the application to connected components is + // similar to the algorithm described in Ch. 22 of "Intro to + // Algorithms" by Cormen, et. all. + // + + // An implementation of disjoint sets can be found in + // boost/pending/disjoint_sets.hpp + + template + void incremental_components(EdgeListGraph& g, DisjointSets& ds) + { + typename graph_traits::edge_iterator e, end; + for (boost::tie(e,end) = edges(g); e != end; ++e) + ds.union_set(source(*e,g),target(*e,g)); + } + + template + void compress_components(ParentIterator first, ParentIterator last) + { + for (ParentIterator current = first; current != last; ++current) + detail::find_representative_with_full_compression(first, current-first); + } + + template + typename boost::detail::iterator_traits::difference_type + component_count(ParentIterator first, ParentIterator last) + { + std::ptrdiff_t count = 0; + for (ParentIterator current = first; current != last; ++current) + if (*current == current - first) ++count; + return count; + } + + // This algorithm can be applied to the result container of the + // connected_components algorithm to normalize + // the components. + template + void normalize_components(ParentIterator first, ParentIterator last) + { + for (ParentIterator current = first; current != last; ++current) + detail::normalize_node(first, current - first); + } + + template + void initialize_incremental_components(VertexListGraph& G, DisjointSets& ds) + { + typename graph_traits + ::vertex_iterator v, vend; + for (boost::tie(v, vend) = vertices(G); v != vend; ++v) + ds.make_set(*v); + } + + template + inline bool same_component(Vertex u, Vertex v, DisjointSet& ds) + { + return ds.find_set(u) == ds.find_set(v); + } + + // Class that builds a quick-access indexed linked list that allows + // for fast iterating through a parent component's children. + template + class component_index { + + private: + typedef std::vector IndexContainer; + + public: + typedef counting_iterator iterator; + typedef iterator const_iterator; + typedef IndexType value_type; + typedef IndexType size_type; + + typedef detail::component_index_iterator + component_iterator; + + public: + template + component_index(ParentIterator parent_start, + ParentIterator parent_end, + const ElementIndexMap& index_map) : + m_num_elements(std::distance(parent_start, parent_end)), + m_components(make_shared()), + m_index_list(make_shared(m_num_elements)) { + + build_index_lists(parent_start, index_map); + + } // component_index + + template + component_index(ParentIterator parent_start, + ParentIterator parent_end) : + m_num_elements(std::distance(parent_start, parent_end)), + m_components(make_shared()), + m_index_list(make_shared(m_num_elements)) { + + build_index_lists(parent_start, boost::identity_property_map()); + + } // component_index + + // Returns the number of components + inline std::size_t size() const { + return (m_components->size()); + } + + // Beginning iterator for component indices + iterator begin() const { + return (iterator(0)); + } + + // End iterator for component indices + iterator end() const { + return (iterator(this->size())); + } + + // Returns a pair of begin and end iterators for the child + // elements of component [component_index]. + std::pair + operator[](IndexType component_index) const { + + IndexType first_index = (*m_components)[component_index]; + + return (std::make_pair + (component_iterator(m_index_list->begin(), first_index), + component_iterator(m_num_elements))); + } + + private: + template + void build_index_lists(ParentIterator parent_start, + const ElementIndexMap& index_map) { + + typedef typename std::iterator_traits::value_type Element; + typename IndexContainer::iterator index_list = + m_index_list->begin(); + + // First pass - find root elements, construct index list + for (IndexType element_index = 0; element_index < m_num_elements; + ++element_index) { + + Element parent_element = parent_start[element_index]; + IndexType parent_index = get(index_map, parent_element); + + if (element_index != parent_index) { + index_list[element_index] = parent_index; + } + else { + m_components->push_back(element_index); + + // m_num_elements is the linked list terminator + index_list[element_index] = m_num_elements; + } + } + + // Second pass - build linked list + for (IndexType element_index = 0; element_index < m_num_elements; + ++element_index) { + + Element parent_element = parent_start[element_index]; + IndexType parent_index = get(index_map, parent_element); + + if (element_index != parent_index) { + + // Follow list until a component parent is found + while (index_list[parent_index] != m_num_elements) { + parent_index = index_list[parent_index]; + } + + // Push element to the front of the linked list + index_list[element_index] = index_list[parent_index]; + index_list[parent_index] = element_index; + } + } + + } // build_index_lists + + protected: + IndexType m_num_elements; + shared_ptr m_components, m_index_list; + + }; // class component_index + +} // namespace boost + +#endif // BOOST_INCREMENTAL_COMPONENTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/is_kuratowski_subgraph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/is_kuratowski_subgraph.hpp new file mode 100644 index 0000000000..fab0b0246f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/is_kuratowski_subgraph.hpp @@ -0,0 +1,332 @@ +//======================================================================= +// Copyright 2007 Aaron Windsor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef __IS_KURATOWSKI_SUBGRAPH_HPP__ +#define __IS_KURATOWSKI_SUBGRAPH_HPP__ + +#include +#include //for next/prior +#include //for tie +#include +#include +#include +#include + +#include +#include +#include + + + +namespace boost +{ + + namespace detail + { + + template + Graph make_K_5() + { + typename graph_traits::vertex_iterator vi, vi_end, inner_vi; + Graph K_5(5); + for(tie(vi,vi_end) = vertices(K_5); vi != vi_end; ++vi) + for(inner_vi = next(vi); inner_vi != vi_end; ++inner_vi) + add_edge(*vi, *inner_vi, K_5); + return K_5; + } + + + template + Graph make_K_3_3() + { + typename graph_traits::vertex_iterator + vi, vi_end, bipartition_start, inner_vi; + Graph K_3_3(6); + bipartition_start = next(next(next(vertices(K_3_3).first))); + for(tie(vi, vi_end) = vertices(K_3_3); vi != bipartition_start; ++vi) + for(inner_vi= bipartition_start; inner_vi != vi_end; ++inner_vi) + add_edge(*vi, *inner_vi, K_3_3); + return K_3_3; + } + + + template + void contract_edge(AdjacencyList& neighbors, Vertex u, Vertex v) + { + // Remove u from v's neighbor list + neighbors[v].erase(std::remove(neighbors[v].begin(), + neighbors[v].end(), u + ), + neighbors[v].end() + ); + + // Replace any references to u with references to v + typedef typename AdjacencyList::value_type::iterator + adjacency_iterator_t; + + adjacency_iterator_t u_neighbor_end = neighbors[u].end(); + for(adjacency_iterator_t u_neighbor_itr = neighbors[u].begin(); + u_neighbor_itr != u_neighbor_end; ++u_neighbor_itr + ) + { + Vertex u_neighbor(*u_neighbor_itr); + std::replace(neighbors[u_neighbor].begin(), + neighbors[u_neighbor].end(), u, v + ); + } + + // Remove v from u's neighbor list + neighbors[u].erase(std::remove(neighbors[u].begin(), + neighbors[u].end(), v + ), + neighbors[u].end() + ); + + // Add everything in u's neighbor list to v's neighbor list + std::copy(neighbors[u].begin(), + neighbors[u].end(), + std::back_inserter(neighbors[v]) + ); + + // Clear u's neighbor list + neighbors[u].clear(); + + } + + enum target_graph_t { tg_k_3_3, tg_k_5}; + + } // namespace detail + + + + + template + bool is_kuratowski_subgraph(const Graph& g, + ForwardIterator begin, + ForwardIterator end, + VertexIndexMap vm + ) + { + + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::vertex_iterator vertex_iterator_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename graph_traits::edges_size_type e_size_t; + typedef typename graph_traits::vertices_size_type v_size_t; + typedef typename std::vector v_list_t; + typedef typename v_list_t::iterator v_list_iterator_t; + typedef iterator_property_map + ::iterator, VertexIndexMap> + vertex_to_v_list_map_t; + + typedef adjacency_list small_graph_t; + + detail::target_graph_t target_graph = detail::tg_k_3_3; //unless we decide otherwise later + + static small_graph_t K_5(detail::make_K_5()); + + static small_graph_t K_3_3(detail::make_K_3_3()); + + v_size_t n_vertices(num_vertices(g)); + v_size_t max_num_edges(3*n_vertices - 5); + + std::vector neighbors_vector(n_vertices); + vertex_to_v_list_map_t neighbors(neighbors_vector.begin(), vm); + + e_size_t count = 0; + for(ForwardIterator itr = begin; itr != end; ++itr) + { + + if (count++ > max_num_edges) + return false; + + edge_t e(*itr); + vertex_t u(source(e,g)); + vertex_t v(target(e,g)); + + neighbors[u].push_back(v); + neighbors[v].push_back(u); + + } + + + for(v_size_t max_size = 2; max_size < 5; ++max_size) + { + + vertex_iterator_t vi, vi_end; + for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + { + vertex_t v(*vi); + + //a hack to make sure we don't contract the middle edge of a path + //of four degree-3 vertices + if (max_size == 4 && neighbors[v].size() == 3) + { + if (neighbors[neighbors[v][0]].size() + + neighbors[neighbors[v][1]].size() + + neighbors[neighbors[v][2]].size() + < 11 // so, it has two degree-3 neighbors + ) + continue; + } + + while (neighbors[v].size() > 0 && neighbors[v].size() < max_size) + { + // Find one of v's neighbors u such that that v and u + // have no neighbors in common. We'll look for such a + // neighbor with a naive cubic-time algorithm since the + // max size of any of the neighbor sets we'll consider + // merging is 3 + + bool neighbor_sets_intersect = false; + + vertex_t min_u = graph_traits::null_vertex(); + vertex_t u; + v_list_iterator_t v_neighbor_end = neighbors[v].end(); + for(v_list_iterator_t v_neighbor_itr = neighbors[v].begin(); + v_neighbor_itr != v_neighbor_end; + ++v_neighbor_itr + ) + { + neighbor_sets_intersect = false; + u = *v_neighbor_itr; + v_list_iterator_t u_neighbor_end = neighbors[u].end(); + for(v_list_iterator_t u_neighbor_itr = + neighbors[u].begin(); + u_neighbor_itr != u_neighbor_end && + !neighbor_sets_intersect; + ++u_neighbor_itr + ) + { + for(v_list_iterator_t inner_v_neighbor_itr = + neighbors[v].begin(); + inner_v_neighbor_itr != v_neighbor_end; + ++inner_v_neighbor_itr + ) + { + if (*u_neighbor_itr == *inner_v_neighbor_itr) + { + neighbor_sets_intersect = true; + break; + } + } + + } + if (!neighbor_sets_intersect && + (min_u == graph_traits::null_vertex() || + neighbors[u].size() < neighbors[min_u].size()) + ) + { + min_u = u; + } + + } + + if (min_u == graph_traits::null_vertex()) + // Exited the loop without finding an appropriate neighbor of + // v, so v must be a lost cause. Move on to other vertices. + break; + else + u = min_u; + + detail::contract_edge(neighbors, u, v); + + }//end iteration over v's neighbors + + }//end iteration through vertices v + + if (max_size == 3) + { + // check to see whether we should go on to find a K_5 + for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + if (neighbors[*vi].size() == 4) + { + target_graph = detail::tg_k_5; + break; + } + + if (target_graph == detail::tg_k_3_3) + break; + } + + }//end iteration through max degree 2,3, and 4 + + + //Now, there should only be 5 or 6 vertices with any neighbors. Find them. + + v_list_t main_vertices; + vertex_iterator_t vi, vi_end; + + for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + { + if (!neighbors[*vi].empty()) + main_vertices.push_back(*vi); + } + + // create a graph isomorphic to the contracted graph to test + // against K_5 and K_3_3 + small_graph_t contracted_graph(main_vertices.size()); + std::map::vertex_descriptor> + contracted_vertex_map; + + typename v_list_t::iterator itr, itr_end; + itr_end = main_vertices.end(); + typename graph_traits::vertex_iterator + si = vertices(contracted_graph).first; + + for(itr = main_vertices.begin(); itr != itr_end; ++itr, ++si) + { + contracted_vertex_map[*itr] = *si; + } + + typename v_list_t::iterator jtr, jtr_end; + for(itr = main_vertices.begin(); itr != itr_end; ++itr) + { + jtr_end = neighbors[*itr].end(); + for(jtr = neighbors[*itr].begin(); jtr != jtr_end; ++jtr) + { + if (get(vm,*itr) < get(vm,*jtr)) + { + add_edge(contracted_vertex_map[*itr], + contracted_vertex_map[*jtr], + contracted_graph + ); + } + } + } + + if (target_graph == detail::tg_k_5) + { + return isomorphism(K_5,contracted_graph); + } + else //target_graph == tg_k_3_3 + { + return isomorphism(K_3_3,contracted_graph); + } + + + } + + + + + + template + bool is_kuratowski_subgraph(const Graph& g, + ForwardIterator begin, + ForwardIterator end + ) + { + return is_kuratowski_subgraph(g, begin, end, get(vertex_index,g)); + } + + + + +} + +#endif //__IS_KURATOWSKI_SUBGRAPH_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/is_straight_line_drawing.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/is_straight_line_drawing.hpp new file mode 100644 index 0000000000..6b7c390548 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/is_straight_line_drawing.hpp @@ -0,0 +1,252 @@ +//======================================================================= +// Copyright 2007 Aaron Windsor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef __IS_STRAIGHT_LINE_DRAWING_HPP__ +#define __IS_STRAIGHT_LINE_DRAWING_HPP__ + +#include +#include //for next and prior +#include +#include +#include +#include +#include + +#include +#include +#include + + + +namespace boost +{ + + // Return true exactly when the line segments s1 = ((x1,y1), (x2,y2)) and + // s2 = ((a1,b1), (a2,b2)) intersect in a point other than the endpoints of + // the line segments. The one exception to this rule is when s1 = s2, in + // which case false is returned - this is to accomodate multiple edges + // between the same pair of vertices, which shouldn't invalidate the straight + // line embedding. A tolerance variable epsilon can also be used, which + // defines how far away from the endpoints of s1 and s2 we want to consider + // an intersection. + + bool intersects(double x1, double y1, + double x2, double y2, + double a1, double b1, + double a2, double b2, + double epsilon = 0.000001 + ) + { + + if (x1 - x2 == 0) + { + std::swap(x1,a1); + std::swap(y1,b1); + std::swap(x2,a2); + std::swap(y2,b2); + } + + if (x1 - x2 == 0) + { + BOOST_USING_STD_MAX(); + BOOST_USING_STD_MIN(); + + //two vertical line segments + double min_y = min BOOST_PREVENT_MACRO_SUBSTITUTION(y1,y2); + double max_y = max BOOST_PREVENT_MACRO_SUBSTITUTION(y1,y2); + double min_b = min BOOST_PREVENT_MACRO_SUBSTITUTION(b1,b2); + double max_b = max BOOST_PREVENT_MACRO_SUBSTITUTION(b1,b2); + if ((max_y > max_b && max_b > min_y) || + (max_b > max_y && max_y > min_b) + ) + return true; + else + return false; + } + + double x_diff = x1 - x2; + double y_diff = y1 - y2; + double a_diff = a2 - a1; + double b_diff = b2 - b1; + + double beta_denominator = b_diff - (y_diff/((double)x_diff)) * a_diff; + + if (beta_denominator == 0) + { + //parallel lines + return false; + } + + double beta = (b2 - y2 - (y_diff/((double)x_diff)) * (a2 - x2)) / + beta_denominator; + double alpha = (a2 - x2 - beta*(a_diff))/x_diff; + + double upper_bound = 1 - epsilon; + double lower_bound = 0 + epsilon; + + return (beta < upper_bound && beta > lower_bound && + alpha < upper_bound && alpha > lower_bound); + + } + + + template + bool is_straight_line_drawing(const Graph& g, + GridPositionMap drawing, + VertexIndexMap + ) + { + + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::vertex_iterator vertex_iterator_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename graph_traits::edge_iterator edge_iterator_t; + typedef typename graph_traits::edges_size_type e_size_t; + typedef typename graph_traits::vertices_size_type v_size_t; + + typedef std::size_t x_coord_t; + typedef std::size_t y_coord_t; + typedef boost::tuple edge_event_t; + typedef typename std::vector< edge_event_t > edge_event_queue_t; + + typedef tuple active_map_key_t; + typedef edge_t active_map_value_t; + typedef std::map< active_map_key_t, active_map_value_t > active_map_t; + typedef typename active_map_t::iterator active_map_iterator_t; + + + edge_event_queue_t edge_event_queue; + active_map_t active_edges; + + edge_iterator_t ei, ei_end; + for(tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) + { + edge_t e(*ei); + vertex_t s(source(e,g)); + vertex_t t(target(e,g)); + edge_event_queue.push_back + (make_tuple(e, + static_cast(drawing[s].x), + static_cast(drawing[s].y) + ) + ); + edge_event_queue.push_back + (make_tuple(e, + static_cast(drawing[t].x), + static_cast(drawing[t].y) + ) + ); + } + + // Order by edge_event_queue by first, then second coordinate + // (bucket_sort is a stable sort.) + bucket_sort(edge_event_queue.begin(), edge_event_queue.end(), + property_map_tuple_adaptor() + ); + + bucket_sort(edge_event_queue.begin(), edge_event_queue.end(), + property_map_tuple_adaptor() + ); + + typedef typename edge_event_queue_t::iterator event_queue_iterator_t; + event_queue_iterator_t itr_end = edge_event_queue.end(); + for(event_queue_iterator_t itr = edge_event_queue.begin(); + itr != itr_end; ++itr + ) + { + edge_t e(get<0>(*itr)); + vertex_t source_v(source(e,g)); + vertex_t target_v(target(e,g)); + if (drawing[source_v].y > drawing[target_v].y) + std::swap(source_v, target_v); + + active_map_key_t key(get(drawing, source_v).y, + get(drawing, target_v).y, + get(drawing, source_v).x, + get(drawing, target_v).x + ); + + active_map_iterator_t a_itr = active_edges.find(key); + if (a_itr == active_edges.end()) + { + active_edges[key] = e; + } + else + { + active_map_iterator_t before, after; + if (a_itr == active_edges.begin()) + before = active_edges.end(); + else + before = prior(a_itr); + after = boost::next(a_itr); + + if (before != active_edges.end()) + { + + edge_t f = before->second; + vertex_t e_source(source(e,g)); + vertex_t e_target(target(e,g)); + vertex_t f_source(source(f,g)); + vertex_t f_target(target(f,g)); + + if (intersects(drawing[e_source].x, + drawing[e_source].y, + drawing[e_target].x, + drawing[e_target].y, + drawing[f_source].x, + drawing[f_source].y, + drawing[f_target].x, + drawing[f_target].y + ) + ) + return false; + } + + if (after != active_edges.end()) + { + + edge_t f = after->second; + vertex_t e_source(source(e,g)); + vertex_t e_target(target(e,g)); + vertex_t f_source(source(f,g)); + vertex_t f_target(target(f,g)); + + if (intersects(drawing[e_source].x, + drawing[e_source].y, + drawing[e_target].x, + drawing[e_target].y, + drawing[f_source].x, + drawing[f_source].y, + drawing[f_target].x, + drawing[f_target].y + ) + ) + return false; + } + + active_edges.erase(a_itr); + + } + } + + return true; + + } + + + template + bool is_straight_line_drawing(const Graph& g, GridPositionMap drawing) + { + return is_straight_line_drawing(g, drawing, get(vertex_index,g)); + } + +} + +#endif // __IS_STRAIGHT_LINE_DRAWING_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/isomorphism.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/isomorphism.hpp new file mode 100644 index 0000000000..9461dc31e5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/isomorphism.hpp @@ -0,0 +1,465 @@ +// Copyright (C) 2001 Jeremy Siek, Douglas Gregor, Brian Osman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_GRAPH_ISOMORPHISM_HPP +#define BOOST_GRAPH_ISOMORPHISM_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include // for make_indirect_pmap + +#ifndef BOOST_GRAPH_ITERATION_MACROS_HPP +#define BOOST_ISO_INCLUDED_ITER_MACROS // local macro, see bottom of file +#include +#endif + +namespace boost { + + namespace detail { + + template + class isomorphism_algo + { + typedef typename graph_traits::vertex_descriptor vertex1_t; + typedef typename graph_traits::vertex_descriptor vertex2_t; + typedef typename graph_traits::edge_descriptor edge1_t; + typedef typename graph_traits::vertices_size_type size_type; + typedef typename Invariant1::result_type invar1_value; + typedef typename Invariant2::result_type invar2_value; + + const Graph1& G1; + const Graph2& G2; + IsoMapping f; + Invariant1 invariant1; + Invariant2 invariant2; + std::size_t max_invariant; + IndexMap1 index_map1; + IndexMap2 index_map2; + + std::vector dfs_vertices; + typedef typename std::vector::iterator vertex_iter; + std::vector dfs_num_vec; + typedef safe_iterator_property_map::iterator, + IndexMap1 +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + , int, int& +#endif /* BOOST_NO_STD_ITERATOR_TRAITS */ + > DFSNumMap; + DFSNumMap dfs_num; + std::vector ordered_edges; + typedef typename std::vector::iterator edge_iter; + + std::vector in_S_vec; + typedef safe_iterator_property_map::iterator, + IndexMap2 +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + , char, char& +#endif /* BOOST_NO_STD_ITERATOR_TRAITS */ + > InSMap; + InSMap in_S; + + int num_edges_on_k; + + friend struct compare_multiplicity; + struct compare_multiplicity + { + compare_multiplicity(Invariant1 invariant1, size_type* multiplicity) + : invariant1(invariant1), multiplicity(multiplicity) { } + bool operator()(const vertex1_t& x, const vertex1_t& y) const { + return multiplicity[invariant1(x)] < multiplicity[invariant1(y)]; + } + Invariant1 invariant1; + size_type* multiplicity; + }; + + struct record_dfs_order : default_dfs_visitor + { + record_dfs_order(std::vector& v, std::vector& e) + : vertices(v), edges(e) { } + + void discover_vertex(vertex1_t v, const Graph1&) const { + vertices.push_back(v); + } + void examine_edge(edge1_t e, const Graph1&) const { + edges.push_back(e); + } + std::vector& vertices; + std::vector& edges; + }; + + struct edge_cmp { + edge_cmp(const Graph1& G1, DFSNumMap dfs_num) + : G1(G1), dfs_num(dfs_num) { } + bool operator()(const edge1_t& e1, const edge1_t& e2) const { + using namespace std; + int u1 = dfs_num[source(e1,G1)], v1 = dfs_num[target(e1,G1)]; + int u2 = dfs_num[source(e2,G1)], v2 = dfs_num[target(e2,G1)]; + int m1 = (max)(u1, v1); + int m2 = (max)(u2, v2); + // lexicographical comparison + return std::make_pair(m1, std::make_pair(u1, v1)) + < std::make_pair(m2, std::make_pair(u2, v2)); + } + const Graph1& G1; + DFSNumMap dfs_num; + }; + + public: + isomorphism_algo(const Graph1& G1, const Graph2& G2, IsoMapping f, + Invariant1 invariant1, Invariant2 invariant2, std::size_t max_invariant, + IndexMap1 index_map1, IndexMap2 index_map2) + : G1(G1), G2(G2), f(f), invariant1(invariant1), invariant2(invariant2), + max_invariant(max_invariant), + index_map1(index_map1), index_map2(index_map2) + { + in_S_vec.resize(num_vertices(G1)); + in_S = make_safe_iterator_property_map + (in_S_vec.begin(), in_S_vec.size(), index_map2 +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + , in_S_vec.front() +#endif /* BOOST_NO_STD_ITERATOR_TRAITS */ + ); + } + + bool test_isomorphism() + { + { + std::vector invar1_array; + BGL_FORALL_VERTICES_T(v, G1, Graph1) + invar1_array.push_back(invariant1(v)); + sort(invar1_array); + + std::vector invar2_array; + BGL_FORALL_VERTICES_T(v, G2, Graph2) + invar2_array.push_back(invariant2(v)); + sort(invar2_array); + if (! equal(invar1_array, invar2_array)) + return false; + } + + std::vector V_mult; + BGL_FORALL_VERTICES_T(v, G1, Graph1) + V_mult.push_back(v); + { + std::vector multiplicity(max_invariant, 0); + BGL_FORALL_VERTICES_T(v, G1, Graph1) + ++multiplicity[invariant1(v)]; + sort(V_mult, compare_multiplicity(invariant1, &multiplicity[0])); + } + + std::vector color_vec(num_vertices(G1)); + safe_iterator_property_map::iterator, + IndexMap1 +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + , default_color_type, default_color_type& +#endif /* BOOST_NO_STD_ITERATOR_TRAITS */ + > + color_map(color_vec.begin(), color_vec.size(), index_map1); + record_dfs_order dfs_visitor(dfs_vertices, ordered_edges); + typedef color_traits Color; + for (vertex_iter u = V_mult.begin(); u != V_mult.end(); ++u) { + if (color_map[*u] == Color::white()) { + dfs_visitor.start_vertex(*u, G1); + depth_first_visit(G1, *u, dfs_visitor, color_map); + } + } + // Create the dfs_num array and dfs_num_map + dfs_num_vec.resize(num_vertices(G1)); + dfs_num = make_safe_iterator_property_map(dfs_num_vec.begin(), + dfs_num_vec.size(), + index_map1 +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + , dfs_num_vec.front() +#endif /* BOOST_NO_STD_ITERATOR_TRAITS */ + ); + size_type n = 0; + for (vertex_iter v = dfs_vertices.begin(); v != dfs_vertices.end(); ++v) + dfs_num[*v] = n++; + + sort(ordered_edges, edge_cmp(G1, dfs_num)); + + + int dfs_num_k = -1; + return this->match(ordered_edges.begin(), dfs_num_k); + } + + private: + bool match(edge_iter iter, int dfs_num_k) + { + if (iter != ordered_edges.end()) { + vertex1_t i = source(*iter, G1), j = target(*iter, G2); + if (dfs_num[i] > dfs_num_k) { + vertex1_t kp1 = dfs_vertices[dfs_num_k + 1]; + BGL_FORALL_VERTICES_T(u, G2, Graph2) { + if (invariant1(kp1) == invariant2(u) && in_S[u] == false) { + f[kp1] = u; + in_S[u] = true; + num_edges_on_k = 0; + + if (match(iter, dfs_num_k + 1)) +#if 0 + // dwa 2003/7/11 -- this *HAS* to be a bug! + ; +#endif + return true; + + in_S[u] = false; + } + } + + } + else if (dfs_num[j] > dfs_num_k) { + vertex1_t k = dfs_vertices[dfs_num_k]; + num_edges_on_k -= + count_if(adjacent_vertices(f[k], G2), make_indirect_pmap(in_S)); + + for (int jj = 0; jj < dfs_num_k; ++jj) { + vertex1_t j = dfs_vertices[jj]; + num_edges_on_k -= count(adjacent_vertices(f[j], G2), f[k]); + } + + if (num_edges_on_k != 0) + return false; + BGL_FORALL_ADJ_T(f[i], v, G2, Graph2) + if (invariant2(v) == invariant1(j) && in_S[v] == false) { + f[j] = v; + in_S[v] = true; + num_edges_on_k = 1; + BOOST_USING_STD_MAX(); + int next_k = max BOOST_PREVENT_MACRO_SUBSTITUTION(dfs_num_k, max BOOST_PREVENT_MACRO_SUBSTITUTION(dfs_num[i], dfs_num[j])); + if (match(boost::next(iter), next_k)) + return true; + in_S[v] = false; + } + + + } + else { + if (container_contains(adjacent_vertices(f[i], G2), f[j])) { + ++num_edges_on_k; + if (match(boost::next(iter), dfs_num_k)) + return true; + } + + } + } else + return true; + return false; + } + + }; + + + template + void compute_in_degree(const Graph& g, InDegreeMap in_degree_map) + { + BGL_FORALL_VERTICES_T(v, g, Graph) + put(in_degree_map, v, 0); + + BGL_FORALL_VERTICES_T(u, g, Graph) + BGL_FORALL_ADJ_T(u, v, g, Graph) + put(in_degree_map, v, get(in_degree_map, v) + 1); + } + + } // namespace detail + + + template + class degree_vertex_invariant + { + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::degree_size_type size_type; + public: + typedef vertex_t argument_type; + typedef size_type result_type; + + degree_vertex_invariant(const InDegreeMap& in_degree_map, const Graph& g) + : m_in_degree_map(in_degree_map), m_g(g) { } + + size_type operator()(vertex_t v) const { + return (num_vertices(m_g) + 1) * out_degree(v, m_g) + + get(m_in_degree_map, v); + } + // The largest possible vertex invariant number + size_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { + return num_vertices(m_g) * num_vertices(m_g) + num_vertices(m_g); + } + private: + InDegreeMap m_in_degree_map; + const Graph& m_g; + }; + + + template + bool isomorphism(const Graph1& G1, const Graph2& G2, IsoMapping f, + Invariant1 invariant1, Invariant2 invariant2, + std::size_t max_invariant, + IndexMap1 index_map1, IndexMap2 index_map2) + + { + // Graph requirements + function_requires< VertexListGraphConcept >(); + function_requires< EdgeListGraphConcept >(); + function_requires< VertexListGraphConcept >(); + function_requires< BidirectionalGraphConcept >(); + + typedef typename graph_traits::vertex_descriptor vertex1_t; + typedef typename graph_traits::vertex_descriptor vertex2_t; + typedef typename graph_traits::vertices_size_type size_type; + + // Vertex invariant requirement + function_requires< AdaptableUnaryFunctionConcept >(); + function_requires< AdaptableUnaryFunctionConcept >(); + + // Property map requirements + function_requires< ReadWritePropertyMapConcept >(); + typedef typename property_traits::value_type IsoMappingValue; + BOOST_STATIC_ASSERT((is_same::value)); + + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type IndexMap1Value; + BOOST_STATIC_ASSERT((is_convertible::value)); + + function_requires< ReadablePropertyMapConcept >(); + typedef typename property_traits::value_type IndexMap2Value; + BOOST_STATIC_ASSERT((is_convertible::value)); + + if (num_vertices(G1) != num_vertices(G2)) + return false; + if (num_vertices(G1) == 0 && num_vertices(G2) == 0) + return true; + + detail::isomorphism_algo + algo(G1, G2, f, invariant1, invariant2, max_invariant, + index_map1, index_map2); + return algo.test_isomorphism(); + } + + + namespace detail { + + template + bool isomorphism_impl(const Graph1& G1, const Graph2& G2, + IsoMapping f, IndexMap1 index_map1, IndexMap2 index_map2, + const bgl_named_params& params) + { + std::vector in_degree1_vec(num_vertices(G1)); + typedef safe_iterator_property_map::iterator, + IndexMap1 +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + , std::size_t, std::size_t& +#endif /* BOOST_NO_STD_ITERATOR_TRAITS */ + > InDeg1; + InDeg1 in_degree1(in_degree1_vec.begin(), in_degree1_vec.size(), index_map1); + compute_in_degree(G1, in_degree1); + + std::vector in_degree2_vec(num_vertices(G2)); + typedef safe_iterator_property_map::iterator, + IndexMap2 +#ifdef BOOST_NO_STD_ITERATOR_TRAITS + , std::size_t, std::size_t& +#endif /* BOOST_NO_STD_ITERATOR_TRAITS */ + > InDeg2; + InDeg2 in_degree2(in_degree2_vec.begin(), in_degree2_vec.size(), index_map2); + compute_in_degree(G2, in_degree2); + + degree_vertex_invariant invariant1(in_degree1, G1); + degree_vertex_invariant invariant2(in_degree2, G2); + + return isomorphism(G1, G2, f, + choose_param(get_param(params, vertex_invariant1_t()), invariant1), + choose_param(get_param(params, vertex_invariant2_t()), invariant2), + choose_param(get_param(params, vertex_max_invariant_t()), (invariant2.max)()), + index_map1, index_map2 + ); + } + + } // namespace detail + + + // Named parameter interface + template + bool isomorphism(const Graph1& g1, + const Graph2& g2, + const bgl_named_params& params) + { + typedef typename graph_traits::vertex_descriptor vertex2_t; + typename std::vector::size_type n = num_vertices(g1); + std::vector f(n); + return detail::isomorphism_impl + (g1, g2, + choose_param(get_param(params, vertex_isomorphism_t()), + make_safe_iterator_property_map(f.begin(), f.size(), + choose_const_pmap(get_param(params, vertex_index1), + g1, vertex_index), vertex2_t())), + choose_const_pmap(get_param(params, vertex_index1), g1, vertex_index), + choose_const_pmap(get_param(params, vertex_index2), g2, vertex_index), + params + ); + } + + // All defaults interface + template + bool isomorphism(const Graph1& g1, const Graph2& g2) + { + return isomorphism(g1, g2, + bgl_named_params(0));// bogus named param + } + + + // Verify that the given mapping iso_map from the vertices of g1 to the + // vertices of g2 describes an isomorphism. + // Note: this could be made much faster by specializing based on the graph + // concepts modeled, but since we're verifying an O(n^(lg n)) algorithm, + // O(n^4) won't hurt us. + template + inline bool verify_isomorphism(const Graph1& g1, const Graph2& g2, IsoMap iso_map) + { +#if 0 + // problematic for filtered_graph! + if (num_vertices(g1) != num_vertices(g2) || num_edges(g1) != num_edges(g2)) + return false; +#endif + + BGL_FORALL_EDGES_T(e1, g1, Graph1) { + bool found_edge = false; + BGL_FORALL_EDGES_T(e2, g2, Graph2) { + if (source(e2, g2) == get(iso_map, source(e1, g1)) && + target(e2, g2) == get(iso_map, target(e1, g1))) { + found_edge = true; + } + } + + if (!found_edge) + return false; + } + + return true; + } + +} // namespace boost + +#ifdef BOOST_ISO_INCLUDED_ITER_MACROS +#undef BOOST_ISO_INCLUDED_ITER_MACROS +#include +#endif + +#endif // BOOST_GRAPH_ISOMORPHISM_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/iteration_macros.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/iteration_macros.hpp new file mode 100644 index 0000000000..2bf40f9580 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/iteration_macros.hpp @@ -0,0 +1,140 @@ +//======================================================================= +// Copyright 2001 Indiana University +// Author: Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_ITERATION_MACROS_HPP +#define BOOST_GRAPH_ITERATION_MACROS_HPP + +#include + +#define BGL_CAT(x,y) x ## y +#define BGL_RANGE(linenum) BGL_CAT(bgl_range_,linenum) +#define BGL_FIRST(linenum) (BGL_RANGE(linenum).first) +#define BGL_LAST(linenum) (BGL_RANGE(linenum).second) + +/* + BGL_FORALL_VERTICES_T(v, g, graph_t) // This is on line 9 + expands to the following, but all on the same line + + for (typename boost::graph_traits::vertex_iterator + bgl_first_9 = vertices(g).first, bgl_last_9 = vertices(g).second; + bgl_first_9 != bgl_last_9; bgl_first_9 = bgl_last_9) + for (typename boost::graph_traits::vertex_descriptor v; + bgl_first_9 != bgl_last_9 ? (v = *bgl_first_9, true) : false; + ++bgl_first_9) + + The purpose of having two for-loops is just to provide a place to + declare both the iterator and value variables. There is really only + one loop. The stopping condition gets executed two more times than it + usually would be, oh well. The reason for the bgl_first_9 = bgl_last_9 + in the outer for-loop is in case the user puts a break statement + in the inner for-loop. + + The other macros work in a similar fashion. + + Use the _T versions when the graph type is a template parameter or + dependent on a template parameter. Otherwise use the non _T versions. + + ----------------------- + 6/9/09 THK + + The above contains two calls to the vertices function. I modified these + macros to expand to + + for (std::pair::vertex_iterator, + typename boost::graph_traits::vertex_iterator> bgl_range_9 = vertices(g); + bgl_range_9.first != bgl_range_9.second; + bgl_range_9.first = bgl_range_9.second) + for (typename boost::graph_traits::vertex_descriptor v; + bgl_range_9.first != bgl_range_9.second ? (v = *bgl_range_9.first, true) : false; + ++bgl_range_9.first) + + */ + + +#define BGL_FORALL_VERTICES_T(VNAME, GNAME, GraphType) \ +for (std::pair::vertex_iterator, \ + typename boost::graph_traits::vertex_iterator> BGL_RANGE(__LINE__) = vertices(GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ + for (typename boost::graph_traits::vertex_descriptor VNAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (VNAME = *BGL_FIRST(__LINE__), true):false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_VERTICES(VNAME, GNAME, GraphType) \ +for (std::pair::vertex_iterator, \ + boost::graph_traits::vertex_iterator> BGL_RANGE(__LINE__) = vertices(GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ + for (boost::graph_traits::vertex_descriptor VNAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (VNAME = *BGL_FIRST(__LINE__), true):false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_EDGES_T(ENAME, GNAME, GraphType) \ +for (std::pair::edge_iterator, \ + typename boost::graph_traits::edge_iterator> BGL_RANGE(__LINE__) = edges(GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ + for (typename boost::graph_traits::edge_descriptor ENAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (ENAME = *BGL_FIRST(__LINE__), true):false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_EDGES(ENAME, GNAME, GraphType) \ +for (std::pair::edge_iterator, \ + boost::graph_traits::edge_iterator> BGL_RANGE(__LINE__) = edges(GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ + for (boost::graph_traits::edge_descriptor ENAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (ENAME = *BGL_FIRST(__LINE__), true):false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_ADJ_T(UNAME, VNAME, GNAME, GraphType) \ +for (std::pair::adjacency_iterator, \ + typename boost::graph_traits::adjacency_iterator> BGL_RANGE(__LINE__) = adjacent_vertices(UNAME, GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ +for (typename boost::graph_traits::vertex_descriptor VNAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (VNAME = *BGL_FIRST(__LINE__), true) : false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_ADJ(UNAME, VNAME, GNAME, GraphType) \ +for (std::pair::adjacency_iterator, \ + boost::graph_traits::adjacency_iterator> BGL_RANGE(__LINE__) = adjacent_vertices(UNAME, GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ +for (boost::graph_traits::vertex_descriptor VNAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (VNAME = *BGL_FIRST(__LINE__), true) : false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_OUTEDGES_T(UNAME, ENAME, GNAME, GraphType) \ +for (std::pair::out_edge_iterator, \ + typename boost::graph_traits::out_edge_iterator> BGL_RANGE(__LINE__) = out_edges(UNAME, GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ +for (typename boost::graph_traits::edge_descriptor ENAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (ENAME = *BGL_FIRST(__LINE__), true) : false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_OUTEDGES(UNAME, ENAME, GNAME, GraphType) \ +for (std::pair::out_edge_iterator, \ + boost::graph_traits::out_edge_iterator> BGL_RANGE(__LINE__) = out_edges(UNAME, GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ +for (boost::graph_traits::edge_descriptor ENAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (ENAME = *BGL_FIRST(__LINE__), true) : false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_INEDGES_T(UNAME, ENAME, GNAME, GraphType) \ +for (std::pair::in_edge_iterator, \ + typename boost::graph_traits::in_edge_iterator> BGL_RANGE(__LINE__) = in_edges(UNAME, GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ +for (typename boost::graph_traits::edge_descriptor ENAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (ENAME = *BGL_FIRST(__LINE__), true) : false; \ + ++BGL_FIRST(__LINE__)) + +#define BGL_FORALL_INEDGES(UNAME, ENAME, GNAME, GraphType) \ +for (std::pair::in_edge_iterator, \ + boost::graph_traits::in_edge_iterator> BGL_RANGE(__LINE__) = in_edges(UNAME, GNAME); \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__); BGL_FIRST(__LINE__) = BGL_LAST(__LINE__)) \ +for (boost::graph_traits::edge_descriptor ENAME; \ + BGL_FIRST(__LINE__) != BGL_LAST(__LINE__) ? (ENAME = *BGL_FIRST(__LINE__), true) : false; \ + ++BGL_FIRST(__LINE__)) + +#endif // BOOST_GRAPH_ITERATION_MACROS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/iteration_macros_undef.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/iteration_macros_undef.hpp new file mode 100644 index 0000000000..0b3f4174df --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/iteration_macros_undef.hpp @@ -0,0 +1,22 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifdef BOOST_GRAPH_ITERATION_MACROS_HPP + +#undef BOOST_GRAPH_ITERATION_MACROS_HPP +#undef BGL_CAT +#undef BGL_FIRST +#undef BGL_LAST +#undef BGL_FORALL_VERTICES +#undef BGL_FORALL_EDGES +#undef BGL_FORALL_ADJACENT +#undef BGL_FORALL_OUTEDGES +#undef BGL_FORALL_INEDGES + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/johnson_all_pairs_shortest.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/johnson_all_pairs_shortest.hpp new file mode 100644 index 0000000000..8aec500594 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/johnson_all_pairs_shortest.hpp @@ -0,0 +1,204 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +/* + This file implements the function + + template + bool + johnson_all_pairs_shortest_paths + (VertexAndEdgeListGraph& g, + DistanceMatrix& D, + const bgl_named_params& params) + */ + +#ifndef BOOST_GRAPH_JOHNSON_HPP +#define BOOST_GRAPH_JOHNSON_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + bool + johnson_all_pairs_shortest_paths(VertexAndEdgeListGraph& g1, + DistanceMatrix& D, + VertexID id1, Weight w1, const BinaryPredicate& compare, + const BinaryFunction& combine, const Infinity& inf, + DistanceZero zero) + { + typedef graph_traits Traits1; + typedef typename property_traits::value_type DT; + function_requires< BasicMatrixConcept >(); + + typedef typename Traits1::directed_category DirCat; + bool is_undirected = is_same::value; + + typedef adjacency_list, + property< edge_weight_t, DT, + property< edge_weight2_t, DT > > > Graph2; + typedef graph_traits Traits2; + + Graph2 g2(num_vertices(g1) + 1); + typename property_map::type + w = get(edge_weight, g2); + typename property_map::type + w_hat = get(edge_weight2, g2); + typename property_map::type + d = get(vertex_distance, g2); + typedef typename property_map::type VertexID2; + VertexID2 id2 = get(vertex_index, g2); + + // Construct g2 where V[g2] = V[g1] U {s} + // and E[g2] = E[g1] U {(s,v)| v in V[g1]} + std::vector + verts1(num_vertices(g1) + 1); + typename Traits2::vertex_descriptor s = *vertices(g2).first; + { + typename Traits1::vertex_iterator v, v_end; + int i = 1; + for (boost::tie(v, v_end) = vertices(g1); v != v_end; ++v, ++i) { + typename Traits2::edge_descriptor e; bool z; + boost::tie(e, z) = add_edge(s, get(id1, *v) + 1, g2); + put(w, e, zero); + verts1[i] = *v; + } + typename Traits1::edge_iterator e, e_end; + for (boost::tie(e, e_end) = edges(g1); e != e_end; ++e) { + typename Traits2::edge_descriptor e2; bool z; + boost::tie(e2, z) = add_edge(get(id1, source(*e, g1)) + 1, + get(id1, target(*e, g1)) + 1, g2); + put(w, e2, get(w1, *e)); + if (is_undirected) { + boost::tie(e2, z) = add_edge(get(id1, target(*e, g1)) + 1, + get(id1, source(*e, g1)) + 1, g2); + put(w, e2, get(w1, *e)); + } + } + } + typename Traits2::vertex_iterator v, v_end, u, u_end; + typename Traits2::edge_iterator e, e_end; + shared_array_property_map h(num_vertices(g2), id2); + + for (boost::tie(v, v_end) = vertices(g2); v != v_end; ++v) + put(d, *v, inf); + + put(d, s, zero); + // Using the non-named parameter versions of bellman_ford and + // dijkstra for portability reasons. + dummy_property_map pred; bellman_visitor<> bvis; + if (bellman_ford_shortest_paths + (g2, num_vertices(g2), w, pred, d, combine, compare, bvis)) { + for (boost::tie(v, v_end) = vertices(g2); v != v_end; ++v) + put(h, *v, get(d, *v)); + // Reweight the edges to remove negatives + for (boost::tie(e, e_end) = edges(g2); e != e_end; ++e) { + typename Traits2::vertex_descriptor a = source(*e, g2), + b = target(*e, g2); + put(w_hat, *e, combine(get(w, *e), (get(h, a) - get(h, b)))); + } + for (boost::tie(u, u_end) = vertices(g2); u != u_end; ++u) { + dijkstra_visitor<> dvis; + dijkstra_shortest_paths + (g2, *u, pred, d, w_hat, id2, compare, combine, inf, zero,dvis); + for (boost::tie(v, v_end) = vertices(g2); v != v_end; ++v) { + if (*u != s && *v != s) { + typename Traits1::vertex_descriptor u1, v1; + u1 = verts1[get(id2, *u)]; v1 = verts1[get(id2, *v)]; + D[get(id2, *u)-1][get(id2, *v)-1] = combine(get(d, *v), (get(h, *v) - get(h, *u))); + } + } + } + return true; + } else + return false; + } + + template + bool + johnson_all_pairs_shortest_paths(VertexAndEdgeListGraph& g1, + DistanceMatrix& D, + VertexID id1, Weight w1, DistanceZero zero) + { + typedef typename property_traits::value_type WT; + return johnson_all_pairs_shortest_paths(g1, D, id1, w1, + std::less(), + closed_plus(), + (std::numeric_limits::max)(), + zero); + } + + namespace detail { + + template + bool + johnson_dispatch(VertexAndEdgeListGraph& g, + DistanceMatrix& D, + const bgl_named_params& params, + Weight w, VertexID id) + { + typedef typename property_traits::value_type WT; + + return johnson_all_pairs_shortest_paths + (g, D, id, w, + choose_param(get_param(params, distance_compare_t()), + std::less()), + choose_param(get_param(params, distance_combine_t()), + closed_plus()), + choose_param(get_param(params, distance_inf_t()), + std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION()), + choose_param(get_param(params, distance_zero_t()), WT()) ); + } + + } // namespace detail + + template + bool + johnson_all_pairs_shortest_paths + (VertexAndEdgeListGraph& g, + DistanceMatrix& D, + const bgl_named_params& params) + { + return detail::johnson_dispatch + (g, D, params, + choose_const_pmap(get_param(params, edge_weight), g, edge_weight), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index) + ); + } + + template + bool + johnson_all_pairs_shortest_paths + (VertexAndEdgeListGraph& g, DistanceMatrix& D) + { + bgl_named_params params(1); + return detail::johnson_dispatch + (g, D, params, get(edge_weight, g), get(vertex_index, g)); + } + +} // namespace boost + +#endif // BOOST_GRAPH_JOHNSON_HPP + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/kamada_kawai_spring_layout.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/kamada_kawai_spring_layout.hpp new file mode 100644 index 0000000000..0262e1fc28 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/kamada_kawai_spring_layout.hpp @@ -0,0 +1,605 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_KAMADA_KAWAI_SPRING_LAYOUT_HPP +#define BOOST_GRAPH_KAMADA_KAWAI_SPRING_LAYOUT_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace detail { namespace graph { + /** + * Denotes an edge or display area side length used to scale a + * Kamada-Kawai drawing. + */ + template + struct edge_or_side + { + explicit edge_or_side(T value) : value(value) {} + + T value; + }; + + /** + * Compute the edge length from an edge length. This is trivial. + */ + template + T compute_edge_length(const Graph&, DistanceMap, IndexMap, + edge_or_side length) + { return length.value; } + + /** + * Compute the edge length based on the display area side + length. We do this by dividing the side length by the largest + shortest distance between any two vertices in the graph. + */ + template + T + compute_edge_length(const Graph& g, DistanceMap distance, IndexMap index, + edge_or_side length) + { + T result(0); + + typedef typename graph_traits::vertex_iterator vertex_iterator; + + for (vertex_iterator ui = vertices(g).first, end = vertices(g).second; + ui != end; ++ui) { + vertex_iterator vi = ui; + for (++vi; vi != end; ++vi) { + T dij = distance[get(index, *ui)][get(index, *vi)]; + if (dij > result) result = dij; + } + } + return length.value / result; + } + + /** + * Dense linear solver for fixed-size matrices. + */ + template + struct linear_solver { + // Indices in mat are (row, column) + // template + // static Vec solve(double mat[Size][Size], Vec rhs); + }; + + template <> + struct linear_solver<1> { + template + static Vec solve(double mat[1][1], Vec rhs) { + return rhs / mat[0][0]; + } + }; + + // These are from http://en.wikipedia.org/wiki/Cramer%27s_rule + template <> + struct linear_solver<2> { + template + static Vec solve(double mat[2][2], Vec rhs) { + double denom = mat[0][0] * mat[1][1] - mat[1][0] * mat[0][1]; + double x_num = rhs[0] * mat[1][1] - rhs[1] * mat[0][1]; + double y_num = mat[0][0] * rhs[1] - mat[1][0] * rhs[0] ; + Vec result; + result[0] = x_num / denom; + result[1] = y_num / denom; + return result; + } + }; + + template <> + struct linear_solver<3> { + template + static Vec solve(double mat[2][2], Vec rhs) { + double denom = mat[0][0] * (mat[1][1] * mat[2][2] - mat[2][1] * mat[1][2]) + - mat[1][0] * (mat[0][1] * mat[2][2] - mat[2][1] * mat[0][2]) + + mat[2][0] * (mat[0][1] * mat[1][2] - mat[1][1] * mat[0][2]); + double x_num = rhs[0] * (mat[1][1] * mat[2][2] - mat[2][1] * mat[1][2]) + - rhs[1] * (mat[0][1] * mat[2][2] - mat[2][1] * mat[0][2]) + + rhs[2] * (mat[0][1] * mat[1][2] - mat[1][1] * mat[0][2]); + double y_num = mat[0][0] * (rhs[1] * mat[2][2] - rhs[2] * mat[1][2]) + - mat[1][0] * (rhs[0] * mat[2][2] - rhs[2] * mat[0][2]) + + mat[2][0] * (rhs[0] * mat[1][2] - rhs[1] * mat[0][2]); + double z_num = mat[0][0] * (mat[1][1] * rhs[2] - mat[2][1] * rhs[1] ) + - mat[1][0] * (mat[0][1] * rhs[2] - mat[2][1] * rhs[0] ) + + mat[2][0] * (mat[0][1] * rhs[1] - mat[1][1] * rhs[0] ); + Vec result; + result[0] = x_num / denom; + result[1] = y_num / denom; + result[2] = z_num / denom; + return result; + } + }; + + /** + * Implementation of the Kamada-Kawai spring layout algorithm. + */ + template + struct kamada_kawai_spring_layout_impl + { + typedef typename property_traits::value_type weight_type; + typedef typename Topology::point_type Point; + typedef typename Topology::point_difference_type point_difference_type; + typedef point_difference_type deriv_type; + typedef typename graph_traits::vertex_iterator vertex_iterator; + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + + kamada_kawai_spring_layout_impl( + const Topology& topology, + const Graph& g, + PositionMap position, + WeightMap weight, + EdgeOrSideLength edge_or_side_length, + Done done, + weight_type spring_constant, + VertexIndexMap index, + DistanceMatrix distance, + SpringStrengthMatrix spring_strength, + PartialDerivativeMap partial_derivatives) + : topology(topology), g(g), position(position), weight(weight), + edge_or_side_length(edge_or_side_length), done(done), + spring_constant(spring_constant), index(index), distance(distance), + spring_strength(spring_strength), + partial_derivatives(partial_derivatives) {} + + // Compute contribution of vertex i to the first partial + // derivatives (dE/dx_m, dE/dy_m) (for vertex m) + deriv_type + compute_partial_derivative(vertex_descriptor m, vertex_descriptor i) + { +#ifndef BOOST_NO_STDC_NAMESPACE + using std::sqrt; +#endif // BOOST_NO_STDC_NAMESPACE + + deriv_type result; + if (i != m) { + point_difference_type diff = topology.difference(position[m], position[i]); + weight_type dist = topology.norm(diff); + result = spring_strength[get(index, m)][get(index, i)] + * (diff - distance[get(index, m)][get(index, i)]/dist*diff); + } + + return result; + } + + // Compute partial derivatives dE/dx_m and dE/dy_m + deriv_type + compute_partial_derivatives(vertex_descriptor m) + { +#ifndef BOOST_NO_STDC_NAMESPACE + using std::sqrt; +#endif // BOOST_NO_STDC_NAMESPACE + + deriv_type result; + + // TBD: looks like an accumulate to me + BGL_FORALL_VERTICES_T(i, g, Graph) { + deriv_type deriv = compute_partial_derivative(m, i); + result += deriv; + } + + return result; + } + + // The actual Kamada-Kawai spring layout algorithm implementation + bool run() + { +#ifndef BOOST_NO_STDC_NAMESPACE + using std::sqrt; +#endif // BOOST_NO_STDC_NAMESPACE + + // Compute d_{ij} and place it in the distance matrix + if (!johnson_all_pairs_shortest_paths(g, distance, index, weight, + weight_type(0))) + return false; + + // Compute L based on side length (if needed), or retrieve L + weight_type edge_length = + detail::graph::compute_edge_length(g, distance, index, + edge_or_side_length); + + // Compute l_{ij} and k_{ij} + const weight_type K = spring_constant; + vertex_iterator ui, end = vertices(g).second; + for (ui = vertices(g).first; ui != end; ++ui) { + vertex_iterator vi = ui; + for (++vi; vi != end; ++vi) { + weight_type dij = distance[get(index, *ui)][get(index, *vi)]; + if (dij == (std::numeric_limits::max)()) + return false; + distance[get(index, *ui)][get(index, *vi)] = edge_length * dij; + distance[get(index, *vi)][get(index, *ui)] = edge_length * dij; + spring_strength[get(index, *ui)][get(index, *vi)] = K/(dij*dij); + spring_strength[get(index, *vi)][get(index, *ui)] = K/(dij*dij); + } + } + + // Compute Delta_i and find max + vertex_descriptor p = *vertices(g).first; + weight_type delta_p(0); + + for (ui = vertices(g).first; ui != end; ++ui) { + deriv_type deriv = compute_partial_derivatives(*ui); + put(partial_derivatives, *ui, deriv); + + weight_type delta = topology.norm(deriv); + + if (delta > delta_p) { + p = *ui; + delta_p = delta; + } + } + + while (!done(delta_p, p, g, true)) { + // The contribution p makes to the partial derivatives of + // each vertex. Computing this (at O(n) cost) allows us to + // update the delta_i values in O(n) time instead of O(n^2) + // time. + std::vector p_partials(num_vertices(g)); + for (ui = vertices(g).first; ui != end; ++ui) { + vertex_descriptor i = *ui; + p_partials[get(index, i)] = compute_partial_derivative(i, p); + } + + do { + // Compute the elements of the Jacobian + // From + // http://www.cs.panam.edu/~rfowler/papers/1994_kumar_fowler_A_Spring_UTPACSTR.pdf + // with the bugs fixed in the off-diagonal case + weight_type dE_d_d[Point::dimensions][Point::dimensions]; + for (std::size_t i = 0; i < Point::dimensions; ++i) + for (std::size_t j = 0; j < Point::dimensions; ++j) + dE_d_d[i][j] = 0.; + for (ui = vertices(g).first; ui != end; ++ui) { + vertex_descriptor i = *ui; + if (i != p) { + point_difference_type diff = topology.difference(position[p], position[i]); + weight_type dist = topology.norm(diff); + weight_type dist_squared = dist * dist; + weight_type inv_dist_cubed = 1. / (dist_squared * dist); + weight_type k_mi = spring_strength[get(index,p)][get(index,i)]; + weight_type l_mi = distance[get(index, p)][get(index, i)]; + for (std::size_t i = 0; i < Point::dimensions; ++i) { + for (std::size_t j = 0; j < Point::dimensions; ++j) { + if (i == j) { + dE_d_d[i][i] += k_mi * (1 + (l_mi * (diff[i] * diff[i] - dist_squared) * inv_dist_cubed)); + } else { + dE_d_d[i][j] += k_mi * l_mi * diff[i] * diff[j] * inv_dist_cubed; + } + } + } + } + } + + deriv_type dE_d = get(partial_derivatives, p); + + // Solve dE_d_d * delta = dE_d to get delta + point_difference_type delta = -linear_solver::solve(dE_d_d, dE_d); + + // Move p by delta + position[p] = topology.adjust(position[p], delta); + + // Recompute partial derivatives and delta_p + deriv_type deriv = compute_partial_derivatives(p); + put(partial_derivatives, p, deriv); + + delta_p = topology.norm(deriv); + } while (!done(delta_p, p, g, false)); + + // Select new p by updating each partial derivative and delta + vertex_descriptor old_p = p; + for (ui = vertices(g).first; ui != end; ++ui) { + deriv_type old_deriv_p = p_partials[get(index, *ui)]; + deriv_type old_p_partial = + compute_partial_derivative(*ui, old_p); + deriv_type deriv = get(partial_derivatives, *ui); + + deriv += old_p_partial - old_deriv_p; + + put(partial_derivatives, *ui, deriv); + weight_type delta = topology.norm(deriv); + + if (delta > delta_p) { + p = *ui; + delta_p = delta; + } + } + } + + return true; + } + + const Topology& topology; + const Graph& g; + PositionMap position; + WeightMap weight; + EdgeOrSideLength edge_or_side_length; + Done done; + weight_type spring_constant; + VertexIndexMap index; + DistanceMatrix distance; + SpringStrengthMatrix spring_strength; + PartialDerivativeMap partial_derivatives; + }; + } } // end namespace detail::graph + + /// States that the given quantity is an edge length. + template + inline detail::graph::edge_or_side + edge_length(T x) + { return detail::graph::edge_or_side(x); } + + /// States that the given quantity is a display area side length. + template + inline detail::graph::edge_or_side + side_length(T x) + { return detail::graph::edge_or_side(x); } + + /** + * \brief Determines when to terminate layout of a particular graph based + * on a given relative tolerance. + */ + template + struct layout_tolerance + { + layout_tolerance(const T& tolerance = T(0.001)) + : tolerance(tolerance), last_energy((std::numeric_limits::max)()), + last_local_energy((std::numeric_limits::max)()) { } + + template + bool + operator()(T delta_p, + typename boost::graph_traits::vertex_descriptor p, + const Graph& g, + bool global) + { + if (global) { + if (last_energy == (std::numeric_limits::max)()) { + last_energy = delta_p; + return false; + } + + T diff = last_energy - delta_p; + if (diff < T(0)) diff = -diff; + bool done = (delta_p == T(0) || diff / last_energy < tolerance); + last_energy = delta_p; + return done; + } else { + if (last_local_energy == (std::numeric_limits::max)()) { + last_local_energy = delta_p; + return delta_p == T(0); + } + + T diff = last_local_energy - delta_p; + bool done = (delta_p == T(0) || (diff / last_local_energy) < tolerance); + last_local_energy = delta_p; + return done; + } + } + + private: + T tolerance; + T last_energy; + T last_local_energy; + }; + + /** \brief Kamada-Kawai spring layout for undirected graphs. + * + * This algorithm performs graph layout (in two dimensions) for + * connected, undirected graphs. It operates by relating the layout + * of graphs to a dynamic spring system and minimizing the energy + * within that system. The strength of a spring between two vertices + * is inversely proportional to the square of the shortest distance + * (in graph terms) between those two vertices. Essentially, + * vertices that are closer in the graph-theoretic sense (i.e., by + * following edges) will have stronger springs and will therefore be + * placed closer together. + * + * Prior to invoking this algorithm, it is recommended that the + * vertices be placed along the vertices of a regular n-sided + * polygon. + * + * \param g (IN) must be a model of Vertex List Graph, Edge List + * Graph, and Incidence Graph and must be undirected. + * + * \param position (OUT) must be a model of Lvalue Property Map, + * where the value type is a class containing fields @c x and @c y + * that will be set to the @c x and @c y coordinates of each vertex. + * + * \param weight (IN) must be a model of Readable Property Map, + * which provides the weight of each edge in the graph @p g. + * + * \param topology (IN) must be a topology object (see topology.hpp), + * which provides operations on points and differences between them. + * + * \param edge_or_side_length (IN) provides either the unit length + * @c e of an edge in the layout or the length of a side @c s of the + * display area, and must be either @c boost::edge_length(e) or @c + * boost::side_length(s), respectively. + * + * \param done (IN) is a 4-argument function object that is passed + * the current value of delta_p (i.e., the energy of vertex @p p), + * the vertex @p p, the graph @p g, and a boolean flag indicating + * whether @p delta_p is the maximum energy in the system (when @c + * true) or the energy of the vertex being moved. Defaults to @c + * layout_tolerance instantiated over the value type of the weight + * map. + * + * \param spring_constant (IN) is the constant multiplied by each + * spring's strength. Larger values create systems with more energy + * that can take longer to stabilize; smaller values create systems + * with less energy that stabilize quickly but do not necessarily + * result in pleasing layouts. The default value is 1. + * + * \param index (IN) is a mapping from vertices to index values + * between 0 and @c num_vertices(g). The default is @c + * get(vertex_index,g). + * + * \param distance (UTIL/OUT) will be used to store the distance + * from every vertex to every other vertex, which is computed in the + * first stages of the algorithm. This value's type must be a model + * of BasicMatrix with value type equal to the value type of the + * weight map. The default is a a vector of vectors. + * + * \param spring_strength (UTIL/OUT) will be used to store the + * strength of the spring between every pair of vertices. This + * value's type must be a model of BasicMatrix with value type equal + * to the value type of the weight map. The default is a a vector of + * vectors. + * + * \param partial_derivatives (UTIL) will be used to store the + * partial derivates of each vertex with respect to the @c x and @c + * y coordinates. This must be a Read/Write Property Map whose value + * type is a pair with both types equivalent to the value type of + * the weight map. The default is an iterator property map. + * + * \returns @c true if layout was successful or @c false if a + * negative weight cycle was detected. + */ + template + bool + kamada_kawai_spring_layout( + const Graph& g, + PositionMap position, + WeightMap weight, + const Topology& topology, + detail::graph::edge_or_side edge_or_side_length, + Done done, + typename property_traits::value_type spring_constant, + VertexIndexMap index, + DistanceMatrix distance, + SpringStrengthMatrix spring_strength, + PartialDerivativeMap partial_derivatives) + { + BOOST_STATIC_ASSERT((is_convertible< + typename graph_traits::directed_category*, + undirected_tag* + >::value)); + + detail::graph::kamada_kawai_spring_layout_impl< + Topology, Graph, PositionMap, WeightMap, + detail::graph::edge_or_side, Done, VertexIndexMap, + DistanceMatrix, SpringStrengthMatrix, PartialDerivativeMap> + alg(topology, g, position, weight, edge_or_side_length, done, spring_constant, + index, distance, spring_strength, partial_derivatives); + return alg.run(); + } + + /** + * \overload + */ + template + bool + kamada_kawai_spring_layout( + const Graph& g, + PositionMap position, + WeightMap weight, + const Topology& topology, + detail::graph::edge_or_side edge_or_side_length, + Done done, + typename property_traits::value_type spring_constant, + VertexIndexMap index) + { + typedef typename property_traits::value_type weight_type; + + typename graph_traits::vertices_size_type n = num_vertices(g); + typedef std::vector weight_vec; + + std::vector distance(n, weight_vec(n)); + std::vector spring_strength(n, weight_vec(n)); + std::vector partial_derivatives(n); + + return + kamada_kawai_spring_layout( + g, position, weight, topology, edge_or_side_length, done, spring_constant, index, + distance.begin(), + spring_strength.begin(), + make_iterator_property_map(partial_derivatives.begin(), index, + typename Topology::point_difference_type())); + } + + /** + * \overload + */ + template + bool + kamada_kawai_spring_layout( + const Graph& g, + PositionMap position, + WeightMap weight, + const Topology& topology, + detail::graph::edge_or_side edge_or_side_length, + Done done, + typename property_traits::value_type spring_constant) + { + return kamada_kawai_spring_layout(g, position, weight, topology, edge_or_side_length, + done, spring_constant, + get(vertex_index, g)); + } + + /** + * \overload + */ + template + bool + kamada_kawai_spring_layout( + const Graph& g, + PositionMap position, + WeightMap weight, + const Topology& topology, + detail::graph::edge_or_side edge_or_side_length, + Done done) + { + typedef typename property_traits::value_type weight_type; + return kamada_kawai_spring_layout(g, position, weight, topology, edge_or_side_length, + done, weight_type(1)); + } + + /** + * \overload + */ + template + bool + kamada_kawai_spring_layout( + const Graph& g, + PositionMap position, + WeightMap weight, + const Topology& topology, + detail::graph::edge_or_side edge_or_side_length) + { + typedef typename property_traits::value_type weight_type; + return kamada_kawai_spring_layout(g, position, weight, topology, edge_or_side_length, + layout_tolerance(), + weight_type(1.0), + get(vertex_index, g)); + } +} // end namespace boost + +#endif // BOOST_GRAPH_KAMADA_KAWAI_SPRING_LAYOUT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/king_ordering.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/king_ordering.hpp new file mode 100644 index 0000000000..9d9a438f3b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/king_ordering.hpp @@ -0,0 +1,321 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2004, 2005 Trustees of Indiana University +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, +// Doug Gregor, D. Kevin McGrath +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//=======================================================================// +#ifndef BOOST_GRAPH_KING_HPP +#define BOOST_GRAPH_KING_HPP + +#include +#include +#include + +/* + King Algorithm for matrix reordering +*/ + +namespace boost { + namespace detail { + template + class bfs_king_visitor:public default_bfs_visitor + { + public: + bfs_king_visitor(OutputIterator *iter, Buffer *b, Compare compare, + PseudoDegreeMap deg, std::vector loc, VecMap color, + VertexIndexMap vertices): + permutation(iter), Qptr(b), degree(deg), comp(compare), + Qlocation(loc), colors(color), vertex_map(vertices) { } + + template + void finish_vertex(Vertex, Graph& g) { + typename graph_traits::out_edge_iterator ei, ei_end; + Vertex v, w; + + typedef typename std::deque::iterator iterator; + typedef typename std::deque::reverse_iterator reverse_iterator; + + reverse_iterator rend = Qptr->rend()-index_begin; + reverse_iterator rbegin = Qptr->rbegin(); + + + //heap the vertices already there + std::make_heap(rbegin, rend, boost::bind(comp, _2, _1)); + + unsigned i = 0; + + for(i = index_begin; i != Qptr->size(); ++i){ + colors[get(vertex_map, (*Qptr)[i])] = 1; + Qlocation[get(vertex_map, (*Qptr)[i])] = i; + } + + i = 0; + + for( ; rbegin != rend; rend--){ + percolate_down(i); + w = (*Qptr)[index_begin+i]; + for (boost::tie(ei, ei_end) = out_edges(w, g); ei != ei_end; ++ei) { + v = target(*ei, g); + put(degree, v, get(degree, v) - 1); + + if (colors[get(vertex_map, v)] == 1) { + percolate_up(get(vertex_map, v), i); + } + } + + colors[get(vertex_map, w)] = 0; + i++; + } + } + + template + void examine_vertex(Vertex u, const Graph&) { + + *(*permutation)++ = u; + index_begin = Qptr->size(); + + } + protected: + + + //this function replaces pop_heap, and tracks state information + template + void percolate_down(int offset){ + typedef typename std::deque::reverse_iterator reverse_iterator; + + int heap_last = index_begin + offset; + int heap_first = Qptr->size() - 1; + + //pop_heap functionality: + //swap first, last + std::swap((*Qptr)[heap_last], (*Qptr)[heap_first]); + + //swap in the location queue + std::swap(Qlocation[heap_first], Qlocation[heap_last]); + + //set drifter, children + int drifter = heap_first; + int drifter_heap = Qptr->size() - drifter; + + int right_child_heap = drifter_heap * 2 + 1; + int right_child = Qptr->size() - right_child_heap; + + int left_child_heap = drifter_heap * 2; + int left_child = Qptr->size() - left_child_heap; + + //check that we are staying in the heap + bool valid = (right_child < heap_last) ? false : true; + + //pick smallest child of drifter, and keep in mind there might only be left child + int smallest_child = (valid && get(degree, (*Qptr)[left_child]) > get(degree,(*Qptr)[right_child])) ? + right_child : left_child; + + while(valid && smallest_child < heap_last && comp((*Qptr)[drifter], (*Qptr)[smallest_child])){ + + //if smallest child smaller than drifter, swap them + std::swap((*Qptr)[smallest_child], (*Qptr)[drifter]); + std::swap(Qlocation[drifter], Qlocation[smallest_child]); + + //update the values, run again, as necessary + drifter = smallest_child; + drifter_heap = Qptr->size() - drifter; + + right_child_heap = drifter_heap * 2 + 1; + right_child = Qptr->size() - right_child_heap; + + left_child_heap = drifter_heap * 2; + left_child = Qptr->size() - left_child_heap; + + valid = (right_child < heap_last) ? false : true; + + smallest_child = (valid && get(degree, (*Qptr)[left_child]) > get(degree,(*Qptr)[right_child])) ? + right_child : left_child; + } + + } + + + + // this is like percolate down, but we always compare against the + // parent, as there is only a single choice + template + void percolate_up(int vertex, int offset){ + + int child_location = Qlocation[vertex]; + int heap_child_location = Qptr->size() - child_location; + int heap_parent_location = (int)(heap_child_location/2); + unsigned parent_location = Qptr->size() - heap_parent_location; + + bool valid = (heap_parent_location != 0 && child_location > index_begin + offset && + parent_location < Qptr->size()); + + while(valid && comp((*Qptr)[child_location], (*Qptr)[parent_location])){ + + //swap in the heap + std::swap((*Qptr)[child_location], (*Qptr)[parent_location]); + + //swap in the location queue + std::swap(Qlocation[child_location], Qlocation[parent_location]); + + child_location = parent_location; + heap_child_location = heap_parent_location; + heap_parent_location = (int)(heap_child_location/2); + parent_location = Qptr->size() - heap_parent_location; + valid = (heap_parent_location != 0 && child_location > index_begin + offset); + } + } + + OutputIterator *permutation; + int index_begin; + Buffer *Qptr; + PseudoDegreeMap degree; + Compare comp; + std::vector Qlocation; + VecMap colors; + VertexIndexMap vertex_map; + }; + + + } // namespace detail + + + template + OutputIterator + king_ordering(const Graph& g, + std::deque< typename graph_traits::vertex_descriptor > + vertex_queue, + OutputIterator permutation, + ColorMap color, DegreeMap degree, + VertexIndexMap index_map) + { + typedef typename property_traits::value_type ds_type; + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef iterator_property_map::iterator, VertexIndexMap, ds_type, ds_type&> PseudoDegreeMap; + typedef indirect_cmp > Compare; + typedef typename boost::sparse::sparse_ordering_queue queue; + typedef typename detail::bfs_king_visitor, VertexIndexMap > Visitor; + typedef typename graph_traits::vertices_size_type + vertices_size_type; + std::vector pseudo_degree_vec(num_vertices(g)); + PseudoDegreeMap pseudo_degree(pseudo_degree_vec.begin(), index_map); + + typename graph_traits::vertex_iterator ui, ui_end; + queue Q; + // Copy degree to pseudo_degree + // initialize the color map + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui){ + put(pseudo_degree, *ui, get(degree, *ui)); + put(color, *ui, Color::white()); + } + + Compare comp(pseudo_degree); + std::vector colors(num_vertices(g)); + + for(vertices_size_type i = 0; i < num_vertices(g); i++) + colors[i] = 0; + + std::vector loc(num_vertices(g)); + + //create the visitor + Visitor vis(&permutation, &Q, comp, pseudo_degree, loc, colors, index_map); + + while( !vertex_queue.empty() ) { + Vertex s = vertex_queue.front(); + vertex_queue.pop_front(); + + //call BFS with visitor + breadth_first_visit(g, s, Q, vis, color); + } + + return permutation; + } + + + // This is the case where only a single starting vertex is supplied. + template + OutputIterator + king_ordering(const Graph& g, + typename graph_traits::vertex_descriptor s, + OutputIterator permutation, + ColorMap color, DegreeMap degree, VertexIndexMap index_map) + { + + std::deque< typename graph_traits::vertex_descriptor > vertex_queue; + vertex_queue.push_front( s ); + return king_ordering(g, vertex_queue, permutation, color, degree, + index_map); + } + + + template < class Graph, class OutputIterator, + class ColorMap, class DegreeMap, class VertexIndexMap> + OutputIterator + king_ordering(const Graph& G, OutputIterator permutation, + ColorMap color, DegreeMap degree, VertexIndexMap index_map) + { + if (has_no_vertices(G)) + return permutation; + + typedef typename boost::graph_traits::vertex_descriptor Vertex; + typedef typename boost::graph_traits::vertex_iterator VerIter; + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + + std::deque vertex_queue; + + // Mark everything white + BGL_FORALL_VERTICES_T(v, G, Graph) put(color, v, Color::white()); + + // Find one vertex from each connected component + BGL_FORALL_VERTICES_T(v, G, Graph) { + if (get(color, v) == Color::white()) { + depth_first_visit(G, v, dfs_visitor<>(), color); + vertex_queue.push_back(v); + } + } + + // Find starting nodes for all vertices + // TBD: How to do this with a directed graph? + for (typename std::deque::iterator i = vertex_queue.begin(); + i != vertex_queue.end(); ++i) + *i = find_starting_node(G, *i, color, degree); + + return king_ordering(G, vertex_queue, permutation, color, degree, + index_map); + } + + template + OutputIterator + king_ordering(const Graph& G, OutputIterator permutation, + VertexIndexMap index_map) + { + if (has_no_vertices(G)) + return permutation; + + typedef out_degree_property_map DegreeMap; + std::vector colors(num_vertices(G)); + return king_ordering(G, permutation, + make_iterator_property_map(&colors[0], index_map, + colors[0]), + make_out_degree_map(G), index_map); + } + + template + inline OutputIterator + king_ordering(const Graph& G, OutputIterator permutation) + { return king_ordering(G, permutation, get(vertex_index, G)); } + +} // namespace boost + + +#endif // BOOST_GRAPH_KING_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/kolmogorov_max_flow.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/kolmogorov_max_flow.hpp new file mode 100644 index 0000000000..c2b94c0943 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/kolmogorov_max_flow.hpp @@ -0,0 +1,814 @@ +// Copyright (c) 2006, Stephan Diederich +// +// This code may be used under either of the following two licences: +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. OF SUCH DAMAGE. +// +// Or: +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_KOLMOGOROV_MAX_FLOW_HPP +#define BOOST_KOLMOGOROV_MAX_FLOW_HPP + +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) +# pragma message ("The kolmogorov_max_flow.hpp header is deprecated and will be removed in Boost 1.46. Use boykov_kolmogorov_max_flow.hpp instead.") +#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) +# warning "The kolmogorov_max_flow.hpp header is deprecated and will be removed in Boost 1.46. Use boykov_kolmogorov_max_flow.hpp instead." +#endif + +#include +#include +#include +#include +#include +#include +#include // for std::min and std::max + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + namespace detail { + + template + class kolmogorov{ + typedef typename property_traits::value_type tEdgeVal; + typedef graph_traits tGraphTraits; + typedef typename tGraphTraits::vertex_iterator vertex_iterator; + typedef typename tGraphTraits::vertex_descriptor vertex_descriptor; + typedef typename tGraphTraits::edge_descriptor edge_descriptor; + typedef typename tGraphTraits::edge_iterator edge_iterator; + typedef typename tGraphTraits::out_edge_iterator out_edge_iterator; + typedef boost::queue tQueue; //queue of vertices, used in adoption-stage + typedef typename property_traits::value_type tColorValue; + typedef color_traits tColorTraits; + typedef typename property_traits::value_type tDistanceVal; + + public: + kolmogorov(Graph& g, + EdgeCapacityMap cap, + ResidualCapacityEdgeMap res, + ReverseEdgeMap rev, + PredecessorMap pre, + ColorMap color, + DistanceMap dist, + IndexMap idx, + vertex_descriptor src, + vertex_descriptor sink): + m_g(g), + m_index_map(idx), + m_cap_map(cap), + m_res_cap_map(res), + m_rev_edge_map(rev), + m_pre_map(pre), + m_tree_map(color), + m_dist_map(dist), + m_source(src), + m_sink(sink), + m_active_nodes(), + m_in_active_list_vec(num_vertices(g), false), + m_in_active_list_map(make_iterator_property_map(m_in_active_list_vec.begin(), m_index_map)), + m_has_parent_vec(num_vertices(g), false), + m_has_parent_map(make_iterator_property_map(m_has_parent_vec.begin(), m_index_map)), + m_time_vec(num_vertices(g), 0), + m_time_map(make_iterator_property_map(m_time_vec.begin(), m_index_map)), + m_flow(0), + m_time(1), + m_last_grow_vertex(graph_traits::null_vertex()){ + // initialize the color-map with gray-values + vertex_iterator vi, v_end; + for(boost::tie(vi, v_end) = vertices(m_g); vi != v_end; ++vi){ + set_tree(*vi, tColorTraits::gray()); + } + // Initialize flow to zero which means initializing + // the residual capacity equal to the capacity + edge_iterator ei, e_end; + for(boost::tie(ei, e_end) = edges(m_g); ei != e_end; ++ei) { + m_res_cap_map[*ei] = m_cap_map[*ei]; + assert(m_rev_edge_map[m_rev_edge_map[*ei]] == *ei); //check if the reverse edge map is build up properly + } + //init the search trees with the two terminals + set_tree(m_source, tColorTraits::black()); + set_tree(m_sink, tColorTraits::white()); + m_time_map[m_source] = 1; + m_time_map[m_sink] = 1; + } + + ~kolmogorov(){} + + tEdgeVal max_flow(){ + //augment direct paths from SOURCE->SINK and SOURCE->VERTEX->SINK + augment_direct_paths(); + //start the main-loop + while(true){ + bool path_found; + edge_descriptor connecting_edge; + boost::tie(connecting_edge, path_found) = grow(); //find a path from source to sink + if(!path_found){ + //we're finished, no more paths were found + break; + } + ++m_time; + augment(connecting_edge); //augment that path + adopt(); //rebuild search tree structure + } + return m_flow; + } + + //the complete class is protected, as we want access to members in derived test-class (see $(BOOST_ROOT)/libs/graph/test/kolmogorov_max_flow_test.cpp) + protected: + void augment_direct_paths(){ + //in a first step, we augment all direct paths from source->NODE->sink + //and additionally paths from source->sink + //this improves especially graphcuts for segmentation, as most of the nodes have source/sink connects + //but shouldn't have an impact on other maxflow problems (this is done in grow() anyway) + out_edge_iterator ei, e_end; + for(boost::tie(ei, e_end) = out_edges(m_source, m_g); ei != e_end; ++ei){ + edge_descriptor from_source = *ei; + vertex_descriptor current_node = target(from_source, m_g); + if(current_node == m_sink){ + tEdgeVal cap = m_res_cap_map[from_source]; + m_res_cap_map[from_source] = 0; + m_flow += cap; + continue; + } + edge_descriptor to_sink; + bool is_there; + boost::tie(to_sink, is_there) = lookup_edge(current_node, m_sink, m_g); + if(is_there){ + tEdgeVal cap_from_source = m_res_cap_map[from_source]; + tEdgeVal cap_to_sink = m_res_cap_map[to_sink]; + if(cap_from_source > cap_to_sink){ + set_tree(current_node, tColorTraits::black()); + add_active_node(current_node); + set_edge_to_parent(current_node, from_source); + m_dist_map[current_node] = 1; + m_time_map[current_node] = 1; + //add stuff to flow and update residuals + //we dont need to update reverse_edges, as incoming/outgoing edges to/from source/sink don't count for max-flow + m_res_cap_map[from_source] -= cap_to_sink; + m_res_cap_map[to_sink] = 0; + m_flow += cap_to_sink; + } else if(cap_to_sink > 0){ + set_tree(current_node, tColorTraits::white()); + add_active_node(current_node); + set_edge_to_parent(current_node, to_sink); + m_dist_map[current_node] = 1; + m_time_map[current_node] = 1; + //add stuff to flow and update residuals + //we dont need to update reverse_edges, as incoming/outgoing edges to/from source/sink don't count for max-flow + m_res_cap_map[to_sink] -= cap_from_source; + m_res_cap_map[from_source] = 0; + m_flow += cap_from_source; + } + } else if(m_res_cap_map[from_source]){ + //there is no sink connect, so we can't augment this path + //but to avoid adding m_source to the active nodes, we just activate this node and set the approciate things + set_tree(current_node, tColorTraits::black()); + set_edge_to_parent(current_node, from_source); + m_dist_map[current_node] = 1; + m_time_map[current_node] = 1; + add_active_node(current_node); + } + } + for(boost::tie(ei, e_end) = out_edges(m_sink, m_g); ei != e_end; ++ei){ + edge_descriptor to_sink = m_rev_edge_map[*ei]; + vertex_descriptor current_node = source(to_sink, m_g); + if(m_res_cap_map[to_sink]){ + set_tree(current_node, tColorTraits::white()); + set_edge_to_parent(current_node, to_sink); + m_dist_map[current_node] = 1; + m_time_map[current_node] = 1; + add_active_node(current_node); + } + } + } + + /** + * returns a pair of an edge and a boolean. if the bool is true, the edge is a connection of a found path from s->t , read "the link" and + * source(returnVal, m_g) is the end of the path found in the source-tree + * target(returnVal, m_g) is the beginning of the path found in the sink-tree + */ + std::pair grow(){ + assert(m_orphans.empty()); + vertex_descriptor current_node; + while((current_node = get_next_active_node()) != graph_traits::null_vertex()){ //if there is one + assert(get_tree(current_node) != tColorTraits::gray() && (has_parent(current_node) || current_node==m_source || current_node==m_sink)); + if(get_tree(current_node) == tColorTraits::black()){ + //source tree growing + out_edge_iterator ei, e_end; + if(current_node != m_last_grow_vertex){ + m_last_grow_vertex = current_node; + boost::tie(m_last_grow_edge_it, m_last_grow_edge_end) = out_edges(current_node, m_g); + } + for(; m_last_grow_edge_it != m_last_grow_edge_end; ++m_last_grow_edge_it){ + edge_descriptor out_edge = *m_last_grow_edge_it; + if(m_res_cap_map[out_edge] > 0){ //check if we have capacity left on this edge + vertex_descriptor other_node = target(out_edge, m_g); + if(get_tree(other_node) == tColorTraits::gray()){ //it's a free node + set_tree(other_node, tColorTraits::black()); //aquire other node to our search tree + set_edge_to_parent(other_node, out_edge); //set us as parent + m_dist_map[other_node] = m_dist_map[current_node] + 1; //and update the distance-heuristic + m_time_map[other_node] = m_time_map[current_node]; + add_active_node(other_node); + } else if(get_tree(other_node) == tColorTraits::black()){ + if(is_closer_to_terminal(current_node, other_node)){ //we do this to get shorter paths. check if we are nearer to the source as its parent is + set_edge_to_parent(other_node, out_edge); + m_dist_map[other_node] = m_dist_map[current_node] + 1; + m_time_map[other_node] = m_time_map[current_node]; + } + } else{ + assert(get_tree(other_node)==tColorTraits::white()); + //kewl, found a path from one to the other search tree, return the connecting edge in src->sink dir + return std::make_pair(out_edge, true); + } + } + } //for all out-edges + } //source-tree-growing + else{ + assert(get_tree(current_node) == tColorTraits::white()); + out_edge_iterator ei, e_end; + if(current_node != m_last_grow_vertex){ + m_last_grow_vertex = current_node; + boost::tie(m_last_grow_edge_it, m_last_grow_edge_end) = out_edges(current_node, m_g); + } + for(; m_last_grow_edge_it != m_last_grow_edge_end; ++m_last_grow_edge_it){ + edge_descriptor in_edge = m_rev_edge_map[*m_last_grow_edge_it]; + if(m_res_cap_map[in_edge] > 0){ //check if there is capacity left + vertex_descriptor other_node = source(in_edge, m_g); + if(get_tree(other_node) == tColorTraits::gray()){ //it's a free node + set_tree(other_node, tColorTraits::white()); //aquire that node to our search tree + set_edge_to_parent(other_node, in_edge); //set us as parent + add_active_node(other_node); //activate that node + m_dist_map[other_node] = m_dist_map[current_node] + 1; //set its distance + m_time_map[other_node] = m_time_map[current_node]; //and time + } else if(get_tree(other_node) == tColorTraits::white()){ + if(is_closer_to_terminal(current_node, other_node)){ + //we are closer to the sink than its parent is, so we "adopt" him + set_edge_to_parent(other_node, in_edge); + m_dist_map[other_node] = m_dist_map[current_node] + 1; + m_time_map[other_node] = m_time_map[current_node]; + } + } else{ + assert(get_tree(other_node)==tColorTraits::black()); + //kewl, found a path from one to the other search tree, return the connecting edge in src->sink dir + return std::make_pair(in_edge, true); + } + } + } //for all out-edges + } //sink-tree growing + //all edges of that node are processed, and no more paths were found. so remove if from the front of the active queue + finish_node(current_node); + } //while active_nodes not empty + return std::make_pair(edge_descriptor(), false); //no active nodes anymore and no path found, we're done + } + + /** + * augments path from s->t and updates residual graph + * source(e, m_g) is the end of the path found in the source-tree + * target(e, m_g) is the beginning of the path found in the sink-tree + * this phase generates orphans on satured edges, if the attached verts are from different search-trees + * orphans are ordered in distance to sink/source. first the farest from the source are front_inserted into the orphans list, + * and after that the sink-tree-orphans are front_inserted. when going to adoption stage the orphans are popped_front, and so we process the nearest + * verts to the terminals first + */ + void augment(edge_descriptor e){ + assert(get_tree(target(e, m_g)) == tColorTraits::white()); + assert(get_tree(source(e, m_g)) == tColorTraits::black()); + assert(m_orphans.empty()); + + const tEdgeVal bottleneck = find_bottleneck(e); + //now we push the found flow through the path + //for each edge we saturate we have to look for the verts that belong to that edge, one of them becomes an orphans + //now process the connecting edge + m_res_cap_map[e] -= bottleneck; + assert(m_res_cap_map[e] >= 0); + m_res_cap_map[m_rev_edge_map[e]] += bottleneck; + + //now we follow the path back to the source + vertex_descriptor current_node = source(e, m_g); + while(current_node != m_source){ + edge_descriptor pred = get_edge_to_parent(current_node); + m_res_cap_map[pred] -= bottleneck; + assert(m_res_cap_map[pred] >= 0); + m_res_cap_map[m_rev_edge_map[pred]] += bottleneck; + if(m_res_cap_map[pred] == 0){ + set_no_parent(current_node); + m_orphans.push_front(current_node); + } + current_node = source(pred, m_g); + } + //then go forward in the sink-tree + current_node = target(e, m_g); + while(current_node != m_sink){ + edge_descriptor pred = get_edge_to_parent(current_node); + m_res_cap_map[pred] -= bottleneck; + assert(m_res_cap_map[pred] >= 0); + m_res_cap_map[m_rev_edge_map[pred]] += bottleneck; + if(m_res_cap_map[pred] == 0){ + set_no_parent(current_node); + m_orphans.push_front(current_node); + } + current_node = target(pred, m_g); + } + //and add it to the max-flow + m_flow += bottleneck; + } + + /** + * returns the bottleneck of a s->t path (end_of_path is last vertex in source-tree, begin_of_path is first vertex in sink-tree) + */ + inline tEdgeVal find_bottleneck(edge_descriptor e){ + BOOST_USING_STD_MIN(); + tEdgeVal minimum_cap = m_res_cap_map[e]; + vertex_descriptor current_node = source(e, m_g); + //first go back in the source tree + while(current_node != m_source){ + edge_descriptor pred = get_edge_to_parent(current_node); + minimum_cap = min BOOST_PREVENT_MACRO_SUBSTITUTION(minimum_cap, m_res_cap_map[pred]); + current_node = source(pred, m_g); + } + //then go forward in the sink-tree + current_node = target(e, m_g); + while(current_node != m_sink){ + edge_descriptor pred = get_edge_to_parent(current_node); + minimum_cap = min BOOST_PREVENT_MACRO_SUBSTITUTION(minimum_cap, m_res_cap_map[pred]); + current_node = target(pred, m_g); + } + return minimum_cap; + } + + /** + * rebuild search trees + * empty the queue of orphans, and find new parents for them or just drop them from the search trees + */ + void adopt(){ + while(!m_orphans.empty() || !m_child_orphans.empty()){ + vertex_descriptor current_node; + if(m_child_orphans.empty()){ + //get the next orphan from the main-queue and remove it + current_node = m_orphans.front(); + m_orphans.pop_front(); + } else{ + current_node = m_child_orphans.front(); + m_child_orphans.pop(); + } + if(get_tree(current_node) == tColorTraits::black()){ + //we're in the source-tree + tDistanceVal min_distance = (std::numeric_limits::max)(); + edge_descriptor new_parent_edge; + out_edge_iterator ei, e_end; + for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ + const edge_descriptor in_edge = m_rev_edge_map[*ei]; + assert(target(in_edge, m_g) == current_node); //we should be the target of this edge + if(m_res_cap_map[in_edge] > 0){ + vertex_descriptor other_node = source(in_edge, m_g); + if(get_tree(other_node) == tColorTraits::black() && has_source_connect(other_node)){ + if(m_dist_map[other_node] < min_distance){ + min_distance = m_dist_map[other_node]; + new_parent_edge = in_edge; + } + } + } + } + if(min_distance != (std::numeric_limits::max)()){ + set_edge_to_parent(current_node, new_parent_edge); + m_dist_map[current_node] = min_distance + 1; + m_time_map[current_node] = m_time; + } else{ + m_time_map[current_node] = 0; + for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ + edge_descriptor in_edge = m_rev_edge_map[*ei]; + vertex_descriptor other_node = source(in_edge, m_g); + if(get_tree(other_node) == tColorTraits::black() && has_parent(other_node)){ + if(m_res_cap_map[in_edge] > 0){ + add_active_node(other_node); + } + if(source(get_edge_to_parent(other_node), m_g) == current_node){ + //we are the parent of that node + //it has to find a new parent, too + set_no_parent(other_node); + m_child_orphans.push(other_node); + } + } + } + set_tree(current_node, tColorTraits::gray()); + } //no parent found + } //source-tree-adoption + else{ + //now we should be in the sink-tree, check that... + assert(get_tree(current_node) == tColorTraits::white()); + out_edge_iterator ei, e_end; + edge_descriptor new_parent_edge; + tDistanceVal min_distance = (std::numeric_limits::max)(); + for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ + const edge_descriptor out_edge = *ei; + if(m_res_cap_map[out_edge] > 0){ + const vertex_descriptor other_node = target(out_edge, m_g); + if(get_tree(other_node) == tColorTraits::white() && has_sink_connect(other_node)) + if(m_dist_map[other_node] < min_distance){ + min_distance = m_dist_map[other_node]; + new_parent_edge = out_edge; + } + } + } + if(min_distance != (std::numeric_limits::max)()){ + set_edge_to_parent(current_node, new_parent_edge); + m_dist_map[current_node] = min_distance + 1; + m_time_map[current_node] = m_time; + } else{ + m_time_map[current_node] = 0; + for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ + const edge_descriptor out_edge = *ei; + const vertex_descriptor other_node = target(out_edge, m_g); + if(get_tree(other_node) == tColorTraits::white() && has_parent(other_node)){ + if(m_res_cap_map[out_edge] > 0){ + add_active_node(other_node); + } + if(target(get_edge_to_parent(other_node), m_g) == current_node){ + //we were it's parent, so it has to find a new one, too + set_no_parent(other_node); + m_child_orphans.push(other_node); + } + } + } + set_tree(current_node, tColorTraits::gray()); + } //no parent found + } //sink-tree adoption + } //while !orphans.empty() + } //adopt + + /** + * return next active vertex if there is one, otherwise a null_vertex + */ + inline vertex_descriptor get_next_active_node(){ + while(true){ + if(m_active_nodes.empty()) + return graph_traits::null_vertex(); + vertex_descriptor v = m_active_nodes.front(); + + if(!has_parent(v) && v != m_source && v != m_sink){ //if it has no parent, this node can't be active(if its not source or sink) + m_active_nodes.pop(); + m_in_active_list_map[v] = false; + } else{ + assert(get_tree(v) == tColorTraits::black() || get_tree(v) == tColorTraits::white()); + return v; + } + } + } + + /** + * adds v as an active vertex, but only if its not in the list already + */ + inline void add_active_node(vertex_descriptor v){ + assert(get_tree(v) != tColorTraits::gray()); + if(m_in_active_list_map[v]){ + return; + } else{ + m_in_active_list_map[v] = true; + m_active_nodes.push(v); + } + } + + /** + * finish_node removes a node from the front of the active queue (its called in grow phase, if no more paths can be found using this node) + */ + inline void finish_node(vertex_descriptor v){ + assert(m_active_nodes.front() == v); + m_active_nodes.pop(); + m_in_active_list_map[v] = false; + m_last_grow_vertex = graph_traits::null_vertex(); + } + + /** + * removes a vertex from the queue of active nodes (actually this does nothing, + * but checks if this node has no parent edge, as this is the criteria for beeing no more active) + */ + inline void remove_active_node(vertex_descriptor v){ + assert(!has_parent(v)); + } + + /** + * returns the search tree of v; tColorValue::black() for source tree, white() for sink tree, gray() for no tree + */ + inline tColorValue get_tree(vertex_descriptor v) const { + return m_tree_map[v]; + } + + /** + * sets search tree of v; tColorValue::black() for source tree, white() for sink tree, gray() for no tree + */ + inline void set_tree(vertex_descriptor v, tColorValue t){ + m_tree_map[v] = t; + } + + /** + * returns edge to parent vertex of v; + */ + inline edge_descriptor get_edge_to_parent(vertex_descriptor v) const{ + return m_pre_map[v]; + } + + /** + * returns true if the edge stored in m_pre_map[v] is a valid entry + */ + inline bool has_parent(vertex_descriptor v) const{ + return m_has_parent_map[v]; + } + + /** + * sets edge to parent vertex of v; + */ + inline void set_edge_to_parent(vertex_descriptor v, edge_descriptor f_edge_to_parent){ + assert(m_res_cap_map[f_edge_to_parent] > 0); + m_pre_map[v] = f_edge_to_parent; + m_has_parent_map[v] = true; + } + + /** + * removes the edge to parent of v (this is done by invalidating the entry an additional map) + */ + inline void set_no_parent(vertex_descriptor v){ + m_has_parent_map[v] = false; + } + + /** + * checks if vertex v has a connect to the sink-vertex (@var m_sink) + * @param v the vertex which is checked + * @return true if a path to the sink was found, false if not + */ + inline bool has_sink_connect(vertex_descriptor v){ + tDistanceVal current_distance = 0; + vertex_descriptor current_vertex = v; + while(true){ + if(m_time_map[current_vertex] == m_time){ + //we found a node which was already checked this round. use it for distance calculations + current_distance += m_dist_map[current_vertex]; + break; + } + if(current_vertex == m_sink){ + m_time_map[m_sink] = m_time; + break; + } + if(has_parent(current_vertex)){ + //it has a parent, so get it + current_vertex = target(get_edge_to_parent(current_vertex), m_g); + ++current_distance; + } else{ + //no path found + return false; + } + } + current_vertex=v; + while(m_time_map[current_vertex] != m_time){ + m_dist_map[current_vertex] = current_distance--; + m_time_map[current_vertex] = m_time; + current_vertex = target(get_edge_to_parent(current_vertex), m_g); + } + return true; + } + + /** + * checks if vertex v has a connect to the source-vertex (@var m_source) + * @param v the vertex which is checked + * @return true if a path to the source was found, false if not + */ + inline bool has_source_connect(vertex_descriptor v){ + tDistanceVal current_distance = 0; + vertex_descriptor current_vertex = v; + while(true){ + if(m_time_map[current_vertex] == m_time){ + //we found a node which was already checked this round. use it for distance calculations + current_distance += m_dist_map[current_vertex]; + break; + } + if(current_vertex == m_source){ + m_time_map[m_source] = m_time; + break; + } + if(has_parent(current_vertex)){ + //it has a parent, so get it + current_vertex = source(get_edge_to_parent(current_vertex), m_g); + ++current_distance; + } else{ + //no path found + return false; + } + } + current_vertex=v; + while(m_time_map[current_vertex] != m_time){ + m_dist_map[current_vertex] = current_distance-- ; + m_time_map[current_vertex] = m_time; + current_vertex = source(get_edge_to_parent(current_vertex), m_g); + } + return true; + } + + /** + * returns true, if p is closer to a terminal than q + */ + inline bool is_closer_to_terminal(vertex_descriptor p, vertex_descriptor q){ + //checks the timestamps first, to build no cycles, and after that the real distance + return (m_time_map[q] <= m_time_map[p] && m_dist_map[q] > m_dist_map[p]+1); + } + + //////// + // member vars + //////// + Graph& m_g; + IndexMap m_index_map; + EdgeCapacityMap m_cap_map; + ResidualCapacityEdgeMap m_res_cap_map; + ReverseEdgeMap m_rev_edge_map; + PredecessorMap m_pre_map; //stores paths found in the growth stage + ColorMap m_tree_map; //maps each vertex into one of the two search tree or none (gray()) + DistanceMap m_dist_map; //stores distance to source/sink nodes + vertex_descriptor m_source; + vertex_descriptor m_sink; + + tQueue m_active_nodes; + std::vector m_in_active_list_vec; + iterator_property_map::iterator, IndexMap> m_in_active_list_map; + + std::list m_orphans; + tQueue m_child_orphans; // we use a second queuqe for child orphans, as they are FIFO processed + + std::vector m_has_parent_vec; + iterator_property_map::iterator, IndexMap> m_has_parent_map; + + std::vector m_time_vec; //timestamp of each node, used for sink/source-path calculations + iterator_property_map::iterator, IndexMap> m_time_map; + tEdgeVal m_flow; + long m_time; + vertex_descriptor m_last_grow_vertex; + out_edge_iterator m_last_grow_edge_it; + out_edge_iterator m_last_grow_edge_end; + }; + } //namespace detail + + /** + * non-named-parameter version, given everything + * this is the catch all version + */ + template + typename property_traits::value_type + kolmogorov_max_flow + (Graph& g, + CapacityEdgeMap cap, + ResidualCapacityEdgeMap res_cap, + ReverseEdgeMap rev_map, + PredecessorMap pre_map, + ColorMap color, + DistanceMap dist, + IndexMap idx, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink + ) + { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + //as this method is the last one before we instantiate the solver, we do the concept checks here + function_requires >(); //to have vertices(), num_vertices(), + function_requires >(); //to have edges() + function_requires >(); //to have source(), target() and out_edges() + function_requires >(); //read flow-values from edges + function_requires >(); //write flow-values to residuals + function_requires >(); //read out reverse edges + function_requires >(); //store predecessor there + function_requires >(); //write corresponding tree + function_requires >(); //write distance to source/sink + function_requires >(); //get index 0...|V|-1 + assert(num_vertices(g) >= 2 && src != sink); + detail::kolmogorov + algo(g, cap, res_cap, rev_map, pre_map, color, dist, idx, src, sink); + return algo.max_flow(); + } + + /** + * non-named-parameter version, given: capacity, residucal_capacity, reverse_edges, and an index map. + */ + template + typename property_traits::value_type + kolmogorov_max_flow + (Graph& g, + CapacityEdgeMap cap, + ResidualCapacityEdgeMap res_cap, + ReverseEdgeMap rev, + IndexMap idx, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) + { + typename graph_traits::vertices_size_type n_verts = num_vertices(g); + std::vector::edge_descriptor> predecessor_vec(n_verts); + std::vector color_vec(n_verts); + std::vector::vertices_size_type> distance_vec(n_verts); + return kolmogorov_max_flow + (g, cap, res_cap, rev, + make_iterator_property_map(predecessor_vec.begin(), idx), + make_iterator_property_map(color_vec.begin(), idx), + make_iterator_property_map(distance_vec.begin(), idx), + idx, src, sink); + } + + /** + * non-named-parameter version, some given: capacity, residual_capacity, reverse_edges, color_map and an index map. + * Use this if you are interested in the minimum cut, as the color map provides that info + */ + template + typename property_traits::value_type + kolmogorov_max_flow + (Graph& g, + CapacityEdgeMap cap, + ResidualCapacityEdgeMap res_cap, + ReverseEdgeMap rev, + ColorMap color, + IndexMap idx, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) + { + typename graph_traits::vertices_size_type n_verts = num_vertices(g); + std::vector::edge_descriptor> predecessor_vec(n_verts); + std::vector::vertices_size_type> distance_vec(n_verts); + + return kolmogorov_max_flow + (g, cap, res_cap, rev, + make_iterator_property_map(predecessor_vec.begin(), idx), + color, + make_iterator_property_map(distance_vec.begin(), idx), + idx, src, sink); + } + + /** + * named-parameter version, some given + */ + template + typename property_traits::const_type>::value_type + kolmogorov_max_flow + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + const bgl_named_params& params) + { + return kolmogorov_max_flow(g, + choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity), + choose_pmap(get_param(params, edge_residual_capacity), g, edge_residual_capacity), + choose_const_pmap(get_param(params, edge_reverse), g, edge_reverse), + choose_pmap(get_param(params, vertex_predecessor), g, vertex_predecessor), + choose_pmap(get_param(params, vertex_color), g, vertex_color), + choose_pmap(get_param(params, vertex_distance), g, vertex_distance), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + src, sink); + } + + /** + * named-parameter version, none given + */ + template + typename property_traits::const_type>::value_type + kolmogorov_max_flow + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) + { + bgl_named_params params(0); // bogus empty param + return kolmogorov_max_flow(g, src, sink, params); + } +} // namespace boost + +#endif // BOOST_KOLMOGOROV_MAX_FLOW_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/kruskal_min_spanning_tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/kruskal_min_spanning_tree.hpp new file mode 100644 index 0000000000..a847e3f156 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/kruskal_min_spanning_tree.hpp @@ -0,0 +1,155 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_MST_KRUSKAL_HPP +#define BOOST_GRAPH_MST_KRUSKAL_HPP + +/* + *Minimum Spanning Tree + * Kruskal Algorithm + * + *Requirement: + * undirected graph + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + + +namespace boost { + + // Kruskal's algorithm for Minimum Spanning Tree + // + // This is a greedy algorithm to calculate the Minimum Spanning Tree + // for an undirected graph with weighted edges. The output will be a + // set of edges. + // + + namespace detail { + + template + void + kruskal_mst_impl(const Graph& G, + OutputIterator spanning_tree_edges, + Rank rank, Parent parent, Weight weight) + { + if (num_vertices(G) == 0) return; // Nothing to do in this case + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + function_requires >(); + function_requires >(); + function_requires >(); + function_requires >(); + function_requires >(); + function_requires >(); + typedef typename property_traits::value_type W_value; + typedef typename property_traits::value_type R_value; + typedef typename property_traits::value_type P_value; + function_requires >(); + function_requires >(); + function_requires >(); + + disjoint_sets dset(rank, parent); + + typename graph_traits::vertex_iterator ui, uiend; + for (boost::tie(ui, uiend) = vertices(G); ui != uiend; ++ui) + dset.make_set(*ui); + + typedef indirect_cmp > weight_greater; + weight_greater wl(weight); + std::priority_queue, weight_greater> Q(wl); + /*push all edge into Q*/ + typename graph_traits::edge_iterator ei, eiend; + for (boost::tie(ei, eiend) = edges(G); ei != eiend; ++ei) + Q.push(*ei); + + while (! Q.empty()) { + Edge e = Q.top(); + Q.pop(); + Vertex u = dset.find_set(source(e, G)); + Vertex v = dset.find_set(target(e, G)); + if ( u != v ) { + *spanning_tree_edges++ = e; + dset.link(u, v); + } + } + } + + } // namespace detail + + // Named Parameters Variants + + template + inline void + kruskal_minimum_spanning_tree(const Graph& g, + OutputIterator spanning_tree_edges) + { + typedef typename graph_traits::vertices_size_type size_type; + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename property_map::type index_map_t; + if (num_vertices(g) == 0) return; // Nothing to do in this case + typename graph_traits::vertices_size_type + n = num_vertices(g); + std::vector rank_map(n); + std::vector pred_map(n); + + detail::kruskal_mst_impl + (g, spanning_tree_edges, + make_iterator_property_map(rank_map.begin(), get(vertex_index, g), rank_map[0]), + make_iterator_property_map(pred_map.begin(), get(vertex_index, g), pred_map[0]), + get(edge_weight, g)); + } + + template + inline void + kruskal_minimum_spanning_tree(const Graph& g, + OutputIterator spanning_tree_edges, + const bgl_named_params& params) + { + typedef typename graph_traits::vertices_size_type size_type; + typedef typename graph_traits::vertex_descriptor vertex_t; + if (num_vertices(g) == 0) return; // Nothing to do in this case + typename graph_traits::vertices_size_type n; + n = is_default_param(get_param(params, vertex_rank)) + ? num_vertices(g) : 1; + std::vector rank_map(n); + n = is_default_param(get_param(params, vertex_predecessor)) + ? num_vertices(g) : 1; + std::vector pred_map(n); + + detail::kruskal_mst_impl + (g, spanning_tree_edges, + choose_param + (get_param(params, vertex_rank), + make_iterator_property_map + (rank_map.begin(), + choose_pmap(get_param(params, vertex_index), g, vertex_index), rank_map[0])), + choose_param + (get_param(params, vertex_predecessor), + make_iterator_property_map + (pred_map.begin(), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index), + pred_map[0])), + choose_const_pmap(get_param(params, edge_weight), g, edge_weight)); + } + +} // namespace boost + + +#endif // BOOST_GRAPH_MST_KRUSKAL_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/labeled_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/labeled_graph.hpp new file mode 100644 index 0000000000..e1a2f7c2d7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/labeled_graph.hpp @@ -0,0 +1,813 @@ +// Copyright (C) 2009 Andrew Sutton + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_LABELED_GRAPH_HPP +#define BOOST_GRAPH_LABELED_GRAPH_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +// This file implements a utility for creating mappings from arbitrary +// identifers to the vertices of a graph. + +namespace boost { + +// A type selector that denotes the use of some default value. +struct defaultS { }; + +/** @internal */ +namespace graph_detail { + /** Returns true if the selector is the default selector. */ + template + struct is_default + : mpl::bool_::value> + { }; + + /** + * Choose the default map instance. If Label is an unsigned integral type + * the we can use a vector to store the information. + */ + template + struct choose_default_map { + typedef typename mpl::if_< + is_unsigned

::template result::type& + choose_param(const P& param, const Default& d) { + return detail::choose_param_helper

::apply(param, d); + } + + template + inline bool is_default_param(const T&) { return false; } + + inline bool is_default_param(const detail::error_property_not_found&) + { return true; } + + namespace detail { + + struct choose_parameter { + template + struct bind_ { + typedef const P& const_result_type; + typedef const P& result_type; + typedef P type; + }; + + template + static typename bind_::const_result_type + const_apply(const P& p, const Graph&, Tag&) + { return p; } + + template + static typename bind_::result_type + apply(const P& p, Graph&, Tag&) + { return p; } + }; + + struct choose_default_param { + template + struct bind_ { + typedef typename property_map::type + result_type; + typedef typename property_map::const_type + const_result_type; + typedef typename property_map::const_type + type; + }; + + template + static typename bind_::const_result_type + const_apply(const P&, const Graph& g, Tag tag) { + return get(tag, g); + } + template + static typename bind_::result_type + apply(const P&, Graph& g, Tag tag) { + return get(tag, g); + } + }; + + template + struct choose_property_map { + typedef choose_parameter type; + }; + template <> + struct choose_property_map { + typedef choose_default_param type; + }; + + template + struct choose_pmap_helper { + typedef typename choose_property_map::type Selector; + typedef typename Selector:: template bind_ Bind; + typedef Bind type; + typedef typename Bind::result_type result_type; + typedef typename Bind::const_result_type const_result_type; + typedef typename Bind::type result; + }; + + // used in the max-flow algorithms + template + struct edge_capacity_value + { + typedef bgl_named_params Params; + typedef typename property_value< Params, edge_capacity_t>::type Param; + typedef typename detail::choose_pmap_helper::result CapacityEdgeMap; + typedef typename property_traits::value_type type; + }; + + } // namespace detail + + + // Use this function instead of choose_param() when you want + // to avoid requiring get(tag, g) when it is not used. + template + typename + detail::choose_pmap_helper::const_result_type + choose_const_pmap(const Param& p, const Graph& g, PropertyTag tag) + { + typedef typename + detail::choose_pmap_helper::Selector Choice; + return Choice::const_apply(p, g, tag); + } + + template + typename detail::choose_pmap_helper::result_type + choose_pmap(const Param& p, Graph& g, PropertyTag tag) + { + typedef typename + detail::choose_pmap_helper::Selector Choice; + return Choice::apply(p, g, tag); + } + + // Declare all new tags + namespace graph { + namespace keywords { +#define BOOST_BGL_ONE_PARAM_REF(name, key) BOOST_PARAMETER_NAME(name) +#define BOOST_BGL_ONE_PARAM_CREF(name, key) BOOST_PARAMETER_NAME(name) + BOOST_BGL_DECLARE_NAMED_PARAMS +#undef BOOST_BGL_ONE_PARAM_REF +#undef BOOST_BGL_ONE_PARAM_CREF + } + } + + namespace detail { + template struct convert_one_keyword {}; +#define BOOST_BGL_ONE_PARAM_REF(name, key) \ + template <> \ + struct convert_one_keyword { \ + typedef boost::graph::keywords::tag::name type; \ + }; +#define BOOST_BGL_ONE_PARAM_CREF(name, key) BOOST_BGL_ONE_PARAM_REF(name, key) + BOOST_BGL_DECLARE_NAMED_PARAMS +#undef BOOST_BGL_ONE_PARAM_REF +#undef BOOST_BGL_ONE_PARAM_CREF + + template + struct convert_bgl_params_to_boost_parameter { + typedef typename convert_one_keyword::type new_kw; + typedef boost::parameter::aux::tagged_argument tagged_arg_type; + typedef convert_bgl_params_to_boost_parameter rest_conv; + typedef boost::parameter::aux::arg_list type; + static type conv(const T& x) { + return type(tagged_arg_type(x.m_value), rest_conv::conv(x)); + } + }; + + template + struct convert_bgl_params_to_boost_parameter > { + typedef convert_bgl_params_to_boost_parameter rest_conv; + typedef typename rest_conv::type type; + static type conv(const bgl_named_params& x) { + return rest_conv::conv(x); + } + }; + + template <> + struct convert_bgl_params_to_boost_parameter { + typedef boost::parameter::aux::empty_arg_list type; + static type conv(const boost::no_property&) {return type();} + }; + + template <> + struct convert_bgl_params_to_boost_parameter { + typedef boost::parameter::aux::empty_arg_list type; + static type conv(const boost::no_property&) {return type();} + }; + + struct bgl_parameter_not_found_type {}; + + template + struct parameter_exists : boost::mpl::not_::type, bgl_parameter_not_found_type> > {}; + } + +#define BOOST_GRAPH_DECLARE_CONVERTED_PARAMETERS(old_type, old_var) \ + typedef typename boost::detail::convert_bgl_params_to_boost_parameter::type arg_pack_type; \ + arg_pack_type arg_pack = boost::detail::convert_bgl_params_to_boost_parameter::conv(old_var); + + namespace detail { + + template + struct override_const_property_t { + typedef typename boost::remove_const::type result_type; + result_type operator()(const Graph&, const ArgType& a) const {return a;} + }; + + template + struct override_const_property_t { + typedef typename boost::property_map::const_type result_type; + result_type operator()(const Graph& g, const ArgType&) const {return get(Prop(), g);} + }; + + template + struct override_const_property_result { + typedef + typename override_const_property_t< + typename boost::parameter::value_type::type, + Prop, + Graph, + boost::detail::parameter_exists::value + >::result_type + type; + }; + + template + typename override_const_property_result::type + override_const_property(const ArgPack& ap, const boost::parameter::keyword& t, const Graph& g, Prop) { + return override_const_property_t< + typename boost::parameter::value_type::type, + Prop, + Graph, + boost::detail::parameter_exists::value + >()(g, ap[t | 0]); + } + + template + struct override_property_t { + typedef ArgType result_type; + result_type operator()(const Graph& g, const typename boost::add_reference::type a) const {return a;} + }; + + template + struct override_property_t { + typedef typename boost::property_map::type result_type; + result_type operator()(const Graph& g, const ArgType& a) const {return get(Prop(), g);} + }; + + template + struct override_property_result { + typedef + typename override_property_t< + typename boost::parameter::value_type::type, + Prop, + Graph, + boost::detail::parameter_exists::value + >::result_type + type; + }; + + template + typename override_property_result::type + override_property(const ArgPack& ap, const boost::parameter::keyword& t, const Graph& g, Prop prop) { + return override_property_t< + typename boost::parameter::value_type::type, + Prop, + Graph, + boost::detail::parameter_exists::value + >()(g, ap[t | 0]); + } + + } + + namespace detail { + + template + struct map_maker_helper { + typedef PM map_type; + static PM make_map(const Graph&, Value, const PM& pm, const ArgPack&) { + return pm; + } + }; + + template + struct map_maker_helper { + typedef typename boost::remove_const< + typename override_const_property_t< + typename boost::parameter::value_type< + ArgPack, boost::graph::keywords::tag::vertex_index_map, int>::type, + boost::vertex_index_t, + Graph, + boost::detail::parameter_exists< + ArgPack, boost::graph::keywords::tag::vertex_index_map>::value + >::result_type>::type vi_map_type; + typedef + boost::shared_array_property_map + map_type; + static map_type make_map(const Graph& g, + Value v, + const PM&, + const ArgPack& ap) { + return make_shared_array_property_map( + num_vertices(g), + v, + override_const_property( + ap, + boost::graph::keywords::_vertex_index_map, + g, vertex_index)); + } + }; + + template + struct map_maker { + BOOST_STATIC_CONSTANT( + bool, + has_map = + (parameter_exists + ::value)); + typedef map_maker_helper::type + >::type> helper; + typedef typename helper::map_type map_type; + static map_type make_map(const Graph& g, const ArgPack& ap, ValueType default_value) { + return helper::make_map(g, default_value, ap[::boost::parameter::keyword::instance | 0], ap); + } + }; + + template + class make_property_map_from_arg_pack_gen { + ValueType default_value; + + public: + make_property_map_from_arg_pack_gen(ValueType default_value) + : default_value(default_value) {} + + template + typename map_maker::map_type + operator()(const Graph& g, const ArgPack& ap) const { + return map_maker::make_map(g, ap, default_value); + } + }; + + template + class make_property_map_from_arg_pack_gen { + public: + template + typename map_maker::map_type + operator()(const Graph& g, const ArgPack& ap, ValueType default_value) const { + return map_maker::make_map(g, ap, default_value); + } + }; + + static const + make_property_map_from_arg_pack_gen< + boost::graph::keywords::tag::color_map, + default_color_type> + make_color_map_from_arg_pack(white_color); + + template + struct priority_queue_maker_helper { + typedef Q priority_queue_type; + + static priority_queue_type + make_queue(const Graph& g, const ArgPack& ap, KeyT defaultKey, const Q& q) { + return q; + } + }; + + template + struct priority_queue_maker_helper { + typedef typename std::vector::size_type default_index_in_heap_type; + typedef typename map_maker::helper::map_type index_in_heap_map; + typedef boost::d_ary_heap_indirect::helper::map_type, Compare> priority_queue_type; + + static priority_queue_type + make_queue(const Graph& g, const ArgPack& ap, KeyT defaultKey, const Q& q) { + return priority_queue_type( + map_maker::make_map(g, ap, defaultKey), + map_maker::make_map(g, ap, typename boost::property_traits::value_type(-1)) + ); + } + }; + + template + struct priority_queue_maker { + BOOST_STATIC_CONSTANT( + bool, + g_hasQ = + (parameter_exists + ::value)); + typedef priority_queue_maker_helper + >::type::type + >::type> helper; + typedef typename helper::priority_queue_type priority_queue_type; + + static priority_queue_type make_queue(const Graph& g, const ArgPack& ap, KeyT defaultKey) { + return helper::make_queue(g, ap, defaultKey, ap[::boost::parameter::keyword::instance | 0]); + } + }; + + template , class KeyMapTag = boost::graph::keywords::tag::distance_map, class IndexInHeapMapTag = boost::graph::keywords::tag::index_in_heap_map> + struct make_priority_queue_from_arg_pack_gen { + KeyT defaultKey; + + make_priority_queue_from_arg_pack_gen(KeyT defaultKey_) : defaultKey(defaultKey_) { } + + template + typename priority_queue_maker::priority_queue_type + operator()(const Graph& g, const ArgPack& ap) const { + return priority_queue_maker::make_queue(g, ap, defaultKey); + } + }; + + } // namespace detail + +} // namespace boost + +#undef BOOST_BGL_DECLARE_NAMED_PARAMS + +#endif // BOOST_GRAPH_NAMED_FUNCTION_PARAMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/named_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/named_graph.hpp new file mode 100644 index 0000000000..dda608d78f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/named_graph.hpp @@ -0,0 +1,537 @@ +// Copyright (C) 2007 Douglas Gregor + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Provides support for named vertices in graphs, allowing one to more +// easily associate unique external names (URLs, city names, employee +// ID numbers, etc.) with the vertices of a graph. +#ifndef BOOST_GRAPH_NAMED_GRAPH_HPP +#define BOOST_GRAPH_NAMED_GRAPH_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include // for std::runtime_error + +namespace boost { namespace graph { + +/******************************************************************* + * User-customized traits * + *******************************************************************/ + +/** + * @brief Trait used to extract the internal vertex name from a vertex + * property. + * + * To enable the use of internal vertex names in a graph type, + * specialize the @c internal_vertex_name trait for your graph + * property (e.g., @c a City class, which stores information about the + * vertices in a road map). + */ +template +struct internal_vertex_name +{ + /** + * The @c type field provides a function object that extracts a key + * from the @c VertexProperty. The function object type must have a + * nested @c result_type that provides the type of the key. For + * more information, see the @c KeyExtractor concept in the + * Boost.MultiIndex documentation: @c type must either be @c void + * (if @c VertexProperty does not have an internal vertex name) or + * a model of @c KeyExtractor. + */ + typedef void type; +}; + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +/** + * Extract the internal vertex name from a @c property structure by + * looking at its base. + */ +template +struct internal_vertex_name > + : internal_vertex_name { }; +#endif + +/** + * Construct an instance of @c VertexProperty directly from its + * name. This function object should be used within the @c + * internal_vertex_constructor trait. + */ +template +struct vertex_from_name +{ +private: + typedef typename internal_vertex_name::type extract_name_type; + + typedef typename remove_cv< + typename remove_reference< + typename extract_name_type::result_type>::type>::type + vertex_name_type; + +public: + typedef vertex_name_type argument_type; + typedef VertexProperty result_type; + + VertexProperty operator()(const vertex_name_type& name) + { + return VertexProperty(name); + } +}; + +/** + * Throw an exception whenever one tries to construct a @c + * VertexProperty instance from its name. + */ +template +struct cannot_add_vertex +{ +private: + typedef typename internal_vertex_name::type extract_name_type; + + typedef typename remove_cv< + typename remove_reference< + typename extract_name_type::result_type>::type>::type + vertex_name_type; + +public: + typedef vertex_name_type argument_type; + typedef VertexProperty result_type; + + VertexProperty operator()(const vertex_name_type& name) + { + boost::throw_exception(std::runtime_error("add_vertex: " + "unable to create a vertex from its name")); + } +}; + +/** + * @brief Trait used to construct an instance of a @c VertexProperty, + * which is a class type that stores the properties associated with a + * vertex in a graph, from just the name of that vertex property. This + * operation is used when an operation is required to map from a + * vertex name to a vertex descriptor (e.g., to add an edge outgoing + * from that vertex), but no vertex by the name exists. The function + * object provided by this trait will be used to add new vertices + * based only on their names. Since this cannot be done for arbitrary + * types, the default behavior is to throw an exception when this + * routine is called, which requires that all named vertices be added + * before adding any edges by name. + */ +template +struct internal_vertex_constructor +{ + /** + * The @c type field provides a function object that constructs a + * new instance of @c VertexProperty from the name of the vertex (as + * determined by @c internal_vertex_name). The function object shall + * accept a vertex name and return a @c VertexProperty. Predefined + * options include: + * + * @c vertex_from_name: construct an instance of + * @c VertexProperty directly from the name. + * + * @c cannot_add_vertex: the default value, which + * throws an @c std::runtime_error if one attempts to add a vertex + * given just the name. + */ + typedef cannot_add_vertex type; +}; + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +/** + * Extract the internal vertex constructor from a @c property structure by + * looking at its base. + */ +template +struct internal_vertex_constructor > + : internal_vertex_constructor { }; +#endif + +/******************************************************************* + * Named graph-specific metafunctions * + *******************************************************************/ +namespace detail { + /** @internal + * Extracts the type of a bundled vertex property from a vertex + * property. The primary template matches when we have hit the end + * of the @c property<> list. + */ + template + struct extract_bundled_vertex + { + typedef VertexProperty type; + }; + + /** @internal + * Recursively extract the bundled vertex property from a vertex + * property. + */ + template + struct extract_bundled_vertex > + : extract_bundled_vertex + { }; + + /** + * We have found the bundled vertex property type, marked with + * vertex_bundle_t. + */ + template + struct extract_bundled_vertex > + { + typedef T type; + }; + + /** + * Translate @c no_property into @c error_property_not_found when we + * have failed to extract a bundled vertex property type. + */ + template<> + struct extract_bundled_vertex + { + typedef boost::detail::error_property_not_found type; + }; +} + +/******************************************************************* + * Named graph mixin * + *******************************************************************/ + +/** + * named_graph is a mixin that provides names for the vertices of a + * graph, including a mapping from names to vertices. Graph types that + * may or may not be have vertex names (depending on the properties + * supplied by the user) should use maybe_named_graph. + * + * Template parameters: + * + * Graph: the graph type that derives from named_graph + * + * Vertex: the type of a vertex descriptor in Graph. Note: we cannot + * use graph_traits here, because the Graph is not yet defined. + * + * VertexProperty: the type stored with each vertex in the Graph. + */ +template +class named_graph +{ +public: + /// The type of the function object that extracts names from vertex + /// properties. + typedef typename internal_vertex_name::type extract_name_type; + /// The type of the "bundled" property, from which the name can be + /// extracted. + typedef typename detail::extract_bundled_vertex::type + bundled_vertex_property_type; + + /// The type of the function object that generates vertex properties + /// from names, for the implicit addition of vertices. + typedef typename internal_vertex_constructor::type + vertex_constructor_type; + + /// The type used to name vertices in the graph + typedef typename remove_cv< + typename remove_reference< + typename extract_name_type::result_type>::type>::type + vertex_name_type; + + /// The type of vertex descriptors in the graph + typedef Vertex vertex_descriptor; + +private: + /// Key extractor for use with the multi_index_container + struct extract_name_from_vertex + { + typedef vertex_name_type result_type; + + extract_name_from_vertex(Graph& graph, const extract_name_type& extract) + : graph(graph), extract(extract) { } + + const result_type& operator()(Vertex vertex) const + { + return extract(graph[vertex]); + } + + Graph& graph; + extract_name_type extract; + }; + +public: + /// The type that maps names to vertices + typedef multi_index::multi_index_container< + Vertex, + multi_index::indexed_by< + multi_index::hashed_unique, + extract_name_from_vertex> > + > named_vertices_type; + + /// The set of vertices, indexed by name + typedef typename named_vertices_type::template index::type + vertices_by_name_type; + + /// Construct an instance of the named graph mixin, using the given + /// function object to extract a name from the bundled property + /// associated with a vertex. + named_graph(const extract_name_type& extract = extract_name_type(), + const vertex_constructor_type& vertex_constructor + = vertex_constructor_type()); + + /// Notify the named_graph that we have added the given vertex. The + /// name of the vertex will be added to the mapping. + void added_vertex(Vertex vertex); + + /// Notify the named_graph that we are removing the given + /// vertex. The name of the vertex will be removed from the mapping. + void removing_vertex(Vertex vertex); + + /// Notify the named_graph that we are clearing the graph. + /// This will clear out all of the name->vertex mappings + void clearing_graph(); + + /// Retrieve the derived instance + Graph& derived() { return static_cast(*this); } + const Graph& derived() const { return static_cast(*this); } + + /// Extract the name from a vertex property instance + typename extract_name_type::result_type + extract_name(const bundled_vertex_property_type& property); + + /// Search for a vertex that has the given property (based on its + /// name) + optional + vertex_by_property(const bundled_vertex_property_type& property); + + /// Mapping from names to vertices + named_vertices_type named_vertices; + + /// Constructs a vertex from the name of that vertex + vertex_constructor_type vertex_constructor; +}; + +/// Helper macro containing the template parameters of named_graph +#define BGL_NAMED_GRAPH_PARAMS \ + typename Graph, typename Vertex, typename VertexProperty +/// Helper macro containing the named_graph<...> instantiation +#define BGL_NAMED_GRAPH \ + named_graph + +template +BGL_NAMED_GRAPH::named_graph(const extract_name_type& extract, + const vertex_constructor_type& vertex_constructor) + : named_vertices( + typename named_vertices_type::ctor_args_list( + boost::make_tuple( + boost::make_tuple( + 0, // initial number of buckets + extract_name_from_vertex(derived(), extract), + boost::hash(), + std::equal_to())))), + vertex_constructor(vertex_constructor) +{ +} + +template +inline void BGL_NAMED_GRAPH::added_vertex(Vertex vertex) +{ + named_vertices.insert(vertex); +} + +template +inline void BGL_NAMED_GRAPH::removing_vertex(Vertex vertex) +{ + named_vertices.erase(vertex); +} + +template +inline void BGL_NAMED_GRAPH::clearing_graph() +{ + named_vertices.clear(); +} + +template +typename BGL_NAMED_GRAPH::extract_name_type::result_type +BGL_NAMED_GRAPH::extract_name(const bundled_vertex_property_type& property) +{ + return named_vertices.key_extractor().extract(property); +} + +template +optional +BGL_NAMED_GRAPH:: +vertex_by_property(const bundled_vertex_property_type& property) +{ + return find_vertex(extract_name(property), *this); +} + +/// Retrieve the vertex associated with the given name +template +optional +find_vertex(typename BGL_NAMED_GRAPH::vertex_name_type const& name, + const BGL_NAMED_GRAPH& g) +{ + typedef typename BGL_NAMED_GRAPH::vertices_by_name_type + vertices_by_name_type; + + // Retrieve the set of vertices indexed by name + vertices_by_name_type const& vertices_by_name + = g.named_vertices.template get(); + + /// Look for a vertex with the given name + typename vertices_by_name_type::const_iterator iter + = vertices_by_name.find(name); + + if (iter == vertices_by_name.end()) + return optional(); // vertex not found + else + return *iter; +} + +/// Retrieve the vertex associated with the given name, or add a new +/// vertex with that name if no such vertex is available. +template +Vertex +add_vertex(typename BGL_NAMED_GRAPH::vertex_name_type const& name, + BGL_NAMED_GRAPH& g) +{ + if (optional vertex = find_vertex(name, g)) + /// We found the vertex, so return it + return *vertex; + else + /// There is no vertex with the given name, so create one + return add_vertex(g.vertex_constructor(name), g.derived()); +} + +/// Add an edge using vertex names to refer to the vertices +template +std::pair::edge_descriptor, bool> +add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, + typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, + BGL_NAMED_GRAPH& g) +{ + return add_edge(add_vertex(u_name, g.derived()), + add_vertex(v_name, g.derived()), + g.derived()); +} + +/// Add an edge using vertex descriptors or names to refer to the vertices +template +std::pair::edge_descriptor, bool> +add_edge(typename BGL_NAMED_GRAPH::vertex_descriptor const& u, + typename BGL_NAMED_GRAPH::vertex_name_type const& v_name, + BGL_NAMED_GRAPH& g) +{ + return add_edge(u, + add_vertex(v_name, g.derived()), + g.derived()); +} + +/// Add an edge using vertex descriptors or names to refer to the vertices +template +std::pair::edge_descriptor, bool> +add_edge(typename BGL_NAMED_GRAPH::vertex_name_type const& u_name, + typename BGL_NAMED_GRAPH::vertex_descriptor const& v, + BGL_NAMED_GRAPH& g) +{ + return add_edge(add_vertex(u_name, g.derived()), + v, + g.derived()); +} + +#undef BGL_NAMED_GRAPH +#undef BGL_NAMED_GRAPH_PARAMS + +/******************************************************************* + * Maybe named graph mixin * + *******************************************************************/ + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +/** + * A graph mixin that can provide a mapping from names to vertices, + * and use that mapping to simplify creation and manipulation of + * graphs. + */ +template::type> +struct maybe_named_graph : public named_graph +{ +}; + +/** + * A graph mixin that can provide a mapping from names to vertices, + * and use that mapping to simplify creation and manipulation of + * graphs. This partial specialization turns off this functionality + * when the @c VertexProperty does not have an internal vertex name. + */ +template +struct maybe_named_graph +{ + /// The type of the "bundled" property, from which the name can be + /// extracted. + typedef typename detail::extract_bundled_vertex::type + bundled_vertex_property_type; + + /// Notify the named_graph that we have added the given vertex. This + /// is a no-op. + void added_vertex(Vertex) { } + + /// Notify the named_graph that we are removing the given + /// vertex. This is a no-op. + void removing_vertex(Vertex) { } + + /// Notify the named_graph that we are clearing the graph. This is a + /// no-op. + void clearing_graph() { } + + /// Search for a vertex that has the given property (based on its + /// name). This always returns an empty optional<> + optional + vertex_by_property(const bundled_vertex_property_type&) + { + return optional(); + } +}; +#else +template::type> +struct maybe_named_graph +{ + /// The type of the "bundled" property, from which the name can be + /// extracted. + typedef typename detail::extract_bundled_vertex::type + bundled_vertex_property_type; + + /// Notify the named_graph that we have added the given vertex. This + /// is a no-op. + void added_vertex(Vertex) { } + + /// Notify the named_graph that we are removing the given + /// vertex. This is a no-op. + void removing_vertex(Vertex) { } + + /// Notify the named_graph that we are clearing the graph. This is a + /// no-op. + void clearing_graph() { } + + /// Search for a vertex that has the given property (based on its + /// name). This always returns an empty optional<> + template + optional + vertex_by_property(const bundled_vertex_property_type&) + { + return optional(); + } +}; +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} } // end namespace boost::graph + +#endif // BOOST_GRAPH_NAMED_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/neighbor_bfs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/neighbor_bfs.hpp new file mode 100644 index 0000000000..3ed94fc540 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/neighbor_bfs.hpp @@ -0,0 +1,322 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_NEIGHBOR_BREADTH_FIRST_SEARCH_HPP +#define BOOST_GRAPH_NEIGHBOR_BREADTH_FIRST_SEARCH_HPP + +/* + Neighbor Breadth First Search + Like BFS, but traverses in-edges as well as out-edges. + (for directed graphs only. use normal BFS for undirected graphs) +*/ +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + struct NeighborBFSVisitorConcept { + void constraints() { + function_requires< CopyConstructibleConcept >(); + vis.initialize_vertex(u, g); + vis.discover_vertex(u, g); + vis.examine_vertex(u, g); + vis.examine_out_edge(e, g); + vis.examine_in_edge(e, g); + vis.tree_out_edge(e, g); + vis.tree_in_edge(e, g); + vis.non_tree_out_edge(e, g); + vis.non_tree_in_edge(e, g); + vis.gray_target(e, g); + vis.black_target(e, g); + vis.gray_source(e, g); + vis.black_source(e, g); + vis.finish_vertex(u, g); + } + Visitor vis; + Graph g; + typename graph_traits::vertex_descriptor u; + typename graph_traits::edge_descriptor e; + }; + + template + class neighbor_bfs_visitor { + public: + neighbor_bfs_visitor(Visitors vis = Visitors()) : m_vis(vis) { } + + template + void initialize_vertex(Vertex u, Graph& g) { + invoke_visitors(m_vis, u, g, on_initialize_vertex()); + } + template + void discover_vertex(Vertex u, Graph& g) { + invoke_visitors(m_vis, u, g, on_discover_vertex()); + } + template + void examine_vertex(Vertex u, Graph& g) { + invoke_visitors(m_vis, u, g, on_examine_vertex()); + } + template + void examine_out_edge(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_examine_edge()); + } + template + void tree_out_edge(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_tree_edge()); + } + template + void non_tree_out_edge(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_non_tree_edge()); + } + template + void gray_target(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_gray_target()); + } + template + void black_target(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_black_target()); + } + template + void examine_in_edge(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_examine_edge()); + } + template + void tree_in_edge(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_tree_edge()); + } + template + void non_tree_in_edge(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_non_tree_edge()); + } + template + void gray_source(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_gray_target()); + } + template + void black_source(Edge e, Graph& g) { + invoke_visitors(m_vis, e, g, on_black_target()); + } + template + void finish_vertex(Vertex u, Graph& g) { + invoke_visitors(m_vis, u, g, on_finish_vertex()); + } + protected: + Visitors m_vis; + }; + + template + neighbor_bfs_visitor + make_neighbor_bfs_visitor(Visitors vis) { + return neighbor_bfs_visitor(vis); + } + + namespace detail { + + template + void neighbor_bfs_impl + (const BidirectionalGraph& g, + typename graph_traits::vertex_descriptor s, + Buffer& Q, BFSVisitor vis, ColorMap color) + + { + function_requires< BidirectionalGraphConcept >(); + typedef graph_traits GTraits; + typedef typename GTraits::vertex_descriptor Vertex; + typedef typename GTraits::edge_descriptor Edge; + function_requires< + NeighborBFSVisitorConcept >(); + function_requires< ReadWritePropertyMapConcept >(); + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + + put(color, s, Color::gray()); + vis.discover_vertex(s, g); + Q.push(s); + while (! Q.empty()) { + Vertex u = Q.top(); + Q.pop(); // pop before push to avoid problem if Q is priority_queue. + vis.examine_vertex(u, g); + + typename GTraits::out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) { + Edge e = *ei; + vis.examine_out_edge(e, g); + Vertex v = target(e, g); + ColorValue v_color = get(color, v); + if (v_color == Color::white()) { + vis.tree_out_edge(e, g); + put(color, v, Color::gray()); + vis.discover_vertex(v, g); + Q.push(v); + } else { + vis.non_tree_out_edge(e, g); + if (v_color == Color::gray()) + vis.gray_target(e, g); + else + vis.black_target(e, g); + } + } // for out-edges + + typename GTraits::in_edge_iterator in_ei, in_ei_end; + for (boost::tie(in_ei, in_ei_end) = in_edges(u, g); + in_ei != in_ei_end; ++in_ei) { + Edge e = *in_ei; + vis.examine_in_edge(e, g); + Vertex v = source(e, g); + ColorValue v_color = get(color, v); + if (v_color == Color::white()) { + vis.tree_in_edge(e, g); + put(color, v, Color::gray()); + vis.discover_vertex(v, g); + Q.push(v); + } else { + vis.non_tree_in_edge(e, g); + if (v_color == Color::gray()) + vis.gray_source(e, g); + else + vis.black_source(e, g); + } + } // for in-edges + + put(color, u, Color::black()); + vis.finish_vertex(u, g); + } // while + } + + + template + void neighbor_bfs_helper + (VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + ColorMap color, + BFSVisitor vis, + const bgl_named_params& params) + { + typedef graph_traits Traits; + // Buffer default + typedef typename Traits::vertex_descriptor Vertex; + typedef boost::queue queue_t; + queue_t Q; + // Initialization + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typename boost::graph_traits::vertex_iterator i, i_end; + for (boost::tie(i, i_end) = vertices(g); i != i_end; ++i) { + put(color, *i, Color::white()); + vis.initialize_vertex(*i, g); + } + neighbor_bfs_impl + (g, s, + choose_param(get_param(params, buffer_param_t()), boost::ref(Q)).get(), + vis, color); + } + + //------------------------------------------------------------------------- + // Choose between default color and color parameters. Using + // function dispatching so that we don't require vertex index if + // the color default is not being used. + + template + struct neighbor_bfs_dispatch { + template + static void apply + (VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params, + ColorMap color) + { + neighbor_bfs_helper + (g, s, color, + choose_param(get_param(params, graph_visitor), + make_neighbor_bfs_visitor(null_visitor())), + params); + } + }; + + template <> + struct neighbor_bfs_dispatch { + template + static void apply + (VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params, + detail::error_property_not_found) + { + std::vector color_vec(num_vertices(g)); + null_visitor null_vis; + + neighbor_bfs_helper + (g, s, + make_iterator_property_map + (color_vec.begin(), + choose_const_pmap(get_param(params, vertex_index), + g, vertex_index), color_vec[0]), + choose_param(get_param(params, graph_visitor), + make_neighbor_bfs_visitor(null_vis)), + params); + } + }; + + } // namespace detail + + + // Named Parameter Variant + template + void neighbor_breadth_first_search + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params) + { + // The graph is passed by *const* reference so that graph adaptors + // (temporaries) can be passed into this function. However, the + // graph is not really const since we may write to property maps + // of the graph. + VertexListGraph& ng = const_cast(g); + typedef typename property_value< bgl_named_params, + vertex_color_t>::type C; + detail::neighbor_bfs_dispatch::apply(ng, s, params, + get_param(params, vertex_color)); + } + + + // This version does not initialize colors, user has to. + + template + void neighbor_breadth_first_visit + (IncidenceGraph& g, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params) + { + typedef graph_traits Traits; + // Buffer default + typedef boost::queue queue_t; + queue_t Q; + + detail::neighbor_bfs_impl + (g, s, + choose_param(get_param(params, buffer_param_t()), boost::ref(Q)).get(), + choose_param(get_param(params, graph_visitor), + make_neighbor_bfs_visitor(null_visitor())), + choose_pmap(get_param(params, vertex_color), g, vertex_color) + ); + } + +} // namespace boost + +#endif // BOOST_GRAPH_NEIGHBOR_BREADTH_FIRST_SEARCH_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/numeric_values.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/numeric_values.hpp new file mode 100644 index 0000000000..ad01837270 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/numeric_values.hpp @@ -0,0 +1,52 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_NUMERIC_VALUES_HPP +#define BOOST_GRAPH_NUMERIC_VALUES_HPP + +#include + +namespace boost +{ + +#define BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(type) \ + template <> struct numeric_values { \ + typedef type value_type; \ + static type zero() { return 0.0; } \ + static type infinity() { return std::numeric_limits::infinity(); } \ + }; + + /** + * This generic type reports various numeric values for some type. In the + * general case, numeric values simply treat their maximum value as infinity + * and the default-constructed value as 0. + * + * Specializations of this template can redefine the notions of zero and + * infinity for various types. For example, the class is specialized for + * floating point types to use the built in notion of infinity. + */ + template + struct numeric_values + { + typedef T value_type; + + static T zero() + { return T(); } + + static T infinity() + { return (std::numeric_limits::max)(); } + }; + + // Specializations for floating point types refer to 0.0 and their infinity + // value defined by numeric_limits. + BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(float) + BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(double) + BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(long double) + +#undef BOOST_GRAPH_SPECIALIZE_NUMERIC_VALUE +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/one_bit_color_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/one_bit_color_map.hpp new file mode 100644 index 0000000000..95a9604f6b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/one_bit_color_map.hpp @@ -0,0 +1,103 @@ +// Copyright (C) 2005-2010 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Douglas Gregor +// Andrew Lumsdaine + +// One bit per color property map (gray and black are the same, green is not +// supported) + +#ifndef BOOST_ONE_BIT_COLOR_MAP_HPP +#define BOOST_ONE_BIT_COLOR_MAP_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + +enum one_bit_color_type { + one_bit_white = 0, + one_bit_not_white = 1 +}; + +template <> +struct color_traits +{ + static one_bit_color_type white() { return one_bit_white; } + static one_bit_color_type gray() { return one_bit_not_white; } + static one_bit_color_type black() { return one_bit_not_white; } +}; + + +template +struct one_bit_color_map +{ + BOOST_STATIC_CONSTANT(int, bits_per_char = std::numeric_limits::digits); + std::size_t n; + IndexMap index; + shared_array data; + + typedef typename property_traits::key_type key_type; + typedef one_bit_color_type value_type; + typedef void reference; + typedef read_write_property_map_tag category; + + explicit one_bit_color_map(std::size_t n, const IndexMap& index = IndexMap()) + : n(n), index(index), data(new unsigned char[(n + bits_per_char - 1) / bits_per_char]) + { + // Fill to white + std::fill(data.get(), data.get() + (n + bits_per_char - 1) / bits_per_char, 0); + } +}; + +template +inline one_bit_color_type +get(const one_bit_color_map& pm, + typename property_traits::key_type key) +{ + BOOST_STATIC_CONSTANT(int, bits_per_char = one_bit_color_map::bits_per_char); + typename property_traits::value_type i = get(pm.index, key); + assert ((std::size_t)i < pm.n); + return one_bit_color_type((pm.data.get()[i / bits_per_char] >> (i % bits_per_char)) & 1); +} + +template +inline void +put(const one_bit_color_map& pm, + typename property_traits::key_type key, + one_bit_color_type value) +{ + BOOST_STATIC_CONSTANT(int, bits_per_char = one_bit_color_map::bits_per_char); + typename property_traits::value_type i = get(pm.index, key); + assert ((std::size_t)i < pm.n); + assert (value >= 0 && value < 2); + std::size_t byte_num = i / bits_per_char; + std::size_t bit_position = (i % bits_per_char); + pm.data.get()[byte_num] = + (unsigned char) + ((pm.data.get()[byte_num] & ~(1 << bit_position)) + | (value << bit_position)); +} + +template +inline one_bit_color_map +make_one_bit_color_map(std::size_t n, const IndexMap& index_map) +{ + return one_bit_color_map(n, index_map); +} + +} // end namespace boost + +#endif // BOOST_ONE_BIT_COLOR_MAP_HPP + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/overloading.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/overloading.hpp new file mode 100644 index 0000000000..a952e22fa8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/overloading.hpp @@ -0,0 +1,46 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +// +// This file contains helps that enable concept-based overloading +// within the Boost Graph Library. +// +#ifndef BOOST_GRAPH_OVERLOADING_HPP +#define BOOST_GRAPH_OVERLOADING_HPP + +#include +#include + +namespace boost { namespace graph { namespace detail { + +struct no_parameter {}; + +} } } // end namespace boost::graph::detail + +#ifndef BOOST_NO_SFINAE + +#define BOOST_GRAPH_ENABLE_IF_MODELS(Graph, Tag, Type) \ + typename enable_if_c<(is_base_and_derived< \ + Tag, \ + typename graph_traits::traversal_category>::value), \ + Type>::type + +#define BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, Tag) \ + , BOOST_GRAPH_ENABLE_IF_MODELS(Graph, Tag, \ + ::boost::graph::detail::no_parameter) \ + = ::boost::graph::detail::no_parameter() + +#else + +#define BOOST_GRAPH_ENABLE_IF_MODELS(Graph, Tag, Type) Type +#define BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, Tag) + +#endif // no SFINAE support + +#endif // BOOST_GRAPH_OVERLOADING_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/page_rank.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/page_rank.hpp new file mode 100644 index 0000000000..a8987046d3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/page_rank.hpp @@ -0,0 +1,161 @@ +// Copyright 2004-5 The Trustees of Indiana University. +// Copyright 2002 Brad King and Douglas Gregor + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +#ifndef BOOST_GRAPH_PAGE_RANK_HPP +#define BOOST_GRAPH_PAGE_RANK_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace graph { + +struct n_iterations +{ + explicit n_iterations(std::size_t n) : n(n) { } + + template + bool + operator()(const RankMap&, const Graph&) + { + return n-- == 0; + } + + private: + std::size_t n; +}; + +namespace detail { + template + void page_rank_step(const Graph& g, RankMap from_rank, RankMap2 to_rank, + typename property_traits::value_type damping, + incidence_graph_tag) + { + typedef typename property_traits::value_type rank_type; + + // Set new rank maps + BGL_FORALL_VERTICES_T(v, g, Graph) put(to_rank, v, rank_type(1 - damping)); + + BGL_FORALL_VERTICES_T(u, g, Graph) { + rank_type u_rank_out = damping * get(from_rank, u) / out_degree(u, g); + BGL_FORALL_ADJ_T(u, v, g, Graph) + put(to_rank, v, get(to_rank, v) + u_rank_out); + } + } + + template + void page_rank_step(const Graph& g, RankMap from_rank, RankMap2 to_rank, + typename property_traits::value_type damping, + bidirectional_graph_tag) + { + typedef typename property_traits::value_type damping_type; + BGL_FORALL_VERTICES_T(v, g, Graph) { + typename property_traits::value_type rank(0); + BGL_FORALL_INEDGES_T(v, e, g, Graph) + rank += get(from_rank, source(e, g)) / out_degree(source(e, g), g); + put(to_rank, v, (damping_type(1) - damping) + damping * rank); + } + } +} // end namespace detail + +template +void +page_rank(const Graph& g, RankMap rank_map, Done done, + typename property_traits::value_type damping, + typename graph_traits::vertices_size_type n, + RankMap2 rank_map2 + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, vertex_list_graph_tag)) +{ + typedef typename property_traits::value_type rank_type; + + rank_type initial_rank = rank_type(rank_type(1) / n); + BGL_FORALL_VERTICES_T(v, g, Graph) put(rank_map, v, initial_rank); + + bool to_map_2 = true; + while ((to_map_2 && !done(rank_map, g)) || + (!to_map_2 && !done(rank_map2, g))) { + typedef typename graph_traits::traversal_category category; + + if (to_map_2) { + detail::page_rank_step(g, rank_map, rank_map2, damping, category()); + } else { + detail::page_rank_step(g, rank_map2, rank_map, damping, category()); + } + to_map_2 = !to_map_2; + } + + if (!to_map_2) { + BGL_FORALL_VERTICES_T(v, g, Graph) put(rank_map, v, get(rank_map2, v)); + } +} + +template +void +page_rank(const Graph& g, RankMap rank_map, Done done, + typename property_traits::value_type damping, + typename graph_traits::vertices_size_type n) +{ + typedef typename property_traits::value_type rank_type; + + std::vector ranks2(num_vertices(g)); + page_rank(g, rank_map, done, damping, n, + make_iterator_property_map(ranks2.begin(), get(vertex_index, g))); +} + +template +inline void +page_rank(const Graph& g, RankMap rank_map, Done done, + typename property_traits::value_type damping = 0.85) +{ + page_rank(g, rank_map, done, damping, num_vertices(g)); +} + +template +inline void +page_rank(const Graph& g, RankMap rank_map) +{ + page_rank(g, rank_map, n_iterations(20)); +} + +// TBD: this could be _much_ more efficient, using a queue to store +// the vertices that should be reprocessed and keeping track of which +// vertices are in the queue with a property map. Baah, this only +// applies when we have a bidirectional graph. +template +void +remove_dangling_links(MutableGraph& g + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(MutableGraph, + vertex_list_graph_tag)) +{ + typename graph_traits::vertices_size_type old_n; + do { + old_n = num_vertices(g); + + typename graph_traits::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; /* in loop */) { + typename graph_traits::vertex_descriptor v = *vi++; + if (out_degree(v, g) == 0) { + clear_vertex(v, g); + remove_vertex(v, g); + } + } + } while (num_vertices(g) < old_n); +} + +} } // end namespace boost::graph + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif + +#endif // BOOST_GRAPH_PAGE_RANK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/algorithm.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/algorithm.hpp new file mode 100644 index 0000000000..eed9bf8769 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/algorithm.hpp @@ -0,0 +1,84 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_PARALLEL_ALGORITHM_HPP +#define BOOST_PARALLEL_ALGORITHM_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include // for BOOST_STATIC_CONSTANT +#include +#include + +namespace boost { namespace parallel { + template + struct is_commutative + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct minimum : std::binary_function + { + const T& operator()(const T& x, const T& y) const { return x < y? x : y; } + }; + + template + struct maximum : std::binary_function + { + const T& operator()(const T& x, const T& y) const { return x < y? y : x; } + }; + + template + struct sum : std::binary_function + { + const T operator()(const T& x, const T& y) const { return x + y; } + }; + + template + OutputIterator + reduce(ProcessGroup pg, typename ProcessGroup::process_id_type root, + InputIterator first, InputIterator last, OutputIterator out, + BinaryOperation bin_op); + + template + inline T + all_reduce(ProcessGroup pg, const T& value, BinaryOperation bin_op) + { + T result; + all_reduce(pg, + const_cast(&value), const_cast(&value+1), + &result, bin_op); + return result; + } + + template + inline T + scan(ProcessGroup pg, const T& value, BinaryOperation bin_op) + { + T result; + scan(pg, + const_cast(&value), const_cast(&value+1), + &result, bin_op); + return result; + } + + + template + void + all_gather(ProcessGroup pg, InputIterator first, InputIterator last, + std::vector& out); +} } // end namespace boost::parallel + +#include + +#endif // BOOST_PARALLEL_ALGORITHM_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/basic_reduce.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/basic_reduce.hpp new file mode 100644 index 0000000000..ee23b3a940 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/basic_reduce.hpp @@ -0,0 +1,42 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +#ifndef BOOST_PARALLEL_BASIC_REDUCE_HPP +#define BOOST_PARALLEL_BASIC_REDUCE_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +namespace boost { namespace parallel { + +/** Reduction operation used to reconcile differences between local + * and remote values for a particular key in a property map. The + * type @c T is typically the @c value_type of the property + * map. This basic reduction returns a default-constructed @c T as + * the default value and always resolves to the remote value. + */ +template +struct basic_reduce +{ + BOOST_STATIC_CONSTANT(bool, non_default_resolver = false); + + /// Returns a default-constructed T object + template + T operator()(const Key&) const { return T(); } + + /// Returns the remote value + template + const T& operator()(const Key&, const T&, const T& remote) const + { return remote; } +}; + +} } // end namespace boost::parallel + +#endif // BOOST_PARALLEL_BASIC_REDUCE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/container_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/container_traits.hpp new file mode 100644 index 0000000000..f4dd0e9f89 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/container_traits.hpp @@ -0,0 +1,45 @@ +// Copyright (C) 2004-2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +// +// This file contains traits that describe +// +#ifndef BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP +#define BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +namespace boost { namespace graph { namespace parallel { + +template +struct process_group_type +{ + typedef typename T::process_group_type type; +}; + +template +inline typename process_group_type::type +process_group(const T& x) +{ return x.process_group(); } + +// Helper function that algorithms should use to get the process group +// out of a container. +template +inline typename process_group_type::type +process_group_adl(const Container& container) +{ + return process_group(container); +} + + +} } } // end namespace boost::graph::parallel + +#endif // BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/inplace_all_to_all.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/inplace_all_to_all.hpp new file mode 100644 index 0000000000..a403ad7739 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/inplace_all_to_all.hpp @@ -0,0 +1,78 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +#ifndef BOOST_GRAPH_PARALLEL_INPLACE_ALL_TO_ALL_HPP +#define BOOST_GRAPH_PARALLEL_INPLACE_ALL_TO_ALL_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +// +// Implements the inplace all-to-all communication algorithm. +// +#include +#include + +namespace boost { namespace parallel { + +template +// where {LinearProcessGroup, MessagingProcessGroup} +void +inplace_all_to_all(ProcessGroup pg, + const std::vector >& outgoing, + std::vector >& incoming) +{ + typedef typename std::vector::size_type size_type; + + typedef typename ProcessGroup::process_size_type process_size_type; + typedef typename ProcessGroup::process_id_type process_id_type; + + process_size_type p = num_processes(pg); + + // Make sure there are no straggling messages + synchronize(pg); + + // Send along the count (always) and the data (if count > 0) + for (process_id_type dest = 0; dest < p; ++dest) { + if (dest != process_id(pg)) { + send(pg, dest, 0, outgoing[dest].size()); + if (!outgoing[dest].empty()) + send(pg, dest, 1, &outgoing[dest].front(), outgoing[dest].size()); + } + } + + // Make sure all of the data gets transferred + synchronize(pg); + + // Receive the sizes and data + for (process_id_type source = 0; source < p; ++source) { + if (source != process_id(pg)) { + size_type size; + receive(pg, source, 0, size); + incoming[source].resize(size); + if (size > 0) + receive(pg, source, 1, &incoming[source].front(), size); + } else if (&incoming != &outgoing) { + incoming[source] = outgoing[source]; + } + } +} + +template +// where {LinearProcessGroup, MessagingProcessGroup} +void +inplace_all_to_all(ProcessGroup pg, std::vector >& data) +{ + inplace_all_to_all(pg, data, data); +} + +} } // end namespace boost::parallel + +#endif // BOOST_GRAPH_PARALLEL_INPLACE_ALL_TO_ALL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/property_holders.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/property_holders.hpp new file mode 100644 index 0000000000..bbdbeba6c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/property_holders.hpp @@ -0,0 +1,152 @@ +// Copyright (C) 2007 Douglas Gregor and Matthias Troyer +// +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// +// This file contains helper data structures for use in transmitting +// properties. The basic idea is to optimize away any storage for the +// properties when no properties are specified. +#ifndef BOOST_PARALLEL_DETAIL_PROPERTY_HOLDERS_HPP +#define BOOST_PARALLEL_DETAIL_PROPERTY_HOLDERS_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include + +namespace boost { namespace detail { namespace parallel { + +/** + * This structure contains an instance of @c Property, unless @c + * Property is a placeholder for "no property". Always access the + * property through @c get_property. Typically used as a base class. + */ +template +struct maybe_store_property +{ + maybe_store_property() {} + maybe_store_property(const Property& p) : p(p) {} + + Property& get_property() { return p; } + const Property& get_property() const { return p; } + +private: + Property p; + + friend class boost::serialization::access; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & p; + } +}; + +template<> +struct maybe_store_property +{ + maybe_store_property() {} + maybe_store_property(no_property) {} + + no_property get_property() const { return no_property(); } + +private: + friend class boost::serialization::access; + + template + void serialize(Archiver&, const unsigned int /*version*/) { } +}; + +/** + * This structure is a simple pair that also contains a property. + */ +template +class pair_with_property + : public boost::parallel::detail::untracked_pair + , public maybe_store_property +{ +public: + typedef boost::parallel::detail::untracked_pair pair_base; + typedef maybe_store_property property_base; + + pair_with_property() { } + + pair_with_property(const T& t, const U& u, const Property& property) + : pair_base(t, u), property_base(property) { } + +private: + friend class boost::serialization::access; + + template + void serialize(Archiver& ar, const unsigned int /*version*/) + { + ar & boost::serialization::base_object(*this) + & boost::serialization::base_object(*this); + } +}; + +template +inline pair_with_property +make_pair_with_property(const T& t, const U& u, const Property& property) +{ + return pair_with_property(t, u, property); +} + +} } } // end namespace boost::parallel::detail + +namespace boost { namespace mpi { + +template<> +struct is_mpi_datatype > : mpl::true_ { }; + +template +struct is_mpi_datatype > + : is_mpi_datatype { }; + +template +struct is_mpi_datatype > + : boost::mpl::and_ >, + is_mpi_datatype > { }; + +} } // end namespace boost::mpi + +BOOST_IS_BITWISE_SERIALIZABLE(boost::detail::parallel::maybe_store_property) + +namespace boost { namespace serialization { + +template +struct is_bitwise_serializable > + : is_bitwise_serializable { }; + +template +struct implementation_level > + : mpl::int_ {} ; + +template +struct tracking_level > + : mpl::int_ {} ; + +template +struct is_bitwise_serializable< + boost::detail::parallel::pair_with_property > + : boost::mpl::and_ >, + is_bitwise_serializable > { }; + +template +struct implementation_level< + boost::detail::parallel::pair_with_property > + : mpl::int_ {} ; + +template +struct tracking_level< + boost::detail::parallel::pair_with_property > + : mpl::int_ {} ; + +} } // end namespace boost::serialization + +#endif // BOOST_PARALLEL_DETAIL_PROPERTY_HOLDERS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/untracked_pair.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/untracked_pair.hpp new file mode 100644 index 0000000000..3554910f07 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/detail/untracked_pair.hpp @@ -0,0 +1,85 @@ +// Copyright (C) 2007 Matthias Troyer +// +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// +// This file contains helper data structures for use in transmitting +// properties. The basic idea is to optimize away any storage for the +// properties when no properties are specified. +#ifndef BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP +#define BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include // for std::pair +#include + +namespace boost { namespace parallel { namespace detail { + +/** + * This structure is like std::pair, with the only difference + * that tracking in the serialization library is turned off. + */ + +template +struct untracked_pair : public std::pair +{ + untracked_pair() {} + + untracked_pair(const T& t, const U& u) + : std::pair(t,u) {} + + template + untracked_pair(std::pair const& p) + : std::pair(p) {} +}; + +template +inline untracked_pair +make_untracked_pair(const T& t, const U& u) +{ + return untracked_pair(t,u); +} + +} } } // end namespace boost::parallel::detail + +namespace boost { namespace mpi { + +template +struct is_mpi_datatype > + : is_mpi_datatype > {}; + +} } // end namespace boost::mpi + +namespace boost { namespace serialization { + +// pair +template +inline void serialize( + Archive & ar, + boost::parallel::detail::untracked_pair & p, + const unsigned int /* file_version */ +){ + ar & boost::serialization::make_nvp("first", p.first); + ar & boost::serialization::make_nvp("second", p.second); +} + +template +struct is_bitwise_serializable< + boost::parallel::detail::untracked_pair > + : is_bitwise_serializable > {}; + +template +struct implementation_level > + : mpl::int_ {} ; + +template +struct tracking_level > + : mpl::int_ {} ; + +} } // end namespace boost::serialization + +#endif // BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/distribution.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/distribution.hpp new file mode 100644 index 0000000000..d717a1f822 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/distribution.hpp @@ -0,0 +1,614 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Peter Gottschling +// Andrew Lumsdaine +#ifndef BOOST_PARALLEL_DISTRIBUTION_HPP +#define BOOST_PARALLEL_DISTRIBUTION_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace parallel { + +template +class variant_distribution +{ +public: + typedef typename ProcessGroup::process_id_type process_id_type; + typedef typename ProcessGroup::process_size_type process_size_type; + typedef SizeType size_type; + +private: + struct basic_distribution + { + virtual ~basic_distribution() {} + virtual size_type block_size(process_id_type, size_type) const = 0; + virtual process_id_type in_process(size_type) const = 0; + virtual size_type local(size_type) const = 0; + virtual size_type global(size_type) const = 0; + virtual size_type global(process_id_type, size_type) const = 0; + virtual void* address() = 0; + virtual const void* address() const = 0; + virtual const std::type_info& type() const = 0; + }; + + template + struct poly_distribution : public basic_distribution + { + explicit poly_distribution(const Distribution& distribution) + : distribution_(distribution) { } + + virtual size_type block_size(process_id_type id, size_type n) const + { return distribution_.block_size(id, n); } + + virtual process_id_type in_process(size_type i) const + { return distribution_(i); } + + virtual size_type local(size_type i) const + { return distribution_.local(i); } + + virtual size_type global(size_type n) const + { return distribution_.global(n); } + + virtual size_type global(process_id_type id, size_type n) const + { return distribution_.global(id, n); } + + virtual void* address() { return &distribution_; } + virtual const void* address() const { return &distribution_; } + virtual const std::type_info& type() const { return typeid(Distribution); } + + private: + Distribution distribution_; + }; + +public: + variant_distribution() { } + + template + variant_distribution(const Distribution& distribution) + : distribution_(new poly_distribution(distribution)) { } + + size_type block_size(process_id_type id, size_type n) const + { return distribution_->block_size(id, n); } + + process_id_type operator()(size_type i) const + { return distribution_->in_process(i); } + + size_type local(size_type i) const + { return distribution_->local(i); } + + size_type global(size_type n) const + { return distribution_->global(n); } + + size_type global(process_id_type id, size_type n) const + { return distribution_->global(id, n); } + + operator bool() const { return distribution_; } + + void clear() { distribution_.reset(); } + + template + T* as() + { + if (distribution_->type() == typeid(T)) + return static_cast(distribution_->address()); + else + return 0; + } + + template + const T* as() const + { + if (distribution_->type() == typeid(T)) + return static_cast(distribution_->address()); + else + return 0; + } + +private: + shared_ptr distribution_; +}; + +struct block +{ + template + explicit block(const LinearProcessGroup& pg, std::size_t n) + : id(process_id(pg)), p(num_processes(pg)), n(n) { } + + // If there are n elements in the distributed data structure, returns the number of elements stored locally. + template + SizeType block_size(SizeType n) const + { return (n / p) + ((std::size_t)(n % p) > id? 1 : 0); } + + // If there are n elements in the distributed data structure, returns the number of elements stored on processor ID + template + SizeType block_size(ProcessID id, SizeType n) const + { return (n / p) + ((ProcessID)(n % p) > id? 1 : 0); } + + // Returns the processor on which element with global index i is stored + template + SizeType operator()(SizeType i) const + { + SizeType cutoff_processor = n % p; + SizeType cutoff = cutoff_processor * (n / p + 1); + + if (i < cutoff) return i / (n / p + 1); + else return cutoff_processor + (i - cutoff) / (n / p); + } + + // Find the starting index for processor with the given id + template + std::size_t start(ID id) const + { + std::size_t estimate = id * (n / p + 1); + ID cutoff_processor = n % p; + if (id < cutoff_processor) return estimate; + else return estimate - (id - cutoff_processor); + } + + // Find the local index for the ith global element + template + SizeType local(SizeType i) const + { + SizeType owner = (*this)(i); + return i - start(owner); + } + + // Returns the global index of local element i + template + SizeType global(SizeType i) const + { return global(id, i); } + + // Returns the global index of the ith local element on processor id + template + SizeType global(ProcessID id, SizeType i) const + { return i + start(id); } + + private: + std::size_t id; //< The ID number of this processor + std::size_t p; //< The number of processors + std::size_t n; //< The size of the problem space +}; + +// Block distribution with arbitrary block sizes +struct uneven_block +{ + typedef std::vector size_vector; + + template + explicit uneven_block(const LinearProcessGroup& pg, const std::vector& local_sizes) + : id(process_id(pg)), p(num_processes(pg)), local_sizes(local_sizes) + { + assert(local_sizes.size() == p); + local_starts.resize(p + 1); + local_starts[0] = 0; + std::partial_sum(local_sizes.begin(), local_sizes.end(), &local_starts[1]); + n = local_starts[p]; + } + + // To do maybe: enter local size in each process and gather in constructor (much handier) + // template + // explicit uneven_block(const LinearProcessGroup& pg, std::size_t my_local_size) + + // If there are n elements in the distributed data structure, returns the number of elements stored locally. + template + SizeType block_size(SizeType) const + { return local_sizes[id]; } + + // If there are n elements in the distributed data structure, returns the number of elements stored on processor ID + template + SizeType block_size(ProcessID id, SizeType) const + { return local_sizes[id]; } + + // Returns the processor on which element with global index i is stored + template + SizeType operator()(SizeType i) const + { + assert (i >= (SizeType) 0 && i < (SizeType) n); // check for valid range + size_vector::const_iterator lb = std::lower_bound(local_starts.begin(), local_starts.end(), (std::size_t) i); + return ((SizeType)(*lb) == i ? lb : --lb) - local_starts.begin(); + } + + // Find the starting index for processor with the given id + template + std::size_t start(ID id) const + { + return local_starts[id]; + } + + // Find the local index for the ith global element + template + SizeType local(SizeType i) const + { + SizeType owner = (*this)(i); + return i - start(owner); + } + + // Returns the global index of local element i + template + SizeType global(SizeType i) const + { return global(id, i); } + + // Returns the global index of the ith local element on processor id + template + SizeType global(ProcessID id, SizeType i) const + { return i + start(id); } + + private: + std::size_t id; //< The ID number of this processor + std::size_t p; //< The number of processors + std::size_t n; //< The size of the problem space + std::vector local_sizes; //< The sizes of all blocks + std::vector local_starts; //< Lowest global index of each block +}; + + +struct oned_block_cyclic +{ + template + explicit oned_block_cyclic(const LinearProcessGroup& pg, std::size_t size) + : id(process_id(pg)), p(num_processes(pg)), size(size) { } + + template + SizeType block_size(SizeType n) const + { + return block_size(id, n); + } + + template + SizeType block_size(ProcessID id, SizeType n) const + { + SizeType all_blocks = n / size; + SizeType extra_elements = n % size; + SizeType everyone_gets = all_blocks / p; + SizeType extra_blocks = all_blocks % p; + SizeType my_blocks = everyone_gets + (p < extra_blocks? 1 : 0); + SizeType my_elements = my_blocks * size + + (p == extra_blocks? extra_elements : 0); + return my_elements; + } + + template + SizeType operator()(SizeType i) const + { + return (i / size) % p; + } + + template + SizeType local(SizeType i) const + { + return ((i / size) / p) * size + i % size; + } + + template + SizeType global(SizeType i) const + { return global(id, i); } + + template + SizeType global(ProcessID id, SizeType i) const + { + return ((i / size) * p + id) * size + i % size; + } + + private: + std::size_t id; //< The ID number of this processor + std::size_t p; //< The number of processors + std::size_t size; //< Block size +}; + +struct twod_block_cyclic +{ + template + explicit twod_block_cyclic(const LinearProcessGroup& pg, + std::size_t block_rows, std::size_t block_columns, + std::size_t data_columns_per_row) + : id(process_id(pg)), p(num_processes(pg)), + block_rows(block_rows), block_columns(block_columns), + data_columns_per_row(data_columns_per_row) + { } + + template + SizeType block_size(SizeType n) const + { + return block_size(id, n); + } + + template + SizeType block_size(ProcessID id, SizeType n) const + { + // TBD: This is really lame :) + int result = -1; + while (n > 0) { + --n; + if ((*this)(n) == id && (int)local(n) > result) result = local(n); + } + ++result; + + // std::cerr << "Block size of id " << id << " is " << result << std::endl; + return result; + } + + template + SizeType operator()(SizeType i) const + { + SizeType result = get_block_num(i) % p; + // std::cerr << "Item " << i << " goes on processor " << result << std::endl; + return result; + } + + template + SizeType local(SizeType i) const + { + // Compute the start of the block + std::size_t block_num = get_block_num(i); + // std::cerr << "Item " << i << " is in block #" << block_num << std::endl; + + std::size_t local_block_num = block_num / p; + std::size_t block_start = local_block_num * block_rows * block_columns; + + // Compute the offset into the block + std::size_t data_row = i / data_columns_per_row; + std::size_t data_col = i % data_columns_per_row; + std::size_t block_offset = (data_row % block_rows) * block_columns + + (data_col % block_columns); + + // std::cerr << "Item " << i << " maps to local index " << block_start+block_offset << std::endl; + return block_start + block_offset; + } + + template + SizeType global(SizeType i) const + { + // Compute the (global) block in which this element resides + SizeType local_block_num = i / (block_rows * block_columns); + SizeType block_offset = i % (block_rows * block_columns); + SizeType block_num = local_block_num * p + id; + + // Compute the position of the start of the block (globally) + SizeType block_start = block_num * block_rows * block_columns; + + std::cerr << "Block " << block_num << " starts at index " << block_start + << std::endl; + + // Compute the row and column of this block + SizeType block_row = block_num / (data_columns_per_row / block_columns); + SizeType block_col = block_num % (data_columns_per_row / block_columns); + + SizeType row_in_block = block_offset / block_columns; + SizeType col_in_block = block_offset % block_columns; + + std::cerr << "Local index " << i << " is in block at row " << block_row + << ", column " << block_col << ", in-block row " << row_in_block + << ", in-block col " << col_in_block << std::endl; + + SizeType result = block_row * block_rows + block_col * block_columns + + row_in_block * block_rows + col_in_block; + + + std::cerr << "global(" << i << "@" << id << ") = " << result + << " =? " << local(result) << std::endl; + assert(i == local(result)); + return result; + } + + private: + template + std::size_t get_block_num(SizeType i) const + { + std::size_t data_row = i / data_columns_per_row; + std::size_t data_col = i % data_columns_per_row; + std::size_t block_row = data_row / block_rows; + std::size_t block_col = data_col / block_columns; + std::size_t blocks_in_row = data_columns_per_row / block_columns; + std::size_t block_num = block_col * blocks_in_row + block_row; + return block_num; + } + + std::size_t id; //< The ID number of this processor + std::size_t p; //< The number of processors + std::size_t block_rows; //< The # of rows in each block + std::size_t block_columns; //< The # of columns in each block + std::size_t data_columns_per_row; //< The # of columns per row of data +}; + +class twod_random +{ + template + struct random_int + { + explicit random_int(RandomNumberGen& gen) : gen(gen) { } + + template + T operator()(T n) const + { + uniform_int distrib(0, n-1); + return distrib(gen); + } + + private: + RandomNumberGen& gen; + }; + + public: + template + explicit twod_random(const LinearProcessGroup& pg, + std::size_t block_rows, std::size_t block_columns, + std::size_t data_columns_per_row, + std::size_t n, + RandomNumberGen& gen) + : id(process_id(pg)), p(num_processes(pg)), + block_rows(block_rows), block_columns(block_columns), + data_columns_per_row(data_columns_per_row), + global_to_local(n / (block_rows * block_columns)) + { + std::copy(make_counting_iterator(std::size_t(0)), + make_counting_iterator(global_to_local.size()), + global_to_local.begin()); + + random_int rand(gen); + std::random_shuffle(global_to_local.begin(), global_to_local.end(), rand); + } + + template + SizeType block_size(SizeType n) const + { + return block_size(id, n); + } + + template + SizeType block_size(ProcessID id, SizeType n) const + { + // TBD: This is really lame :) + int result = -1; + while (n > 0) { + --n; + if ((*this)(n) == id && (int)local(n) > result) result = local(n); + } + ++result; + + // std::cerr << "Block size of id " << id << " is " << result << std::endl; + return result; + } + + template + SizeType operator()(SizeType i) const + { + SizeType result = get_block_num(i) % p; + // std::cerr << "Item " << i << " goes on processor " << result << std::endl; + return result; + } + + template + SizeType local(SizeType i) const + { + // Compute the start of the block + std::size_t block_num = get_block_num(i); + // std::cerr << "Item " << i << " is in block #" << block_num << std::endl; + + std::size_t local_block_num = block_num / p; + std::size_t block_start = local_block_num * block_rows * block_columns; + + // Compute the offset into the block + std::size_t data_row = i / data_columns_per_row; + std::size_t data_col = i % data_columns_per_row; + std::size_t block_offset = (data_row % block_rows) * block_columns + + (data_col % block_columns); + + // std::cerr << "Item " << i << " maps to local index " << block_start+block_offset << std::endl; + return block_start + block_offset; + } + + private: + template + std::size_t get_block_num(SizeType i) const + { + std::size_t data_row = i / data_columns_per_row; + std::size_t data_col = i % data_columns_per_row; + std::size_t block_row = data_row / block_rows; + std::size_t block_col = data_col / block_columns; + std::size_t blocks_in_row = data_columns_per_row / block_columns; + std::size_t block_num = block_col * blocks_in_row + block_row; + return global_to_local[block_num]; + } + + std::size_t id; //< The ID number of this processor + std::size_t p; //< The number of processors + std::size_t block_rows; //< The # of rows in each block + std::size_t block_columns; //< The # of columns in each block + std::size_t data_columns_per_row; //< The # of columns per row of data + std::vector global_to_local; +}; + +class random_distribution +{ + template + struct random_int + { + explicit random_int(RandomNumberGen& gen) : gen(gen) { } + + template + T operator()(T n) const + { + uniform_int distrib(0, n-1); + return distrib(gen); + } + + private: + RandomNumberGen& gen; + }; + + public: + template + random_distribution(const LinearProcessGroup& pg, RandomNumberGen& gen, + std::size_t n) + : base(pg, n), local_to_global(n), global_to_local(n) + { + std::copy(make_counting_iterator(std::size_t(0)), + make_counting_iterator(n), + local_to_global.begin()); + + random_int rand(gen); + std::random_shuffle(local_to_global.begin(), local_to_global.end(), rand); + + + for (std::vector::size_type i = 0; i < n; ++i) + global_to_local[local_to_global[i]] = i; + } + + template + SizeType block_size(SizeType n) const + { return base.block_size(n); } + + template + SizeType block_size(ProcessID id, SizeType n) const + { return base.block_size(id, n); } + + template + SizeType operator()(SizeType i) const + { + return base(global_to_local[i]); + } + + template + SizeType local(SizeType i) const + { + return base.local(global_to_local[i]); + } + + template + SizeType global(ProcessID p, SizeType i) const + { + return local_to_global[base.global(p, i)]; + } + + template + SizeType global(SizeType i) const + { + return local_to_global[base.global(i)]; + } + + private: + block base; + std::vector local_to_global; + std::vector global_to_local; +}; + +} } // end namespace boost::parallel + +#endif // BOOST_PARALLEL_DISTRIBUTION_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/process_group.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/process_group.hpp new file mode 100644 index 0000000000..280ee4db54 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/process_group.hpp @@ -0,0 +1,101 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PARALLEL_PROCESS_GROUP_HPP +#define BOOST_GRAPH_PARALLEL_PROCESS_GROUP_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include + +namespace boost { namespace graph { namespace parallel { + +/** + * A special type used as a flag to a process group constructor that + * indicates that the copy of a process group will represent a new + * distributed data structure. + */ +struct attach_distributed_object { }; + +/** + * Describes the context in which a trigger is being invoked to + * receive a message. + */ +enum trigger_receive_context { + /// No trigger is active at this time. + trc_none, + /// The trigger is being invoked during synchronization, at the end + /// of a superstep. + trc_in_synchronization, + /// The trigger is being invoked as an "early" receive of a message + /// that was sent through the normal "send" operations to be + /// received by the end of the superstep, but the process group sent + /// the message earlier to clear its buffers. + trc_early_receive, + /// The trigger is being invoked for an out-of-band message, which + /// must be handled immediately. + trc_out_of_band, + /// The trigger is being invoked for an out-of-band message, which + /// must be handled immediately and has alredy been received by + /// an MPI_IRecv call. + trc_irecv_out_of_band +}; + +// Process group tags +struct process_group_tag {}; +struct linear_process_group_tag : virtual process_group_tag {}; +struct messaging_process_group_tag : virtual process_group_tag {}; +struct immediate_process_group_tag : virtual messaging_process_group_tag {}; +struct bsp_process_group_tag : virtual messaging_process_group_tag {}; +struct batch_process_group_tag : virtual messaging_process_group_tag {}; +struct locking_process_group_tag : virtual process_group_tag {}; +struct spawning_process_group_tag : virtual process_group_tag {}; + +struct process_group_archetype +{ + typedef int process_id_type; +}; + +void wait(process_group_archetype&); +void synchronize(process_group_archetype&); +int process_id(const process_group_archetype&); +int num_processes(const process_group_archetype&); + +template void send(process_group_archetype&, int, int, const T&); + +template +process_group_archetype::process_id_type +receive(const process_group_archetype& pg, + process_group_archetype::process_id_type source, int tag, T& value); + +template +std::pair +receive(const process_group_archetype& pg, int tag, T values[], std::size_t n); + +template +std::pair +receive(const process_group_archetype& pg, + process_group_archetype::process_id_type source, int tag, T values[], + std::size_t n); + +} } } // end namespace boost::graph::parallel + +namespace boost { namespace graph { namespace distributed { + using parallel::trigger_receive_context; + using parallel::trc_early_receive; + using parallel::trc_out_of_band; + using parallel::trc_irecv_out_of_band; + using parallel::trc_in_synchronization; + using parallel::trc_none; + using parallel::attach_distributed_object; +} } } // end namespace boost::graph::distributed + +#endif // BOOST_GRAPH_PARALLEL_PROCESS_GROUP_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/properties.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/properties.hpp new file mode 100644 index 0000000000..c6bb0bb05c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/properties.hpp @@ -0,0 +1,111 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +#ifndef BOOST_GRAPH_PARALLEL_PROPERTIES_HPP +#define BOOST_GRAPH_PARALLEL_PROPERTIES_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include +#include + +namespace boost { + /*************************************************************************** + * Property map reduction operations + ***************************************************************************/ + /** + * Metafunction that produces a reduction operation for the given + * property. The default behavior merely forwards to @ref + * basic_reduce, but it is expected that this class template will be + * specified for important properties. + */ + template + struct property_reduce + { + template + class apply : public parallel::basic_reduce {}; + }; + + /** + * Reduction of vertex colors can only darken, not lighten, the + * color. Black cannot turn black, grey can only turn black, and + * white can be changed to either color. The default color is white. + */ + template<> + struct property_reduce + { + template + class apply + { + typedef color_traits traits; + + public: + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + template + Color operator()(const Key&) const { return traits::white(); } + + template + Color operator()(const Key&, Color local, Color remote) const { + if (local == traits::white()) return remote; + else if (remote == traits::black()) return remote; + else return local; + } + }; + }; + + /** + * Reduction of a distance always takes the shorter distance. The + * default distance value is the maximum value for the data type. + */ + template<> + struct property_reduce + { + template + class apply + { + public: + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + template + T operator()(const Key&) const { return (std::numeric_limits::max)(); } + + template + T operator()(const Key&, T x, T y) const { return x < y? x : y; } + }; + }; + + template<> + struct property_reduce + { + template + class apply + { + public: + BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); + + T operator()(T key) const { return key; } + T operator()(T key, T, T y) const { return y; } + }; + }; + + template + inline void set_property_map_role(Property p, PropertyMap pm) + { + typedef typename property_traits::value_type value_type; + typedef property_reduce property_red; + typedef typename property_red::template apply reduce; + + pm.set_reduce(reduce()); + } + +} // end namespace boost +#endif // BOOST_GRAPH_PARALLEL_PROPERTIES_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/simple_trigger.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/simple_trigger.hpp new file mode 100644 index 0000000000..b1639bf21d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/parallel/simple_trigger.hpp @@ -0,0 +1,108 @@ +// Copyright (C) 2007 Douglas Gregor + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This file contains a simplification of the "trigger" method for +// process groups. The simple trigger handles the common case where +// the handler associated with a trigger is a member function bound to +// a particular pointer. + +#ifndef BOOST_GRAPH_PARALLEL_SIMPLE_TRIGGER_HPP +#define BOOST_GRAPH_PARALLEL_SIMPLE_TRIGGER_HPP + +#ifndef BOOST_GRAPH_USE_MPI +#error "Parallel BGL files should not be included unless has been included" +#endif + +#include + +namespace boost { namespace graph { namespace parallel { + +namespace detail { + +/** + * INTERNAL ONLY + * + * The actual function object that bridges from the normal trigger + * interface to the simplified interface. This is the equivalent of + * bind(pmf, self, _1, _2, _3, _4), but without the compile-time + * overhead of bind. + */ +template +class simple_trigger_t +{ +public: + simple_trigger_t(Class* self, + Result (Class::*pmf)(int, int, const T&, + trigger_receive_context)) + : self(self), pmf(pmf) { } + + Result + operator()(int source, int tag, const T& data, + trigger_receive_context context) const + { + return (self->*pmf)(source, tag, data, context); + } + +private: + Class* self; + Result (Class::*pmf)(int, int, const T&, trigger_receive_context); +}; + +} // end namespace detail + +/** + * Simplified trigger interface that reduces the amount of code + * required to connect a process group trigger to a handler that is + * just a bound member function. + * + * INTERNAL ONLY + */ +template +inline void +simple_trigger(ProcessGroup& pg, int tag, Class* self, + void (Class::*pmf)(int source, int tag, const T& data, + trigger_receive_context context), int) +{ + pg.template trigger(tag, + detail::simple_trigger_t(self, pmf)); +} + +/** + * Simplified trigger interface that reduces the amount of code + * required to connect a process group trigger with a reply to a + * handler that is just a bound member function. + * + * INTERNAL ONLY + */ +template +inline void +simple_trigger(ProcessGroup& pg, int tag, Class* self, + Result (Class::*pmf)(int source, int tag, const T& data, + trigger_receive_context context), long) +{ + pg.template trigger_with_reply + (tag, detail::simple_trigger_t(self, pmf)); +} + +/** + * Simplified trigger interface that reduces the amount of code + * required to connect a process group trigger to a handler that is + * just a bound member function. + */ +template +inline void +simple_trigger(ProcessGroup& pg, int tag, Class* self, + Result (Class::*pmf)(int source, int tag, const T& data, + trigger_receive_context context)) +{ + // We pass 0 (an int) to help VC++ disambiguate calls to simple_trigger + // with Result=void. + simple_trigger(pg, tag, self, pmf, 0); +} + +} } } // end namespace boost::graph::parallel + +#endif // BOOST_GRAPH_PARALLEL_SIMPLE_TRIGGER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_canonical_ordering.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_canonical_ordering.hpp new file mode 100644 index 0000000000..d43ea4785e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_canonical_ordering.hpp @@ -0,0 +1,214 @@ +//======================================================================= +// Copyright (c) Aaron Windsor 2007 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef __PLANAR_CANONICAL_ORDERING_HPP__ +#define __PLANAR_CANONICAL_ORDERING_HPP__ + +#include +#include +#include +#include //for next and prior +#include +#include + + +namespace boost +{ + + + namespace detail { + enum planar_canonical_ordering_state + {PCO_PROCESSED, + PCO_UNPROCESSED, + PCO_ONE_NEIGHBOR_PROCESSED, + PCO_READY_TO_BE_PROCESSED}; + } + + template + void planar_canonical_ordering(const Graph& g, + PlanarEmbedding embedding, + OutputIterator ordering, + VertexIndexMap vm) + { + + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename graph_traits::vertex_iterator vertex_iterator_t; + typedef typename graph_traits::adjacency_iterator + adjacency_iterator_t; + typedef typename std::pair vertex_pair_t; + typedef typename property_traits::value_type + embedding_value_t; + typedef typename embedding_value_t::const_iterator embedding_iterator_t; + typedef iterator_property_map + ::iterator, VertexIndexMap> + vertex_to_vertex_map_t; + typedef iterator_property_map + ::iterator, VertexIndexMap> + vertex_to_size_t_map_t; + + std::vector processed_neighbor_vector(num_vertices(g)); + vertex_to_vertex_map_t processed_neighbor + (processed_neighbor_vector.begin(), vm); + + std::vector status_vector(num_vertices(g), detail::PCO_UNPROCESSED); + vertex_to_size_t_map_t status(status_vector.begin(), vm); + + std::list ready_to_be_processed; + + vertex_t first_vertex = *vertices(g).first; + vertex_t second_vertex; + adjacency_iterator_t ai, ai_end; + for(tie(ai,ai_end) = adjacent_vertices(first_vertex,g); ai != ai_end; ++ai) + { + if (*ai == first_vertex) + continue; + second_vertex = *ai; + break; + } + + ready_to_be_processed.push_back(first_vertex); + status[first_vertex] = detail::PCO_READY_TO_BE_PROCESSED; + ready_to_be_processed.push_back(second_vertex); + status[second_vertex] = detail::PCO_READY_TO_BE_PROCESSED; + + while(!ready_to_be_processed.empty()) + { + vertex_t u = ready_to_be_processed.front(); + ready_to_be_processed.pop_front(); + + if (status[u] != detail::PCO_READY_TO_BE_PROCESSED && u != second_vertex) + continue; + + embedding_iterator_t ei, ei_start, ei_end; + embedding_iterator_t next_edge_itr, prior_edge_itr; + + ei_start = embedding[u].begin(); + ei_end = embedding[u].end(); + prior_edge_itr = prior(ei_end); + while(source(*prior_edge_itr, g) == target(*prior_edge_itr,g)) + prior_edge_itr = prior(prior_edge_itr); + + for(ei = ei_start; ei != ei_end; ++ei) + { + + edge_t e(*ei); // e = (u,v) + next_edge_itr = boost::next(ei) == ei_end ? ei_start : boost::next(ei); + vertex_t v = source(e,g) == u ? target(e,g) : source(e,g); + + vertex_t prior_vertex = source(*prior_edge_itr, g) == u ? + target(*prior_edge_itr, g) : source(*prior_edge_itr, g); + vertex_t next_vertex = source(*next_edge_itr, g) == u ? + target(*next_edge_itr, g) : source(*next_edge_itr, g); + + // Need prior_vertex, u, v, and next_vertex to all be + // distinct. This is possible, since the input graph is + // triangulated. It'll be true all the time in a simple + // graph, but loops and parallel edges cause some complications. + if (prior_vertex == v || prior_vertex == u) + { + prior_edge_itr = ei; + continue; + } + + //Skip any self-loops + if (u == v) + continue; + + // Move next_edge_itr (and next_vertex) forwards + // past any loops or parallel edges + while (next_vertex == v || next_vertex == u) + { + next_edge_itr = boost::next(next_edge_itr) == ei_end ? + ei_start : boost::next(next_edge_itr); + next_vertex = source(*next_edge_itr, g) == u ? + target(*next_edge_itr, g) : source(*next_edge_itr, g); + } + + + if (status[v] == detail::PCO_UNPROCESSED) + { + status[v] = detail::PCO_ONE_NEIGHBOR_PROCESSED; + processed_neighbor[v] = u; + } + else if (status[v] == detail::PCO_ONE_NEIGHBOR_PROCESSED) + { + vertex_t x = processed_neighbor[v]; + //are edges (v,u) and (v,x) adjacent in the planar + //embedding? if so, set status[v] = 1. otherwise, set + //status[v] = 2. + + if ((next_vertex == x && + !(first_vertex == u && second_vertex == x) + ) + || + (prior_vertex == x && + !(first_vertex == x && second_vertex == u) + ) + ) + { + status[v] = detail::PCO_READY_TO_BE_PROCESSED; + } + else + { + status[v] = detail::PCO_READY_TO_BE_PROCESSED + 1; + } + } + else if (status[v] > detail::PCO_ONE_NEIGHBOR_PROCESSED) + { + //check the two edges before and after (v,u) in the planar + //embedding, and update status[v] accordingly + + bool processed_before = false; + if (status[prior_vertex] == detail::PCO_PROCESSED) + processed_before = true; + + bool processed_after = false; + if (status[next_vertex] == detail::PCO_PROCESSED) + processed_after = true; + + if (!processed_before && !processed_after) + ++status[v]; + + else if (processed_before && processed_after) + --status[v]; + + } + + if (status[v] == detail::PCO_READY_TO_BE_PROCESSED) + ready_to_be_processed.push_back(v); + + prior_edge_itr = ei; + + } + + status[u] = detail::PCO_PROCESSED; + *ordering = u; + ++ordering; + + } + + } + + + template + void planar_canonical_ordering(const Graph& g, + PlanarEmbedding embedding, + OutputIterator ordering + ) + { + planar_canonical_ordering(g, embedding, ordering, get(vertex_index,g)); + } + + +} //namespace boost + +#endif //__PLANAR_CANONICAL_ORDERING_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/add_edge_visitors.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/add_edge_visitors.hpp new file mode 100644 index 0000000000..9635376990 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/add_edge_visitors.hpp @@ -0,0 +1,59 @@ +//======================================================================= +// Copyright 2007 Aaron Windsor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef __ADD_EDGE_VISITORS_HPP__ +#define __ADD_EDGE_VISITORS_HPP__ + +#include + +namespace boost +{ + + struct default_add_edge_visitor + { + + template + void visit_vertex_pair(Vertex u, Vertex v, Graph& g) + { + add_edge(u,v,g); + } + + }; + + template + struct edge_index_update_visitor + { + + typedef typename + property_traits::value_type edge_index_value_t; + + edge_index_update_visitor(EdgeIndexMap em, + edge_index_value_t next_index_available + ) : + m_em(em), + m_next_index(next_index_available) + {} + + template + void visit_vertex_pair(Vertex u, Vertex v, Graph& g) + { + typedef typename graph_traits::edge_descriptor edge_t; + std::pair return_value = add_edge(u,v,g); + if (return_value.second) + put( m_em, return_value.first, m_next_index++); + } + + private: + + EdgeIndexMap m_em; + edge_index_value_t m_next_index; + + }; + +} // namespace boost + +#endif //__ADD_EDGE_VISITORS_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/boyer_myrvold_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/boyer_myrvold_impl.hpp new file mode 100644 index 0000000000..71607fcbc2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/boyer_myrvold_impl.hpp @@ -0,0 +1,2012 @@ +//======================================================================= +// Copyright (c) Aaron Windsor 2007 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef __BOYER_MYRVOLD_IMPL_HPP__ +#define __BOYER_MYRVOLD_IMPL_HPP__ + +#include +#include +#include //for boost::next +#include //for std::min macros +#include +#include +#include +#include +#include +#include +#include +#include + + + +namespace boost +{ + namespace detail { + enum bm_case_t{BM_NO_CASE_CHOSEN, BM_CASE_A, BM_CASE_B, BM_CASE_C, BM_CASE_D, BM_CASE_E}; + } + + template + struct planar_dfs_visitor : public dfs_visitor<> + { + planar_dfs_visitor(LowPointMap lpm, DFSParentMap dfs_p, + DFSNumberMap dfs_n, LeastAncestorMap lam, + DFSParentEdgeMap dfs_edge) + : low(lpm), + parent(dfs_p), + df_number(dfs_n), + least_ancestor(lam), + df_edge(dfs_edge), + count(0) + {} + + + template + void start_vertex(const Vertex& u, Graph&) + { + put(parent, u, u); + put(least_ancestor, u, count); + } + + + template + void discover_vertex(const Vertex& u, Graph&) + { + put(low, u, count); + put(df_number, u, count); + ++count; + } + + template + void tree_edge(const Edge& e, Graph& g) + { + typedef typename graph_traits::vertex_descriptor vertex_t; + vertex_t s(source(e,g)); + vertex_t t(target(e,g)); + + put(parent, t, s); + put(df_edge, t, e); + put(least_ancestor, t, get(df_number, s)); + } + + template + void back_edge(const Edge& e, Graph& g) + { + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::vertices_size_type v_size_t; + + vertex_t s(source(e,g)); + vertex_t t(target(e,g)); + BOOST_USING_STD_MIN(); + + if ( t != get(parent, s) ) { + v_size_t s_low_df_number = get(low, s); + v_size_t t_df_number = get(df_number, t); + v_size_t s_least_ancestor_df_number = get(least_ancestor, s); + + put(low, s, + min BOOST_PREVENT_MACRO_SUBSTITUTION(s_low_df_number, + t_df_number) + ); + + put(least_ancestor, s, + min BOOST_PREVENT_MACRO_SUBSTITUTION(s_least_ancestor_df_number, + t_df_number + ) + ); + + } + } + + template + void finish_vertex(const Vertex& u, Graph&) + { + typedef typename graph_traits::vertices_size_type v_size_t; + + Vertex u_parent = get(parent, u); + v_size_t u_parent_lowpoint = get(low, u_parent); + v_size_t u_lowpoint = get(low, u); + BOOST_USING_STD_MIN(); + + if (u_parent != u) + { + put(low, u_parent, + min BOOST_PREVENT_MACRO_SUBSTITUTION(u_lowpoint, + u_parent_lowpoint + ) + ); + } + } + + LowPointMap low; + DFSParentMap parent; + DFSNumberMap df_number; + LeastAncestorMap least_ancestor; + DFSParentEdgeMap df_edge; + SizeType count; + + }; + + + + + + + template + class boyer_myrvold_impl + { + + typedef typename graph_traits::vertices_size_type v_size_t; + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename graph_traits::vertex_iterator vertex_iterator_t; + typedef typename graph_traits::edge_iterator edge_iterator_t; + typedef typename graph_traits::out_edge_iterator + out_edge_iterator_t; + typedef graph::detail::face_handle + face_handle_t; + typedef std::vector vertex_vector_t; + typedef std::vector edge_vector_t; + typedef std::list vertex_list_t; + typedef std::list< face_handle_t > face_handle_list_t; + typedef boost::shared_ptr< face_handle_list_t > face_handle_list_ptr_t; + typedef boost::shared_ptr< vertex_list_t > vertex_list_ptr_t; + typedef boost::tuple merge_stack_frame_t; + typedef std::vector merge_stack_t; + + template + struct map_vertex_to_ + { + typedef iterator_property_map + ::iterator, VertexIndexMap> type; + }; + + typedef typename map_vertex_to_::type vertex_to_v_size_map_t; + typedef typename map_vertex_to_::type vertex_to_vertex_map_t; + typedef typename map_vertex_to_::type vertex_to_edge_map_t; + typedef typename map_vertex_to_::type + vertex_to_vertex_list_ptr_map_t; + typedef typename map_vertex_to_< edge_vector_t >::type + vertex_to_edge_vector_map_t; + typedef typename map_vertex_to_::type vertex_to_bool_map_t; + typedef typename map_vertex_to_::type + vertex_to_face_handle_map_t; + typedef typename map_vertex_to_::type + vertex_to_face_handle_list_ptr_map_t; + typedef typename map_vertex_to_::type + vertex_to_separated_node_map_t; + + template + struct face_vertex_iterator + { + typedef face_iterator + type; + }; + + template + struct face_edge_iterator + { + typedef face_iterator + type; + }; + + + + public: + + + + boyer_myrvold_impl(const Graph& arg_g, VertexIndexMap arg_vm): + g(arg_g), + vm(arg_vm), + + low_point_vector(num_vertices(g)), + dfs_parent_vector(num_vertices(g)), + dfs_number_vector(num_vertices(g)), + least_ancestor_vector(num_vertices(g)), + pertinent_roots_vector(num_vertices(g)), + backedge_flag_vector(num_vertices(g), num_vertices(g) + 1), + visited_vector(num_vertices(g), num_vertices(g) + 1), + face_handles_vector(num_vertices(g)), + dfs_child_handles_vector(num_vertices(g)), + separated_dfs_child_list_vector(num_vertices(g)), + separated_node_in_parent_list_vector(num_vertices(g)), + canonical_dfs_child_vector(num_vertices(g)), + flipped_vector(num_vertices(g), false), + backedges_vector(num_vertices(g)), + dfs_parent_edge_vector(num_vertices(g)), + + vertices_by_dfs_num(num_vertices(g)), + + low_point(low_point_vector.begin(), vm), + dfs_parent(dfs_parent_vector.begin(), vm), + dfs_number(dfs_number_vector.begin(), vm), + least_ancestor(least_ancestor_vector.begin(), vm), + pertinent_roots(pertinent_roots_vector.begin(), vm), + backedge_flag(backedge_flag_vector.begin(), vm), + visited(visited_vector.begin(), vm), + face_handles(face_handles_vector.begin(), vm), + dfs_child_handles(dfs_child_handles_vector.begin(), vm), + separated_dfs_child_list(separated_dfs_child_list_vector.begin(), vm), + separated_node_in_parent_list + (separated_node_in_parent_list_vector.begin(), vm), + canonical_dfs_child(canonical_dfs_child_vector.begin(), vm), + flipped(flipped_vector.begin(), vm), + backedges(backedges_vector.begin(), vm), + dfs_parent_edge(dfs_parent_edge_vector.begin(), vm) + + { + + planar_dfs_visitor + vis + (low_point, dfs_parent, dfs_number, least_ancestor, dfs_parent_edge); + + // Perform a depth-first search to find each vertex's low point, least + // ancestor, and dfs tree information + depth_first_search(g, visitor(vis).vertex_index_map(vm)); + + // Sort vertices by their lowpoint - need this later in the constructor + vertex_vector_t vertices_by_lowpoint(num_vertices(g)); + std::copy( vertices(g).first, vertices(g).second, + vertices_by_lowpoint.begin() + ); + bucket_sort(vertices_by_lowpoint.begin(), + vertices_by_lowpoint.end(), + low_point, + num_vertices(g) + ); + + // Sort vertices by their dfs number - need this to iterate by reverse + // DFS number in the main loop. + std::copy( vertices(g).first, vertices(g).second, + vertices_by_dfs_num.begin() + ); + bucket_sort(vertices_by_dfs_num.begin(), + vertices_by_dfs_num.end(), + dfs_number, + num_vertices(g) + ); + + // Initialize face handles. A face handle is an abstraction that serves + // two uses in our implementation - it allows us to efficiently move + // along the outer face of embedded bicomps in a partially embedded + // graph, and it provides storage for the planar embedding. Face + // handles are implemented by a sequence of edges and are associated + // with a particular vertex - the sequence of edges represents the + // current embedding of edges around that vertex, and the first and + // last edges in the sequence represent the pair of edges on the outer + // face that are adjacent to the associated vertex. This lets us embed + // edges in the graph by just pushing them on the front or back of the + // sequence of edges held by the face handles. + // + // Our algorithm starts with a DFS tree of edges (where every vertex is + // an articulation point and every edge is a singleton bicomp) and + // repeatedly merges bicomps by embedding additional edges. Note that + // any bicomp at any point in the algorithm can be associated with a + // unique edge connecting the vertex of that bicomp with the lowest DFS + // number (which we refer to as the "root" of the bicomp) with its DFS + // child in the bicomp: the existence of two such edges would contradict + // the properties of a DFS tree. We refer to the DFS child of the root + // of a bicomp as the "canonical DFS child" of the bicomp. Note that a + // vertex can be the root of more than one bicomp. + // + // We move around the external faces of a bicomp using a few property + // maps, which we'll initialize presently: + // + // - face_handles: maps a vertex to a face handle that can be used to + // move "up" a bicomp. For a vertex that isn't an articulation point, + // this holds the face handles that can be used to move around that + // vertex's unique bicomp. For a vertex that is an articulation point, + // this holds the face handles associated with the unique bicomp that + // the vertex is NOT the root of. These handles can therefore be used + // to move from any point on the outer face of the tree of bicomps + // around the current outer face towards the root of the DFS tree. + // + // - dfs_child_handles: these are used to hold face handles for + // vertices that are articulation points - dfs_child_handles[v] holds + // the face handles corresponding to vertex u in the bicomp with root + // u and canonical DFS child v. + // + // - canonical_dfs_child: this property map allows one to determine the + // canonical DFS child of a bicomp while traversing the outer face. + // This property map is only valid when applied to one of the two + // vertices adjacent to the root of the bicomp on the outer face. To + // be more precise, if v is the canonical DFS child of a bicomp, + // canonical_dfs_child[dfs_child_handles[v].first_vertex()] == v and + // canonical_dfs_child[dfs_child_handles[v].second_vertex()] == v. + // + // - pertinent_roots: given a vertex v, pertinent_roots[v] contains a + // list of face handles pointing to the top of bicomps that need to + // be visited by the current walkdown traversal (since they lead to + // backedges that need to be embedded). These lists are populated by + // the walkup and consumed by the walkdown. + + vertex_iterator_t vi, vi_end; + for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + { + vertex_t v(*vi); + vertex_t parent = dfs_parent[v]; + + if (parent != v) + { + edge_t parent_edge = dfs_parent_edge[v]; + add_to_embedded_edges(parent_edge, StoreOldHandlesPolicy()); + face_handles[v] = face_handle_t(v, parent_edge, g); + dfs_child_handles[v] = face_handle_t(parent, parent_edge, g); + } + else + { + face_handles[v] = face_handle_t(v); + dfs_child_handles[v] = face_handle_t(parent); + } + + canonical_dfs_child[v] = v; + pertinent_roots[v] = face_handle_list_ptr_t(new face_handle_list_t); + separated_dfs_child_list[v] = vertex_list_ptr_t(new vertex_list_t); + + } + + // We need to create a list of not-yet-merged depth-first children for + // each vertex that will be updated as bicomps get merged. We sort each + // list by ascending lowpoint, which allows the externally_active + // function to run in constant time, and we keep a pointer to each + // vertex's representation in its parent's list, which allows merging + //in constant time. + + for(typename vertex_vector_t::iterator itr = + vertices_by_lowpoint.begin(); + itr != vertices_by_lowpoint.end(); ++itr) + { + vertex_t v(*itr); + vertex_t parent(dfs_parent[v]); + if (v != parent) + { + separated_node_in_parent_list[v] = + separated_dfs_child_list[parent]->insert + (separated_dfs_child_list[parent]->end(), v); + } + } + + // The merge stack holds path information during a walkdown iteration + merge_stack.reserve(num_vertices(g)); + + } + + + + + + + bool is_planar() + { + + // This is the main algorithm: starting with a DFS tree of embedded + // edges (which, since it's a tree, is planar), iterate through all + // vertices by reverse DFS number, attempting to embed all backedges + // connecting the current vertex to vertices with higher DFS numbers. + // + // The walkup is a procedure that examines all such backedges and sets + // up the required data structures so that they can be searched by the + // walkdown in linear time. The walkdown does the actual work of + // embedding edges and flipping bicomps, and can identify when it has + // come across a kuratowski subgraph. + // + // store_old_face_handles caches face handles from the previous + // iteration - this is used only for the kuratowski subgraph isolation, + // and is therefore dispatched based on the StoreOldHandlesPolicy. + // + // clean_up_embedding does some clean-up and fills in values that have + // to be computed lazily during the actual execution of the algorithm + // (for instance, whether or not a bicomp is flipped in the final + // embedding). It's dispatched on the the StoreEmbeddingPolicy, since + // it's not needed if an embedding isn't desired. + + typename vertex_vector_t::reverse_iterator vi, vi_end; + + vi_end = vertices_by_dfs_num.rend(); + for(vi = vertices_by_dfs_num.rbegin(); vi != vi_end; ++vi) + { + + store_old_face_handles(StoreOldHandlesPolicy()); + + vertex_t v(*vi); + + walkup(v); + + if (!walkdown(v)) + return false; + + } + + clean_up_embedding(StoreEmbeddingPolicy()); + + return true; + + } + + + + + + + private: + + + + + + void walkup(vertex_t v) + { + + // The point of the walkup is to follow all backedges from v to + // vertices with higher DFS numbers, and update pertinent_roots + // for the bicomp roots on the path from backedge endpoints up + // to v. This will set the stage for the walkdown to efficiently + // traverse the graph of bicomps down from v. + + typedef typename face_vertex_iterator::type walkup_iterator_t; + + out_edge_iterator_t oi, oi_end; + for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) + { + edge_t e(*oi); + vertex_t e_source(source(e,g)); + vertex_t e_target(target(e,g)); + + if (e_source == e_target) + { + self_loops.push_back(e); + continue; + } + + vertex_t w(e_source == v ? e_target : e_source); + + //continue if not a back edge or already embedded + if (dfs_number[w] < dfs_number[v] || e == dfs_parent_edge[w]) + continue; + + backedges[w].push_back(e); + + v_size_t timestamp = dfs_number[v]; + backedge_flag[w] = timestamp; + + walkup_iterator_t walkup_itr(w, face_handles); + walkup_iterator_t walkup_end; + vertex_t lead_vertex = w; + + while (true) + { + + // Move to the root of the current bicomp or the first visited + // vertex on the bicomp by going up each side in parallel + + while(walkup_itr != walkup_end && + visited[*walkup_itr] != timestamp + ) + { + lead_vertex = *walkup_itr; + visited[lead_vertex] = timestamp; + ++walkup_itr; + } + + // If we've found the root of a bicomp through a path we haven't + // seen before, update pertinent_roots with a handle to the + // current bicomp. Otherwise, we've just seen a path we've been + // up before, so break out of the main while loop. + + if (walkup_itr == walkup_end) + { + vertex_t dfs_child = canonical_dfs_child[lead_vertex]; + vertex_t parent = dfs_parent[dfs_child]; + + visited[dfs_child_handles[dfs_child].first_vertex()] + = timestamp; + visited[dfs_child_handles[dfs_child].second_vertex()] + = timestamp; + + if (low_point[dfs_child] < dfs_number[v] || + least_ancestor[dfs_child] < dfs_number[v] + ) + { + pertinent_roots[parent]->push_back + (dfs_child_handles[dfs_child]); + } + else + { + pertinent_roots[parent]->push_front + (dfs_child_handles[dfs_child]); + } + + if (parent != v && visited[parent] != timestamp) + { + walkup_itr = walkup_iterator_t(parent, face_handles); + lead_vertex = parent; + } + else + break; + } + else + break; + } + + } + + } + + + + + + + + bool walkdown(vertex_t v) + { + // This procedure is where all of the action is - pertinent_roots + // has already been set up by the walkup, so we just need to move + // down bicomps from v until we find vertices that have been + // labeled as backedge endpoints. Once we find such a vertex, we + // embed the corresponding edge and glue together the bicomps on + // the path connecting the two vertices in the edge. This may + // involve flipping bicomps along the way. + + vertex_t w; //the other endpoint of the edge we're embedding + + while (!pertinent_roots[v]->empty()) + { + + face_handle_t root_face_handle = pertinent_roots[v]->front(); + face_handle_t curr_face_handle = root_face_handle; + pertinent_roots[v]->pop_front(); + + merge_stack.clear(); + + while(true) + { + + typename face_vertex_iterator<>::type + first_face_itr, second_face_itr, face_end; + vertex_t first_side_vertex + = graph_traits::null_vertex(); + vertex_t second_side_vertex; + vertex_t first_tail, second_tail; + + first_tail = second_tail = curr_face_handle.get_anchor(); + first_face_itr = typename face_vertex_iterator<>::type + (curr_face_handle, face_handles, first_side()); + second_face_itr = typename face_vertex_iterator<>::type + (curr_face_handle, face_handles, second_side()); + + for(; first_face_itr != face_end; ++first_face_itr) + { + vertex_t face_vertex(*first_face_itr); + if (pertinent(face_vertex, v) || + externally_active(face_vertex, v) + ) + { + first_side_vertex = face_vertex; + second_side_vertex = face_vertex; + break; + } + first_tail = face_vertex; + } + + if (first_side_vertex == graph_traits::null_vertex() || + first_side_vertex == curr_face_handle.get_anchor() + ) + break; + + for(;second_face_itr != face_end; ++second_face_itr) + { + vertex_t face_vertex(*second_face_itr); + if (pertinent(face_vertex, v) || + externally_active(face_vertex, v) + ) + { + second_side_vertex = face_vertex; + break; + } + second_tail = face_vertex; + } + + vertex_t chosen; + bool chose_first_upper_path; + if (internally_active(first_side_vertex, v)) + { + chosen = first_side_vertex; + chose_first_upper_path = true; + } + else if (internally_active(second_side_vertex, v)) + { + chosen = second_side_vertex; + chose_first_upper_path = false; + } + else if (pertinent(first_side_vertex, v)) + { + chosen = first_side_vertex; + chose_first_upper_path = true; + } + else if (pertinent(second_side_vertex, v)) + { + chosen = second_side_vertex; + chose_first_upper_path = false; + } + else + { + + // If there's a pertinent vertex on the lower face + // between the first_face_itr and the second_face_itr, + // this graph isn't planar. + for(; + *first_face_itr != second_side_vertex; + ++first_face_itr + ) + { + vertex_t p(*first_face_itr); + if (pertinent(p,v)) + { + //Found a Kuratowski subgraph + kuratowski_v = v; + kuratowski_x = first_side_vertex; + kuratowski_y = second_side_vertex; + return false; + } + } + + // Otherwise, the fact that we didn't find a pertinent + // vertex on this face is fine - we should set the + // short-circuit edges and break out of this loop to + // start looking at a different pertinent root. + + if (first_side_vertex == second_side_vertex) + { + if (first_tail != v) + { + vertex_t first + = face_handles[first_tail].first_vertex(); + vertex_t second + = face_handles[first_tail].second_vertex(); + boost::tie(first_side_vertex, first_tail) + = make_tuple(first_tail, + first == first_side_vertex ? + second : first + ); + } + else if (second_tail != v) + { + vertex_t first + = face_handles[second_tail].first_vertex(); + vertex_t second + = face_handles[second_tail].second_vertex(); + boost::tie(second_side_vertex, second_tail) + = make_tuple(second_tail, + first == second_side_vertex ? + second : first); + } + else + break; + } + + canonical_dfs_child[first_side_vertex] + = canonical_dfs_child[root_face_handle.first_vertex()]; + canonical_dfs_child[second_side_vertex] + = canonical_dfs_child[root_face_handle.second_vertex()]; + root_face_handle.set_first_vertex(first_side_vertex); + root_face_handle.set_second_vertex(second_side_vertex); + + if (face_handles[first_side_vertex].first_vertex() == + first_tail + ) + face_handles[first_side_vertex].set_first_vertex(v); + else + face_handles[first_side_vertex].set_second_vertex(v); + + if (face_handles[second_side_vertex].first_vertex() == + second_tail + ) + face_handles[second_side_vertex].set_first_vertex(v); + else + face_handles[second_side_vertex].set_second_vertex(v); + + break; + + } + + + // When we unwind the stack, we need to know which direction + // we came down from on the top face handle + + bool chose_first_lower_path = + (chose_first_upper_path && + face_handles[chosen].first_vertex() == first_tail) + || + (!chose_first_upper_path && + face_handles[chosen].first_vertex() == second_tail); + + //If there's a backedge at the chosen vertex, embed it now + if (backedge_flag[chosen] == dfs_number[v]) + { + w = chosen; + + backedge_flag[chosen] = num_vertices(g) + 1; + add_to_merge_points(chosen, StoreOldHandlesPolicy()); + + typename edge_vector_t::iterator ei, ei_end; + ei_end = backedges[chosen].end(); + for(ei = backedges[chosen].begin(); ei != ei_end; ++ei) + { + edge_t e(*ei); + add_to_embedded_edges(e, StoreOldHandlesPolicy()); + + if (chose_first_lower_path) + face_handles[chosen].push_first(e, g); + else + face_handles[chosen].push_second(e, g); + } + + } + else + { + merge_stack.push_back(make_tuple + (chosen, chose_first_upper_path, chose_first_lower_path) + ); + curr_face_handle = *pertinent_roots[chosen]->begin(); + continue; + } + + //Unwind the merge stack to the root, merging all bicomps + + bool bottom_path_follows_first; + bool top_path_follows_first; + bool next_bottom_follows_first = chose_first_upper_path; + face_handle_t top_handle, bottom_handle; + + vertex_t merge_point = chosen; + + while(!merge_stack.empty()) + { + + bottom_path_follows_first = next_bottom_follows_first; + boost::tie(merge_point, + next_bottom_follows_first, + top_path_follows_first + ) = merge_stack.back(); + merge_stack.pop_back(); + + face_handle_t top_handle(face_handles[merge_point]); + face_handle_t bottom_handle + (*pertinent_roots[merge_point]->begin()); + + vertex_t bottom_dfs_child = canonical_dfs_child + [pertinent_roots[merge_point]->begin()->first_vertex()]; + + remove_vertex_from_separated_dfs_child_list( + canonical_dfs_child + [pertinent_roots[merge_point]->begin()->first_vertex()] + ); + + pertinent_roots[merge_point]->pop_front(); + + add_to_merge_points(top_handle.get_anchor(), + StoreOldHandlesPolicy() + ); + + if (top_path_follows_first && bottom_path_follows_first) + { + bottom_handle.flip(); + top_handle.glue_first_to_second(bottom_handle); + } + else if (!top_path_follows_first && + bottom_path_follows_first + ) + { + flipped[bottom_dfs_child] = true; + top_handle.glue_second_to_first(bottom_handle); + } + else if (top_path_follows_first && + !bottom_path_follows_first + ) + { + flipped[bottom_dfs_child] = true; + top_handle.glue_first_to_second(bottom_handle); + } + else //!top_path_follows_first && !bottom_path_follows_first + { + bottom_handle.flip(); + top_handle.glue_second_to_first(bottom_handle); + } + + } + + //Finally, embed all edges (v,w) at their upper end points + canonical_dfs_child[w] + = canonical_dfs_child[root_face_handle.first_vertex()]; + + add_to_merge_points(root_face_handle.get_anchor(), + StoreOldHandlesPolicy() + ); + + typename edge_vector_t::iterator ei, ei_end; + ei_end = backedges[chosen].end(); + for(ei = backedges[chosen].begin(); ei != ei_end; ++ei) + { + if (next_bottom_follows_first) + root_face_handle.push_first(*ei, g); + else + root_face_handle.push_second(*ei, g); + } + + backedges[chosen].clear(); + curr_face_handle = root_face_handle; + + }//while(true) + + }//while(!pertinent_roots[v]->empty()) + + return true; + + } + + + + + + + void store_old_face_handles(graph::detail::no_old_handles) {} + + void store_old_face_handles(graph::detail::store_old_handles) + { + for(typename std::vector::iterator mp_itr + = current_merge_points.begin(); + mp_itr != current_merge_points.end(); ++mp_itr) + { + face_handles[*mp_itr].store_old_face_handles(); + } + current_merge_points.clear(); + } + + + void add_to_merge_points(vertex_t, graph::detail::no_old_handles) {} + + void add_to_merge_points(vertex_t v, graph::detail::store_old_handles) + { + current_merge_points.push_back(v); + } + + + void add_to_embedded_edges(edge_t, graph::detail::no_old_handles) {} + + void add_to_embedded_edges(edge_t e, graph::detail::store_old_handles) + { + embedded_edges.push_back(e); + } + + + + + void clean_up_embedding(graph::detail::no_embedding) {} + + void clean_up_embedding(graph::detail::store_embedding) + { + + // If the graph isn't biconnected, we'll still have entries + // in the separated_dfs_child_list for some vertices. Since + // these represent articulation points, we can obtain a + // planar embedding no matter what order we embed them in. + + vertex_iterator_t xi, xi_end; + for(boost::tie(xi,xi_end) = vertices(g); xi != xi_end; ++xi) + { + if (!separated_dfs_child_list[*xi]->empty()) + { + typename vertex_list_t::iterator yi, yi_end; + yi_end = separated_dfs_child_list[*xi]->end(); + for(yi = separated_dfs_child_list[*xi]->begin(); + yi != yi_end; ++yi + ) + { + dfs_child_handles[*yi].flip(); + face_handles[*xi].glue_first_to_second + (dfs_child_handles[*yi]); + } + } + } + + // Up until this point, we've flipped bicomps lazily by setting + // flipped[v] to true if the bicomp rooted at v was flipped (the + // lazy aspect of this flip is that all descendents of that vertex + // need to have their orientations reversed as well). Now, we + // traverse the DFS tree by DFS number and perform the actual + // flipping as needed + + typedef typename vertex_vector_t::iterator vertex_vector_itr_t; + vertex_vector_itr_t vi_end = vertices_by_dfs_num.end(); + for(vertex_vector_itr_t vi = vertices_by_dfs_num.begin(); + vi != vi_end; ++vi + ) + { + vertex_t v(*vi); + bool v_flipped = flipped[v]; + bool p_flipped = flipped[dfs_parent[v]]; + if (v_flipped && !p_flipped) + { + face_handles[v].flip(); + } + else if (p_flipped && !v_flipped) + { + face_handles[v].flip(); + flipped[v] = true; + } + else + { + flipped[v] = false; + } + } + + // If there are any self-loops in the graph, they were flagged + // during the walkup, and we should add them to the embedding now. + // Adding a self loop anywhere in the embedding could never + // invalidate the embedding, but they would complicate the traversal + // if they were added during the walkup/walkdown. + + typename edge_vector_t::iterator ei, ei_end; + ei_end = self_loops.end(); + for(ei = self_loops.begin(); ei != ei_end; ++ei) + { + edge_t e(*ei); + face_handles[source(e,g)].push_second(e,g); + } + + } + + + + + + bool pertinent(vertex_t w, vertex_t v) + { + // w is pertinent with respect to v if there is a backedge (v,w) or if + // w is the root of a bicomp that contains a pertinent vertex. + + return backedge_flag[w] == dfs_number[v] || !pertinent_roots[w]->empty(); + } + + + + bool externally_active(vertex_t w, vertex_t v) + { + // Let a be any proper depth-first search ancestor of v. w is externally + // active with respect to v if there exists a backedge (a,w) or a + // backedge (a,w_0) for some w_0 in a descendent bicomp of w. + + v_size_t dfs_number_of_v = dfs_number[v]; + return (least_ancestor[w] < dfs_number_of_v) || + (!separated_dfs_child_list[w]->empty() && + low_point[separated_dfs_child_list[w]->front()] < dfs_number_of_v); + } + + + + bool internally_active(vertex_t w, vertex_t v) + { + return pertinent(w,v) && !externally_active(w,v); + } + + + + + void remove_vertex_from_separated_dfs_child_list(vertex_t v) + { + typename vertex_list_t::iterator to_delete + = separated_node_in_parent_list[v]; + garbage.splice(garbage.end(), + *separated_dfs_child_list[dfs_parent[v]], + to_delete, + boost::next(to_delete) + ); + } + + + + + + // End of the implementation of the basic Boyer-Myrvold Algorithm. The rest + // of the code below implements the isolation of a Kuratowski subgraph in + // the case that the input graph is not planar. This is by far the most + // complicated part of the implementation. + + + + + public: + + + + + template + vertex_t kuratowski_walkup(vertex_t v, + EdgeToBoolPropertyMap forbidden_edge, + EdgeToBoolPropertyMap goal_edge, + EdgeToBoolPropertyMap is_embedded, + EdgeContainer& path_edges + ) + { + vertex_t current_endpoint; + bool seen_goal_edge = false; + out_edge_iterator_t oi, oi_end; + + for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) + forbidden_edge[*oi] = true; + + for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) + { + path_edges.clear(); + + edge_t e(*oi); + current_endpoint = target(*oi,g) == v ? + source(*oi,g) : target(*oi,g); + + if (dfs_number[current_endpoint] < dfs_number[v] || + is_embedded[e] || + v == current_endpoint //self-loop + ) + { + //Not a backedge + continue; + } + + path_edges.push_back(e); + if (goal_edge[e]) + { + return current_endpoint; + } + + typedef typename face_edge_iterator<>::type walkup_itr_t; + + walkup_itr_t + walkup_itr(current_endpoint, face_handles, first_side()); + walkup_itr_t walkup_end; + + seen_goal_edge = false; + + while (true) + { + + if (walkup_itr != walkup_end && forbidden_edge[*walkup_itr]) + break; + + while(walkup_itr != walkup_end && + !goal_edge[*walkup_itr] && + !forbidden_edge[*walkup_itr] + ) + { + edge_t f(*walkup_itr); + forbidden_edge[f] = true; + path_edges.push_back(f); + current_endpoint = + source(f, g) == current_endpoint ? + target(f, g) : + source(f,g); + ++walkup_itr; + } + + if (walkup_itr != walkup_end && goal_edge[*walkup_itr]) + { + path_edges.push_back(*walkup_itr); + seen_goal_edge = true; + break; + } + + walkup_itr + = walkup_itr_t(current_endpoint, face_handles, first_side()); + + } + + if (seen_goal_edge) + break; + + } + + if (seen_goal_edge) + return current_endpoint; + else + return graph_traits::null_vertex(); + + } + + + + + + + + + template + void extract_kuratowski_subgraph(OutputIterator o_itr, EdgeIndexMap em) + { + + // If the main algorithm has failed to embed one of the back-edges from + // a vertex v, we can use the current state of the algorithm to isolate + // a Kuratowksi subgraph. The isolation process breaks down into five + // cases, A - E. The general configuration of all five cases is shown in + // figure 1. There is a vertex v from which the planar + // v embedding process could not proceed. This means that + // | there exists some bicomp containing three vertices + // ----- x,y, and z as shown such that x and y are externally + // | | active with respect to v (which means that there are + // x y two vertices x_0 and y_0 such that (1) both x_0 and + // | | y_0 are proper depth-first search ancestors of v and + // --z-- (2) there are two disjoint paths, one connecting x + // and x_0 and one connecting y and y_0, both consisting + // fig. 1 entirely of unembedded edges). Furthermore, there + // exists a vertex z_0 such that z is a depth-first + // search ancestor of z_0 and (v,z_0) is an unembedded back-edge from v. + // x,y and z all exist on the same bicomp, which consists entirely of + // embedded edges. The five subcases break down as follows, and are + // handled by the algorithm logically in the order A-E: First, if v is + // not on the same bicomp as x,y, and z, a K_3_3 can be isolated - this + // is case A. So, we'll assume that v is on the same bicomp as x,y, and + // z. If z_0 is on a different bicomp than x,y, and z, a K_3_3 can also + // be isolated - this is a case B - so we'll assume from now on that v + // is on the same bicomp as x, y, and z=z_0. In this case, one can use + // properties of the Boyer-Myrvold algorithm to show the existence of an + // "x-y path" connecting some vertex on the "left side" of the x,y,z + // bicomp with some vertex on the "right side" of the bicomp (where the + // left and right are split by a line drawn through v and z.If either of + // the endpoints of the x-y path is above x or y on the bicomp, a K_3_3 + // can be isolated - this is a case C. Otherwise, both endpoints are at + // or below x and y on the bicomp. If there is a vertex alpha on the x-y + // path such that alpha is not x or y and there's a path from alpha to v + // that's disjoint from any of the edges on the bicomp and the x-y path, + // a K_3_3 can be isolated - this is a case D. Otherwise, properties of + // the Boyer-Myrvold algorithm can be used to show that another vertex + // w exists on the lower half of the bicomp such that w is externally + // active with respect to v. w can then be used to isolate a K_5 - this + // is the configuration of case E. + + vertex_iterator_t vi, vi_end; + edge_iterator_t ei, ei_end; + out_edge_iterator_t oei, oei_end; + typename std::vector::iterator xi, xi_end; + + // Clear the short-circuit edges - these are needed for the planar + // testing/embedding algorithm to run in linear time, but they'll + // complicate the kuratowski subgraph isolation + for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + { + face_handles[*vi].reset_vertex_cache(); + dfs_child_handles[*vi].reset_vertex_cache(); + } + + vertex_t v = kuratowski_v; + vertex_t x = kuratowski_x; + vertex_t y = kuratowski_y; + + typedef iterator_property_map + ::iterator, EdgeIndexMap> + edge_to_bool_map_t; + + std::vector is_in_subgraph_vector(num_edges(g), false); + edge_to_bool_map_t is_in_subgraph(is_in_subgraph_vector.begin(), em); + + std::vector is_embedded_vector(num_edges(g), false); + edge_to_bool_map_t is_embedded(is_embedded_vector.begin(), em); + + typename std::vector::iterator embedded_itr, embedded_end; + embedded_end = embedded_edges.end(); + for(embedded_itr = embedded_edges.begin(); + embedded_itr != embedded_end; ++embedded_itr + ) + is_embedded[*embedded_itr] = true; + + // upper_face_vertex is true for x,y, and all vertices above x and y in + // the bicomp + std::vector upper_face_vertex_vector(num_vertices(g), false); + vertex_to_bool_map_t upper_face_vertex + (upper_face_vertex_vector.begin(), vm); + + std::vector lower_face_vertex_vector(num_vertices(g), false); + vertex_to_bool_map_t lower_face_vertex + (lower_face_vertex_vector.begin(), vm); + + // These next few variable declarations are all things that we need + // to find. + vertex_t z; + vertex_t bicomp_root; + vertex_t w = graph_traits::null_vertex(); + face_handle_t w_handle; + face_handle_t v_dfchild_handle; + vertex_t first_x_y_path_endpoint = graph_traits::null_vertex(); + vertex_t second_x_y_path_endpoint = graph_traits::null_vertex(); + vertex_t w_ancestor = v; + + detail::bm_case_t chosen_case = detail::BM_NO_CASE_CHOSEN; + + std::vector x_external_path; + std::vector y_external_path; + std::vector case_d_edges; + + std::vector z_v_path; + std::vector w_path; + + //first, use a walkup to find a path from V that starts with a + //backedge from V, then goes up until it hits either X or Y + //(but doesn't find X or Y as the root of a bicomp) + + typename face_vertex_iterator<>::type + x_upper_itr(x, face_handles, first_side()); + typename face_vertex_iterator<>::type + x_lower_itr(x, face_handles, second_side()); + typename face_vertex_iterator<>::type face_itr, face_end; + + // Don't know which path from x is the upper or lower path - + // we'll find out here + for(face_itr = x_upper_itr; face_itr != face_end; ++face_itr) + { + if (*face_itr == y) + { + std::swap(x_upper_itr, x_lower_itr); + break; + } + } + + upper_face_vertex[x] = true; + + vertex_t current_vertex = x; + vertex_t previous_vertex; + for(face_itr = x_upper_itr; face_itr != face_end; ++face_itr) + { + previous_vertex = current_vertex; + current_vertex = *face_itr; + upper_face_vertex[current_vertex] = true; + } + + v_dfchild_handle + = dfs_child_handles[canonical_dfs_child[previous_vertex]]; + + for(face_itr = x_lower_itr; *face_itr != y; ++face_itr) + { + vertex_t current_vertex(*face_itr); + lower_face_vertex[current_vertex] = true; + + typename face_handle_list_t::iterator roots_itr, roots_end; + + if (w == graph_traits::null_vertex()) //haven't found a w yet + { + roots_end = pertinent_roots[current_vertex]->end(); + for(roots_itr = pertinent_roots[current_vertex]->begin(); + roots_itr != roots_end; ++roots_itr + ) + { + if (low_point[canonical_dfs_child[roots_itr->first_vertex()]] + < dfs_number[v] + ) + { + w = current_vertex; + w_handle = *roots_itr; + break; + } + } + } + + } + + for(; face_itr != face_end; ++face_itr) + { + vertex_t current_vertex(*face_itr); + upper_face_vertex[current_vertex] = true; + bicomp_root = current_vertex; + } + + typedef typename face_edge_iterator<>::type walkup_itr_t; + + std::vector outer_face_edge_vector(num_edges(g), false); + edge_to_bool_map_t outer_face_edge(outer_face_edge_vector.begin(), em); + + walkup_itr_t walkup_end; + for(walkup_itr_t walkup_itr(x, face_handles, first_side()); + walkup_itr != walkup_end; ++walkup_itr + ) + { + outer_face_edge[*walkup_itr] = true; + is_in_subgraph[*walkup_itr] = true; + } + + for(walkup_itr_t walkup_itr(x, face_handles, second_side()); + walkup_itr != walkup_end; ++walkup_itr + ) + { + outer_face_edge[*walkup_itr] = true; + is_in_subgraph[*walkup_itr] = true; + } + + std::vector forbidden_edge_vector(num_edges(g), false); + edge_to_bool_map_t forbidden_edge(forbidden_edge_vector.begin(), em); + + std::vector goal_edge_vector(num_edges(g), false); + edge_to_bool_map_t goal_edge(goal_edge_vector.begin(), em); + + + //Find external path to x and to y + + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) + { + edge_t e(*ei); + goal_edge[e] + = !outer_face_edge[e] && (source(e,g) == x || target(e,g) == x); + forbidden_edge[*ei] = outer_face_edge[*ei]; + } + + vertex_t x_ancestor = v; + vertex_t x_endpoint = graph_traits::null_vertex(); + + while(x_endpoint == graph_traits::null_vertex()) + { + x_ancestor = dfs_parent[x_ancestor]; + x_endpoint = kuratowski_walkup(x_ancestor, + forbidden_edge, + goal_edge, + is_embedded, + x_external_path + ); + + } + + + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) + { + edge_t e(*ei); + goal_edge[e] + = !outer_face_edge[e] && (source(e,g) == y || target(e,g) == y); + forbidden_edge[*ei] = outer_face_edge[*ei]; + } + + vertex_t y_ancestor = v; + vertex_t y_endpoint = graph_traits::null_vertex(); + + while(y_endpoint == graph_traits::null_vertex()) + { + y_ancestor = dfs_parent[y_ancestor]; + y_endpoint = kuratowski_walkup(y_ancestor, + forbidden_edge, + goal_edge, + is_embedded, + y_external_path + ); + + } + + + vertex_t parent, child; + + //If v isn't on the same bicomp as x and y, it's a case A + if (bicomp_root != v) + { + chosen_case = detail::BM_CASE_A; + + for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + if (lower_face_vertex[*vi]) + for(boost::tie(oei,oei_end) = out_edges(*vi,g); oei != oei_end; ++oei) + if(!outer_face_edge[*oei]) + goal_edge[*oei] = true; + + for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) + forbidden_edge[*ei] = outer_face_edge[*ei]; + + z = kuratowski_walkup + (v, forbidden_edge, goal_edge, is_embedded, z_v_path); + + } + else if (w != graph_traits::null_vertex()) + { + chosen_case = detail::BM_CASE_B; + + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) + { + edge_t e(*ei); + goal_edge[e] = false; + forbidden_edge[e] = outer_face_edge[e]; + } + + goal_edge[w_handle.first_edge()] = true; + goal_edge[w_handle.second_edge()] = true; + + z = kuratowski_walkup(v, + forbidden_edge, + goal_edge, + is_embedded, + z_v_path + ); + + + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) + { + forbidden_edge[*ei] = outer_face_edge[*ei]; + } + + typename std::vector::iterator pi, pi_end; + pi_end = z_v_path.end(); + for(pi = z_v_path.begin(); pi != pi_end; ++pi) + { + goal_edge[*pi] = true; + } + + w_ancestor = v; + vertex_t w_endpoint = graph_traits::null_vertex(); + + while(w_endpoint == graph_traits::null_vertex()) + { + w_ancestor = dfs_parent[w_ancestor]; + w_endpoint = kuratowski_walkup(w_ancestor, + forbidden_edge, + goal_edge, + is_embedded, + w_path + ); + + } + + // We really want both the w walkup and the z walkup to finish on + // exactly the same edge, but for convenience (since we don't have + // control over which side of a bicomp a walkup moves up) we've + // defined the walkup to either end at w_handle.first_edge() or + // w_handle.second_edge(). If both walkups ended at different edges, + // we'll do a little surgery on the w walkup path to make it follow + // the other side of the final bicomp. + + if ((w_path.back() == w_handle.first_edge() && + z_v_path.back() == w_handle.second_edge()) + || + (w_path.back() == w_handle.second_edge() && + z_v_path.back() == w_handle.first_edge()) + ) + { + walkup_itr_t wi, wi_end; + edge_t final_edge = w_path.back(); + vertex_t anchor + = source(final_edge, g) == w_handle.get_anchor() ? + target(final_edge, g) : source(final_edge, g); + if (face_handles[anchor].first_edge() == final_edge) + wi = walkup_itr_t(anchor, face_handles, second_side()); + else + wi = walkup_itr_t(anchor, face_handles, first_side()); + + w_path.pop_back(); + + for(; wi != wi_end; ++wi) + { + edge_t e(*wi); + if (w_path.back() == e) + w_path.pop_back(); + else + w_path.push_back(e); + } + } + + + } + else + { + + //We need to find a valid z, since the x-y path re-defines the lower + //face, and the z we found earlier may now be on the upper face. + + chosen_case = detail::BM_CASE_E; + + + // The z we've used so far is just an externally active vertex on the + // lower face path, but may not be the z we need for a case C, D, or + // E subgraph. the z we need now is any externally active vertex on + // the lower face path with both old_face_handles edges on the outer + // face. Since we know an x-y path exists, such a z must also exist. + + //TODO: find this z in the first place. + + //find the new z + + for(face_itr = x_lower_itr; *face_itr != y; ++face_itr) + { + vertex_t possible_z(*face_itr); + if (pertinent(possible_z,v) && + outer_face_edge[face_handles[possible_z].old_first_edge()] && + outer_face_edge[face_handles[possible_z].old_second_edge()] + ) + { + z = possible_z; + break; + } + } + + //find x-y path, and a w if one exists. + + if (externally_active(z,v)) + w = z; + + + typedef typename face_edge_iterator + ::type old_face_iterator_t; + + old_face_iterator_t + first_old_face_itr(z, face_handles, first_side()); + old_face_iterator_t + second_old_face_itr(z, face_handles, second_side()); + old_face_iterator_t old_face_itr, old_face_end; + + std::vector old_face_iterators; + old_face_iterators.push_back(first_old_face_itr); + old_face_iterators.push_back(second_old_face_itr); + + std::vector x_y_path_vertex_vector(num_vertices(g), false); + vertex_to_bool_map_t x_y_path_vertex + (x_y_path_vertex_vector.begin(), vm); + + typename std::vector::iterator + of_itr, of_itr_end; + of_itr_end = old_face_iterators.end(); + for(of_itr = old_face_iterators.begin(); + of_itr != of_itr_end; ++of_itr + ) + { + + old_face_itr = *of_itr; + + vertex_t previous_vertex; + bool seen_x_or_y = false; + vertex_t current_vertex = z; + for(; old_face_itr != old_face_end; ++old_face_itr) + { + edge_t e(*old_face_itr); + previous_vertex = current_vertex; + current_vertex = source(e,g) == current_vertex ? + target(e,g) : source(e,g); + + if (current_vertex == x || current_vertex == y) + seen_x_or_y = true; + + if (w == graph_traits::null_vertex() && + externally_active(current_vertex,v) && + outer_face_edge[e] && + outer_face_edge[*boost::next(old_face_itr)] && + !seen_x_or_y + ) + { + w = current_vertex; + } + + if (!outer_face_edge[e]) + { + if (!upper_face_vertex[current_vertex] && + !lower_face_vertex[current_vertex] + ) + { + x_y_path_vertex[current_vertex] = true; + } + + is_in_subgraph[e] = true; + if (upper_face_vertex[source(e,g)] || + lower_face_vertex[source(e,g)] + ) + { + if (first_x_y_path_endpoint == + graph_traits::null_vertex() + ) + first_x_y_path_endpoint = source(e,g); + else + second_x_y_path_endpoint = source(e,g); + } + if (upper_face_vertex[target(e,g)] || + lower_face_vertex[target(e,g)] + ) + { + if (first_x_y_path_endpoint == + graph_traits::null_vertex() + ) + first_x_y_path_endpoint = target(e,g); + else + second_x_y_path_endpoint = target(e,g); + } + + + } + else if (previous_vertex == x || previous_vertex == y) + { + chosen_case = detail::BM_CASE_C; + } + + } + + } + + // Look for a case D - one of v's embedded edges will connect to the + // x-y path along an inner face path. + + //First, get a list of all of v's embedded child edges + + out_edge_iterator_t v_edge_itr, v_edge_end; + for(boost::tie(v_edge_itr,v_edge_end) = out_edges(v,g); + v_edge_itr != v_edge_end; ++v_edge_itr + ) + { + edge_t embedded_edge(*v_edge_itr); + + if (!is_embedded[embedded_edge] || + embedded_edge == dfs_parent_edge[v] + ) + continue; + + case_d_edges.push_back(embedded_edge); + + vertex_t current_vertex + = source(embedded_edge,g) == v ? + target(embedded_edge,g) : source(embedded_edge,g); + + typename face_edge_iterator<>::type + internal_face_itr, internal_face_end; + if (face_handles[current_vertex].first_vertex() == v) + { + internal_face_itr = typename face_edge_iterator<>::type + (current_vertex, face_handles, second_side()); + } + else + { + internal_face_itr = typename face_edge_iterator<>::type + (current_vertex, face_handles, first_side()); + } + + while(internal_face_itr != internal_face_end && + !outer_face_edge[*internal_face_itr] && + !x_y_path_vertex[current_vertex] + ) + { + edge_t e(*internal_face_itr); + case_d_edges.push_back(e); + current_vertex = + source(e,g) == current_vertex ? target(e,g) : source(e,g); + ++internal_face_itr; + } + + if (x_y_path_vertex[current_vertex]) + { + chosen_case = detail::BM_CASE_D; + break; + } + else + { + case_d_edges.clear(); + } + + } + + + } + + + + + if (chosen_case != detail::BM_CASE_B && chosen_case != detail::BM_CASE_A) + { + + //Finding z and w. + + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) + { + edge_t e(*ei); + goal_edge[e] = !outer_face_edge[e] && + (source(e,g) == z || target(e,g) == z); + forbidden_edge[e] = outer_face_edge[e]; + } + + kuratowski_walkup(v, + forbidden_edge, + goal_edge, + is_embedded, + z_v_path + ); + + if (chosen_case == detail::BM_CASE_E) + { + + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) + { + forbidden_edge[*ei] = outer_face_edge[*ei]; + goal_edge[*ei] = !outer_face_edge[*ei] && + (source(*ei,g) == w || target(*ei,g) == w); + } + + for(boost::tie(oei, oei_end) = out_edges(w,g); oei != oei_end; ++oei) + { + if (!outer_face_edge[*oei]) + goal_edge[*oei] = true; + } + + typename std::vector::iterator pi, pi_end; + pi_end = z_v_path.end(); + for(pi = z_v_path.begin(); pi != pi_end; ++pi) + { + goal_edge[*pi] = true; + } + + w_ancestor = v; + vertex_t w_endpoint = graph_traits::null_vertex(); + + while(w_endpoint == graph_traits::null_vertex()) + { + w_ancestor = dfs_parent[w_ancestor]; + w_endpoint = kuratowski_walkup(w_ancestor, + forbidden_edge, + goal_edge, + is_embedded, + w_path + ); + + } + + } + + + } + + + //We're done isolating the Kuratowski subgraph at this point - + //but there's still some cleaning up to do. + + //Update is_in_subgraph with the paths we just found + + xi_end = x_external_path.end(); + for(xi = x_external_path.begin(); xi != xi_end; ++xi) + is_in_subgraph[*xi] = true; + + xi_end = y_external_path.end(); + for(xi = y_external_path.begin(); xi != xi_end; ++xi) + is_in_subgraph[*xi] = true; + + xi_end = z_v_path.end(); + for(xi = z_v_path.begin(); xi != xi_end; ++xi) + is_in_subgraph[*xi] = true; + + xi_end = case_d_edges.end(); + for(xi = case_d_edges.begin(); xi != xi_end; ++xi) + is_in_subgraph[*xi] = true; + + xi_end = w_path.end(); + for(xi = w_path.begin(); xi != xi_end; ++xi) + is_in_subgraph[*xi] = true; + + child = bicomp_root; + parent = dfs_parent[child]; + while(child != parent) + { + is_in_subgraph[dfs_parent_edge[child]] = true; + boost::tie(parent, child) = std::make_pair( dfs_parent[parent], parent ); + } + + + + + // At this point, we've already isolated the Kuratowski subgraph and + // collected all of the edges that compose it in the is_in_subgraph + // property map. But we want the verification of such a subgraph to be + // a deterministic process, and we can simplify the function + // is_kuratowski_subgraph by cleaning up some edges here. + + if (chosen_case == detail::BM_CASE_B) + { + is_in_subgraph[dfs_parent_edge[v]] = false; + } + else if (chosen_case == detail::BM_CASE_C) + { + // In a case C subgraph, at least one of the x-y path endpoints + // (call it alpha) is above either x or y on the outer face. The + // other endpoint may be attached at x or y OR above OR below. In + // any of these three cases, we can form a K_3_3 by removing the + // edge attached to v on the outer face that is NOT on the path to + // alpha. + + typename face_vertex_iterator::type + face_itr, face_end; + if (face_handles[v_dfchild_handle.first_vertex()].first_edge() == + v_dfchild_handle.first_edge() + ) + { + face_itr = typename face_vertex_iterator + ::type + (v_dfchild_handle.first_vertex(), face_handles, second_side()); + } + else + { + face_itr = typename face_vertex_iterator + ::type + (v_dfchild_handle.first_vertex(), face_handles, first_side()); + } + + for(; true; ++face_itr) + { + vertex_t current_vertex(*face_itr); + if (current_vertex == x || current_vertex == y) + { + is_in_subgraph[v_dfchild_handle.first_edge()] = false; + break; + } + else if (current_vertex == first_x_y_path_endpoint || + current_vertex == second_x_y_path_endpoint) + { + is_in_subgraph[v_dfchild_handle.second_edge()] = false; + break; + } + } + + } + else if (chosen_case == detail::BM_CASE_D) + { + // Need to remove both of the edges adjacent to v on the outer face. + // remove the connecting edges from v to bicomp, then + // is_kuratowski_subgraph will shrink vertices of degree 1 + // automatically... + + is_in_subgraph[v_dfchild_handle.first_edge()] = false; + is_in_subgraph[v_dfchild_handle.second_edge()] = false; + + } + else if (chosen_case == detail::BM_CASE_E) + { + // Similarly to case C, if the endpoints of the x-y path are both + // below x and y, we should remove an edge to allow the subgraph to + // contract to a K_3_3. + + + if ((first_x_y_path_endpoint != x && first_x_y_path_endpoint != y) || + (second_x_y_path_endpoint != x && second_x_y_path_endpoint != y) + ) + { + is_in_subgraph[dfs_parent_edge[v]] = false; + + vertex_t deletion_endpoint, other_endpoint; + if (lower_face_vertex[first_x_y_path_endpoint]) + { + deletion_endpoint = second_x_y_path_endpoint; + other_endpoint = first_x_y_path_endpoint; + } + else + { + deletion_endpoint = first_x_y_path_endpoint; + other_endpoint = second_x_y_path_endpoint; + } + + typename face_edge_iterator<>::type face_itr, face_end; + + bool found_other_endpoint = false; + for(face_itr = typename face_edge_iterator<>::type + (deletion_endpoint, face_handles, first_side()); + face_itr != face_end; ++face_itr + ) + { + edge_t e(*face_itr); + if (source(e,g) == other_endpoint || + target(e,g) == other_endpoint + ) + { + found_other_endpoint = true; + break; + } + } + + if (found_other_endpoint) + { + is_in_subgraph[face_handles[deletion_endpoint].first_edge()] + = false; + } + else + { + is_in_subgraph[face_handles[deletion_endpoint].second_edge()] + = false; + } + } + + } + + + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) + if (is_in_subgraph[*ei]) + *o_itr = *ei; + + } + + + + template + void make_edge_permutation(EdgePermutation perm) + { + vertex_iterator_t vi, vi_end; + for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + { + vertex_t v(*vi); + perm[v].clear(); + face_handles[v].get_list(std::back_inserter(perm[v])); + } + } + + + private: + + const Graph& g; + VertexIndexMap vm; + + vertex_t kuratowski_v; + vertex_t kuratowski_x; + vertex_t kuratowski_y; + + vertex_list_t garbage; // we delete items from linked lists by + // splicing them into garbage + + //only need these two for kuratowski subgraph isolation + std::vector current_merge_points; + std::vector embedded_edges; + + //property map storage + std::vector low_point_vector; + std::vector dfs_parent_vector; + std::vector dfs_number_vector; + std::vector least_ancestor_vector; + std::vector pertinent_roots_vector; + std::vector backedge_flag_vector; + std::vector visited_vector; + std::vector< face_handle_t > face_handles_vector; + std::vector< face_handle_t > dfs_child_handles_vector; + std::vector< vertex_list_ptr_t > separated_dfs_child_list_vector; + std::vector< typename vertex_list_t::iterator > + separated_node_in_parent_list_vector; + std::vector canonical_dfs_child_vector; + std::vector flipped_vector; + std::vector backedges_vector; + edge_vector_t self_loops; + std::vector dfs_parent_edge_vector; + vertex_vector_t vertices_by_dfs_num; + + //property maps + vertex_to_v_size_map_t low_point; + vertex_to_vertex_map_t dfs_parent; + vertex_to_v_size_map_t dfs_number; + vertex_to_v_size_map_t least_ancestor; + vertex_to_face_handle_list_ptr_map_t pertinent_roots; + vertex_to_v_size_map_t backedge_flag; + vertex_to_v_size_map_t visited; + vertex_to_face_handle_map_t face_handles; + vertex_to_face_handle_map_t dfs_child_handles; + vertex_to_vertex_list_ptr_map_t separated_dfs_child_list; + vertex_to_separated_node_map_t separated_node_in_parent_list; + vertex_to_vertex_map_t canonical_dfs_child; + vertex_to_bool_map_t flipped; + vertex_to_edge_vector_map_t backedges; + vertex_to_edge_map_t dfs_parent_edge; //only need for kuratowski + + merge_stack_t merge_stack; + + }; + + +} //namespace boost + +#endif //__BOYER_MYRVOLD_IMPL_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/bucket_sort.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/bucket_sort.hpp new file mode 100644 index 0000000000..4ec95d8e28 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/bucket_sort.hpp @@ -0,0 +1,144 @@ +//======================================================================= +// Copyright 2007 Aaron Windsor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef __BUCKET_SORT_HPP__ +#define __BUCKET_SORT_HPP__ + +#include +#include +#include + + + +namespace boost +{ + + + template + struct rank_comparison + { + rank_comparison(ItemToRankMap arg_itrm) : itrm(arg_itrm) {} + + template + bool operator() (Item x, Item y) const + { + return get(itrm, x) < get(itrm, y); + } + + private: + ItemToRankMap itrm; + + }; + + + template + struct property_map_tuple_adaptor : + public put_get_helper< typename PropertyMapWrapper::value_type, + property_map_tuple_adaptor + + > + { + typedef typename PropertyMapWrapper::reference reference; + typedef typename PropertyMapWrapper::value_type value_type; + typedef TupleType key_type; + typedef readable_property_map_tag category; + + property_map_tuple_adaptor() {} + + property_map_tuple_adaptor(PropertyMapWrapper wrapper_map) : + m_wrapper_map(wrapper_map) + {} + + inline value_type operator[](const key_type& x) const + { + return get(m_wrapper_map, get(x)); + } + + static const int n = N; + PropertyMapWrapper m_wrapper_map; + + }; + + + + + // This function sorts a sequence of n items by their ranks in linear time, + // given that all ranks are in the range [0, range). This sort is stable. + template + void bucket_sort(ForwardIterator begin, + ForwardIterator end, + ItemToRankMap rank, + SizeType range = 0) + { +#ifdef BOOST_GRAPH_PREFER_STD_LIB + std::stable_sort(begin, end, rank_comparison(rank)); +#else + typedef std::vector + < typename boost::property_traits::key_type > + vector_of_values_t; + typedef std::vector< vector_of_values_t > vector_of_vectors_t; + + if (!range) + { + rank_comparison cmp(rank); + ForwardIterator max_by_rank = std::max_element(begin, end, cmp); + if (max_by_rank == end) + return; + range = get(rank, *max_by_rank) + 1; + } + + vector_of_vectors_t temp_values(range); + + for(ForwardIterator itr = begin; itr != end; ++itr) + { + temp_values[get(rank, *itr)].push_back(*itr); + } + + ForwardIterator orig_seq_itr = begin; + typename vector_of_vectors_t::iterator itr_end = temp_values.end(); + for(typename vector_of_vectors_t::iterator itr = temp_values.begin(); + itr != itr_end; ++itr + ) + { + typename vector_of_values_t::iterator jtr_end = itr->end(); + for(typename vector_of_values_t::iterator jtr = itr->begin(); + jtr != jtr_end; ++jtr + ) + { + *orig_seq_itr = *jtr; + ++orig_seq_itr; + } + } +#endif + } + + + template + void bucket_sort(ForwardIterator begin, + ForwardIterator end, + ItemToRankMap rank) + { + bucket_sort(begin, end, rank, 0); + } + + template + void bucket_sort(ForwardIterator begin, + ForwardIterator end + ) + { + bucket_sort(begin, end, identity_property_map()); + } + + +} //namespace boost + + +#endif //__BUCKET_SORT_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/face_handles.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/face_handles.hpp new file mode 100644 index 0000000000..4e28d4afce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/face_handles.hpp @@ -0,0 +1,497 @@ +//======================================================================= +// Copyright (c) Aaron Windsor 2007 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef __FACE_HANDLES_HPP__ +#define __FACE_HANDLES_HPP__ + + +#include +#include +#include + + +// A "face handle" is an optimization meant to serve two purposes in +// the implementation of the Boyer-Myrvold planarity test: (1) it holds +// the partial planar embedding of a particular vertex as it's being +// constructed, and (2) it allows for efficient traversal around the +// outer face of the partial embedding at that particular vertex. A face +// handle is lightweight, just a shared pointer to the actual implementation, +// since it is passed around/copied liberally in the algorithm. It consists +// of an "anchor" (the actual vertex it's associated with) as well as a +// sequence of edges. The functions first_vertex/second_vertex and +// first_edge/second_edge allow fast access to the beginning and end of the +// stored sequence, which allows one to traverse the outer face of the partial +// planar embedding as it's being created. +// +// There are some policies below that define the contents of the face handles: +// in the case no embedding is needed (for example, if one just wants to use +// the Boyer-Myrvold algorithm as a true/false test for planarity, the +// no_embedding class can be passed as the StoreEmbedding policy. Otherwise, +// either std_list (which uses as std::list) or recursive_lazy_list can be +// passed as this policy. recursive_lazy_list has the best theoretical +// performance (O(n) for a sequence of interleaved concatenations and reversals +// of the underlying list), but I've noticed little difference between std_list +// and recursive_lazy_list in my tests, even though using std_list changes +// the worst-case complexity of the planarity test to O(n^2) +// +// Another policy is StoreOldHandlesPolicy, which specifies whether or not +// to keep a record of the previous first/second vertex/edge - this is needed +// if a Kuratowski subgraph needs to be isolated. + + +namespace boost { namespace graph { namespace detail { + + + //face handle policies + + //EmbeddingStorage policy + struct store_embedding {}; + struct recursive_lazy_list : public store_embedding {}; + struct std_list : public store_embedding {}; + struct no_embedding {}; + + //StoreOldHandlesPolicy + struct store_old_handles {}; + struct no_old_handles {}; + + + + + template + struct lazy_list_node + { + typedef shared_ptr< lazy_list_node > ptr_t; + + lazy_list_node(const DataType& data) : + m_reversed(false), + m_data(data), + m_has_data(true) + {} + + lazy_list_node(ptr_t left_child, ptr_t right_child) : + m_reversed(false), + m_has_data(false), + m_left_child(left_child), + m_right_child(right_child) + {} + + bool m_reversed; + DataType m_data; + bool m_has_data; + shared_ptr m_left_child; + shared_ptr m_right_child; + }; + + + + template + struct old_handles_storage; + + template + struct old_handles_storage + { + Vertex first_vertex; + Vertex second_vertex; + Edge first_edge; + Edge second_edge; + }; + + template + struct old_handles_storage + {}; + + + + + + + template + struct edge_list_storage; + + + + + + template + struct edge_list_storage + { + typedef void type; + + void push_back(Edge) {} + void push_front(Edge) {} + void reverse() {} + void concat_front(edge_list_storage) {} + void concat_back(edge_list_storage) {} + template + void get_list(OutputIterator) {} + }; + + + + + + template + struct edge_list_storage + { + typedef lazy_list_node node_type; + typedef shared_ptr< node_type > type; + type value; + + void push_back(Edge e) + { + type new_node(new node_type(e)); + value = type(new node_type(value, new_node)); + } + + void push_front(Edge e) + { + type new_node(new node_type(e)); + value = type(new node_type(new_node, value)); + } + + void reverse() + { + value->m_reversed = !value->m_reversed; + } + + void concat_front(edge_list_storage other) + { + value = type(new node_type(other.value, value)); + } + + void concat_back(edge_list_storage other) + { + value = type(new node_type(value, other.value)); + } + + template + void get_list(OutputIterator out) + { + get_list_helper(out, value); + } + + private: + + template + void get_list_helper(OutputIterator o_itr, + type root, + bool flipped = false + ) + { + if (!root) + return; + + if (root->m_has_data) + *o_itr = root->m_data; + + if ((flipped && !root->m_reversed) || + (!flipped && root->m_reversed) + ) + { + get_list_helper(o_itr, root->m_right_child, true); + get_list_helper(o_itr, root->m_left_child, true); + } + else + { + get_list_helper(o_itr, root->m_left_child, false); + get_list_helper(o_itr, root->m_right_child, false); + } + + } + + }; + + + + + + template + struct edge_list_storage + { + typedef std::list type; + type value; + + void push_back(Edge e) + { + value.push_back(e); + } + + void push_front(Edge e) + { + value.push_front(e); + } + + void reverse() + { + value.reverse(); + } + + void concat_front(edge_list_storage other) + { + value.splice(value.begin(), other.value); + } + + void concat_back(edge_list_storage other) + { + value.splice(value.end(), other.value); + } + + template + void get_list(OutputIterator out) + { + std::copy(value.begin(), value.end(), out); + } + + }; + + + + + + + + template + struct face_handle_impl + { + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename edge_list_storage::type + edge_list_storage_t; + + + face_handle_impl() : + cached_first_vertex(graph_traits::null_vertex()), + cached_second_vertex(graph_traits::null_vertex()), + true_first_vertex(graph_traits::null_vertex()), + true_second_vertex(graph_traits::null_vertex()), + anchor(graph_traits::null_vertex()) + { + initialize_old_vertices_dispatch(StoreOldHandlesPolicy()); + } + + void initialize_old_vertices_dispatch(store_old_handles) + { + old_handles.first_vertex = graph_traits::null_vertex(); + old_handles.second_vertex = graph_traits::null_vertex(); + } + + void initialize_old_vertices_dispatch(no_old_handles) {} + + vertex_t cached_first_vertex; + vertex_t cached_second_vertex; + vertex_t true_first_vertex; + vertex_t true_second_vertex; + vertex_t anchor; + edge_t cached_first_edge; + edge_t cached_second_edge; + + edge_list_storage edge_list; + old_handles_storage old_handles; + + }; + + + + + + + + + + + + template + class face_handle + { + public: + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef face_handle_impl + impl_t; + typedef face_handle + self_t; + + face_handle(vertex_t anchor = graph_traits::null_vertex()) : + pimpl(new impl_t()) + { + pimpl->anchor = anchor; + } + + face_handle(vertex_t anchor, edge_t initial_edge, const Graph& g) : + pimpl(new impl_t()) + { + vertex_t s(source(initial_edge,g)); + vertex_t t(target(initial_edge,g)); + vertex_t other_vertex = s == anchor ? t : s; + pimpl->anchor = anchor; + pimpl->cached_first_edge = initial_edge; + pimpl->cached_second_edge = initial_edge; + pimpl->cached_first_vertex = other_vertex; + pimpl->cached_second_vertex = other_vertex; + pimpl->true_first_vertex = other_vertex; + pimpl->true_second_vertex = other_vertex; + + pimpl->edge_list.push_back(initial_edge); + store_old_face_handles_dispatch(StoreOldHandlesPolicy()); + } + + //default copy construction, assignment okay. + + void push_first(edge_t e, const Graph& g) + { + pimpl->edge_list.push_front(e); + pimpl->cached_first_vertex = pimpl->true_first_vertex = + source(e, g) == pimpl->anchor ? target(e,g) : source(e,g); + pimpl->cached_first_edge = e; + } + + void push_second(edge_t e, const Graph& g) + { + pimpl->edge_list.push_back(e); + pimpl->cached_second_vertex = pimpl->true_second_vertex = + source(e, g) == pimpl->anchor ? target(e,g) : source(e,g); + pimpl->cached_second_edge = e; + } + + inline void store_old_face_handles() + { + store_old_face_handles_dispatch(StoreOldHandlesPolicy()); + } + + inline vertex_t first_vertex() const + { + return pimpl->cached_first_vertex; + } + + inline vertex_t second_vertex() const + { + return pimpl->cached_second_vertex; + } + + inline vertex_t true_first_vertex() const + { + return pimpl->true_first_vertex; + } + + inline vertex_t true_second_vertex() const + { + return pimpl->true_second_vertex; + } + + inline vertex_t old_first_vertex() const + { + return pimpl->old_handles.first_vertex; + } + + inline vertex_t old_second_vertex() const + { + return pimpl->old_handles.second_vertex; + } + + inline edge_t old_first_edge() const + { + return pimpl->old_handles.first_edge; + } + + inline edge_t old_second_edge() const + { + return pimpl->old_handles.second_edge; + } + + inline edge_t first_edge() const + { + return pimpl->cached_first_edge; + } + + inline edge_t second_edge() const + { + return pimpl->cached_second_edge; + } + + inline vertex_t get_anchor() const + { + return pimpl->anchor; + } + + void glue_first_to_second + (face_handle& bottom) + { + pimpl->edge_list.concat_front(bottom.pimpl->edge_list); + pimpl->true_first_vertex = bottom.pimpl->true_first_vertex; + pimpl->cached_first_vertex = bottom.pimpl->cached_first_vertex; + pimpl->cached_first_edge = bottom.pimpl->cached_first_edge; + } + + void glue_second_to_first + (face_handle& bottom) + { + pimpl->edge_list.concat_back(bottom.pimpl->edge_list); + pimpl->true_second_vertex = bottom.pimpl->true_second_vertex; + pimpl->cached_second_vertex = bottom.pimpl->cached_second_vertex; + pimpl->cached_second_edge = bottom.pimpl->cached_second_edge; + } + + void flip() + { + pimpl->edge_list.reverse(); + std::swap(pimpl->true_first_vertex, pimpl->true_second_vertex); + std::swap(pimpl->cached_first_vertex, pimpl->cached_second_vertex); + std::swap(pimpl->cached_first_edge, pimpl->cached_second_edge); + } + + template + void get_list(OutputIterator o_itr) + { + pimpl->edge_list.get_list(o_itr); + } + + void reset_vertex_cache() + { + pimpl->cached_first_vertex = pimpl->true_first_vertex; + pimpl->cached_second_vertex = pimpl->true_second_vertex; + } + + inline void set_first_vertex(vertex_t v) + { + pimpl->cached_first_vertex = v; + } + + inline void set_second_vertex(vertex_t v) + { + pimpl->cached_second_vertex = v; + } + + private: + + void store_old_face_handles_dispatch(store_old_handles) + { + pimpl->old_handles.first_vertex = pimpl->true_first_vertex; + pimpl->old_handles.second_vertex = pimpl->true_second_vertex; + pimpl->old_handles.first_edge = pimpl->cached_first_edge; + pimpl->old_handles.second_edge = pimpl->cached_second_edge; + } + + void store_old_face_handles_dispatch(no_old_handles) {} + + + + boost::shared_ptr pimpl; + + }; + + +} /* namespace detail */ } /* namespace graph */ } /* namespace boost */ + + +#endif //__FACE_HANDLES_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/face_iterators.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/face_iterators.hpp new file mode 100644 index 0000000000..b5e7ab95b2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_detail/face_iterators.hpp @@ -0,0 +1,375 @@ +//======================================================================= +// Copyright (c) Aaron Windsor 2007 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef __FACE_ITERATORS_HPP__ +#define __FACE_ITERATORS_HPP__ + +#include +#include +#include + +namespace boost +{ + + //tags for defining traversal properties + + //VisitorType + struct lead_visitor {}; + struct follow_visitor {}; + + //TraversalType + struct single_side {}; + struct both_sides {}; + + //TraversalSubType + struct first_side {}; //for single_side + struct second_side {}; //for single_side + struct alternating {}; //for both_sides + + //Time + struct current_iteration {}; + struct previous_iteration {}; + + // Why TraversalType AND TraversalSubType? TraversalSubType is a function + // template parameter passed in to the constructor of the face iterator, + // whereas TraversalType is a class template parameter. This lets us decide + // at runtime whether to move along the first or second side of a bicomp (by + // assigning a face_iterator that has been constructed with TraversalSubType + // = first_side or second_side to a face_iterator variable) without any of + // the virtual function overhead that comes with implementing this + // functionality as a more structured form of type erasure. It also allows + // a single face_iterator to be the end iterator of two iterators traversing + // both sides of a bicomp. + + //ValueType is either graph_traits::vertex_descriptor + //or graph_traits::edge_descriptor + + + //forward declaration (defining defaults) + template + class face_iterator; + + + + template + struct edge_storage + {}; + + template + struct edge_storage + { + typename graph_traits::edge_descriptor value; + }; + + + + + //specialization for TraversalType = traverse_vertices + template + + class face_iterator + : public boost::iterator_facade < face_iterator, + ValueType, + boost::forward_traversal_tag, + ValueType + > + { + public: + + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef face_iterator + self; + typedef typename FaceHandlesMap::value_type face_handle_t; + + face_iterator() : + m_lead(graph_traits::null_vertex()), + m_follow(graph_traits::null_vertex()) + {} + + template + face_iterator(face_handle_t anchor_handle, + FaceHandlesMap face_handles, + TraversalSubType traversal_type): + m_follow(anchor_handle.get_anchor()), + m_face_handles(face_handles) + { + set_lead_dispatch(anchor_handle, traversal_type); + } + + template + face_iterator(vertex_t anchor, + FaceHandlesMap face_handles, + TraversalSubType traversal_type): + m_follow(anchor), + m_face_handles(face_handles) + { + set_lead_dispatch(m_face_handles[anchor], traversal_type); + } + + private: + + friend class boost::iterator_core_access; + + + + + inline vertex_t get_first_vertex(face_handle_t anchor_handle, + current_iteration + ) + { + return anchor_handle.first_vertex(); + } + + inline vertex_t get_second_vertex(face_handle_t anchor_handle, + current_iteration + ) + { + return anchor_handle.second_vertex(); + } + + inline vertex_t get_first_vertex(face_handle_t anchor_handle, + previous_iteration + ) + { + return anchor_handle.old_first_vertex(); + } + + inline vertex_t get_second_vertex(face_handle_t anchor_handle, + previous_iteration + ) + { + return anchor_handle.old_second_vertex(); + } + + + + + + inline void set_lead_dispatch(face_handle_t anchor_handle, first_side) + { + m_lead = get_first_vertex(anchor_handle, Time()); + set_edge_to_first_dispatch(anchor_handle, ValueType(), Time()); + } + + inline void set_lead_dispatch(face_handle_t anchor_handle, second_side) + { + m_lead = get_second_vertex(anchor_handle, Time()); + set_edge_to_second_dispatch(anchor_handle, ValueType(), Time()); + } + + + + + + inline void set_edge_to_first_dispatch(face_handle_t anchor_handle, + edge_t, + current_iteration + ) + { + m_edge.value = anchor_handle.first_edge(); + } + + inline void set_edge_to_second_dispatch(face_handle_t anchor_handle, + edge_t, + current_iteration + ) + { + m_edge.value = anchor_handle.second_edge(); + } + + inline void set_edge_to_first_dispatch(face_handle_t anchor_handle, + edge_t, + previous_iteration + ) + { + m_edge.value = anchor_handle.old_first_edge(); + } + + inline void set_edge_to_second_dispatch(face_handle_t anchor_handle, + edge_t, + previous_iteration + ) + { + m_edge.value = anchor_handle.old_second_edge(); + } + + template + inline void set_edge_to_first_dispatch(face_handle_t, vertex_t, T) + {} + + template + inline void set_edge_to_second_dispatch(face_handle_t, vertex_t, T) + {} + + void increment() + { + face_handle_t curr_face_handle(m_face_handles[m_lead]); + vertex_t first = get_first_vertex(curr_face_handle, Time()); + vertex_t second = get_second_vertex(curr_face_handle, Time()); + if (first == m_follow) + { + m_follow = m_lead; + set_edge_to_second_dispatch(curr_face_handle, ValueType(), Time()); + m_lead = second; + } + else if (second == m_follow) + { + m_follow = m_lead; + set_edge_to_first_dispatch(curr_face_handle, ValueType(), Time()); + m_lead = first; + } + else + m_lead = m_follow = graph_traits::null_vertex(); + } + + bool equal(self const& other) const + { + return m_lead == other.m_lead && m_follow == other.m_follow; + } + + ValueType dereference() const + { + return dereference_dispatch(VisitorType(), ValueType()); + } + + inline ValueType dereference_dispatch(lead_visitor, vertex_t) const + { return m_lead; } + + inline ValueType dereference_dispatch(follow_visitor, vertex_t) const + { return m_follow; } + + inline ValueType dereference_dispatch(lead_visitor, edge_t) const + { return m_edge.value; } + + inline ValueType dereference_dispatch(follow_visitor, edge_t) const + { return m_edge.value; } + + vertex_t m_lead; + vertex_t m_follow; + edge_storage::value > m_edge; + FaceHandlesMap m_face_handles; + }; + + + + + + + + + + template + class face_iterator + + : public boost::iterator_facade< face_iterator, + ValueType, + boost::forward_traversal_tag, + ValueType > + { + public: + + typedef face_iterator + self; + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename FaceHandlesMap::value_type face_handle_t; + + face_iterator() {} + + face_iterator(face_handle_t anchor_handle, FaceHandlesMap face_handles): + first_itr(anchor_handle, face_handles, first_side()), + second_itr(anchor_handle, face_handles, second_side()), + first_is_active(true), + first_increment(true) + {} + + face_iterator(vertex_t anchor, FaceHandlesMap face_handles): + first_itr(face_handles[anchor], face_handles, first_side()), + second_itr(face_handles[anchor], face_handles, second_side()), + first_is_active(true), + first_increment(true) + {} + + private: + + friend class boost::iterator_core_access; + + typedef face_iterator + + inner_itr_t; + + void increment() + { + if (first_increment) + { + ++first_itr; + ++second_itr; + first_increment = false; + } + else if (first_is_active) + ++first_itr; + else + ++second_itr; + first_is_active = !first_is_active; + } + + bool equal(self const& other) const + { + //Want this iterator to be equal to the "end" iterator when at least + //one of the iterators has reached the root of the current bicomp. + //This isn't ideal, but it works. + + return (first_itr == other.first_itr || second_itr == other.second_itr); + } + + ValueType dereference() const + { + return first_is_active ? *first_itr : *second_itr; + } + + inner_itr_t first_itr; + inner_itr_t second_itr; + inner_itr_t face_end; + bool first_is_active; + bool first_increment; + + }; + + +} /* namespace boost */ + + +#endif //__FACE_ITERATORS_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_face_traversal.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_face_traversal.hpp new file mode 100644 index 0000000000..2f8a2ee33a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/planar_face_traversal.hpp @@ -0,0 +1,210 @@ +//======================================================================= +// Copyright (c) Aaron Windsor 2007 +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef __PLANAR_FACE_TRAVERSAL_HPP__ +#define __PLANAR_FACE_TRAVERSAL_HPP__ + +#include +#include //for next and prior +#include + + +namespace boost +{ + + + + + struct planar_face_traversal_visitor + { + void begin_traversal() + {} + + void begin_face() + {} + + template + void next_edge(Edge) + {} + + template + void next_vertex(Vertex) + {} + + void end_face() + {} + + void end_traversal() + {} + + }; + + + + + + template + void planar_face_traversal(const Graph& g, + PlanarEmbedding embedding, + Visitor& visitor, EdgeIndexMap em + ) + { + typedef typename graph_traits::vertex_descriptor vertex_t; + typedef typename graph_traits::edge_descriptor edge_t; + typedef typename graph_traits::vertex_iterator vertex_iterator_t; + typedef typename graph_traits::edge_iterator edge_iterator_t; + typedef typename + property_traits::value_type embedding_value_t; + typedef typename embedding_value_t::const_iterator embedding_iterator_t; + + typedef typename + std::vector< std::set > distinguished_edge_storage_t; + typedef typename + std::vector< std::map > + distinguished_edge_to_edge_storage_t; + + typedef typename + boost::iterator_property_map + + distinguished_edge_map_t; + + typedef typename + boost::iterator_property_map + + distinguished_edge_to_edge_map_t; + + distinguished_edge_storage_t visited_vector(num_edges(g)); + distinguished_edge_to_edge_storage_t next_edge_vector(num_edges(g)); + + distinguished_edge_map_t visited(visited_vector.begin(), em); + distinguished_edge_to_edge_map_t next_edge(next_edge_vector.begin(), em); + + vertex_iterator_t vi, vi_end; + typename std::vector::iterator ei, ei_end; + edge_iterator_t fi, fi_end; + embedding_iterator_t pi, pi_begin, pi_end; + + visitor.begin_traversal(); + + // Initialize the next_edge property map. This map is initialized from the + // PlanarEmbedding so that get(next_edge, e)[v] is the edge that comes + // after e in the clockwise embedding around vertex v. + + for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) + { + vertex_t v(*vi); + pi_begin = embedding[v].begin(); + pi_end = embedding[v].end(); + for(pi = pi_begin; pi != pi_end; ++pi) + { + edge_t e(*pi); + std::map m = get(next_edge, e); + m[v] = boost::next(pi) == pi_end ? *pi_begin : *boost::next(pi); + put(next_edge, e, m); + } + } + + // Take a copy of the edges in the graph here, since we want to accomodate + // face traversals that add edges to the graph (for triangulation, in + // particular) and don't want to use invalidated edge iterators. + // Also, while iterating over all edges in the graph, we single out + // any self-loops, which need some special treatment in the face traversal. + + std::vector self_loops; + std::vector edges_cache; + std::vector vertices_in_edge; + + for(tie(fi,fi_end) = edges(g); fi != fi_end; ++fi) + { + edge_t e(*fi); + edges_cache.push_back(e); + if (source(e,g) == target(e,g)) + self_loops.push_back(e); + } + + + // Iterate over all edges in the graph + ei_end = edges_cache.end(); + for(ei = edges_cache.begin(); ei != ei_end; ++ei) + { + + edge_t e(*ei); + vertices_in_edge.clear(); + vertices_in_edge.push_back(source(e,g)); + vertices_in_edge.push_back(target(e,g)); + + typename std::vector::iterator vi, vi_end; + vi_end = vertices_in_edge.end(); + + //Iterate over both vertices in the current edge + for(vi = vertices_in_edge.begin(); vi != vi_end; ++vi) + { + + vertex_t v(*vi); + std::set e_visited = get(visited, e); + typename std::set::iterator e_visited_found + = e_visited.find(v); + + if (e_visited_found == e_visited.end()) + visitor.begin_face(); + + while (e_visited.find(v) == e_visited.end()) + { + visitor.next_vertex(v); + visitor.next_edge(e); + e_visited.insert(v); + put(visited, e, e_visited); + v = source(e,g) == v ? target(e,g) : source(e,g); + e = get(next_edge, e)[v]; + e_visited = get(visited, e); + } + + if (e_visited_found == e_visited.end()) + visitor.end_face(); + + } + + } + + // Iterate over all self-loops, visiting them once separately + // (they've already been visited once, this visitation is for + // the "inside" of the self-loop) + + ei_end = self_loops.end(); + for(ei = self_loops.begin(); ei != ei_end; ++ei) + { + visitor.begin_face(); + visitor.next_edge(*ei); + visitor.next_vertex(source(*ei,g)); + visitor.end_face(); + } + + visitor.end_traversal(); + + } + + + + template + inline void planar_face_traversal(const Graph& g, + PlanarEmbedding embedding, + Visitor& visitor + ) + { + planar_face_traversal(g, embedding, visitor, get(edge_index, g)); + } + + + + +} //namespace boost + +#endif //__PLANAR_FACE_TRAVERSAL_HPP__ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/plod_generator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/plod_generator.hpp new file mode 100644 index 0000000000..4e557cf070 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/plod_generator.hpp @@ -0,0 +1,253 @@ +// Copyright 2004-2006 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_PLOD_GENERATOR_HPP +#define BOOST_GRAPH_PLOD_GENERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + template + class out_directed_plod_iterator + { + public: + typedef std::forward_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef std::ptrdiff_t difference_type; + + out_directed_plod_iterator() : gen(0), at_end(true) { } + + out_directed_plod_iterator(RandomGenerator& gen, std::size_t n, + double alpha, double beta, + bool allow_self_loops) + : gen(&gen), n(n), alpha(alpha), beta(beta), + allow_self_loops(allow_self_loops), at_end(false), degree(0), + current(0, 0) + { + using std::pow; + + uniform_int x(0, n-1); + std::size_t xv = x(gen); + degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); + } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + out_directed_plod_iterator& operator++() + { + using std::pow; + + uniform_int x(0, n-1); + + // Continue stepping through source nodes until the + // (out)degree is > 0 + while (degree == 0) { + // Step to the next source node. If we've gone past the + // number of nodes we're responsible for, we're done. + if (++current.first >= n) { + at_end = true; + return *this; + } + + std::size_t xv = x(*gen); + degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); + } + + do { + current.second = x(*gen); + } while (current.first == current.second && !allow_self_loops); + --degree; + + return *this; + } + + out_directed_plod_iterator operator++(int) + { + out_directed_plod_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const out_directed_plod_iterator& other) const + { + return at_end == other.at_end; + } + + bool operator!=(const out_directed_plod_iterator& other) const + { + return !(*this == other); + } + + private: + RandomGenerator* gen; + std::size_t n; + double alpha; + double beta; + bool allow_self_loops; + bool at_end; + std::size_t degree; + value_type current; + }; + + template + class undirected_plod_iterator + { + typedef std::vector > out_degrees_t; + + public: + typedef std::input_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef std::ptrdiff_t difference_type; + + undirected_plod_iterator() + : gen(0), out_degrees(), degrees_left(0), allow_self_loops(false) { } + + undirected_plod_iterator(RandomGenerator& gen, std::size_t n, + double alpha, double beta, + bool allow_self_loops = false) + : gen(&gen), n(n), out_degrees(new out_degrees_t), + degrees_left(0), allow_self_loops(allow_self_loops) + { + using std::pow; + + uniform_int x(0, n-1); + for (std::size_t i = 0; i != n; ++i) { + std::size_t xv = x(gen); + std::size_t degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); + if (degree == 0) degree = 1; + else if (degree >= n) degree = n-1; + out_degrees->push_back(std::make_pair(i, degree)); + degrees_left += degree; + } + + next(); + } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + undirected_plod_iterator& operator++() + { + next(); + return *this; + } + + undirected_plod_iterator operator++(int) + { + undirected_plod_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const undirected_plod_iterator& other) const + { + return degrees_left == other.degrees_left; + } + + bool operator!=(const undirected_plod_iterator& other) const + { return !(*this == other); } + + private: + void next() + { + std::size_t source, target; + while (true) { + /* We may get to the point where we can't actually find any + new edges, so we just add some random edge and set the + degrees left = 0 to signal termination. */ + if (out_degrees->size() < 2) { + uniform_int x(0, n-1); + current.first = x(*gen); + do { + current.second = x(*gen); + } while (current.first == current.second && !allow_self_loops); + degrees_left = 0; + out_degrees->clear(); + return; + } + + uniform_int x(0, out_degrees->size()-1); + + // Select source vertex + source = x(*gen); + if ((*out_degrees)[source].second == 0) { + (*out_degrees)[source] = out_degrees->back(); + out_degrees->pop_back(); + continue; + } + + // Select target vertex + target = x(*gen); + if ((*out_degrees)[target].second == 0) { + (*out_degrees)[target] = out_degrees->back(); + out_degrees->pop_back(); + continue; + } else if (source != target + || (allow_self_loops && (*out_degrees)[source].second > 2)) { + break; + } + } + + // Update degree counts + --(*out_degrees)[source].second; + --degrees_left; + --(*out_degrees)[target].second; + --degrees_left; + current.first = (*out_degrees)[source].first; + current.second = (*out_degrees)[target].first; + } + + RandomGenerator* gen; + std::size_t n; + shared_ptr out_degrees; + std::size_t degrees_left; + bool allow_self_loops; + value_type current; + }; + + + template + class plod_iterator + : public mpl::if_::directed_category, + directed_tag>, + out_directed_plod_iterator, + undirected_plod_iterator >::type + { + typedef typename mpl::if_< + is_convertible< + typename graph_traits::directed_category, + directed_tag>, + out_directed_plod_iterator, + undirected_plod_iterator >::type + inherited; + + public: + plod_iterator() : inherited() { } + + plod_iterator(RandomGenerator& gen, std::size_t n, + double alpha, double beta, bool allow_self_loops = false) + : inherited(gen, n, alpha, beta, allow_self_loops) { } + }; + +} // end namespace boost + +#endif // BOOST_GRAPH_PLOD_GENERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/point_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/point_traits.hpp new file mode 100644 index 0000000000..89da93953f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/point_traits.hpp @@ -0,0 +1,26 @@ +// Copyright 2004, 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_POINT_TRAITS_HPP +#define BOOST_GRAPH_POINT_TRAITS_HPP + +namespace boost { namespace graph { + +template +struct point_traits +{ + // The type of each component of the point + typedef typename Point::component_type component_type; + + // The number of dimensions in the point + static std::size_t dimensions(const Point& point); +}; + +} } // end namespace boost::graph + +#endif // BOOST_GRAPH_POINT_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/prim_minimum_spanning_tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/prim_minimum_spanning_tree.hpp new file mode 100644 index 0000000000..79913b1a5c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/prim_minimum_spanning_tree.hpp @@ -0,0 +1,91 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_MST_PRIM_HPP +#define BOOST_GRAPH_MST_PRIM_HPP + +#include +#include +#include + +namespace boost { + + namespace detail { + // this should be somewhere else in boost... + template struct _project2nd { + V operator()(U, V v) const { return v; } + }; + } + + namespace detail { + + // This is Prim's algorithm to calculate the Minimum Spanning Tree + // for an undirected graph with weighted edges. + + template + inline void + prim_mst_impl(const Graph& G, + typename graph_traits::vertex_descriptor s, + const bgl_named_params& params, + Weight) + { + typedef typename property_traits::value_type W; + std::less compare; + detail::_project2nd combine; + dijkstra_shortest_paths(G, s, params.distance_compare(compare). + distance_combine(combine)); + } + } // namespace detail + + template + inline void + prim_minimum_spanning_tree + (const VertexListGraph& g, + typename graph_traits::vertex_descriptor s, + PredecessorMap predecessor, DistanceMap distance, WeightMap weight, + IndexMap index_map, + DijkstraVisitor vis) + { + typedef typename property_traits::value_type W; + std::less compare; + detail::_project2nd combine; + dijkstra_shortest_paths(g, s, predecessor, distance, weight, index_map, + compare, combine, (std::numeric_limits::max)(), 0, + vis); + } + + template + inline void prim_minimum_spanning_tree + (const VertexListGraph& g, + PredecessorMap p_map, + const bgl_named_params& params) + { + detail::prim_mst_impl + (g, + choose_param(get_param(params, root_vertex_t()), *vertices(g).first), + params.predecessor_map(p_map), + choose_const_pmap(get_param(params, edge_weight), g, edge_weight)); + } + + template + inline void prim_minimum_spanning_tree + (const VertexListGraph& g, PredecessorMap p_map) + { + detail::prim_mst_impl + (g, *vertices(g).first, predecessor_map(p_map). + weight_map(get(edge_weight, g)), + get(edge_weight, g)); + } + +} // namespace boost + +#endif // BOOST_GRAPH_MST_PRIM_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/profile.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/profile.hpp new file mode 100644 index 0000000000..1ff99de5c4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/profile.hpp @@ -0,0 +1,43 @@ +// +//======================================================================= +// Copyright 2002 Marc Wintermantel (wintermantel@even-ag.ch) +// ETH Zurich, Center of Structure Technologies (www.imes.ethz.ch/st) +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_PROFILE_HPP +#define BOOST_GRAPH_PROFILE_HPP + +#include +#include +#include + +namespace boost { + + template + typename graph_traits::vertices_size_type + profile(const Graph& g, VertexIndexMap index) + { + typename graph_traits::vertices_size_type b = 0; + typename graph_traits::vertex_iterator i, end; + for (boost::tie(i, end) = vertices(g); i != end; ++i){ + b += ith_bandwidth(*i, g, index) + 1; + } + + return b; + } + + template + typename graph_traits::vertices_size_type + profile(const Graph& g) + { + return profile(g, get(vertex_index, g)); + } + + +} // namespace boost + +#endif // BOOST_GRAPH_PROFILE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/properties.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/properties.hpp new file mode 100644 index 0000000000..fa8440e93f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/properties.hpp @@ -0,0 +1,511 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_PROPERTIES_HPP +#define BOOST_GRAPH_PROPERTIES_HPP + +#include +#include +#include +#include + +// Include the property map library and extensions in the BGL. +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// Stay out of the way of the concept checking class +# define Graph Graph_ +# define RandomAccessContainer RandomAccessContainer_ +#endif + +namespace boost { + + enum default_color_type { white_color, gray_color, green_color, red_color, black_color }; + + template + struct color_traits { + static default_color_type white() { return white_color; } + static default_color_type gray() { return gray_color; } + static default_color_type green() { return green_color; } + static default_color_type red() { return red_color; } + static default_color_type black() { return black_color; } + }; + + // These functions are now obsolete, replaced by color_traits. + inline default_color_type white(default_color_type) { return white_color; } + inline default_color_type gray(default_color_type) { return gray_color; } + inline default_color_type green(default_color_type) { return green_color; } + inline default_color_type red(default_color_type) { return red_color; } + inline default_color_type black(default_color_type) { return black_color; } + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + template <> + struct property_traits { + typedef default_color_type value_type; + typedef std::ptrdiff_t key_type; + typedef default_color_type& reference; + typedef lvalue_property_map_tag category; + }; + // get/put already defined for T* +#endif + + struct graph_property_tag { }; + struct vertex_property_tag { }; + struct edge_property_tag { }; + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // See examples/edge_property.cpp for how to use this. +#define BOOST_INSTALL_PROPERTY(KIND, NAME) \ + template <> struct property_kind { \ + typedef KIND##_property_tag type; \ + } +#else +#define BOOST_INSTALL_PROPERTY(KIND, NAME) \ + template <> struct property_kind { \ + typedef KIND##_property_tag type; \ + } +#endif + +#define BOOST_DEF_PROPERTY(KIND, NAME) \ + enum KIND##_##NAME##_t { KIND##_##NAME }; \ + BOOST_INSTALL_PROPERTY(KIND, NAME) + + BOOST_DEF_PROPERTY(vertex, all); + BOOST_DEF_PROPERTY(edge, all); + BOOST_DEF_PROPERTY(graph, all); + BOOST_DEF_PROPERTY(vertex, index); + BOOST_DEF_PROPERTY(vertex, index1); + BOOST_DEF_PROPERTY(vertex, index2); + BOOST_DEF_PROPERTY(vertex, root); + BOOST_DEF_PROPERTY(edge, index); + BOOST_DEF_PROPERTY(edge, name); + BOOST_DEF_PROPERTY(edge, weight); + BOOST_DEF_PROPERTY(edge, weight2); + BOOST_DEF_PROPERTY(edge, color); + BOOST_DEF_PROPERTY(vertex, name); + BOOST_DEF_PROPERTY(graph, name); + BOOST_DEF_PROPERTY(vertex, distance); + BOOST_DEF_PROPERTY(vertex, distance2); + BOOST_DEF_PROPERTY(vertex, color); + BOOST_DEF_PROPERTY(vertex, degree); + BOOST_DEF_PROPERTY(vertex, in_degree); + BOOST_DEF_PROPERTY(vertex, out_degree); + BOOST_DEF_PROPERTY(vertex, current_degree); + BOOST_DEF_PROPERTY(vertex, priority); + BOOST_DEF_PROPERTY(vertex, discover_time); + BOOST_DEF_PROPERTY(vertex, finish_time); + BOOST_DEF_PROPERTY(vertex, predecessor); + BOOST_DEF_PROPERTY(vertex, rank); + BOOST_DEF_PROPERTY(vertex, centrality); + BOOST_DEF_PROPERTY(vertex, lowpoint); + BOOST_DEF_PROPERTY(vertex, potential); + BOOST_DEF_PROPERTY(vertex, update); + BOOST_DEF_PROPERTY(edge, reverse); + BOOST_DEF_PROPERTY(edge, capacity); + BOOST_DEF_PROPERTY(edge, flow); + BOOST_DEF_PROPERTY(edge, residual_capacity); + BOOST_DEF_PROPERTY(edge, centrality); + BOOST_DEF_PROPERTY(edge, discover_time); + BOOST_DEF_PROPERTY(edge, update); + BOOST_DEF_PROPERTY(edge, finished); + BOOST_DEF_PROPERTY(graph, visitor); + + // These tags are used for property bundles + BOOST_DEF_PROPERTY(graph, bundle); + BOOST_DEF_PROPERTY(vertex, bundle); + BOOST_DEF_PROPERTY(edge, bundle); + + // These tags are used to denote the owners and local descriptors + // for the vertices and edges of a distributed graph. + BOOST_DEF_PROPERTY(vertex, global); + BOOST_DEF_PROPERTY(vertex, owner); + BOOST_DEF_PROPERTY(vertex, local); + BOOST_DEF_PROPERTY(edge, global); + BOOST_DEF_PROPERTY(edge, owner); + BOOST_DEF_PROPERTY(edge, local); + BOOST_DEF_PROPERTY(vertex, local_index); + BOOST_DEF_PROPERTY(edge, local_index); + +#undef BOOST_DEF_PROPERTY + + namespace detail { + + struct dummy_edge_property_selector { + template + struct bind_ { + typedef identity_property_map type; + typedef identity_property_map const_type; + }; + }; + struct dummy_vertex_property_selector { + template + struct bind_ { + typedef identity_property_map type; + typedef identity_property_map const_type; + }; + }; + + } // namespace detail + + // Graph classes can either partially specialize property_map + // or they can specialize these two selector classes. + template + struct edge_property_selector { + typedef detail::dummy_edge_property_selector type; + }; + + template + struct vertex_property_selector { + typedef detail::dummy_vertex_property_selector type; + }; + + namespace detail { + + template struct return_void {typedef void type;}; + + template + struct graph_tag_or_void { + typedef void type; + }; + + template + struct graph_tag_or_void::type> { + typedef typename Graph::graph_tag type; + }; + + template + struct edge_property_map { + typedef typename edge_property_type::type Property; + typedef typename graph_tag_or_void::type graph_tag; + typedef typename edge_property_selector::type Selector; + typedef typename Selector::template bind_ + Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + template + class vertex_property_map { + public: + typedef typename vertex_property_type::type Property; + typedef typename graph_tag_or_void::type graph_tag; + typedef typename vertex_property_selector::type Selector; + typedef typename Selector::template bind_ + Bind; + public: + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + + // This selects the kind of property map, whether is maps from + // edges or from vertices. + // + // It is overly complicated because it's a workaround for + // partial specialization. + struct choose_vertex_property_map { + template + struct bind_ { + typedef vertex_property_map type; + }; + }; + struct choose_edge_property_map { + template + struct bind_ { + typedef edge_property_map type; + }; + }; + template + struct property_map_kind_selector { + // VC++ gets confused if this isn't defined, even though + // this never gets used. + typedef choose_vertex_property_map type; + }; + template <> struct property_map_kind_selector { + typedef choose_vertex_property_map type; + }; + template <> struct property_map_kind_selector { + typedef choose_edge_property_map type; + }; + } // namespace detail + + template + struct property_map { + // private: + typedef typename property_kind::type Kind; + typedef typename detail::property_map_kind_selector::type Selector; + typedef typename Selector::template bind_ Bind; + typedef typename Bind::type Map; + public: + typedef typename Map::type type; + typedef typename Map::const_type const_type; + }; + + // shortcut for accessing the value type of the property map + template + class property_map_value { + typedef typename property_map::const_type PMap; + public: + typedef typename property_traits::value_type type; + }; + + template + class graph_property { + public: + typedef typename property_value< + typename Graph::graph_property_type, Property + >::type type; + }; + + template + class vertex_property { + public: + typedef typename Graph::vertex_property_type type; + }; + template + class edge_property { + public: + typedef typename Graph::edge_property_type type; + }; + + template + class degree_property_map + : public put_get_helper::degree_size_type, + degree_property_map > + { + public: + typedef typename graph_traits::vertex_descriptor key_type; + typedef typename graph_traits::degree_size_type value_type; + typedef value_type reference; + typedef readable_property_map_tag category; + degree_property_map(const Graph& g) : m_g(g) { } + value_type operator[](const key_type& v) const { + return degree(v, m_g); + } + private: + const Graph& m_g; + }; + template + inline degree_property_map + make_degree_map(const Graph& g) { + return degree_property_map(g); + } + + //======================================================================== + // Iterator Property Map Generating Functions contributed by + // Kevin Vanhorn. (see also the property map generating functions + // in boost/property_map/property_map.hpp) + +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) + // A helper function for creating a vertex property map out of a + // random access iterator and the internal vertex index map from a + // graph. + template + inline + iterator_property_map< + RandomAccessIterator, + typename property_map::type, + typename std::iterator_traits::value_type, + typename std::iterator_traits::reference + > + make_iterator_vertex_map(RandomAccessIterator iter, const PropertyGraph& g) + { + return make_iterator_property_map(iter, get(vertex_index, g)); + } + + // Use this next function when vertex_descriptor is known to be an + // integer type, with values ranging from 0 to num_vertices(g). + // + template + inline + iterator_property_map< + RandomAccessIterator, + identity_property_map, + typename std::iterator_traits::value_type, + typename std::iterator_traits::reference + > + make_iterator_vertex_map(RandomAccessIterator iter) + { + return make_iterator_property_map(iter, identity_property_map()); + } +#endif + + template + inline + iterator_property_map< + typename RandomAccessContainer::iterator, + typename property_map::type, + typename RandomAccessContainer::value_type, + typename RandomAccessContainer::reference + > + make_container_vertex_map(RandomAccessContainer& c, const PropertyGraph& g) + { + assert(c.size() >= num_vertices(g)); + return make_iterator_vertex_map(c.begin(), g); + } + + template inline + iterator_property_map< + typename RandomAccessContainer::iterator, + identity_property_map, + typename RandomAccessContainer::value_type, + typename RandomAccessContainer::reference + > + make_container_vertex_map(RandomAccessContainer& c) + { + return make_iterator_vertex_map(c.begin()); + } + +#if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# define BOOST_GRAPH_NO_BUNDLED_PROPERTIES +#endif + +#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) && !defined (BOOST_GRAPH_NO_BUNDLED_PROPERTIES) +// This compiler cannot define a partial specialization based on a +// pointer-to-member type, as seen in boost/graph/subgraph.hpp line 985 (as of +// trunk r53912) +# define BOOST_GRAPH_NO_BUNDLED_PROPERTIES +#endif + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + template + struct bundle_property_map + : put_get_helper > + { + typedef Descriptor key_type; + typedef typename remove_const::type value_type; + typedef T& reference; + typedef lvalue_property_map_tag category; + + bundle_property_map() { } + bundle_property_map(Graph* g_, T Bundle::* pm_) : g(g_), pm(pm_) {} + + reference operator[](key_type k) const { return (*g)[k].*pm; } + private: + Graph* g; + T Bundle::* pm; + }; + + namespace detail { + template + struct is_vertex_bundle + : mpl::and_, + mpl::and_ >, + mpl::not_ > > > + { }; + } + + // Specialize the property map template to generate bundled property maps. + template + struct property_map + { + private: + typedef graph_traits traits; + typedef typename Graph::vertex_bundled vertex_bundled; + typedef typename Graph::edge_bundled edge_bundled; + typedef typename mpl::if_c<(detail::is_vertex_bundle::value), + typename traits::vertex_descriptor, + typename traits::edge_descriptor>::type + descriptor; + typedef typename mpl::if_c<(detail::is_vertex_bundle::value), + vertex_bundled, + edge_bundled>::type + actual_bundle; + + public: + typedef bundle_property_map type; + typedef bundle_property_map + const_type; + }; +#endif + +// These metafunctions help implement the process of determining the vertex +// and edge properties of a graph. +namespace graph_detail { + template + struct retagged_property { + typedef typename Retag::type type; + }; + + // Search the normalized PropList (as returned by retagged<>::type) for + // the given bundle. Return the type error if no such bundle can be found. + template + struct retagged_bundle { + typedef typename property_value::type Value; + typedef typename mpl::if_< + is_same, no_bundle, Value + >::type type; + }; + + template + class normal_property { + // Normalize the property into a property list. + typedef detail::retag_property_list List; + public: + // Extract the normalized property and bundle types. + typedef typename retagged_property::type property; + typedef typename retagged_bundle::type bundle; + }; + + template + struct graph_prop : normal_property + { }; + + template + struct vertex_prop : normal_property + { }; + + template + struct edge_prop : normal_property + { }; +} // namespace graph_detail + +// NOTE: These functions are declared, but never defined since they need to +// be overloaded by graph implementations. However, we need them to be +// declared for the functions below. +template +typename graph_property::type& +get_property(Graph& g, Tag); + +template +typename graph_property::type const& +get_property(Graph const& g, Tag); + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES +// NOTE: This operation is a simple adaptor over the overloaded get_property +// operations. +template +inline typename graph_property::type& +get_property(Graph& g) { + return get_property(g, graph_bundle); +} + +template +inline typename graph_property::type const& +get_property(Graph const& g) { + return get_property(g, graph_bundle); +} +#endif + +} // namespace boost + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// Stay out of the way of the concept checking class +# undef Graph +# undef RandomAccessIterator +#endif + +#endif /* BOOST_GRAPH_PROPERTIES_HPPA */ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/property_iter_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_iter_range.hpp new file mode 100644 index 0000000000..8485fed339 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_iter_range.hpp @@ -0,0 +1,118 @@ + +// (C) Copyright Francois Faure, iMAGIS-GRAVIR / UJF, 2001. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Revision History: +// 03 May 2001 Jeremy Siek +// Generalized the property map iterator and moved that +// part to boost/property_map.hpp. Also modified to +// differentiate between const/mutable graphs and +// added a workaround to avoid partial specialization. + +// 02 May 2001 Francois Faure +// Initial version. + +#ifndef BOOST_GRAPH_PROPERTY_ITER_RANGE_HPP +#define BOOST_GRAPH_PROPERTY_ITER_RANGE_HPP + +#include +#include +#include +#include + +namespace boost { + +//====================================================================== +// graph property iterator range + + template + class graph_property_iter_range { + typedef typename property_map::type map_type; + typedef typename property_map::const_type + const_map_type; + typedef typename property_kind::type Kind; + typedef typename mpl::if_c::value, + typename graph_traits::vertex_iterator, + typename graph_traits::edge_iterator>::type iter; + public: + typedef typename property_map_iterator_generator::type + iterator; + typedef typename property_map_iterator_generator + ::type const_iterator; + typedef std::pair type; + typedef std::pair const_type; + }; + + namespace detail { + + template + typename graph_property_iter_range::type + get_property_iter_range_kind(Graph& graph, const Tag& tag, + const vertex_property_tag& ) + { + typedef typename graph_property_iter_range::iterator iter; + return std::make_pair(iter(vertices(graph).first, get(tag, graph)), + iter(vertices(graph).second, get(tag, graph))); + } + + template + typename graph_property_iter_range::const_type + get_property_iter_range_kind(const Graph& graph, const Tag& tag, + const vertex_property_tag& ) + { + typedef typename graph_property_iter_range + ::const_iterator iter; + return std::make_pair(iter(vertices(graph).first, get(tag, graph)), + iter(vertices(graph).second, get(tag, graph))); + } + + + template + typename graph_property_iter_range::type + get_property_iter_range_kind(Graph& graph, const Tag& tag, + const edge_property_tag& ) + { + typedef typename graph_property_iter_range::iterator iter; + return std::make_pair(iter(edges(graph).first, get(tag, graph)), + iter(edges(graph).second, get(tag, graph))); + } + + template + typename graph_property_iter_range::const_type + get_property_iter_range_kind(const Graph& graph, const Tag& tag, + const edge_property_tag& ) + { + typedef typename graph_property_iter_range + ::const_iterator iter; + return std::make_pair(iter(edges(graph).first, get(tag, graph)), + iter(edges(graph).second, get(tag, graph))); + } + + } // namespace detail + + //====================================================================== + // get an iterator range of properties + + template + typename graph_property_iter_range::type + get_property_iter_range(Graph& graph, const Tag& tag) + { + typedef typename property_kind::type Kind; + return detail::get_property_iter_range_kind(graph, tag, Kind()); + } + + template + typename graph_property_iter_range::const_type + get_property_iter_range(const Graph& graph, const Tag& tag) + { + typedef typename property_kind::type Kind; + return detail::get_property_iter_range_kind(graph, tag, Kind()); + } + +} // namespace boost + + +#endif // BOOST_GRAPH_PROPERTY_ITER_RANGE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/constant_property_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/constant_property_map.hpp new file mode 100644 index 0000000000..dd2461e7ed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/constant_property_map.hpp @@ -0,0 +1,59 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_CONSTANT_PROPERTY_HPP +#define BOOST_GRAPH_CONSTANT_PROPERTY_HPP + +#include + + +// TODO: This should really be part of the property maps library rather than +// the Boost.Graph library. + +namespace boost { + +/** + * A constant property is one, that regardless of the edge or vertex given, + * will always return a constant value. + */ +template +struct constant_property_map + : public boost::put_get_helper< + const Value&, + constant_property_map + > +{ + typedef Key key_type; + typedef Value value_type; + typedef const Value& reference; + typedef boost::readable_property_map_tag category; + + constant_property_map() + : m_value() + { } + + constant_property_map(const value_type &value) + : m_value(value) + { } + + constant_property_map(const constant_property_map& copy) + : m_value(copy.m_value) + { } + + inline reference operator [](const key_type&) const + { return m_value; } + + value_type m_value; +}; + +template +inline constant_property_map +make_constant_property(const Value& value) +{ return constant_property_map(value); } + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/container_property_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/container_property_map.hpp new file mode 100644 index 0000000000..e07cd33065 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/container_property_map.hpp @@ -0,0 +1,75 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_CONTAINER_PROPERTY_MAP_HPP +#define BOOST_GRAPH_CONTAINER_PROPERTY_MAP_HPP + +#include +#include + +namespace boost +{ + // This is an adapter built over the iterator property map with + // more useful uniform construction semantics. Specifically, this + // requires the container rather than the iterator and the graph + // rather than the optional index map. + template + struct container_property_map + : public boost::put_get_helper< + typename iterator_property_map< + typename Container::iterator, + typename property_map< + Graph, + typename detail::choose_indexer::index_type + >::type + >::reference, + container_property_map + > + { + typedef typename detail::choose_indexer::indexer_type indexer_type; + typedef typename indexer_type::index_type index_type; + typedef iterator_property_map< + typename Container::iterator, + typename property_map::type + > map_type; + typedef typename map_type::key_type key_type; + typedef typename map_type::value_type value_type; + typedef typename map_type::reference reference; + typedef typename map_type::category category; + + // The default constructor will *probably* crash if its actually + // used for referencing vertices since the underlying iterator + // map points past the end of an unknown container. + inline container_property_map() + : m_map() + { } + + // This is the preferred constructor. It is invoked over the container + // and the graph explicitly. This requires that the underlying iterator + // map use the indices of the vertices in g rather than the default + // identity map. + // + // Note the const-cast this ensures the reference type of the + // vertex index map is non-const, which happens to be an + // artifact of passing const graph references. + inline container_property_map(Container& c, const Graph& g) + : m_map(c.begin(), indexer_type::index_map(const_cast(g))) + { } + + // Typical copy constructor. + inline container_property_map(const container_property_map& x) + : m_map(x.m_map) + { } + + // The [] operator delegates to the underlying map/ + inline reference operator [](const key_type& k) const + { return m_map[k]; } + + map_type m_map; + }; +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/matrix_property_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/matrix_property_map.hpp new file mode 100644 index 0000000000..bf4f2c9c76 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/matrix_property_map.hpp @@ -0,0 +1,67 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_MATRIX_PROPERTY_MAP_HPP +#define BOOST_GRAPH_MATRIX_PROPERTY_MAP_HPP + +#include + +namespace boost +{ + // This property map is built specifically for property maps over + // matrices. Like the basic property map over a container, this builds + // the property abstraction over a matrix (usually a vector of vectors) + // and returns property maps over the nested containers. + template + struct matrix_property_map + : boost::put_get_helper< + container_property_map, + matrix_property_map > + { + // abstract the indexing keys + typedef typename detail::choose_indexer::indexer_type indexer_type; + + // aliases for the nested container and its corresponding map + typedef typename Matrix::value_type container_type; + typedef container_property_map map_type; + + typedef Key key_type; + + // This property map doesn't really provide access to nested containers, + // but returns property maps over them. Since property maps are all + // copy-constructible (or should be anyways), we never return references. + // As such, this property is only readable, but not writable. Curiously, + // the inner property map is actually an lvalue pmap. + typedef map_type value_type; + typedef map_type reference; + typedef readable_property_map_tag category; + + matrix_property_map() + : m_matrix(0), m_graph(0) + { } + + matrix_property_map(Matrix& m, const Graph& g) + : m_matrix(&m), m_graph(const_cast(&g)) + { } + + matrix_property_map(const matrix_property_map& x) + : m_matrix(x.m_matrix), m_graph(x.m_graph) + { } + + inline reference operator [](key_type k) const + { + typedef typename indexer_type::value_type Index; + Index x = indexer_type::index(k, *m_graph); + return map_type((*m_matrix)[x], *m_graph); + } + + private: + mutable Matrix* m_matrix; + mutable Graph* m_graph; + }; +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/null_property_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/null_property_map.hpp new file mode 100644 index 0000000000..f6273481b0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/property_maps/null_property_map.hpp @@ -0,0 +1,41 @@ +// (C) Copyright Andrew Sutton 2007 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_NULL_PROPERTY_HPP +#define BOOST_GRAPH_NULL_PROPERTY_HPP + +#include + +// TODO: This should really be part of the property maps library rather than +// the Boost.Graph library. + +namespace boost +{ + // A null property is somewhat like the inverse of the constant + // property map except that instead of returning a single value, + // this eats any writes and cannot be read from. + + template + struct null_property_map + { + typedef Key key_type; + typedef Value value_type; + typedef void reference; + typedef boost::writable_property_map_tag category; + }; + + // The null_property_map only has a put() function. + template + void put(null_property_map& pm, const K& key, const V& value) + { } + + // A helper function for intantiating null property maps. + template + inline null_property_map make_null_property() + { return null_property_map(); } +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/push_relabel_max_flow.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/push_relabel_max_flow.hpp new file mode 100644 index 0000000000..fdea7a7e6d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/push_relabel_max_flow.hpp @@ -0,0 +1,746 @@ +//======================================================================= +// Copyright 2000 University of Notre Dame. +// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_PUSH_RELABEL_MAX_FLOW_HPP +#define BOOST_PUSH_RELABEL_MAX_FLOW_HPP + +#include +#include +#include +#include +#include +#include // for std::min and std::max + +#include +#include +#include +#include + +namespace boost { + + namespace detail { + + // This implementation is based on Goldberg's + // "On Implementing Push-Relabel Method for the Maximum Flow Problem" + // by B.V. Cherkassky and A.V. Goldberg, IPCO '95, pp. 157--171 + // and on the h_prf.c and hi_pr.c code written by the above authors. + + // This implements the highest-label version of the push-relabel method + // with the global relabeling and gap relabeling heuristics. + + // The terms "rank", "distance", "height" are synonyms in + // Goldberg's implementation, paper and in the CLR. A "layer" is a + // group of vertices with the same distance. The vertices in each + // layer are categorized as active or inactive. An active vertex + // has positive excess flow and its distance is less than n (it is + // not blocked). + + template + struct preflow_layer { + std::list active_vertices; + std::list inactive_vertices; + }; + + template integer + class FlowValue> + class push_relabel + { + public: + typedef graph_traits Traits; + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::edge_descriptor edge_descriptor; + typedef typename Traits::vertex_iterator vertex_iterator; + typedef typename Traits::out_edge_iterator out_edge_iterator; + typedef typename Traits::vertices_size_type vertices_size_type; + typedef typename Traits::edges_size_type edges_size_type; + + typedef preflow_layer Layer; + typedef std::vector< Layer > LayerArray; + typedef typename LayerArray::iterator layer_iterator; + typedef typename LayerArray::size_type distance_size_type; + + typedef color_traits ColorTraits; + + //======================================================================= + // Some helper predicates + + inline bool is_admissible(vertex_descriptor u, vertex_descriptor v) { + return get(distance, u) == get(distance, v) + 1; + } + inline bool is_residual_edge(edge_descriptor a) { + return 0 < get(residual_capacity, a); + } + inline bool is_saturated(edge_descriptor a) { + return get(residual_capacity, a) == 0; + } + + //======================================================================= + // Layer List Management Functions + + typedef typename std::list::iterator list_iterator; + + void add_to_active_list(vertex_descriptor u, Layer& layer) { + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + layer.active_vertices.push_front(u); + max_active = max BOOST_PREVENT_MACRO_SUBSTITUTION(get(distance, u), max_active); + min_active = min BOOST_PREVENT_MACRO_SUBSTITUTION(get(distance, u), min_active); + layer_list_ptr[u] = layer.active_vertices.begin(); + } + void remove_from_active_list(vertex_descriptor u) { + layers[get(distance, u)].active_vertices.erase(layer_list_ptr[u]); + } + + void add_to_inactive_list(vertex_descriptor u, Layer& layer) { + layer.inactive_vertices.push_front(u); + layer_list_ptr[u] = layer.inactive_vertices.begin(); + } + void remove_from_inactive_list(vertex_descriptor u) { + layers[get(distance, u)].inactive_vertices.erase(layer_list_ptr[u]); + } + + //======================================================================= + // initialization + push_relabel(Graph& g_, + EdgeCapacityMap cap, + ResidualCapacityEdgeMap res, + ReverseEdgeMap rev, + vertex_descriptor src_, + vertex_descriptor sink_, + VertexIndexMap idx) + : g(g_), n(num_vertices(g_)), capacity(cap), src(src_), sink(sink_), + index(idx), + excess_flow_data(num_vertices(g_)), + excess_flow(excess_flow_data.begin(), idx), + current_data(num_vertices(g_), out_edges(*vertices(g_).first, g_)), + current(current_data.begin(), idx), + distance_data(num_vertices(g_)), + distance(distance_data.begin(), idx), + color_data(num_vertices(g_)), + color(color_data.begin(), idx), + reverse_edge(rev), + residual_capacity(res), + layers(num_vertices(g_)), + layer_list_ptr_data(num_vertices(g_), + layers.front().inactive_vertices.end()), + layer_list_ptr(layer_list_ptr_data.begin(), idx), + push_count(0), update_count(0), relabel_count(0), + gap_count(0), gap_node_count(0), + work_since_last_update(0) + { + vertex_iterator u_iter, u_end; + // Don't count the reverse edges + edges_size_type m = num_edges(g) / 2; + nm = alpha() * n + m; + + // Initialize flow to zero which means initializing + // the residual capacity to equal the capacity. + out_edge_iterator ei, e_end; + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) + for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei) { + put(residual_capacity, *ei, get(capacity, *ei)); + } + + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) { + vertex_descriptor u = *u_iter; + put(excess_flow, u, 0); + current[u] = out_edges(u, g); + } + + bool overflow_detected = false; + FlowValue test_excess = 0; + + out_edge_iterator a_iter, a_end; + for (boost::tie(a_iter, a_end) = out_edges(src, g); a_iter != a_end; ++a_iter) + if (target(*a_iter, g) != src) + test_excess += get(residual_capacity, *a_iter); + if (test_excess > (std::numeric_limits::max)()) + overflow_detected = true; + + if (overflow_detected) + put(excess_flow, src, (std::numeric_limits::max)()); + else { + put(excess_flow, src, 0); + for (boost::tie(a_iter, a_end) = out_edges(src, g); + a_iter != a_end; ++a_iter) { + edge_descriptor a = *a_iter; + vertex_descriptor tgt = target(a, g); + if (tgt != src) { + ++push_count; + FlowValue delta = get(residual_capacity, a); + put(residual_capacity, a, get(residual_capacity, a) - delta); + edge_descriptor rev = get(reverse_edge, a); + put(residual_capacity, rev, get(residual_capacity, rev) + delta); + put(excess_flow, tgt, get(excess_flow, tgt) + delta); + } + } + } + max_distance = num_vertices(g) - 1; + max_active = 0; + min_active = n; + + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) { + vertex_descriptor u = *u_iter; + if (u == sink) { + put(distance, u, 0); + continue; + } else if (u == src && !overflow_detected) + put(distance, u, n); + else + put(distance, u, 1); + + if (get(excess_flow, u) > 0) + add_to_active_list(u, layers[1]); + else if (get(distance, u) < n) + add_to_inactive_list(u, layers[1]); + } + + } // push_relabel constructor + + //======================================================================= + // This is a breadth-first search over the residual graph + // (well, actually the reverse of the residual graph). + // Would be cool to have a graph view adaptor for hiding certain + // edges, like the saturated (non-residual) edges in this case. + // Goldberg's implementation abused "distance" for the coloring. + void global_distance_update() + { + BOOST_USING_STD_MAX(); + ++update_count; + vertex_iterator u_iter, u_end; + for (boost::tie(u_iter,u_end) = vertices(g); u_iter != u_end; ++u_iter) { + put(color, *u_iter, ColorTraits::white()); + put(distance, *u_iter, n); + } + put(color, sink, ColorTraits::gray()); + put(distance, sink, 0); + + for (distance_size_type l = 0; l <= max_distance; ++l) { + layers[l].active_vertices.clear(); + layers[l].inactive_vertices.clear(); + } + + max_distance = max_active = 0; + min_active = n; + + Q.push(sink); + while (! Q.empty()) { + vertex_descriptor u = Q.top(); + Q.pop(); + distance_size_type d_v = get(distance, u) + 1; + + out_edge_iterator ai, a_end; + for (boost::tie(ai, a_end) = out_edges(u, g); ai != a_end; ++ai) { + edge_descriptor a = *ai; + vertex_descriptor v = target(a, g); + if (get(color, v) == ColorTraits::white() + && is_residual_edge(get(reverse_edge, a))) { + put(distance, v, d_v); + put(color, v, ColorTraits::gray()); + current[v] = out_edges(v, g); + max_distance = max BOOST_PREVENT_MACRO_SUBSTITUTION(d_v, max_distance); + + if (get(excess_flow, v) > 0) + add_to_active_list(v, layers[d_v]); + else + add_to_inactive_list(v, layers[d_v]); + + Q.push(v); + } + } + } + } // global_distance_update() + + //======================================================================= + // This function is called "push" in Goldberg's h_prf implementation, + // but it is called "discharge" in the paper and in hi_pr.c. + void discharge(vertex_descriptor u) + { + assert(get(excess_flow, u) > 0); + while (1) { + out_edge_iterator ai, ai_end; + for (boost::tie(ai, ai_end) = current[u]; ai != ai_end; ++ai) { + edge_descriptor a = *ai; + if (is_residual_edge(a)) { + vertex_descriptor v = target(a, g); + if (is_admissible(u, v)) { + ++push_count; + if (v != sink && get(excess_flow, v) == 0) { + remove_from_inactive_list(v); + add_to_active_list(v, layers[get(distance, v)]); + } + push_flow(a); + if (get(excess_flow, u) == 0) + break; + } + } + } // for out_edges of i starting from current + + Layer& layer = layers[get(distance, u)]; + distance_size_type du = get(distance, u); + + if (ai == ai_end) { // i must be relabeled + relabel_distance(u); + if (layer.active_vertices.empty() + && layer.inactive_vertices.empty()) + gap(du); + if (get(distance, u) == n) + break; + } else { // i is no longer active + current[u].first = ai; + add_to_inactive_list(u, layer); + break; + } + } // while (1) + } // discharge() + + //======================================================================= + // This corresponds to the "push" update operation of the paper, + // not the "push" function in Goldberg's h_prf.c implementation. + // The idea is to push the excess flow from from vertex u to v. + void push_flow(edge_descriptor u_v) + { + vertex_descriptor + u = source(u_v, g), + v = target(u_v, g); + + BOOST_USING_STD_MIN(); + FlowValue flow_delta + = min BOOST_PREVENT_MACRO_SUBSTITUTION(get(excess_flow, u), get(residual_capacity, u_v)); + + put(residual_capacity, u_v, get(residual_capacity, u_v) - flow_delta); + edge_descriptor rev = get(reverse_edge, u_v); + put(residual_capacity, rev, get(residual_capacity, rev) + flow_delta); + + put(excess_flow, u, get(excess_flow, u) - flow_delta); + put(excess_flow, v, get(excess_flow, v) + flow_delta); + } // push_flow() + + //======================================================================= + // The main purpose of this routine is to set distance[v] + // to the smallest value allowed by the valid labeling constraints, + // which are: + // distance[t] = 0 + // distance[u] <= distance[v] + 1 for every residual edge (u,v) + // + distance_size_type relabel_distance(vertex_descriptor u) + { + BOOST_USING_STD_MAX(); + ++relabel_count; + work_since_last_update += beta(); + + distance_size_type min_distance = num_vertices(g); + put(distance, u, min_distance); + + // Examine the residual out-edges of vertex i, choosing the + // edge whose target vertex has the minimal distance. + out_edge_iterator ai, a_end, min_edge_iter; + for (boost::tie(ai, a_end) = out_edges(u, g); ai != a_end; ++ai) { + ++work_since_last_update; + edge_descriptor a = *ai; + vertex_descriptor v = target(a, g); + if (is_residual_edge(a) && get(distance, v) < min_distance) { + min_distance = get(distance, v); + min_edge_iter = ai; + } + } + ++min_distance; + if (min_distance < n) { + put(distance, u, min_distance); // this is the main action + current[u].first = min_edge_iter; + max_distance = max BOOST_PREVENT_MACRO_SUBSTITUTION(min_distance, max_distance); + } + return min_distance; + } // relabel_distance() + + //======================================================================= + // cleanup beyond the gap + void gap(distance_size_type empty_distance) + { + ++gap_count; + + distance_size_type r; // distance of layer before the current layer + r = empty_distance - 1; + + // Set the distance for the vertices beyond the gap to "infinity". + for (layer_iterator l = layers.begin() + empty_distance + 1; + l < layers.begin() + max_distance; ++l) { + list_iterator i; + for (i = l->inactive_vertices.begin(); + i != l->inactive_vertices.end(); ++i) { + put(distance, *i, n); + ++gap_node_count; + } + l->inactive_vertices.clear(); + } + max_distance = r; + max_active = r; + } + + //======================================================================= + // This is the core part of the algorithm, "phase one". + FlowValue maximum_preflow() + { + work_since_last_update = 0; + + while (max_active >= min_active) { // "main" loop + + Layer& layer = layers[max_active]; + list_iterator u_iter = layer.active_vertices.begin(); + + if (u_iter == layer.active_vertices.end()) + --max_active; + else { + vertex_descriptor u = *u_iter; + remove_from_active_list(u); + + discharge(u); + + if (work_since_last_update * global_update_frequency() > nm) { + global_distance_update(); + work_since_last_update = 0; + } + } + } // while (max_active >= min_active) + + return get(excess_flow, sink); + } // maximum_preflow() + + //======================================================================= + // remove excess flow, the "second phase" + // This does a DFS on the reverse flow graph of nodes with excess flow. + // If a cycle is found, cancel it. + // Return the nodes with excess flow in topological order. + // + // Unlike the prefl_to_flow() implementation, we use + // "color" instead of "distance" for the DFS labels + // "parent" instead of nl_prev for the DFS tree + // "topo_next" instead of nl_next for the topological ordering + void convert_preflow_to_flow() + { + vertex_iterator u_iter, u_end; + out_edge_iterator ai, a_end; + + vertex_descriptor r, restart, u; + + std::vector parent(n); + std::vector topo_next(n); + + vertex_descriptor tos(parent[0]), + bos(parent[0]); // bogus initialization, just to avoid warning + bool bos_null = true; + + // handle self-loops + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) + for (boost::tie(ai, a_end) = out_edges(*u_iter, g); ai != a_end; ++ai) + if (target(*ai, g) == *u_iter) + put(residual_capacity, *ai, get(capacity, *ai)); + + // initialize + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) { + u = *u_iter; + put(color, u, ColorTraits::white()); + parent[u] = u; + current[u] = out_edges(u, g); + } + // eliminate flow cycles and topologically order the vertices + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) { + u = *u_iter; + if (get(color, u) == ColorTraits::white() + && get(excess_flow, u) > 0 + && u != src && u != sink ) { + r = u; + put(color, r, ColorTraits::gray()); + while (1) { + for (; current[u].first != current[u].second; ++current[u].first) { + edge_descriptor a = *current[u].first; + if (get(capacity, a) == 0 && is_residual_edge(a)) { + vertex_descriptor v = target(a, g); + if (get(color, v) == ColorTraits::white()) { + put(color, v, ColorTraits::gray()); + parent[v] = u; + u = v; + break; + } else if (get(color, v) == ColorTraits::gray()) { + // find minimum flow on the cycle + FlowValue delta = get(residual_capacity, a); + while (1) { + BOOST_USING_STD_MIN(); + delta = min BOOST_PREVENT_MACRO_SUBSTITUTION(delta, get(residual_capacity, *current[v].first)); + if (v == u) + break; + else + v = target(*current[v].first, g); + } + // remove delta flow units + v = u; + while (1) { + a = *current[v].first; + put(residual_capacity, a, get(residual_capacity, a) - delta); + edge_descriptor rev = get(reverse_edge, a); + put(residual_capacity, rev, get(residual_capacity, rev) + delta); + v = target(a, g); + if (v == u) + break; + } + + // back-out of DFS to the first saturated edge + restart = u; + for (v = target(*current[u].first, g); v != u; v = target(a, g)){ + a = *current[v].first; + if (get(color, v) == ColorTraits::white() + || is_saturated(a)) { + put(color, target(*current[v].first, g), ColorTraits::white()); + if (get(color, v) != ColorTraits::white()) + restart = v; + } + } + if (restart != u) { + u = restart; + ++current[u].first; + break; + } + } // else if (color[v] == ColorTraits::gray()) + } // if (get(capacity, a) == 0 ... + } // for out_edges(u, g) (though "u" changes during loop) + + if ( current[u].first == current[u].second ) { + // scan of i is complete + put(color, u, ColorTraits::black()); + if (u != src) { + if (bos_null) { + bos = u; + bos_null = false; + tos = u; + } else { + topo_next[u] = tos; + tos = u; + } + } + if (u != r) { + u = parent[u]; + ++current[u].first; + } else + break; + } + } // while (1) + } // if (color[u] == white && excess_flow[u] > 0 & ...) + } // for all vertices in g + + // return excess flows + // note that the sink is not on the stack + if (! bos_null) { + for (u = tos; u != bos; u = topo_next[u]) { + boost::tie(ai, a_end) = out_edges(u, g); + while (get(excess_flow, u) > 0 && ai != a_end) { + if (get(capacity, *ai) == 0 && is_residual_edge(*ai)) + push_flow(*ai); + ++ai; + } + } + // do the bottom + u = bos; + ai = out_edges(u, g).first; + while (get(excess_flow, u) > 0) { + if (get(capacity, *ai) == 0 && is_residual_edge(*ai)) + push_flow(*ai); + ++ai; + } + } + + } // convert_preflow_to_flow() + + //======================================================================= + inline bool is_flow() + { + vertex_iterator u_iter, u_end; + out_edge_iterator ai, a_end; + + // check edge flow values + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) { + for (boost::tie(ai, a_end) = out_edges(*u_iter, g); ai != a_end; ++ai) { + edge_descriptor a = *ai; + if (get(capacity, a) > 0) + if ((get(residual_capacity, a) + get(residual_capacity, get(reverse_edge, a)) + != get(capacity, a) + get(capacity, get(reverse_edge, a))) + || (get(residual_capacity, a) < 0) + || (get(residual_capacity, get(reverse_edge, a)) < 0)) + return false; + } + } + + // check conservation + FlowValue sum; + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) { + vertex_descriptor u = *u_iter; + if (u != src && u != sink) { + if (get(excess_flow, u) != 0) + return false; + sum = 0; + for (boost::tie(ai, a_end) = out_edges(u, g); ai != a_end; ++ai) + if (get(capacity, *ai) > 0) + sum -= get(capacity, *ai) - get(residual_capacity, *ai); + else + sum += get(residual_capacity, *ai); + + if (get(excess_flow, u) != sum) + return false; + } + } + + return true; + } // is_flow() + + bool is_optimal() { + // check if mincut is saturated... + global_distance_update(); + return get(distance, src) >= n; + } + + void print_statistics(std::ostream& os) const { + os << "pushes: " << push_count << std::endl + << "relabels: " << relabel_count << std::endl + << "updates: " << update_count << std::endl + << "gaps: " << gap_count << std::endl + << "gap nodes: " << gap_node_count << std::endl + << std::endl; + } + + void print_flow_values(std::ostream& os) const { + os << "flow values" << std::endl; + vertex_iterator u_iter, u_end; + out_edge_iterator ei, e_end; + for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) + for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei) + if (get(capacity, *ei) > 0) + os << *u_iter << " " << target(*ei, g) << " " + << (get(capacity, *ei) - get(residual_capacity, *ei)) << std::endl; + os << std::endl; + } + + //======================================================================= + + Graph& g; + vertices_size_type n; + vertices_size_type nm; + EdgeCapacityMap capacity; + vertex_descriptor src; + vertex_descriptor sink; + VertexIndexMap index; + + // will need to use random_access_property_map with these + std::vector< FlowValue > excess_flow_data; + iterator_property_map::iterator, VertexIndexMap> excess_flow; + std::vector< std::pair > current_data; + iterator_property_map< + typename std::vector< std::pair >::iterator, + VertexIndexMap> current; + std::vector< distance_size_type > distance_data; + iterator_property_map< + typename std::vector< distance_size_type >::iterator, + VertexIndexMap> distance; + std::vector< default_color_type > color_data; + iterator_property_map< + std::vector< default_color_type >::iterator, + VertexIndexMap> color; + + // Edge Property Maps that must be interior to the graph + ReverseEdgeMap reverse_edge; + ResidualCapacityEdgeMap residual_capacity; + + LayerArray layers; + std::vector< list_iterator > layer_list_ptr_data; + iterator_property_map::iterator, VertexIndexMap> layer_list_ptr; + distance_size_type max_distance; // maximal distance + distance_size_type max_active; // maximal distance with active node + distance_size_type min_active; // minimal distance with active node + boost::queue Q; + + // Statistics counters + long push_count; + long update_count; + long relabel_count; + long gap_count; + long gap_node_count; + + inline double global_update_frequency() { return 0.5; } + inline vertices_size_type alpha() { return 6; } + inline long beta() { return 12; } + + long work_since_last_update; + }; + + } // namespace detail + + template + typename property_traits::value_type + push_relabel_max_flow + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + CapacityEdgeMap cap, ResidualCapacityEdgeMap res, + ReverseEdgeMap rev, VertexIndexMap index_map) + { + typedef typename property_traits::value_type FlowValue; + + detail::push_relabel + algo(g, cap, res, rev, src, sink, index_map); + + FlowValue flow = algo.maximum_preflow(); + + algo.convert_preflow_to_flow(); + + assert(algo.is_flow()); + assert(algo.is_optimal()); + + return flow; + } // push_relabel_max_flow() + + template + typename detail::edge_capacity_value::type + push_relabel_max_flow + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + const bgl_named_params& params) + { + return push_relabel_max_flow + (g, src, sink, + choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity), + choose_pmap(get_param(params, edge_residual_capacity), + g, edge_residual_capacity), + choose_const_pmap(get_param(params, edge_reverse), g, edge_reverse), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index) + ); + } + + template + typename property_traits< + typename property_map::const_type + >::value_type + push_relabel_max_flow + (Graph& g, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink) + { + bgl_named_params params(0); // bogus empty param + return push_relabel_max_flow(g, src, sink, params); + } + +} // namespace boost + +#endif // BOOST_PUSH_RELABEL_MAX_FLOW_HPP + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/r_c_shortest_paths.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/r_c_shortest_paths.hpp new file mode 100644 index 0000000000..9d395799ea --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/r_c_shortest_paths.hpp @@ -0,0 +1,733 @@ +// r_c_shortest_paths.hpp header file + +// Copyright Michael Drexl 2005, 2006. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_R_C_SHORTEST_PATHS_HPP +#define BOOST_GRAPH_R_C_SHORTEST_PATHS_HPP + +#include +#include +#include + +#include + +namespace boost { + +// r_c_shortest_paths_label struct +template +struct r_c_shortest_paths_label +{ + r_c_shortest_paths_label + ( const unsigned long n, + const Resource_Container& rc = Resource_Container(), + const r_c_shortest_paths_label* const pl = 0, + const typename graph_traits::edge_descriptor& ed = + graph_traits::edge_descriptor(), + const typename graph_traits::vertex_descriptor& vd = + graph_traits::vertex_descriptor() ) + : num( n ), + cumulated_resource_consumption( rc ), + p_pred_label( pl ), + pred_edge( ed ), + resident_vertex( vd ), + b_is_dominated( false ), + b_is_processed( false ) + {} + r_c_shortest_paths_label& operator=( const r_c_shortest_paths_label& other ) + { + if( this == &other ) + return *this; + this->~r_c_shortest_paths_label(); + new( this ) r_c_shortest_paths_label( other ); + return *this; + } + const unsigned long num; + Resource_Container cumulated_resource_consumption; + const r_c_shortest_paths_label* const p_pred_label; + const typename graph_traits::edge_descriptor pred_edge; + const typename graph_traits::vertex_descriptor resident_vertex; + bool b_is_dominated; + bool b_is_processed; +}; // r_c_shortest_paths_label + +template +inline bool operator== +( const r_c_shortest_paths_label& l1, + const r_c_shortest_paths_label& l2 ) +{ + return + l1.cumulated_resource_consumption == l2.cumulated_resource_consumption; +} + +template +inline bool operator!= +( const r_c_shortest_paths_label& l1, + const r_c_shortest_paths_label& l2 ) +{ + return + !( l1 == l2 ); +} + +template +inline bool operator< +( const r_c_shortest_paths_label& l1, + const r_c_shortest_paths_label& l2 ) +{ + return + l1.cumulated_resource_consumption < l2.cumulated_resource_consumption; +} + +template +inline bool operator> +( const r_c_shortest_paths_label& l1, + const r_c_shortest_paths_label& l2 ) +{ + return + l2.cumulated_resource_consumption < l1.cumulated_resource_consumption; +} + +template +inline bool operator<= +( const r_c_shortest_paths_label& l1, + const r_c_shortest_paths_label& l2 ) +{ + return + l1 < l2 || l1 == l2; +} + +template +inline bool operator>= +( const r_c_shortest_paths_label& l1, + const r_c_shortest_paths_label& l2 ) +{ + return l2 < l1 || l1 == l2; +} + +namespace detail { + +// ks_smart_pointer class +// from: +// Kuhlins, S.; Schader, M. (1999): +// Die C++-Standardbibliothek +// Springer, Berlin +// p. 333 f. +template +class ks_smart_pointer +{ +public: + ks_smart_pointer( T* ptt = 0 ) : pt( ptt ) {} + ks_smart_pointer( const ks_smart_pointer& other ) : pt( other.pt ) {} + ks_smart_pointer& operator=( const ks_smart_pointer& other ) + { pt = other.pt; return *this; } + ~ks_smart_pointer() {} + T& operator*() const { return *pt; } + T* operator->() const { return pt; } + T* get() const { return pt; } + operator T*() const { return pt; } + friend bool operator==( const ks_smart_pointer& t, + const ks_smart_pointer& u ) + { return *t.pt == *u.pt; } + friend bool operator!=( const ks_smart_pointer& t, + const ks_smart_pointer& u ) + { return *t.pt != *u.pt; } + friend bool operator<( const ks_smart_pointer& t, + const ks_smart_pointer& u ) + { return *t.pt < *u.pt; } + friend bool operator>( const ks_smart_pointer& t, + const ks_smart_pointer& u ) + { return *t.pt > *u.pt; } + friend bool operator<=( const ks_smart_pointer& t, + const ks_smart_pointer& u ) + { return *t.pt <= *u.pt; } + friend bool operator>=( const ks_smart_pointer& t, + const ks_smart_pointer& u ) + { return *t.pt >= *u.pt; } +private: + T* pt; +}; // ks_smart_pointer + + +// r_c_shortest_paths_dispatch function (body/implementation) +template +void r_c_shortest_paths_dispatch +( const Graph& g, + const VertexIndexMap& vertex_index_map, + const EdgeIndexMap& /*edge_index_map*/, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t, + // each inner vector corresponds to a pareto-optimal path + std::vector + ::edge_descriptor> >& pareto_optimal_solutions, + std::vector + & pareto_optimal_resource_containers, + bool b_all_pareto_optimal_solutions, + // to initialize the first label/resource container + // and to carry the type information + const Resource_Container& rc, + Resource_Extension_Function& ref, + Dominance_Function& dominance, + // to specify the memory management strategy for the labels + Label_Allocator /*la*/, + Visitor vis ) +{ + pareto_optimal_resource_containers.clear(); + pareto_optimal_solutions.clear(); + + unsigned long i_label_num = 0; + typedef + typename + Label_Allocator::template rebind + >::other LAlloc; + LAlloc l_alloc; + typedef + ks_smart_pointer + > Splabel; + std::priority_queue, std::greater > + unprocessed_labels; + + bool b_feasible = true; + r_c_shortest_paths_label* first_label = + l_alloc.allocate( 1 ); + l_alloc.construct + ( first_label, + r_c_shortest_paths_label + ( i_label_num++, + rc, + 0, + typename graph_traits:: + edge_descriptor(), + s ) ); + + Splabel splabel_first_label = Splabel( first_label ); + unprocessed_labels.push( splabel_first_label ); + std::vector > vec_vertex_labels( num_vertices( g ) ); + vec_vertex_labels[vertex_index_map[s]].push_back( splabel_first_label ); + std::vector::iterator> + vec_last_valid_positions_for_dominance( num_vertices( g ) ); + for( int i = 0; i < static_cast( num_vertices( g ) ); ++i ) + vec_last_valid_positions_for_dominance[i] = vec_vertex_labels[i].begin(); + std::vector vec_last_valid_index_for_dominance( num_vertices( g ), 0 ); + std::vector + b_vec_vertex_already_checked_for_dominance( num_vertices( g ), false ); + while( unprocessed_labels.size() ) + { + Splabel cur_label = unprocessed_labels.top(); + unprocessed_labels.pop(); + vis.on_label_popped( *cur_label, g ); + // an Splabel object in unprocessed_labels and the respective Splabel + // object in the respective list of vec_vertex_labels share their + // embedded r_c_shortest_paths_label object + // to avoid memory leaks, dominated + // r_c_shortest_paths_label objects are marked and deleted when popped + // from unprocessed_labels, as they can no longer be deleted at the end of + // the function; only the Splabel object in unprocessed_labels still + // references the r_c_shortest_paths_label object + // this is also for efficiency, because the else branch is executed only + // if there is a chance that extending the + // label leads to new undominated labels, which in turn is possible only + // if the label to be extended is undominated + if( !cur_label->b_is_dominated ) + { + int i_cur_resident_vertex_num = cur_label->resident_vertex; + std::list& list_labels_cur_vertex = + vec_vertex_labels[i_cur_resident_vertex_num]; + if( static_cast( list_labels_cur_vertex.size() ) >= 2 + && vec_last_valid_index_for_dominance[i_cur_resident_vertex_num] + < static_cast( list_labels_cur_vertex.size() ) ) + { + typename std::list::iterator outer_iter = + list_labels_cur_vertex.begin(); + bool b_outer_iter_at_or_beyond_last_valid_pos_for_dominance = false; + while( outer_iter != list_labels_cur_vertex.end() ) + { + Splabel cur_outer_splabel = *outer_iter; + typename std::list::iterator inner_iter = outer_iter; + if( !b_outer_iter_at_or_beyond_last_valid_pos_for_dominance + && outer_iter == + vec_last_valid_positions_for_dominance + [i_cur_resident_vertex_num] ) + b_outer_iter_at_or_beyond_last_valid_pos_for_dominance = true; + if( !b_vec_vertex_already_checked_for_dominance + [i_cur_resident_vertex_num] + || b_outer_iter_at_or_beyond_last_valid_pos_for_dominance ) + { + ++inner_iter; + } + else + { + inner_iter = + vec_last_valid_positions_for_dominance + [i_cur_resident_vertex_num]; + ++inner_iter; + } + bool b_outer_iter_erased = false; + while( inner_iter != list_labels_cur_vertex.end() ) + { + Splabel cur_inner_splabel = *inner_iter; + if( dominance( cur_outer_splabel-> + cumulated_resource_consumption, + cur_inner_splabel-> + cumulated_resource_consumption ) ) + { + typename std::list::iterator buf = inner_iter; + ++inner_iter; + list_labels_cur_vertex.erase( buf ); + if( cur_inner_splabel->b_is_processed ) + { + l_alloc.destroy( cur_inner_splabel.get() ); + l_alloc.deallocate( cur_inner_splabel.get(), 1 ); + } + else + cur_inner_splabel->b_is_dominated = true; + continue; + } + else + ++inner_iter; + if( dominance( cur_inner_splabel-> + cumulated_resource_consumption, + cur_outer_splabel-> + cumulated_resource_consumption ) ) + { + typename std::list::iterator buf = outer_iter; + ++outer_iter; + list_labels_cur_vertex.erase( buf ); + b_outer_iter_erased = true; + if( cur_outer_splabel->b_is_processed ) + { + l_alloc.destroy( cur_outer_splabel.get() ); + l_alloc.deallocate( cur_outer_splabel.get(), 1 ); + } + else + cur_outer_splabel->b_is_dominated = true; + break; + } + } + if( !b_outer_iter_erased ) + ++outer_iter; + } + if( static_cast( list_labels_cur_vertex.size() ) > 1 ) + vec_last_valid_positions_for_dominance[i_cur_resident_vertex_num] = + (--(list_labels_cur_vertex.end())); + else + vec_last_valid_positions_for_dominance[i_cur_resident_vertex_num] = + list_labels_cur_vertex.begin(); + b_vec_vertex_already_checked_for_dominance + [i_cur_resident_vertex_num] = true; + vec_last_valid_index_for_dominance[i_cur_resident_vertex_num] = + static_cast( list_labels_cur_vertex.size() ) - 1; + } + } + if( !b_all_pareto_optimal_solutions && cur_label->resident_vertex == t ) + { + // the devil don't sleep + if( cur_label->b_is_dominated ) + { + l_alloc.destroy( cur_label.get() ); + l_alloc.deallocate( cur_label.get(), 1 ); + } + while( unprocessed_labels.size() ) + { + Splabel l = unprocessed_labels.top(); + unprocessed_labels.pop(); + // delete only dominated labels, because nondominated labels are + // deleted at the end of the function + if( l->b_is_dominated ) + { + l_alloc.destroy( l.get() ); + l_alloc.deallocate( l.get(), 1 ); + } + } + break; + } + if( !cur_label->b_is_dominated ) + { + cur_label->b_is_processed = true; + vis.on_label_not_dominated( *cur_label, g ); + typename graph_traits::vertex_descriptor cur_vertex = + cur_label->resident_vertex; + typename graph_traits::out_edge_iterator oei, oei_end; + for( boost::tie( oei, oei_end ) = out_edges( cur_vertex, g ); + oei != oei_end; + ++oei ) + { + b_feasible = true; + r_c_shortest_paths_label* new_label = + l_alloc.allocate( 1 ); + l_alloc.construct( new_label, + r_c_shortest_paths_label + + ( i_label_num++, + cur_label->cumulated_resource_consumption, + cur_label.get(), + *oei, + target( *oei, g ) ) ); + b_feasible = + ref( g, + new_label->cumulated_resource_consumption, + new_label->p_pred_label->cumulated_resource_consumption, + new_label->pred_edge ); + + if( !b_feasible ) + { + vis.on_label_not_feasible( *new_label, g ); + l_alloc.destroy( new_label ); + l_alloc.deallocate( new_label, 1 ); + } + else + { + const r_c_shortest_paths_label& + ref_new_label = *new_label; + vis.on_label_feasible( ref_new_label, g ); + Splabel new_sp_label( new_label ); + vec_vertex_labels[vertex_index_map[new_sp_label->resident_vertex]]. + push_back( new_sp_label ); + unprocessed_labels.push( new_sp_label ); + } + } + } + else + { + vis.on_label_dominated( *cur_label, g ); + l_alloc.destroy( cur_label.get() ); + l_alloc.deallocate( cur_label.get(), 1 ); + } + } + std::list dsplabels = vec_vertex_labels[vertex_index_map[t]]; + typename std::list::const_iterator csi = dsplabels.begin(); + typename std::list::const_iterator csi_end = dsplabels.end(); + // if d could be reached from o + if( dsplabels.size() ) + { + for( ; csi != csi_end; ++csi ) + { + std::vector::edge_descriptor> + cur_pareto_optimal_path; + const r_c_shortest_paths_label* p_cur_label = + (*csi).get(); + pareto_optimal_resource_containers. + push_back( p_cur_label->cumulated_resource_consumption ); + while( p_cur_label->num != 0 ) + { + cur_pareto_optimal_path.push_back( p_cur_label->pred_edge ); + p_cur_label = p_cur_label->p_pred_label; + } + pareto_optimal_solutions.push_back( cur_pareto_optimal_path ); + if( !b_all_pareto_optimal_solutions ) + break; + } + } + + int i_size = static_cast( vec_vertex_labels.size() ); + for( int i = 0; i < i_size; ++i ) + { + const std::list& list_labels_cur_vertex = vec_vertex_labels[i]; + csi_end = list_labels_cur_vertex.end(); + for( csi = list_labels_cur_vertex.begin(); csi != csi_end; ++csi ) + { + l_alloc.destroy( (*csi).get() ); + l_alloc.deallocate( (*csi).get(), 1 ); + } + } +} // r_c_shortest_paths_dispatch + +} // detail + +// default_r_c_shortest_paths_visitor struct +struct default_r_c_shortest_paths_visitor +{ + template + void on_label_popped( const Label&, const Graph& ) {} + template + void on_label_feasible( const Label&, const Graph& ) {} + template + void on_label_not_feasible( const Label&, const Graph& ) {} + template + void on_label_dominated( const Label&, const Graph& ) {} + template + void on_label_not_dominated( const Label&, const Graph& ) {} +}; // default_r_c_shortest_paths_visitor + + +// default_r_c_shortest_paths_allocator +typedef + std::allocator default_r_c_shortest_paths_allocator; +// default_r_c_shortest_paths_allocator + + +// r_c_shortest_paths functions (handle/interface) +// first overload: +// - return all pareto-optimal solutions +// - specify Label_Allocator and Visitor arguments +template +void r_c_shortest_paths +( const Graph& g, + const VertexIndexMap& vertex_index_map, + const EdgeIndexMap& edge_index_map, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t, + // each inner vector corresponds to a pareto-optimal path + std::vector::edge_descriptor> >& + pareto_optimal_solutions, + std::vector& pareto_optimal_resource_containers, + // to initialize the first label/resource container + // and to carry the type information + const Resource_Container& rc, + const Resource_Extension_Function& ref, + const Dominance_Function& dominance, + // to specify the memory management strategy for the labels + Label_Allocator la, + Visitor vis ) +{ + r_c_shortest_paths_dispatch( g, + vertex_index_map, + edge_index_map, + s, + t, + pareto_optimal_solutions, + pareto_optimal_resource_containers, + true, + rc, + ref, + dominance, + la, + vis ); +} + +// second overload: +// - return only one pareto-optimal solution +// - specify Label_Allocator and Visitor arguments +template +void r_c_shortest_paths +( const Graph& g, + const VertexIndexMap& vertex_index_map, + const EdgeIndexMap& edge_index_map, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t, + std::vector::edge_descriptor>& + pareto_optimal_solution, + Resource_Container& pareto_optimal_resource_container, + // to initialize the first label/resource container + // and to carry the type information + const Resource_Container& rc, + const Resource_Extension_Function& ref, + const Dominance_Function& dominance, + // to specify the memory management strategy for the labels + Label_Allocator la, + Visitor vis ) +{ + // each inner vector corresponds to a pareto-optimal path + std::vector::edge_descriptor> > + pareto_optimal_solutions; + std::vector pareto_optimal_resource_containers; + r_c_shortest_paths_dispatch( g, + vertex_index_map, + edge_index_map, + s, + t, + pareto_optimal_solutions, + pareto_optimal_resource_containers, + false, + rc, + ref, + dominance, + la, + vis ); + if (!pareto_optimal_solutions.empty()) { + pareto_optimal_solution = pareto_optimal_solutions[0]; + pareto_optimal_resource_container = pareto_optimal_resource_containers[0]; + } +} + +// third overload: +// - return all pareto-optimal solutions +// - use default Label_Allocator and Visitor +template +void r_c_shortest_paths +( const Graph& g, + const VertexIndexMap& vertex_index_map, + const EdgeIndexMap& edge_index_map, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t, + // each inner vector corresponds to a pareto-optimal path + std::vector::edge_descriptor> >& + pareto_optimal_solutions, + std::vector& pareto_optimal_resource_containers, + // to initialize the first label/resource container + // and to carry the type information + const Resource_Container& rc, + const Resource_Extension_Function& ref, + const Dominance_Function& dominance ) +{ + r_c_shortest_paths_dispatch( g, + vertex_index_map, + edge_index_map, + s, + t, + pareto_optimal_solutions, + pareto_optimal_resource_containers, + true, + rc, + ref, + dominance, + default_r_c_shortest_paths_allocator(), + default_r_c_shortest_paths_visitor() ); +} + +// fourth overload: +// - return only one pareto-optimal solution +// - use default Label_Allocator and Visitor +template +void r_c_shortest_paths +( const Graph& g, + const VertexIndexMap& vertex_index_map, + const EdgeIndexMap& edge_index_map, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t, + std::vector::edge_descriptor>& + pareto_optimal_solution, + Resource_Container& pareto_optimal_resource_container, + // to initialize the first label/resource container + // and to carry the type information + const Resource_Container& rc, + const Resource_Extension_Function& ref, + const Dominance_Function& dominance ) +{ + // each inner vector corresponds to a pareto-optimal path + std::vector::edge_descriptor> > + pareto_optimal_solutions; + std::vector pareto_optimal_resource_containers; + r_c_shortest_paths_dispatch( g, + vertex_index_map, + edge_index_map, + s, + t, + pareto_optimal_solutions, + pareto_optimal_resource_containers, + false, + rc, + ref, + dominance, + default_r_c_shortest_paths_allocator(), + default_r_c_shortest_paths_visitor() ); + if (!pareto_optimal_solutions.empty()) { + pareto_optimal_solution = pareto_optimal_solutions[0]; + pareto_optimal_resource_container = pareto_optimal_resource_containers[0]; + } +} +// r_c_shortest_paths + + +// check_r_c_path function +template +void check_r_c_path( const Graph& g, + const std::vector + ::edge_descriptor>& ed_vec_path, + const Resource_Container& initial_resource_levels, + // if true, computed accumulated final resource levels must + // be equal to desired_final_resource_levels + // if false, computed accumulated final resource levels must + // be less than or equal to desired_final_resource_levels + bool b_result_must_be_equal_to_desired_final_resource_levels, + const Resource_Container& desired_final_resource_levels, + Resource_Container& actual_final_resource_levels, + const Resource_Extension_Function& ref, + bool& b_is_a_path_at_all, + bool& b_feasible, + bool& b_correctly_extended, + typename graph_traits::edge_descriptor& + ed_last_extended_arc ) +{ + int i_size_ed_vec_path = static_cast( ed_vec_path.size() ); + std::vector::edge_descriptor> buf_path; + if( i_size_ed_vec_path == 0 ) + b_feasible = true; + else + { + if( i_size_ed_vec_path == 1 + || target( ed_vec_path[0], g ) == source( ed_vec_path[1], g ) ) + buf_path = ed_vec_path; + else + for( int i = i_size_ed_vec_path - 1; i >= 0; --i ) + buf_path.push_back( ed_vec_path[i] ); + for( int i = 0; i < i_size_ed_vec_path - 1; ++i ) + { + if( target( buf_path[i], g ) != source( buf_path[i + 1], g ) ) + { + b_is_a_path_at_all = false; + b_feasible = false; + b_correctly_extended = false; + return; + } + } + } + b_is_a_path_at_all = true; + b_feasible = true; + b_correctly_extended = false; + Resource_Container current_resource_levels = initial_resource_levels; + actual_final_resource_levels = current_resource_levels; + for( int i = 0; i < i_size_ed_vec_path; ++i ) + { + ed_last_extended_arc = buf_path[i]; + b_feasible = ref( g, + actual_final_resource_levels, + current_resource_levels, + buf_path[i] ); + current_resource_levels = actual_final_resource_levels; + if( !b_feasible ) + return; + } + if( b_result_must_be_equal_to_desired_final_resource_levels ) + b_correctly_extended = + actual_final_resource_levels == desired_final_resource_levels ? + true : false; + else + { + if( actual_final_resource_levels < desired_final_resource_levels + || actual_final_resource_levels == desired_final_resource_levels ) + b_correctly_extended = true; + } +} // check_path + +} // namespace + +#endif // BOOST_GRAPH_R_C_SHORTEST_PATHS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/random.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/random.hpp new file mode 100644 index 0000000000..7e1d659694 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/random.hpp @@ -0,0 +1,266 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright (C) Vladimir Prus 2003 +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_RANDOM_HPP +#define BOOST_GRAPH_RANDOM_HPP + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +namespace boost { + + // grab a random vertex from the graph's vertex set + template + typename graph_traits::vertex_descriptor + random_vertex(Graph& g, RandomNumGen& gen) + { + if (num_vertices(g) > 1) { + #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581)) + std::size_t n = std::random( num_vertices(g) ); + #else + uniform_int<> distrib(0, num_vertices(g)-1); + variate_generator > rand_gen(gen, distrib); + std::size_t n = rand_gen(); + #endif + typename graph_traits::vertex_iterator + i = vertices(g).first; + return *(boost::next(i, n)); + } else + return *vertices(g).first; + } + + template + typename graph_traits::edge_descriptor + random_edge(Graph& g, RandomNumGen& gen) { + if (num_edges(g) > 1) { + #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581)) + typename graph_traits::edges_size_type + n = std::random( num_edges(g) ); + #else + uniform_int<> distrib(0, num_edges(g)-1); + variate_generator > rand_gen(gen, distrib); + typename graph_traits::edges_size_type + n = rand_gen(); + #endif + typename graph_traits::edge_iterator + i = edges(g).first; + return *(boost::next(i, n)); + } else + return *edges(g).first; + } + + template + typename graph_traits::edge_descriptor + random_out_edge(Graph& g, typename graph_traits::vertex_descriptor src, RandomNumGen& gen) { + typedef typename graph_traits::degree_size_type degree_size_type; + typedef boost::uniform_int ui_type; + ui_type ui(0, out_degree(src, g) - 1); + boost::variate_generator + variate(gen, ui); + typename graph_traits::out_edge_iterator it = out_edges(src, g).first; + std::advance(it, variate()); + return *it; + } + + template + typename graph_traits::edge_descriptor + weighted_random_out_edge(Graph& g, typename graph_traits::vertex_descriptor src, WeightMap weight, RandomNumGen& gen) { + typedef graph_traits gt; + typedef typename gt::vertex_descriptor vertex_descriptor; + typedef typename property_traits::value_type weight_type; + weight_type weight_sum(0); + BGL_FORALL_OUTEDGES_T(src, e, g, Graph) {weight_sum += get(weight, e);} + typedef boost::uniform_real<> ur_type; + ur_type ur(0, weight_sum); + boost::variate_generator + variate(gen, ur); + weight_type chosen_weight = variate(); + BGL_FORALL_OUTEDGES_T(src, e, g, Graph) { + weight_type w = get(weight, e); + if (chosen_weight < w) { + return e; + } else { + chosen_weight -= w; + } + } + assert (false); // Should not get here + } + + namespace detail { + class dummy_property_copier { + public: + template + void operator()(const V1&, const V2&) const {} + }; + } + + template + void generate_random_graph1 + (MutableGraph& g, + typename graph_traits::vertices_size_type V, + typename graph_traits::vertices_size_type E, + RandNumGen& gen, + bool allow_parallel = true, + bool self_edges = false) + { + typedef graph_traits Traits; + typedef typename Traits::edge_descriptor edge_t; + typedef typename Traits::vertices_size_type v_size_t; + typedef typename Traits::edges_size_type e_size_t; + typedef typename Traits::vertex_descriptor vertex_descriptor; + + // When parallel edges are not allowed, we create a new graph which + // does not allow parallel edges, construct it and copy back. + // This is not efficient if 'g' already disallow parallel edges, + // but that's task for later. + if (!allow_parallel) { + + typedef typename boost::graph_traits::directed_category dir; + typedef typename mpl::if_, + directedS, undirectedS>::type select; + adjacency_list g2; + generate_random_graph1(g2, V, E, gen, true, self_edges); + + copy_graph(g2, g, vertex_copy(detail::dummy_property_copier()). + edge_copy(detail::dummy_property_copier())); + + } else { + + for (v_size_t i = 0; i < V; ++i) + add_vertex(g); + + e_size_t not_inserted_counter = 0; /* Number of edge insertion failures */ + e_size_t num_vertices_squared = num_vertices(g) * num_vertices(g); + for (e_size_t j = 0; j < E; /* Increment in body */) { + vertex_descriptor a = random_vertex(g, gen), b; + do { + b = random_vertex(g, gen); + } while (self_edges == false && a == b); + edge_t e; bool inserted; + boost::tie(e, inserted) = add_edge(a, b, g); + if (inserted) { + ++j; + } else { + ++not_inserted_counter; + } + if (not_inserted_counter >= num_vertices_squared) { + return; /* Rather than looping forever on complete graph */ + } + } + } + } + + template + void generate_random_graph + (MutableGraph& g, + typename graph_traits::vertices_size_type V, + typename graph_traits::vertices_size_type E, + RandNumGen& gen, + bool allow_parallel = true, + bool self_edges = false) + { + generate_random_graph1(g, V, E, gen, allow_parallel, self_edges); + } + + template + void generate_random_graph + (MutableGraph& g, + typename graph_traits::vertices_size_type V, + typename graph_traits::vertices_size_type E, + RandNumGen& gen, + VertexOutputIterator vertex_out, + EdgeOutputIterator edge_out, + bool self_edges = false) + { + typedef graph_traits Traits; + typedef typename Traits::vertices_size_type v_size_t; + typedef typename Traits::edges_size_type e_size_t; + typedef typename Traits::vertex_descriptor vertex_t; + typedef typename Traits::edge_descriptor edge_t; + + for (v_size_t i = 0; i < V; ++i) + *vertex_out++ = add_vertex(g); + + e_size_t not_inserted_counter = 0; /* Number of edge insertion failures */ + e_size_t num_vertices_squared = num_vertices(g) * num_vertices(g); + for (e_size_t j = 0; j < E; /* Increment in body */) { + vertex_t a = random_vertex(g, gen), b; + do { + b = random_vertex(g, gen); + } while (self_edges == false && a == b); + edge_t e; bool inserted; + boost::tie(e, inserted) = add_edge(a, b, g); + if (inserted) { + *edge_out++ = std::make_pair(source(e, g), target(e, g)); + ++j; + } else { + ++not_inserted_counter; + } + if (not_inserted_counter >= num_vertices_squared) { + return; /* Rather than looping forever on complete graph */ + } + } + } + + namespace detail { + + template + void randomize_property(G& g, RandomGenerator& rg, + Property, vertex_property_tag) + { + typename property_map::type pm = get(Property(), g); + typename graph_traits::vertex_iterator vi, ve; + for (boost::tie(vi, ve) = vertices(g); vi != ve; ++vi) { + pm[*vi] = rg(); + } + } + + template + void randomize_property(G& g, RandomGenerator& rg, + Property, edge_property_tag) + { + typename property_map::type pm = get(Property(), g); + typename graph_traits::edge_iterator ei, ee; + for (boost::tie(ei, ee) = edges(g); ei != ee; ++ei) { + pm[*ei] = rg(); + } + } + } + + template + void randomize_property(G& g, RandomGenerator& rg) + { + detail::randomize_property + (g, rg, Property(), typename property_kind::type()); + } + + + + +} + +#include + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/random_layout.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/random_layout.hpp new file mode 100644 index 0000000000..4cd16f29ad --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/random_layout.hpp @@ -0,0 +1,36 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_RANDOM_LAYOUT_HPP +#define BOOST_GRAPH_RANDOM_LAYOUT_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +template +void +random_graph_layout + (const Graph& g, PositionMap position_map, + const Topology& topology) +{ + BGL_FORALL_VERTICES_T(v, g, Graph) { + put(position_map, v, topology.random_point()); + } +} + +} // end namespace boost + +#endif // BOOST_GRAPH_RANDOM_LAYOUT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/random_spanning_tree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/random_spanning_tree.hpp new file mode 100644 index 0000000000..7e36388fc7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/random_spanning_tree.hpp @@ -0,0 +1,109 @@ +// Copyright 2010 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Andrew Lumsdaine + +#ifndef BOOST_GRAPH_RANDOM_SPANNING_TREE_HPP +#define BOOST_GRAPH_RANDOM_SPANNING_TREE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + namespace detail { + // Use Wilson's algorithm (based on loop-free random walks) to generate a + // random spanning tree. The distribution of edges used is controlled by + // the next_edge() function, so this version allows either weighted or + // unweighted selection of trees. + // Algorithm is from http://en.wikipedia.org/wiki/Uniform_spanning_tree + template + void random_spanning_tree_internal(const Graph& g, typename graph_traits::vertex_descriptor s, PredMap pred, ColorMap color, NextEdge next_edge) { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + assert (num_vertices(g) >= 1); // g must also be undirected (or symmetric) and connected + + typedef color_traits::value_type> color_gen; + BGL_FORALL_VERTICES_T(v, g, Graph) put(color, v, color_gen::white()); + + std::vector path; + + put(color, s, color_gen::black()); + put(pred, s, graph_traits::null_vertex()); + + BGL_FORALL_VERTICES_T(v, g, Graph) { + if (get(color, v) != color_gen::white()) continue; + loop_erased_random_walk(g, v, next_edge, color, path); + for (typename std::vector::const_reverse_iterator i = path.rbegin(); + boost::next(i) != + (typename std::vector::const_reverse_iterator)path.rend(); + ++i) { + typename std::vector::const_reverse_iterator j = i; + ++j; + assert (get(color, *j) == color_gen::gray()); + put(color, *j, color_gen::black()); + put(pred, *j, *i); + } + } + } + } + + // Compute a uniformly-distributed spanning tree on a graph. Use Wilson's algorithm: + // @inproceedings{wilson96generating, + // author = {Wilson, David Bruce}, + // title = {Generating random spanning trees more quickly than the cover time}, + // booktitle = {STOC '96: Proceedings of the twenty-eighth annual ACM symposium on Theory of computing}, + // year = {1996}, + // isbn = {0-89791-785-5}, + // pages = {296--303}, + // location = {Philadelphia, Pennsylvania, United States}, + // doi = {http://doi.acm.org/10.1145/237814.237880}, + // publisher = {ACM}, + // address = {New York, NY, USA}, + // } + // + template + void random_spanning_tree(const Graph& g, Gen& gen, typename graph_traits::vertex_descriptor root, + PredMap pred, static_property_map, ColorMap color) { + unweighted_random_out_edge_gen random_oe(gen); + detail::random_spanning_tree_internal(g, root, pred, color, random_oe); + } + + // Compute a weight-distributed spanning tree on a graph. + template + void random_spanning_tree(const Graph& g, Gen& gen, typename graph_traits::vertex_descriptor root, + PredMap pred, WeightMap weight, ColorMap color) { + weighted_random_out_edge_gen random_oe(weight, gen); + detail::random_spanning_tree_internal(g, root, pred, color, random_oe); + } + + template + void random_spanning_tree(const Graph& g, Gen& gen, const bgl_named_params& params) { + using namespace boost::graph::keywords; + typedef bgl_named_params params_type; + BOOST_GRAPH_DECLARE_CONVERTED_PARAMETERS(params_type, params) + random_spanning_tree(g, + gen, + arg_pack[_root_vertex | *vertices(g).first], + arg_pack[_predecessor_map], + arg_pack[_weight_map | static_property_map(1.)], + boost::detail::make_color_map_from_arg_pack(g, arg_pack)); + } +} + +#include + +#endif // BOOST_GRAPH_RANDOM_SPANNING_TREE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/read_dimacs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/read_dimacs.hpp new file mode 100644 index 0000000000..b19c81392b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/read_dimacs.hpp @@ -0,0 +1,312 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +/* + Reads maximal flow problem in extended DIMACS format. + This works, but could use some polishing. +*/ + +/* ----------------------------------------------------------------- */ + +#ifndef BOOST_GRAPH_READ_DIMACS_HPP +#define BOOST_GRAPH_READ_DIMACS_HPP + +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { + + namespace detail { + +template +int read_dimacs_max_flow_internal(Graph& g, + CapacityMap capacity, + ReverseEdgeMap reverse_edge, + typename graph_traits::vertex_descriptor& src, + typename graph_traits::vertex_descriptor& sink, + std::istream& in, + bool require_source_and_sink, + const std::string& problem_type) +{ + // const int MAXLINE = 100; /* max line length in the input file */ + const int ARC_FIELDS = 3; /* no of fields in arc line */ + const int NODE_FIELDS = 2; /* no of fields in node line */ + const int P_FIELDS = 3; /* no of fields in problem line */ + + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + + std::vector verts; + + long m, n, /* number of edges and nodes */ + i, head, tail, cap; + + long no_lines=0, /* no of current input line */ + no_plines=0, /* no of problem-lines */ + no_nslines=0, /* no of node-source-lines */ + no_nklines=0, /* no of node-source-lines */ + no_alines=0; /* no of arc-lines */ + + std::string in_line; /* for reading input line */ + char pr_type[4]; /* for reading type of the problem */ + char nd; /* source (s) or sink (t) */ + + int k, /* temporary */ + err_no; /* no of detected error */ + + /* -------------- error numbers & error messages ---------------- */ + const int EN1 = 0; + const int EN2 = 1; + const int EN3 = 2; + const int EN4 = 3; + // const int EN6 = 4; + // const int EN10 = 5; + // const int EN7 = 6; + const int EN8 = 7; + const int EN9 = 8; + const int EN11 = 9; + const int EN12 = 10; + // const int EN13 = 11; + const int EN14 = 12; + const int EN16 = 13; + const int EN15 = 14; + const int EN17 = 15; + const int EN18 = 16; + const int EN21 = 17; + const int EN19 = 18; + const int EN20 = 19; + const int EN22 = 20; + + static char *err_message[] = + { + /* 0*/ "more than one problem line.", + /* 1*/ "wrong number of parameters in the problem line.", + /* 2*/ "it is not a Max Flow problem line.", + /* 3*/ "bad value of a parameter in the problem line.", + /* 4*/ "can't obtain enough memory to solve this problem.", + /* 5*/ "more than one line with the problem name.", + /* 6*/ "can't read problem name.", + /* 7*/ "problem description must be before node description.", + /* 8*/ "this parser doesn't support multiply sources and sinks.", + /* 9*/ "wrong number of parameters in the node line.", + /*10*/ "wrong value of parameters in the node line.", + /*11*/ " ", + /*12*/ "source and sink descriptions must be before arc descriptions.", + /*13*/ "too many arcs in the input.", + /*14*/ "wrong number of parameters in the arc line.", + /*15*/ "wrong value of parameters in the arc line.", + /*16*/ "unknown line type in the input.", + /*17*/ "reading error.", + /*18*/ "not enough arcs in the input.", + /*19*/ "source or sink doesn't have incident arcs.", + /*20*/ "can't read anything from the input file." + }; + /* --------------------------------------------------------------- */ + + /* The main loop: + - reads the line of the input, + - analyses its type, + - checks correctness of parameters, + - puts data to the arrays, + - does service functions + */ + + while (std::getline(in, in_line)) { + ++no_lines; + + switch (in_line[0]) { + case 'c': /* skip lines with comments */ + case '\n': /* skip empty lines */ + case '\0': /* skip empty lines at the end of file */ + break; + + case 'p': /* problem description */ + if ( no_plines > 0 ) + /* more than one problem line */ + { err_no = EN1 ; goto error; } + + no_plines = 1; + + if ( + /* reading problem line: type of problem, no of nodes, no of arcs */ + std::sscanf ( in_line.c_str(), "%*c %3s %ld %ld", pr_type, &n, &m ) + != P_FIELDS + ) + /*wrong number of parameters in the problem line*/ + { err_no = EN2; goto error; } + + if ( pr_type != problem_type ) + /*wrong problem type*/ + { err_no = EN3; goto error; } + + if ( n <= 0 || m <= 0 ) + /*wrong value of no of arcs or nodes*/ + { err_no = EN4; goto error; } + + { + for (long vi = 0; vi < n; ++vi) + verts.push_back(add_vertex(g)); + } + break; + + case 'n': /* source(s) description */ + if ( no_plines == 0 ) + /* there was not problem line above */ + { err_no = EN8; goto error; } + + /* reading source or sink */ + k = std::sscanf ( in_line.c_str(),"%*c %ld %c", &i, &nd ); + --i; // index from 0 + if ( k < NODE_FIELDS ) + /* node line is incorrect */ + { err_no = EN11; goto error; } + + if ( i < 0 || i > n ) + /* wrong value of node */ + { err_no = EN12; goto error; } + + switch (nd) { + case 's': /* source line */ + + if ( no_nslines != 0) + /* more than one source line */ + { err_no = EN9; goto error; } + + no_nslines = 1; + src = verts[i]; + break; + + case 't': /* sink line */ + + if ( no_nklines != 0) + /* more than one sink line */ + { err_no = EN9; goto error; } + + no_nklines = 1; + sink = verts[i]; + break; + + default: + /* wrong type of node-line */ + err_no = EN12; goto error; + } + break; + + case 'a': /* arc description */ + if ( require_source_and_sink && (no_nslines == 0 || no_nklines == 0) ) + /* there was not source and sink description above */ + { err_no = EN14; goto error; } + + if ( no_alines >= m ) + /*too many arcs on input*/ + { err_no = EN16; goto error; } + + if ( + /* reading an arc description */ + std::sscanf ( in_line.c_str(),"%*c %ld %ld %ld", + &tail, &head, &cap ) + != ARC_FIELDS + ) + /* arc description is not correct */ + { err_no = EN15; goto error; } + + --tail; // index from 0, not 1 + --head; + if ( tail < 0 || tail > n || + head < 0 || head > n + ) + /* wrong value of nodes */ + { err_no = EN17; goto error; } + + { + edge_descriptor e1, e2; + bool in1, in2; + boost::tie(e1, in1) = add_edge(verts[tail], verts[head], g); + boost::tie(e2, in2) = add_edge(verts[head], verts[tail], g); + if (!in1 || !in2) { + std::cerr << "unable to add edge (" << head << "," << tail << ")" + << std::endl; + return -1; + } + capacity[e1] = cap; + capacity[e2] = 0; + reverse_edge[e1] = e2; + reverse_edge[e2] = e1; + } + ++no_alines; + break; + + default: + /* unknown type of line */ + err_no = EN18; goto error; + + } /* end of switch */ + } /* end of input loop */ + + /* ----- all is red or error while reading ----- */ + + if ( in.eof() == 0 ) /* reading error */ + { err_no=EN21; goto error; } + + if ( no_lines == 0 ) /* empty input */ + { err_no = EN22; goto error; } + + if ( no_alines < m ) /* not enough arcs */ + { err_no = EN19; goto error; } + + if ( require_source_and_sink && + (out_degree(src, g) == 0 || out_degree(sink, g) == 0) ) + /* no arc goes out of the source */ + { err_no = EN20; goto error; } + + /* Thanks God! all is done */ + return (0); + + /* ---------------------------------- */ + error: /* error found reading input */ + + std::printf ( "\nline %ld of input - %s\n", + no_lines, err_message[err_no] ); + + std::exit (1); + return (0); /* to avoid warning */ +} +/* -------------------- end of parser -------------------*/ + + } // namespace detail + +template +int read_dimacs_max_flow(Graph& g, + CapacityMap capacity, + ReverseEdgeMap reverse_edge, + typename graph_traits::vertex_descriptor& src, + typename graph_traits::vertex_descriptor& sink, + std::istream& in = std::cin) { + return detail::read_dimacs_max_flow_internal(g, capacity, reverse_edge, src, sink, in, true, "max"); +} + +template +int read_dimacs_min_cut(Graph& g, + CapacityMap capacity, + ReverseEdgeMap reverse_edge, + std::istream& in = std::cin) { + typename graph_traits::vertex_descriptor dummy_src, dummy_sink; // Not filled in + return detail::read_dimacs_max_flow_internal(g, capacity, reverse_edge, dummy_src, dummy_sink, in, false, "cut"); +} + +} // namespace boost + +#endif // BOOST_GRAPH_READ_DIMACS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/relax.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/relax.hpp new file mode 100644 index 0000000000..1d2250a80d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/relax.hpp @@ -0,0 +1,79 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_RELAX_HPP +#define BOOST_GRAPH_RELAX_HPP + +#include +#include // for numeric limits +#include +#include + +namespace boost { + + // The following version of the plus functor prevents + // problems due to overflow at positive infinity. + + template + struct closed_plus + { + T operator()(const T& a, const T& b) const { + using namespace std; + const T inf = (std::numeric_limits::max)(); + if (a == inf) return inf; + if (b == inf) return inf; + return a + b; + } + }; + + template + bool relax(typename graph_traits::edge_descriptor e, + const Graph& g, const WeightMap& w, + PredecessorMap& p, DistanceMap& d, + const BinaryFunction& combine, const BinaryPredicate& compare) + { + typedef typename graph_traits::directed_category DirCat; + bool is_undirected = is_same::value; + typedef typename graph_traits::vertex_descriptor Vertex; + Vertex u = source(e, g), v = target(e, g); + typedef typename property_traits::value_type D; + typedef typename property_traits::value_type W; + D d_u = get(d, u), d_v = get(d, v); + W w_e = get(w, e); + + // The redundant gets in the return statements are to ensure that extra + // floating-point precision in x87 registers does not lead to relax() + // returning true when the distance did not actually change. + if ( compare(combine(d_u, w_e), d_v) ) { + put(d, v, combine(d_u, w_e)); + put(p, v, u); + return compare(get(d, v), d_v); + } else if (is_undirected && compare(combine(d_v, w_e), d_u)) { + put(d, u, combine(d_v, w_e)); + put(p, u, v); + return compare(get(d, u), d_u); + } else + return false; + } + + template + bool relax(typename graph_traits::edge_descriptor e, + const Graph& g, WeightMap w, PredecessorMap p, DistanceMap d) + { + typedef typename property_traits::value_type D; + typedef closed_plus Combine; + typedef std::less Compare; + return relax(e, g, w, p, d, Combine(), Compare()); + } + +} // namespace boost + +#endif /* BOOST_GRAPH_RELAX_HPP */ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/reverse_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/reverse_graph.hpp new file mode 100644 index 0000000000..60de2b0ee7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/reverse_graph.hpp @@ -0,0 +1,359 @@ +// (C) Copyright David Abrahams 2000. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef REVERSE_GRAPH_DWA092300_H_ +# define REVERSE_GRAPH_DWA092300_H_ + +#include +#include +#include +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// Stay out of the way of the concept checking class +# define BidirectionalGraph BidirectionalGraph_ +#endif + +namespace boost { + +struct reverse_graph_tag { }; + + namespace detail { + + template struct choose_rev_edge_iter { }; + template <> struct choose_rev_edge_iter { + template struct bind_ { + typedef typename graph_traits::edge_iterator type; + }; + }; + template <> struct choose_rev_edge_iter { + template struct bind_ { + typedef void type; + }; + }; + + } // namespace detail + +template +class reverse_graph { + typedef reverse_graph Self; + typedef graph_traits Traits; + public: + typedef BidirectionalGraph base_type; + + // Constructor + reverse_graph(GraphRef g) : m_g(g) {} + + // Graph requirements + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::edge_descriptor edge_descriptor; + typedef typename Traits::directed_category directed_category; + typedef typename Traits::edge_parallel_category edge_parallel_category; + typedef typename Traits::traversal_category traversal_category; + + // IncidenceGraph requirements + typedef typename Traits::in_edge_iterator out_edge_iterator; + typedef typename Traits::degree_size_type degree_size_type; + + // BidirectionalGraph requirements + typedef typename Traits::out_edge_iterator in_edge_iterator; + + // AdjacencyGraph requirements + typedef typename adjacency_iterator_generator::type adjacency_iterator; + + // VertexListGraph requirements + typedef typename Traits::vertex_iterator vertex_iterator; + + // EdgeListGraph requirements + enum { is_edge_list = is_convertible::value }; + typedef detail::choose_rev_edge_iter ChooseEdgeIter; + typedef typename ChooseEdgeIter:: + template bind_::type edge_iterator; + typedef typename Traits::vertices_size_type vertices_size_type; + typedef typename Traits::edges_size_type edges_size_type; + + typedef reverse_graph_tag graph_tag; + + // Graph, vertex, and edge properties + typedef typename graph_property_type::type graph_property_type; + typedef typename graph_bundle_type::type graph_bundled; + + typedef typename vertex_property_type::type vertex_property_type; + typedef typename vertex_bundle_type::type vertex_bundled; + + typedef typename edge_property_type::type edge_property_type; + typedef typename edge_bundle_type::type edge_bundled; + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + // Bundled properties support + template + typename graph::detail::bundled_result::type& + operator[](Descriptor x) + { return m_g[x]; } + + template + typename graph::detail::bundled_result::type const& + operator[](Descriptor x) const + { return m_g[x]; } + + graph_bundled& operator[](graph_bundle_t) + { return get_property(*this); } + + graph_bundled const& operator[](graph_bundle_t) const + { return get_property(*this); } +#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES + + static vertex_descriptor null_vertex() + { return Traits::null_vertex(); } + + // would be private, but template friends aren't portable enough. + // private: + GraphRef m_g; +}; + + +// These are separate so they are not instantiated unless used (see bug 1021) +template +struct vertex_property_type > { + typedef typename boost::vertex_property_type::type type; +}; + +template +struct edge_property_type > { + typedef typename boost::edge_property_type::type type; +}; + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + template + struct vertex_bundle_type > + : vertex_bundle_type { }; + + template + struct edge_bundle_type > + : edge_bundle_type { }; +#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES + +template +inline reverse_graph +make_reverse_graph(const BidirectionalGraph& g) +{ + return reverse_graph(g); +} + +template +inline reverse_graph +make_reverse_graph(BidirectionalGraph& g) +{ + return reverse_graph(g); +} + +template +std::pair::vertex_iterator, + typename reverse_graph::vertex_iterator> +vertices(const reverse_graph& g) +{ + return vertices(g.m_g); +} + +template +std::pair::edge_iterator, + typename reverse_graph::edge_iterator> +edges(const reverse_graph& g) +{ + return edges(g.m_g); +} + +template +inline std::pair::in_edge_iterator, + typename graph_traits::in_edge_iterator> +out_edges(const typename graph_traits::vertex_descriptor u, + const reverse_graph& g) +{ + return in_edges(u, g.m_g); +} + +template +inline typename graph_traits::vertices_size_type +num_vertices(const reverse_graph& g) +{ + return num_vertices(g.m_g); +} + +template +inline typename reverse_graph::edges_size_type +num_edges(const reverse_graph& g) +{ + return num_edges(g.m_g); +} + +template +inline typename graph_traits::degree_size_type +out_degree(const typename graph_traits::vertex_descriptor u, + const reverse_graph& g) +{ + return in_degree(u, g.m_g); +} + +template +inline typename graph_traits::vertex_descriptor +vertex(const typename graph_traits::vertices_size_type v, + const reverse_graph& g) +{ + return vertex(v, g.m_g); +} + +template +inline std::pair::edge_descriptor, + bool> +edge(const typename graph_traits::vertex_descriptor u, + const typename graph_traits::vertex_descriptor v, + const reverse_graph& g) +{ + return edge(v, u, g.m_g); +} + +template +inline std::pair::out_edge_iterator, + typename graph_traits::out_edge_iterator> +in_edges(const typename graph_traits::vertex_descriptor u, + const reverse_graph& g) +{ + return out_edges(u, g.m_g); +} + +template +inline std::pair::adjacency_iterator, + typename reverse_graph::adjacency_iterator> +adjacent_vertices(typename graph_traits::vertex_descriptor u, + const reverse_graph& g) +{ + typedef reverse_graph Graph; + typename graph_traits::out_edge_iterator first, last; + boost::tie(first, last) = out_edges(u, g); + typedef typename graph_traits::adjacency_iterator adjacency_iterator; + return std::make_pair(adjacency_iterator(first, const_cast(&g)), + adjacency_iterator(last, const_cast(&g))); +} + +template +inline typename graph_traits::degree_size_type +in_degree(const typename graph_traits::vertex_descriptor u, + const reverse_graph& g) +{ + return out_degree(u, g.m_g); +} + +template +inline typename graph_traits::vertex_descriptor +source(const Edge& e, const reverse_graph& g) +{ + return target(e, g.m_g); +} + +template +inline typename graph_traits::vertex_descriptor +target(const Edge& e, const reverse_graph& g) +{ + return source(e, g.m_g); +} + + +namespace detail { + + struct reverse_graph_vertex_property_selector { + template + struct bind_ { + typedef typename ReverseGraph::base_type Graph; + typedef property_map PMap; + typedef typename PMap::type type; + typedef typename PMap::const_type const_type; + }; + }; + + struct reverse_graph_edge_property_selector { + template + struct bind_ { + typedef typename ReverseGraph::base_type Graph; + typedef property_map PMap; + typedef typename PMap::type type; + typedef typename PMap::const_type const_type; + }; + }; + +} // namespace detail + +template <> +struct vertex_property_selector { + typedef detail::reverse_graph_vertex_property_selector type; +}; + +template <> +struct edge_property_selector { + typedef detail::reverse_graph_edge_property_selector type; +}; + +template +typename property_map, Property>::type +get(Property p, reverse_graph& g) +{ + return get(p, g.m_g); +} + +template +typename property_map, Property>::const_type +get(Property p, const reverse_graph& g) +{ + const BidirGraph& gref = g.m_g; // in case GRef is non-const + return get(p, gref); +} + +template +typename property_traits< + typename property_map::const_type +>::value_type +get(Property p, const reverse_graph& g, const Key& k) +{ + return get(p, g.m_g, k); +} + +template +void +put(Property p, const reverse_graph& g, const Key& k, + const Value& val) +{ + put(p, g.m_g, k, val); +} + +template +inline void +set_property(const reverse_graph& g, Tag tag, + const Value& value) +{ + set_property(g.m_g, tag, value); +} + +template +inline +typename boost::mpl::if_< + boost::is_const::type>, + const typename graph_property::type&, + typename graph_property::type& >::type +get_property(const reverse_graph& g, Tag tag) +{ + return get_property(g.m_g, tag); +} + +} // namespace boost + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// Stay out of the way of the concept checking class +# undef BidirectionalGraph +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/rmat_graph_generator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/rmat_graph_generator.hpp new file mode 100644 index 0000000000..9e8cfd542c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/rmat_graph_generator.hpp @@ -0,0 +1,594 @@ +// Copyright 2004, 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Nick Edmonds +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_RMAT_GENERATOR_HPP +#define BOOST_GRAPH_RMAT_GENERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using boost::shared_ptr; +using boost::uniform_01; + +// Returns floor(log_2(n)), and -1 when n is 0 +template +inline int int_log2(IntegerType n) { + int l = 0; + while (n > 0) {++l; n >>= 1;} + return l - 1; +} + +struct keep_all_edges { + template + bool operator()(const T&, const T&) { return true; } +}; + +template +struct keep_local_edges { + + keep_local_edges(const Distribution& distrib, const ProcessId& id) + : distrib(distrib), id(id) + { } + + template + bool operator()(const T& x, const T& y) + { return distrib(x) == id || distrib(y) == id; } + +private: + const Distribution& distrib; + const ProcessId& id; +}; + +template +void +generate_permutation_vector(RandomGenerator& gen, std::vector& vertexPermutation, T n) +{ + using boost::uniform_int; + + vertexPermutation.resize(n); + + // Generate permutation map of vertex numbers + uniform_int rand_vertex(0, n-1); + for (T i = 0; i < n; ++i) + vertexPermutation[i] = i; + + // Can't use std::random_shuffle unless we create another (synchronized) PRNG + for (T i = 0; i < n; ++i) + std::swap(vertexPermutation[i], vertexPermutation[rand_vertex(gen)]); +} + +template +std::pair +generate_edge(shared_ptr > prob, T n, + unsigned int SCALE, double a, double b, double c, double d) +{ + T u = 0, v = 0; + T step = n/2; + for (unsigned int j = 0; j < SCALE; ++j) { + double p = (*prob)(); + + if (p < a) + ; + else if (p >= a && p < a + b) + v += step; + else if (p >= a + b && p < a + b + c) + u += step; + else { // p > a + b + c && p < a + b + c + d + u += step; + v += step; + } + + step /= 2; + + // 0.2 and 0.9 are hardcoded in the reference SSCA implementation. + // The maximum change in any given value should be less than 10% + a *= 0.9 + 0.2 * (*prob)(); + b *= 0.9 + 0.2 * (*prob)(); + c *= 0.9 + 0.2 * (*prob)(); + d *= 0.9 + 0.2 * (*prob)(); + + double S = a + b + c + d; + + a /= S; b /= S; c /= S; + // d /= S; + // Ensure all values add up to 1, regardless of floating point errors + d = 1. - a - b - c; + } + + return std::make_pair(u, v); +} + +namespace boost { + + /* + Chakrabarti's R-MAT scale free generator. + + For all flavors of the R-MAT iterator a+b+c+d must equal 1 and for the + unique_rmat_iterator 'm' << 'n^2'. If 'm' is too close to 'n^2' the + generator may be unable to generate sufficient unique edges + + To get a true scale free distribution {a, b, c, d : a > b, a > c, a > d} + */ + + template + class rmat_iterator + { + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + + public: + typedef std::input_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef void difference_type; + + // No argument constructor, set to terminating condition + rmat_iterator() + : gen(), edge(0) { } + + // Initialize for edge generation + rmat_iterator(RandomGenerator& gen, vertices_size_type n, + edges_size_type m, double a, double b, double c, + double d, bool permute_vertices = true) + : gen(), n(n), a(a), b(b), c(c), d(d), edge(m), + permute_vertices(permute_vertices), + SCALE(int_log2(n)) + + { + this->gen.reset(new uniform_01(gen)); + + assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); + + if (permute_vertices) + generate_permutation_vector(gen, vertexPermutation, n); + + // TODO: Generate the entire adjacency matrix then "Clip and flip" if undirected graph + + // Generate the first edge + vertices_size_type u, v; + boost::tie(u, v) = generate_edge(this->gen, n, SCALE, a, b, c, d); + + if (permute_vertices) + current = std::make_pair(vertexPermutation[u], + vertexPermutation[v]); + else + current = std::make_pair(u, v); + + --edge; + } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + rmat_iterator& operator++() + { + vertices_size_type u, v; + boost::tie(u, v) = generate_edge(this->gen, n, SCALE, a, b, c, d); + + if (permute_vertices) + current = std::make_pair(vertexPermutation[u], + vertexPermutation[v]); + else + current = std::make_pair(u, v); + + --edge; + + return *this; + } + + rmat_iterator operator++(int) + { + rmat_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const rmat_iterator& other) const + { + return edge == other.edge; + } + + bool operator!=(const rmat_iterator& other) const + { return !(*this == other); } + + private: + + // Parameters + shared_ptr > gen; + vertices_size_type n; + double a, b, c, d; + int edge; + bool permute_vertices; + int SCALE; + + // Internal data structures + std::vector vertexPermutation; + value_type current; + }; + + // Sorted version for CSR + template + struct sort_pair { + bool operator() (const std::pair& x, const std::pair& y) + { + if (x.first == y.first) + return x.second > y.second; + else + return x.first > y.first; + } + }; + + template + class sorted_rmat_iterator + { + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + + public: + typedef std::input_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef void difference_type; + + // No argument constructor, set to terminating condition + sorted_rmat_iterator() + : gen(), values(sort_pair()), done(true) + { } + + // Initialize for edge generation + sorted_rmat_iterator(RandomGenerator& gen, vertices_size_type n, + edges_size_type m, double a, double b, double c, + double d, bool permute_vertices = true, + EdgePredicate ep = keep_all_edges()) + : gen(), permute_vertices(permute_vertices), + values(sort_pair()), done(false) + + { + assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); + + this->gen.reset(new uniform_01(gen)); + + std::vector vertexPermutation; + if (permute_vertices) + generate_permutation_vector(gen, vertexPermutation, n); + + // TODO: "Clip and flip" if undirected graph + int SCALE = int_log2(n); + + for (edges_size_type i = 0; i < m; ++i) { + + vertices_size_type u, v; + boost::tie(u, v) = generate_edge(this->gen, n, SCALE, a, b, c, d); + + if (permute_vertices) { + if (ep(vertexPermutation[u], vertexPermutation[v])) + values.push(std::make_pair(vertexPermutation[u], vertexPermutation[v])); + } else { + if (ep(u, v)) + values.push(std::make_pair(u, v)); + } + + } + + current = values.top(); + values.pop(); + } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + sorted_rmat_iterator& operator++() + { + if (!values.empty()) { + current = values.top(); + values.pop(); + } else + done = true; + + return *this; + } + + sorted_rmat_iterator operator++(int) + { + sorted_rmat_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const sorted_rmat_iterator& other) const + { + return values.empty() && other.values.empty() && done && other.done; + } + + bool operator!=(const sorted_rmat_iterator& other) const + { return !(*this == other); } + + private: + + // Parameters + shared_ptr > gen; + bool permute_vertices; + + // Internal data structures + std::priority_queue, sort_pair > values; + value_type current; + bool done; + }; + + + // This version is slow but guarantees unique edges + template + class unique_rmat_iterator + { + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + + public: + typedef std::input_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef void difference_type; + + // No argument constructor, set to terminating condition + unique_rmat_iterator() + : gen(), done(true) + { } + + // Initialize for edge generation + unique_rmat_iterator(RandomGenerator& gen, vertices_size_type n, + edges_size_type m, double a, double b, double c, + double d, bool permute_vertices = true, + EdgePredicate ep = keep_all_edges()) + : gen(), done(false) + + { + assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); + + this->gen.reset(new uniform_01(gen)); + + std::vector vertexPermutation; + if (permute_vertices) + generate_permutation_vector(gen, vertexPermutation, n); + + int SCALE = int_log2(n); + + std::map edge_map; + + edges_size_type edges = 0; + do { + vertices_size_type u, v; + boost::tie(u, v) = generate_edge(this->gen, n, SCALE, a, b, c, d); + + // Lowest vertex number always comes first + // (this means we don't have to worry about i->j and j->i being in the edge list) + if (u > v && is_same::value) + std::swap(u, v); + + if (edge_map.find(std::make_pair(u, v)) == edge_map.end()) { + edge_map[std::make_pair(u, v)] = true; + + if (permute_vertices) { + if (ep(vertexPermutation[u], vertexPermutation[v])) + values.push_back(std::make_pair(vertexPermutation[u], vertexPermutation[v])); + } else { + if (ep(u, v)) + values.push_back(std::make_pair(u, v)); + } + + edges++; + } + } while (edges < m); + // NGE - Asking for more than n^2 edges will result in an infinite loop here + // Asking for a value too close to n^2 edges may as well + + current = values.back(); + values.pop_back(); + } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + unique_rmat_iterator& operator++() + { + if (!values.empty()) { + current = values.back(); + values.pop_back(); + } else + done = true; + + return *this; + } + + unique_rmat_iterator operator++(int) + { + unique_rmat_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const unique_rmat_iterator& other) const + { + return values.empty() && other.values.empty() && done && other.done; + } + + bool operator!=(const unique_rmat_iterator& other) const + { return !(*this == other); } + + private: + + // Parameters + shared_ptr > gen; + + // Internal data structures + std::vector values; + value_type current; + bool done; + }; + + // This version is slow but guarantees unique edges + template + class sorted_unique_rmat_iterator + { + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::edges_size_type edges_size_type; + + public: + typedef std::input_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef void difference_type; + + // No argument constructor, set to terminating condition + sorted_unique_rmat_iterator() + : gen(), values(sort_pair()), done(true) { } + + // Initialize for edge generation + sorted_unique_rmat_iterator(RandomGenerator& gen, vertices_size_type n, + edges_size_type m, double a, double b, double c, + double d, bool bidirectional = false, + bool permute_vertices = true, + EdgePredicate ep = keep_all_edges()) + : gen(), bidirectional(bidirectional), + values(sort_pair()), done(false) + + { + assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); + + this->gen.reset(new uniform_01(gen)); + + std::vector vertexPermutation; + if (permute_vertices) + generate_permutation_vector(gen, vertexPermutation, n); + + int SCALE = int_log2(n); + + std::map edge_map; + + edges_size_type edges = 0; + do { + + vertices_size_type u, v; + boost::tie(u, v) = generate_edge(this->gen, n, SCALE, a, b, c, d); + + if (bidirectional) { + if (edge_map.find(std::make_pair(u, v)) == edge_map.end()) { + edge_map[std::make_pair(u, v)] = true; + edge_map[std::make_pair(v, u)] = true; + + if (ep(u, v)) { + if (permute_vertices) { + values.push(std::make_pair(vertexPermutation[u], vertexPermutation[v])); + values.push(std::make_pair(vertexPermutation[v], vertexPermutation[u])); + } else { + values.push(std::make_pair(u, v)); + values.push(std::make_pair(v, u)); + } + } + + ++edges; + } + } else { + // Lowest vertex number always comes first + // (this means we don't have to worry about i->j and j->i being in the edge list) + if (u > v && is_same::value) + std::swap(u, v); + + if (edge_map.find(std::make_pair(u, v)) == edge_map.end()) { + edge_map[std::make_pair(u, v)] = true; + + if (permute_vertices) { + if (ep(vertexPermutation[u], vertexPermutation[v])) + values.push(std::make_pair(vertexPermutation[u], vertexPermutation[v])); + } else { + if (ep(u, v)) + values.push(std::make_pair(u, v)); + } + + ++edges; + } + } + + } while (edges < m); + // NGE - Asking for more than n^2 edges will result in an infinite loop here + // Asking for a value too close to n^2 edges may as well + + current = values.top(); + values.pop(); + } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + sorted_unique_rmat_iterator& operator++() + { + if (!values.empty()) { + current = values.top(); + values.pop(); + } else + done = true; + + return *this; + } + + sorted_unique_rmat_iterator operator++(int) + { + sorted_unique_rmat_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const sorted_unique_rmat_iterator& other) const + { + return values.empty() && other.values.empty() && done && other.done; + } + + bool operator!=(const sorted_unique_rmat_iterator& other) const + { return !(*this == other); } + + private: + + // Parameters + shared_ptr > gen; + bool bidirectional; + + // Internal data structures + std::priority_queue, + sort_pair > values; + value_type current; + bool done; + }; + +} // end namespace boost + +#ifdef BOOST_GRAPH_USE_MPI +#include +#endif // BOOST_GRAPH_USE_MPI + +#endif // BOOST_GRAPH_RMAT_GENERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/sequential_vertex_coloring.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/sequential_vertex_coloring.hpp new file mode 100644 index 0000000000..6bca084324 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/sequential_vertex_coloring.hpp @@ -0,0 +1,124 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2004 The Trustees of Indiana University +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_SEQUENTIAL_VERTEX_COLORING_HPP +#define BOOST_GRAPH_SEQUENTIAL_VERTEX_COLORING_HPP + +#include +#include +#include +#include +#include + +#ifdef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# include +#endif + +/* This algorithm is to find coloring of a graph + + Algorithm: + Let G = (V,E) be a graph with vertices (somehow) ordered v_1, v_2, ..., + v_n. For k = 1, 2, ..., n the sequential algorithm assigns v_k to the + smallest possible color. + + Reference: + + Thomas F. Coleman and Jorge J. More, Estimation of sparse Jacobian + matrices and graph coloring problems. J. Numer. Anal. V20, P187-209, 1983 + + v_k is stored as o[k] here. + + The color of the vertex v will be stored in color[v]. + i.e., vertex v belongs to coloring color[v] */ + +namespace boost { + template + typename property_traits::value_type + sequential_vertex_coloring(const VertexListGraph& G, OrderPA order, + ColorMap color) + { + typedef graph_traits GraphTraits; + typedef typename GraphTraits::vertex_descriptor Vertex; + typedef typename property_traits::value_type size_type; + + size_type max_color = 0; + const size_type V = num_vertices(G); + + // We need to keep track of which colors are used by + // adjacent vertices. We do this by marking the colors + // that are used. The mark array contains the mark + // for each color. The length of mark is the + // number of vertices since the maximum possible number of colors + // is the number of vertices. + std::vector mark(V, + std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION()); + + //Initialize colors + typename GraphTraits::vertex_iterator v, vend; + for (boost::tie(v, vend) = vertices(G); v != vend; ++v) + put(color, *v, V-1); + + //Determine the color for every vertex one by one + for ( size_type i = 0; i < V; i++) { + Vertex current = get(order,i); + typename GraphTraits::adjacency_iterator v, vend; + + //Mark the colors of vertices adjacent to current. + //i can be the value for marking since i increases successively + for (boost::tie(v,vend) = adjacent_vertices(current, G); v != vend; ++v) + mark[get(color,*v)] = i; + + //Next step is to assign the smallest un-marked color + //to the current vertex. + size_type j = 0; + + //Scan through all useable colors, find the smallest possible + //color that is not used by neighbors. Note that if mark[j] + //is equal to i, color j is used by one of the current vertex's + //neighbors. + while ( j < max_color && mark[j] == i ) + ++j; + + if ( j == max_color ) //All colors are used up. Add one more color + ++max_color; + + //At this point, j is the smallest possible color + put(color, current, j); //Save the color of vertex current + } + + return max_color; + } + + template + typename property_traits::value_type + sequential_vertex_coloring(const VertexListGraph& G, ColorMap color) + { + typedef typename graph_traits::vertex_descriptor + vertex_descriptor; + typedef typename graph_traits::vertex_iterator + vertex_iterator; + + std::pair v = vertices(G); +#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS + std::vector order(v.first, v.second); +#else + std::vector order; + order.reserve(std::distance(v.first, v.second)); + while (v.first != v.second) order.push_back(*v.first++); +#endif + return sequential_vertex_coloring + (G, + make_iterator_property_map + (order.begin(), identity_property_map(), + graph_traits::null_vertex()), + color); + } +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/simple_point.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/simple_point.hpp new file mode 100644 index 0000000000..5f19c75f78 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/simple_point.hpp @@ -0,0 +1,23 @@ +//======================================================================= +// Copyright 2005 Trustees of Indiana University +// Authors: Andrew Lumsdaine, Douglas Gregor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_SIMPLE_POINT_HPP +#define BOOST_GRAPH_SIMPLE_POINT_HPP + +namespace boost { + +template +struct simple_point +{ + T x; + T y; +}; + +} // end namespace boost + +#endif // BOOST_GRAPH_SIMPLE_POINT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/sloan_ordering.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/sloan_ordering.hpp new file mode 100644 index 0000000000..781e9c9f4c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/sloan_ordering.hpp @@ -0,0 +1,447 @@ +// +//======================================================================= +// Copyright 2002 Marc Wintermantel (wintermantel@even-ag.ch) +// ETH Zurich, Center of Structure Technologies (www.imes.ethz.ch/st) +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +#ifndef BOOST_GRAPH_SLOAN_HPP +#define BOOST_GRAPH_SLOAN_HPP + +#define WEIGHT1 1 //default weight for the distance in the Sloan algorithm +#define WEIGHT2 2 //default weight for the degree in the Sloan algorithm + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +//////////////////////////////////////////////////////////// +// +//Sloan-Algorithm for graph reordering +//(optimzes profile and wavefront, not primiraly bandwidth +// +//////////////////////////////////////////////////////////// + +namespace boost { + + ///////////////////////////////////////////////////////////////////////// + // Function that returns the maximum depth of + // a rooted level strucutre (RLS) + // + ///////////////////////////////////////////////////////////////////////// + template + unsigned RLS_depth(Distance& d) + { + unsigned h_s = 0; + typename Distance::iterator iter; + + for (iter = d.begin(); iter != d.end(); ++iter) + { + if(*iter > h_s) + { + h_s = *iter; + } + } + + return h_s; + } + + + + ///////////////////////////////////////////////////////////////////////// + // Function that returns the width of the largest level of + // a rooted level strucutre (RLS) + // + ///////////////////////////////////////////////////////////////////////// + template + unsigned RLS_max_width(Distance& d, my_int depth) + { + + //Searching for the maximum width of a level + std::vector dummy_width(depth+1, 0); + std::vector::iterator my_it; + typename Distance::iterator iter; + unsigned w_max = 0; + + for (iter = d.begin(); iter != d.end(); ++iter) + { + dummy_width[*iter]++; + } + + for(my_it = dummy_width.begin(); my_it != dummy_width.end(); ++my_it) + { + if(*my_it > w_max) w_max = *my_it; + } + + return w_max; + + } + + + ///////////////////////////////////////////////////////////////////////// + // Function for finding a good starting node for Sloan algorithm + // + // This is to find a good starting node. "good" is in the sense + // of the ordering generated. + ///////////////////////////////////////////////////////////////////////// + template + typename graph_traits::vertex_descriptor + sloan_start_end_vertices(Graph& G, + typename graph_traits::vertex_descriptor &s, + ColorMap color, + DegreeMap degree) + { + typedef typename property_traits::value_type Degree; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename std::vector< typename graph_traits::vertices_size_type>::iterator vec_iter; + typedef typename graph_traits::vertices_size_type size_type; + + typedef typename property_map::const_type VertexID; + + s = *(vertices(G).first); + Vertex e = s; + Vertex i; + unsigned my_degree = get(degree, s ); + unsigned dummy, h_i, h_s, w_i, w_e; + bool new_start = true; + unsigned maximum_degree = 0; + + //Creating a std-vector for storing the distance from the start vertex in dist + std::vector::vertices_size_type> dist(num_vertices(G), 0); + + //Wrap a property_map_iterator around the std::iterator + boost::iterator_property_map dist_pmap(dist.begin(), get(vertex_index, G)); + + //Creating a property_map for the indices of a vertex + typename property_map::type index_map = get(vertex_index, G); + + //Creating a priority queue + typedef indirect_cmp > Compare; + Compare comp(degree); + std::priority_queue, Compare> degree_queue(comp); + + //step 1 + //Scan for the vertex with the smallest degree and the maximum degree + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui) + { + dummy = get(degree, *ui); + + if(dummy < my_degree) + { + my_degree = dummy; + s = *ui; + } + + if(dummy > maximum_degree) + { + maximum_degree = dummy; + } + } + //end 1 + + do{ + new_start = false; //Setting the loop repetition status to false + + //step 2 + //initialize the the disance std-vector with 0 + for(typename std::vector::vertices_size_type>::iterator iter = dist.begin(); iter != dist.end(); ++iter) *iter = 0; + + //generating the RLS (rooted level structure) + breadth_first_search + (G, s, visitor + ( + make_bfs_visitor(record_distances(dist_pmap, on_tree_edge() ) ) + ) + ); + + //end 2 + + //step 3 + //calculating the depth of the RLS + h_s = RLS_depth(dist); + + //step 4 + //pushing one node of each degree in an ascending manner into degree_queue + std::vector shrink_trace(maximum_degree, false); + for (boost::tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui) + { + dummy = get(degree, *ui); + + if( (dist[index_map[*ui]] == h_s ) && ( !shrink_trace[ dummy ] ) ) + { + degree_queue.push(*ui); + shrink_trace[ dummy ] = true; + } + } + + //end 3 & 4 + + + // step 5 + // Initializing w + w_e = (std::numeric_limits::max)(); + //end 5 + + + //step 6 + //Testing for termination + while( !degree_queue.empty() ) + { + i = degree_queue.top(); //getting the node with the lowest degree from the degree queue + degree_queue.pop(); //ereasing the node with the lowest degree from the degree queue + + //generating a RLS + for(typename std::vector::vertices_size_type>::iterator iter = dist.begin(); iter != dist.end(); ++iter) *iter = 0; + + breadth_first_search + (G, i, boost::visitor + ( + make_bfs_visitor(record_distances(dist_pmap, on_tree_edge() ) ) + ) + ); + + //Calculating depth and width of the rooted level + h_i = RLS_depth(dist); + w_i = RLS_max_width(dist, h_i); + + //Testing for termination + if( (h_i > h_s) && (w_i < w_e) ) + { + h_s = h_i; + s = i; + while(!degree_queue.empty()) degree_queue.pop(); + new_start = true; + } + else if(w_i < w_e) + { + w_e = w_i; + e = i; + } + } + //end 6 + + }while(new_start); + + return e; + } + + ////////////////////////////////////////////////////////////////////////// + // Sloan algorithm with a given starting Vertex. + // + // This algorithm requires user to provide a starting vertex to + // compute Sloan ordering. + ////////////////////////////////////////////////////////////////////////// + template + OutputIterator + sloan_ordering(Graph& g, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor e, + OutputIterator permutation, + ColorMap color, + DegreeMap degree, + PriorityMap priority, + Weight W1, + Weight W2) + { + //typedef typename property_traits::value_type Degree; + typedef typename property_traits::value_type Degree; + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename std::vector::vertices_size_type>::iterator vec_iter; + typedef typename graph_traits::vertices_size_type size_type; + + typedef typename property_map::const_type VertexID; + + + //Creating a std-vector for storing the distance from the end vertex in it + typename std::vector::vertices_size_type> dist(num_vertices(g), 0); + + //Wrap a property_map_iterator around the std::iterator + boost::iterator_property_map dist_pmap(dist.begin(), get(vertex_index, g)); + + breadth_first_search + (g, e, visitor + ( + make_bfs_visitor(record_distances(dist_pmap, on_tree_edge() ) ) + ) + ); + + //Creating a property_map for the indices of a vertex + typename property_map::type index_map = get(vertex_index, g); + + //Sets the color and priority to their initial status + unsigned cdeg; + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) + { + put(color, *ui, Color::white()); + cdeg=get(degree, *ui)+1; + put(priority, *ui, W1*dist[index_map[*ui]]-W2*cdeg ); + } + + //Priority list + typedef indirect_cmp > Compare; + Compare comp(priority); + std::list priority_list; + + //Some more declarations + typename graph_traits::out_edge_iterator ei, ei_end, ei2, ei2_end; + Vertex u, v, w; + + put(color, s, Color::green()); //Sets the color of the starting vertex to gray + priority_list.push_front(s); //Puts s into the priority_list + + while ( !priority_list.empty() ) + { + priority_list.sort(comp); //Orders the elements in the priority list in an ascending manner + + u = priority_list.front(); //Accesses the last element in the priority list + priority_list.pop_front(); //Removes the last element in the priority list + + if(get(color, u) == Color::green() ) + { + //for-loop over all out-edges of vertex u + for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) + { + v = target(*ei, g); + + put( priority, v, get(priority, v) + W2 ); //updates the priority + + if (get(color, v) == Color::white() ) //test if the vertex is inactive + { + put(color, v, Color::green() ); //giving the vertex a preactive status + priority_list.push_front(v); //writing the vertex in the priority_queue + } + } + } + + //Here starts step 8 + *permutation++ = u; //Puts u to the first position in the permutation-vector + put(color, u, Color::black() ); //Gives u an inactive status + + //for loop over all the adjacent vertices of u + for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) { + + v = target(*ei, g); + + if (get(color, v) == Color::green() ) { //tests if the vertex is inactive + + put(color, v, Color::red() ); //giving the vertex an active status + put(priority, v, get(priority, v)+W2); //updates the priority + + //for loop over alll adjacent vertices of v + for (boost::tie(ei2, ei2_end) = out_edges(v, g); ei2 != ei2_end; ++ei2) { + w = target(*ei2, g); + + if(get(color, w) != Color::black() ) { //tests if vertex is postactive + + put(priority, w, get(priority, w)+W2); //updates the priority + + if(get(color, w) == Color::white() ){ + + put(color, w, Color::green() ); // gives the vertex a preactive status + priority_list.push_front(w); // puts the vertex into the priority queue + + } //end if + + } //end if + + } //end for + + } //end if + + } //end for + + } //end while + + + return permutation; + } + + ///////////////////////////////////////////////////////////////////////////////////////// + // Same algorithm as before, but without the weights given (taking default weights + template + OutputIterator + sloan_ordering(Graph& g, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor e, + OutputIterator permutation, + ColorMap color, + DegreeMap degree, + PriorityMap priority) + { + return sloan_ordering(g, s, e, permutation, color, degree, priority, WEIGHT1, WEIGHT2); + } + + + ////////////////////////////////////////////////////////////////////////// + // Sloan algorithm without a given starting Vertex. + // + // This algorithm finds a good starting vertex itself to + // compute Sloan-ordering. + ////////////////////////////////////////////////////////////////////////// + + + + template < class Graph, class OutputIterator, + class Color, class Degree, + class Priority, class Weight> + inline OutputIterator + sloan_ordering(Graph& G, + OutputIterator permutation, + Color color, + Degree degree, + Priority priority, + Weight W1, + Weight W2 ) + { + typedef typename boost::graph_traits::vertex_descriptor Vertex; + + Vertex s, e; + e = sloan_start_end_vertices(G, s, color, degree); + + return sloan_ordering(G, s, e, permutation, color, degree, priority, W1, W2); + } + + ///////////////////////////////////////////////////////////////////////////////////////// + // Same as before, but without given weights (default weights are taken instead) + template < class Graph, class OutputIterator, + class Color, class Degree, + class Priority > + inline OutputIterator + sloan_ordering(Graph& G, + OutputIterator permutation, + Color color, + Degree degree, + Priority priority) + { + return sloan_ordering(G, permutation, color, degree, priority, WEIGHT1, WEIGHT2); + } + + +} // namespace boost + + +#endif // BOOST_GRAPH_SLOAN_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/small_world_generator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/small_world_generator.hpp new file mode 100644 index 0000000000..4822e26ce7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/small_world_generator.hpp @@ -0,0 +1,114 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_SMALL_WORLD_GENERATOR_HPP +#define BOOST_GRAPH_SMALL_WORLD_GENERATOR_HPP + +#include +#include +#include +#include + +namespace boost { + + // Assumes undirected + template + class small_world_iterator + { + typedef typename graph_traits::vertices_size_type + vertices_size_type; + + public: + typedef std::input_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef void difference_type; + + small_world_iterator() : gen(0) {} + small_world_iterator(RandomGenerator& gen, vertices_size_type n, + vertices_size_type k, double prob = 0.0, + bool allow_self_loops = false) + : gen(&gen), n(n), k(k), prob(prob), source(0), + target(allow_self_loops? 0 : 1), + allow_self_loops(allow_self_loops), + current(0, allow_self_loops? 0 : 1) + { } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + small_world_iterator& operator++() + { + target = (target + 1) % n; + if (target == (source + k/2 + 1) % n) { + ++source; + if (allow_self_loops) target = source; + else target = (source + 1) % n; + } + current.first = source; + + uniform_01 rand01(*gen); + uniform_int rand_vertex_gen(0, n-1); + double x = rand01(); + *gen = rand01.base(); // GRRRR + if (x < prob) { + vertices_size_type lower = (source + n - k/2) % n; + vertices_size_type upper = (source + k/2) % n; + do { + current.second = rand_vertex_gen(*gen); + } while ((current.second >= lower && current.second <= upper) + || (upper < lower + && (current.second >= lower || current.second <= upper))); + } else { + current.second = target; + } + return *this; + } + + small_world_iterator operator++(int) + { + small_world_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const small_world_iterator& other) const + { + if (!gen && other.gen) return other == *this; + else if (gen && !other.gen) return source == n; + else if (!gen && !other.gen) return true; + return source == other.source && target == other.target; + } + + bool operator!=(const small_world_iterator& other) const + { return !(*this == other); } + + private: + void next() + { + uniform_int rand_vertex(0, n-1); + current.first = rand_vertex(*gen); + do { + current.second = rand_vertex(*gen); + } while (current.first == current.second && !allow_self_loops); + } + + RandomGenerator* gen; + vertices_size_type n; + vertices_size_type k; + double prob; + vertices_size_type source; + vertices_size_type target; + bool allow_self_loops; + value_type current; + }; + +} // end namespace boost + +#endif // BOOST_GRAPH_SMALL_WORLD_GENERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/smallest_last_ordering.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/smallest_last_ordering.hpp new file mode 100644 index 0000000000..210bb532ea --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/smallest_last_ordering.hpp @@ -0,0 +1,140 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +// Revision History: +// 17 March 2006: Fixed a bug: when updating the degree a vertex +// could be moved to a wrong bucket. (Roman Dementiev) +// + + + +#ifndef BOOST_SMALLEST_LAST_VERTEX_ORDERING_HPP +#define BOOST_SMALLEST_LAST_VERTEX_ORDERING_HPP +/* + The smallest-last ordering is defined for the loopless graph G with + vertices a(j), j = 1,2,...,n where a(j) is the j-th column of A and + with edge (a(i),a(j)) if and only if columns i and j have a + non-zero in the same row position. The smallest-last ordering is + determined recursively by letting list(k), k = n,...,1 be a column + with least degree in the subgraph spanned by the un-ordered + columns. + */ +#include +#include +#include +#include +#include +#include + +namespace boost { + + template + void + smallest_last_vertex_ordering(const VertexListGraph& G, Order order, + Degree degree, Marker marker) { + typedef typename boost::graph_traits GraphTraits; + typedef typename GraphTraits::vertex_descriptor Vertex; + //typedef typename GraphTraits::size_type size_type; + typedef std::size_t size_type; + + const size_type num = num_vertices(G); + + typedef typename boost::property_map::type ID; + typedef bucket_sorter BucketSorter; + + BucketSorter degree_bucket_sorter(num, num, degree, + get(vertex_index,G)); + + smallest_last_vertex_ordering(G, order, degree, marker, degree_bucket_sorter); + } + + template + void + smallest_last_vertex_ordering(const VertexListGraph& G, Order order, + Degree degree, Marker marker, + BucketSorter& degree_buckets) { + typedef typename boost::graph_traits GraphTraits; + typedef typename GraphTraits::vertex_descriptor Vertex; + //typedef typename GraphTraits::size_type size_type; + typedef std::size_t size_type; + + const size_type num = num_vertices(G); + + typename GraphTraits::vertex_iterator v, vend; + for (boost::tie(v, vend) = vertices(G); v != vend; ++v) { + put(marker, *v, num); + put(degree, *v, out_degree(*v, G)); + degree_buckets.push(*v); + } + + size_type minimum_degree = 0; + size_type current_order = num - 1; + + while ( 1 ) { + typedef typename BucketSorter::stack MDStack; + MDStack minimum_degree_stack = degree_buckets[minimum_degree]; + while (minimum_degree_stack.empty()) + minimum_degree_stack = degree_buckets[++minimum_degree]; + + Vertex node = minimum_degree_stack.top(); + put(order, current_order, node); + + if ( current_order == 0 ) //find all vertices + break; + + minimum_degree_stack.pop(); + put(marker, node, 0); //node has been ordered. + + typename GraphTraits::adjacency_iterator v, vend; + for (boost::tie(v,vend) = adjacent_vertices(node, G); v != vend; ++v) + + if ( get(marker,*v) > current_order ) { //*v is unordered vertex + put(marker, *v, current_order); //mark the columns adjacent to node + + //delete *v from the bucket sorter + degree_buckets.remove(*v); + + //It is possible minimum degree goes down + //Here we keep tracking it. + put(degree, *v, get(degree, *v) - 1); + BOOST_USING_STD_MIN(); + minimum_degree = min BOOST_PREVENT_MACRO_SUBSTITUTION(minimum_degree, get(degree, *v)); + + //reinsert *v in the bucket sorter with the new degree + degree_buckets.push(*v); + } + + current_order--; + } + + //at this point, order[i] = v_i; + } + + template + void + smallest_last_vertex_ordering(const VertexListGraph& G, Order order) { + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::degree_size_type degree_size_type; + smallest_last_vertex_ordering(G, order, + make_shared_array_property_map(num_vertices(G), degree_size_type(0), get(vertex_index, G)), + make_shared_array_property_map(num_vertices(G), (std::size_t)(0), get(vertex_index, G))); + } + + template + std::vector::vertex_descriptor> + smallest_last_vertex_ordering(const VertexListGraph& G) { + std::vector::vertex_descriptor> o(num_vertices(G)); + smallest_last_vertex_ordering(G, make_iterator_property_map(o.begin(), typed_identity_property_map())); + return o; + } +} + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/ssca_graph_generator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/ssca_graph_generator.hpp new file mode 100644 index 0000000000..18d4a23f10 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/ssca_graph_generator.hpp @@ -0,0 +1,169 @@ +// Copyright 2004, 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Nick Edmonds +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_SSCA_GENERATOR_HPP +#define BOOST_GRAPH_SSCA_GENERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum Direction {FORWARD = 1, BACKWARD = 2, BOTH = FORWARD | BACKWARD}; + +namespace boost { + + // This generator generates graphs according to the method specified + // in SSCA 1.1. Current versions of SSCA use R-MAT graphs + + template + class ssca_iterator + { + typedef typename graph_traits::directed_category directed_category; + typedef typename graph_traits::vertices_size_type + vertices_size_type; + + public: + typedef std::input_iterator_tag iterator_category; + typedef std::pair value_type; + typedef const value_type& reference; + typedef const value_type* pointer; + typedef void difference_type; + + // No argument constructor, set to terminating condition + ssca_iterator() + : gen(), verticesRemaining(0) { } + + // Initialize for edge generation + ssca_iterator(RandomGenerator& gen, vertices_size_type totVertices, + vertices_size_type maxCliqueSize, double probUnidirectional, + int maxParallelEdges, double probIntercliqueEdges) + : gen(&gen), totVertices(totVertices), maxCliqueSize(maxCliqueSize), + probUnidirectional(probUnidirectional), maxParallelEdges(maxParallelEdges), + probIntercliqueEdges(probIntercliqueEdges), currentClique(0), + verticesRemaining(totVertices) + { + cliqueNum = std::vector(totVertices, -1); + current = std::make_pair(0,0); + } + + reference operator*() const { return current; } + pointer operator->() const { return ¤t; } + + ssca_iterator& operator++() + { + BOOST_USING_STD_MIN(); + while (values.empty() && verticesRemaining > 0) { // If there are no values left, generate a new clique + uniform_int clique_size(1, maxCliqueSize); + uniform_int rand_vertex(0, totVertices-1); + uniform_int num_parallel_edges(1, maxParallelEdges); + uniform_int direction(0,1); + uniform_01 prob(*gen); + std::vector cliqueVertices; + + cliqueVertices.clear(); + vertices_size_type size = min BOOST_PREVENT_MACRO_SUBSTITUTION (clique_size(*gen), verticesRemaining); + while (cliqueVertices.size() < size) { + vertices_size_type v = rand_vertex(*gen); + if (cliqueNum[v] == -1) { + cliqueNum[v] = currentClique; + cliqueVertices.push_back(v); + verticesRemaining--; + } + } // Nick: This is inefficient when only a few vertices remain... + // I should probably just select the remaining vertices + // in order when only a certain fraction remain. + + typename std::vector::iterator first, second; + for (first = cliqueVertices.begin(); first != cliqueVertices.end(); ++first) + for (second = first+1; second != cliqueVertices.end(); ++second) { + Direction d; + int edges; + + d = prob() < probUnidirectional ? (direction(*gen) == 0 ? FORWARD : BACKWARD) : BOTH; + + if (d & FORWARD) { + edges = num_parallel_edges(*gen); + for (int i = 0; i < edges; ++i) + values.push(std::make_pair(*first, *second)); + } + + if (d & BACKWARD) { + edges = num_parallel_edges(*gen); + for (int i = 0; i < edges; ++i) + values.push(std::make_pair(*second, *first)); + } + } + + if (verticesRemaining == 0) { + // Generate interclique edges + for (vertices_size_type i = 0; i < totVertices; ++i) { + double p = probIntercliqueEdges; + for (vertices_size_type d = 2; d < totVertices/2; d *= 2, p/= 2) { + vertices_size_type j = (i+d) % totVertices; + if (cliqueNum[j] != cliqueNum[i] && prob() < p) { + int edges = num_parallel_edges(*gen); + for (int i = 0; i < edges; ++i) + values.push(std::make_pair(i, j)); + } + } + } + } + + currentClique++; + } + + if (!values.empty()) { // If we're not done return a value + current = values.front(); + values.pop(); + } + + return *this; + } + + ssca_iterator operator++(int) + { + ssca_iterator temp(*this); + ++(*this); + return temp; + } + + bool operator==(const ssca_iterator& other) const + { + return verticesRemaining == other.verticesRemaining && values.empty() && other.values.empty(); + } + + bool operator!=(const ssca_iterator& other) const + { return !(*this == other); } + + private: + + // Parameters + RandomGenerator* gen; + vertices_size_type totVertices; + vertices_size_type maxCliqueSize; + double probUnidirectional; + int maxParallelEdges; + double probIntercliqueEdges; + + // Internal data structures + std::vector cliqueNum; + std::queue values; + int currentClique; + vertices_size_type verticesRemaining; + value_type current; + }; + +} // end namespace boost + +#endif // BOOST_GRAPH_SSCA_GENERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/st_connected.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/st_connected.hpp new file mode 100644 index 0000000000..9801a275b4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/st_connected.hpp @@ -0,0 +1,82 @@ +// Copyright (C) 2006 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP +#define BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP + +#include +#include +#include +#include + +namespace boost { namespace graph { + +template +bool +st_connected(const Graph& g, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t, + ColorMap color) +{ + typedef typename property_traits::value_type Color; + typedef color_traits ColorTraits; + typedef typename graph_traits::vertex_descriptor Vertex; + + // Set all vertices to white (unvisited) + BGL_FORALL_VERTICES_T(v, g, Graph) + put(color, v, ColorTraits::white()); + + // Vertices found from the source are grey + put(color, s, ColorTraits::gray()); + + // Vertices found from the target are greeen + put(color, t, ColorTraits::green()); + queue Q; + Q.push(s); + Q.push(t); + + while (!Q.empty()) { + Vertex u = Q.top(); Q.pop(); + Color u_color = get(color, u); + + BGL_FORALL_OUTEDGES_T(u, e, g, Graph) { + Vertex v = target(e, g); + Color v_color = get(color, v); + if (v_color == ColorTraits::white()) { + // We have not seen "v" before; mark it with the same color as u + Color u_color = get(color, u); + put(color, v, u_color); + + // Push it on the queue + Q.push(v); + } else if (v_color != ColorTraits::black() && u_color != v_color) { + // Colors have collided. We're done! + return true; + } + } + // u is done, so mark it black + put(color, u, ColorTraits::black()); + } + + return false; +} + +template +inline bool +st_connected(const Graph& g, + typename graph_traits::vertex_descriptor s, + typename graph_traits::vertex_descriptor t) +{ + return st_connected(g, s, t, + make_two_bit_color_map(num_vertices(g), + get(vertex_index, g))); +} + +} } // end namespace boost::graph + +#endif // BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/stanford_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/stanford_graph.hpp new file mode 100644 index 0000000000..0bb798c0f3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/stanford_graph.hpp @@ -0,0 +1,565 @@ +//======================================================================= +// Copyright 1997-2001 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +#ifndef BOOST_GRAPH_SGB_GRAPH_HPP +#define BOOST_GRAPH_SGB_GRAPH_HPP + +#include +#include +#include +#include +#include +#include + +// Thanks to Andreas Scherer for numerous suggestions and fixes! + +// This file adapts a Stanford GraphBase (SGB) Graph pointer into a +// VertexListGraph. Note that a graph adaptor class is not needed, +// SGB's Graph* is used as is. The VertexListGraph concept is fulfilled by +// defining the appropriate non-member functions for Graph*. +// +// The PROTOTYPES change file extensions to SGB must be applied so +// that the SGB functions have real prototypes which are necessary for +// the C++ compiler. To apply the PROTOTYPES extensions, before you do +// "make tests install" for SGB do "ln -s PROTOTYPES/* ." to the SGB +// root directory (or just copy all the files from the PROTOTYPES +// directory to the SGB root directory). +// +extern "C" { + // We include all global definitions for the general stuff + // of The Stanford GraphBase and its various graph generator + // functions by reading all SGB headerfiles as in section 2 of + // the "test_sample" program. +#include /* SGB data structures */ +#include /* SGB input/output routines */ +#include /* random number generator */ +#include /* routines for shortest paths */ +#include /* the basic graph operations */ +#undef empty /* avoid name clash with C++ standard library */ + inline Graph* empty( long n ) /* and provide workaround */ + { return board(n,0L,0L,0L,2L,0L,0L); } +#include /* graphs based on literature */ +#include /* graphs based on economic data */ +#include /* graphs based on football scores */ +#include /* graphs based on logic circuits */ +#undef val /* avoid name clash with g++ headerfile stl_tempbuf.h */ + // val ==> Vertex::x.I +#include /* graphs based on Mona Lisa */ +#include /* graphs based on mileage data */ +#include /* planar graphs */ +#include /* Ramanujan graphs */ +#include /* random graphs */ +#include /* graphs based on Roget's Thesaurus */ +#include /* we save results in ASCII format */ +#include /* five-letter-word graphs */ +#undef weight /* avoid name clash with BGL parameter */ + // weight ==> Vertex::u.I +} + +namespace boost { + class sgb_edge; +} + +class sgb_out_edge_iterator; +class sgb_adj_iterator; +class sgb_vertex_iterator; + +namespace boost { + typedef Graph* sgb_graph_ptr; + typedef const Graph* sgb_const_graph_ptr; + + struct sgb_traversal_tag : + public virtual vertex_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag { }; + + template <> struct graph_traits { + typedef Vertex* vertex_descriptor; + typedef boost::sgb_edge edge_descriptor; + typedef sgb_out_edge_iterator out_edge_iterator; + typedef void in_edge_iterator; + typedef sgb_adj_iterator adjacency_iterator; + typedef sgb_vertex_iterator vertex_iterator; + typedef void edge_iterator; + typedef long vertices_size_type; + typedef long edge_size_type; + typedef long degree_size_type; + typedef directed_tag directed_category; + typedef sgb_traversal_tag traversal_category; + typedef allow_parallel_edge_tag edge_parallel_category; + }; + template <> struct graph_traits { + typedef Vertex* vertex_descriptor; + typedef boost::sgb_edge edge_descriptor; + typedef sgb_out_edge_iterator out_edge_iterator; + typedef void in_edge_iterator; + typedef sgb_adj_iterator adjacency_iterator; + typedef sgb_vertex_iterator vertex_iterator; + typedef void edge_iterator; + typedef long vertices_size_type; + typedef long edge_size_type; + typedef long degree_size_type; + typedef directed_tag directed_category; + typedef sgb_traversal_tag traversal_category; + typedef allow_parallel_edge_tag edge_parallel_category; + }; +} + +namespace boost { + + struct edge_length_t { + typedef edge_property_tag kind; + }; + + // We could just use Arc* as the edge descriptor type, but + // we want to add the source(e,g) function which requires + // that we carry along a pointer to the source vertex. + class sgb_edge { + typedef sgb_edge self; + public: + sgb_edge() : _arc(0), _src(0) { } + sgb_edge(Arc* a, Vertex* s) : _arc(a), _src(s) { } + friend Vertex* source(self e, sgb_const_graph_ptr) { return e._src; } + friend Vertex* target(self e, sgb_const_graph_ptr) { return e._arc->tip; } + friend bool operator==(const self& a, const self& b) { + return a._arc == b._arc; } + friend bool operator!=(const self& a, const self& b) { + return a._arc != b._arc; } +#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + template friend class sgb_edge_length_map; + template friend class sgb_edge_util_map; + friend long get(edge_length_t, const sgb_graph_ptr&, const sgb_edge& key); + friend long get(edge_length_t, const sgb_const_graph_ptr&, const sgb_edge& key); + friend void put(edge_length_t, sgb_graph_ptr&, const sgb_edge& key, long value); + protected: +#endif + Arc* _arc; + Vertex* _src; + }; +} // namespace boost + + class sgb_out_edge_iterator + : public boost::forward_iterator_helper< + sgb_out_edge_iterator, boost::sgb_edge, + std::ptrdiff_t, boost::sgb_edge*, boost::sgb_edge> + { + typedef sgb_out_edge_iterator self; + public: + sgb_out_edge_iterator() : _src(0), _arc(0) {} + sgb_out_edge_iterator(Vertex* s, Arc* d) : _src(s), _arc(d) {} + boost::sgb_edge operator*() { return boost::sgb_edge(_arc, _src); } + self& operator++() { _arc = _arc->next; return *this; } + friend bool operator==(const self& x, const self& y) { + return x._arc == y._arc; } + protected: + Vertex* _src; + Arc* _arc; + }; + + class sgb_adj_iterator + : public boost::forward_iterator_helper< + sgb_adj_iterator, Vertex*, std::ptrdiff_t, Vertex**,Vertex*> + { + typedef sgb_adj_iterator self; + public: + sgb_adj_iterator() : _arc(0) {} + sgb_adj_iterator(Arc* d) : _arc(d) {} + Vertex* operator*() { return _arc->tip; } + self& operator++() { _arc = _arc->next; return *this; } + friend bool operator==(const self& x, const self& y) { + return x._arc == y._arc; } + protected: + Arc* _arc; + }; + + // The reason we have this instead of just using Vertex* is that we + // want to use Vertex* as the vertex_descriptor instead of just + // Vertex, which avoids problems with boost passing vertex descriptors + // by value and how that interacts with the sgb_vertex_id_map. + class sgb_vertex_iterator + : public boost::forward_iterator_helper< + sgb_vertex_iterator, Vertex*, std::ptrdiff_t, Vertex**, Vertex*> + { + typedef sgb_vertex_iterator self; + public: + sgb_vertex_iterator() : _v(0) { } + sgb_vertex_iterator(Vertex* v) : _v(v) { } + Vertex* operator*() { return _v; } + self& operator++() { ++_v; return *this; } + friend bool operator==(const self& x, const self& y) { + return x._v == y._v; } + protected: + Vertex* _v; + }; + +namespace boost { + + inline std::pair + vertices(sgb_const_graph_ptr g) + { + return std::make_pair(sgb_vertex_iterator(g->vertices), + sgb_vertex_iterator(g->vertices + g->n)); + } + + inline std::pair + out_edges(Vertex* u, sgb_const_graph_ptr) + { + return std::make_pair( sgb_out_edge_iterator(u, u->arcs), + sgb_out_edge_iterator(u, 0) ); + } + + inline boost::graph_traits::degree_size_type + out_degree(Vertex* u, sgb_const_graph_ptr g) + { + boost::graph_traits::out_edge_iterator i, i_end; + boost::tie(i, i_end) = out_edges(u, g); + return std::distance(i, i_end); + } + + // in_edges? + + inline std::pair + adjacent_vertices(Vertex* u, sgb_const_graph_ptr) + { + return std::make_pair( sgb_adj_iterator(u->arcs), + sgb_adj_iterator(0) ); + } + + inline long num_vertices(sgb_const_graph_ptr g) { return g->n; } + inline long num_edges(sgb_const_graph_ptr g) { return g->m; } + + inline Vertex* vertex(long v, sgb_const_graph_ptr g) + { return g->vertices + v; } + + // Various Property Maps + + // Vertex ID + class sgb_vertex_id_map + : public boost::put_get_helper + { + public: + typedef boost::readable_property_map_tag category; + typedef long value_type; + typedef long reference; + typedef Vertex* key_type; + sgb_vertex_id_map() : _g(0) { } + sgb_vertex_id_map(sgb_graph_ptr g) : _g(g) { } + long operator[](Vertex* v) const { return v - _g->vertices; } + protected: + sgb_graph_ptr _g; + }; + inline sgb_vertex_id_map get(vertex_index_t, sgb_graph_ptr g) { + return sgb_vertex_id_map(g); + } + + // Vertex Name + class sgb_vertex_name_map + : public boost::put_get_helper + { + public: + typedef boost::readable_property_map_tag category; + typedef char* value_type; + typedef char* reference; + typedef Vertex* key_type; + char* operator[](Vertex* v) const { return v->name; } + }; + inline sgb_vertex_name_map get(vertex_name_t, sgb_graph_ptr) { + return sgb_vertex_name_map(); + } + + // Vertex Property Tags +#define SGB_PROPERTY_TAG(KIND,TAG) \ + template struct TAG##_property { \ + typedef KIND##_property_tag kind; \ + typedef T type; \ + }; + SGB_PROPERTY_TAG(vertex, u) + SGB_PROPERTY_TAG(vertex, v) + SGB_PROPERTY_TAG(vertex, w) + SGB_PROPERTY_TAG(vertex, x) + SGB_PROPERTY_TAG(vertex, y) + SGB_PROPERTY_TAG(vertex, z) + + // Edge Property Tags + SGB_PROPERTY_TAG(edge, a) + SGB_PROPERTY_TAG(edge, b) + + // Various Utility Maps + + // helpers + inline Vertex*& get_util(util& u, Vertex*) { return u.V; } + inline Arc*& get_util(util& u, Arc*) { return u.A; } + inline sgb_graph_ptr& get_util(util& u, sgb_graph_ptr) { return u.G; } + inline char*& get_util(util& u, char*) { return u.S; } + inline long& get_util(util& u, long) { return u.I; } + +#define SGB_GET_UTIL_FIELD(KIND,X) \ + template \ + inline T& get_util_field(KIND* k, X##_property) { \ + return get_util(k->X, T()); } + + SGB_GET_UTIL_FIELD(Vertex, u) + SGB_GET_UTIL_FIELD(Vertex, v) + SGB_GET_UTIL_FIELD(Vertex, w) + SGB_GET_UTIL_FIELD(Vertex, x) + SGB_GET_UTIL_FIELD(Vertex, y) + SGB_GET_UTIL_FIELD(Vertex, z) + + SGB_GET_UTIL_FIELD(Arc, a) + SGB_GET_UTIL_FIELD(Arc, b) + + // Vertex Utility Map + template + class sgb_vertex_util_map + : public boost::put_get_helper > + { + public: + typedef boost::lvalue_property_map_tag category; + typedef typename Tag::type value_type; + typedef Vertex* key_type; + typedef Ref reference; + reference operator[](Vertex* v) const { + return get_util_field(v, Tag()); + } + }; + + // Edge Utility Map + template + class sgb_edge_util_map + : public boost::put_get_helper > + { + public: + typedef boost::lvalue_property_map_tag category; + typedef typename Tag::type value_type; + typedef Vertex* key_type; + typedef Ref reference; + reference operator[](const sgb_edge& e) const { + return get_util_field(e._arc, Tag()); + } + }; + +#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + template + inline sgb_vertex_util_map + get_property_map(Tag, const sgb_graph_ptr& g, vertex_property_tag) { + return sgb_vertex_util_map(); + } + template + inline sgb_vertex_util_map + get_property_map(Tag, sgb_graph_ptr& g, vertex_property_tag) { + return sgb_vertex_util_map(); + } + + template + inline sgb_edge_util_map + get_property_map(Tag, const sgb_graph_ptr& g, edge_property_tag) { + return sgb_edge_util_map(); + } + template + inline sgb_edge_util_map + get_property_map(Tag, sgb_graph_ptr& g, edge_property_tag) { + return sgb_edge_util_map(); + } + +#endif // ! BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // Edge Length Access + template + class sgb_edge_length_map + : public boost::put_get_helper > + { + public: + typedef boost::lvalue_property_map_tag category; + typedef long value_type; + typedef sgb_edge key_type; + typedef Ref reference; + reference operator[](const sgb_edge& e) const { + return e._arc->len; + } + }; + + inline sgb_edge_length_map + get(edge_length_t, const sgb_graph_ptr&) { + return sgb_edge_length_map(); + } + inline sgb_edge_length_map + get(edge_length_t, const sgb_const_graph_ptr&) { + return sgb_edge_length_map(); + } + inline sgb_edge_length_map + get(edge_length_t, sgb_graph_ptr&) { + return sgb_edge_length_map(); + } + inline long + get(edge_length_t, const sgb_graph_ptr&, const sgb_edge& key) { + return key._arc->len; + } + inline long + get(edge_length_t, const sgb_const_graph_ptr&, const sgb_edge& key) { + return key._arc->len; + } + inline void + put(edge_length_t, sgb_graph_ptr&, const sgb_edge& key, long value) + { + key._arc->len = value; + } + + // Property Map Traits Classes + template <> + struct property_map { + typedef sgb_edge_length_map type; + typedef sgb_edge_length_map const_type; + }; + template <> + struct property_map { + typedef sgb_vertex_id_map type; + typedef sgb_vertex_id_map const_type; + }; + template <> + struct property_map { + typedef sgb_vertex_name_map type; + typedef sgb_vertex_name_map const_type; + }; + + template <> + struct property_map { + typedef sgb_edge_length_map const_type; + }; + template <> + struct property_map { + typedef sgb_vertex_id_map const_type; + }; + template <> + struct property_map { + typedef sgb_vertex_name_map const_type; + }; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + + namespace detail { + template + struct sgb_choose_property_map { }; + template + struct sgb_choose_property_map { + typedef typename PropertyTag::type value_type; + typedef sgb_vertex_util_map type; + typedef sgb_vertex_util_map const_type; + }; + template + struct sgb_choose_property_map { + typedef typename PropertyTag::type value_type; + typedef sgb_edge_util_map type; + typedef sgb_edge_util_map const_type; + }; + } // namespace detail + template + struct property_map { + typedef typename property_kind::type Kind; + typedef detail::sgb_choose_property_map Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + template + struct property_map { + typedef typename property_kind::type Kind; + typedef detail::sgb_choose_property_map Choice; + typedef typename Choice::const_type const_type; + }; + +#define SGB_UTIL_ACCESSOR(KIND,X) \ + template \ + inline sgb_##KIND##_util_map< X##_property, T&> \ + get(X##_property, sgb_graph_ptr&) { \ + return sgb_##KIND##_util_map< X##_property, T&>(); \ + } \ + template \ + inline sgb_##KIND##_util_map< X##_property, const T&> \ + get(X##_property, const sgb_graph_ptr&) { \ + return sgb_##KIND##_util_map< X##_property, const T&>(); \ + } \ + template \ + inline sgb_##KIND##_util_map< X##_property, const T&> \ + get(X##_property, const sgb_const_graph_ptr&) { \ + return sgb_##KIND##_util_map< X##_property, const T&>(); \ + } \ + template \ + inline typename \ + sgb_##KIND##_util_map< X##_property, const T&>::value_type \ + get(X##_property, const sgb_graph_ptr&, const Key& key) { \ + return sgb_##KIND##_util_map< X##_property, const T&>()[key]; \ + } \ + template \ + inline typename \ + sgb_##KIND##_util_map< X##_property, const T&>::value_type \ + get(X##_property, const sgb_const_graph_ptr&, const Key& key) { \ + return sgb_##KIND##_util_map< X##_property, const T&>()[key]; \ + } \ + template \ + inline void \ + put(X##_property, sgb_graph_ptr&, const Key& key, const Value& value) { \ + sgb_##KIND##_util_map< X##_property, T&>()[key] = value; \ + } + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#define SGB_UTIL_ACCESSOR_TYPE(KIND,TAG,TYPE) \ + inline sgb_##KIND##_util_map< TAG, TYPE& > \ + get(TAG, sgb_graph_ptr&) { \ + return sgb_##KIND##_util_map< TAG, TYPE& >(); \ + } \ + inline sgb_##KIND##_util_map< TAG, const TYPE& > \ + get(TAG, const sgb_graph_ptr&) { \ + return sgb_##KIND##_util_map< TAG, const TYPE& >(); \ + } \ + inline sgb_##KIND##_util_map< TAG, const TYPE& > \ + get(TAG, const sgb_const_graph_ptr&) { \ + return sgb_##KIND##_util_map< TAG, const TYPE& >(); \ + } \ + template \ + inline typename sgb_##KIND##_util_map< TAG, const TYPE& >::value_type \ + get(TAG, const sgb_graph_ptr&, const Key& key) { \ + return sgb_##KIND##_util_map< TAG, const TYPE& >()[key]; \ + } \ + template \ + inline typename sgb_##KIND##_util_map< TAG, const TYPE& >::value_type \ + get(TAG, const sgb_const_graph_ptr&, const Key& key) { \ + return sgb_##KIND##_util_map< TAG, const TYPE& >()[key]; \ + } \ + template \ + inline void \ + put(TAG, sgb_graph_ptr&, const Key& key, const Value& value) { \ + sgb_##KIND##_util_map< TAG, TYPE& >()[key] = value; \ + } \ + template <> struct property_map > { \ + typedef sgb_##KIND##_util_map< TAG, TYPE&> type; \ + typedef sgb_##KIND##_util_map< TAG, const TYPE&> const_type; \ + } + +#define SGB_UTIL_ACCESSOR(KIND,TAG) \ + SGB_UTIL_ACCESSOR_TYPE(KIND, TAG##_property, Vertex*); \ + SGB_UTIL_ACCESSOR_TYPE(KIND, TAG##_property, Arc*); \ + SGB_UTIL_ACCESSOR_TYPE(KIND, TAG##_property, sgb_graph_ptr); \ + SGB_UTIL_ACCESSOR_TYPE(KIND, TAG##_property, long); \ + SGB_UTIL_ACCESSOR_TYPE(KIND, TAG##_property, char*); + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + SGB_UTIL_ACCESSOR(vertex, u) + SGB_UTIL_ACCESSOR(vertex, v) + SGB_UTIL_ACCESSOR(vertex, w) + SGB_UTIL_ACCESSOR(vertex, x) + SGB_UTIL_ACCESSOR(vertex, y) + SGB_UTIL_ACCESSOR(vertex, z) + + SGB_UTIL_ACCESSOR(edge, a) + SGB_UTIL_ACCESSOR(edge, b) + +} // namespace boost + +#endif // BOOST_GRAPH_SGB_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/stoer_wagner_min_cut.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/stoer_wagner_min_cut.hpp new file mode 100644 index 0000000000..9cd2d0da06 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/stoer_wagner_min_cut.hpp @@ -0,0 +1,240 @@ +// Copyright Daniel Trebbien 2010. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or the copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_STOER_WAGNER_MIN_CUT_HPP +#define BOOST_GRAPH_STOER_WAGNER_MIN_CUT_HPP 1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + namespace detail { + + /** + * \brief Performs a phase of the Stoer-Wagner min-cut algorithm + * + * Performs a phase of the Stoer-Wagner min-cut algorithm. + * + * As described by Stoer & Wagner (1997), a phase is simply a maximum adjacency search + * (also called a maximum cardinality search), which results in the selection of two vertices + * \em s and \em t, and, as a side product, a minimum s-t cut of + * the input graph. Here, the input graph is basically \p g, but some vertices are virtually + * assigned to others as a way of viewing \p g as a graph with some sets of + * vertices merged together. + * + * This implementation is a translation of pseudocode by Professor Uri Zwick, + * School of Computer Science, Tel Aviv University. + * + * \pre \p g is a connected, undirected graph + * \param[in] g the input graph + * \param[in] assignments a read/write property map from each vertex to the vertex that it is assigned to + * \param[in] assignedVertices a list of vertices that are assigned to others + * \param[in] weights a readable property map from each edge to its weight (a non-negative value) + * \param[out] pq a keyed, updatable max-priority queue + * \returns a tuple (\em s, \em t, \em w) of the "s" and "t" + * of the minimum s-t cut and the cut weight \em w + * of the minimum s-t cut. + * \see http://www.cs.tau.ac.il/~zwick/grad-algo-08/gmc.pdf + * + * \author Daniel Trebbien + * \date 2010-09-11 + */ + template + boost::tuple::vertex_descriptor, typename boost::graph_traits::vertex_descriptor, typename boost::property_traits::value_type> + stoer_wagner_phase(const UndirectedGraph& g, VertexAssignmentMap assignments, const std::set::vertex_descriptor>& assignedVertices, WeightMap weights, KeyedUpdatablePriorityQueue& pq) { + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::property_traits::value_type weight_type; + + assert(pq.empty()); + typename KeyedUpdatablePriorityQueue::key_map keys = pq.keys(); + + BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { + if (v == get(assignments, v)) { // foreach u \in V do + put(keys, v, weight_type(0)); + + pq.push(v); + } + } + + assert(pq.size() >= 2); + + vertex_descriptor s, t; + weight_type w; + while (!pq.empty()) { // while PQ \neq {} do + const vertex_descriptor u = pq.top(); // u = extractmax(PQ) + w = get(keys, u); + pq.pop(); + + s = t; t = u; + + BGL_FORALL_OUTEDGES_T(u, e, g, UndirectedGraph) { // foreach (u, v) \in E do + const vertex_descriptor v = get(assignments, target(e, g)); + + if (pq.contains(v)) { // if v \in PQ then + put(keys, v, get(keys, v) + get(weights, e)); // increasekey(PQ, v, wA(v) + w(u, v)) + pq.update(v); + } + } + + typename std::set::const_iterator assignedVertexIt, assignedVertexEnd = assignedVertices.end(); + for (assignedVertexIt = assignedVertices.begin(); assignedVertexIt != assignedVertexEnd; ++assignedVertexIt) { + const vertex_descriptor uPrime = *assignedVertexIt; + + if (get(assignments, uPrime) == u) { + BGL_FORALL_OUTEDGES_T(uPrime, e, g, UndirectedGraph) { // foreach (u, v) \in E do + const vertex_descriptor v = get(assignments, target(e, g)); + + if (pq.contains(v)) { // if v \in PQ then + put(keys, v, get(keys, v) + get(weights, e)); // increasekey(PQ, v, wA(v) + w(u, v)) + pq.update(v); + } + } + } + } + } + + return boost::make_tuple(s, t, w); + } + + /** + * \brief Computes a min-cut of the input graph + * + * Computes a min-cut of the input graph using the Stoer-Wagner algorithm. + * + * \pre \p g is a connected, undirected graph + * \pre pq.empty() + * \param[in] g the input graph + * \param[in] weights a readable property map from each edge to its weight (a non-negative value) + * \param[out] parities a writable property map from each vertex to a bool type object for + * distinguishing the two vertex sets of the min-cut + * \param[out] assignments a read/write property map from each vertex to a \c vertex_descriptor object. This + * map serves as work space, and no particular meaning should be derived from property values + * after completion of the algorithm. + * \param[out] pq a keyed, updatable max-priority queue + * \returns the cut weight of the min-cut + * \see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.114.6687&rep=rep1&type=pdf + * \see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.31.614&rep=rep1&type=pdf + * + * \author Daniel Trebbien + * \date 2010-09-11 + */ + template + typename boost::property_traits::value_type + stoer_wagner_min_cut(const UndirectedGraph& g, WeightMap weights, ParityMap parities, VertexAssignmentMap assignments, KeyedUpdatablePriorityQueue& pq) { + BOOST_CONCEPT_ASSERT((boost::IncidenceGraphConcept)); + BOOST_CONCEPT_ASSERT((boost::VertexListGraphConcept)); + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::vertices_size_type vertices_size_type; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + BOOST_CONCEPT_ASSERT((boost::Convertible::directed_category, boost::undirected_tag>)); + BOOST_CONCEPT_ASSERT((boost::ReadablePropertyMapConcept)); + typedef typename boost::property_traits::value_type weight_type; + BOOST_CONCEPT_ASSERT((boost::WritablePropertyMapConcept)); + typedef typename boost::property_traits::value_type parity_type; + BOOST_CONCEPT_ASSERT((boost::ReadWritePropertyMapConcept)); + BOOST_CONCEPT_ASSERT((boost::Convertible::value_type>)); + BOOST_CONCEPT_ASSERT((boost::KeyedUpdatableQueueConcept)); + + vertices_size_type n = num_vertices(g); + if (n < 2) + throw boost::bad_graph("the input graph must have at least two vertices."); + else if (!pq.empty()) + throw std::invalid_argument("the max-priority queue must be empty initially."); + + std::set assignedVertices; + + // initialize `assignments` (all vertices are initially assigned to themselves) + BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { + put(assignments, v, v); + } + + vertex_descriptor s, t; + weight_type bestW; + + boost::tie(s, t, bestW) = boost::detail::stoer_wagner_phase(g, assignments, assignedVertices, weights, pq); + assert(s != t); + BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { + put(parities, v, parity_type(v == t ? 1 : 0)); + } + put(assignments, t, s); + assignedVertices.insert(t); + --n; + + for (; n >= 2; --n) { + weight_type w; + boost::tie(s, t, w) = boost::detail::stoer_wagner_phase(g, assignments, assignedVertices, weights, pq); + assert(s != t); + + if (w < bestW) { + BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { + put(parities, v, parity_type(get(assignments, v) == t ? 1 : 0)); + + if (get(assignments, v) == t) // all vertices that were assigned to t are now assigned to s + put(assignments, v, s); + } + + bestW = w; + } else { + BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { + if (get(assignments, v) == t) // all vertices that were assigned to t are now assigned to s + put(assignments, v, s); + } + } + put(assignments, t, s); + assignedVertices.insert(t); + } + + assert(pq.empty()); + + return bestW; + } + + } // end `namespace detail` within `namespace boost` + + template + inline typename boost::property_traits::value_type + stoer_wagner_min_cut(const UndirectedGraph& g, WeightMap weights, const boost::bgl_named_params& params) { + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename std::vector::size_type heap_container_size_type; + typedef typename boost::property_traits::value_type weight_type; + + typedef boost::bgl_named_params params_type; + BOOST_GRAPH_DECLARE_CONVERTED_PARAMETERS(params_type, params) + + BOOST_AUTO(pq, (boost::detail::make_priority_queue_from_arg_pack_gen >(choose_param(get_param(params, boost::distance_zero_t()), weight_type(0)))(g, arg_pack))); + + return boost::detail::stoer_wagner_min_cut(g, + weights, + choose_param(get_param(params, boost::parity_map_t()), boost::dummy_property_map()), + boost::detail::make_property_map_from_arg_pack_gen(vertex_descriptor())(g, arg_pack), + pq + ); + } + + template + inline typename boost::property_traits::value_type + stoer_wagner_min_cut(const UndirectedGraph& g, WeightMap weights) { + return boost::stoer_wagner_min_cut(g, weights, boost::vertex_index_map(get(boost::vertex_index, g))); + } + +} // end `namespace boost` + +#include + +#endif // !BOOST_GRAPH_STOER_WAGNER_MIN_CUT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/strong_components.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/strong_components.hpp new file mode 100644 index 0000000000..6494283e5b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/strong_components.hpp @@ -0,0 +1,341 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +#ifndef BOOST_GRAPH_STRONG_COMPONENTS_HPP +#define BOOST_GRAPH_STRONG_COMPONENTS_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + + //========================================================================== + // This is Tarjan's algorithm for strongly connected components + // from his paper "Depth first search and linear graph algorithms". + // It calculates the components in a single application of DFS. + // We implement the algorithm as a dfs-visitor. + + namespace detail { + + template + class tarjan_scc_visitor : public dfs_visitor<> + { + typedef typename property_traits::value_type comp_type; + typedef typename property_traits::value_type time_type; + public: + tarjan_scc_visitor(ComponentMap comp_map, RootMap r, DiscoverTime d, + comp_type& c_, Stack& s_) + : c(c_), comp(comp_map), root(r), discover_time(d), + dfs_time(time_type()), s(s_) { } + + template + void discover_vertex(typename graph_traits::vertex_descriptor v, + const Graph&) { + put(root, v, v); + put(comp, v, (std::numeric_limits::max)()); + put(discover_time, v, dfs_time++); + s.push(v); + } + template + void finish_vertex(typename graph_traits::vertex_descriptor v, + const Graph& g) { + typename graph_traits::vertex_descriptor w; + typename graph_traits::out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(v, g); ei != ei_end; ++ei) { + w = target(*ei, g); + if (get(comp, w) == (std::numeric_limits::max)()) + put(root, v, this->min_discover_time(get(root,v), get(root,w))); + } + if (get(root, v) == v) { + do { + w = s.top(); s.pop(); + put(comp, w, c); + } while (w != v); + ++c; + } + } + private: + template + Vertex min_discover_time(Vertex u, Vertex v) { + return get(discover_time, u) < get(discover_time,v) ? u : v; + } + + comp_type& c; + ComponentMap comp; + RootMap root; + DiscoverTime discover_time; + time_type dfs_time; + Stack& s; + }; + + template + typename property_traits::value_type + strong_components_impl + (const Graph& g, // Input + ComponentMap comp, // Output + // Internal record keeping + RootMap root, + DiscoverTime discover_time, + const bgl_named_params& params) + { + typedef typename graph_traits::vertex_descriptor Vertex; + function_requires< ReadWritePropertyMapConcept >(); + function_requires< ReadWritePropertyMapConcept >(); + typedef typename property_traits::value_type RootV; + function_requires< ConvertibleConcept >(); + function_requires< ReadWritePropertyMapConcept >(); + + typename property_traits::value_type total = 0; + + std::stack s; + detail::tarjan_scc_visitor > + vis(comp, root, discover_time, total, s); + depth_first_search(g, params.visitor(vis)); + return total; + } + + //------------------------------------------------------------------------- + // The dispatch functions handle the defaults for the rank and discover + // time property maps. + // dispatch with class specialization to avoid VC++ bug + + template + struct strong_comp_dispatch2 { + template + inline static typename property_traits::value_type + apply(const Graph& g, + ComponentMap comp, + RootMap r_map, + const bgl_named_params& params, + DiscoverTimeMap time_map) + { + return strong_components_impl(g, comp, r_map, time_map, params); + } + }; + + + template <> + struct strong_comp_dispatch2 { + template + inline static typename property_traits::value_type + apply(const Graph& g, + ComponentMap comp, + RootMap r_map, + const bgl_named_params& params, + detail::error_property_not_found) + { + typedef typename graph_traits::vertices_size_type size_type; + size_type n = num_vertices(g) > 0 ? num_vertices(g) : 1; + std::vector time_vec(n); + return strong_components_impl + (g, comp, r_map, + make_iterator_property_map(time_vec.begin(), choose_const_pmap + (get_param(params, vertex_index), + g, vertex_index), time_vec[0]), + params); + } + }; + + template + inline typename property_traits::value_type + scc_helper2(const Graph& g, + ComponentMap comp, + RootMap r_map, + const bgl_named_params& params, + DiscoverTimeMap time_map) + { + return strong_comp_dispatch2::apply(g, comp, r_map, params, time_map); + } + + template + struct strong_comp_dispatch1 { + + template + inline static typename property_traits::value_type + apply(const Graph& g, + ComponentMap comp, + const bgl_named_params& params, + RootMap r_map) + { + return scc_helper2(g, comp, r_map, params, get_param(params, vertex_discover_time)); + } + }; + template <> + struct strong_comp_dispatch1 { + + template + inline static typename property_traits::value_type + apply(const Graph& g, + ComponentMap comp, + const bgl_named_params& params, + detail::error_property_not_found) + { + typedef typename graph_traits::vertex_descriptor Vertex; + typename std::vector::size_type + n = num_vertices(g) > 0 ? num_vertices(g) : 1; + std::vector root_vec(n); + return scc_helper2 + (g, comp, + make_iterator_property_map(root_vec.begin(), choose_const_pmap + (get_param(params, vertex_index), + g, vertex_index), root_vec[0]), + params, + get_param(params, vertex_discover_time)); + } + }; + + template + inline typename property_traits::value_type + scc_helper1(const Graph& g, + ComponentMap comp, + const bgl_named_params& params, + RootMap r_map) + { + return detail::strong_comp_dispatch1::apply(g, comp, params, + r_map); + } + + } // namespace detail + + template + inline typename property_traits::value_type + strong_components(const Graph& g, ComponentMap comp, + const bgl_named_params& params + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, vertex_list_graph_tag)) + { + typedef typename graph_traits::directed_category DirCat; + BOOST_STATIC_ASSERT((is_convertible::value == true)); + return detail::scc_helper1(g, comp, params, + get_param(params, vertex_root_t())); + } + + template + inline typename property_traits::value_type + strong_components(const Graph& g, ComponentMap comp + BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, vertex_list_graph_tag)) + { + typedef typename graph_traits::directed_category DirCat; + BOOST_STATIC_ASSERT((is_convertible::value == true)); + bgl_named_params params(0); + return strong_components(g, comp, params); + } + + template + void build_component_lists + (const Graph& g, + typename graph_traits::vertices_size_type num_scc, + ComponentMap component_number, + ComponentLists& components) + { + components.resize(num_scc); + typename graph_traits::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + components[component_number[*vi]].push_back(*vi); + } + + +} // namespace boost + +#include +#include +#include +#include +#include // for components_recorder + +namespace boost { + + //========================================================================== + // This is the version of strongly connected components from + // "Intro. to Algorithms" by Cormen, Leiserson, Rivest, which was + // adapted from "Data Structure and Algorithms" by Aho, Hopcroft, + // and Ullman, who credit the algorithm to S.R. Kosaraju and M. Sharir. + // The algorithm is based on computing DFS forests the graph + // and its transpose. + + // This algorithm is slower than Tarjan's by a constant factor, uses + // more memory, and puts more requirements on the graph type. + + template + typename property_traits::value_type + kosaraju_strong_components(Graph& G, ComponentsMap c, + FinishTime finish_time, ColorMap color) + { + function_requires< MutableGraphConcept >(); + // ... + + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + typename property_traits::value_type time = 0; + depth_first_search + (G, make_dfs_visitor(stamp_times(finish_time, time, on_finish_vertex())), + color); + + Graph G_T(num_vertices(G)); + transpose_graph(G, G_T); + + typedef typename property_traits::value_type count_type; + + count_type c_count(0); + detail::components_recorder + vis(c, c_count); + + // initialize G_T + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(G_T); ui != ui_end; ++ui) + put(color, *ui, Color::white()); + + typedef typename property_traits::value_type D; + typedef indirect_cmp< FinishTime, std::less > Compare; + + Compare fl(finish_time); + std::priority_queue, Compare > Q(fl); + + typename graph_traits::vertex_iterator i, j, iend, jend; + boost::tie(i, iend) = vertices(G_T); + boost::tie(j, jend) = vertices(G); + for ( ; i != iend; ++i, ++j) { + put(finish_time, *i, get(finish_time, *j)); + Q.push(*i); + } + + while ( !Q.empty() ) { + Vertex u = Q.top(); + Q.pop(); + if (get(color, u) == Color::white()) { + depth_first_visit(G_T, u, vis, color); + ++c_count; + } + } + return c_count; + } + +} // namespace boost + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif + +#endif // BOOST_GRAPH_STRONG_COMPONENTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/subgraph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/subgraph.hpp new file mode 100644 index 0000000000..33f67a4065 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/subgraph.hpp @@ -0,0 +1,1243 @@ +//======================================================================= +// Copyright 2001 University of Notre Dame. +// Authors: Jeremy G. Siek and Lie-Quan Lee +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_SUBGRAPH_HPP +#define BOOST_SUBGRAPH_HPP + +// UNDER CONSTRUCTION + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { + +struct subgraph_tag { }; + +/** @name Property Lookup + * The local_property and global_property functions are used to create + * structures that determine the lookup strategy for properties in subgraphs. + * Note that the nested kind member is used to help interoperate with actual + * Property types. + */ +//@{ +template +struct local_property +{ + typedef T kind; + local_property(T x) : value(x) { } + T value; +}; + +template +inline local_property local(T x) +{ return local_property(x); } + +template +struct global_property +{ + typedef T kind; + global_property(T x) : value(x) { } + T value; +}; + +template +inline global_property global(T x) +{ return global_property(x); } +//@} + +// Invariants of an induced subgraph: +// - If vertex u is in subgraph g, then u must be in g.parent(). +// - If edge e is in subgraph g, then e must be in g.parent(). +// - If edge e=(u,v) is in the root graph, then edge e +// is also in any subgraph that contains both vertex u and v. + +// The Graph template parameter must have a vertex_index and edge_index +// internal property. It is assumed that the vertex indices are assigned +// automatically by the graph during a call to add_vertex(). It is not +// assumed that the edge vertices are assigned automatically, they are +// explicitly assigned here. + +template +class subgraph { + typedef graph_traits Traits; + typedef std::list*> ChildrenList; +public: +// Graph requirements +typedef typename Traits::vertex_descriptor vertex_descriptor; +typedef typename Traits::edge_descriptor edge_descriptor; +typedef typename Traits::directed_category directed_category; +typedef typename Traits::edge_parallel_category edge_parallel_category; +typedef typename Traits::traversal_category traversal_category; + + // IncidenceGraph requirements + typedef typename Traits::out_edge_iterator out_edge_iterator; + typedef typename Traits::degree_size_type degree_size_type; + + // AdjacencyGraph requirements + typedef typename Traits::adjacency_iterator adjacency_iterator; + + // VertexListGraph requirements + typedef typename Traits::vertex_iterator vertex_iterator; + typedef typename Traits::vertices_size_type vertices_size_type; + + // EdgeListGraph requirements + typedef typename Traits::edge_iterator edge_iterator; + typedef typename Traits::edges_size_type edges_size_type; + + typedef typename Traits::in_edge_iterator in_edge_iterator; + + typedef typename Graph::edge_property_type edge_property_type; + typedef typename Graph::vertex_property_type vertex_property_type; + typedef typename Graph::vertex_bundled vertex_bundled; + typedef typename Graph::edge_bundled edge_bundled; + typedef subgraph_tag graph_tag; + typedef Graph graph_type; + typedef typename Graph::graph_property_type graph_property_type; + + // Create the main graph, the root of the subgraph tree + subgraph() + : m_parent(0), m_edge_counter(0) + { } + + subgraph(const graph_property_type& p) + : m_graph(p), m_parent(0), m_edge_counter(0) + { } + + subgraph(vertices_size_type n, const graph_property_type& p = graph_property_type()) + : m_graph(n, p), m_parent(0), m_edge_counter(0), m_global_vertex(n) + { + typename Graph::vertex_iterator v, v_end; + vertices_size_type i = 0; + for(boost::tie(v, v_end) = vertices(m_graph); v != v_end; ++v) + m_global_vertex[i++] = *v; + } + + // copy constructor + subgraph(const subgraph& x) + : m_graph(x.m_graph), m_parent(x.m_parent), m_edge_counter(x.m_edge_counter) + , m_global_vertex(x.m_global_vertex), m_global_edge(x.m_global_edge) + { + // Do a deep copy (recursive). + for(typename ChildrenList::const_iterator i = x.m_children.begin(); + i != x.m_children.end(); ++i) + { + m_children.push_back(new subgraph( **i )); + } + } + + + ~subgraph() { + for(typename ChildrenList::iterator i = m_children.begin(); + i != m_children.end(); ++i) + { + delete *i; + } + } + + // Return a null vertex descriptor for the graph. + static vertex_descriptor null_vertex() + { return Traits::null_vertex(); } + + + // Create a subgraph + subgraph& create_subgraph() { + m_children.push_back(new subgraph()); + m_children.back()->m_parent = this; + return *m_children.back(); + } + + // Create a subgraph with the specified vertex set. + template + subgraph& create_subgraph(VertexIterator first, VertexIterator last) { + m_children.push_back(new subgraph()); + m_children.back()->m_parent = this; + for(; first != last; ++first) { + add_vertex(*first, *m_children.back()); + } + return *m_children.back(); + } + + // local <-> global descriptor conversion functions + vertex_descriptor local_to_global(vertex_descriptor u_local) const + { return is_root() ? u_local : m_global_vertex[u_local]; } + + vertex_descriptor global_to_local(vertex_descriptor u_global) const { + vertex_descriptor u_local; bool in_subgraph; + if (is_root()) return u_global; + boost::tie(u_local, in_subgraph) = this->find_vertex(u_global); + assert(in_subgraph == true); + return u_local; + } + + edge_descriptor local_to_global(edge_descriptor e_local) const + { return is_root() ? e_local : m_global_edge[get(get(edge_index, m_graph), e_local)]; } + + edge_descriptor global_to_local(edge_descriptor e_global) const + { return is_root() ? e_global : (*m_local_edge.find(get(get(edge_index, root().m_graph), e_global))).second; } + + // Is vertex u (of the root graph) contained in this subgraph? + // If so, return the matching local vertex. + std::pair + find_vertex(vertex_descriptor u_global) const { + if (is_root()) return std::make_pair(u_global, true); + typename std::map::const_iterator + i = m_local_vertex.find(u_global); + bool valid = i != m_local_vertex.end(); + return std::make_pair((valid ? (*i).second : null_vertex()), valid); + } + + // Return the parent graph. + subgraph& parent() { return *m_parent; } + const subgraph& parent() const { return *m_parent; } + + // Return true if this is the root subgraph + bool is_root() const { return m_parent == 0; } + + // Return the root graph of the subgraph tree. + subgraph& root() + { return is_root() ? *this : m_parent->root(); } + + const subgraph& root() const + { return is_root() ? *this : m_parent->root(); } + + // Return the children subgraphs of this graph/subgraph. + // Use a list of pointers because the VC++ std::list doesn't like + // storing incomplete type. + typedef indirect_iterator< + typename ChildrenList::const_iterator + , subgraph + , std::bidirectional_iterator_tag + > + children_iterator; + + typedef indirect_iterator< + typename ChildrenList::const_iterator + , subgraph const + , std::bidirectional_iterator_tag + > + const_children_iterator; + + std::pair children() const { + return std::make_pair(const_children_iterator(m_children.begin()), + const_children_iterator(m_children.end())); + } + + std::pair children() { + return std::make_pair(children_iterator(m_children.begin()), + children_iterator(m_children.end())); + } + + std::size_t num_children() const { return m_children.size(); } + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + // Defualt property access delegates the lookup to global properties. + template + typename graph::detail::bundled_result::type& + operator[](Descriptor x) + { return is_root() ? m_graph[x] : root().m_graph[local_to_global(x)]; } + + template + typename graph::detail::bundled_result::type const& + operator[](Descriptor x) const + { return is_root() ? m_graph[x] : root().m_graph[local_to_global(x)]; } + + // Local property access returns the local property of the given descripor. + template + typename graph::detail::bundled_result::type& + operator[](local_property x) + { return m_graph[x.value]; } + + template + typename graph::detail::bundled_result::type const& + operator[](local_property x) const + { return m_graph[x.value]; } + + // Global property access returns the global property associated with the + // given descriptor. This is an alias for the default bundled property + // access operations. + template + typename graph::detail::bundled_result::type& + operator[](global_property x) + { return (*this)[x.value]; } + + template + typename graph::detail::bundled_result::type const& + operator[](global_property x) const + { return (*this)[x.value]; } + +#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES + + // private: + typedef typename property_map::type EdgeIndexMap; + typedef typename property_traits::value_type edge_index_type; + BOOST_STATIC_ASSERT((!is_same::value)); + +private: + typedef std::vector GlobalVertexList; + typedef std::vector GlobalEdgeList; + typedef std::map LocalVertexMap; + typedef std::map LocalEdgeMap; + // TODO: Should the LocalVertexMap be: map? + // TODO: Can we relax the indexing requirement if both descriptors are + // LessThanComparable? + // TODO: Should we really be using unorderd_map for improved lookup times? + +public: // Probably shouldn't be public.... + Graph m_graph; + subgraph* m_parent; + edge_index_type m_edge_counter; // for generating unique edge indices + ChildrenList m_children; + GlobalVertexList m_global_vertex; // local -> global + LocalVertexMap m_local_vertex; // global -> local + GlobalEdgeList m_global_edge; // local -> global + LocalEdgeMap m_local_edge; // global -> local + + edge_descriptor local_add_edge(vertex_descriptor u_local, + vertex_descriptor v_local, + edge_descriptor e_global) + { + edge_descriptor e_local; + bool inserted; + boost::tie(e_local, inserted) = add_edge(u_local, v_local, m_graph); + put(edge_index, m_graph, e_local, m_edge_counter++); + m_global_edge.push_back(e_global); + m_local_edge[get(get(edge_index, this->root()), e_global)] = e_local; + return e_local; + } +}; + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES +// TODO: I don't think these are required since the default metafunction +// returns Graph::vertex_bundled. +template +struct vertex_bundle_type > + : vertex_bundle_type +{ }; + +template +struct edge_bundle_type > + : edge_bundle_type +{ }; +#endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES + +//=========================================================================== +// Functions special to the Subgraph Class + +template +typename subgraph::vertex_descriptor +add_vertex(typename subgraph::vertex_descriptor u_global, + subgraph& g) +{ + assert(!g.is_root()); + typename subgraph::vertex_descriptor u_local, v_global, uu_global; + typename subgraph::edge_descriptor e_global; + + u_local = add_vertex(g.m_graph); + g.m_global_vertex.push_back(u_global); + g.m_local_vertex[u_global] = u_local; + + subgraph& r = g.root(); + + // remember edge global and local maps + { + typename subgraph::out_edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = out_edges(u_global, r); + ei != ei_end; ++ei) { + e_global = *ei; + v_global = target(e_global, r); + if (g.find_vertex(v_global).second == true) + g.local_add_edge(u_local, g.global_to_local(v_global), e_global); + } + } + if (is_directed(g)) { // not necessary for undirected graph + typename subgraph::vertex_iterator vi, vi_end; + typename subgraph::out_edge_iterator ei, ei_end; + for(boost::tie(vi, vi_end) = vertices(r); vi != vi_end; ++vi) { + v_global = *vi; + if(g.find_vertex(v_global).second) + for(boost::tie(ei, ei_end) = out_edges(*vi, r); ei != ei_end; ++ei) { + e_global = *ei; + uu_global = target(e_global, r); + if(uu_global == u_global && g.find_vertex(v_global).second) { + g.local_add_edge(g.global_to_local(v_global), u_local, e_global); + } + } + } + } + + return u_local; +} + +// NOTE: Descriptors are local unless otherwise noted. + +//=========================================================================== +// Functions required by the IncidenceGraph concept + +template +std::pair::out_edge_iterator, + typename graph_traits::out_edge_iterator> +out_edges(typename graph_traits::vertex_descriptor v, const subgraph& g) +{ return out_edges(v, g.m_graph); } + +template +typename graph_traits::degree_size_type +out_degree(typename graph_traits::vertex_descriptor v, const subgraph& g) +{ return out_degree(v, g.m_graph); } + +template +typename graph_traits::vertex_descriptor +source(typename graph_traits::edge_descriptor e, const subgraph& g) +{ return source(e, g.m_graph); } + +template +typename graph_traits::vertex_descriptor +target(typename graph_traits::edge_descriptor e, const subgraph& g) +{ return target(e, g.m_graph); } + +//=========================================================================== +// Functions required by the BidirectionalGraph concept + +template +std::pair::in_edge_iterator, + typename graph_traits::in_edge_iterator> +in_edges(typename graph_traits::vertex_descriptor v, const subgraph& g) +{ return in_edges(v, g.m_graph); } + +template +typename graph_traits::degree_size_type +in_degree(typename graph_traits::vertex_descriptor v, const subgraph& g) +{ return in_degree(v, g.m_graph); } + +template +typename graph_traits::degree_size_type +degree(typename graph_traits::vertex_descriptor v, const subgraph& g) +{ return degree(v, g.m_graph); } + +//=========================================================================== +// Functions required by the AdjacencyGraph concept + +template +std::pair::adjacency_iterator, + typename subgraph::adjacency_iterator> +adjacent_vertices(typename subgraph::vertex_descriptor v, const subgraph& g) +{ return adjacent_vertices(v, g.m_graph); } + +//=========================================================================== +// Functions required by the VertexListGraph concept + +template +std::pair::vertex_iterator, + typename subgraph::vertex_iterator> +vertices(const subgraph& g) +{ return vertices(g.m_graph); } + +template +typename subgraph::vertices_size_type +num_vertices(const subgraph& g) +{ return num_vertices(g.m_graph); } + +//=========================================================================== +// Functions required by the EdgeListGraph concept + +template +std::pair::edge_iterator, + typename subgraph::edge_iterator> +edges(const subgraph& g) +{ return edges(g.m_graph); } + +template +typename subgraph::edges_size_type +num_edges(const subgraph& g) +{ return num_edges(g.m_graph); } + +//=========================================================================== +// Functions required by the AdjacencyMatrix concept + +template +std::pair::edge_descriptor, bool> +edge(typename subgraph::vertex_descriptor u, + typename subgraph::vertex_descriptor v, + const subgraph& g) +{ return edge(u, v, g.m_graph); } + +//=========================================================================== +// Functions required by the MutableGraph concept + +namespace detail { + + template + void add_edge_recur_down(Vertex u_global, Vertex v_global, Edge e_global, + subgraph& g); + + template + void children_add_edge(Vertex u_global, Vertex v_global, Edge e_global, + Children& c, subgraph* orig) + { + for(typename Children::iterator i = c.begin(); i != c.end(); ++i) { + if ((*i)->find_vertex(u_global).second && + (*i)->find_vertex(v_global).second) + { + add_edge_recur_down(u_global, v_global, e_global, **i, orig); + } + } + } + + template + void add_edge_recur_down(Vertex u_global, Vertex v_global, Edge e_global, + subgraph& g, subgraph* orig) + { + if(&g != orig ) { + // add local edge only if u_global and v_global are in subgraph g + Vertex u_local, v_local; + bool u_in_subgraph, v_in_subgraph; + boost::tie(u_local, u_in_subgraph) = g.find_vertex(u_global); + boost::tie(v_local, v_in_subgraph) = g.find_vertex(v_global); + if(u_in_subgraph && v_in_subgraph) { + g.local_add_edge(u_local, v_local, e_global); + } + } + children_add_edge(u_global, v_global, e_global, g.m_children, orig); + } + + template + std::pair::edge_descriptor, bool> + add_edge_recur_up(Vertex u_global, Vertex v_global, + const typename Graph::edge_property_type& ep, + subgraph& g, subgraph* orig) + { + if(g.is_root()) { + typename subgraph::edge_descriptor e_global; + bool inserted; + boost::tie(e_global, inserted) = add_edge(u_global, v_global, ep, g.m_graph); + put(edge_index, g.m_graph, e_global, g.m_edge_counter++); + g.m_global_edge.push_back(e_global); + children_add_edge(u_global, v_global, e_global, g.m_children, orig); + return std::make_pair(e_global, inserted); + } else { + return add_edge_recur_up(u_global, v_global, ep, *g.m_parent, orig); + } + } + +} // namespace detail + +// Add an edge to the subgraph g, specified by the local vertex descriptors u +// and v. In addition, the edge will be added to any (all) other subgraphs that +// contain vertex descriptors u and v. + +template +std::pair::edge_descriptor, bool> +add_edge(typename subgraph::vertex_descriptor u, + typename subgraph::vertex_descriptor v, + const typename G::edge_property_type& ep, + subgraph& g) +{ + if (g.is_root()) { + // u and v are really global + return detail::add_edge_recur_up(u, v, ep, g, &g); + } else { + typename subgraph::edge_descriptor e_local, e_global; + bool inserted; + boost::tie(e_global, inserted) = + detail::add_edge_recur_up(g.local_to_global(u), + g.local_to_global(v), + ep, g, &g); + e_local = g.local_add_edge(u, v, e_global); + return std::make_pair(e_local, inserted); + } +} + +template +std::pair::edge_descriptor, bool> +add_edge(typename subgraph::vertex_descriptor u, + typename subgraph::vertex_descriptor v, + subgraph& g) +{ return add_edge(u, v, typename G::edge_property_type(), g); } + +namespace detail { + //------------------------------------------------------------------------- + // implementation of remove_edge(u,v,g) + template + void remove_edge_recur_down(Vertex u_global, Vertex v_global, + subgraph& g); + + template + void children_remove_edge(Vertex u_global, Vertex v_global, + Children& c) + { + for(typename Children::iterator i = c.begin(); i != c.end(); ++i) { + if((*i)->find_vertex(u_global).second && + (*i)->find_vertex(v_global).second) + { + remove_edge_recur_down(u_global, v_global, **i); + } + } + } + + template + void remove_edge_recur_down(Vertex u_global, Vertex v_global, + subgraph& g) + { + Vertex u_local, v_local; + u_local = g.m_local_vertex[u_global]; + v_local = g.m_local_vertex[v_global]; + remove_edge(u_local, v_local, g.m_graph); + children_remove_edge(u_global, v_global, g.m_children); + } + + template + void remove_edge_recur_up(Vertex u_global, Vertex v_global, + subgraph& g) + { + if(g.is_root()) { + remove_edge(u_global, v_global, g.m_graph); + children_remove_edge(u_global, v_global, g.m_children); + } else { + remove_edge_recur_up(u_global, v_global, *g.m_parent); + } + } + + //------------------------------------------------------------------------- + // implementation of remove_edge(e,g) + template + void remove_edge_recur_down(Edge e_global, subgraph& g); + + template + void children_remove_edge(Edge e_global, Children& c) + { + for(typename Children::iterator i = c.begin(); i != c.end(); ++i) { + if((*i)->find_vertex(source(e_global, **i)).second && + (*i)->find_vertex(target(e_global, **i)).second) + { + remove_edge_recur_down(source(e_global, **i), + target(e_global, **i), + **i); + } + } + } + + template + void remove_edge_recur_down(Edge e_global, subgraph& g) + { + remove_edge(g.global_to_local(e_global), g.m_graph); + children_remove_edge(e_global, g.m_children); + } + + template + void remove_edge_recur_up(Edge e_global, subgraph& g) + { + if (g.is_root()) { + remove_edge(e_global, g.m_graph); + children_remove_edge(e_global, g.m_children); + } else { + remove_edge_recur_up(e_global, *g.m_parent); + } + } + +} // namespace detail + +template +void +remove_edge(typename subgraph::vertex_descriptor u, + typename subgraph::vertex_descriptor v, + subgraph& g) +{ + if(g.is_root()) { + detail::remove_edge_recur_up(u, v, g); + } else { + detail::remove_edge_recur_up(g.local_to_global(u), + g.local_to_global(v), g); + } +} + +template +void +remove_edge(typename subgraph::edge_descriptor e, subgraph& g) +{ + if(g.is_root()) { + detail::remove_edge_recur_up(e, g); + } else { + detail::remove_edge_recur_up(g.local_to_global(e), g); + } +} + +// This is slow, but there may not be a good way to do it safely otherwise +template +void +remove_edge_if(Predicate p, subgraph& g) { + while (true) { + bool any_removed = false; + typedef typename subgraph::edge_iterator ei_type; + for (std::pair ep = edges(g); + ep.first != ep.second; ++ep.first) { + if (p(*ep.first)) { + any_removed = true; + remove_edge(*ep.first, g); + continue; /* Since iterators may be invalidated */ + } + } + if (!any_removed) break; + } +} + +template +void +clear_vertex(typename subgraph::vertex_descriptor v, subgraph& g) { + while (true) { + typedef typename subgraph::out_edge_iterator oei_type; + std::pair p = out_edges(v, g); + if (p.first == p.second) break; + remove_edge(*p.first, g); + } +} + +namespace detail { + template + typename subgraph::vertex_descriptor + add_vertex_recur_up(subgraph& g) + { + typename subgraph::vertex_descriptor u_local, u_global; + if (g.is_root()) { + u_global = add_vertex(g.m_graph); + g.m_global_vertex.push_back(u_global); + } else { + u_global = add_vertex_recur_up(*g.m_parent); + u_local = add_vertex(g.m_graph); + g.m_global_vertex.push_back(u_global); + g.m_local_vertex[u_global] = u_local; + } + return u_global; + } +} // namespace detail + +template +typename subgraph::vertex_descriptor +add_vertex(subgraph& g) +{ + typename subgraph::vertex_descriptor u_local, u_global; + if(g.is_root()) { + u_global = add_vertex(g.m_graph); + g.m_global_vertex.push_back(u_global); + u_local = u_global; + } else { + u_global = detail::add_vertex_recur_up(g.parent()); + u_local = add_vertex(g.m_graph); + g.m_global_vertex.push_back(u_global); + g.m_local_vertex[u_global] = u_local; + } + return u_local; +} + + +#if 0 +// TODO: Under Construction +template +void remove_vertex(typename subgraph::vertex_descriptor u, subgraph& g) +{ assert(false); } +#endif + +//=========================================================================== +// Functions required by the PropertyGraph concept + +/** + * The global property map returns the global properties associated with local + * descriptors. + */ +template +class subgraph_global_property_map + : public put_get_helper< + typename property_traits::reference, + subgraph_global_property_map + > +{ + typedef property_traits Traits; +public: + typedef typename Traits::category category; + typedef typename Traits::value_type value_type; + typedef typename Traits::key_type key_type; + typedef typename Traits::reference reference; + + subgraph_global_property_map() + { } + + subgraph_global_property_map(GraphPtr g) + : m_g(g) + { } + + reference operator[](key_type e) const { + PropertyMap pmap = get(Tag(), m_g->root().m_graph); + return m_g->is_root() + ? pmap[e] + : pmap[m_g->local_to_global(e)]; + } + + GraphPtr m_g; +}; + +/** + * The local property map returns the local property associated with the local + * descriptors. + */ +template +class subgraph_local_property_map + : public put_get_helper< + typename property_traits::reference, + subgraph_local_property_map + > +{ + typedef property_traits Traits; +public: + typedef typename Traits::category category; + typedef typename Traits::value_type value_type; + typedef typename Traits::key_type key_type; + typedef typename Traits::reference reference; + + typedef Tag tag; + typedef PropertyMap pmap; + + subgraph_local_property_map() + { } + + subgraph_local_property_map(GraphPtr g) + : m_g(g) + { } + + reference operator[](key_type e) const { + // Get property map on the underlying graph. + PropertyMap pmap = get(Tag(), m_g->m_graph); + return pmap[e]; + } + + GraphPtr m_g; +}; + +namespace detail { + // Extract the actual tags from local or global property maps so we don't + // try to find non-properties. + template struct extract_lg_tag { typedef P type; }; + template struct extract_lg_tag< local_property

> { + typedef P type; + }; + template struct extract_lg_tag< global_property

> { + typedef P type; + }; + + // NOTE: Mysterious Property template parameter unused in both metafunction + // classes. + struct subgraph_global_pmap { + template + struct bind_ { + typedef typename SubGraph::graph_type Graph; + typedef SubGraph* SubGraphPtr; + typedef const SubGraph* const_SubGraphPtr; + typedef typename extract_lg_tag::type TagType; + typedef typename property_map::type PMap; + typedef typename property_map::const_type const_PMap; + public: + typedef subgraph_global_property_map type; + typedef subgraph_global_property_map + const_type; + }; + }; + + struct subgraph_local_pmap { + template + struct bind_ { + typedef typename SubGraph::graph_type Graph; + typedef SubGraph* SubGraphPtr; + typedef const SubGraph* const_SubGraphPtr; + typedef typename extract_lg_tag::type TagType; + typedef typename property_map::type PMap; + typedef typename property_map::const_type const_PMap; + public: + typedef subgraph_local_property_map type; + typedef subgraph_local_property_map + const_type; + }; + }; + + // These metafunctions select the corresponding metafunctions above, and + // are used by the choose_pmap metafunction below to specialize the choice + // of local/global property map. By default, we defer to the global + // property. + template + struct subgraph_choose_pmap_helper { + typedef subgraph_global_pmap type; + }; + template + struct subgraph_choose_pmap_helper< local_property > { + typedef subgraph_local_pmap type; + }; + template + struct subgraph_choose_pmap_helper< global_property > { + typedef subgraph_global_pmap type; + }; + + // As above, unless we're requesting vertex_index_t. Then it's always a + // local property map. This enables the correct translation of descriptors + // between local and global layers. + template <> + struct subgraph_choose_pmap_helper { + typedef subgraph_local_pmap type; + }; + template <> + struct subgraph_choose_pmap_helper< local_property > { + typedef subgraph_local_pmap type; + }; + template <> + struct subgraph_choose_pmap_helper< global_property > { + typedef subgraph_local_pmap type; + }; + + // Determine the kind of property. If SameType, then + // the property lookup is always local. Otherwise, the lookup is global. + // NOTE: Property parameter is basically unused. + template + struct subgraph_choose_pmap { + typedef typename subgraph_choose_pmap_helper::type Helper; + typedef typename Helper::template bind_ Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + + // Used by the vertex/edge property selectors to determine the kind(s) of + // property maps used by the property_map type generator. + struct subgraph_property_generator { + template + struct bind_ { + typedef subgraph_choose_pmap Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + }; + + } // namespace detail + +template <> +struct vertex_property_selector { + typedef detail::subgraph_property_generator type; +}; + +template <> +struct edge_property_selector { + typedef detail::subgraph_property_generator type; +}; + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES +/** @internal + * This property map implements local or global bundled property access on + * an underlying graph. The LocalGlobal template template parameter must be + * one of the local_property or global_property templates. + */ +template < + typename Graph, typename Descriptor, typename Bundle, typename T, + template class LocalGlobal> +struct subgraph_lg_bundle_property_map + : put_get_helper< + T&, + subgraph_lg_bundle_property_map + > +{ +private: + typedef LocalGlobal Wrap; +public: + typedef Descriptor key_type; + typedef typename remove_const::type value_type; + typedef T& reference; + typedef lvalue_property_map_tag category; + + subgraph_lg_bundle_property_map() + { } + + subgraph_lg_bundle_property_map(Graph* g, T Bundle::* p) + : m_g(g), m_prop(p) + { } + + reference operator[](key_type k) const + { return (*m_g)[Wrap(k)].*m_prop; } + +private: + Graph* m_g; + T Bundle::* m_prop; +}; + +// Specialize the property map template to generate bundled property maps. +// NOTE: I'm cheating (actually double-dipping) with the local/global subgraph +// property templates. I'm not using them store descriptors, just specialize +// the property map template for specific lookups. +namespace graph_detail { + // Help decoding some of the types required for property map definitions. + template + struct bundled_subgraph_pmap_helper { + typedef subgraph Subgraph; + typedef graph_traits Traits; + typedef typename Subgraph::vertex_bundled VertBundled; + typedef typename Subgraph::edge_bundled EdgeBundled; + + // Deduce the descriptor from the template params + typedef typename mpl::if_< + detail::is_vertex_bundle, + typename Traits::vertex_descriptor, typename Traits::edge_descriptor + >::type Desc; + + // Deduce the bundled property type + typedef typename mpl::if_< + detail::is_vertex_bundle, + VertBundled, EdgeBundled + >::type Prop; + }; +} // namespace graph_detail + +template +struct property_map, local_property > + : graph_detail::bundled_subgraph_pmap_helper +{ +private: + typedef graph_detail::bundled_subgraph_pmap_helper Base; + typedef typename Base::Subgraph Subgraph; + typedef typename Base::Desc Desc; + typedef typename Base::Prop Prop; +public: + typedef subgraph_lg_bundle_property_map< + Subgraph, Desc, Prop, T, local_property + > type; + typedef subgraph_lg_bundle_property_map< + Subgraph const, Desc, Prop, T const, local_property + > const_type; +}; + +template +struct property_map, global_property > + : graph_detail::bundled_subgraph_pmap_helper +{ +private: + typedef graph_detail::bundled_subgraph_pmap_helper Base; + typedef typename Base::Subgraph Subgraph; + typedef typename Base::Desc Desc; + typedef typename Base::Prop Prop; +public: + typedef subgraph_lg_bundle_property_map< + Subgraph, Desc, Prop, T, global_property + > type; + typedef subgraph_lg_bundle_property_map< + Subgraph const, Desc, Prop, T const, global_property + > const_type; +}; +#endif + +// ================================================== +// get(p, g), get(p, g, k), and put(p, g, k, v) +// ================================================== +template +typename property_map, Property>::type +get(Property, subgraph& g) { + typedef typename property_map< subgraph, Property>::type PMap; + return PMap(&g); +} + +template +typename property_map, Property>::const_type +get(Property, const subgraph& g) { + typedef typename property_map< subgraph, Property>::const_type PMap; + return PMap(&g); +} + +template +typename property_traits< + typename property_map, Property>::const_type +>::value_type +get(Property, const subgraph& g, const Key& k) { + typedef typename property_map< subgraph, Property>::const_type PMap; + PMap pmap(&g); + return pmap[k]; +} + +template +void put(Property, subgraph& g, const Key& k, const Value& val) { + typedef typename property_map< subgraph, Property>::type PMap; + PMap pmap(&g); + pmap[k] = val; +} + +// ================================================== +// get(global(p), g) +// NOTE: get(global(p), g, k) and put(global(p), g, k, v) not supported +// ================================================== +template +typename property_map, global_property >::type +get(global_property, subgraph& g) { + typedef typename property_map< + subgraph, global_property + >::type Map; + return Map(&g); +} + +template +typename property_map, global_property >::const_type +get(global_property, const subgraph& g) { + typedef typename property_map< + subgraph, global_property + >::const_type Map; + return Map(&g); +} + +// ================================================== +// get(local(p), g) +// NOTE: get(local(p), g, k) and put(local(p), g, k, v) not supported +// ================================================== +template +typename property_map, local_property >::type +get(local_property, subgraph& g) { + typedef typename property_map< + subgraph, local_property + >::type Map; + return Map(&g); +} + +template +typename property_map, local_property >::const_type +get(local_property, const subgraph& g) { + typedef typename property_map< + subgraph, local_property + >::const_type Map; + return Map(&g); +} + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES +// ================================================== +// get(bundle(p), g) +// ================================================== + +template +inline typename property_map, T Bundle::*>::type +get(T Bundle::* p, subgraph& g) { + typedef typename property_map, T Bundle::*>::type Map; + return Map(&g, p); +} + +template +inline typename property_map, T Bundle::*>::const_type +get(T Bundle::* p, subgraph const& g) { + typedef typename property_map, T Bundle::*>::const_type Map; + return Map(&g, p); +} + +template +inline Type get(Type Bundle::* p, subgraph const& g, Key const& k) +{ return get(get(p, g), k); } + +template +inline void put(Type Bundle::* p, Graph& g, Key const& k, Value const& v) +{ put(get(p, g), k, v); } + +// ========================================================= +// Local bundled, get + +template +inline typename property_map< + subgraph, local_property +>::type +get(local_property p, subgraph& g) { + typedef typename property_map< + subgraph, local_property + >::type Map; + return Map(&g, p.value); +} + +template +inline typename property_map< + subgraph, local_property +>::const_type +get(local_property p, subgraph const& g) { + typedef typename property_map< + subgraph, local_property + >::const_type Map; + return Map(&g, p.value); +} + +template +inline Type get(local_property p, subgraph const& g, + Key const& k) +{ return get(get(p, g), k); } + +// ========================================================= +// Global bundled, get + +template +inline typename property_map< + subgraph, global_property +>::type +get(global_property p, subgraph& g) { + typedef typename property_map< + subgraph, global_property + >::type Map; + return Map(&g, p.value); +} + +template +inline typename property_map< + subgraph, global_property +>::const_type +get(global_property p, subgraph const& g) { + typedef typename property_map< + subgraph, global_property + >::const_type Map; + return Map(&g, p.value); +} + +template +inline Type get(global_property p, subgraph const& g, + Key const& k) +{ return get(get(p, g), k); } + +#endif + +template +inline typename graph_property::type& +get_property(subgraph& g, Tag tag) { + return get_property(g.m_graph, tag); +} + +template +inline const typename graph_property::type& +get_property(const subgraph& g, Tag tag) { + return get_property(g.m_graph, tag); +} + +//=========================================================================== +// Miscellaneous Functions + +template +typename subgraph::vertex_descriptor +vertex(typename subgraph::vertices_size_type n, const subgraph& g) +{ return vertex(n, g.m_graph); } + +//=========================================================================== +// Mutability Traits +// Just pull the mutability traits form the underlying graph. Note that this +// will probably fail (badly) for labeled graphs. +template +struct graph_mutability_traits< subgraph > { + typedef typename graph_mutability_traits::category category; +}; + +} // namespace boost + +#endif // BOOST_SUBGRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/tiernan_all_cycles.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/tiernan_all_cycles.hpp new file mode 100644 index 0000000000..f750eb1779 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/tiernan_all_cycles.hpp @@ -0,0 +1,376 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_CYCLE_HPP +#define BOOST_GRAPH_CYCLE_HPP + +#include + +#include +#include +#include +#include + +#include +namespace boost { + namespace concepts { + BOOST_concept(CycleVisitor,(Visitor)(Path)(Graph)) + { + BOOST_CONCEPT_USAGE(CycleVisitor) + { + vis.cycle(p, g); + } + private: + Visitor vis; + Graph g; + Path p; + }; + } /* namespace concepts */ +using concepts::CycleVisitorConcept; +} /* namespace boost */ +#include + + +namespace boost +{ + +// The implementation of this algorithm is a reproduction of the Teirnan +// approach for directed graphs: bibtex follows +// +// @article{362819, +// author = {James C. Tiernan}, +// title = {An efficient search algorithm to find the elementary circuits of a graph}, +// journal = {Commun. ACM}, +// volume = {13}, +// number = {12}, +// year = {1970}, +// issn = {0001-0782}, +// pages = {722--726}, +// doi = {http://doi.acm.org/10.1145/362814.362819}, +// publisher = {ACM Press}, +// address = {New York, NY, USA}, +// } +// +// It should be pointed out that the author does not provide a complete analysis for +// either time or space. This is in part, due to the fact that it's a fairly input +// sensitive problem related to the density and construction of the graph, not just +// its size. +// +// I've also taken some liberties with the interpretation of the algorithm - I've +// basically modernized it to use real data structures (no more arrays and matrices). +// Oh... and there's explicit control structures - not just gotos. +// +// The problem is definitely NP-complete, an an unbounded implementation of this +// will probably run for quite a while on a large graph. The conclusions +// of this paper also reference a Paton algorithm for undirected graphs as being +// much more efficient (apparently based on spanning trees). Although not implemented, +// it can be found here: +// +// @article{363232, +// author = {Keith Paton}, +// title = {An algorithm for finding a fundamental set of cycles of a graph}, +// journal = {Commun. ACM}, +// volume = {12}, +// number = {9}, +// year = {1969}, +// issn = {0001-0782}, +// pages = {514--518}, +// doi = {http://doi.acm.org/10.1145/363219.363232}, +// publisher = {ACM Press}, +// address = {New York, NY, USA}, +// } + +/** + * The default cycle visitor providse an empty visit function for cycle + * visitors. + */ +struct cycle_visitor +{ + template + inline void cycle(const Path& p, const Graph& g) + { } +}; + +/** + * The min_max_cycle_visitor simultaneously records the minimum and maximum + * cycles in a graph. + */ +struct min_max_cycle_visitor +{ + min_max_cycle_visitor(std::size_t& min_, std::size_t& max_) + : minimum(min_), maximum(max_) + { } + + template + inline void cycle(const Path& p, const Graph& g) + { + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + std::size_t len = p.size(); + minimum = min BOOST_PREVENT_MACRO_SUBSTITUTION (minimum, len); + maximum = max BOOST_PREVENT_MACRO_SUBSTITUTION (maximum, len); + } + std::size_t& minimum; + std::size_t& maximum; +}; + +inline min_max_cycle_visitor +find_min_max_cycle(std::size_t& min_, std::size_t& max_) +{ return min_max_cycle_visitor(min_, max_); } + +namespace detail +{ + template + inline bool + is_vertex_in_path(const Graph&, + typename graph_traits::vertex_descriptor v, + const Path& p) + { + return (std::find(p.begin(), p.end(), v) != p.end()); + } + + template + inline bool + is_path_closed(const Graph& g, + typename graph_traits::vertex_descriptor u, + typename graph_traits::vertex_descriptor v, + const ClosedMatrix& closed) + { + // the path from u to v is closed if v can be found in the list + // of closed vertices associated with u. + typedef typename ClosedMatrix::const_reference Row; + Row r = closed[get(vertex_index, g, u)]; + if(find(r.begin(), r.end(), v) != r.end()) { + return true; + } + return false; + } + + template + inline bool + can_extend_path(const Graph& g, + typename graph_traits::edge_descriptor e, + const Path& p, + const ClosedMatrix& m) + { + function_requires< IncidenceGraphConcept >(); + function_requires< VertexIndexGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + + // get the vertices in question + Vertex + u = source(e, g), + v = target(e, g); + + // conditions for allowing a traversal along this edge are: + // 1. the index of v must be greater than that at which the + // the path is rooted (p.front()). + // 2. the vertex v cannot already be in the path + // 3. the vertex v cannot be closed to the vertex u + + bool indices = get(vertex_index, g, p.front()) < get(vertex_index, g, v); + bool path = !is_vertex_in_path(g, v, p); + bool closed = !is_path_closed(g, u, v, m); + return indices && path && closed; + } + + template + inline bool + can_wrap_path(const Graph& g, const Path& p) + { + function_requires< IncidenceGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::out_edge_iterator OutIterator; + + // iterate over the out-edges of the back, looking for the + // front of the path. also, we can't travel along the same + // edge that we did on the way here, but we don't quite have the + // stringent requirements that we do in can_extend_path(). + Vertex + u = p.back(), + v = p.front(); + OutIterator i, end; + for(tie(i, end) = out_edges(u, g); i != end; ++i) { + if((target(*i, g) == v)) { + return true; + } + } + return false; + } + + template + inline typename graph_traits::vertex_descriptor + extend_path(const Graph& g, + Path& p, + ClosedMatrix& closed) + { + function_requires< IncidenceGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + typedef typename graph_traits::out_edge_iterator OutIterator; + + // get the current vertex + Vertex u = p.back(); + Vertex ret = graph_traits::null_vertex(); + + // AdjacencyIterator i, end; + OutIterator i, end; + for(tie(i, end) = out_edges(u, g); i != end; ++i) { + Vertex v = target(*i, g); + + // if we can actually extend along this edge, + // then that's what we want to do + if(can_extend_path(g, *i, p, closed)) { + p.push_back(v); // add the vertex to the path + ret = v; + break; + } + } + return ret; + } + + template + inline bool + exhaust_paths(const Graph& g, Path& p, ClosedMatrix& closed) + { + function_requires< GraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + + // if there's more than one vertex in the path, this closes + // of some possible routes and returns true. otherwise, if there's + // only one vertex left, the vertex has been used up + if(p.size() > 1) { + // get the last and second to last vertices, popping the last + // vertex off the path + Vertex last, prev; + last = p.back(); + p.pop_back(); + prev = p.back(); + + // reset the closure for the last vertex of the path and + // indicate that the last vertex in p is now closed to + // the next-to-last vertex in p + closed[get(vertex_index, g, last)].clear(); + closed[get(vertex_index, g, prev)].push_back(last); + return true; + } + else { + return false; + } + } + + template + inline void + all_cycles_from_vertex(const Graph& g, + typename graph_traits::vertex_descriptor v, + Visitor vis, + std::size_t minlen, + std::size_t maxlen) + { + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef std::vector Path; + function_requires< CycleVisitorConcept >(); + typedef std::vector VertexList; + typedef std::vector ClosedMatrix; + + Path p; + ClosedMatrix closed(num_vertices(g), VertexList()); + Vertex null = graph_traits::null_vertex(); + + // each path investigation starts at the ith vertex + p.push_back(v); + + while(1) { + // extend the path until we've reached the end or the + // maxlen-sized cycle + Vertex j = null; + while(((j = detail::extend_path(g, p, closed)) != null) + && (p.size() < maxlen)) + ; // empty loop + + // if we're done extending the path and there's an edge + // connecting the back to the front, then we should have + // a cycle. + if(detail::can_wrap_path(g, p) && p.size() >= minlen) { + vis.cycle(p, g); + } + + if(!detail::exhaust_paths(g, p, closed)) { + break; + } + } + } + + // Select the minimum allowable length of a cycle based on the directedness + // of the graph - 2 for directed, 3 for undirected. + template struct min_cycles { enum { value = 2 }; }; + template <> struct min_cycles { enum { value = 3 }; }; +} /* namespace detail */ + +template +inline void +tiernan_all_cycles(const Graph& g, + Visitor vis, + std::size_t minlen, + std::size_t maxlen) +{ + function_requires< VertexListGraphConcept >(); + typedef typename graph_traits::vertex_iterator VertexIterator; + + VertexIterator i, end; + for(tie(i, end) = vertices(g); i != end; ++i) { + detail::all_cycles_from_vertex(g, *i, vis, minlen, maxlen); + } +} + +template +inline void +tiernan_all_cycles(const Graph& g, Visitor vis, std::size_t maxlen) +{ + typedef typename graph_traits::directed_category Dir; + tiernan_all_cycles(g, vis, detail::min_cycles

::value, maxlen); +} + +template +inline void +tiernan_all_cycles(const Graph& g, Visitor vis) +{ + typedef typename graph_traits::directed_category Dir; + tiernan_all_cycles(g, vis, detail::min_cycles::value, + (std::numeric_limits::max)()); +} + +template +inline std::pair +tiernan_girth_and_circumference(const Graph& g) +{ + std::size_t + min_ = (std::numeric_limits::max)(), + max_ = 0; + tiernan_all_cycles(g, find_min_max_cycle(min_, max_)); + + // if this is the case, the graph is acyclic... + if(max_ == 0) max_ = min_; + + return std::make_pair(min_, max_); +} + +template +inline std::size_t +tiernan_girth(const Graph& g) +{ return tiernan_girth_and_circumference(g).first; } + +template +inline std::size_t +tiernan_circumference(const Graph& g) +{ return tiernan_girth_and_circumference(g).second; } + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/topological_sort.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/topological_sort.hpp new file mode 100644 index 0000000000..08baf69b89 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/topological_sort.hpp @@ -0,0 +1,77 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_TOPOLOGICAL_SORT_HPP +#define BOOST_GRAPH_TOPOLOGICAL_SORT_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + + + // Topological sort visitor + // + // This visitor merely writes the linear ordering into an + // OutputIterator. The OutputIterator could be something like an + // ostream_iterator, or it could be a back/front_insert_iterator. + // Note that if it is a back_insert_iterator, the recorded order is + // the reverse topological order. On the other hand, if it is a + // front_insert_iterator, the recorded order is the topological + // order. + // + template + struct topo_sort_visitor : public dfs_visitor<> + { + topo_sort_visitor(OutputIterator _iter) + : m_iter(_iter) { } + + template + void back_edge(const Edge&, Graph&) { BOOST_THROW_EXCEPTION(not_a_dag()); } + + template + void finish_vertex(const Vertex& u, Graph&) { *m_iter++ = u; } + + OutputIterator m_iter; + }; + + + // Topological Sort + // + // The topological sort algorithm creates a linear ordering + // of the vertices such that if edge (u,v) appears in the graph, + // then u comes before v in the ordering. The graph must + // be a directed acyclic graph (DAG). The implementation + // consists mainly of a call to depth-first search. + // + + template + void topological_sort(VertexListGraph& g, OutputIterator result, + const bgl_named_params& params) + { + typedef topo_sort_visitor TopoVisitor; + depth_first_search(g, params.visitor(TopoVisitor(result))); + } + + template + void topological_sort(VertexListGraph& g, OutputIterator result) + { + topological_sort(g, result, + bgl_named_params(0)); // bogus + } + +} // namespace boost + +#endif /*BOOST_GRAPH_TOPOLOGICAL_SORT_H*/ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/topology.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/topology.hpp new file mode 100644 index 0000000000..ada36d19ba --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/topology.hpp @@ -0,0 +1,598 @@ +// Copyright 2009 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Douglas Gregor +// Andrew Lumsdaine +#ifndef BOOST_GRAPH_TOPOLOGY_HPP +#define BOOST_GRAPH_TOPOLOGY_HPP + +#include +#include +#include +#include +#include // For root_two +#include +#include // For BOOST_STATIC_CONSTANT +#include + +// Classes and concepts to represent points in a space, with distance and move +// operations (used for Gurson-Atun layout), plus other things like bounding +// boxes used for other layout algorithms. + +namespace boost { + +/*********************************************************** + * Topologies * + ***********************************************************/ +template +class convex_topology +{ + public: // For VisualAge C++ + struct point + { + BOOST_STATIC_CONSTANT(std::size_t, dimensions = Dims); + point() { } + double& operator[](std::size_t i) {return values[i];} + const double& operator[](std::size_t i) const {return values[i];} + + private: + double values[Dims]; + }; + + public: // For VisualAge C++ + struct point_difference + { + BOOST_STATIC_CONSTANT(std::size_t, dimensions = Dims); + point_difference() { + for (std::size_t i = 0; i < Dims; ++i) values[i] = 0.; + } + double& operator[](std::size_t i) {return values[i];} + const double& operator[](std::size_t i) const {return values[i];} + + friend point_difference operator+(const point_difference& a, const point_difference& b) { + point_difference result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = a[i] + b[i]; + return result; + } + + friend point_difference& operator+=(point_difference& a, const point_difference& b) { + for (std::size_t i = 0; i < Dims; ++i) + a[i] += b[i]; + return a; + } + + friend point_difference operator-(const point_difference& a) { + point_difference result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = -a[i]; + return result; + } + + friend point_difference operator-(const point_difference& a, const point_difference& b) { + point_difference result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = a[i] - b[i]; + return result; + } + + friend point_difference& operator-=(point_difference& a, const point_difference& b) { + for (std::size_t i = 0; i < Dims; ++i) + a[i] -= b[i]; + return a; + } + + friend point_difference operator*(const point_difference& a, const point_difference& b) { + point_difference result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = a[i] * b[i]; + return result; + } + + friend point_difference operator*(const point_difference& a, double b) { + point_difference result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = a[i] * b; + return result; + } + + friend point_difference operator*(double a, const point_difference& b) { + point_difference result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = a * b[i]; + return result; + } + + friend point_difference operator/(const point_difference& a, const point_difference& b) { + point_difference result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = (b[i] == 0.) ? 0. : a[i] / b[i]; + return result; + } + + friend double dot(const point_difference& a, const point_difference& b) { + double result = 0; + for (std::size_t i = 0; i < Dims; ++i) + result += a[i] * b[i]; + return result; + } + + private: + double values[Dims]; + }; + + public: + typedef point point_type; + typedef point_difference point_difference_type; + + double distance(point a, point b) const + { + double dist = 0.; + for (std::size_t i = 0; i < Dims; ++i) { + double diff = b[i] - a[i]; + dist = boost::math::hypot(dist, diff); + } + // Exact properties of the distance are not important, as long as + // < on what this returns matches real distances; l_2 is used because + // Fruchterman-Reingold also uses this code and it relies on l_2. + return dist; + } + + point move_position_toward(point a, double fraction, point b) const + { + point result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = a[i] + (b[i] - a[i]) * fraction; + return result; + } + + point_difference difference(point a, point b) const { + point_difference result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = a[i] - b[i]; + return result; + } + + point adjust(point a, point_difference delta) const { + point result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = a[i] + delta[i]; + return result; + } + + point pointwise_min(point a, point b) const { + BOOST_USING_STD_MIN(); + point result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = min BOOST_PREVENT_MACRO_SUBSTITUTION (a[i], b[i]); + return result; + } + + point pointwise_max(point a, point b) const { + BOOST_USING_STD_MAX(); + point result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = max BOOST_PREVENT_MACRO_SUBSTITUTION (a[i], b[i]); + return result; + } + + double norm(point_difference delta) const { + double n = 0.; + for (std::size_t i = 0; i < Dims; ++i) + n = boost::math::hypot(n, delta[i]); + return n; + } + + double volume(point_difference delta) const { + double n = 1.; + for (std::size_t i = 0; i < Dims; ++i) + n *= delta[i]; + return n; + } + +}; + +template +class hypercube_topology : public convex_topology +{ + typedef uniform_01 rand_t; + + public: + typedef typename convex_topology::point_type point_type; + typedef typename convex_topology::point_difference_type point_difference_type; + + explicit hypercube_topology(double scaling = 1.0) + : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), + scaling(scaling) + { } + + hypercube_topology(RandomNumberGenerator& gen, double scaling = 1.0) + : gen_ptr(), rand(new rand_t(gen)), scaling(scaling) { } + + point_type random_point() const + { + point_type p; + for (std::size_t i = 0; i < Dims; ++i) + p[i] = (*rand)() * scaling; + return p; + } + + point_type bound(point_type a) const + { + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + point_type p; + for (std::size_t i = 0; i < Dims; ++i) + p[i] = min BOOST_PREVENT_MACRO_SUBSTITUTION (scaling, max BOOST_PREVENT_MACRO_SUBSTITUTION (-scaling, a[i])); + return p; + } + + double distance_from_boundary(point_type a) const + { + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); +#ifndef BOOST_NO_STDC_NAMESPACE + using std::abs; +#endif + BOOST_STATIC_ASSERT (Dims >= 1); + double dist = abs(scaling - a[0]); + for (std::size_t i = 1; i < Dims; ++i) + dist = min BOOST_PREVENT_MACRO_SUBSTITUTION (dist, abs(scaling - a[i])); + return dist; + } + + point_type center() const { + point_type result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = scaling * .5; + return result; + } + + point_type origin() const { + point_type result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = 0; + return result; + } + + point_difference_type extent() const { + point_difference_type result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = scaling; + return result; + } + + private: + shared_ptr gen_ptr; + shared_ptr rand; + double scaling; +}; + +template +class square_topology : public hypercube_topology<2, RandomNumberGenerator> +{ + typedef hypercube_topology<2, RandomNumberGenerator> inherited; + + public: + explicit square_topology(double scaling = 1.0) : inherited(scaling) { } + + square_topology(RandomNumberGenerator& gen, double scaling = 1.0) + : inherited(gen, scaling) { } +}; + +template +class rectangle_topology : public convex_topology<2> +{ + typedef uniform_01 rand_t; + + public: + rectangle_topology(double left, double top, double right, double bottom) + : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), + left(std::min BOOST_PREVENT_MACRO_SUBSTITUTION (left, right)), + top(std::min BOOST_PREVENT_MACRO_SUBSTITUTION (top, bottom)), + right(std::max BOOST_PREVENT_MACRO_SUBSTITUTION (left, right)), + bottom(std::max BOOST_PREVENT_MACRO_SUBSTITUTION (top, bottom)) { } + + rectangle_topology(RandomNumberGenerator& gen, double left, double top, double right, double bottom) + : gen_ptr(), rand(new rand_t(gen)), + left(std::min BOOST_PREVENT_MACRO_SUBSTITUTION (left, right)), + top(std::min BOOST_PREVENT_MACRO_SUBSTITUTION (top, bottom)), + right(std::max BOOST_PREVENT_MACRO_SUBSTITUTION (left, right)), + bottom(std::max BOOST_PREVENT_MACRO_SUBSTITUTION (top, bottom)) { } + + typedef typename convex_topology<2>::point_type point_type; + typedef typename convex_topology<2>::point_difference_type point_difference_type; + + point_type random_point() const + { + point_type p; + p[0] = (*rand)() * (right - left) + left; + p[1] = (*rand)() * (bottom - top) + top; + return p; + } + + point_type bound(point_type a) const + { + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + point_type p; + p[0] = min BOOST_PREVENT_MACRO_SUBSTITUTION (right, max BOOST_PREVENT_MACRO_SUBSTITUTION (left, a[0])); + p[1] = min BOOST_PREVENT_MACRO_SUBSTITUTION (bottom, max BOOST_PREVENT_MACRO_SUBSTITUTION (top, a[1])); + return p; + } + + double distance_from_boundary(point_type a) const + { + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); +#ifndef BOOST_NO_STDC_NAMESPACE + using std::abs; +#endif + double dist = abs(left - a[0]); + dist = min BOOST_PREVENT_MACRO_SUBSTITUTION (dist, abs(right - a[0])); + dist = min BOOST_PREVENT_MACRO_SUBSTITUTION (dist, abs(top - a[1])); + dist = min BOOST_PREVENT_MACRO_SUBSTITUTION (dist, abs(bottom - a[1])); + return dist; + } + + point_type center() const { + point_type result; + result[0] = (left + right) / 2.; + result[1] = (top + bottom) / 2.; + return result; + } + + point_type origin() const { + point_type result; + result[0] = left; + result[1] = top; + return result; + } + + point_difference_type extent() const { + point_difference_type result; + result[0] = right - left; + result[1] = bottom - top; + return result; + } + + private: + shared_ptr gen_ptr; + shared_ptr rand; + double left, top, right, bottom; +}; + +template +class cube_topology : public hypercube_topology<3, RandomNumberGenerator> +{ + typedef hypercube_topology<3, RandomNumberGenerator> inherited; + + public: + explicit cube_topology(double scaling = 1.0) : inherited(scaling) { } + + cube_topology(RandomNumberGenerator& gen, double scaling = 1.0) + : inherited(gen, scaling) { } +}; + +template +class ball_topology : public convex_topology +{ + typedef uniform_01 rand_t; + + public: + typedef typename convex_topology::point_type point_type; + typedef typename convex_topology::point_difference_type point_difference_type; + + explicit ball_topology(double radius = 1.0) + : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), + radius(radius) + { } + + ball_topology(RandomNumberGenerator& gen, double radius = 1.0) + : gen_ptr(), rand(new rand_t(gen)), radius(radius) { } + + point_type random_point() const + { + point_type p; + double dist_sum; + do { + dist_sum = 0.0; + for (std::size_t i = 0; i < Dims; ++i) { + double x = (*rand)() * 2*radius - radius; + p[i] = x; + dist_sum += x * x; + } + } while (dist_sum > radius*radius); + return p; + } + + point_type bound(point_type a) const + { + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + double r = 0.; + for (std::size_t i = 0; i < Dims; ++i) + r = boost::math::hypot(r, a[i]); + if (r <= radius) return a; + double scaling_factor = radius / r; + point_type p; + for (std::size_t i = 0; i < Dims; ++i) + p[i] = a[i] * scaling_factor; + return p; + } + + double distance_from_boundary(point_type a) const + { + double r = 0.; + for (std::size_t i = 0; i < Dims; ++i) + r = boost::math::hypot(r, a[i]); + return radius - r; + } + + point_type center() const { + point_type result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = 0; + return result; + } + + point_type origin() const { + point_type result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = -radius; + return result; + } + + point_difference_type extent() const { + point_difference_type result; + for (std::size_t i = 0; i < Dims; ++i) + result[i] = 2. * radius; + return result; + } + + private: + shared_ptr gen_ptr; + shared_ptr rand; + double radius; +}; + +template +class circle_topology : public ball_topology<2, RandomNumberGenerator> +{ + typedef ball_topology<2, RandomNumberGenerator> inherited; + + public: + explicit circle_topology(double radius = 1.0) : inherited(radius) { } + + circle_topology(RandomNumberGenerator& gen, double radius = 1.0) + : inherited(gen, radius) { } +}; + +template +class sphere_topology : public ball_topology<3, RandomNumberGenerator> +{ + typedef ball_topology<3, RandomNumberGenerator> inherited; + + public: + explicit sphere_topology(double radius = 1.0) : inherited(radius) { } + + sphere_topology(RandomNumberGenerator& gen, double radius = 1.0) + : inherited(gen, radius) { } +}; + +template +class heart_topology +{ + // Heart is defined as the union of three shapes: + // Square w/ corners (+-1000, -1000), (0, 0), (0, -2000) + // Circle centered at (-500, -500) radius 500*sqrt(2) + // Circle centered at (500, -500) radius 500*sqrt(2) + // Bounding box (-1000, -2000) - (1000, 500*(sqrt(2) - 1)) + + struct point + { + point() { values[0] = 0.0; values[1] = 0.0; } + point(double x, double y) { values[0] = x; values[1] = y; } + + double& operator[](std::size_t i) { return values[i]; } + double operator[](std::size_t i) const { return values[i]; } + + private: + double values[2]; + }; + + bool in_heart(point p) const + { +#ifndef BOOST_NO_STDC_NAMESPACE + using std::abs; +#endif + + if (p[1] < abs(p[0]) - 2000) return false; // Bottom + if (p[1] <= -1000) return true; // Diagonal of square + if (boost::math::hypot(p[0] - -500, p[1] - -500) <= 500. * boost::math::constants::root_two()) + return true; // Left circle + if (boost::math::hypot(p[0] - 500, p[1] - -500) <= 500. * boost::math::constants::root_two()) + return true; // Right circle + return false; + } + + bool segment_within_heart(point p1, point p2) const + { + // Assumes that p1 and p2 are within the heart + if ((p1[0] < 0) == (p2[0] < 0)) return true; // Same side of symmetry line + if (p1[0] == p2[0]) return true; // Vertical + double slope = (p2[1] - p1[1]) / (p2[0] - p1[0]); + double intercept = p1[1] - p1[0] * slope; + if (intercept > 0) return false; // Crosses between circles + return true; + } + + typedef uniform_01 rand_t; + + public: + typedef point point_type; + + heart_topology() + : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)) { } + + heart_topology(RandomNumberGenerator& gen) + : gen_ptr(), rand(new rand_t(gen)) { } + + point random_point() const + { + point result; + do { + result[0] = (*rand)() * (1000 + 1000 * boost::math::constants::root_two()) - (500 + 500 * boost::math::constants::root_two()); + result[1] = (*rand)() * (2000 + 500 * (boost::math::constants::root_two() - 1)) - 2000; + } while (!in_heart(result)); + return result; + } + + // Not going to provide clipping to bounding region or distance from boundary + + double distance(point a, point b) const + { + if (segment_within_heart(a, b)) { + // Straight line + return boost::math::hypot(b[0] - a[0], b[1] - a[1]); + } else { + // Straight line bending around (0, 0) + return boost::math::hypot(a[0], a[1]) + boost::math::hypot(b[0], b[1]); + } + } + + point move_position_toward(point a, double fraction, point b) const + { + if (segment_within_heart(a, b)) { + // Straight line + return point(a[0] + (b[0] - a[0]) * fraction, + a[1] + (b[1] - a[1]) * fraction); + } else { + double distance_to_point_a = boost::math::hypot(a[0], a[1]); + double distance_to_point_b = boost::math::hypot(b[0], b[1]); + double location_of_point = distance_to_point_a / + (distance_to_point_a + distance_to_point_b); + if (fraction < location_of_point) + return point(a[0] * (1 - fraction / location_of_point), + a[1] * (1 - fraction / location_of_point)); + else + return point( + b[0] * ((fraction - location_of_point) / (1 - location_of_point)), + b[1] * ((fraction - location_of_point) / (1 - location_of_point))); + } + } + + private: + shared_ptr gen_ptr; + shared_ptr rand; +}; + +} // namespace boost + +#endif // BOOST_GRAPH_TOPOLOGY_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/transitive_closure.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/transitive_closure.hpp new file mode 100644 index 0000000000..01bfb3d304 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/transitive_closure.hpp @@ -0,0 +1,370 @@ +// Copyright (C) 2001 Vladimir Prus +// Copyright (C) 2001 Jeremy Siek +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// NOTE: this final is generated by libs/graph/doc/transitive_closure.w + +#ifndef BOOST_GRAPH_TRANSITIVE_CLOSURE_HPP +#define BOOST_GRAPH_TRANSITIVE_CLOSURE_HPP + +#include +#include // for std::min and std::max +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace detail + { + inline void + union_successor_sets(const std::vector < std::size_t > &s1, + const std::vector < std::size_t > &s2, + std::vector < std::size_t > &s3) + { + BOOST_USING_STD_MIN(); + for (std::size_t k = 0; k < s1.size(); ++k) + s3[k] = min BOOST_PREVENT_MACRO_SUBSTITUTION(s1[k], s2[k]); + } + } // namespace detail + + namespace detail + { + template < typename TheContainer, typename ST = std::size_t, + typename VT = typename TheContainer::value_type > + struct subscript_t:public std::unary_function < ST, VT > + { + typedef VT& result_type; + + subscript_t(TheContainer & c):container(&c) + { + } + VT & operator() (const ST & i) const + { + return (*container)[i]; + } + protected: + TheContainer * container; + }; + template < typename TheContainer > + subscript_t < TheContainer > subscript(TheContainer & c) { + return subscript_t < TheContainer > (c); + } + } // namespace detail + + template < typename Graph, typename GraphTC, + typename G_to_TC_VertexMap, + typename VertexIndexMap > + void transitive_closure(const Graph & g, GraphTC & tc, + G_to_TC_VertexMap g_to_tc_map, + VertexIndexMap index_map) + { + if (num_vertices(g) == 0) + return; + typedef typename graph_traits < Graph >::vertex_descriptor vertex; + typedef typename graph_traits < Graph >::edge_descriptor edge; + typedef typename graph_traits < Graph >::vertex_iterator vertex_iterator; + typedef typename property_traits < VertexIndexMap >::value_type size_type; + typedef typename graph_traits < + Graph >::adjacency_iterator adjacency_iterator; + + function_requires < VertexListGraphConcept < Graph > >(); + function_requires < AdjacencyGraphConcept < Graph > >(); + function_requires < VertexMutableGraphConcept < GraphTC > >(); + function_requires < EdgeMutableGraphConcept < GraphTC > >(); + function_requires < ReadablePropertyMapConcept < VertexIndexMap, + vertex > >(); + + typedef size_type cg_vertex; + std::vector < cg_vertex > component_number_vec(num_vertices(g)); + iterator_property_map < cg_vertex *, VertexIndexMap, cg_vertex, cg_vertex& > + component_number(&component_number_vec[0], index_map); + + int num_scc = strong_components(g, component_number, + vertex_index_map(index_map)); + + std::vector < std::vector < vertex > >components; + build_component_lists(g, num_scc, component_number, components); + + typedef std::vector > CG_t; + CG_t CG(num_scc); + for (cg_vertex s = 0; s < components.size(); ++s) { + std::vector < cg_vertex > adj; + for (size_type i = 0; i < components[s].size(); ++i) { + vertex u = components[s][i]; + adjacency_iterator v, v_end; + for (boost::tie(v, v_end) = adjacent_vertices(u, g); v != v_end; ++v) { + cg_vertex t = component_number[*v]; + if (s != t) // Avoid loops in the condensation graph + adj.push_back(t); + } + } + std::sort(adj.begin(), adj.end()); + typename std::vector::iterator di = + std::unique(adj.begin(), adj.end()); + if (di != adj.end()) + adj.erase(di, adj.end()); + CG[s] = adj; + } + + std::vector topo_order; + std::vector topo_number(num_vertices(CG)); + topological_sort(CG, std::back_inserter(topo_order), + vertex_index_map(identity_property_map())); + std::reverse(topo_order.begin(), topo_order.end()); + size_type n = 0; + for (typename std::vector::iterator iter = topo_order.begin(); + iter != topo_order.end(); ++iter) + topo_number[*iter] = n++; + + for (size_type i = 0; i < num_vertices(CG); ++i) + std::sort(CG[i].begin(), CG[i].end(), + boost::bind(std::less(), + boost::bind(detail::subscript(topo_number), _1), + boost::bind(detail::subscript(topo_number), _2))); + + std::vector > chains; + { + std::vector in_a_chain(num_vertices(CG)); + for (typename std::vector::iterator i = topo_order.begin(); + i != topo_order.end(); ++i) { + cg_vertex v = *i; + if (!in_a_chain[v]) { + chains.resize(chains.size() + 1); + std::vector& chain = chains.back(); + for (;;) { + chain.push_back(v); + in_a_chain[v] = true; + typename graph_traits::adjacency_iterator adj_first, adj_last; + boost::tie(adj_first, adj_last) = adjacent_vertices(v, CG); + typename graph_traits::adjacency_iterator next + = std::find_if(adj_first, adj_last, + std::not1(detail::subscript(in_a_chain))); + if (next != adj_last) + v = *next; + else + break; // end of chain, dead-end + + } + } + } + } + std::vector chain_number(num_vertices(CG)); + std::vector pos_in_chain(num_vertices(CG)); + for (size_type i = 0; i < chains.size(); ++i) + for (size_type j = 0; j < chains[i].size(); ++j) { + cg_vertex v = chains[i][j]; + chain_number[v] = i; + pos_in_chain[v] = j; + } + + cg_vertex inf = (std::numeric_limits< cg_vertex >::max)(); + std::vector > successors(num_vertices(CG), + std::vector + (chains.size(), inf)); + for (typename std::vector::reverse_iterator + i = topo_order.rbegin(); i != topo_order.rend(); ++i) { + cg_vertex u = *i; + typename graph_traits::adjacency_iterator adj, adj_last; + for (boost::tie(adj, adj_last) = adjacent_vertices(u, CG); + adj != adj_last; ++adj) { + cg_vertex v = *adj; + if (topo_number[v] < successors[u][chain_number[v]]) { + // Succ(u) = Succ(u) U Succ(v) + detail::union_successor_sets(successors[u], successors[v], + successors[u]); + // Succ(u) = Succ(u) U {v} + successors[u][chain_number[v]] = topo_number[v]; + } + } + } + + for (size_type i = 0; i < CG.size(); ++i) + CG[i].clear(); + for (size_type i = 0; i < CG.size(); ++i) + for (size_type j = 0; j < chains.size(); ++j) { + size_type topo_num = successors[i][j]; + if (topo_num < inf) { + cg_vertex v = topo_order[topo_num]; + for (size_type k = pos_in_chain[v]; k < chains[j].size(); ++k) + CG[i].push_back(chains[j][k]); + } + } + + + // Add vertices to the transitive closure graph + typedef typename graph_traits < GraphTC >::vertex_descriptor tc_vertex; + { + vertex_iterator i, i_end; + for (boost::tie(i, i_end) = vertices(g); i != i_end; ++i) + g_to_tc_map[*i] = add_vertex(tc); + } + // Add edges between all the vertices in two adjacent SCCs + typename graph_traits::vertex_iterator si, si_end; + for (boost::tie(si, si_end) = vertices(CG); si != si_end; ++si) { + cg_vertex s = *si; + typename graph_traits::adjacency_iterator i, i_end; + for (boost::tie(i, i_end) = adjacent_vertices(s, CG); i != i_end; ++i) { + cg_vertex t = *i; + for (size_type k = 0; k < components[s].size(); ++k) + for (size_type l = 0; l < components[t].size(); ++l) + add_edge(g_to_tc_map[components[s][k]], + g_to_tc_map[components[t][l]], tc); + } + } + // Add edges connecting all vertices in a SCC + for (size_type i = 0; i < components.size(); ++i) + if (components[i].size() > 1) + for (size_type k = 0; k < components[i].size(); ++k) + for (size_type l = 0; l < components[i].size(); ++l) { + vertex u = components[i][k], v = components[i][l]; + add_edge(g_to_tc_map[u], g_to_tc_map[v], tc); + } + + // Find loopbacks in the original graph. + // Need to add it to transitive closure. + { + vertex_iterator i, i_end; + for (boost::tie(i, i_end) = vertices(g); i != i_end; ++i) + { + adjacency_iterator ab, ae; + for (boost::tie(ab, ae) = adjacent_vertices(*i, g); ab != ae; ++ab) + { + if (*ab == *i) + if (components[component_number[*i]].size() == 1) + add_edge(g_to_tc_map[*i], g_to_tc_map[*i], tc); + } + } + } + } + + template + void transitive_closure(const Graph & g, GraphTC & tc) + { + if (num_vertices(g) == 0) + return; + typedef typename property_map::const_type + VertexIndexMap; + VertexIndexMap index_map = get(vertex_index, g); + + typedef typename graph_traits::vertex_descriptor tc_vertex; + std::vector to_tc_vec(num_vertices(g)); + iterator_property_map < tc_vertex *, VertexIndexMap, tc_vertex, tc_vertex&> + g_to_tc_map(&to_tc_vec[0], index_map); + + transitive_closure(g, tc, g_to_tc_map, index_map); + } + + namespace detail + { + template < typename Graph, typename GraphTC, typename G_to_TC_VertexMap, + typename VertexIndexMap> + void transitive_closure_dispatch + (const Graph & g, GraphTC & tc, + G_to_TC_VertexMap g_to_tc_map, VertexIndexMap index_map) + { + typedef typename graph_traits < GraphTC >::vertex_descriptor tc_vertex; + typename std::vector < tc_vertex >::size_type + n = is_default_param(g_to_tc_map) ? num_vertices(g) : 1; + std::vector < tc_vertex > to_tc_vec(n); + + transitive_closure + (g, tc, + choose_param(g_to_tc_map, make_iterator_property_map + (to_tc_vec.begin(), index_map, to_tc_vec[0])), + index_map); + } + } // namespace detail + + template < typename Graph, typename GraphTC, + typename P, typename T, typename R > + void transitive_closure(const Graph & g, GraphTC & tc, + const bgl_named_params < P, T, R > ¶ms) + { + if (num_vertices(g) == 0) + return; + detail::transitive_closure_dispatch + (g, tc, get_param(params, orig_to_copy_t()), + choose_const_pmap(get_param(params, vertex_index), g, vertex_index) ); + } + + + template < typename G > void warshall_transitive_closure(G & g) + { + typedef typename graph_traits < G >::vertex_descriptor vertex; + typedef typename graph_traits < G >::vertex_iterator vertex_iterator; + + function_requires < AdjacencyMatrixConcept < G > >(); + function_requires < EdgeMutableGraphConcept < G > >(); + + // Matrix form: + // for k + // for i + // if A[i,k] + // for j + // A[i,j] = A[i,j] | A[k,j] + vertex_iterator ki, ke, ii, ie, ji, je; + for (boost::tie(ki, ke) = vertices(g); ki != ke; ++ki) + for (boost::tie(ii, ie) = vertices(g); ii != ie; ++ii) + if (edge(*ii, *ki, g).second) + for (boost::tie(ji, je) = vertices(g); ji != je; ++ji) + if (!edge(*ii, *ji, g).second && edge(*ki, *ji, g).second) { + add_edge(*ii, *ji, g); + } + } + + + template < typename G > void warren_transitive_closure(G & g) + { + using namespace boost; + typedef typename graph_traits < G >::vertex_descriptor vertex; + typedef typename graph_traits < G >::vertex_iterator vertex_iterator; + + function_requires < AdjacencyMatrixConcept < G > >(); + function_requires < EdgeMutableGraphConcept < G > >(); + + // Make sure second loop will work + if (num_vertices(g) == 0) + return; + + // for i = 2 to n + // for k = 1 to i - 1 + // if A[i,k] + // for j = 1 to n + // A[i,j] = A[i,j] | A[k,j] + + vertex_iterator ic, ie, jc, je, kc, ke; + for (boost::tie(ic, ie) = vertices(g), ++ic; ic != ie; ++ic) + for (boost::tie(kc, ke) = vertices(g); *kc != *ic; ++kc) + if (edge(*ic, *kc, g).second) + for (boost::tie(jc, je) = vertices(g); jc != je; ++jc) + if (!edge(*ic, *jc, g).second && edge(*kc, *jc, g).second) { + add_edge(*ic, *jc, g); + } + // for i = 1 to n - 1 + // for k = i + 1 to n + // if A[i,k] + // for j = 1 to n + // A[i,j] = A[i,j] | A[k,j] + + for (boost::tie(ic, ie) = vertices(g), --ie; ic != ie; ++ic) + for (kc = ic, ke = ie, ++kc; kc != ke; ++kc) + if (edge(*ic, *kc, g).second) + for (boost::tie(jc, je) = vertices(g); jc != je; ++jc) + if (!edge(*ic, *jc, g).second && edge(*kc, *jc, g).second) { + add_edge(*ic, *jc, g); + } + } + + +} // namespace boost + +#endif // BOOST_GRAPH_TRANSITIVE_CLOSURE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/transitive_reduction.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/transitive_reduction.hpp new file mode 100644 index 0000000000..44dfee989d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/transitive_reduction.hpp @@ -0,0 +1,130 @@ +// (C) Copyright 2009 Eric Bose-Wolf +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_TRANSITIVE_REDUCTION_HPP +#define BOOST_GRAPH_TRANSITIVE_REDUCTION_HPP + +#include +#include //std::find +#include +#include + +#include +#include + +// also I didn't got all of the concepts thin. Am I suppose to check +// for all concepts, which are needed for functions I call? (As if I +// wouldn't do that, the users would see the functions called by +// complaining about missings concepts, which would be clearly an error +// message revealing internal implementation and should therefore be avoided?) + +// the pseudocode which I followed implementing this algorithmn was taken +// from the german book Algorithmische Graphentheorie by Volker Turau +// it is proposed to be of O(n + nm_red ) where n is the number +// of vertices and m_red is the number of edges in the transitive +// reduction, but I think my implementation spoiled this up at some point +// indicated below. + +namespace boost { + +template < + typename Graph, typename GraphTR, typename G_to_TR_VertexMap, + typename VertexIndexMap +> +BOOST_CONCEPT_REQUIRES( + ((VertexListGraphConcept< Graph >)) + ((IncidenceGraphConcept< Graph >)) + ((MutableGraphConcept< GraphTR >)) + ((ReadablePropertyMapConcept< VertexIndexMap, + typename graph_traits::vertex_descriptor >)) + ((Integer< typename + property_traits< VertexIndexMap >::value_type >)) + ((LvaluePropertyMapConcept< G_to_TR_VertexMap, + typename graph_traits::vertex_descriptor >)), + (void)) +transitive_reduction(const Graph& g, GraphTR& tr, + G_to_TR_VertexMap g_to_tr_map, + VertexIndexMap g_index_map ) +{ + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::vertex_iterator VertexIterator; + typedef typename std::vector::size_type size_type; + + std::vector topo_order; + topological_sort(g, std::back_inserter(topo_order)); + + std::vector topo_number_storage(num_vertices(g)); + + iterator_property_map topo_number( &topo_number_storage[0], g_index_map ); + + { + typename std::vector::reverse_iterator it = topo_order.rbegin(); + size_type n = 0; + for(; it != topo_order.rend(); ++it,++n ) { + topo_number[ *it ] = n; + } + } + + std::vector< std::vector< bool > > edge_in_closure(num_vertices(g), + std::vector( num_vertices(g), false)); + { + typename std::vector::reverse_iterator it = topo_order.rbegin(); + for( ; it != topo_order.rend(); ++it ) { + g_to_tr_map[*it] = add_vertex(tr); + } + } + + typename std::vector::iterator + it = topo_order.begin(), + end = topo_order.end(); + for( ; it != end; ++it ) { + size_type i = topo_number[ *it ]; + edge_in_closure[i][i] = true; + std::vector neighbors; + + //I have to collect the successors of *it and traverse them in + //ascending topological order. I didn't know a better way, how to + //do that. So what I'm doint is, collection the successors of *it here + { + typename Graph::out_edge_iterator oi,oi_end; + for( boost::tie(oi, oi_end) = out_edges( *it, g ); oi != oi_end; ++oi ) { + neighbors.push_back( target( *oi, g ) ); + } + } + + { + //and run through all vertices in topological order + typename std::vector::reverse_iterator + rit = topo_order.rbegin(); + rend = topo_order.rend(); + for(; rit != rend; ++rit ) { + //looking if they are successors of *it + if( std::find( neighbors.begin(), neighbors.end(), *rit) != neighbors.end() ) { + size_type j = topo_number[ *rit ]; + if( not edge_in_closure[i][j] ) { + for(size_type k = j; k < num_vertices(g); ++k) { + if( not edge_in_closure[i][k] ) { + //here we need edge_in_closure to be in topological order, + edge_in_closure[i][k] = edge_in_closure[j][k]; + } + } + //therefore we only access edge_in_closure only through + //topo_number property_map + add_edge(g_to_tr_map[*it], g_to_tr_map[*rit], tr); + } //if ( not edge_in_ + } //if (find ( + } //for( typename vector::reverse_iterator + } // { + + } //for( typename vector::iterator + +} //void transitive_reduction + +} // namespace boost + +#endif + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/transpose_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/transpose_graph.hpp new file mode 100644 index 0000000000..b12ba1005d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/transpose_graph.hpp @@ -0,0 +1,40 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_TRANSPOSE_HPP +#define BOOST_GRAPH_TRANSPOSE_HPP + +#include +#include +#include +#include + + +namespace boost { + + template + void transpose_graph(const VertexListGraph& G, MutableGraph& G_T) + { + reverse_graph R(G); + copy_graph(R, G_T); + } + + template + void transpose_graph(const VertexListGraph& G, MutableGraph& G_T, + const bgl_named_params& params) + { + reverse_graph Rev(G); + copy_graph(Rev, G_T, params); + } + +} // namespace boost + +#endif // BOOST_GRAPH_TRANSPOSE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/tree_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/tree_traits.hpp new file mode 100644 index 0000000000..0843628c1b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/tree_traits.hpp @@ -0,0 +1,43 @@ +// (C) Copyright Jeremy Siek 1999. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TREE_STRUCTURE_HPP +#define BOOST_TREE_STRUCTURE_HPP + +namespace boost { + + template + struct tree_traits { + typedef typename T::node_descriptor node_descriptor; + typedef typename T::children_iterator children_iterator; + }; + + + template + void traverse_tree(typename tree_traits::node_descriptor v, + Tree& t, TreeVisitor visitor) + { + visitor.preorder(v, t); + typename tree_traits::children_iterator i, end; + boost::tie(i, end) = children(v, t); + if (i != end) { + traverse_tree(*i++, t, visitor); + visitor.inorder(v, t); + while (i != end) + traverse_tree(*i++, t, visitor); + } else + visitor.inorder(v, t); + visitor.postorder(v, t); + } + + struct null_tree_visitor { + template void preorder(Node, Tree&) { } + template void inorder(Node, Tree&) { } + template void postorder(Node, Tree&) { } + }; + +} /* namespace boost */ + +#endif /* BOOST_TREE_STRUCTURE_HPP */ diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/two_bit_color_map.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/two_bit_color_map.hpp new file mode 100644 index 0000000000..9a3872fd04 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/two_bit_color_map.hpp @@ -0,0 +1,108 @@ +// Copyright (C) 2005-2006 The Trustees of Indiana University. + +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jeremiah Willcock +// Douglas Gregor +// Andrew Lumsdaine + +// Two bit per color property map + +#ifndef BOOST_TWO_BIT_COLOR_MAP_HPP +#define BOOST_TWO_BIT_COLOR_MAP_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + +enum two_bit_color_type { + two_bit_white = 0, + two_bit_gray = 1, + two_bit_green = 2, + two_bit_black = 3 +}; + +template <> +struct color_traits +{ + static two_bit_color_type white() { return two_bit_white; } + static two_bit_color_type gray() { return two_bit_gray; } + static two_bit_color_type green() { return two_bit_green; } + static two_bit_color_type black() { return two_bit_black; } +}; + + +template +struct two_bit_color_map +{ + std::size_t n; + IndexMap index; + shared_array data; + + BOOST_STATIC_CONSTANT(int, bits_per_char = std::numeric_limits::digits); + BOOST_STATIC_CONSTANT(int, elements_per_char = bits_per_char / 2); + typedef typename property_traits::key_type key_type; + typedef two_bit_color_type value_type; + typedef void reference; + typedef read_write_property_map_tag category; + + explicit two_bit_color_map(std::size_t n, const IndexMap& index = IndexMap()) + : n(n), index(index), data(new unsigned char[(n + elements_per_char - 1) / elements_per_char]) + { + // Fill to white + std::fill(data.get(), data.get() + (n + elements_per_char - 1) / elements_per_char, 0); + } +}; + +template +inline two_bit_color_type +get(const two_bit_color_map& pm, + typename property_traits::key_type key) +{ + BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map::elements_per_char); + typename property_traits::value_type i = get(pm.index, key); + assert ((std::size_t)i < pm.n); + std::size_t byte_num = i / elements_per_char; + std::size_t bit_position = ((i % elements_per_char) * 2); + return two_bit_color_type((pm.data.get()[byte_num] >> bit_position) & 3); +} + +template +inline void +put(const two_bit_color_map& pm, + typename property_traits::key_type key, + two_bit_color_type value) +{ + BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map::elements_per_char); + typename property_traits::value_type i = get(pm.index, key); + assert ((std::size_t)i < pm.n); + assert (value >= 0 && value < 4); + std::size_t byte_num = i / elements_per_char; + std::size_t bit_position = ((i % elements_per_char) * 2); + pm.data.get()[byte_num] = + (unsigned char) + ((pm.data.get()[byte_num] & ~(3 << bit_position)) + | (value << bit_position)); +} + +template +inline two_bit_color_map +make_two_bit_color_map(std::size_t n, const IndexMap& index_map) +{ + return two_bit_color_map(n, index_map); +} + +} // end namespace boost + +#endif // BOOST_TWO_BIT_COLOR_MAP_HPP + +#ifdef BOOST_GRAPH_USE_MPI +# include +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/undirected_dfs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/undirected_dfs.hpp new file mode 100644 index 0000000000..9cad25ad72 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/undirected_dfs.hpp @@ -0,0 +1,250 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_GRAPH_UNDIRECTED_DFS_HPP +#define BOOST_GRAPH_UNDIRECTED_DFS_HPP + +#include +#include + +namespace boost { + + namespace detail { + +// Define BOOST_RECURSIVE_DFS to use older, recursive version. +// It is retained for a while in order to perform performance +// comparison. +#ifndef BOOST_RECURSIVE_DFS + + template + void undir_dfv_impl + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor u, + DFSVisitor& vis, + VertexColorMap vertex_color, + EdgeColorMap edge_color) + { + function_requires >(); + function_requires >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + function_requires >(); + function_requires >(); + typedef typename property_traits::value_type ColorValue; + typedef typename property_traits::value_type EColorValue; + function_requires< ColorValueConcept >(); + function_requires< ColorValueConcept >(); + typedef color_traits Color; + typedef color_traits EColor; + typedef typename graph_traits::out_edge_iterator Iter; + typedef std::pair > VertexInfo; + + std::vector stack; + + put(vertex_color, u, Color::gray()); + vis.discover_vertex(u, g); + stack.push_back(std::make_pair(u, out_edges(u, g))); + while (!stack.empty()) { + VertexInfo& back = stack.back(); + u = back.first; + Iter ei, ei_end; + boost::tie(ei, ei_end) = back.second; + stack.pop_back(); + while (ei != ei_end) { + Vertex v = target(*ei, g); + vis.examine_edge(*ei, g); + ColorValue v_color = get(vertex_color, v); + EColorValue uv_color = get(edge_color, *ei); + put(edge_color, *ei, EColor::black()); + if (v_color == Color::white()) { + vis.tree_edge(*ei, g); + stack.push_back(std::make_pair(u, std::make_pair(++ei, ei_end))); + u = v; + put(vertex_color, u, Color::gray()); + vis.discover_vertex(u, g); + boost::tie(ei, ei_end) = out_edges(u, g); + } else if (v_color == Color::gray()) { + if (uv_color == EColor::white()) vis.back_edge(*ei, g); + ++ei; + } else { // if (v_color == Color::black()) + ++ei; + } + } + put(vertex_color, u, Color::black()); + vis.finish_vertex(u, g); + } + } + +#else // BOOST_RECURSIVE_DFS + + template + void undir_dfv_impl + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor u, + DFSVisitor& vis, // pass-by-reference here, important! + VertexColorMap vertex_color, + EdgeColorMap edge_color) + { + function_requires >(); + function_requires >(); + typedef typename graph_traits::vertex_descriptor Vertex; + typedef typename graph_traits::edge_descriptor Edge; + function_requires >(); + function_requires >(); + typedef typename property_traits::value_type ColorValue; + typedef typename property_traits::value_type EColorValue; + function_requires< ColorValueConcept >(); + function_requires< ColorValueConcept >(); + typedef color_traits Color; + typedef color_traits EColor; + typename graph_traits::out_edge_iterator ei, ei_end; + + put(vertex_color, u, Color::gray()); vis.discover_vertex(u, g); + for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) { + Vertex v = target(*ei, g); vis.examine_edge(*ei, g); + ColorValue v_color = get(vertex_color, v); + EColorValue uv_color = get(edge_color, *ei); + put(edge_color, *ei, EColor::black()); + if (v_color == Color::white()) { vis.tree_edge(*ei, g); + undir_dfv_impl(g, v, vis, vertex_color, edge_color); + } else if (v_color == Color::gray() && uv_color == EColor::white()) + vis.back_edge(*ei, g); + } + put(vertex_color, u, Color::black()); vis.finish_vertex(u, g); + } + +#endif // ! BOOST_RECURSIVE_DFS + + } // namespace detail + + template + void + undirected_dfs(const Graph& g, DFSVisitor vis, + VertexColorMap vertex_color, EdgeColorMap edge_color, + Vertex start_vertex) + { + function_requires >(); + function_requires >(); + + typedef typename property_traits::value_type ColorValue; + typedef color_traits Color; + + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + put(vertex_color, *ui, Color::white()); vis.initialize_vertex(*ui, g); + } + typename graph_traits::edge_iterator ei, ei_end; + for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) + put(edge_color, *ei, Color::white()); + + if (start_vertex != *vertices(g).first){ vis.start_vertex(start_vertex, g); + detail::undir_dfv_impl(g, start_vertex, vis, vertex_color, edge_color); + } + + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) { + ColorValue u_color = get(vertex_color, *ui); + if (u_color == Color::white()) { vis.start_vertex(*ui, g); + detail::undir_dfv_impl(g, *ui, vis, vertex_color, edge_color); + } + } + } + + template + void + undirected_dfs(const Graph& g, DFSVisitor vis, + VertexColorMap vertex_color, EdgeColorMap edge_color) + { + undirected_dfs(g, vis, vertex_color, edge_color, *vertices(g).first); + } + + namespace detail { + template + struct udfs_dispatch { + + template + static void + apply(const Graph& g, DFSVisitor vis, Vertex start_vertex, + const bgl_named_params&, + EdgeColorMap edge_color, + VertexColorMap vertex_color) + { + undirected_dfs(g, vis, vertex_color, edge_color, start_vertex); + } + }; + + template <> + struct udfs_dispatch { + template + static void + apply(const Graph& g, DFSVisitor vis, Vertex start_vertex, + const bgl_named_params& params, + EdgeColorMap edge_color, + detail::error_property_not_found) + { + std::vector color_vec(num_vertices(g)); + default_color_type c = white_color; // avoid warning about un-init + undirected_dfs + (g, vis, make_iterator_property_map + (color_vec.begin(), + choose_const_pmap(get_param(params, vertex_index), + g, vertex_index), c), + edge_color, + start_vertex); + } + }; + + } // namespace detail + + + // Named Parameter Variant + template + void + undirected_dfs(const Graph& g, + const bgl_named_params& params) + { + typedef typename property_value< bgl_named_params, + vertex_color_t>::type C; + detail::udfs_dispatch::apply + (g, + choose_param(get_param(params, graph_visitor), + make_dfs_visitor(null_visitor())), + choose_param(get_param(params, root_vertex_t()), + *vertices(g).first), + params, + get_param(params, edge_color), + get_param(params, vertex_color) + ); + } + + + template + void undirected_depth_first_visit + (const IncidenceGraph& g, + typename graph_traits::vertex_descriptor u, + DFSVisitor vis, VertexColorMap vertex_color, EdgeColorMap edge_color) + { + detail::undir_dfv_impl(g, u, vis, vertex_color, edge_color); + } + + +} // namespace boost + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/undirected_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/undirected_graph.hpp new file mode 100644 index 0000000000..d5374101e2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/undirected_graph.hpp @@ -0,0 +1,698 @@ +// (C) Copyright 2007-2009 Andrew Sutton +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0 (See accompanying file +// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GRAPH_UNDIRECTED_GRAPH_HPP +#define BOOST_GRAPH_UNDIRECTED_GRAPH_HPP + +#include +#include +#include + +// NOTE: The retag_property_list is used to "normalize" a proeprty such that +// any non-property conforming parameter is wrapped in a vertex_bundle +// property. For example (with bad syntax) retag> -> property, +// but retag -> property. + +namespace boost +{ +struct undirected_graph_tag { }; + +/** + * The undirected_graph class template is a simplified version of the BGL + * adjacency list. This class is provided for ease of use, but may not + * perform as well as custom-defined adjacency list classes. Instances of + * this template model the VertexIndexGraph, and EdgeIndexGraph concepts. The + * graph is also fully mutable, supporting both insertions and removals of + * vertices and edges. + * + * @note Special care must be taken when removing vertices or edges since + * those operations can invalidate the numbering of vertices. + */ +template < + typename VertexProp = no_property, + typename EdgeProp = no_property, + typename GraphProp = no_property> +class undirected_graph +{ +public: + typedef typename graph_detail::graph_prop::property graph_property_type; + typedef typename graph_detail::graph_prop::bundle graph_bundled; + + typedef typename graph_detail::vertex_prop::property vertex_property_type; + typedef typename graph_detail::vertex_prop::bundle vertex_bundled; + + typedef typename graph_detail::edge_prop::property edge_property_type; + typedef typename graph_detail::edge_prop::bundle edge_bundled; + +private: + // Embed indices into the vertex type. + typedef property vertex_property; + typedef property edge_property; +public: + typedef adjacency_list graph_type; +private: + // storage selectors + typedef typename graph_type::vertex_list_selector vertex_list_selector; + typedef typename graph_type::edge_list_selector edge_list_selector; + typedef typename graph_type::out_edge_list_selector out_edge_list_selector; + typedef typename graph_type::directed_selector directed_selector; + +public: + // more commonly used graph types + typedef typename graph_type::stored_vertex stored_vertex; + typedef typename graph_type::vertices_size_type vertices_size_type; + typedef typename graph_type::edges_size_type edges_size_type; + typedef typename graph_type::degree_size_type degree_size_type; + typedef typename graph_type::vertex_descriptor vertex_descriptor; + typedef typename graph_type::edge_descriptor edge_descriptor; + + // iterator types + typedef typename graph_type::vertex_iterator vertex_iterator; + typedef typename graph_type::edge_iterator edge_iterator; + typedef typename graph_type::out_edge_iterator out_edge_iterator; + typedef typename graph_type::in_edge_iterator in_edge_iterator; + typedef typename graph_type::adjacency_iterator adjacency_iterator; + + // miscellaneous types + typedef undirected_graph_tag graph_tag; + typedef typename graph_type::directed_category directed_category; + typedef typename graph_type::edge_parallel_category edge_parallel_category; + typedef typename graph_type::traversal_category traversal_category; + + typedef std::size_t vertex_index_type; + typedef std::size_t edge_index_type; + + inline undirected_graph(GraphProp const& p = GraphProp()) + : m_graph(p), m_num_vertices(0), m_num_edges(0), m_max_vertex_index(0) + , m_max_edge_index(0) + { } + + inline undirected_graph(undirected_graph const& x) + : m_graph(x.m_graph), m_num_vertices(x.m_num_vertices), m_num_edges(x.m_num_edges) + , m_max_vertex_index(x.m_max_vertex_index), m_max_edge_index(x.m_max_edge_index) + { } + + inline undirected_graph(vertices_size_type n, + GraphProp const& p = GraphProp()) + : m_graph(n, p), m_num_vertices(n), m_num_edges(0), m_max_vertex_index(n) + , m_max_edge_index(0) + { renumber_vertex_indices(); } + + template + inline undirected_graph(EdgeIterator f, + EdgeIterator l, + vertices_size_type n, + edges_size_type m = 0, + GraphProp const& p = GraphProp()) + : m_graph(f, l, n, m, p), m_num_vertices(n), m_num_edges(0) + , m_max_vertex_index(n), m_max_edge_index(0) + { + // Unfortunately, we have to renumber to ensure correct indexing. + renumber_indices(); + + // Can't always guarantee that the number of edges is actually + // m if distance(f, l) != m (or is undefined). + m_num_edges = m_max_edge_index = boost::num_edges(m_graph); + } + + undirected_graph& operator =(undirected_graph const& g) { + if(&g != this) { + m_graph = g.m_graph; + m_num_vertices = g.m_num_vertices; + m_num_edges = g.m_num_edges; + m_max_vertex_index = g.m_max_vertex_index; + } + return *this; + } + + // The impl_() methods are not part of the public interface. + graph_type& impl() + { return m_graph; } + + graph_type const& impl() const + { return m_graph; } + + // The following methods are not part of the public interface + vertices_size_type num_vertices() const + { return m_num_vertices; } + + +private: + // This helper function manages the attribution of vertex indices. + vertex_descriptor make_index(vertex_descriptor v) { + boost::put(vertex_index, m_graph, v, m_max_vertex_index); + m_num_vertices++; + m_max_vertex_index++; + return v; + } +public: + vertex_descriptor add_vertex() + { return make_index(boost::add_vertex(m_graph)); } + + vertex_descriptor add_vertex(vertex_property_type const& p) + { return make_index(boost::add_vertex(vertex_property(0u, p), m_graph)); } + + void clear_vertex(vertex_descriptor v) { + std::pair + p = boost::out_edges(v, m_graph); + m_num_edges -= std::distance(p.first, p.second); + boost::clear_vertex(v, m_graph); + } + + void remove_vertex(vertex_descriptor v) { + boost::remove_vertex(v, m_graph); + --m_num_vertices; + } + + edges_size_type num_edges() const + { return m_num_edges; } + +private: + // A helper fucntion for managing edge index attributes. + std::pair const& + make_index(std::pair const& x) + { + if(x.second) { + boost::put(edge_index, m_graph, x.first, m_max_edge_index); + ++m_num_edges; + ++m_max_edge_index; + } + return x; + } +public: + std::pair + add_edge(vertex_descriptor u, vertex_descriptor v) + { return make_index(boost::add_edge(u, v, m_graph)); } + + std::pair + add_edge(vertex_descriptor u, vertex_descriptor v, + edge_property_type const& p) + { return make_index(boost::add_edge(u, v, edge_property(0u, p), m_graph)); } + + void remove_edge(vertex_descriptor u, vertex_descriptor v) { + // find all edges, (u, v) + std::vector edges; + out_edge_iterator i, i_end; + for(boost::tie(i, i_end) = boost::out_edges(u, m_graph); i != i_end; ++i) { + if(boost::target(*i, m_graph) == v) { + edges.push_back(*i); + } + } + // remove all edges, (u, v) + typename std::vector::iterator + j = edges.begin(), j_end = edges.end(); + for( ; j != j_end; ++j) { + remove_edge(*j); + } + } + + void remove_edge(edge_iterator i) { + remove_edge(*i); + } + + void remove_edge(edge_descriptor e) { + boost::remove_edge(e, m_graph); + --m_num_edges; + } + + vertex_index_type max_vertex_index() const + { return m_max_vertex_index; } + + void renumber_vertex_indices() { + vertex_iterator i, i_end; + boost::tie(i, i_end) = vertices(m_graph); + m_max_vertex_index = renumber_vertex_indices(i, i_end, 0); + } + + void remove_vertex_and_renumber_indices(vertex_iterator i) { + vertex_iterator j = next(i), end = vertices(m_graph).second; + vertex_index_type n = get(vertex_index, m_graph, *i); + + // remove the offending vertex and renumber everything after + remove_vertex(*i); + m_max_vertex_index = renumber_vertex_indices(j, end, n); + } + + + edge_index_type max_edge_index() const + { return m_max_edge_index; } + + void renumber_edge_indices() { + edge_iterator i, end; + boost::tie(i, end) = edges(m_graph); + m_max_edge_index = renumber_edge_indices(i, end, 0); + } + + void remove_edge_and_renumber_indices(edge_iterator i) { + edge_iterator j = next(i), end = edges(m_graph.second); + edge_index_type n = get(edge_index, m_graph, *i); + + // remove the edge and renumber everything after it + remove_edge(*i); + m_max_edge_index = renumber_edge_indices(j, end, n); + } + + void renumber_indices() { + renumber_vertex_indices(); + renumber_edge_indices(); + } + + // bundled property support +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES + vertex_bundled& operator[](vertex_descriptor v) + { return m_graph[v]; } + + vertex_bundled const& operator[](vertex_descriptor v) const + { return m_graph[v]; } + + edge_bundled& operator[](edge_descriptor e) + { return m_graph[e]; } + + edge_bundled const& operator[](edge_descriptor e) const + { return m_graph[e]; } + + graph_bundled& operator[](graph_bundle_t) + { return get_property(*this); } + + graph_bundled const& operator[](graph_bundle_t) const + { return get_property(*this); } +#endif + + // Graph concepts + static vertex_descriptor null_vertex() + { return graph_type::null_vertex(); } + + void clear() { + m_graph.clear(); + m_num_vertices = m_max_vertex_index = 0; + m_num_edges = m_max_edge_index = 0; + } + + void swap(undirected_graph& g) { + m_graph.swap(g); + std::swap(m_num_vertices, g.m_num_vertices); + std::swap(m_max_vertex_index, g.m_max_vertex_index); + std::swap(m_num_edges, g.m_num_edges); + std::swap(m_max_edge_index, g.m_max_edge_index); + } + +private: + vertices_size_type renumber_vertex_indices(vertex_iterator i, + vertex_iterator end, + vertices_size_type n) + { + typedef typename property_map::type IndexMap; + IndexMap indices = get(vertex_index, m_graph); + for( ; i != end; ++i) { + indices[*i] = n++; + } + return n; + } + + edges_size_type renumber_edge_indices(edge_iterator i, + edge_iterator end, + edges_size_type n) + { + typedef typename property_map::type IndexMap; + IndexMap indices = get(edge_index, m_graph); + for( ; i != end; ++i) { + indices[*i] = n++; + } + return n; + } + + graph_type m_graph; + vertices_size_type m_num_vertices; + edges_size_type m_num_edges; + vertex_index_type m_max_vertex_index; + edge_index_type m_max_edge_index; +}; + +#define UNDIRECTED_GRAPH_PARAMS typename VP, typename EP, typename GP +#define UNDIRECTED_GRAPH undirected_graph + +// IncidenceGraph concepts +template +inline typename UNDIRECTED_GRAPH::vertex_descriptor +source(typename UNDIRECTED_GRAPH::edge_descriptor e, + UNDIRECTED_GRAPH const& g) +{ return source(e, g.impl()); } + +template +inline typename UNDIRECTED_GRAPH::vertex_descriptor +target(typename UNDIRECTED_GRAPH::edge_descriptor e, + UNDIRECTED_GRAPH const& g) +{ return target(e, g.impl()); } + +template +inline typename UNDIRECTED_GRAPH::degree_size_type +out_degree(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return out_degree(v, g.impl()); } + +template +inline std::pair< + typename UNDIRECTED_GRAPH::out_edge_iterator, + typename UNDIRECTED_GRAPH::out_edge_iterator +> +out_edges(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return out_edges(v, g.impl()); } + +// BidirectionalGraph concepts +template +inline typename UNDIRECTED_GRAPH::degree_size_type +in_degree(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return in_degree(v, g.impl()); } + +template +inline std::pair< + typename UNDIRECTED_GRAPH::in_edge_iterator, + typename UNDIRECTED_GRAPH::in_edge_iterator +> +in_edges(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return in_edges(v, g.impl()); } + +template +inline std::pair< + typename UNDIRECTED_GRAPH::out_edge_iterator, + typename UNDIRECTED_GRAPH::out_edge_iterator +> +incident_edges(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return out_edges(v, g.impl()); } + +template +inline typename UNDIRECTED_GRAPH::degree_size_type +degree(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return degree(v, g.impl()); } + +// AdjacencyGraph concepts +template +inline std::pair< + typename UNDIRECTED_GRAPH::adjacency_iterator, + typename UNDIRECTED_GRAPH::adjacency_iterator + > +adjacent_vertices(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return adjacent_vertices(v, g.impl()); } + +template +typename UNDIRECTED_GRAPH::vertex_descriptor +vertex(typename UNDIRECTED_GRAPH::vertices_size_type n, + UNDIRECTED_GRAPH const& g) +{ return vertex(g.impl()); } + +template +std::pair +edge(typename UNDIRECTED_GRAPH::vertex_descriptor u, + typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return edge(u, v, g.impl()); } + +// VertexListGraph concepts +template +inline typename UNDIRECTED_GRAPH::vertices_size_type +num_vertices(UNDIRECTED_GRAPH const& g) +{ return g.num_vertices(); } + +template +inline std::pair< + typename UNDIRECTED_GRAPH::vertex_iterator, + typename UNDIRECTED_GRAPH::vertex_iterator +> +vertices(UNDIRECTED_GRAPH const& g) +{ return vertices(g.impl()); } + +// EdgeListGraph concepts +template +inline typename UNDIRECTED_GRAPH::edges_size_type +num_edges(UNDIRECTED_GRAPH const& g) +{ return g.num_edges(); } + +template +inline std::pair< + typename UNDIRECTED_GRAPH::edge_iterator, + typename UNDIRECTED_GRAPH::edge_iterator +> +edges(UNDIRECTED_GRAPH const& g) +{ return edges(g.impl()); } + +// MutableGraph concepts +template +inline typename UNDIRECTED_GRAPH::vertex_descriptor +add_vertex(UNDIRECTED_GRAPH& g) +{ return g.add_vertex(); } + +template +inline typename UNDIRECTED_GRAPH::vertex_descriptor +add_vertex(typename UNDIRECTED_GRAPH::vertex_property_type const& p, + UNDIRECTED_GRAPH& g) +{ return g.add_vertex(p); } + +template +inline void +clear_vertex(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH& g) +{ return g.clear_vertex(v); } + +template +inline void +remove_vertex(typename UNDIRECTED_GRAPH::vertex_descriptor v, UNDIRECTED_GRAPH& g) +{ return g.remove_vertex(v); } + +template +inline std::pair +add_edge(typename UNDIRECTED_GRAPH::vertex_descriptor u, + typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH& g) +{ return g.add_edge(u, v); } + +template +inline std::pair +add_edge(typename UNDIRECTED_GRAPH::vertex_descriptor u, + typename UNDIRECTED_GRAPH::vertex_descriptor v, + typename UNDIRECTED_GRAPH::edge_property_type const& p, + UNDIRECTED_GRAPH& g) +{ return g.add_edge(u, v, p); } + +template +inline void +remove_edge(typename UNDIRECTED_GRAPH::vertex_descriptor u, + typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH& g) +{ return g.remove_edge(u, v); } + +template +inline void +remove_edge(typename UNDIRECTED_GRAPH::edge_descriptor e, UNDIRECTED_GRAPH& g) +{ return g.remove_edge(e); } + +template +inline void +remove_edge(typename UNDIRECTED_GRAPH::edge_iterator i, UNDIRECTED_GRAPH& g) +{ return g.remove_edge(i); } + +template +inline void remove_edge_if(Predicate pred, UNDIRECTED_GRAPH& g) +{ return remove_edge_if(pred, g.impl()); } + +template +inline void +remove_incident_edge_if(typename UNDIRECTED_GRAPH::vertex_descriptor v, + Predicate pred, + UNDIRECTED_GRAPH& g) +{ return remove_out_edge_if(v, pred, g.impl()); } + +template +inline void +remove_out_edge_if(typename UNDIRECTED_GRAPH::vertex_descriptor v, + Predicate pred, + UNDIRECTED_GRAPH& g) +{ return remove_out_edge_if(v, pred, g.impl()); } + +template +inline void +remove_in_edge_if(typename UNDIRECTED_GRAPH::vertex_descriptor v, + Predicate pred, + UNDIRECTED_GRAPH& g) +{ return remove_in_edge_if(v, pred, g.impl()); } + +// Helper code for working with property maps +namespace detail { + struct undirected_graph_vertex_property_selector { + template + struct bind_ { + typedef typename UndirectedGraph::graph_type Graph; + typedef property_map PropertyMap; + typedef typename PropertyMap::type type; + typedef typename PropertyMap::const_type const_type; + }; + }; + + struct undirected_graph_edge_property_selector { + template + struct bind_ { + typedef typename UndirectedGraph::graph_type Graph; + typedef property_map PropertyMap; + typedef typename PropertyMap::type type; + typedef typename PropertyMap::const_type const_type; + }; + }; +} // namespace detail + +template <> +struct vertex_property_selector +{ typedef detail::undirected_graph_vertex_property_selector type; }; + +template <> +struct edge_property_selector +{ typedef detail::undirected_graph_edge_property_selector type; }; + +// PropertyGraph concepts +template +inline typename property_map::type +get(Property p, UNDIRECTED_GRAPH& g) +{ return get(p, g.impl()); } + +template +inline typename property_map::const_type +get(Property p, UNDIRECTED_GRAPH const& g) +{ return get(p, g.impl()); } + +template +inline typename property_traits< + typename property_map< + typename UNDIRECTED_GRAPH::graph_type, Property + >::const_type +>::value_type +get(Property p, UNDIRECTED_GRAPH const& g, Key const& k) +{ return get(p, g.impl(), k); } + +template +inline void put(Property p, UNDIRECTED_GRAPH& g, Key const& k, Value const& v) +{ put(p, g.impl(), k, v); } + +template +inline typename graph_property::type& +get_property(UNDIRECTED_GRAPH& g, Property p) +{ return get_property(g.impl(), p); } + +template +inline typename graph_property::type const& +get_property(UNDIRECTED_GRAPH const& g, Property p) +{ return get_property(g.impl(), p); } + +template +inline void set_property(UNDIRECTED_GRAPH& g, Property p, Value v) +{ return set_property(g.impl(), p, v); } + +#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES +template +inline typename property_map::type +get(Type Bundle::* p, UNDIRECTED_GRAPH& g) { + typedef typename property_map< + UNDIRECTED_GRAPH, Type Bundle::* + >::type return_type; + return return_type(&g, p); +} + +template +inline typename property_map::const_type +get(Type Bundle::* p, UNDIRECTED_GRAPH const& g) { + typedef typename property_map< + UNDIRECTED_GRAPH, Type Bundle::* + >::const_type return_type; + return return_type(&g, p); +} + +template +inline Type +get(Type Bundle::* p, UNDIRECTED_GRAPH const& g, Key const& k) +{ return get(p, g.impl(), k); } + +template +inline void +put(Type Bundle::* p, UNDIRECTED_GRAPH& g, Key const& k, Value const& v) +{ put(p, g.impl(), k, v); } +#endif + +// Indexed Vertex graph + +template +inline typename UNDIRECTED_GRAPH::vertex_index_type +get_vertex_index(typename UNDIRECTED_GRAPH::vertex_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return get(vertex_index, g, v); } + +template +typename UNDIRECTED_GRAPH::vertex_index_type +max_vertex_index(UNDIRECTED_GRAPH const& g) +{ return g.max_vertex_index(); } + +template +inline void +renumber_vertex_indices(UNDIRECTED_GRAPH& g) +{ g.renumber_vertex_indices(); } + +template +inline void +remove_vertex_and_renumber_indices(typename UNDIRECTED_GRAPH::vertex_iterator i, + UNDIRECTED_GRAPH& g) +{ g.remove_vertex_and_renumber_indices(i); } + + +// Edge index management + +template +inline typename UNDIRECTED_GRAPH::edge_index_type +get_edge_index(typename UNDIRECTED_GRAPH::edge_descriptor v, + UNDIRECTED_GRAPH const& g) +{ return get(edge_index, g, v); } + +template +typename UNDIRECTED_GRAPH::edge_index_type +max_edge_index(UNDIRECTED_GRAPH const& g) +{ return g.max_edge_index(); } + +template +inline void +renumber_edge_indices(UNDIRECTED_GRAPH& g) +{ g.renumber_edge_indices(); } + +template +inline void +remove_edge_and_renumber_indices(typename UNDIRECTED_GRAPH::edge_iterator i, + UNDIRECTED_GRAPH& g) +{ g.remove_edge_and_renumber_indices(i); } + +// Index management +template +inline void +renumber_indices(UNDIRECTED_GRAPH& g) +{ g.renumber_indices(); } + +// Mutability Traits +template +struct graph_mutability_traits { + typedef mutable_property_graph_tag category; +}; + +#undef UNDIRECTED_GRAPH_PARAMS +#undef UNDIRECTED_GRAPH + +} /* namespace boost */ + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/use_mpi.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/use_mpi.hpp new file mode 100644 index 0000000000..b77f9c0b5d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/use_mpi.hpp @@ -0,0 +1,15 @@ +// Copyright (C) 2004-2009 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Nick Edmonds +// Andrew Lumsdaine + +#ifndef BOOST_GRAPH_USE_MPI_HPP +#define BOOST_GRAPH_USE_MPI_HPP + +#define BOOST_GRAPH_USE_MPI + +#endif // BOOST_GRAPH_USE_MPI_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/vector_as_graph.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/vector_as_graph.hpp new file mode 100644 index 0000000000..ee0df4bc90 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/vector_as_graph.hpp @@ -0,0 +1,332 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Copyright 2006 The Trustees of Indiana University. +// Copyright (C) 2001 Vladimir Prus +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Douglas Gregor +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +// The mutating functions (add_edge, etc.) were added by Vladimir Prus. + +#ifndef BOOST_VECTOR_AS_GRAPH_HPP +#define BOOST_VECTOR_AS_GRAPH_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + This module implements the VertexListGraph concept using a + std::vector as the "back-bone" of the graph (the vector *is* the + graph object). The edge-lists type of the graph is templated, so the + user can choose any STL container, so long as the value_type of the + container is convertible to the size_type of the vector. For now any + graph properties must be stored seperately. + + This module requires the C++ compiler to support partial + specialization for the graph_traits class, so this is not portable + to VC++. + +*/ + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#error The vector-as-graph module requires a compiler that supports partial specialization +#endif + + +namespace boost { + namespace detail { + template struct val_out_edge_ret; + template struct val_out_edge_iter; + template struct val_edge; + } +} + +#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +namespace boost { + + struct vector_as_graph_traversal_tag + : public vertex_list_graph_tag, + public adjacency_graph_tag, + public incidence_graph_tag { }; + + template + struct graph_traits< std::vector > + { + typedef typename EdgeList::value_type V; + typedef V vertex_descriptor; + typedef typename detail::val_edge::type edge_descriptor; + typedef typename EdgeList::const_iterator adjacency_iterator; + typedef typename detail::val_out_edge_iter::type + out_edge_iterator; + typedef void in_edge_iterator; + typedef void edge_iterator; + typedef typename integer_range::iterator vertex_iterator; + typedef directed_tag directed_category; + typedef allow_parallel_edge_tag edge_parallel_category; + typedef vector_as_graph_traversal_tag traversal_category; + typedef typename std::vector::size_type vertices_size_type; + typedef void edges_size_type; + typedef typename EdgeList::size_type degree_size_type; + }; + template + struct edge_property_type< std::vector > + { + typedef void type; + }; + template + struct vertex_property_type< std::vector > + { + typedef void type; + }; + template + struct graph_property_type< std::vector > + { + typedef void type; + }; +} +#endif + +namespace boost { + + namespace detail { + + // "val" is short for Vector Adjacency List + + template + struct val_edge + { + typedef typename EdgeList::value_type V; + typedef std::pair type; + }; + + // need rewrite this using boost::iterator_adaptor + template + class val_out_edge_iterator + : public boost::iterator, + std::ptrdiff_t, std::pair*, const std::pair > + { + typedef val_out_edge_iterator self; + typedef std::pair Edge; + public: + val_out_edge_iterator() { } + val_out_edge_iterator(V s, Iter i) : _source(s), _iter(i) { } + Edge operator*() const { return Edge(_source, *_iter); } + self& operator++() { ++_iter; return *this; } + self operator++(int) { self t = *this; ++_iter; return t; } + bool operator==(const self& x) const { return _iter == x._iter; } + bool operator!=(const self& x) const { return _iter != x._iter; } + protected: + V _source; + Iter _iter; + }; + + template + struct val_out_edge_iter + { + typedef typename EdgeList::value_type V; + typedef typename EdgeList::const_iterator Iter; + typedef val_out_edge_iterator type; + }; + + template + struct val_out_edge_ret + { + typedef typename val_out_edge_iter::type IncIter; + typedef std::pair type; + }; + + } // namesapce detail + + template + typename detail::val_out_edge_ret::type + out_edges(typename EdgeList::value_type v, + const std::vector& g) + { + typedef typename detail::val_out_edge_iter::type Iter; + typedef typename detail::val_out_edge_ret::type return_type; + return return_type(Iter(v, g[v].begin()), Iter(v, g[v].end())); + } + + template + typename EdgeList::size_type + out_degree(typename EdgeList::value_type v, + const std::vector& g) + { + return g[v].size(); + } + + template + std::pair + adjacent_vertices(typename EdgeList::value_type v, + const std::vector& g) + { + return std::make_pair(g[v].begin(), g[v].end()); + } + + // source() and target() already provided for pairs in graph_traits.hpp + + template + std::pair + ::iterator, + typename boost::integer_range + ::iterator > + vertices(const std::vector& v) + { + typedef typename boost::integer_range + ::iterator Iter; + return std::make_pair(Iter(0), Iter(v.size())); + } + + template + typename std::vector::size_type + num_vertices(const std::vector& v) + { + return v.size(); + } + + template + typename std::pair::type, bool> + add_edge(typename EdgeList::value_type u, typename EdgeList::value_type v, + std::vector& g) + { + typedef typename detail::val_edge::type edge_type; + g[u].insert(g[u].end(), v); + return std::make_pair(edge_type(u, v), true); + } + + template + typename std::pair::type, bool> + edge(typename EdgeList::value_type u, typename EdgeList::value_type v, + std::vector& g) + { + typedef typename detail::val_edge::type edge_type; + typename EdgeList::iterator i = g[u].begin(), end = g[u].end(); + for (; i != end; ++i) + if (*i == v) + return std::make_pair(edge_type(u, v), true); + return std::make_pair(edge_type(), false); + } + + template + void + remove_edge(typename EdgeList::value_type u, typename EdgeList::value_type v, + std::vector& g) + { + typename EdgeList::iterator i = std::remove(g[u].begin(), g[u].end(), v); + if (i != g[u].end()) + g[u].erase(i, g[u].end()); + } + + template + void + remove_edge(typename detail::val_edge::type e, + std::vector& g) + { + typename EdgeList::value_type u, v; + u = e.first; + v = e.second; + // FIXME: edge type does not fully specify the edge to be deleted + typename EdgeList::iterator i = std::remove(g[u].begin(), g[u].end(), v); + if (i != g[u].end()) + g[u].erase(i, g[u].end()); + } + + template + void + remove_edge_if(Predicate p, + std::vector& g) + { + for (std::size_t u = 0; u < g.size(); ++u) { + // Oops! gcc gets internal compiler error on compose_....... + + typedef typename EdgeList::iterator iterator; + iterator b = g[u].begin(), e = g[u].end(); + + if (!g[u].empty()) { + + for(; b != e;) { + if (p(std::make_pair(u, *b))) { + --e; + if (b == e) + break; + else + iter_swap(b, e); + } else { + ++b; + } + } + } + + if (e != g[u].end()) + g[u].erase(e, g[u].end()); + } + } + + template + typename EdgeList::value_type + add_vertex(std::vector& g) + { + g.resize(g.size()+1); + return g.size()-1; + } + + template + void + clear_vertex(typename EdgeList::value_type u, + std::vector& g) + { + g[u].clear(); + for (std::size_t i = 0; i < g.size(); ++i) + remove_edge(i, u, g); + } + + template + void + remove_vertex(typename EdgeList::value_type u, + std::vector& g) + { + typedef typename EdgeList::iterator iterator; + clear_vertex(u, g); + g.erase(g.begin() + u); + for (std::size_t i = 0; i < g.size(); ++i) + for ( iterator it = g[i].begin(); it != g[i].end(); ++it ) + // after clear_vertex *it is never equal to u + if ( *it > u ) + --*it; + } + + template + struct property_map, vertex_index_t> + { + typedef identity_property_map type; + typedef type const_type; + }; + + template + identity_property_map + get(vertex_index_t, const std::vector&) + { + return identity_property_map(); + } + + template + identity_property_map + get(vertex_index_t, std::vector&) + { + return identity_property_map(); + } +} // namespace boost + +#endif // BOOST_VECTOR_AS_GRAPH_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/vertex_and_edge_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/vertex_and_edge_range.hpp new file mode 100644 index 0000000000..bcba2bfbbd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/vertex_and_edge_range.hpp @@ -0,0 +1,141 @@ +// Copyright 2004 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + +#ifndef BOOST_GRAPH_VERTEX_AND_EDGE_RANGE_HPP +#define BOOST_GRAPH_VERTEX_AND_EDGE_RANGE_HPP + +#include +#include + +namespace boost { + +namespace graph { + template + class vertex_and_edge_range + { + typedef graph_traits traits_type; + + public: + typedef typename traits_type::directed_category directed_category; + typedef typename traits_type::edge_parallel_category + edge_parallel_category; + struct traversal_category + : public virtual vertex_list_graph_tag, + public virtual edge_list_graph_tag { }; + + typedef std::size_t vertices_size_type; + typedef VertexIterator vertex_iterator; + typedef typename std::iterator_traits::value_type + vertex_descriptor; + + typedef EdgeIterator edge_iterator; + typedef typename std::iterator_traits::value_type + edge_descriptor; + + typedef std::size_t edges_size_type; + + typedef void adjacency_iterator; + typedef void out_edge_iterator; + typedef void in_edge_iterator; + typedef void degree_size_type; + + static vertex_descriptor null_vertex() + { return traits_type::null_vertex(); } + + vertex_and_edge_range(const Graph& g, + VertexIterator first_v, VertexIterator last_v, + vertices_size_type n, + EdgeIterator first_e, EdgeIterator last_e, + edges_size_type m) + : g(&g), + first_vertex(first_v), last_vertex(last_v), m_num_vertices(n), + first_edge(first_e), last_edge(last_e), m_num_edges(m) + { + } + + vertex_and_edge_range(const Graph& g, + VertexIterator first_v, VertexIterator last_v, + EdgeIterator first_e, EdgeIterator last_e) + : g(&g), + first_vertex(first_v), last_vertex(last_v), + first_edge(first_e), last_edge(last_e) + { + m_num_vertices = std::distance(first_v, last_v); + m_num_edges = std::distance(first_e, last_e); + } + + const Graph* g; + vertex_iterator first_vertex; + vertex_iterator last_vertex; + vertices_size_type m_num_vertices; + edge_iterator first_edge; + edge_iterator last_edge; + edges_size_type m_num_edges; + }; + + template + inline std::pair + vertices(const vertex_and_edge_range& g) + { return std::make_pair(g.first_vertex, g.last_vertex); } + + template + inline typename vertex_and_edge_range + ::vertices_size_type + num_vertices(const vertex_and_edge_range& g) + { return g.m_num_vertices; } + + template + inline std::pair + edges(const vertex_and_edge_range& g) + { return std::make_pair(g.first_edge, g.last_edge); } + + template + inline typename vertex_and_edge_range + ::edges_size_type + num_edges(const vertex_and_edge_range& g) + { return g.m_num_edges; } + + template + inline typename vertex_and_edge_range + ::vertex_descriptor + source(typename vertex_and_edge_range + ::edge_descriptor e, + const vertex_and_edge_range& g) + { return source(e, *g.g); } + + template + inline typename vertex_and_edge_range + ::vertex_descriptor + target(typename vertex_and_edge_range + ::edge_descriptor e, + const vertex_and_edge_range& g) + { return target(e, *g.g); } + + template + inline vertex_and_edge_range + make_vertex_and_edge_range(const Graph& g, + VertexIterator first_v, VertexIterator last_v, + EdgeIterator first_e, EdgeIterator last_e) + { + typedef vertex_and_edge_range + result_type; + return result_type(g, first_v, last_v, first_e, last_e); + } + +} // end namespace graph + +using graph::vertex_and_edge_range; +using graph::make_vertex_and_edge_range; + +} // end namespace boost +#endif // BOOST_GRAPH_VERTEX_AND_EDGE_RANGE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/visitors.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/visitors.hpp new file mode 100644 index 0000000000..f986c96ce4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/visitors.hpp @@ -0,0 +1,320 @@ +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +// Revision History: +// 01 April 2001: Modified to use new header. (JMaddock) +// +#ifndef BOOST_GRAPH_GRAPH_SEARCH_VISITORS_HPP +#define BOOST_GRAPH_GRAPH_SEARCH_VISITORS_HPP + +#include +#include +#include +#include +#include +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// Stay out of the way of the concept checking class +# define Graph Graph_ +#endif + +namespace boost { + + // This is a bit more convenient than std::numeric_limits because + // you don't have to explicitly provide type T. + template + inline T numeric_limits_max(T) { return (std::numeric_limits::max)(); } + + //======================================================================== + // Event Tags + + namespace detail { + // For partial specialization workaround + enum event_visitor_enum + { on_no_event_num, + on_initialize_vertex_num, on_start_vertex_num, + on_discover_vertex_num, on_finish_vertex_num, on_examine_vertex_num, + on_examine_edge_num, on_tree_edge_num, on_non_tree_edge_num, + on_gray_target_num, on_black_target_num, + on_forward_or_cross_edge_num, on_back_edge_num, + on_edge_relaxed_num, on_edge_not_relaxed_num, + on_edge_minimized_num, on_edge_not_minimized_num + }; + + template + struct functor_to_visitor : Visitor + { + typedef Event event_filter; + functor_to_visitor(const Visitor& visitor) : Visitor(visitor) {} + }; + + } // namespace detail + + struct on_no_event { enum { num = detail::on_no_event_num }; }; + + struct on_initialize_vertex { + enum { num = detail::on_initialize_vertex_num }; }; + struct on_start_vertex { enum { num = detail::on_start_vertex_num }; }; + struct on_discover_vertex { enum { num = detail::on_discover_vertex_num }; }; + struct on_examine_vertex { enum { num = detail::on_examine_vertex_num }; }; + struct on_finish_vertex { enum { num = detail::on_finish_vertex_num }; }; + + struct on_examine_edge { enum { num = detail::on_examine_edge_num }; }; + struct on_tree_edge { enum { num = detail::on_tree_edge_num }; }; + struct on_non_tree_edge { enum { num = detail::on_non_tree_edge_num }; }; + struct on_gray_target { enum { num = detail::on_gray_target_num }; }; + struct on_black_target { enum { num = detail::on_black_target_num }; }; + struct on_forward_or_cross_edge { + enum { num = detail::on_forward_or_cross_edge_num }; }; + struct on_back_edge { enum { num = detail::on_back_edge_num }; }; + + struct on_edge_relaxed { enum { num = detail::on_edge_relaxed_num }; }; + struct on_edge_not_relaxed { + enum { num = detail::on_edge_not_relaxed_num }; }; + struct on_edge_minimized { enum { num = detail::on_edge_minimized_num }; }; + struct on_edge_not_minimized { + enum { num = detail::on_edge_not_minimized_num }; }; + + //======================================================================== + // base_visitor and null_visitor + + // needed for MSVC workaround + template + struct base_visitor { + typedef on_no_event event_filter; + template + void operator()(T, Graph&) { } + }; + + struct null_visitor : public base_visitor { + typedef on_no_event event_filter; + template + void operator()(T, Graph&) { } + }; + + //======================================================================== + // The invoke_visitors() function + + namespace detail { + template + inline void invoke_dispatch(Visitor& v, T x, Graph& g, mpl::true_) { + v(x, g); + } + + template + inline void invoke_dispatch(Visitor&, T, Graph&, mpl::false_) + { } + } // namespace detail + + template + inline void + invoke_visitors(std::pair& vlist, T x, Graph& g, Tag tag) { + typedef typename Visitor::event_filter Category; + typedef typename is_same::type IsSameTag; + detail::invoke_dispatch(vlist.first, x, g, IsSameTag()); + invoke_visitors(vlist.second, x, g, tag); + } +#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 + template + inline void + invoke_visitors(base_visitor& vis, T x, Graph& g, Tag) { + typedef typename Visitor::event_filter Category; + typedef typename is_same::type IsSameTag; + Visitor& v = static_cast(vis); + detail::invoke_dispatch(v, x, g, IsSameTag()); + } +#else + template + inline void + invoke_visitors(Visitor& v, T x, Graph& g, Tag) { + typedef typename Visitor::event_filter Category; + typedef typename is_same::type IsSameTag; + detail::invoke_dispatch(v, x, g, IsSameTag()); + } +#endif + + //======================================================================== + // predecessor_recorder + + template + struct predecessor_recorder + : public base_visitor > + { + typedef Tag event_filter; + predecessor_recorder(PredecessorMap pa) : m_predecessor(pa) { } + template + void operator()(Edge e, const Graph& g) { + put(m_predecessor, target(e, g), source(e, g)); + } + PredecessorMap m_predecessor; + }; + template + predecessor_recorder + record_predecessors(PredecessorMap pa, Tag) { + return predecessor_recorder (pa); + } + + //======================================================================== + // edge_predecessor_recorder + + template + struct edge_predecessor_recorder + : public base_visitor > + { + typedef Tag event_filter; + edge_predecessor_recorder(PredEdgeMap pa) : m_predecessor(pa) { } + template + void operator()(Edge e, const Graph& g) { + put(m_predecessor, target(e, g), e); + } + PredEdgeMap m_predecessor; + }; + template + edge_predecessor_recorder + record_edge_predecessors(PredEdgeMap pa, Tag) { + return edge_predecessor_recorder (pa); + } + + //======================================================================== + // distance_recorder + + template + struct distance_recorder + : public base_visitor > + { + typedef Tag event_filter; + distance_recorder(DistanceMap pa) : m_distance(pa) { } + template + void operator()(Edge e, const Graph& g) { + typename graph_traits::vertex_descriptor + u = source(e, g), v = target(e, g); + put(m_distance, v, get(m_distance, u) + 1); + } + DistanceMap m_distance; + }; + template + distance_recorder + record_distances(DistanceMap pa, Tag) { + return distance_recorder (pa); + } + + //======================================================================== + // time_stamper + + + template + struct time_stamper + : public base_visitor > + { + typedef Tag event_filter; + time_stamper(TimeMap pa, TimeT& t) : m_time_pa(pa), m_time(t) { } + template + void operator()(Vertex u, const Graph&) { + put(m_time_pa, u, ++m_time); + } + TimeMap m_time_pa; + TimeT& m_time; + }; + template + time_stamper + stamp_times(TimeMap pa, TimeT& time_counter, Tag) { + return time_stamper(pa, time_counter); + } + + //======================================================================== + // property_writer + + template + struct property_writer + : public base_visitor > + { + typedef Tag event_filter; + + property_writer(PA pa, OutputIterator out) : m_pa(pa), m_out(out) { } + + template + void operator()(T x, Graph&) { *m_out++ = get(m_pa, x); } + PA m_pa; + OutputIterator m_out; + }; + template + property_writer + write_property(PA pa, OutputIterator out, Tag) { + return property_writer(pa, out); + } + + //======================================================================== + // property_put + + /** + * Functor which just sets a given value to a vertex or edge in a property map. + */ + + template + struct property_put + { + typedef EventTag event_filter; + + property_put (PropertyMap property_map, + typename property_traits ::value_type value) : + property_map_ (property_map), value_ (value) + {} + + template + void operator() (VertexOrEdge v, const Graph& g) + { + put (property_map_, v, value_); + } + + private: + PropertyMap property_map_; + typename property_traits ::value_type value_; + }; + + /** + * Creates a property_put functor which just sets a given value to a vertex or edge. + * + * @param property_map Given writeable property map + * @param value Fixed value of the map + * @param tag Event Filter + * @return The functor. + */ + + template + inline property_put + put_property (PropertyMap property_map, + typename property_traits ::value_type value, + EventTag tag) + { + return property_put (property_map, value); + } + +#define BOOST_GRAPH_EVENT_STUB(Event,Kind) \ + typedef ::boost::Event Event##_type; \ + template \ + Kind##_visitor, Visitors> > \ + do_##Event(Visitor visitor) \ + { \ + typedef std::pair, \ + Visitors> visitor_list; \ + typedef Kind##_visitor result_type; \ + return result_type(visitor_list(visitor, m_vis)); \ + } + +} /* namespace boost */ + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// Stay out of the way of the concept checking class +# undef Graph +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/wavefront.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/wavefront.hpp new file mode 100644 index 0000000000..4d9c909c70 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/wavefront.hpp @@ -0,0 +1,135 @@ +// +//======================================================================= +// Copyright 2002 Marc Wintermantel (wintermantel@even-ag.ch) +// ETH Zurich, Center of Structure Technologies (www.imes.ethz.ch/st) +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +#ifndef BOOST_GRAPH_WAVEFRONT_HPP +#define BOOST_GRAPH_WAVEFRONT_HPP + +#include +#include +#include +#include +#include +#include +#include // for std::min and std::max + +namespace boost { + + template + typename graph_traits::vertices_size_type + ith_wavefront(typename graph_traits::vertex_descriptor i, + const Graph& g, + VertexIndexMap index) + { + typename graph_traits::vertex_descriptor v, w; + typename graph_traits::vertices_size_type b = 1; + typename graph_traits::out_edge_iterator edge_it2, edge_it2_end; + typename graph_traits::vertices_size_type index_i = index[i]; + std::vector rows_active(num_vertices(g), false); + + rows_active[index_i] = true; + + typename graph_traits::vertex_iterator ui, ui_end; + for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) + { + v = *ui; + if(index[v] <= index_i) + { + for (boost::tie(edge_it2, edge_it2_end) = out_edges(v, g); edge_it2 != edge_it2_end; ++edge_it2) + { + w = target(*edge_it2, g); + if( (index[w] >= index_i) && (!rows_active[index[w]]) ) + { + b++; + rows_active[index[w]] = true; + } + } + } + } + + return b; + } + + + template + typename graph_traits::vertices_size_type + ith_wavefront(typename graph_traits::vertex_descriptor i, + const Graph& g) + { + return ith_wavefront(i, g, get(vertex_index, g)); + } + + + template + typename graph_traits::vertices_size_type + max_wavefront(const Graph& g, VertexIndexMap index) + { + BOOST_USING_STD_MAX(); + typename graph_traits::vertices_size_type b = 0; + typename graph_traits::vertex_iterator i, end; + for (boost::tie(i, end) = vertices(g); i != end; ++i) + b = max BOOST_PREVENT_MACRO_SUBSTITUTION(b, ith_wavefront(*i, g, index)); + return b; + } + + template + typename graph_traits::vertices_size_type + max_wavefront(const Graph& g) + { + return max_wavefront(g, get(vertex_index, g)); + } + + + template + double + aver_wavefront(const Graph& g, VertexIndexMap index) + { + double b = 0; + typename graph_traits::vertex_iterator i, end; + for (boost::tie(i, end) = vertices(g); i != end; ++i) + b += ith_wavefront(*i, g, index); + + b /= num_vertices(g); + return b; + } + + template + double + aver_wavefront(const Graph& g) + { + return aver_wavefront(g, get(vertex_index, g)); + } + + + template + double + rms_wavefront(const Graph& g, VertexIndexMap index) + { + double b = 0; + typename graph_traits::vertex_iterator i, end; + for (boost::tie(i, end) = vertices(g); i != end; ++i) + b += std::pow(double ( ith_wavefront(*i, g, index) ), 2.0); + + b /= num_vertices(g); + + return std::sqrt(b); + } + + template + double + rms_wavefront(const Graph& g) + { + return rms_wavefront(g, get(vertex_index, g)); + } + + +} // namespace boost + +#endif // BOOST_GRAPH_WAVEFRONT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/graph/write_dimacs.hpp b/deal.II/contrib/boost-1.45.0/include/boost/graph/write_dimacs.hpp new file mode 100644 index 0000000000..0b8af17df4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/graph/write_dimacs.hpp @@ -0,0 +1,72 @@ +// Copyright (c) 2006, Stephan Diederich +// +// This code may be used under either of the following two licences: +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. OF SUCH DAMAGE. +// +// Or: +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +/* + Writes maximal flow problem in extended DIMACS format to an OutputIterator + Vertex indices are read from an IndexMap and shiftet by 1. + so their new range is [1..num_vertices(g)] +*/ + +/* ----------------------------------------------------------------- */ + +#include +#include +#include + +namespace boost { + +template +void write_dimacs_max_flow(const Graph& g, + CapacityMap capacity, + IndexMap idx, + typename graph_traits::vertex_descriptor src, + typename graph_traits::vertex_descriptor sink, + std::ostream& out) +{ + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::vertices_size_type vertices_size_type; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::edges_size_type edges_size_type; + typedef typename graph_traits::edge_iterator edge_iterator; + + out << "c DIMACS max-flow file generated from boost::write_dimacs_max_flow" << std::endl; + out << "p max " << num_vertices(g) << " " << num_edges(g) << std::endl; //print problem description "max" and number of verts and edges + out << "n " << get(idx, src) + 1 << " s" << std::endl;; //say which one is source + out << "n " << get(idx, sink) + 1 << " t" << std::endl; //say which one is sink + + //output the edges + edge_iterator ei, e_end; + for(tie(ei,e_end) = edges(g); ei!=e_end; ++ei){ + out << "a " << idx[ source(*ei, g) ] + 1 << " " << idx[ target(*ei, g) ] + 1 << " " << get(capacity,*ei) << std::endl; + } +} + +} // namespace boost diff --git a/deal.II/contrib/boost-1.45.0/include/boost/implicit_cast.hpp b/deal.II/contrib/boost-1.45.0/include/boost/implicit_cast.hpp new file mode 100644 index 0000000000..5b1cd92b9b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/implicit_cast.hpp @@ -0,0 +1,29 @@ +// Copyright David Abrahams 2003. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef IMPLICIT_CAST_DWA200356_HPP +# define IMPLICIT_CAST_DWA200356_HPP + +# include + +namespace boost { + +// implementation originally suggested by C. Green in +// http://lists.boost.org/MailArchives/boost/msg00886.php + +// The use of identity creates a non-deduced form, so that the +// explicit template argument must be supplied +template +inline T implicit_cast (typename mpl::identity::type x) { + return x; +} + +// incomplete return type now is here +//template +//void implicit_cast (...); + +} // namespace boost + + +#endif // IMPLICIT_CAST_DWA200356_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/indirect_reference.hpp b/deal.II/contrib/boost-1.45.0/include/boost/indirect_reference.hpp new file mode 100644 index 0000000000..5fbb342319 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/indirect_reference.hpp @@ -0,0 +1,43 @@ +#ifndef INDIRECT_REFERENCE_DWA200415_HPP +# define INDIRECT_REFERENCE_DWA200415_HPP + +// +// Copyright David Abrahams 2004. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// typename indirect_reference

::type provides the type of *p. +// +// http://www.boost.org/libs/iterator/doc/pointee.html +// + +# include +# include +# include +# include +# include + +namespace boost { + +namespace detail +{ + template + struct smart_ptr_reference + { + typedef typename boost::pointee

::type& type; + }; +} + +template +struct indirect_reference + : mpl::eval_if< + detail::is_incrementable

+ , iterator_reference

+ , detail::smart_ptr_reference

+ > +{ +}; + +} // namespace boost + +#endif // INDIRECT_REFERENCE_DWA200415_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/integer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/integer.hpp new file mode 100644 index 0000000000..fc0b3983b9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/integer.hpp @@ -0,0 +1,257 @@ +// boost integer.hpp header file -------------------------------------------// + +// Copyright Beman Dawes and Daryle Walker 1999. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +// Revision History +// 22 Sep 01 Added value-based integer templates. (Daryle Walker) +// 01 Apr 01 Modified to use new header. (John Maddock) +// 30 Jul 00 Add typename syntax fix (Jens Maurer) +// 28 Aug 99 Initial version + +#ifndef BOOST_INTEGER_HPP +#define BOOST_INTEGER_HPP + +#include // self include + +#include // for boost::::boost::integer_traits +#include // for ::std::numeric_limits +#include // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// boost/integer.hpp:77:30: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + + // Helper templates ------------------------------------------------------// + + // fast integers from least integers + // int_fast_t<> works correctly for unsigned too, in spite of the name. + template< typename LeastInt > + struct int_fast_t + { + typedef LeastInt fast; + typedef fast type; + }; // imps may specialize + + namespace detail{ + + // convert category to type + template< int Category > struct int_least_helper {}; // default is empty + + // specializatons: 1=long, 2=int, 3=short, 4=signed char, + // 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char + // no specializations for 0 and 5: requests for a type > long are in error +#ifdef BOOST_HAS_LONG_LONG + template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; +#elif defined(BOOST_HAS_MS_INT64) + template<> struct int_least_helper<1> { typedef __int64 least; }; +#endif + template<> struct int_least_helper<2> { typedef long least; }; + template<> struct int_least_helper<3> { typedef int least; }; + template<> struct int_least_helper<4> { typedef short least; }; + template<> struct int_least_helper<5> { typedef signed char least; }; +#ifdef BOOST_HAS_LONG_LONG + template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; }; +#elif defined(BOOST_HAS_MS_INT64) + template<> struct int_least_helper<6> { typedef unsigned __int64 least; }; +#endif + template<> struct int_least_helper<7> { typedef unsigned long least; }; + template<> struct int_least_helper<8> { typedef unsigned int least; }; + template<> struct int_least_helper<9> { typedef unsigned short least; }; + template<> struct int_least_helper<10> { typedef unsigned char least; }; + + template + struct exact_signed_base_helper{}; + template + struct exact_unsigned_base_helper{}; + + template <> struct exact_signed_base_helper { typedef signed char exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; +#if USHRT_MAX != UCHAR_MAX + template <> struct exact_signed_base_helper { typedef short exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; +#endif +#if UINT_MAX != USHRT_MAX + template <> struct exact_signed_base_helper { typedef int exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; +#endif +#if ULONG_MAX != UINT_MAX + template <> struct exact_signed_base_helper { typedef long exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; +#endif +#if defined(BOOST_HAS_LONG_LONG) &&\ + ((defined(ULLONG_MAX) && (ULLONG_MAX != ULONG_MAX)) ||\ + (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX != ULONG_MAX)) ||\ + (defined(ULONGLONG_MAX) && (ULONGLONG_MAX != ULONG_MAX)) ||\ + (defined(_ULLONG_MAX) && (_ULLONG_MAX != ULONG_MAX))) + template <> struct exact_signed_base_helper { typedef boost::long_long_type exact; }; + template <> struct exact_unsigned_base_helper { typedef boost::ulong_long_type exact; }; +#endif + + + } // namespace detail + + // integer templates specifying number of bits ---------------------------// + + // signed + template< int Bits > // bits (including sign) required + struct int_t : public detail::exact_signed_base_helper + { + typedef typename detail::int_least_helper + < +#ifdef BOOST_HAS_LONG_LONG + (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + +#else + 1 + +#endif + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + >::least least; + typedef typename int_fast_t::type fast; + }; + + // unsigned + template< int Bits > // bits required + struct uint_t : public detail::exact_unsigned_base_helper + { +#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T) + // It's really not clear why this workaround should be needed... shrug I guess! JM + BOOST_STATIC_CONSTANT(int, s = + 6 + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits)); + typedef typename detail::int_least_helper< ::boost::uint_t::s>::least least; +#else + typedef typename detail::int_least_helper + < + 5 + +#ifdef BOOST_HAS_LONG_LONG + (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + +#else + 1 + +#endif + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + >::least least; +#endif + typedef typename int_fast_t::type fast; + // int_fast_t<> works correctly for unsigned too, in spite of the name. + }; + + // integer templates specifying extreme value ----------------------------// + + // signed +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MaxValue > // maximum value to require support +#else + template< long MaxValue > // maximum value to require support +#endif + struct int_max_value_t + { + typedef typename detail::int_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MaxValue <= ::boost::integer_traits::const_max) + +#else + 1 + +#endif + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; + typedef typename int_fast_t::type fast; + }; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MinValue > // minimum value to require support +#else + template< long MinValue > // minimum value to require support +#endif + struct int_min_value_t + { + typedef typename detail::int_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MinValue >= ::boost::integer_traits::const_min) + +#else + 1 + +#endif + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + >::least least; + typedef typename int_fast_t::type fast; + }; + + // unsigned +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::ulong_long_type MaxValue > // minimum value to require support +#else + template< unsigned long MaxValue > // minimum value to require support +#endif + struct uint_value_t + { +#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) + // It's really not clear why this workaround should be needed... shrug I guess! JM +#if defined(BOOST_NO_INTEGRAL_INT64_T) + BOOST_STATIC_CONSTANT(unsigned, which = + 6 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; +#else // BOOST_NO_INTEGRAL_INT64_T + BOOST_STATIC_CONSTANT(unsigned, which = + 5 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; +#endif // BOOST_NO_INTEGRAL_INT64_T +#else + typedef typename detail::int_least_helper + < + 5 + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MaxValue <= ::boost::integer_traits::const_max) + +#else + 1 + +#endif + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; +#endif + typedef typename int_fast_t::type fast; + }; + + +} // namespace boost + +#endif // BOOST_INTEGER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/integer/integer_mask.hpp b/deal.II/contrib/boost-1.45.0/include/boost/integer/integer_mask.hpp new file mode 100644 index 0000000000..2acf7f7dff --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/integer/integer_mask.hpp @@ -0,0 +1,126 @@ +// Boost integer/integer_mask.hpp header file ------------------------------// + +// (C) Copyright Daryle Walker 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_INTEGER_INTEGER_MASK_HPP +#define BOOST_INTEGER_INTEGER_MASK_HPP + +#include // self include + +#include // for BOOST_STATIC_CONSTANT +#include // for boost::uint_t + +#include // for UCHAR_MAX, etc. +#include // for std::size_t + +#include // for std::numeric_limits + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// boost/integer/integer_mask.hpp:93:35: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + + +// Specified single-bit mask class declaration -----------------------------// +// (Lowest bit starts counting at 0.) + +template < std::size_t Bit > +struct high_bit_mask_t +{ + typedef typename uint_t<(Bit + 1)>::least least; + typedef typename uint_t<(Bit + 1)>::fast fast; + + BOOST_STATIC_CONSTANT( least, high_bit = (least( 1u ) << Bit) ); + BOOST_STATIC_CONSTANT( fast, high_bit_fast = (fast( 1u ) << Bit) ); + + BOOST_STATIC_CONSTANT( std::size_t, bit_position = Bit ); + +}; // boost::high_bit_mask_t + + +// Specified bit-block mask class declaration ------------------------------// +// Makes masks for the lowest N bits +// (Specializations are needed when N fills up a type.) + +template < std::size_t Bits > +struct low_bits_mask_t +{ + typedef typename uint_t::least least; + typedef typename uint_t::fast fast; + + BOOST_STATIC_CONSTANT( least, sig_bits = (~( ~(least( 0u )) << Bits )) ); + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); + + BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits ); + +}; // boost::low_bits_mask_t + + +#define BOOST_LOW_BITS_MASK_SPECIALIZE( Type ) \ + template < > struct low_bits_mask_t< std::numeric_limits::digits > { \ + typedef std::numeric_limits limits_type; \ + typedef uint_t::least least; \ + typedef uint_t::fast fast; \ + BOOST_STATIC_CONSTANT( least, sig_bits = (~( least(0u) )) ); \ + BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); \ + BOOST_STATIC_CONSTANT( std::size_t, bit_count = limits_type::digits ); \ + } + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4245) // 'initializing' : conversion from 'int' to 'const boost::low_bits_mask_t<8>::least', signed/unsigned mismatch +#endif + +BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned char ); + +#if USHRT_MAX > UCHAR_MAX +BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned short ); +#endif + +#if UINT_MAX > USHRT_MAX +BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned int ); +#endif + +#if ULONG_MAX > UINT_MAX +BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned long ); +#endif + +#if defined(BOOST_HAS_LONG_LONG) + #if ((defined(ULLONG_MAX) && (ULLONG_MAX > ULONG_MAX)) ||\ + (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX > ULONG_MAX)) ||\ + (defined(ULONGLONG_MAX) && (ULONGLONG_MAX > ULONG_MAX)) ||\ + (defined(_ULLONG_MAX) && (_ULLONG_MAX > ULONG_MAX))) + BOOST_LOW_BITS_MASK_SPECIALIZE( boost::ulong_long_type ); + #endif +#elif defined(BOOST_HAS_MS_INT64) + #if 18446744073709551615ui64 > ULONG_MAX + BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned __int64 ); + #endif +#endif + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#undef BOOST_LOW_BITS_MASK_SPECIALIZE + + +} // namespace boost + + +#endif // BOOST_INTEGER_INTEGER_MASK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/integer/static_log2.hpp b/deal.II/contrib/boost-1.45.0/include/boost/integer/static_log2.hpp new file mode 100644 index 0000000000..56c7a00125 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/integer/static_log2.hpp @@ -0,0 +1,127 @@ +// -------------- Boost static_log2.hpp header file ----------------------- // +// +// Copyright (C) 2001 Daryle Walker. +// Copyright (C) 2003 Vesa Karvonen. +// Copyright (C) 2003 Gennaro Prota. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// --------------------------------------------------- +// See http://www.boost.org/libs/integer for documentation. +// ------------------------------------------------------------------------- // + + +#ifndef BOOST_INTEGER_STATIC_LOG2_HPP +#define BOOST_INTEGER_STATIC_LOG2_HPP + +#include "boost/integer_fwd.hpp" // for boost::intmax_t + +namespace boost { + + namespace detail { + + namespace static_log2_impl { + + // choose_initial_n<> + // + // Recursively doubles its integer argument, until it + // becomes >= of the "width" (C99, 6.2.6.2p4) of + // static_log2_argument_type. + // + // Used to get the maximum power of two less then the width. + // + // Example: if on your platform argument_type has 48 value + // bits it yields n=32. + // + // It's easy to prove that, starting from such a value + // of n, the core algorithm works correctly for any width + // of static_log2_argument_type and that recursion always + // terminates with x = 1 and n = 0 (see the algorithm's + // invariant). + + typedef boost::static_log2_argument_type argument_type; + typedef boost::static_log2_result_type result_type; + + template + struct choose_initial_n { + + BOOST_STATIC_CONSTANT(bool, c = (argument_type(1) << n << n) != 0); + BOOST_STATIC_CONSTANT( + result_type, + value = !c*n + choose_initial_n<2*c*n>::value + ); + + }; + + template <> + struct choose_initial_n<0> { + BOOST_STATIC_CONSTANT(result_type, value = 0); + }; + + + + // start computing from n_zero - must be a power of two + const result_type n_zero = 16; + const result_type initial_n = choose_initial_n::value; + + // static_log2_impl<> + // + // * Invariant: + // 2n + // 1 <= x && x < 2 at the start of each recursion + // (see also choose_initial_n<>) + // + // * Type requirements: + // + // argument_type maybe any unsigned type with at least n_zero + 1 + // value bits. (Note: If larger types will be standardized -e.g. + // unsigned long long- then the argument_type typedef can be + // changed without affecting the rest of the code.) + // + + template + struct static_log2_impl { + + BOOST_STATIC_CONSTANT(bool, c = (x >> n) > 0); // x >= 2**n ? + BOOST_STATIC_CONSTANT( + result_type, + value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) + ); + + }; + + template <> + struct static_log2_impl<1, 0> { + BOOST_STATIC_CONSTANT(result_type, value = 0); + }; + + } + } // detail + + + + // -------------------------------------- + // static_log2 + // ---------------------------------------- + + template + struct static_log2 { + + BOOST_STATIC_CONSTANT( + static_log2_result_type, + value = detail::static_log2_impl::static_log2_impl::value + ); + + }; + + + template <> + struct static_log2<0> { }; + +} + + + +#endif // include guard diff --git a/deal.II/contrib/boost-1.45.0/include/boost/integer/static_min_max.hpp b/deal.II/contrib/boost-1.45.0/include/boost/integer/static_min_max.hpp new file mode 100644 index 0000000000..ee76fd424a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/integer/static_min_max.hpp @@ -0,0 +1,51 @@ +// Boost integer/static_min_max.hpp header file ----------------------------// + +// (C) Copyright Daryle Walker 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_INTEGER_STATIC_MIN_MAX_HPP +#define BOOST_INTEGER_STATIC_MIN_MAX_HPP + +#include // self include + +namespace boost +{ + +// Compile-time extrema class declarations ---------------------------------// +// Get the minimum or maximum of two values, signed or unsigned. + +template +struct static_signed_min +{ + BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 > Value2) ? Value2 : Value1 ); +}; + +template +struct static_signed_max +{ + BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 < Value2) ? Value2 : Value1 ); +}; + +template +struct static_unsigned_min +{ + BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value + = (Value1 > Value2) ? Value2 : Value1 ); +}; + +template +struct static_unsigned_max +{ + BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value + = (Value1 < Value2) ? Value2 : Value1 ); +}; + + +} // namespace boost + + +#endif // BOOST_INTEGER_STATIC_MIN_MAX_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/integer_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/integer_fwd.hpp new file mode 100644 index 0000000000..20eff2bcf6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/integer_fwd.hpp @@ -0,0 +1,164 @@ +// Boost integer_fwd.hpp header file ---------------------------------------// + +// (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/integer for documentation. + +#ifndef BOOST_INTEGER_FWD_HPP +#define BOOST_INTEGER_FWD_HPP + +#include // for UCHAR_MAX, etc. +#include // for std::size_t + +#include // for BOOST_NO_INTRINSIC_WCHAR_T +#include // for std::numeric_limits +#include // For intmax_t + + +namespace boost +{ + +#ifdef BOOST_NO_INTEGRAL_INT64_T + typedef unsigned long static_log2_argument_type; + typedef int static_log2_result_type; + typedef long static_min_max_signed_type; + typedef unsigned long static_min_max_unsigned_type; +#else + typedef boost::uintmax_t static_min_max_unsigned_type; + typedef boost::intmax_t static_min_max_signed_type; + typedef boost::uintmax_t static_log2_argument_type; + typedef int static_log2_result_type; +#endif + +// From ------------------------------------------------// + +// Only has typedefs or using statements, with #conditionals + + +// From -----------------------------------------// + +template < class T > + class integer_traits; + +template < > + class integer_traits< bool >; + +template < > + class integer_traits< char >; + +template < > + class integer_traits< signed char >; + +template < > + class integer_traits< unsigned char >; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template < > + class integer_traits< wchar_t >; +#endif + +template < > + class integer_traits< short >; + +template < > + class integer_traits< unsigned short >; + +template < > + class integer_traits< int >; + +template < > + class integer_traits< unsigned int >; + +template < > + class integer_traits< long >; + +template < > + class integer_traits< unsigned long >; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) +template < > +class integer_traits< ::boost::long_long_type>; + +template < > +class integer_traits< ::boost::ulong_long_type >; +#elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64) +template < > +class integer_traits<__int64>; + +template < > +class integer_traits; +#endif + + +// From ------------------------------------------------// + +template < typename LeastInt > + struct int_fast_t; + +template< int Bits > + struct int_t; + +template< int Bits > + struct uint_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MaxValue > // maximum value to require support +#else + template< long MaxValue > // maximum value to require support +#endif + struct int_max_value_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MinValue > // minimum value to require support +#else + template< long MinValue > // minimum value to require support +#endif + struct int_min_value_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::ulong_long_type MaxValue > // maximum value to require support +#else + template< unsigned long MaxValue > // maximum value to require support +#endif + struct uint_value_t; + + +// From -----------------------------------// + +template < std::size_t Bit > + struct high_bit_mask_t; + +template < std::size_t Bits > + struct low_bits_mask_t; + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + +// From ------------------------------------// + +template + struct static_log2; + +template <> struct static_log2<0u>; + + +// From ---------------------------------// + +template + struct static_signed_min; + +template + struct static_signed_max; + +template + struct static_unsigned_min; + +template + struct static_unsigned_max; + +} // namespace boost + + +#endif // BOOST_INTEGER_FWD_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/integer_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/integer_traits.hpp new file mode 100644 index 0000000000..129ce82c65 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/integer_traits.hpp @@ -0,0 +1,261 @@ +/* boost integer_traits.hpp header file + * + * Copyright Jens Maurer 2000 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * $Id: integer_traits.hpp 58381 2009-12-14 18:14:48Z johnmaddock $ + * + * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers + */ + +// See http://www.boost.org/libs/integer for documentation. + + +#ifndef BOOST_INTEGER_TRAITS_HPP +#define BOOST_INTEGER_TRAITS_HPP + +#include +#include + +// These are an implementation detail and not part of the interface +#include +// we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it, +// and some may have but not ... +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__)) +#include +#endif + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// ../../../boost/integer_traits.hpp:164:66: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost { +template +class integer_traits : public std::numeric_limits +{ +public: + BOOST_STATIC_CONSTANT(bool, is_integral = false); +}; + +namespace detail { +template +class integer_traits_base +{ +public: + BOOST_STATIC_CONSTANT(bool, is_integral = true); + BOOST_STATIC_CONSTANT(T, const_min = min_val); + BOOST_STATIC_CONSTANT(T, const_max = max_val); +}; + +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +// A definition is required even for integral static constants +template +const bool integer_traits_base::is_integral; + +template +const T integer_traits_base::const_min; + +template +const T integer_traits_base::const_max; +#endif + +} // namespace detail + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template<> +class integer_traits + : public std::numeric_limits, + // Don't trust WCHAR_MIN and WCHAR_MAX with Mac OS X's native + // library: they are wrong! +#if defined(WCHAR_MIN) && defined(WCHAR_MAX) && !defined(__APPLE__) + public detail::integer_traits_base +#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) + // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned: + public detail::integer_traits_base +#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\ + || (defined __APPLE__)\ + || (defined(__OpenBSD__) && defined(__GNUC__))\ + || (defined(__NetBSD__) && defined(__GNUC__))\ + || (defined(__FreeBSD__) && defined(__GNUC__))\ + || (defined(__DragonFly__) && defined(__GNUC__))\ + || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT)) + // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int. + // - SGI MIPSpro with native library + // - gcc 3.x on HP-UX + // - Mac OS X with native library + // - gcc on FreeBSD, OpenBSD and NetBSD + public detail::integer_traits_base +#elif defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 2) && !defined(__SGI_STL_PORT) + // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as unsigned int. + // - gcc 2.95.x on HP-UX + // (also, std::numeric_limits appears to return the wrong values). + public detail::integer_traits_base +#else +#error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler. +#endif +{ }; +#endif // BOOST_NO_INTRINSIC_WCHAR_T + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) +#if defined(ULLONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, LLONG_MIN, LLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULLONG_MAX> +{ }; + +#elif defined(ULONG_LONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, LONG_LONG_MIN, LONG_LONG_MAX>{ }; +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONG_LONG_MAX> +{ }; + +#elif defined(ULONGLONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, LONGLONG_MIN, LONGLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONGLONG_MAX> +{ }; + +#elif defined(_LLONG_MAX) && defined(_C2) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, -_LLONG_MAX - _C2, _LLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, _ULLONG_MAX> +{ }; + +#elif defined(BOOST_HAS_LONG_LONG) +// +// we have long long but no constants, this happens for example with gcc in -ansi mode, +// we'll just have to work out the values for ourselves (assumes 2's compliment representation): +// +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, (1LL << (sizeof(::boost::long_long_type) - 1)), ~(1LL << (sizeof(::boost::long_long_type) - 1))> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL> +{ }; + +#elif defined(BOOST_HAS_MS_INT64) + +template<> +class integer_traits< __int64> + : public std::numeric_limits< __int64>, + public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX> +{ }; + +template<> +class integer_traits< unsigned __int64> + : public std::numeric_limits< unsigned __int64>, + public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX> +{ }; + +#endif +#endif + +} // namespace boost + +#endif /* BOOST_INTEGER_TRAITS_HPP */ + + + diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/any_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/any_hook.hpp new file mode 100644 index 0000000000..b1b0194757 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/any_hook.hpp @@ -0,0 +1,344 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_ANY_HOOK_HPP +#define BOOST_INTRUSIVE_ANY_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond +template +struct get_any_node_algo +{ + typedef any_algorithms type; +}; +/// @endcond + +//! Helper metafunction to define a \c \c any_base_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_any_base_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_any_node_algo + , typename packed_options::tag + , packed_options::link_mode + , detail::AnyBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Derive a class from this hook in order to store objects of that class +//! in an intrusive container. +//! +//! The hook admits the following options: \c tag<>, \c void_pointer<> and +//! \c link_mode<>. +//! +//! \c tag<> defines a tag to identify the node. +//! The same tag value can be used in different classes, but if a class is +//! derived from more than one \c any_base_hook, then each \c any_base_hook needs its +//! unique tag. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, \c safe_link). +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class any_base_hook + : public make_any_base_hook + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + any_base_hook(); + + //! Effects: If link_mode is or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + any_base_hook(const any_base_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + any_base_hook& operator=(const any_base_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a container an assertion is raised. + //! + //! Throws: Nothing. + ~any_base_hook(); + + //! Precondition: link_mode must be \c safe_link. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c container::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + #endif +}; + +//! Helper metafunction to define a \c \c any_member_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_any_member_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_any_node_algo + , member_tag + , packed_options::link_mode + , detail::NoBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Store this hook in a class to be inserted +//! in an intrusive container. +//! +//! The hook admits the following options: \c void_pointer<> and +//! \c link_mode<>. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link or \c safe_link). +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class any_member_hook + : public make_any_member_hook + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + any_member_hook(); + + //! Effects: If link_mode is or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + any_member_hook(const any_member_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + any_member_hook& operator=(const any_member_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a container an assertion is raised. + //! + //! Throws: Nothing. + ~any_member_hook(); + + //! Precondition: link_mode must be \c safe_link. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c container::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + #endif +}; + +/// @cond + +namespace detail{ + +template +struct any_to_get_base_pointer_type +{ + typedef typename pointer_to_other + ::type type; +}; + +template +struct any_to_get_member_pointer_type +{ + typedef typename pointer_to_other + ::type type; +}; + +//!This option setter specifies that the container +//!must use the specified base hook +template class NodeTraits> +struct any_to_some_hook +{ + typedef typename BaseHook::template pack::value_traits old_value_traits; + template + struct pack : public Base + { + struct value_traits : public old_value_traits + { + static const bool is_any_hook = true; + typedef typename detail::eval_if_c + < detail::internal_base_hook_bool_is_true::value + , any_to_get_base_pointer_type + , any_to_get_member_pointer_type + >::type void_pointer; + typedef NodeTraits node_traits; + }; + }; +}; + +} //namespace detail{ + +/// @endcond + +//!This option setter specifies that +//!any hook should behave as an slist hook +template +struct any_to_slist_hook +/// @cond + : public detail::any_to_some_hook +/// @endcond +{}; + +//!This option setter specifies that +//!any hook should behave as an list hook +template +struct any_to_list_hook +/// @cond + : public detail::any_to_some_hook +/// @endcond +{}; + +//!This option setter specifies that +//!any hook should behave as a set hook +template +struct any_to_set_hook +/// @cond + : public detail::any_to_some_hook +/// @endcond +{}; + +//!This option setter specifies that +//!any hook should behave as an avl_set hook +template +struct any_to_avl_set_hook +/// @cond + : public detail::any_to_some_hook +/// @endcond +{}; + +//!This option setter specifies that any +//!hook should behave as a bs_set hook +template +struct any_to_bs_set_hook +/// @cond + : public detail::any_to_some_hook +/// @endcond +{}; + +//!This option setter specifies that any hook +//!should behave as an unordered set hook +template +struct any_to_unordered_set_hook +/// @cond + : public detail::any_to_some_hook +/// @endcond +{}; + + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_ANY_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avl_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avl_set.hpp new file mode 100644 index 0000000000..1c13c624c3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avl_set.hpp @@ -0,0 +1,2324 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_AVL_SET_HPP +#define BOOST_INTRUSIVE_AVL_SET_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! The class template avl_set is an intrusive container, that mimics most of +//! the interface of std::set as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class avl_set_impl +{ + /// @cond + typedef avltree_impl tree_type; + //! This class is + //! non-copyable + avl_set_impl (const avl_set_impl&); + + //! This class is + //! non-assignable + avl_set_impl &operator =(const avl_set_impl&); + + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + + /// @cond + private: + tree_type tree_; + /// @endcond + + public: + //! Effects: Constructs an empty avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor of the value_compare object throws. + avl_set_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty avl_set and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is std::distance(last, first). + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + avl_set_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(true, b, e, cmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the avl_set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~avl_set_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of avl_set. + //! + //! Effects: Returns a const reference to the avl_set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static avl_set_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &avl_set_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of avl_set. + //! + //! Effects: Returns a const reference to the set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const avl_set_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &avl_set_impl::tree_); + } + + //! Precondition: it must be a valid iterator of set. + //! + //! Effects: Returns a reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static avl_set_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &avl_set_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of set. + //! + //! Effects: Returns a const reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const avl_set_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &avl_set_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the avl_set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns true is the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the avl_set. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two sets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(avl_set_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const avl_set_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Treaps to inserts value into the avl_set. + //! + //! Returns: If the value + //! is not already present inserts it and returns a pair containing the + //! iterator to the new value and true. If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert(reference value) + { return tree_.insert_unique(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Treaps to to insert x into the avl_set, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: An iterator that points to the position where the + //! new element was inserted into the avl_set. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_unique(hint, value); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the avl_set, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the avl_set. + template + std::pair insert_check + (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { return tree_.insert_unique_check(key, key_value_comp, commit_data); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the avl_set, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the avl_set. + template + std::pair insert_check + (const_iterator hint, const KeyType &key + ,KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { return tree_.insert_unique_check(hint, key, key_value_comp, commit_data); } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the avl_set between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the avl_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_commit(reference value, const insert_commit_data &commit_data) + { return tree_.insert_unique_commit(value, commit_data); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the avl_set. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_unique(b, e); } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate. "value" must not be equal to any + //! inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" or "value" is not unique tree ordering and uniqueness + //! invariants will be broken respectively. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { return tree_.insert_before(pos, value); } + + //! Requires: value must be an lvalue, and it must be greater than + //! any inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than or equal to the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { tree_.push_back(value); } + + //! Requires: value must be an lvalue, and it must be less + //! than any inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than or equal to the the mimum inserted key tree ordering or uniqueness + //! invariants will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { tree_.push_front(value); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size()) + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If the comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: If the internal value_compare ordering function throws. + //! + //! Complexity: O(log(size() + this->count(value)). Basic guarantee. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) const + { return tree_.find(value) != end(); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp) != end(); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound(const_reference value) const + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound(const_reference value) const + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find(const_reference value) const + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range(const_reference value) const + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range(key, comp); } + + //! Requires: value must be an lvalue and shall be in a avl_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the avl_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a avl_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! avl_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a avl_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the avl_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a avl_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! avl_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a avl_set/avl_multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + /// @cond + friend bool operator==(const avl_set_impl &x, const avl_set_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const avl_set_impl &x, const avl_set_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avl_set_impl &x, const avl_set_impl &y) +#else +(const avl_set_impl &x, const avl_set_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avl_set_impl &x, const avl_set_impl &y) +#else +(const avl_set_impl &x, const avl_set_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avl_set_impl &x, const avl_set_impl &y) +#else +(const avl_set_impl &x, const avl_set_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avl_set_impl &x, const avl_set_impl &y) +#else +(const avl_set_impl &x, const avl_set_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(avl_set_impl &x, avl_set_impl &y) +#else +(avl_set_impl &x, avl_set_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c avl_set that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_avl_set +{ + /// @cond + typedef avl_set_impl + < typename make_avltree_opt + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class avl_set + : public make_avl_set + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type +{ + typedef typename make_avl_set + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + avl_set( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + avl_set( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, v_traits) + {} + + static avl_set &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const avl_set &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static avl_set &container_from_iterator(iterator end_iterator) + { return static_cast(Base::container_from_iterator(end_iterator)); } + + static const avl_set &container_from_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_iterator(end_iterator)); } +}; + +#endif + +//! The class template avl_multiset is an intrusive container, that mimics most of +//! the interface of std::avl_multiset as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class avl_multiset_impl +{ + /// @cond + typedef avltree_impl tree_type; + + //Non-copyable and non-assignable + avl_multiset_impl (const avl_multiset_impl&); + avl_multiset_impl &operator =(const avl_multiset_impl&); + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + + /// @cond + private: + tree_type tree_; + /// @endcond + + public: + //! Effects: Constructs an empty avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + avl_multiset_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty avl_multiset and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is the distance between first and last + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + avl_multiset_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(false, b, e, cmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the avl_multiset + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~avl_multiset_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of avl_multiset. + //! + //! Effects: Returns a const reference to the avl_multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static avl_multiset_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &avl_multiset_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of avl_multiset. + //! + //! Effects: Returns a const reference to the avl_multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const avl_multiset_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &avl_multiset_impl::tree_); + } + + //! Precondition: it must be a valid iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static avl_multiset_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &avl_multiset_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const avl_multiset_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &avl_multiset_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the avl_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns true is the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the avl_multiset. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two avl_multisets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(avl_multiset_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const avl_multiset_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the avl_multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(reference value) + { return tree_.insert_equal(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts x into the avl_multiset, using pos as a hint to + //! where it will be inserted. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_equal(hint, value); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the avl_multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_equal(b, e); } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate. "value" must not be equal to any + //! inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" or "value" is not unique tree ordering and uniqueness + //! invariants will be broken respectively. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { return tree_.insert_before(pos, value); } + + //! Requires: value must be an lvalue, and it must be greater than + //! any inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than or equal to the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { tree_.push_back(value); } + + //! Requires: value must be an lvalue, and it must be less + //! than any inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than or equal to the the mimum inserted key tree ordering or uniqueness + //! invariants will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { tree_.push_front(value); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) const + { return tree_.count(value); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) const + { return tree_.count(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound(const_reference value) const + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound(const_reference value) const + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find(const_reference value) const + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range(const_reference value) const + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range(key, comp); } + + //! Requires: value must be an lvalue and shall be in a avl_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the avl_multiset + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a avl_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! avl_multiset that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a avl_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the avl_multiset + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a avl_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! avl_multiset that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a avl_multiset/avl_multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + /// @cond + friend bool operator==(const avl_multiset_impl &x, const avl_multiset_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const avl_multiset_impl &x, const avl_multiset_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avl_multiset_impl &x, const avl_multiset_impl &y) +#else +(const avl_multiset_impl &x, const avl_multiset_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avl_multiset_impl &x, const avl_multiset_impl &y) +#else +(const avl_multiset_impl &x, const avl_multiset_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avl_multiset_impl &x, const avl_multiset_impl &y) +#else +(const avl_multiset_impl &x, const avl_multiset_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avl_multiset_impl &x, const avl_multiset_impl &y) +#else +(const avl_multiset_impl &x, const avl_multiset_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(avl_multiset_impl &x, avl_multiset_impl &y) +#else +(avl_multiset_impl &x, avl_multiset_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c avl_multiset that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_avl_multiset +{ + /// @cond + typedef avl_multiset_impl + < typename make_avltree_opt + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class avl_multiset + : public make_avl_multiset::type +{ + typedef typename make_avl_multiset + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + avl_multiset( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + avl_multiset( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, v_traits) + {} + + static avl_multiset &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const avl_multiset &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static avl_multiset &container_from_iterator(iterator end_iterator) + { return static_cast(Base::container_from_iterator(end_iterator)); } + + static const avl_multiset &container_from_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_iterator(end_iterator)); } +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_AVL_SET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avl_set_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avl_set_hook.hpp new file mode 100644 index 0000000000..23b1f0bd8f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avl_set_hook.hpp @@ -0,0 +1,297 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_AVL_SET_HOOK_HPP +#define BOOST_INTRUSIVE_AVL_SET_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond +template +struct get_avl_set_node_algo +{ + typedef avltree_algorithms > type; +}; +/// @endcond + +//! Helper metafunction to define a \c avl_set_base_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_avl_set_base_hook +{ + /// @cond + typedef typename pack_options + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type packed_options; + + typedef detail::generic_hook + < get_avl_set_node_algo + , typename packed_options::tag + , packed_options::link_mode + , detail::AvlSetBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Derive a class from avl_set_base_hook in order to store objects in +//! in an avl_set/avl_multiset. avl_set_base_hook holds the data necessary to maintain +//! the avl_set/avl_multiset and provides an appropriate value_traits class for avl_set/avl_multiset. +//! +//! The hook admits the following options: \c tag<>, \c void_pointer<>, +//! \c link_mode<> and \c optimize_size<>. +//! +//! \c tag<> defines a tag to identify the node. +//! The same tag value can be used in different classes, but if a class is +//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its +//! unique tag. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c optimize_size<> will tell the hook to optimize the hook for size instead +//! of speed. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class avl_set_base_hook + : public make_avl_set_base_hook + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + avl_set_base_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + avl_set_base_hook(const avl_set_base_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + avl_set_base_hook& operator=(const avl_set_base_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~avl_set_base_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(avl_set_base_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +//! Helper metafunction to define a \c avl_set_member_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_avl_set_member_hook +{ + /// @cond + typedef typename pack_options + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type packed_options; + + typedef detail::generic_hook + < get_avl_set_node_algo + , member_tag + , packed_options::link_mode + , detail::NoBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Put a public data member avl_set_member_hook in order to store objects of this class in +//! an avl_set/avl_multiset. avl_set_member_hook holds the data necessary for maintaining the +//! avl_set/avl_multiset and provides an appropriate value_traits class for avl_set/avl_multiset. +//! +//! The hook admits the following options: \c void_pointer<>, +//! \c link_mode<> and \c optimize_size<>. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c optimize_size<> will tell the hook to optimize the hook for size instead +//! of speed. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class avl_set_member_hook + : public make_avl_set_member_hook + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + avl_set_member_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + avl_set_member_hook(const avl_set_member_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + avl_set_member_hook& operator=(const avl_set_member_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~avl_set_member_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(avl_set_member_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_AVL_SET_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avltree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avltree.hpp new file mode 100644 index 0000000000..4b6e0899ed --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avltree.hpp @@ -0,0 +1,1647 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_AVLTREE_HPP +#define BOOST_INTRUSIVE_AVLTREE_HPP + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond + +template +struct avl_setopt +{ + typedef ValueTraits value_traits; + typedef Compare compare; + typedef SizeType size_type; + static const bool constant_time_size = ConstantTimeSize; +}; + +template +struct avl_set_defaults + : pack_options + < none + , base_hook + , constant_time_size + , size_type + , compare > + >::type +{}; + +/// @endcond + +//! The class template avltree is an intrusive AVL tree container, that +//! is used to construct intrusive avl_set and avl_multiset containers. +//! The no-throw guarantee holds only, if the value_compare object +//! doesn't throw. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class avltree_impl + : private detail::clear_on_destructor_base > +{ + template friend class detail::clear_on_destructor_base; + public: + typedef typename Config::value_traits value_traits; + /// @cond + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + /// @endcond + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::const_pointer const_pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef value_type key_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename Config::size_type size_type; + typedef typename Config::compare value_compare; + typedef value_compare key_compare; + typedef tree_iterator iterator; + typedef tree_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef avltree_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + static const bool stateful_value_traits = detail::store_cont_ptr_on_it::value; + + /// @cond + private: + typedef detail::size_holder size_traits; + + //noncopyable + avltree_impl (const avltree_impl&); + avltree_impl operator =(const avltree_impl&); + + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + //Constant-time size is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(constant_time_size && ((int)real_value_traits::link_mode == (int)auto_unlink))); + + struct header_plus_size : public size_traits + { node header_; }; + + struct node_plus_pred_t : public detail::ebo_functor_holder + { + node_plus_pred_t(const value_compare &comp) + : detail::ebo_functor_holder(comp) + {} + header_plus_size header_plus_size_; + }; + + struct data_t : public avltree_impl::value_traits + { + typedef typename avltree_impl::value_traits value_traits; + data_t(const value_compare & comp, const value_traits &val_traits) + : value_traits(val_traits), node_plus_pred_(comp) + {} + node_plus_pred_t node_plus_pred_; + } data_; + + const value_compare &priv_comp() const + { return data_.node_plus_pred_.get(); } + + value_compare &priv_comp() + { return data_.node_plus_pred_.get(); } + + const node &priv_header() const + { return data_.node_plus_pred_.header_plus_size_.header_; } + + node &priv_header() + { return data_.node_plus_pred_.header_plus_size_.header_; } + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(detail::boost_intrusive_get_pointer(ptr))); + } + + size_traits &priv_size_traits() + { return data_.node_plus_pred_.header_plus_size_; } + + const size_traits &priv_size_traits() const + { return data_.node_plus_pred_.header_plus_size_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_.get_value_traits(*this); } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_; } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_.get_value_traits(*this); } + + /// @endcond + + public: + + const real_value_traits &get_real_value_traits() const + { return this->get_real_value_traits(detail::bool_()); } + + real_value_traits &get_real_value_traits() + { return this->get_real_value_traits(detail::bool_()); } + + typedef typename node_algorithms::insert_commit_data insert_commit_data; + + //! Effects: Constructs an empty tree. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor of the value_compare object throws. Basic guarantee. + avltree_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + } + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty tree and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is the distance between first and last. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. Basic guarantee. + template + avltree_impl( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + if(unique) + this->insert_unique(b, e); + else + this->insert_equal(b, e); + } + + //! Effects: Detaches all elements from this. The objects in the set + //! are not deleted (i.e. no destructors are called), but the nodes according to + //! the value_traits template parameter are reinitialized and thus can be reused. + //! + //! Complexity: Linear to elements contained in *this. + //! + //! Throws: Nothing. + ~avltree_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return iterator (node_traits::get_left(node_ptr(&priv_header())), this); } + + //! Effects: Returns a const_iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return cbegin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return const_iterator (node_traits::get_left(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns an iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return iterator (node_ptr(&priv_header()), this); } + + //! Effects: Returns a const_iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return cend(); } + + //! Effects: Returns a const_iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return const_iterator (uncast(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return reverse_iterator(end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return const_reverse_iterator(begin()); } + + //! Precondition: end_iterator must be a valid end iterator + //! of avltree. + //! + //! Effects: Returns a const reference to the avltree associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static avltree_impl &container_from_end_iterator(iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of avltree. + //! + //! Effects: Returns a const reference to the avltree associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const avltree_impl &container_from_end_iterator(const_iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: it must be a valid iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the tree associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static avltree_impl &container_from_iterator(iterator it) + { return priv_container_from_iterator(it); } + + //! Precondition: it must be a valid end const_iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the tree associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const avltree_impl &container_from_iterator(const_iterator it) + { return priv_container_from_iterator(it); } + + //! Effects: Returns the value_compare object used by the tree. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return priv_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return node_algorithms::unique(const_node_ptr(&priv_header())); } + + //! Effects: Returns the number of elements stored in the tree. + //! + //! Complexity: Linear to elements contained in *this + //! if constant-time size option is disabled. Constant time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { + if(constant_time_size) + return this->priv_size_traits().get_size(); + else{ + return (size_type)node_algorithms::size(const_node_ptr(&priv_header())); + } + } + + //! Effects: Swaps the contents of two avltrees. + //! + //! Complexity: Constant. + //! + //! Throws: If the comparison functor's swap call throws. + void swap(avltree_impl& other) + { + //This can throw + using std::swap; + swap(priv_comp(), priv_comp()); + //These can't throw + node_algorithms::swap_tree(node_ptr(&priv_header()), node_ptr(&other.priv_header())); + if(constant_time_size){ + size_type backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(other.priv_size_traits().get_size()); + other.priv_size_traits().set_size(backup); + } + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the tree before the upper bound. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_equal_upper_bound + (node_ptr(&priv_header()), to_insert, key_node_comp), this); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator. + //! + //! Effects: Inserts x into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case) + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(const_iterator hint, reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_equal + (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a each element of a range into the tree + //! before the upper bound of the key of each element. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_equal(Iterator b, Iterator e) + { + iterator end(this->end()); + for (; b != e; ++b) + this->insert_equal(end, *b); + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the tree if the value + //! is not already present. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert_unique(reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(value, priv_comp(), commit_data); + if(!ret.second) + return ret; + return std::pair (insert_unique_commit(value, commit_data), true); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator + //! + //! Effects: Tries to insert x into the tree, using "hint" as a hint + //! to where it will be inserted. + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time (two comparisons in the worst case) + //! if t is inserted immediately before hint. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_unique(const_iterator hint, reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(hint, value, priv_comp(), commit_data); + if(!ret.second) + return ret.first; + return insert_unique_commit(value, commit_data); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Tries to insert each element of a range into the tree. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_unique(Iterator b, Iterator e) + { + if(this->empty()){ + iterator end(this->end()); + for (; b != e; ++b) + this->insert_unique(end, *b); + } + else{ + for (; b != e; ++b) + this->insert_unique(*b); + } + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), key, comp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + (const_iterator hint, const KeyType &key + ,KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), hint.pointed_node(), key, comp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the container between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the avl_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + node_algorithms::insert_unique_commit + (node_ptr(&priv_header()), to_insert, commit_data); + return iterator(to_insert, this); + } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" tree ordering invariant will be broken. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_before + (node_ptr(&priv_header()), pos.pointed_node(), to_insert), this); + } + + //! Requires: value must be an lvalue, and it must be no less + //! than the greatest inserted key + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + node_algorithms::push_back(node_ptr(&priv_header()), to_insert); + } + + //! Requires: value must be an lvalue, and it must be no greater + //! than the minimum inserted key + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than the minimum inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + node_algorithms::push_front(node_ptr(&priv_header()), to_insert); + } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { + const_iterator ret(i); + ++ret; + node_ptr to_erase(i.pointed_node()); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase)); + node_algorithms::erase(&priv_header(), to_erase); + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + return ret.unconst(); + } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { size_type n; return private_erase(b, e, n); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return this->erase(value, priv_comp()); } + + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { + node_ptr to_erase(i.pointed_node()); + iterator ret(this->erase(i)); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + return ret; + } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { size_type n; return private_erase(b, e, n, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { + std::pair p = this->equal_range(value); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { + if(safemode_or_autounlink){ + this->clear_and_dispose(detail::null_disposer()); + } + else{ + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(0); + } + } + + //! Effects: Erases all of the elements calling disposer(p) for + //! each node to be erased. + //! Complexity: Average complexity for is at most O(log(size() + N)), + //! where N is the number of elements in the container. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. Calls N times to disposer functor. + template + void clear_and_dispose(Disposer disposer) + { + node_algorithms::clear_and_dispose(node_ptr(&priv_header()) + , detail::node_disposer(disposer, this)); + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(0); + } + + //! Effects: Returns the number of contained elements with the given value + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given value. + //! + //! Throws: Nothing. + size_type count(const_reference value) const + { return this->count(value, priv_comp()); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: Nothing. + template + size_type count(const KeyType &key, KeyValueCompare comp) const + { + std::pair ret = this->equal_range(key, comp); + return std::distance(ret.first, ret.second); + } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator lower_bound(const_reference value) + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator lower_bound(const_reference value) const + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator lower_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator lower_bound(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator upper_bound(const_reference value) + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator upper_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator upper_bound(const_reference value) const + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator upper_bound(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator find(const_reference value) + { return this->find(value, priv_comp()); } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator find(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator find(const_reference value) const + { return this->find(value, priv_comp()); } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator find(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair equal_range(const_reference value) + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair equal_range(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(iterator(ret.first, this), iterator(ret.second, this)); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair + equal_range(const_reference value) const + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair + equal_range(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(const_iterator(ret.first, this), const_iterator(ret.second, this)); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const avltree_impl &src, Cloner cloner, Disposer disposer) + { + this->clear_and_dispose(disposer); + if(!src.empty()){ + detail::exception_disposer + rollback(*this, disposer); + node_algorithms::clone + (const_node_ptr(&src.priv_header()) + ,node_ptr(&this->priv_header()) + ,detail::node_cloner(cloner, this) + ,detail::node_disposer(disposer, this)); + this->priv_size_traits().set_size(src.priv_size_traits().get_size()); + this->priv_comp() = src.priv_comp(); + rollback.release(); + } + } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { + node_ptr to_be_disposed(node_algorithms::unlink_leftmost_without_rebalance + (node_ptr(&priv_header()))); + if(!to_be_disposed) + return 0; + this->priv_size_traits().decrement(); + if(safemode_or_autounlink)//If this is commented does not work with normal_link + node_algorithms::init(to_be_disposed); + return get_real_value_traits().to_value_ptr(to_be_disposed); + } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { + node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this) + , node_ptr(&priv_header()) + , get_real_value_traits().to_node_ptr(with_this)); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return iterator (value_traits::to_node_ptr(value), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return const_iterator (value_traits::to_node_ptr(const_cast (value)), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return iterator (value_traits::to_node_ptr(value), this); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return const_iterator (value_traits::to_node_ptr(const_cast (value)), this); } + + //! Requires: value shall not be in a tree. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { node_algorithms::init(value_traits::to_node_ptr(value)); } + +/* + //! Effects: removes x from a tree of the appropriate type. It has no effect, + //! if x is not in such a tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This static function is only usable with the "safe mode" + //! hook and non-constant time size lists. Otherwise, the user must use + //! the non-static "erase(reference )" member. If the user calls + //! this function with a non "safe mode" or constant time size list + //! a compilation error will be issued. + template + static void remove_node(T& value) + { + //This function is only usable for safe mode hooks and non-constant + //time lists. + //BOOST_STATIC_ASSERT((!(safemode_or_autounlink && constant_time_size))); + BOOST_STATIC_ASSERT((!constant_time_size)); + BOOST_STATIC_ASSERT((boost::is_convertible::value)); + node_ptr to_remove(value_traits::to_node_ptr(value)); + node_algorithms::unlink_and_rebalance(to_remove); + if(safemode_or_autounlink) + node_algorithms::init(to_remove); + } +*/ + + /// @cond + + private: + template + iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer) + { + for(n = 0; b != e; ++n) + this->erase_and_dispose(b++, disposer); + return b.unconst(); + } + + iterator private_erase(const_iterator b, const_iterator e, size_type &n) + { + for(n = 0; b != e; ++n) + this->erase(b++); + return b.unconst(); + } + /// @endcond + + private: + static avltree_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) + { + header_plus_size *r = detail::parent_from_member + ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), &header_plus_size::header_); + node_plus_pred_t *n = detail::parent_from_member + (r, &node_plus_pred_t::header_plus_size_); + data_t *d = detail::parent_from_member(n, &data_t::node_plus_pred_); + avltree_impl *avl = detail::parent_from_member(d, &avltree_impl::data_); + return *avl; + } + + static avltree_impl &priv_container_from_iterator(const const_iterator &it) + { return priv_container_from_end_iterator(it.end_iterator_from_it()); } +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator< +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avltree_impl &x, const avltree_impl &y) +#else +(const avltree_impl &x, const avltree_impl &y) +#endif +{ return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +bool operator== +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avltree_impl &x, const avltree_impl &y) +#else +(const avltree_impl &x, const avltree_impl &y) +#endif +{ + typedef avltree_impl tree_type; + typedef typename tree_type::const_iterator const_iterator; + + if(tree_type::constant_time_size && x.size() != y.size()){ + return false; + } + const_iterator end1 = x.end(); + const_iterator i1 = x.begin(); + const_iterator i2 = y.begin(); + if(tree_type::constant_time_size){ + while (i1 != end1 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1; + } + else{ + const_iterator end2 = y.end(); + while (i1 != end1 && i2 != end2 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1 && i2 == end2; + } +} + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avltree_impl &x, const avltree_impl &y) +#else +(const avltree_impl &x, const avltree_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avltree_impl &x, const avltree_impl &y) +#else +(const avltree_impl &x, const avltree_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avltree_impl &x, const avltree_impl &y) +#else +(const avltree_impl &x, const avltree_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const avltree_impl &x, const avltree_impl &y) +#else +(const avltree_impl &x, const avltree_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(avltree_impl &x, avltree_impl &y) +#else +(avltree_impl &x, avltree_impl &y) +#endif +{ x.swap(y); } + +/// @cond + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_avltree_opt +{ + typedef typename pack_options + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + < avl_set_defaults, O1, O2, O3, O4> + #else + < avl_set_defaults, Options...> + #endif + ::type packed_options; + + typedef typename detail::get_value_traits + ::type value_traits; + + typedef avl_setopt + < value_traits + , typename packed_options::compare + , typename packed_options::size_type + , packed_options::constant_time_size + > type; +}; +/// @endcond + +//! Helper metafunction to define a \c avltree that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_avltree +{ + /// @cond + typedef avltree_impl + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + < typename make_avltree_opt::type + #else + < typename make_avltree_opt::type + #endif + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class avltree + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + : public make_avltree::type + #else + : public make_avltree::type + #endif +{ + typedef typename make_avltree + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::real_value_traits real_value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + avltree( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + avltree( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(unique, b, e, cmp, v_traits) + {} + + static avltree &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const avltree &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static avltree &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const avltree &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_AVLTREE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avltree_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avltree_algorithms.hpp new file mode 100644 index 0000000000..7e0cd2e47c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/avltree_algorithms.hpp @@ -0,0 +1,943 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Daniel K. O. 2005. +// (C) Copyright Ion Gaztanaga 2007. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP + +#include + +#include +#include + +#include +#include +#include + + +namespace boost { +namespace intrusive { + +//! avltree_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the circular list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! balance: The type of the balance factor +//! +//! Static functions: +//! +//! static node_ptr get_parent(const_node_ptr n); +//! +//! static void set_parent(node_ptr n, node_ptr parent); +//! +//! static node_ptr get_left(const_node_ptr n); +//! +//! static void set_left(node_ptr n, node_ptr left); +//! +//! static node_ptr get_right(const_node_ptr n); +//! +//! static void set_right(node_ptr n, node_ptr right); +//! +//! static balance get_balance(const_node_ptr n); +//! +//! static void set_balance(node_ptr n, balance b); +//! +//! static balance negative(); +//! +//! static balance zero(); +//! +//! static balance positive(); +template +class avltree_algorithms +{ + public: + typedef typename NodeTraits::node node; + typedef NodeTraits node_traits; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + typedef typename NodeTraits::balance balance; + + /// @cond + private: + typedef detail::tree_algorithms tree_algorithms; + + template + struct avltree_node_cloner + : private detail::ebo_functor_holder + { + typedef detail::ebo_functor_holder base_t; + + avltree_node_cloner(F f) + : base_t(f) + {} + + node_ptr operator()(node_ptr p) + { + node_ptr n = base_t::get()(p); + NodeTraits::set_balance(n, NodeTraits::get_balance(p)); + return n; + } + }; + + struct avltree_erase_fixup + { + void operator()(node_ptr to_erase, node_ptr successor) + { NodeTraits::set_balance(successor, NodeTraits::get_balance(to_erase)); } + }; + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(::boost::intrusive::detail::boost_intrusive_get_pointer(ptr))); + } + /// @endcond + + public: + static node_ptr begin_node(const_node_ptr header) + { return tree_algorithms::begin_node(header); } + + static node_ptr end_node(const_node_ptr header) + { return tree_algorithms::end_node(header); } + + //! This type is the information that will be + //! filled by insert_unique_check + typedef typename tree_algorithms::insert_commit_data insert_commit_data; + + //! Requires: header1 and header2 must be the header nodes + //! of two trees. + //! + //! Effects: Swaps two trees. After the function header1 will contain + //! links to the second tree and header2 will have links to the first tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static void swap_tree(node_ptr header1, node_ptr header2) + { return tree_algorithms::swap_tree(header1, header2); } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr node2) + { + if(node1 == node2) + return; + + node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2)); + swap_nodes(node1, header1, node2, header2); + } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees with header header1 and header2. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) + { + if(node1 == node2) return; + + tree_algorithms::swap_nodes(node1, header1, node2, header2); + //Swap balance + balance c = NodeTraits::get_balance(node1); + NodeTraits::set_balance(node1, NodeTraits::get_balance(node2)); + NodeTraits::set_balance(node2, c); + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing and comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) + { + if(node_to_be_replaced == new_node) + return; + replace_node(node_to_be_replaced, tree_algorithms::get_header(node_to_be_replaced), new_node); + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! with header "header" and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) + { + tree_algorithms::replace_node(node_to_be_replaced, header, new_node); + NodeTraits::set_balance(new_node, NodeTraits::get_balance(node_to_be_replaced)); + } + + //! Requires: node is a tree node but not the header. + //! + //! Effects: Unlinks the node and rebalances the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + static void unlink(node_ptr node) + { + node_ptr x = NodeTraits::get_parent(node); + if(x){ + while(!is_header(x)) + x = NodeTraits::get_parent(x); + erase(x, node); + } + } + + //! Requires: header is the header of a tree. + //! + //! Effects: Unlinks the leftmost node from the tree, and + //! updates the header link to the new leftmost node. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + static node_ptr unlink_leftmost_without_rebalance(node_ptr header) + { return tree_algorithms::unlink_leftmost_without_rebalance(header); } + + //! Requires: node is a node of the tree or an node initialized + //! by init(...). + //! + //! Effects: Returns true if the node is initialized by init(). + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + static bool unique(const_node_ptr node) + { return tree_algorithms::unique(node); } + + //! Requires: node is a node of the tree but it's not the header. + //! + //! Effects: Returns the number of nodes of the subtree. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr node) + { return tree_algorithms::count(node); } + + //! Requires: header is the header node of the tree. + //! + //! Effects: Returns the number of nodes above the header. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t size(const_node_ptr header) + { return tree_algorithms::size(header); } + + //! Requires: p is a node from the tree except the header. + //! + //! Effects: Returns the next node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr next_node(node_ptr p) + { return tree_algorithms::next_node(p); } + + //! Requires: p is a node from the tree except the leftmost node. + //! + //! Effects: Returns the previous node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr prev_node(node_ptr p) + { return tree_algorithms::prev_node(p); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: After the function unique(node) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init(node_ptr node) + { tree_algorithms::init(node); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: Initializes the header to represent an empty tree. + //! unique(header) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init_header(node_ptr header) + { + tree_algorithms::init_header(header); + NodeTraits::set_balance(header, NodeTraits::zero()); + } + + //! Requires: header must be the header of a tree, z a node + //! of that tree and z != header. + //! + //! Effects: Erases node "z" from the tree with header "header". + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + static node_ptr erase(node_ptr header, node_ptr z) + { + typename tree_algorithms::data_for_rebalance info; + tree_algorithms::erase(header, z, avltree_erase_fixup(), info); + node_ptr x = info.x; + node_ptr x_parent = info.x_parent; + + //Rebalance avltree + rebalance_after_erasure(header, x, x_parent); + return z; + } + + //! Requires: "cloner" must be a function + //! object taking a node_ptr and returning a new cloned node of it. "disposer" must + //! take a node_ptr and shouldn't throw. + //! + //! Effects: First empties target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Then, duplicates the entire tree pointed by "source_header" cloning each + //! source node with node_ptr Cloner::operator()(node_ptr) to obtain + //! the nodes of the target tree. If "cloner" throws, the cloned target nodes + //! are disposed using void disposer(node_ptr). + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clone + (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer) + { + avltree_node_cloner new_cloner(cloner); + tree_algorithms::clone(source_header, target_header, new_cloner, disposer); + } + + //! Requires: "disposer" must be an object function + //! taking a node_ptr parameter and shouldn't throw. + //! + //! Effects: Empties the target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clear_and_dispose(node_ptr header, Disposer disposer) + { tree_algorithms::clear_and_dispose(header, disposer); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is + //! not less than "key" according to "comp" or "header" if that element does + //! not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr lower_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::lower_bound(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is greater + //! than "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr upper_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::upper_bound(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the element that is equivalent to + //! "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr find + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::find(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an a pair of node_ptr delimiting a range containing + //! all elements that are equivalent to "key" according to "comp" or an + //! empty range that indicates the position where those elements would be + //! if they there are no equivalent elements. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static std::pair equal_range + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::equal_range(header, key, comp); } + + //! Requires: "h" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the upper bound + //! according to "comp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_upper_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp) + { + tree_algorithms::insert_equal_upper_bound(h, new_node, comp); + rebalance_after_insertion(h, new_node); + return new_node; + } + + //! Requires: "h" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the lower bound + //! according to "comp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_lower_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp) + { + tree_algorithms::insert_equal_lower_bound(h, new_node, comp); + rebalance_after_insertion(h, new_node); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from + //! the "header"'s tree. + //! + //! Effects: Inserts new_node into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case). + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if new_node is inserted immediately before "hint". + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal + (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp) + { + tree_algorithms::insert_equal(header, hint, new_node, comp); + rebalance_after_insertion(header, new_node); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! "pos" must be a valid iterator or header (end) node. + //! "pos" must be an iterator pointing to the successor to "new_node" + //! once inserted according to the order of already inserted nodes. This function does not + //! check "pos" and this precondition must be guaranteed by the caller. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "pos" is not the successor of the newly inserted "new_node" + //! tree invariants might be broken. + static node_ptr insert_before + (node_ptr header, node_ptr pos, node_ptr new_node) + { + tree_algorithms::insert_before(header, pos, new_node); + rebalance_after_insertion(header, new_node); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering no less than the + //! greatest inserted key. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "new_node" is less than the greatest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + static void push_back(node_ptr header, node_ptr new_node) + { + tree_algorithms::push_back(header, new_node); + rebalance_after_insertion(header, new_node); + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering, no greater than the + //! lowest inserted key. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "new_node" is greater than the lowest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + static void push_front(node_ptr header, node_ptr new_node) + { + tree_algorithms::push_front(header, new_node); + rebalance_after_insertion(header, new_node); + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data) + { return tree_algorithms::insert_unique_check(header, key, comp, commit_data); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! "hint" is node from the "header"'s tree. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" using "hint" as a hint to where it should be + //! inserted and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! If "hint" is the upper_bound the function has constant time + //! complexity (two comparisons in the worst case). + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic, but it is + //! amortized constant time if new_node should be inserted immediately before "hint". + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, node_ptr hint, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data) + { return tree_algorithms::insert_unique_check(header, hint, key, comp, commit_data); } + + //! Requires: "header" must be the header node of a tree. + //! "commit_data" must have been obtained from a previous call to + //! "insert_unique_check". No objects should have been inserted or erased + //! from the set between the "insert_unique_check" that filled "commit_data" + //! and the call to "insert_commit". + //! + //! + //! Effects: Inserts new_node in the set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_unique_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + static void insert_unique_commit + (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data) + { + tree_algorithms::insert_unique_commit(header, new_value, commit_data); + rebalance_after_insertion(header, new_value); + } + + //! Requires: "n" must be a node inserted in a tree. + //! + //! Effects: Returns a pointer to the header node of the tree. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + static node_ptr get_header(node_ptr n) + { return tree_algorithms::get_header(n); } + + /// @cond + private: + + //! Requires: p is a node of a tree. + //! + //! Effects: Returns true if p is the header of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static bool is_header(const_node_ptr p) + { return NodeTraits::get_balance(p) == NodeTraits::zero() && tree_algorithms::is_header(p); } + + static void rebalance_after_erasure(node_ptr header, node_ptr x, node_ptr x_parent) + { + for (node_ptr root = NodeTraits::get_parent(header); x != root; root = NodeTraits::get_parent(header)) { + const balance x_parent_balance = NodeTraits::get_balance(x_parent); + if(x_parent_balance == NodeTraits::zero()){ + NodeTraits::set_balance(x_parent, + (x == NodeTraits::get_right(x_parent) ? NodeTraits::negative() : NodeTraits::positive())); + break; // the height didn't change, let's stop here + } + else if(x_parent_balance == NodeTraits::negative()){ + if (x == NodeTraits::get_left(x_parent)) { + NodeTraits::set_balance(x_parent, NodeTraits::zero()); // balanced + x = x_parent; + x_parent = NodeTraits::get_parent(x_parent); + } + else { + // x is right child + // a is left child + node_ptr a = NodeTraits::get_left(x_parent); + BOOST_INTRUSIVE_INVARIANT_ASSERT(a); + if (NodeTraits::get_balance(a) == NodeTraits::positive()) { + // a MUST have a right child + BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_right(a)); + rotate_left_right(x_parent, header); + x = NodeTraits::get_parent(x_parent); + x_parent = NodeTraits::get_parent(x); + } + else { + rotate_right(x_parent, header); + x = NodeTraits::get_parent(x_parent); + x_parent = NodeTraits::get_parent(x); + } + + // if changed from negative to NodeTraits::positive(), no need to check above + if (NodeTraits::get_balance(x) == NodeTraits::positive()){ + break; + } + } + } + else if(x_parent_balance == NodeTraits::positive()){ + if (x == NodeTraits::get_right(x_parent)) { + NodeTraits::set_balance(x_parent, NodeTraits::zero()); // balanced + x = x_parent; + x_parent = NodeTraits::get_parent(x_parent); + } + else { + // x is left child + // a is right child + node_ptr a = NodeTraits::get_right(x_parent); + BOOST_INTRUSIVE_INVARIANT_ASSERT(a); + if (NodeTraits::get_balance(a) == NodeTraits::negative()) { + // a MUST have then a left child + BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_left(a)); + rotate_right_left(x_parent, header); + + x = NodeTraits::get_parent(x_parent); + x_parent = NodeTraits::get_parent(x); + } + else { + rotate_left(x_parent, header); + x = NodeTraits::get_parent(x_parent); + x_parent = NodeTraits::get_parent(x); + } + // if changed from NodeTraits::positive() to negative, no need to check above + if (NodeTraits::get_balance(x) == NodeTraits::negative()){ + break; + } + } + } + else{ + BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached + } + } + } + + static void rebalance_after_insertion(node_ptr header, node_ptr x) + { + NodeTraits::set_balance(x, NodeTraits::zero()); + + // Rebalance. + for(node_ptr root = NodeTraits::get_parent(header); x != root; root = NodeTraits::get_parent(header)){ + const balance x_parent_balance = NodeTraits::get_balance(NodeTraits::get_parent(x)); + + if(x_parent_balance == NodeTraits::zero()){ + // if x is left, parent will have parent->bal_factor = negative + // else, parent->bal_factor = NodeTraits::positive() + NodeTraits::set_balance( NodeTraits::get_parent(x) + , x == NodeTraits::get_left(NodeTraits::get_parent(x)) + ? NodeTraits::negative() : NodeTraits::positive() ); + x = NodeTraits::get_parent(x); + } + else if(x_parent_balance == NodeTraits::positive()){ + // if x is a left child, parent->bal_factor = zero + if (x == NodeTraits::get_left(NodeTraits::get_parent(x))) + NodeTraits::set_balance(NodeTraits::get_parent(x), NodeTraits::zero()); + else{ // x is a right child, needs rebalancing + if (NodeTraits::get_balance(x) == NodeTraits::negative()) + rotate_right_left(NodeTraits::get_parent(x), header); + else + rotate_left(NodeTraits::get_parent(x), header); + } + break; + } + else if(x_parent_balance == NodeTraits::negative()){ + // if x is a left child, needs rebalancing + if (x == NodeTraits::get_left(NodeTraits::get_parent(x))) { + if (NodeTraits::get_balance(x) == NodeTraits::positive()) + rotate_left_right(NodeTraits::get_parent(x), header); + else + rotate_right(NodeTraits::get_parent(x), header); + } + else + NodeTraits::set_balance(NodeTraits::get_parent(x), NodeTraits::zero()); + break; + } + else{ + BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached + } + } + } + + static void left_right_balancing(node_ptr a, node_ptr b, node_ptr c) + { + // balancing... + const balance c_balance = NodeTraits::get_balance(c); + const balance zero_balance = NodeTraits::zero(); + NodeTraits::set_balance(c, zero_balance); + if(c_balance == NodeTraits::negative()){ + NodeTraits::set_balance(a, NodeTraits::positive()); + NodeTraits::set_balance(b, zero_balance); + } + else if(c_balance == zero_balance){ + NodeTraits::set_balance(a, zero_balance); + NodeTraits::set_balance(b, zero_balance); + } + else if(c_balance == NodeTraits::positive()){ + NodeTraits::set_balance(a, zero_balance); + NodeTraits::set_balance(b, NodeTraits::negative()); + } + else{ + BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached + } + } + + static void rotate_left_right(const node_ptr a, node_ptr hdr) + { + // | | // + // a(-2) c // + // / \ / \ // + // / \ ==> / \ // + // (pos)b [g] b a // + // / \ / \ / \ // + // [d] c [d] e f [g] // + // / \ // + // e f // + node_ptr b = NodeTraits::get_left(a), c = NodeTraits::get_right(b); + tree_algorithms::rotate_left(b, hdr); + tree_algorithms::rotate_right(a, hdr); + left_right_balancing(a, b, c); + } + + static void rotate_right_left(const node_ptr a, node_ptr hdr) + { + // | | // + // a(pos) c // + // / \ / \ // + // / \ / \ // + // [d] b(neg) ==> a b // + // / \ / \ / \ // + // c [g] [d] e f [g] // + // / \ // + // e f // + node_ptr b = NodeTraits::get_right(a), c = NodeTraits::get_left(b); + tree_algorithms::rotate_right(b, hdr); + tree_algorithms::rotate_left(a, hdr); + left_right_balancing(b, a, c); + } + + static void rotate_left(const node_ptr x, node_ptr hdr) + { + const node_ptr y = NodeTraits::get_right(x); + tree_algorithms::rotate_left(x, hdr); + + // reset the balancing factor + if (NodeTraits::get_balance(y) == NodeTraits::positive()) { + NodeTraits::set_balance(x, NodeTraits::zero()); + NodeTraits::set_balance(y, NodeTraits::zero()); + } + else { // this doesn't happen during insertions + NodeTraits::set_balance(x, NodeTraits::positive()); + NodeTraits::set_balance(y, NodeTraits::negative()); + } + } + + static void rotate_right(const node_ptr x, node_ptr hdr) + { + const node_ptr y = NodeTraits::get_left(x); + tree_algorithms::rotate_right(x, hdr); + + // reset the balancing factor + if (NodeTraits::get_balance(y) == NodeTraits::negative()) { + NodeTraits::set_balance(x, NodeTraits::zero()); + NodeTraits::set_balance(y, NodeTraits::zero()); + } + else { // this doesn't happen during insertions + NodeTraits::set_balance(x, NodeTraits::negative()); + NodeTraits::set_balance(y, NodeTraits::positive()); + } + } + + /// @endcond +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/bs_set_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/bs_set_hook.hpp new file mode 100644 index 0000000000..bf8e2de09a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/bs_set_hook.hpp @@ -0,0 +1,296 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_BS_SET_HOOK_HPP +#define BOOST_INTRUSIVE_BS_SET_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond +template +struct get_bs_set_node_algo +{ + typedef detail::tree_algorithms > type; +}; +/// @endcond + +//! Helper metafunction to define a \c bs_set_base_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_bs_set_base_hook +{ + /// @cond + typedef typename pack_options + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + < hook_defaults, O1, O2, O3> + #else + < hook_defaults, Options...> + #endif + ::type packed_options; + + //Scapegoat trees can't be auto unlink trees + BOOST_STATIC_ASSERT(((int)packed_options::link_mode != (int)auto_unlink)); + + typedef detail::generic_hook + < get_bs_set_node_algo + , typename packed_options::tag + , packed_options::link_mode + , detail::BsSetBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Derive a class from bs_set_base_hook in order to store objects in +//! in a bs_set/bs_multiset. bs_set_base_hook holds the data necessary to maintain +//! the bs_set/bs_multiset and provides an appropriate value_traits class for bs_set/bs_multiset. +//! +//! The hook admits the following options: \c tag<>, \c void_pointer<>, +//! \c link_mode<>. +//! +//! \c tag<> defines a tag to identify the node. +//! The same tag value can be used in different classes, but if a class is +//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its +//! unique tag. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class bs_set_base_hook + : public make_bs_set_base_hook + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type + +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + bs_set_base_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + bs_set_base_hook(const bs_set_base_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + bs_set_base_hook& operator=(const bs_set_base_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~bs_set_base_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(bs_set_base_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +//! Helper metafunction to define a \c bs_set_member_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_bs_set_member_hook +{ + /// @cond + typedef typename pack_options + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + < hook_defaults, O1, O2, O3> + #else + < hook_defaults, Options...> + #endif + + ::type packed_options; + + //Scapegoat trees can't be auto unlink trees + BOOST_STATIC_ASSERT(((int)packed_options::link_mode != (int)auto_unlink)); + + typedef detail::generic_hook + < get_bs_set_node_algo + , member_tag + , packed_options::link_mode + , detail::NoBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Put a public data member bs_set_member_hook in order to store objects of this class in +//! a bs_set/bs_multiset. bs_set_member_hook holds the data necessary for maintaining the +//! bs_set/bs_multiset and provides an appropriate value_traits class for bs_set/bs_multiset. +//! +//! The hook admits the following options: \c void_pointer<>, \c link_mode<>. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class bs_set_member_hook + : public make_bs_set_member_hook + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + bs_set_member_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + bs_set_member_hook(const bs_set_member_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + bs_set_member_hook& operator=(const bs_set_member_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~bs_set_member_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(bs_set_member_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_BS_SET_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/circular_list_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/circular_list_algorithms.hpp new file mode 100644 index 0000000000..16b1971b29 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/circular_list_algorithms.hpp @@ -0,0 +1,407 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP + +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! circular_list_algorithms provides basic algorithms to manipulate nodes +//! forming a circular doubly linked list. An empty circular list is formed by a node +//! whose pointers point to itself. +//! +//! circular_list_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the circular list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! Static functions: +//! +//! static node_ptr get_previous(const_node_ptr n); +//! +//! static void set_previous(node_ptr n, node_ptr prev); +//! +//! static node_ptr get_next(const_node_ptr n); +//! +//! static void set_next(node_ptr n, node_ptr next); +template +class circular_list_algorithms +{ + public: + typedef typename NodeTraits::node node; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + typedef NodeTraits node_traits; + + //! Effects: Constructs an non-used list element, so that + //! inited(this_node) == true + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void init(node_ptr this_node) + { + NodeTraits::set_next(this_node, node_ptr(0)); + NodeTraits::set_previous(this_node, node_ptr(0)); + } + + //! Effects: Returns true is "this_node" is in a non-used state + //! as if it was initialized by the "init" function. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static bool inited(const_node_ptr this_node) + { return !NodeTraits::get_next(this_node); } + + //! Effects: Constructs an empty list, making this_node the only + //! node of the circular list: + //! NodeTraits::get_next(this_node) == NodeTraits::get_previous(this_node) + //! == this_node. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void init_header(node_ptr this_node) + { + NodeTraits::set_next(this_node, this_node); + NodeTraits::set_previous(this_node, this_node); + } + + + //! Requires: this_node must be in a circular list or be an empty circular list. + //! + //! Effects: Returns true is "this_node" is the only node of a circular list: + //! return NodeTraits::get_next(this_node) == this_node + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static bool unique(const_node_ptr this_node) + { + node_ptr next = NodeTraits::get_next(this_node); + return !next || next == this_node; + } + + //! Requires: this_node must be in a circular list or be an empty circular list. + //! + //! Effects: Returns the number of nodes in a circular list. If the circular list + //! is empty, returns 1. + //! + //! Complexity: Linear + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr this_node) + { + std::size_t result = 0; + const_node_ptr p = this_node; + do{ + p = NodeTraits::get_next(p); + ++result; + }while (p != this_node); + return result; + } + + //! Requires: this_node must be in a circular list or be an empty circular list. + //! + //! Effects: Unlinks the node from the circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static node_ptr unlink(node_ptr this_node) + { + if(NodeTraits::get_next(this_node)){ + node_ptr next(NodeTraits::get_next(this_node)); + node_ptr prev(NodeTraits::get_previous(this_node)); + NodeTraits::set_next(prev, next); + NodeTraits::set_previous(next, prev); + return next; + } + else{ + return this_node; + } + } + + //! Requires: b and e must be nodes of the same circular list or an empty range. + //! + //! Effects: Unlinks the node [b, e) from the circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void unlink(node_ptr b, node_ptr e) + { + if (b != e) { + node_ptr prevb(NodeTraits::get_previous(b)); + NodeTraits::set_previous(e, prevb); + NodeTraits::set_next(prevb, e); + } + } + + //! Requires: nxt_node must be a node of a circular list. + //! + //! Effects: Links this_node before nxt_node in the circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void link_before(node_ptr nxt_node, node_ptr this_node) + { + node_ptr prev(NodeTraits::get_previous(nxt_node)); + NodeTraits::set_previous(this_node, prev); + NodeTraits::set_next(prev, this_node); + NodeTraits::set_previous(nxt_node, this_node); + NodeTraits::set_next(this_node, nxt_node); + } + + //! Requires: prev_node must be a node of a circular list. + //! + //! Effects: Links this_node after prev_node in the circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void link_after(node_ptr prev_node, node_ptr this_node) + { + node_ptr next(NodeTraits::get_next(prev_node)); + NodeTraits::set_previous(this_node, prev_node); + NodeTraits::set_next(this_node, next); + NodeTraits::set_previous(next, this_node); + NodeTraits::set_next(prev_node, this_node); + } + + //! Requires: this_node and other_node must be nodes inserted + //! in circular lists or be empty circular lists. + //! + //! Effects: Swaps the position of the nodes: this_node is inserted in + //! other_nodes position in the second circular list and the other_node is inserted + //! in this_node's position in the first circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. +/* + static void swap_nodes(node_ptr this_node, node_ptr other_node) + { + + if (other_node == this_node) + return; + bool empty1 = unique(this_node); + bool empty2 = unique(other_node); + + node_ptr next_this(NodeTraits::get_next(this_node)); + node_ptr prev_this(NodeTraits::get_previous(this_node)); + node_ptr next_other(NodeTraits::get_next(other_node)); + node_ptr prev_other(NodeTraits::get_previous(other_node)); + + //Do the swap + NodeTraits::set_next(this_node, next_other); + NodeTraits::set_next(other_node, next_this); + + NodeTraits::set_previous(this_node, prev_other); + NodeTraits::set_previous(other_node, prev_this); + + if (empty2){ + init(this_node); + } + else{ + NodeTraits::set_next(prev_other, this_node); + NodeTraits::set_previous(next_other, this_node); + } + if (empty1){ + init(other_node); + } + else{ + NodeTraits::set_next(prev_this, other_node); + NodeTraits::set_previous(next_this, other_node); + } + } +*/ + + //Watanabe version + private: + static void swap_prev(node_ptr this_node, node_ptr other_node) + { + node_ptr temp(NodeTraits::get_previous(this_node)); + NodeTraits::set_previous(this_node, NodeTraits::get_previous(other_node)); + NodeTraits::set_previous(other_node, temp); + } + static void swap_next(node_ptr this_node, node_ptr other_node) + { + node_ptr temp(NodeTraits::get_next(this_node)); + NodeTraits::set_next(this_node, NodeTraits::get_next(other_node)); + NodeTraits::set_next(other_node, temp); + } + + public: + static void swap_nodes(node_ptr this_node, node_ptr other_node) + { + if (other_node == this_node) + return; + bool this_inited = inited(this_node); + bool other_inited = inited(other_node); + if(this_inited){ + init_header(this_node); + } + if(other_inited){ + init_header(other_node); + } + + node_ptr next_this(NodeTraits::get_next(this_node)); + node_ptr prev_this(NodeTraits::get_previous(this_node)); + node_ptr next_other(NodeTraits::get_next(other_node)); + node_ptr prev_other(NodeTraits::get_previous(other_node)); + //these first two swaps must happen before the other two + swap_prev(next_this, next_other); + swap_next(prev_this, prev_other); + swap_next(this_node, other_node); + swap_prev(this_node, other_node); + + if(this_inited){ + init(other_node); + } + if(other_inited){ + init(this_node); + } + } + + //! Requires: b and e must be nodes of the same circular list or an empty range. + //! and p must be a node of a different circular list or may not be an iterator in + // [b, e). + //! + //! Effects: Removes the nodes from [b, e) range from their circular list and inserts + //! them before p in p's circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void transfer(node_ptr p, node_ptr b, node_ptr e) + { + if (b != e) { + node_ptr prev_p(NodeTraits::get_previous(p)); + node_ptr prev_b(NodeTraits::get_previous(b)); + node_ptr prev_e(NodeTraits::get_previous(e)); + NodeTraits::set_next(prev_e, p); + NodeTraits::set_previous(p, prev_e); + NodeTraits::set_next(prev_b, e); + NodeTraits::set_previous(e, prev_b); + NodeTraits::set_next(prev_p, b); + NodeTraits::set_previous(b, prev_p); + } + } + + //! Requires: i must a node of a circular list + //! and p must be a node of a different circular list. + //! + //! Effects: Removes the node i from its circular list and inserts + //! it before p in p's circular list. + //! If p == i or p == NodeTraits::get_next(i), this function is a null operation. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void transfer(node_ptr p, node_ptr i) + { + node_ptr n(NodeTraits::get_next(i)); + if(n != p && i != p){ + node_ptr prev_p(NodeTraits::get_previous(p)); + node_ptr prev_i(NodeTraits::get_previous(i)); + NodeTraits::set_next(prev_p, i); + NodeTraits::set_previous(i, prev_p); + NodeTraits::set_next(i, p); + NodeTraits::set_previous(p, i); + NodeTraits::set_previous(n, prev_i); + NodeTraits::set_next(prev_i, n); + + } + } + + //! Effects: Reverses the order of elements in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: This function is linear time. + static void reverse(node_ptr p) + { + node_ptr f(NodeTraits::get_next(p)); + node_ptr i(NodeTraits::get_next(f)), e(p); + + while(i != e) { + node_ptr n = i; + i = NodeTraits::get_next(i); + transfer(f, n, i); + f = n; + } + } + + //! Effects: Moves the node p n positions towards the end of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of moved positions. + static void move_backwards(node_ptr p, std::size_t n) + { + //Null shift, nothing to do + if(!n) return; + node_ptr first = NodeTraits::get_next(p); + //size() == 0 or 1, nothing to do + if(first == NodeTraits::get_previous(p)) return; + unlink(p); + //Now get the new first node + while(n--){ + first = NodeTraits::get_next(first); + } + link_before(first, p); + } + + //! Effects: Moves the node p n positions towards the beginning of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of moved positions. + static void move_forward(node_ptr p, std::size_t n) + { + //Null shift, nothing to do + if(!n) return; + node_ptr last = NodeTraits::get_previous(p); + //size() == 0 or 1, nothing to do + if(last == NodeTraits::get_next(p)) return; + + unlink(p); + //Now get the new last node + while(n--){ + last = NodeTraits::get_previous(last); + } + link_after(last, p); + } +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/circular_slist_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/circular_slist_algorithms.hpp new file mode 100644 index 0000000000..8bb95cdf49 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/circular_slist_algorithms.hpp @@ -0,0 +1,405 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! circular_slist_algorithms provides basic algorithms to manipulate nodes +//! forming a circular singly linked list. An empty circular list is formed by a node +//! whose pointer to the next node points to itself. +//! +//! circular_slist_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the circular list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! Static functions: +//! +//! static node_ptr get_next(const_node_ptr n); +//! +//! static void set_next(node_ptr n, node_ptr next); +template +class circular_slist_algorithms + /// @cond + : public detail::common_slist_algorithms + /// @endcond +{ + /// @cond + typedef detail::common_slist_algorithms base_t; + /// @endcond + public: + typedef typename NodeTraits::node node; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + typedef NodeTraits node_traits; + + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + + //! Effects: Constructs an non-used list element, putting the next + //! pointer to null: + //! NodeTraits::get_next(this_node) == 0 + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void init(node_ptr this_node); + + //! Requires: this_node must be in a circular list or be an empty circular list. + //! + //! Effects: Returns true is "this_node" is the only node of a circular list: + //! or it's a not inserted node: + //! return !NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static bool unique(const_node_ptr this_node); + + //! Effects: Returns true is "this_node" has the same state as + //! if it was inited using "init(node_ptr)" + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static bool inited(const_node_ptr this_node); + + //! Requires: prev_node must be in a circular list or be an empty circular list. + //! + //! Effects: Unlinks the next node of prev_node from the circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void unlink_after(node_ptr prev_node); + + //! Requires: prev_node and last_node must be in a circular list + //! or be an empty circular list. + //! + //! Effects: Unlinks the range (prev_node, last_node) from the circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void unlink_after(node_ptr prev_node, node_ptr last_node); + + //! Requires: prev_node must be a node of a circular list. + //! + //! Effects: Links this_node after prev_node in the circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void link_after(node_ptr prev_node, node_ptr this_node); + + //! Requires: b and e must be nodes of the same circular list or an empty range. + //! and p must be a node of a different circular list. + //! + //! Effects: Removes the nodes from (b, e] range from their circular list and inserts + //! them after p in p's circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void transfer_after(node_ptr p, node_ptr b, node_ptr e); + + #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + + //! Effects: Constructs an empty list, making this_node the only + //! node of the circular list: + //! NodeTraits::get_next(this_node) == this_node. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void init_header(node_ptr this_node) + { NodeTraits::set_next(this_node, this_node); } + + //! Requires: this_node and prev_init_node must be in the same circular list. + //! + //! Effects: Returns the previous node of this_node in the circular list starting. + //! the search from prev_init_node. The first node checked for equality + //! is NodeTraits::get_next(prev_init_node). + //! + //! Complexity: Linear to the number of elements between prev_init_node and this_node. + //! + //! Throws: Nothing. + static node_ptr get_previous_node(node_ptr prev_init_node, node_ptr this_node) + { return base_t::get_previous_node(prev_init_node, this_node); } + + //! Requires: this_node must be in a circular list or be an empty circular list. + //! + //! Effects: Returns the previous node of this_node in the circular list. + //! + //! Complexity: Linear to the number of elements in the circular list. + //! + //! Throws: Nothing. + static node_ptr get_previous_node(node_ptr this_node) + { return base_t::get_previous_node(this_node, this_node); } + + //! Requires: this_node must be in a circular list or be an empty circular list. + //! + //! Effects: Returns the previous node of the previous node of this_node in the circular list. + //! + //! Complexity: Linear to the number of elements in the circular list. + //! + //! Throws: Nothing. + static node_ptr get_previous_previous_node(node_ptr this_node) + { return get_previous_previous_node(this_node, this_node); } + + //! Requires: this_node and prev_prev_init_node must be in the same circular list. + //! + //! Effects: Returns the previous node of the previous node of this_node in the + //! circular list starting. the search from prev_init_node. The first node checked + //! for equality is NodeTraits::get_next((NodeTraits::get_next(prev_prev_init_node)). + //! + //! Complexity: Linear to the number of elements in the circular list. + //! + //! Throws: Nothing. + static node_ptr get_previous_previous_node(node_ptr prev_prev_init_node, node_ptr this_node) + { + node_ptr p = prev_prev_init_node; + node_ptr p_next = NodeTraits::get_next(p); + node_ptr p_next_next = NodeTraits::get_next(p_next); + while (this_node != p_next_next){ + p = p_next; + p_next = p_next_next; + p_next_next = NodeTraits::get_next(p_next); + } + return p; + } + + //! Requires: this_node must be in a circular list or be an empty circular list. + //! + //! Effects: Returns the number of nodes in a circular list. If the circular list + //! is empty, returns 1. + //! + //! Complexity: Linear + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr this_node) + { + std::size_t result = 0; + const_node_ptr p = this_node; + do{ + p = NodeTraits::get_next(p); + ++result; + } while (p != this_node); + return result; + } + + //! Requires: this_node must be in a circular list, be an empty circular list or be inited. + //! + //! Effects: Unlinks the node from the circular list. + //! + //! Complexity: Linear to the number of elements in the circular list + //! + //! Throws: Nothing. + static void unlink(node_ptr this_node) + { + if(NodeTraits::get_next(this_node)) + base_t::unlink_after(get_previous_node(this_node)); + } + + //! Requires: nxt_node must be a node of a circular list. + //! + //! Effects: Links this_node before nxt_node in the circular list. + //! + //! Complexity: Linear to the number of elements in the circular list. + //! + //! Throws: Nothing. + static void link_before (node_ptr nxt_node, node_ptr this_node) + { base_t::link_after(get_previous_node(nxt_node), this_node); } + + //! Requires: this_node and other_node must be nodes inserted + //! in circular lists or be empty circular lists. + //! + //! Effects: Swaps the position of the nodes: this_node is inserted in + //! other_nodes position in the second circular list and the other_node is inserted + //! in this_node's position in the first circular list. + //! + //! Complexity: Linear to number of elements of both lists + //! + //! Throws: Nothing. + static void swap_nodes(node_ptr this_node, node_ptr other_node) + { + if (other_node == this_node) + return; + bool this_inited = base_t::inited(this_node); + bool other_inited = base_t::inited(other_node); + if(this_inited){ + base_t::init_header(this_node); + } + if(other_inited){ + base_t::init_header(other_node); + } + + bool empty1 = base_t::unique(this_node); + bool empty2 = base_t::unique(other_node); + node_ptr prev_this (get_previous_node(this_node)); + node_ptr prev_other(get_previous_node(other_node)); + + node_ptr this_next (NodeTraits::get_next(this_node)); + node_ptr other_next(NodeTraits::get_next(other_node)); + NodeTraits::set_next(this_node, other_next); + NodeTraits::set_next(other_node, this_next); + NodeTraits::set_next(empty1 ? other_node : prev_this, other_node); + NodeTraits::set_next(empty2 ? this_node : prev_other, this_node); + + if(this_inited){ + base_t::init(other_node); + } + if(other_inited){ + base_t::init(this_node); + } + } + + //! Effects: Reverses the order of elements in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: This function is linear to the contained elements. + static void reverse(node_ptr p) + { + node_ptr i = NodeTraits::get_next(p), e(p); + for (;;) { + node_ptr nxt(NodeTraits::get_next(i)); + if (nxt == e) + break; + base_t::transfer_after(e, i, nxt); + } + } + + //! Effects: Moves the node p n positions towards the end of the list. + //! + //! Returns: The previous node of p after the function if there has been any movement, + //! Null if n leads to no movement. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements plus the number moved positions. + static node_ptr move_backwards(node_ptr p, std::size_t n) + { + //Null shift, nothing to do + if(!n) return node_ptr(0); + node_ptr first = NodeTraits::get_next(p); + + //count() == 1 or 2, nothing to do + if(NodeTraits::get_next(first) == p) + return node_ptr(0); + + bool end_found = false; + node_ptr new_last(0); + + //Now find the new last node according to the shift count. + //If we find p before finding the new last node + //unlink p, shortcut the search now that we know the size of the list + //and continue. + for(std::size_t i = 1; i <= n; ++i){ + new_last = first; + first = NodeTraits::get_next(first); + if(first == p){ + //Shortcut the shift with the modulo of the size of the list + n %= i; + if(!n) + return node_ptr(0); + i = 0; + //Unlink p and continue the new first node search + first = NodeTraits::get_next(p); + base_t::unlink_after(new_last); + end_found = true; + } + } + + //If the p has not been found in the previous loop, find it + //starting in the new first node and unlink it + if(!end_found){ + base_t::unlink_after(base_t::get_previous_node(first, p)); + } + + //Now link p after the new last node + base_t::link_after(new_last, p); + return new_last; + } + + //! Effects: Moves the node p n positions towards the beginning of the list. + //! + //! Returns: The previous node of p after the function if there has been any movement, + //! Null if n leads equals to no movement. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements plus the number moved positions. + static node_ptr move_forward(node_ptr p, std::size_t n) + { + //Null shift, nothing to do + if(!n) return node_ptr(0); + node_ptr first = node_traits::get_next(p); + + //count() == 1 or 2, nothing to do + if(node_traits::get_next(first) == p) return node_ptr(0); + + //Iterate until p is found to know where the current last node is. + //If the shift count is less than the size of the list, we can also obtain + //the position of the new last node after the shift. + node_ptr old_last(first), next_to_it, new_last(p); + std::size_t distance = 1; + while(p != (next_to_it = node_traits::get_next(old_last))){ + if(++distance > n) + new_last = node_traits::get_next(new_last); + old_last = next_to_it; + } + //If the shift was bigger or equal than the size, obtain the equivalent + //forward shifts and find the new last node. + if(distance <= n){ + //Now find the equivalent forward shifts. + //Shortcut the shift with the modulo of the size of the list + std::size_t new_before_last_pos = (distance - (n % distance))% distance; + //If the shift is a multiple of the size there is nothing to do + if(!new_before_last_pos) return node_ptr(0); + + for( new_last = p + ; new_before_last_pos-- + ; new_last = node_traits::get_next(new_last)){ + //empty + } + } + + //Now unlink p and link it after the new last node + base_t::unlink_after(old_last); + base_t::link_after(new_last, p); + return new_last; + } +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/derivation_value_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/derivation_value_traits.hpp new file mode 100644 index 0000000000..8711d5696b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/derivation_value_traits.hpp @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP +#define BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP + +#include +#include +#include + +namespace boost { +namespace intrusive { + +//!This value traits template is used to create value traits +//!from user defined node traits where value_traits::value_type will +//!derive from node_traits::node +template +struct derivation_value_traits +{ + public: + typedef NodeTraits node_traits; + typedef T value_type; + typedef typename node_traits::node node; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + typedef typename boost::pointer_to_other::type pointer; + typedef typename boost::pointer_to_other::type const_pointer; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + static const link_mode_type link_mode = LinkMode; + + static node_ptr to_node_ptr(reference value) + { return node_ptr(&value); } + + static const_node_ptr to_node_ptr(const_reference value) + { return node_ptr(&value); } + + static pointer to_value_ptr(node_ptr n) + { +// This still fails in gcc < 4.4 so forget about it +// using ::boost::static_pointer_cast; +// return static_pointer_cast(n)); + return pointer(&static_cast(*n)); + } + + static const_pointer to_value_ptr(const_node_ptr n) + { +// This still fails in gcc < 4.4 so forget about it +// using ::boost::static_pointer_cast; +// return static_pointer_cast(n)); + return const_pointer(&static_cast(*n)); + } +}; + +} //namespace intrusive +} //namespace boost + +#endif //BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/any_node_and_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/any_node_and_algorithms.hpp new file mode 100644 index 0000000000..513bdd9fbb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/any_node_and_algorithms.hpp @@ -0,0 +1,300 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_ANY_NODE_HPP +#define BOOST_INTRUSIVE_ANY_NODE_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +template +struct any_node +{ + typedef typename boost::pointer_to_other + ::type node_ptr; + node_ptr node_ptr_1; + node_ptr node_ptr_2; + node_ptr node_ptr_3; + std::size_t size_t_1; +}; + +template +struct any_list_node_traits +{ + typedef any_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + static node_ptr get_next(const_node_ptr n) + { return n->node_ptr_1; } + + static void set_next(node_ptr n, node_ptr next) + { n->node_ptr_1 = next; } + + static node_ptr get_previous(const_node_ptr n) + { return n->node_ptr_2; } + + static void set_previous(node_ptr n, node_ptr prev) + { n->node_ptr_2 = prev; } +}; + + +template +struct any_slist_node_traits +{ + typedef any_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + static node_ptr get_next(const_node_ptr n) + { return n->node_ptr_1; } + + static void set_next(node_ptr n, node_ptr next) + { n->node_ptr_1 = next; } +}; + + +template +struct any_unordered_node_traits + : public any_slist_node_traits +{ + typedef any_slist_node_traits reduced_slist_node_traits; + typedef typename reduced_slist_node_traits::node node; + typedef typename reduced_slist_node_traits::node_ptr node_ptr; + typedef typename reduced_slist_node_traits::const_node_ptr const_node_ptr; + + static const bool store_hash = true; + static const bool optimize_multikey = true; + + static node_ptr get_next(const_node_ptr n) + { + using ::boost::static_pointer_cast; + return static_pointer_cast(n->node_ptr_1); + } + + static void set_next(node_ptr n, node_ptr next) + { n->node_ptr_1 = next; } + + static node_ptr get_prev_in_group(const_node_ptr n) + { return n->node_ptr_2; } + + static void set_prev_in_group(node_ptr n, node_ptr prev) + { n->node_ptr_2 = prev; } + + static std::size_t get_hash(const_node_ptr n) + { return n->size_t_1; } + + static void set_hash(node_ptr n, std::size_t h) + { n->size_t_1 = h; } +}; + + +template +struct any_rbtree_node_traits +{ + typedef any_node node; + + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + typedef std::size_t color; + + static node_ptr get_parent(const_node_ptr n) + { return n->node_ptr_1; } + + static void set_parent(node_ptr n, node_ptr p) + { n->node_ptr_1 = p; } + + static node_ptr get_left(const_node_ptr n) + { return n->node_ptr_2; } + + static void set_left(node_ptr n, node_ptr l) + { n->node_ptr_2 = l; } + + static node_ptr get_right(const_node_ptr n) + { return n->node_ptr_3; } + + static void set_right(node_ptr n, node_ptr r) + { n->node_ptr_3 = r; } + + static color get_color(const_node_ptr n) + { return n->size_t_1; } + + static void set_color(node_ptr n, color c) + { n->size_t_1 = c; } + + static color black() + { return 0u; } + + static color red() + { return 1u; } +}; + + +template +struct any_avltree_node_traits +{ + typedef any_node node; + + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef std::size_t balance; + + static node_ptr get_parent(const_node_ptr n) + { return n->node_ptr_1; } + + static void set_parent(node_ptr n, node_ptr p) + { n->node_ptr_1 = p; } + + static node_ptr get_left(const_node_ptr n) + { return n->node_ptr_2; } + + static void set_left(node_ptr n, node_ptr l) + { n->node_ptr_2 = l; } + + static node_ptr get_right(const_node_ptr n) + { return n->node_ptr_3; } + + static void set_right(node_ptr n, node_ptr r) + { n->node_ptr_3 = r; } + + static balance get_balance(const_node_ptr n) + { return n->size_t_1; } + + static void set_balance(node_ptr n, balance b) + { n->size_t_1 = b; } + + static balance negative() + { return 0u; } + + static balance zero() + { return 1u; } + + static balance positive() + { return 2u; } +}; + + +template +struct any_tree_node_traits +{ + typedef any_node node; + + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + static node_ptr get_parent(const_node_ptr n) + { return n->node_ptr_1; } + + static void set_parent(node_ptr n, node_ptr p) + { n->node_ptr_1 = p; } + + static node_ptr get_left(const_node_ptr n) + { return n->node_ptr_2; } + + static void set_left(node_ptr n, node_ptr l) + { n->node_ptr_2 = l; } + + static node_ptr get_right(const_node_ptr n) + { return n->node_ptr_3; } + + static void set_right(node_ptr n, node_ptr r) + { n->node_ptr_3 = r; } +}; + +template +class any_node_traits +{ + public: + typedef any_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; +}; + +template +class any_algorithms +{ + template + static void function_not_available_for_any_hooks(typename detail::enable_if >::type) + {} + + public: + typedef any_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef any_node_traits node_traits; + + //! Requires: node must not be part of any tree. + //! + //! Effects: After the function unique(node) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init(node_ptr node) + { node->node_ptr_1 = 0; }; + + //! Effects: Returns true if node is in the same state as if called init(node) + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static bool inited(const_node_ptr node) + { return !node->node_ptr_1; }; + + static bool unique(const_node_ptr node) + { return 0 == node->node_ptr_1; } + + static void unlink(node_ptr) + { + //Auto-unlink hooks and unlink() are not available for any hooks + any_algorithms::template function_not_available_for_any_hooks(); + } + + static void swap_nodes(node_ptr l, node_ptr r) + { + //Any nodes have no swap_nodes capability because they don't know + //what algorithm they must use to unlink the node from the container + any_algorithms::template function_not_available_for_any_hooks(); + } +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_ANY_NODE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/assert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/assert.hpp new file mode 100644 index 0000000000..cfe392bfb0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/assert.hpp @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_ASSERT_HPP +#define BOOST_INTRUSIVE_DETAIL_ASSERT_HPP + +#if defined(_MSC_VER)&&(_MSC_VER>=1200) +#pragma once +#endif + +#if !defined(BOOST_INTRUSIVE_INVARIANT_ASSERT) + #include + #define BOOST_INTRUSIVE_INVARIANT_ASSERT BOOST_ASSERT +#elif defined(BOOST_INTRUSIVE_INVARIANT_ASSERT_INCLUDE) + #include BOOST_INTRUSIVE_INVARIANT_ASSERT_INCLUDE +#endif + +#if !defined(BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT) + #include + #define BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT BOOST_ASSERT +#elif defined(BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT_INCLUDE) + #include BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT_INCLUDE +#endif + +#if !defined(BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT) + #include + #define BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT BOOST_ASSERT +#elif defined(BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT_INCLUDE) + #include BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT_INCLUDE +#endif + +#endif //BOOST_INTRUSIVE_DETAIL_ASSERT_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/avltree_node.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/avltree_node.hpp new file mode 100644 index 0000000000..92458a4371 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/avltree_node.hpp @@ -0,0 +1,179 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_AVLTREE_NODE_HPP +#define BOOST_INTRUSIVE_AVLTREE_NODE_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +///////////////////////////////////////////////////////////////////////////// +// // +// Generic node_traits for any pointer type // +// // +///////////////////////////////////////////////////////////////////////////// + +//This is the compact representation: 3 pointers +template +struct compact_avltree_node +{ + typedef typename pointer_to_other + >::type node_ptr; + enum balance { negative_t, zero_t, positive_t }; + node_ptr parent_, left_, right_; +}; + +//This is the normal representation: 3 pointers + enum +template +struct avltree_node +{ + typedef typename pointer_to_other + >::type node_ptr; + enum balance { negative_t, zero_t, positive_t }; + node_ptr parent_, left_, right_; + balance balance_; +}; + +//This is the default node traits implementation +//using a node with 3 generic pointers plus an enum +template +struct default_avltree_node_traits_impl +{ + typedef avltree_node node; + + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef typename node::balance balance; + + static node_ptr get_parent(const_node_ptr n) + { return n->parent_; } + + static void set_parent(node_ptr n, node_ptr p) + { n->parent_ = p; } + + static node_ptr get_left(const_node_ptr n) + { return n->left_; } + + static void set_left(node_ptr n, node_ptr l) + { n->left_ = l; } + + static node_ptr get_right(const_node_ptr n) + { return n->right_; } + + static void set_right(node_ptr n, node_ptr r) + { n->right_ = r; } + + static balance get_balance(const_node_ptr n) + { return n->balance_; } + + static void set_balance(node_ptr n, balance b) + { n->balance_ = b; } + + static balance negative() + { return node::negative_t; } + + static balance zero() + { return node::zero_t; } + + static balance positive() + { return node::positive_t; } +}; + +//This is the compact node traits implementation +//using a node with 3 generic pointers +template +struct compact_avltree_node_traits_impl +{ + typedef compact_avltree_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef typename node::balance balance; + + typedef pointer_plus_bits ptr_bit; + + static node_ptr get_parent(const_node_ptr n) + { return ptr_bit::get_pointer(n->parent_); } + + static void set_parent(node_ptr n, node_ptr p) + { ptr_bit::set_pointer(n->parent_, p); } + + static node_ptr get_left(const_node_ptr n) + { return n->left_; } + + static void set_left(node_ptr n, node_ptr l) + { n->left_ = l; } + + static node_ptr get_right(const_node_ptr n) + { return n->right_; } + + static void set_right(node_ptr n, node_ptr r) + { n->right_ = r; } + + static balance get_balance(const_node_ptr n) + { return (balance)ptr_bit::get_bits(n->parent_); } + + static void set_balance(node_ptr n, balance b) + { ptr_bit::set_bits(n->parent_, (std::size_t)b); } + + static balance negative() + { return node::negative_t; } + + static balance zero() + { return node::zero_t; } + + static balance positive() + { return node::positive_t; } +}; + +//Dispatches the implementation based on the boolean +template +struct avltree_node_traits_dispatch + : public default_avltree_node_traits_impl +{}; + +template +struct avltree_node_traits_dispatch + : public compact_avltree_node_traits_impl +{}; + +//Inherit from the detail::link_dispatch depending on the embedding capabilities +template +struct avltree_node_traits + : public avltree_node_traits_dispatch + < VoidPointer + , OptimizeSize && + max_pointer_plus_bits + < VoidPointer + , detail::alignment_of >::value + >::value >= 2u + > +{}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_AVLTREE_NODE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/clear_on_destructor_base.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/clear_on_destructor_base.hpp new file mode 100644 index 0000000000..6765dfa05d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/clear_on_destructor_base.hpp @@ -0,0 +1,36 @@ +//////} // /////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_CLEAR_ON_DESTRUCTOR_HPP +#define BOOST_INTRUSIVE_DETAIL_CLEAR_ON_DESTRUCTOR_HPP + +#include + +namespace boost { +namespace intrusive { +namespace detail { + +template +class clear_on_destructor_base +{ + protected: + ~clear_on_destructor_base() + { + static_cast(this)->clear(); + } +}; + +} // namespace detail { +} // namespace intrusive { +} // namespace boost { + +#include + +#endif //#ifndef BOOST_INTRUSIVE_DETAIL_CLEAR_ON_DESTRUCTOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/common_slist_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/common_slist_algorithms.hpp new file mode 100644 index 0000000000..c6bdb20d1f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/common_slist_algorithms.hpp @@ -0,0 +1,103 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP + +#include +#include +#include +#include + +namespace boost { +namespace intrusive { +namespace detail { + +template +class common_slist_algorithms +{ + public: + typedef typename NodeTraits::node node; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + typedef NodeTraits node_traits; + + static node_ptr get_previous_node(node_ptr prev_init_node, node_ptr this_node) + { + node_ptr p = prev_init_node; + for( node_ptr p_next + ; this_node != (p_next = NodeTraits::get_next(p)) + ; p = p_next){ + //Logic error: possible use of linear lists with + //operations only permitted with lists + BOOST_INTRUSIVE_INVARIANT_ASSERT(p); + } + return p; + } + + static void init_header(node_ptr this_node) + { NodeTraits::set_next(this_node, this_node); } + + static void init(node_ptr this_node) + { NodeTraits::set_next(this_node, node_ptr(0)); } + + static bool unique(const_node_ptr this_node) + { + node_ptr next = NodeTraits::get_next(this_node); + return !next || next == this_node; + } + + static bool inited(const_node_ptr this_node) + { return !NodeTraits::get_next(this_node); } + + static void unlink_after(node_ptr prev_node) + { + node_ptr this_node(NodeTraits::get_next(prev_node)); + NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node)); + } + + static void unlink_after(node_ptr prev_node, node_ptr last_node) + { NodeTraits::set_next(prev_node, last_node); } + + static void link_after(node_ptr prev_node, node_ptr this_node) + { + NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node)); + NodeTraits::set_next(prev_node, this_node); + } + + static void incorporate_after(node_ptr bp, node_ptr b, node_ptr be) + { + node_ptr p(NodeTraits::get_next(bp)); + NodeTraits::set_next(bp, b); + NodeTraits::set_next(be, p); + } + + static void transfer_after(node_ptr bp, node_ptr bb, node_ptr be) + { + if (bp != bb && bp != be && bb != be) { + node_ptr next_b = NodeTraits::get_next(bb); + node_ptr next_e = NodeTraits::get_next(be); + node_ptr next_p = NodeTraits::get_next(bp); + NodeTraits::set_next(bb, next_e); + NodeTraits::set_next(be, next_p); + NodeTraits::set_next(bp, next_b); + } + } +}; + +} //namespace detail +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/config_begin.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/config_begin.hpp new file mode 100644 index 0000000000..bb126fcdf0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/config_begin.hpp @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_CONFIG_INCLUDED +#define BOOST_INTRUSIVE_CONFIG_INCLUDED +#include +#endif + +#ifdef BOOST_MSVC + + #pragma warning (push) + // + //'function' : resolved overload was found by argument-dependent lookup + //A function found by argument-dependent lookup (Koenig lookup) was eventually + //chosen by overload resolution. + // + //In Visual C++ .NET and earlier compilers, a different function would have + //been called. To pick the original function, use an explicitly qualified name. + // + + //warning C4275: non dll-interface class 'x' used as base for + //dll-interface class 'Y' + #pragma warning (disable : 4275) + //warning C4251: 'x' : class 'y' needs to have dll-interface to + //be used by clients of class 'z' + #pragma warning (disable : 4251) + #pragma warning (disable : 4675) + #pragma warning (disable : 4996) + #pragma warning (disable : 4503) + #pragma warning (disable : 4284) // odd return type for operator-> + #pragma warning (disable : 4244) // possible loss of data + #pragma warning (disable : 4521) ////Disable "multiple copy constructors specified" + #pragma warning (disable : 4522) + #pragma warning (disable : 4146) + #pragma warning (disable : 4267) //conversion from 'X' to 'Y', possible loss of data + #pragma warning (disable : 4127) //conditional expression is constant + #pragma warning (disable : 4706) //assignment within conditional expression + #pragma warning (disable : 4541) //'typeid' used on polymorphic type 'boost::exception' with /GR- + #pragma warning (disable : 4512) //'typeid' used on polymorphic type 'boost::exception' with /GR- +#endif + +//#define BOOST_INTRUSIVE_USE_ITERATOR_FACADE +//#define BOOST_INTRUSIVE_USE_ITERATOR_ENABLE_IF_CONVERTIBLE diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/config_end.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/config_end.hpp new file mode 100644 index 0000000000..4277cb576f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/config_end.hpp @@ -0,0 +1,15 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#if defined BOOST_MSVC + #pragma warning (pop) +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/ebo_functor_holder.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/ebo_functor_holder.hpp new file mode 100644 index 0000000000..d4c2d1593b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/ebo_functor_holder.hpp @@ -0,0 +1,95 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Joaquin M Lopez Munoz 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP +#define BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP + +#include +#include + +namespace boost { +namespace intrusive { +namespace detail { + +template +class ebo_functor_holder_impl +{ + public: + ebo_functor_holder_impl() + {} + ebo_functor_holder_impl(const T& t) + : t_(t) + {} + template + ebo_functor_holder_impl(const Arg1& arg1, const Arg2& arg2) + : t_(arg1, arg2) + {} + + T& get(){return t_;} + const T& get()const{return t_;} + + private: + T t_; +}; + +template +class ebo_functor_holder_impl + : public T +{ + public: + ebo_functor_holder_impl() + {} + ebo_functor_holder_impl(const T& t) + : T(t) + {} + template + ebo_functor_holder_impl(const Arg1& arg1, const Arg2& arg2) + : T(arg1, arg2) + {} + + T& get(){return *this;} + const T& get()const{return *this;} +}; + +template +class ebo_functor_holder + : public ebo_functor_holder_impl::value> +{ + private: + typedef ebo_functor_holder_impl::value> super; + + public: + ebo_functor_holder(){} + ebo_functor_holder(const T& t) + : super(t) + {} + + template + ebo_functor_holder(const Arg1& arg1, const Arg2& arg2) + : super(arg1, arg2) + {} + + ebo_functor_holder& operator=(const ebo_functor_holder& x) + { + this->get()=x.get(); + return *this; + } +}; + + +} //namespace detail { +} //namespace intrusive { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/function_detector.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/function_detector.hpp new file mode 100644 index 0000000000..a20db6dc90 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/function_detector.hpp @@ -0,0 +1,87 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2009-2009. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +// This code was modified from the code posted by Alexandre Courpron in his +// article "Interface Detection" in The Code Project: +/////////////////////////////////////////////////////////////////////////////// +// Copyright 2007 Alexandre Courpron +// +// Permission to use, copy, modify, redistribute and sell this software, +// provided that this copyright notice appears on all copies of the software. +/////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_FUNCTION_DETECTOR_HPP +#define BOOST_INTRUSIVE_DETAIL_FUNCTION_DETECTOR_HPP + +#include + +namespace boost { +namespace intrusive { +namespace function_detector { + + typedef char NotFoundType; + struct StaticFunctionType { NotFoundType x [2]; }; + struct NonStaticFunctionType { NotFoundType x [3]; }; + + enum + { NotFound = 0, + StaticFunction = sizeof( StaticFunctionType ) - sizeof( NotFoundType ), + NonStaticFunction = sizeof( NonStaticFunctionType ) - sizeof( NotFoundType ) + }; + +} //namespace boost { +} //namespace intrusive { +} //namespace function_detector { + +#define BOOST_INTRUSIVE_CREATE_FUNCTION_DETECTOR(Identifier, InstantiationKey) \ + namespace boost { \ + namespace intrusive { \ + namespace function_detector { \ + template < class T, \ + class NonStaticType, \ + class NonStaticConstType, \ + class StaticType > \ + class DetectMember_##InstantiationKey_##Identifier { \ + template < NonStaticType > \ + struct TestNonStaticNonConst ; \ + \ + template < NonStaticConstType > \ + struct TestNonStaticConst ; \ + \ + template < StaticType > \ + struct TestStatic ; \ + \ + template \ + static NonStaticFunctionType Test( TestNonStaticNonConst<&U::Identifier>*, int ); \ + \ + template \ + static NonStaticFunctionType Test( TestNonStaticConst<&U::Identifier>*, int ); \ + \ + template \ + static StaticFunctionType Test( TestStatic<&U::Identifier>*, int ); \ + \ + template \ + static NotFoundType Test( ... ); \ + public : \ + static const int check = NotFound + (sizeof(Test(0, 0)) - sizeof(NotFoundType));\ + };\ +}}} //namespace boost::intrusive::function_detector { + +#define BOOST_INTRUSIVE_DETECT_FUNCTION(Class, InstantiationKey, ReturnType, Identifier, Params) \ + ::boost::intrusive::function_detector::DetectMember_##InstantiationKey_##Identifier< Class,\ + ReturnType (Class::*)Params,\ + ReturnType (Class::*)Params const,\ + ReturnType (*)Params \ + >::check + +#include + +#endif //@ifndef BOOST_INTRUSIVE_DETAIL_FUNCTION_DETECTOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/generic_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/generic_hook.hpp new file mode 100644 index 0000000000..ae1282eaba --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/generic_hook.hpp @@ -0,0 +1,203 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_GENERIC_HOOK_HPP +#define BOOST_INTRUSIVE_GENERIC_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { +namespace detail { + +/// @cond + +enum +{ NoBaseHook +, ListBaseHook +, SlistBaseHook +, SetBaseHook +, UsetBaseHook +, SplaySetBaseHook +, AvlSetBaseHook +, BsSetBaseHook +, AnyBaseHook +}; + +struct no_default_definer{}; + +template +struct default_definer; + +template +struct default_definer +{ typedef Hook default_list_hook; }; + +template +struct default_definer +{ typedef Hook default_slist_hook; }; + +template +struct default_definer +{ typedef Hook default_set_hook; }; + +template +struct default_definer +{ typedef Hook default_uset_hook; }; + +template +struct default_definer +{ typedef Hook default_splay_set_hook; }; + +template +struct default_definer +{ typedef Hook default_avl_set_hook; }; + +template +struct default_definer +{ typedef Hook default_bs_set_hook; }; + +template +struct default_definer +{ typedef Hook default_any_hook; }; + +template +struct make_default_definer +{ + typedef typename detail::if_c + < BaseHookType != 0 + , default_definer + , no_default_definer>::type type; +}; + +template + < class GetNodeAlgorithms + , class Tag + , link_mode_type LinkMode + , int HookType + > +struct make_node_holder +{ + typedef typename detail::if_c + ::value + , detail::node_holder + < typename GetNodeAlgorithms::type::node + , Tag + , LinkMode + , HookType> + , typename GetNodeAlgorithms::type::node + >::type type; +}; + +/// @endcond + +template + < class GetNodeAlgorithms + , class Tag + , link_mode_type LinkMode + , int HookType + > +class generic_hook + /// @cond + + //If the hook is a base hook, derive generic hook from detail::node_holder + //so that a unique base class is created to convert from the node + //to the type. This mechanism will be used by base_hook_traits. + // + //If the hook is a member hook, generic hook will directly derive + //from the hook. + : public make_default_definer + < generic_hook + , detail::is_same::value*HookType + >::type + , public make_node_holder::type + /// @endcond +{ + /// @cond + typedef typename GetNodeAlgorithms::type node_algorithms; + typedef typename node_algorithms::node node; + typedef typename node_algorithms::node_ptr node_ptr; + typedef typename node_algorithms::const_node_ptr const_node_ptr; + + public: + struct boost_intrusive_tags + { + static const int hook_type = HookType; + static const link_mode_type link_mode = LinkMode; + typedef Tag tag; + typedef typename GetNodeAlgorithms::type::node_traits node_traits; + static const bool is_base_hook = !detail::is_same::value; + static const bool safemode_or_autounlink = + (int)link_mode == (int)auto_unlink || (int)link_mode == (int)safe_link; + }; + + public: + /// @endcond + + generic_hook() + { + if(boost_intrusive_tags::safemode_or_autounlink){ + node_algorithms::init(static_cast(this)); + } + } + + generic_hook(const generic_hook& ) + { + if(boost_intrusive_tags::safemode_or_autounlink){ + node_algorithms::init(static_cast(this)); + } + } + + generic_hook& operator=(const generic_hook& ) + { return *this; } + + ~generic_hook() + { + destructor_impl + (*this, detail::link_dispatch()); + } + + void swap_nodes(generic_hook &other) + { + node_algorithms::swap_nodes + ( static_cast(this), static_cast(&other)); + } + + bool is_linked() const + { + //is_linked() can be only used in safe-mode or auto-unlink + BOOST_STATIC_ASSERT(( boost_intrusive_tags::safemode_or_autounlink )); + return !node_algorithms::unique + (static_cast(this)); + } + + void unlink() + { + BOOST_STATIC_ASSERT(( (int)boost_intrusive_tags::link_mode == (int)auto_unlink )); + node_algorithms::unlink(static_cast(this)); + node_algorithms::init(static_cast(this)); + } +}; + +} //namespace detail +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_GENERIC_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/hashtable_node.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/hashtable_node.hpp new file mode 100644 index 0000000000..72188b9ec5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/hashtable_node.hpp @@ -0,0 +1,216 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_HASHTABLE_NODE_HPP +#define BOOST_INTRUSIVE_HASHTABLE_NODE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include //remove-me +#include +#include +namespace boost { +namespace intrusive { +namespace detail { + +template +struct prime_list_holder +{ + static const std::size_t prime_list[]; + static const std::size_t prime_list_size; +}; + +template +const std::size_t prime_list_holder::prime_list[] = { + 3ul, 7ul, 11ul, 17ul, 29ul, + 53ul, 97ul, 193ul, 389ul, 769ul, + 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, + 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, + 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, + 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, + 1610612741ul, 3221225473ul, 4294967291ul }; + +template +const std::size_t prime_list_holder::prime_list_size + = sizeof(prime_list)/sizeof(std::size_t); + +template +struct bucket_impl : public Slist +{ + typedef Slist slist_type; + bucket_impl() + {} + + bucket_impl(const bucket_impl &) + {} + + ~bucket_impl() + { + //This bucket is still being used! + BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty()); + } + + bucket_impl &operator=(const bucket_impl&) + { + //This bucket is still in use! + BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty()); + //Slist::clear(); + return *this; + } +}; + +template +struct bucket_traits_impl +{ + /// @cond + typedef typename boost::pointer_to_other + < typename Slist::pointer, bucket_impl >::type bucket_ptr; + typedef typename Slist::size_type size_type; + /// @endcond + + bucket_traits_impl(bucket_ptr buckets, size_type len) + : buckets_(buckets), buckets_len_(len) + {} + + bucket_ptr bucket_begin() const + { return buckets_; } + + size_type bucket_count() const + { return buckets_len_; } + + private: + bucket_ptr buckets_; + size_type buckets_len_; +}; + +template +class hashtable_iterator + : public std::iterator + < std::forward_iterator_tag + , typename Container::value_type + , typename std::iterator_traits::difference_type + , typename detail::add_const_if_c + ::type * + , typename detail::add_const_if_c + ::type & + > +{ + typedef typename Container::real_value_traits real_value_traits; + typedef typename Container::siterator siterator; + typedef typename Container::const_siterator const_siterator; + typedef typename Container::bucket_type bucket_type; + typedef typename boost::pointer_to_other + < typename Container::pointer, const Container>::type const_cont_ptr; + typedef typename Container::size_type size_type; + + static typename Container::node_ptr downcast_bucket(typename bucket_type::node_ptr p) + { +// This still fails in gcc < 4.4 so forget about it +// using ::boost::static_pointer_cast; +// return static_pointer_cast(p); + return typename Container::node_ptr(&static_cast(*p)); + } + + public: + typedef typename Container::value_type value_type; + typedef typename detail::add_const_if_c + ::type *pointer; + typedef typename detail::add_const_if_c + ::type &reference; + + hashtable_iterator () + {} + + explicit hashtable_iterator(siterator ptr, const Container *cont) + : slist_it_ (ptr), cont_ (cont) + {} + + hashtable_iterator(const hashtable_iterator &other) + : slist_it_(other.slist_it()), cont_(other.get_container()) + {} + + const siterator &slist_it() const + { return slist_it_; } + + hashtable_iterator unconst() const + { return hashtable_iterator(this->slist_it(), this->get_container()); } + + public: + hashtable_iterator& operator++() + { this->increment(); return *this; } + + hashtable_iterator operator++(int) + { + hashtable_iterator result (*this); + this->increment(); + return result; + } + + friend bool operator== (const hashtable_iterator& i, const hashtable_iterator& i2) + { return i.slist_it_ == i2.slist_it_; } + + friend bool operator!= (const hashtable_iterator& i, const hashtable_iterator& i2) + { return !(i == i2); } + + reference operator*() const + { return *this->operator ->(); } + + pointer operator->() const + { return detail::boost_intrusive_get_pointer(this->get_real_value_traits()->to_value_ptr(downcast_bucket(slist_it_.pointed_node()))); } + + const Container *get_container() const + { return detail::boost_intrusive_get_pointer(cont_); } + + const real_value_traits *get_real_value_traits() const + { return &this->get_container()->get_real_value_traits(); } + + private: + void increment() + { + const Container *cont = detail::boost_intrusive_get_pointer(cont_); + bucket_type* buckets = detail::boost_intrusive_get_pointer(cont->bucket_pointer()); + size_type buckets_len = cont->bucket_count(); + + ++slist_it_; + if(buckets[0].cend().pointed_node() <= slist_it_.pointed_node() && + slist_it_.pointed_node()<= buckets[buckets_len].cend().pointed_node() ){ + //Now get the bucket_impl from the iterator + const bucket_type &b = static_cast + (bucket_type::slist_type::container_from_end_iterator(slist_it_)); + + //Now just calculate the index b has in the bucket array + size_type n_bucket = static_cast(&b - &buckets[0]); + do{ + if (++n_bucket == buckets_len){ + slist_it_ = (&buckets[0] + buckets_len)->end(); + break; + } + slist_it_ = buckets[n_bucket].begin(); + } + while (slist_it_ == buckets[n_bucket].end()); + } + } + + siterator slist_it_; + const_cont_ptr cont_; +}; + +} //namespace detail { +} //namespace intrusive { +} //namespace boost { + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/is_stateful_value_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/is_stateful_value_traits.hpp new file mode 100644 index 0000000000..e38f4de459 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/is_stateful_value_traits.hpp @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2009-2009. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_IS_STATEFUL_VALUE_TRAITS_HPP +#define BOOST_INTRUSIVE_DETAIL_IS_STATEFUL_VALUE_TRAITS_HPP + +#include + +#if defined(_MSC_VER) && (_MSC_VER <= 1310) + +#include + +namespace boost { +namespace intrusive { +namespace detail { + +template +struct is_stateful_value_traits +{ + static const bool value = !detail::is_empty_class::value; +}; + +}}} + +#else + +#include + +BOOST_INTRUSIVE_CREATE_FUNCTION_DETECTOR(to_node_ptr, boost_intrusive) +BOOST_INTRUSIVE_CREATE_FUNCTION_DETECTOR(to_value_ptr, boost_intrusive) + +namespace boost { +namespace intrusive { +namespace detail { + +template +struct is_stateful_value_traits +{ + typedef typename ValueTraits::node_ptr node_ptr; + typedef typename ValueTraits::pointer pointer; + typedef typename ValueTraits::value_type value_type; + typedef typename ValueTraits::const_node_ptr const_node_ptr; + typedef typename ValueTraits::const_pointer const_pointer; + + typedef ValueTraits value_traits; + + static const bool value = + (boost::intrusive::function_detector::NonStaticFunction == + (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, node_ptr, to_node_ptr, (value_type&) ))) + || + (boost::intrusive::function_detector::NonStaticFunction == + (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, pointer, to_value_ptr, (node_ptr) ))) + || + (boost::intrusive::function_detector::NonStaticFunction == + (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, const_node_ptr, to_node_ptr, (const value_type&) ))) + || + (boost::intrusive::function_detector::NonStaticFunction == + (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, const_pointer, to_value_ptr, (const_node_ptr) ))) + ; +}; + +}}} + +#endif + +#include + +#endif //@ifndef BOOST_INTRUSIVE_DETAIL_IS_STATEFUL_VALUE_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/list_node.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/list_node.hpp new file mode 100644 index 0000000000..e5df1503c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/list_node.hpp @@ -0,0 +1,188 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_LIST_NODE_HPP +#define BOOST_INTRUSIVE_LIST_NODE_HPP + +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +// list_node_traits can be used with circular_list_algorithms and supplies +// a list_node holding the pointers needed for a double-linked list +// it is used by list_derived_node and list_member_node + +template +struct list_node +{ + typedef typename boost::pointer_to_other + ::type node_ptr; + node_ptr next_; + node_ptr prev_; +}; + +template +struct list_node_traits +{ + typedef list_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + static node_ptr get_previous(const_node_ptr n) + { return n->prev_; } + + static void set_previous(node_ptr n, node_ptr prev) + { n->prev_ = prev; } + + static node_ptr get_next(const_node_ptr n) + { return n->next_; } + + static void set_next(node_ptr n, node_ptr next) + { n->next_ = next; } +}; + +// list_iterator provides some basic functions for a +// node oriented bidirectional iterator: +template +class list_iterator + : public std::iterator + < std::bidirectional_iterator_tag + , typename Container::value_type + , typename Container::difference_type + , typename detail::if_c::type + , typename detail::if_c::type + > +{ + protected: + typedef typename Container::real_value_traits real_value_traits; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename node_traits::node_ptr node_ptr; + typedef typename boost::pointer_to_other + ::type void_pointer; + static const bool store_container_ptr = + detail::store_cont_ptr_on_it::value; + + public: + typedef typename Container::value_type value_type; + typedef typename detail::if_c::type pointer; + typedef typename detail::if_c::type reference; + + list_iterator() + : members_ (node_ptr(0), 0) + {} + + explicit list_iterator(node_ptr node, const Container *cont_ptr) + : members_ (node, cont_ptr) + {} + + list_iterator(list_iterator const& other) + : members_(other.pointed_node(), other.get_container()) + {} + + const node_ptr &pointed_node() const + { return members_.nodeptr_; } + + list_iterator &operator=(const node_ptr &node) + { members_.nodeptr_ = node; return static_cast(*this); } + + public: + list_iterator& operator++() + { + members_.nodeptr_ = node_traits::get_next(members_.nodeptr_); + return static_cast (*this); + } + + list_iterator operator++(int) + { + list_iterator result (*this); + members_.nodeptr_ = node_traits::get_next(members_.nodeptr_); + return result; + } + + list_iterator& operator--() + { + members_.nodeptr_ = node_traits::get_previous(members_.nodeptr_); + return static_cast (*this); + } + + list_iterator operator--(int) + { + list_iterator result (*this); + members_.nodeptr_ = node_traits::get_previous(members_.nodeptr_); + return result; + } + + friend bool operator== (const list_iterator& l, const list_iterator& r) + { return l.pointed_node() == r.pointed_node(); } + + friend bool operator!= (const list_iterator& l, const list_iterator& r) + { return !(l == r); } + + reference operator*() const + { return *operator->(); } + + pointer operator->() const + { return detail::boost_intrusive_get_pointer(this->get_real_value_traits()->to_value_ptr(members_.nodeptr_)); } + + const Container *get_container() const + { + if(store_container_ptr){ + const Container* c = static_cast(members_.get_ptr()); + BOOST_INTRUSIVE_INVARIANT_ASSERT(c != 0); + return c; + } + else{ + return 0; + } + } + + const real_value_traits *get_real_value_traits() const + { + if(store_container_ptr) + return &this->get_container()->get_real_value_traits(); + else + return 0; + } + + list_iterator unconst() const + { return list_iterator(this->pointed_node(), this->get_container()); } + + private: + struct members + : public detail::select_constptr + ::type + { + typedef typename detail::select_constptr + ::type Base; + + members(const node_ptr &n_ptr, const void *cont) + : Base(cont), nodeptr_(n_ptr) + {} + + node_ptr nodeptr_; + } members_; +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_LIST_NODE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/mpl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/mpl.hpp new file mode 100644 index 0000000000..5f57e37af4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/mpl.hpp @@ -0,0 +1,370 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_MPL_HPP +#define BOOST_INTRUSIVE_DETAIL_MPL_HPP + +#include +#include + +namespace boost { +namespace intrusive { +namespace detail { + +typedef char one; +struct two {one _[2];}; + +template< bool C_ > +struct bool_ +{ + static const bool value = C_; +}; + +typedef bool_ true_; +typedef bool_ false_; + +typedef true_ true_type; +typedef false_ false_type; + +typedef char yes_type; +struct no_type +{ + char padding[8]; +}; + +template +struct enable_if_c { + typedef T type; +}; + +template +struct enable_if_c {}; + +template +struct enable_if : public enable_if_c{}; + +template +struct apply +{ + typedef typename F::template apply::type type; +}; + +template +class is_convertible +{ + typedef char true_t; + class false_t { char dummy[2]; }; + static true_t dispatch(U); + static false_t dispatch(...); + static const T &trigger(); + public: + static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t); +}; + +template< + bool C + , typename T1 + , typename T2 + > +struct if_c +{ + typedef T1 type; +}; + +template< + typename T1 + , typename T2 + > +struct if_c +{ + typedef T2 type; +}; + +template< + typename C + , typename T1 + , typename T2 + > +struct if_ +{ + typedef typename if_c<0 != C::value, T1, T2>::type type; +}; + +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c + : if_c::type +{}; + +template< + typename C + , typename T1 + , typename T2 + > +struct eval_if + : if_::type +{}; + +// identity is an extension: it is not part of the standard. +template +struct identity +{ + typedef T type; +}; + +#if defined(BOOST_MSVC) || defined(__BORLANDC_) +#define BOOST_INTRUSIVE_TT_DECL __cdecl +#else +#define BOOST_INTRUSIVE_TT_DECL +#endif + +#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) +#define BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS +#endif + +template +struct is_unary_or_binary_function_impl +{ static const bool value = false; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; +/* +#ifdef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; +#endif +*/ +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +#ifdef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; +/* +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; +*/ +#endif + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; +/* +#ifdef BOOST_INTRUSIVE_TT_TEST_MSC_FUNC_SIGS + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; + +template +struct is_unary_or_binary_function_impl +{ static const bool value = true; }; +#endif +*/ +template +struct is_unary_or_binary_function_impl +{ static const bool value = false; }; + +template +struct is_unary_or_binary_function +{ static const bool value = is_unary_or_binary_function_impl::value; }; + +//boost::alignment_of yields to 10K lines of preprocessed code, so we +//need an alternative +template struct alignment_of; + +template +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; + +template +struct alignment_logic +{ + static const std::size_t value = A < S ? A : S; +}; + +template< typename T > +struct alignment_of +{ + static const std::size_t value = alignment_logic + < sizeof(alignment_of_hack) - sizeof(T) + , sizeof(T) + >::value; +}; + +template +struct is_same +{ + typedef char yes_type; + struct no_type + { + char padding[8]; + }; + + template + static yes_type is_same_tester(V*, V*); + static no_type is_same_tester(...); + + static T *t; + static U *u; + + static const bool value = sizeof(yes_type) == sizeof(is_same_tester(t,u)); +}; + +template +struct add_const +{ typedef const T type; }; + +template +struct remove_const +{ typedef T type; }; + +template +struct remove_const +{ typedef T type; }; + +template +struct remove_reference +{ + typedef T type; +}; + +template +struct remove_reference +{ + typedef T type; +}; + +template +class is_empty_class +{ + template + struct empty_helper_t1 : public T + { + empty_helper_t1(); + int i[256]; + }; + + struct empty_helper_t2 + { int i[256]; }; + + public: + static const bool value = sizeof(empty_helper_t1) == sizeof(empty_helper_t2); +}; + +template +struct ls_zeros +{ + static const std::size_t value = (S & std::size_t(1)) ? 0 : (1 + ls_zeros<(S>>1u)>::value); +}; + +template<> +struct ls_zeros<0> +{ + static const std::size_t value = 0; +}; + +template<> +struct ls_zeros<1> +{ + static const std::size_t value = 0; +}; + +} //namespace detail +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_DETAIL_MPL_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/parent_from_member.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/parent_from_member.hpp new file mode 100644 index 0000000000..c06d932a70 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/parent_from_member.hpp @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_DETAIL_PARENT_FROM_MEMBER_HPP +#define BOOST_INTRUSIVE_DETAIL_PARENT_FROM_MEMBER_HPP + +#include +#include + +#if defined(BOOST_MSVC) || ((defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && defined(BOOST_INTEL)) + +#define BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER +#include +#endif + +namespace boost { +namespace intrusive { +namespace detail { + +template +inline std::ptrdiff_t offset_from_pointer_to_member(const Member Parent::* ptr_to_member) +{ + //The implementation of a pointer to member is compiler dependent. + #if defined(BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER) + //msvc compliant compilers use their the first 32 bits as offset (even in 64 bit mode) + return *(const boost::int32_t*)(void*)&ptr_to_member; + //This works with gcc, msvc, ac++, ibmcpp + #elif defined(__GNUC__) || defined(__HP_aCC) || defined(BOOST_INTEL) || \ + defined(__IBMCPP__) || defined(__DECCXX) + const Parent * const parent = 0; + const char *const member = reinterpret_cast(&(parent->*ptr_to_member)); + return std::ptrdiff_t(member - reinterpret_cast(parent)); + #else + //This is the traditional C-front approach: __MWERKS__, __DMC__, __SUNPRO_CC + return (*(const std::ptrdiff_t*)(void*)&ptr_to_member) - 1; + #endif +} + +template +inline Parent *parent_from_member(Member *member, const Member Parent::* ptr_to_member) +{ + return (Parent*)((char*)member - offset_from_pointer_to_member(ptr_to_member)); +} + +template +inline const Parent *parent_from_member(const Member *member, const Member Parent::* ptr_to_member) +{ + return (const Parent*)((const char*)member - offset_from_pointer_to_member(ptr_to_member)); +} + +} //namespace detail { +} //namespace intrusive { +} //namespace boost { + +#ifdef BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER +#undef BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER +#endif + +#include + +#endif //#ifndef BOOST_INTRUSIVE_DETAIL_PARENT_FROM_MEMBER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/pointer_to_other.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/pointer_to_other.hpp new file mode 100644 index 0000000000..36a192e2cc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/pointer_to_other.hpp @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_POINTER_TO_OTHER_HPP +#define BOOST_INTRUSIVE_POINTER_TO_OTHER_HPP + +#include +#include + +#if (BOOST_VERSION < 103400) + +#ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED +#define BOOST_POINTER_TO_OTHER_HPP_INCLUDED + +namespace boost { + +template + struct pointer_to_other; + +template class Sp> + struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template class Sp> + struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template class Sp> +struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template +struct pointer_to_other< T*, U > +{ + typedef U* type; +}; + +} // namespace boost + +#endif + +#else + +#include + +#endif //#ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED + +#include + +#endif //#ifndef BOOST_INTRUSIVE_POINTER_TO_OTHER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/rbtree_node.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/rbtree_node.hpp new file mode 100644 index 0000000000..87ba59d25a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/rbtree_node.hpp @@ -0,0 +1,177 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_RBTREE_NODE_HPP +#define BOOST_INTRUSIVE_RBTREE_NODE_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +///////////////////////////////////////////////////////////////////////////// +// // +// Generic node_traits for any pointer type // +// // +///////////////////////////////////////////////////////////////////////////// + +//This is the compact representation: 3 pointers +template +struct compact_rbtree_node +{ + typedef typename pointer_to_other + >::type node_ptr; + enum color { red_t, black_t }; + node_ptr parent_, left_, right_; +}; + +//This is the normal representation: 3 pointers + enum +template +struct rbtree_node +{ + typedef typename pointer_to_other + >::type node_ptr; + + enum color { red_t, black_t }; + node_ptr parent_, left_, right_; + color color_; +}; + +//This is the default node traits implementation +//using a node with 3 generic pointers plus an enum +template +struct default_rbtree_node_traits_impl +{ + typedef rbtree_node node; + + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + typedef typename node::color color; + + static node_ptr get_parent(const_node_ptr n) + { return n->parent_; } + + static void set_parent(node_ptr n, node_ptr p) + { n->parent_ = p; } + + static node_ptr get_left(const_node_ptr n) + { return n->left_; } + + static void set_left(node_ptr n, node_ptr l) + { n->left_ = l; } + + static node_ptr get_right(const_node_ptr n) + { return n->right_; } + + static void set_right(node_ptr n, node_ptr r) + { n->right_ = r; } + + static color get_color(const_node_ptr n) + { return n->color_; } + + static void set_color(node_ptr n, color c) + { n->color_ = c; } + + static color black() + { return node::black_t; } + + static color red() + { return node::red_t; } +}; + +//This is the compact node traits implementation +//using a node with 3 generic pointers +template +struct compact_rbtree_node_traits_impl +{ + typedef compact_rbtree_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + typedef pointer_plus_bits ptr_bit; + + typedef typename node::color color; + + static node_ptr get_parent(const_node_ptr n) + { return ptr_bit::get_pointer(n->parent_); } + + static void set_parent(node_ptr n, node_ptr p) + { ptr_bit::set_pointer(n->parent_, p); } + + static node_ptr get_left(const_node_ptr n) + { return n->left_; } + + static void set_left(node_ptr n, node_ptr l) + { n->left_ = l; } + + static node_ptr get_right(const_node_ptr n) + { return n->right_; } + + static void set_right(node_ptr n, node_ptr r) + { n->right_ = r; } + + static color get_color(const_node_ptr n) + { return (color)ptr_bit::get_bits(n->parent_); } + + static void set_color(node_ptr n, color c) + { ptr_bit::set_bits(n->parent_, c != 0); } + + static color black() + { return node::black_t; } + + static color red() + { return node::red_t; } +}; + +//Dispatches the implementation based on the boolean +template +struct rbtree_node_traits_dispatch + : public default_rbtree_node_traits_impl +{}; + +template +struct rbtree_node_traits_dispatch + : public compact_rbtree_node_traits_impl +{}; + +//Inherit from the detail::link_dispatch depending on the embedding capabilities +template +struct rbtree_node_traits + : public rbtree_node_traits_dispatch + < VoidPointer + , OptimizeSize && + (max_pointer_plus_bits + < VoidPointer + , detail::alignment_of >::value + >::value >= 1) + > +{}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_RBTREE_NODE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/slist_node.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/slist_node.hpp new file mode 100644 index 0000000000..6ed8e4b6d3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/slist_node.hpp @@ -0,0 +1,163 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_SLIST_NODE_HPP +#define BOOST_INTRUSIVE_SLIST_NODE_HPP + +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +template +struct slist_node +{ + typedef typename boost::pointer_to_other + ::type node_ptr; + node_ptr next_; +}; + +// slist_node_traits can be used with circular_slist_algorithms and supplies +// a slist_node holding the pointers needed for a singly-linked list +// it is used by slist_base_hook and slist_member_hook +template +struct slist_node_traits +{ + typedef slist_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + static node_ptr get_next(const_node_ptr n) + { return n->next_; } + + static void set_next(node_ptr n, node_ptr next) + { n->next_ = next; } +}; + +// slist_iterator provides some basic functions for a +// node oriented bidirectional iterator: +template +class slist_iterator + : public std::iterator + < std::forward_iterator_tag + , typename Container::value_type + , typename Container::difference_type + , typename detail::if_c::type + , typename detail::if_c::type + > +{ + protected: + typedef typename Container::real_value_traits real_value_traits; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename node_traits::node_ptr node_ptr; + typedef typename boost::pointer_to_other + ::type void_pointer; + static const bool store_container_ptr = + detail::store_cont_ptr_on_it::value; + + public: + typedef typename Container::value_type value_type; + typedef typename detail::if_c::type pointer; + typedef typename detail::if_c::type reference; + + slist_iterator() + : members_ (node_ptr(0), 0) + {} + + explicit slist_iterator(node_ptr node, const Container *cont_ptr) + : members_ (node, cont_ptr) + {} + + slist_iterator(slist_iterator const& other) + : members_(other.pointed_node(), other.get_container()) + {} + + const node_ptr &pointed_node() const + { return members_.nodeptr_; } + + slist_iterator &operator=(const node_ptr &node) + { members_.nodeptr_ = node; return static_cast(*this); } + + public: + slist_iterator& operator++() + { + members_.nodeptr_ = node_traits::get_next(members_.nodeptr_); + return static_cast (*this); + } + + slist_iterator operator++(int) + { + slist_iterator result (*this); + members_.nodeptr_ = node_traits::get_next(members_.nodeptr_); + return result; + } + + friend bool operator== (const slist_iterator& l, const slist_iterator& r) + { return l.pointed_node() == r.pointed_node(); } + + friend bool operator!= (const slist_iterator& l, const slist_iterator& r) + { return !(l == r); } + + reference operator*() const + { return *operator->(); } + + pointer operator->() const + { return detail::boost_intrusive_get_pointer(this->get_real_value_traits()->to_value_ptr(members_.nodeptr_)); } + + const Container *get_container() const + { + if(store_container_ptr) + return static_cast(members_.get_ptr()); + else + return 0; + } + + slist_iterator unconst() const + { return slist_iterator(this->pointed_node(), this->get_container()); } + + const real_value_traits *get_real_value_traits() const + { + if(store_container_ptr) + return &this->get_container()->get_real_value_traits(); + else + return 0; + } + + private: + struct members + : public detail::select_constptr + ::type + { + typedef typename detail::select_constptr + ::type Base; + + members(const node_ptr &n_ptr, const void *cont) + : Base(cont), nodeptr_(n_ptr) + {} + + node_ptr nodeptr_; + } members_; +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SLIST_NODE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/transform_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/transform_iterator.hpp new file mode 100644 index 0000000000..15ef3ab2c9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/transform_iterator.hpp @@ -0,0 +1,173 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_TRANSFORM_ITERATOR_HPP +#define BOOST_INTRUSIVE_DETAIL_TRANSFORM_ITERATOR_HPP + +#include +#include +#include + +namespace boost { +namespace intrusive { +namespace detail { + +template +struct operator_arrow_proxy +{ + operator_arrow_proxy(const PseudoReference &px) + : m_value(px) + {} + + PseudoReference* operator->() const { return &m_value; } + // This function is needed for MWCW and BCC, which won't call operator-> + // again automatically per 13.3.1.2 para 8 +// operator T*() const { return &m_value; } + mutable PseudoReference m_value; +}; + +template +struct operator_arrow_proxy +{ + operator_arrow_proxy(T &px) + : m_value(px) + {} + + T* operator->() const { return &m_value; } + // This function is needed for MWCW and BCC, which won't call operator-> + // again automatically per 13.3.1.2 para 8 +// operator T*() const { return &m_value; } + T &m_value; +}; + +template +class transform_iterator + : public std::iterator + < typename Iterator::iterator_category + , typename detail::remove_reference::type + , typename Iterator::difference_type + , operator_arrow_proxy + , typename UnaryFunction::result_type> +{ + public: + explicit transform_iterator(const Iterator &it, const UnaryFunction &f = UnaryFunction()) + : members_(it, f) + {} + + explicit transform_iterator() + : members_() + {} + + Iterator get_it() const + { return members_.m_it; } + + //Constructors + transform_iterator& operator++() + { increment(); return *this; } + + transform_iterator operator++(int) + { + transform_iterator result (*this); + increment(); + return result; + } + + friend bool operator== (const transform_iterator& i, const transform_iterator& i2) + { return i.equal(i2); } + + friend bool operator!= (const transform_iterator& i, const transform_iterator& i2) + { return !(i == i2); } + +/* + friend bool operator> (const transform_iterator& i, const transform_iterator& i2) + { return i2 < i; } + + friend bool operator<= (const transform_iterator& i, const transform_iterator& i2) + { return !(i > i2); } + + friend bool operator>= (const transform_iterator& i, const transform_iterator& i2) + { return !(i < i2); } +*/ + friend typename Iterator::difference_type operator- (const transform_iterator& i, const transform_iterator& i2) + { return i2.distance_to(i); } + + //Arithmetic + transform_iterator& operator+=(typename Iterator::difference_type off) + { this->advance(off); return *this; } + + transform_iterator operator+(typename Iterator::difference_type off) const + { + transform_iterator other(*this); + other.advance(off); + return other; + } + + friend transform_iterator operator+(typename Iterator::difference_type off, const transform_iterator& right) + { return right + off; } + + transform_iterator& operator-=(typename Iterator::difference_type off) + { this->advance(-off); return *this; } + + transform_iterator operator-(typename Iterator::difference_type off) const + { return *this + (-off); } + + typename UnaryFunction::result_type operator*() const + { return dereference(); } + + operator_arrow_proxy + operator->() const + { return operator_arrow_proxy(dereference()); } + + private: + struct members + : UnaryFunction + { + members(const Iterator &it, const UnaryFunction &f) + : UnaryFunction(f), m_it(it) + {} + + members() + {} + + Iterator m_it; + } members_; + + + void increment() + { ++members_.m_it; } + + void decrement() + { --members_.m_it; } + + bool equal(const transform_iterator &other) const + { return members_.m_it == other.members_.m_it; } + + bool less(const transform_iterator &other) const + { return other.members_.m_it < members_.m_it; } + + typename UnaryFunction::result_type dereference() const + { return members_(*members_.m_it); } + + void advance(typename Iterator::difference_type n) + { std::advance(members_.m_it, n); } + + typename Iterator::difference_type distance_to(const transform_iterator &other)const + { return std::distance(other.members_.m_it, members_.m_it); } +}; + +} //namespace detail +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_DETAIL_TRANSFORM_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/tree_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/tree_algorithms.hpp new file mode 100644 index 0000000000..9ad2b4eff8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/tree_algorithms.hpp @@ -0,0 +1,1693 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_TREE_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_TREE_ALGORITHMS_HPP + +#include +#include +#include +#include +#include +//iG pending #include + +namespace boost { +namespace intrusive { +namespace detail { + +//! This is an implementation of a binary search tree. +//! A node in the search tree has references to its children and its parent. This +//! is to allow traversal of the whole tree from a given node making the +//! implementation of iterator a pointer to a node. +//! At the top of the tree a node is used specially. This node's parent pointer +//! is pointing to the root of the tree. Its left pointer points to the +//! leftmost node in the tree and the right pointer to the rightmost one. +//! This node is used to represent the end-iterator. +//! +//! +---------+ +//! header------------------------------>| | +//! | | +//! +----------(left)--------| |--------(right)---------+ +//! | +---------+ | +//! | | | +//! | | (parent) | +//! | | | +//! | | | +//! | +---------+ | +//! root of tree ..|......................> | | | +//! | | D | | +//! | | | | +//! | +-------+---------+-------+ | +//! | | | | +//! | | | | +//! | | | | +//! | | | | +//! | | | | +//! | +---------+ +---------+ | +//! | | | | | | +//! | | B | | F | | +//! | | | | | | +//! | +--+---------+--+ +--+---------+--+ | +//! | | | | | | +//! | | | | | | +//! | | | | | | +//! | +---+-----+ +-----+---+ +---+-----+ +-----+---+ | +//! +-->| | | | | | | |<--+ +//! | A | | C | | E | | G | +//! | | | | | | | | +//! +---------+ +---------+ +---------+ +---------+ +//! + +//! tree_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the circular list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! Static functions: +//! +//! static node_ptr get_parent(const_node_ptr n); +//! +//! static void set_parent(node_ptr n, node_ptr parent); +//! +//! static node_ptr get_left(const_node_ptr n); +//! +//! static void set_left(node_ptr n, node_ptr left); +//! +//! static node_ptr get_right(const_node_ptr n); +//! +//! static void set_right(node_ptr n, node_ptr right); +template +class tree_algorithms +{ + public: + typedef typename NodeTraits::node node; + typedef NodeTraits node_traits; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + + //! This type is the information that will be filled by insert_unique_check + struct insert_commit_data + { + insert_commit_data() + : link_left(false) + , node(0) + {} + bool link_left; + node_ptr node; + }; + + struct nop_erase_fixup + { + void operator()(node_ptr, node_ptr){} + }; + + /// @cond + private: + template + struct dispose_subtree_disposer + { + dispose_subtree_disposer(Disposer &disp, node_ptr subtree) + : disposer_(&disp), subtree_(subtree) + {} + + void release() + { disposer_ = 0; } + + ~dispose_subtree_disposer() + { + if(disposer_){ + dispose_subtree(subtree_, *disposer_); + } + } + Disposer *disposer_; + node_ptr subtree_; + }; + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(::boost::intrusive::detail::boost_intrusive_get_pointer(ptr))); + //iG pending return node_ptr(boost::const_pointer_cast(ptr)); + } + /// @endcond + + public: + static node_ptr begin_node(const_node_ptr header) + { return node_traits::get_left(header); } + + static node_ptr end_node(const_node_ptr header) + { return uncast(header); } + + //! Requires: node is a node of the tree or an node initialized + //! by init(...) or init_node. + //! + //! Effects: Returns true if the node is initialized by init() or init_node(). + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + static bool unique(const_node_ptr node) + { return !NodeTraits::get_parent(node); } + + static node_ptr get_header(const_node_ptr node) + { + node_ptr h = uncast(node); + if(NodeTraits::get_parent(node)){ + h = NodeTraits::get_parent(node); + while(!is_header(h)) + h = NodeTraits::get_parent(h); + } + return h; + } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr node2) + { + if(node1 == node2) + return; + + node_ptr header1(get_header(node1)), header2(get_header(node2)); + swap_nodes(node1, header1, node2, header2); + } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees with header header1 and header2. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) + { + if(node1 == node2) + return; + + //node1 and node2 must not be header nodes + //BOOST_INTRUSIVE_INVARIANT_ASSERT((header1 != node1 && header2 != node2)); + if(header1 != header2){ + //Update header1 if necessary + if(node1 == NodeTraits::get_left(header1)){ + NodeTraits::set_left(header1, node2); + } + + if(node1 == NodeTraits::get_right(header1)){ + NodeTraits::set_right(header1, node2); + } + + if(node1 == NodeTraits::get_parent(header1)){ + NodeTraits::set_parent(header1, node2); + } + + //Update header2 if necessary + if(node2 == NodeTraits::get_left(header2)){ + NodeTraits::set_left(header2, node1); + } + + if(node2 == NodeTraits::get_right(header2)){ + NodeTraits::set_right(header2, node1); + } + + if(node2 == NodeTraits::get_parent(header2)){ + NodeTraits::set_parent(header2, node1); + } + } + else{ + //If both nodes are from the same tree + //Update header if necessary + if(node1 == NodeTraits::get_left(header1)){ + NodeTraits::set_left(header1, node2); + } + else if(node2 == NodeTraits::get_left(header2)){ + NodeTraits::set_left(header2, node1); + } + + if(node1 == NodeTraits::get_right(header1)){ + NodeTraits::set_right(header1, node2); + } + else if(node2 == NodeTraits::get_right(header2)){ + NodeTraits::set_right(header2, node1); + } + + if(node1 == NodeTraits::get_parent(header1)){ + NodeTraits::set_parent(header1, node2); + } + else if(node2 == NodeTraits::get_parent(header2)){ + NodeTraits::set_parent(header2, node1); + } + + //Adjust data in nodes to be swapped + //so that final link swap works as expected + if(node1 == NodeTraits::get_parent(node2)){ + NodeTraits::set_parent(node2, node2); + + if(node2 == NodeTraits::get_right(node1)){ + NodeTraits::set_right(node1, node1); + } + else{ + NodeTraits::set_left(node1, node1); + } + } + else if(node2 == NodeTraits::get_parent(node1)){ + NodeTraits::set_parent(node1, node1); + + if(node1 == NodeTraits::get_right(node2)){ + NodeTraits::set_right(node2, node2); + } + else{ + NodeTraits::set_left(node2, node2); + } + } + } + + //Now swap all the links + node_ptr temp; + //swap left link + temp = NodeTraits::get_left(node1); + NodeTraits::set_left(node1, NodeTraits::get_left(node2)); + NodeTraits::set_left(node2, temp); + //swap right link + temp = NodeTraits::get_right(node1); + NodeTraits::set_right(node1, NodeTraits::get_right(node2)); + NodeTraits::set_right(node2, temp); + //swap parent link + temp = NodeTraits::get_parent(node1); + NodeTraits::set_parent(node1, NodeTraits::get_parent(node2)); + NodeTraits::set_parent(node2, temp); + + //Now adjust adjacent nodes for newly inserted node 1 + if((temp = NodeTraits::get_left(node1))){ + NodeTraits::set_parent(temp, node1); + } + if((temp = NodeTraits::get_right(node1))){ + NodeTraits::set_parent(temp, node1); + } + if((temp = NodeTraits::get_parent(node1)) && + //The header has been already updated so avoid it + temp != header2){ + if(NodeTraits::get_left(temp) == node2){ + NodeTraits::set_left(temp, node1); + } + if(NodeTraits::get_right(temp) == node2){ + NodeTraits::set_right(temp, node1); + } + } + //Now adjust adjacent nodes for newly inserted node 2 + if((temp = NodeTraits::get_left(node2))){ + NodeTraits::set_parent(temp, node2); + } + if((temp = NodeTraits::get_right(node2))){ + NodeTraits::set_parent(temp, node2); + } + if((temp = NodeTraits::get_parent(node2)) && + //The header has been already updated so avoid it + temp != header1){ + if(NodeTraits::get_left(temp) == node1){ + NodeTraits::set_left(temp, node2); + } + if(NodeTraits::get_right(temp) == node1){ + NodeTraits::set_right(temp, node2); + } + } + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing and comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) + { + if(node_to_be_replaced == new_node) + return; + replace_node(node_to_be_replaced, get_header(node_to_be_replaced), new_node); + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! with header "header" and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) + { + if(node_to_be_replaced == new_node) + return; + + //Update header if necessary + if(node_to_be_replaced == NodeTraits::get_left(header)){ + NodeTraits::set_left(header, new_node); + } + + if(node_to_be_replaced == NodeTraits::get_right(header)){ + NodeTraits::set_right(header, new_node); + } + + if(node_to_be_replaced == NodeTraits::get_parent(header)){ + NodeTraits::set_parent(header, new_node); + } + + //Now set data from the original node + node_ptr temp; + NodeTraits::set_left(new_node, NodeTraits::get_left(node_to_be_replaced)); + NodeTraits::set_right(new_node, NodeTraits::get_right(node_to_be_replaced)); + NodeTraits::set_parent(new_node, NodeTraits::get_parent(node_to_be_replaced)); + + //Now adjust adjacent nodes for newly inserted node + if((temp = NodeTraits::get_left(new_node))){ + NodeTraits::set_parent(temp, new_node); + } + if((temp = NodeTraits::get_right(new_node))){ + NodeTraits::set_parent(temp, new_node); + } + if((temp = NodeTraits::get_parent(new_node)) && + //The header has been already updated so avoid it + temp != header){ + if(NodeTraits::get_left(temp) == node_to_be_replaced){ + NodeTraits::set_left(temp, new_node); + } + if(NodeTraits::get_right(temp) == node_to_be_replaced){ + NodeTraits::set_right(temp, new_node); + } + } + } + + //! Requires: p is a node from the tree except the header. + //! + //! Effects: Returns the next node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr next_node(node_ptr p) + { + node_ptr p_right(NodeTraits::get_right(p)); + if(p_right){ + return minimum(p_right); + } + else { + node_ptr x = NodeTraits::get_parent(p); + while(p == NodeTraits::get_right(x)){ + p = x; + x = NodeTraits::get_parent(x); + } + return NodeTraits::get_right(p) != x ? x : uncast(p); + } + } + + //! Requires: p is a node from the tree except the leftmost node. + //! + //! Effects: Returns the previous node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr prev_node(node_ptr p) + { + if(is_header(p)){ + return NodeTraits::get_right(p); + //return maximum(NodeTraits::get_parent(p)); + } + else if(NodeTraits::get_left(p)){ + return maximum(NodeTraits::get_left(p)); + } + else { + node_ptr x = NodeTraits::get_parent(p); + while(p == NodeTraits::get_left(x)){ + p = x; + x = NodeTraits::get_parent(x); + } + return x; + } + } + + //! Requires: p is a node of a tree but not the header. + //! + //! Effects: Returns the minimum node of the subtree starting at p. + //! + //! Complexity: Logarithmic to the size of the subtree. + //! + //! Throws: Nothing. + static node_ptr minimum (node_ptr p) + { + for(node_ptr p_left = NodeTraits::get_left(p) + ;p_left + ;p_left = NodeTraits::get_left(p)){ + p = p_left; + } + return p; + } + + //! Requires: p is a node of a tree but not the header. + //! + //! Effects: Returns the maximum node of the subtree starting at p. + //! + //! Complexity: Logarithmic to the size of the subtree. + //! + //! Throws: Nothing. + static node_ptr maximum(node_ptr p) + { + for(node_ptr p_right = NodeTraits::get_right(p) + ;p_right + ;p_right = NodeTraits::get_right(p)){ + p = p_right; + } + return p; + } + + //! Requires: node must not be part of any tree. + //! + //! Effects: After the function unique(node) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init(node_ptr node) + { + NodeTraits::set_parent(node, node_ptr(0)); + NodeTraits::set_left(node, node_ptr(0)); + NodeTraits::set_right(node, node_ptr(0)); + }; + + //! Effects: Returns true if node is in the same state as if called init(node) + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static bool inited(const_node_ptr node) + { + return !NodeTraits::get_parent(node) && + !NodeTraits::get_left(node) && + !NodeTraits::get_right(node) ; + }; + + //! Requires: node must not be part of any tree. + //! + //! Effects: Initializes the header to represent an empty tree. + //! unique(header) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init_header(node_ptr header) + { + NodeTraits::set_parent(header, node_ptr(0)); + NodeTraits::set_left(header, header); + NodeTraits::set_right(header, header); + } + + //! Requires: "disposer" must be an object function + //! taking a node_ptr parameter and shouldn't throw. + //! + //! Effects: Empties the target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clear_and_dispose(node_ptr header, Disposer disposer) + { + node_ptr source_root = NodeTraits::get_parent(header); + if(!source_root) + return; + dispose_subtree(source_root, disposer); + init_header(header); + } + + //! Requires: header is the header of a tree. + //! + //! Effects: Unlinks the leftmost node from the tree, and + //! updates the header link to the new leftmost node. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + static node_ptr unlink_leftmost_without_rebalance(node_ptr header) + { + node_ptr leftmost = NodeTraits::get_left(header); + if (leftmost == header) + return node_ptr(0); + node_ptr leftmost_parent(NodeTraits::get_parent(leftmost)); + node_ptr leftmost_right (NodeTraits::get_right(leftmost)); + bool is_root = leftmost_parent == header; + + if (leftmost_right){ + NodeTraits::set_parent(leftmost_right, leftmost_parent); + NodeTraits::set_left(header, tree_algorithms::minimum(leftmost_right)); + + if (is_root) + NodeTraits::set_parent(header, leftmost_right); + else + NodeTraits::set_left(NodeTraits::get_parent(header), leftmost_right); + } + else if (is_root){ + NodeTraits::set_parent(header, node_ptr(0)); + NodeTraits::set_left(header, header); + NodeTraits::set_right(header, header); + } + else{ + NodeTraits::set_left(leftmost_parent, node_ptr(0)); + NodeTraits::set_left(header, leftmost_parent); + } + return leftmost; + } + + //! Requires: node is a node of the tree but it's not the header. + //! + //! Effects: Returns the number of nodes of the subtree. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr subtree) + { + if(!subtree) return 0; + std::size_t count = 0; + node_ptr p = minimum(uncast(subtree)); + bool continue_looping = true; + while(continue_looping){ + ++count; + node_ptr p_right(NodeTraits::get_right(p)); + if(p_right){ + p = minimum(p_right); + } + else { + for(;;){ + node_ptr q; + if (p == subtree){ + continue_looping = false; + break; + } + q = p; + p = NodeTraits::get_parent(p); + if (NodeTraits::get_left(p) == q) + break; + } + } + } + return count; + } + + //! Requires: node is a node of the tree but it's not the header. + //! + //! Effects: Returns the number of nodes of the subtree. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t size(const_node_ptr header) + { + node_ptr beg(begin_node(header)); + node_ptr end(end_node(header)); + std::size_t i = 0; + for(;beg != end; beg = next_node(beg)) ++i; + return i; + } + + //! Requires: header1 and header2 must be the header nodes + //! of two trees. + //! + //! Effects: Swaps two trees. After the function header1 will contain + //! links to the second tree and header2 will have links to the first tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static void swap_tree(node_ptr header1, node_ptr header2) + { + if(header1 == header2) + return; + + node_ptr tmp; + + //Parent swap + tmp = NodeTraits::get_parent(header1); + NodeTraits::set_parent(header1, NodeTraits::get_parent(header2)); + NodeTraits::set_parent(header2, tmp); + //Left swap + tmp = NodeTraits::get_left(header1); + NodeTraits::set_left(header1, NodeTraits::get_left(header2)); + NodeTraits::set_left(header2, tmp); + //Right swap + tmp = NodeTraits::get_right(header1); + NodeTraits::set_right(header1, NodeTraits::get_right(header2)); + NodeTraits::set_right(header2, tmp); + + //Now test parent + node_ptr h1_parent(NodeTraits::get_parent(header1)); + if(h1_parent){ + NodeTraits::set_parent(h1_parent, header1); + } + else{ + NodeTraits::set_left(header1, header1); + NodeTraits::set_right(header1, header1); + } + + node_ptr h2_parent(NodeTraits::get_parent(header2)); + if(h2_parent){ + NodeTraits::set_parent(h2_parent, header2); + } + else{ + NodeTraits::set_left(header2, header2); + NodeTraits::set_right(header2, header2); + } + } + + static bool is_header(const_node_ptr p) + { + node_ptr p_left (NodeTraits::get_left(p)); + node_ptr p_right(NodeTraits::get_right(p)); + if(!NodeTraits::get_parent(p) || //Header condition when empty tree + (p_left && p_right && //Header always has leftmost and rightmost + (p_left == p_right || //Header condition when only node + (NodeTraits::get_parent(p_left) != p || + NodeTraits::get_parent(p_right) != p )) + //When tree size > 1 headers can't be leftmost's + //and rightmost's parent + )){ + return true; + } + return false; + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the element that is equivalent to + //! "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr find + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { + node_ptr end = uncast(header); + node_ptr y = lower_bound(header, key, comp); + return (y == end || comp(key, y)) ? end : y; + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an a pair of node_ptr delimiting a range containing + //! all elements that are equivalent to "key" according to "comp" or an + //! empty range that indicates the position where those elements would be + //! if they there are no equivalent elements. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static std::pair equal_range + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { + node_ptr y = uncast(header); + node_ptr x = NodeTraits::get_parent(header); + + while(x){ + if(comp(x, key)){ + x = NodeTraits::get_right(x); + } + else if(comp(key, x)){ + y = x; + x = NodeTraits::get_left(x); + } + else{ + node_ptr xu(x), yu(y); + y = x, x = NodeTraits::get_left(x); + xu = NodeTraits::get_right(xu); + + while(x){ + if(comp(x, key)){ + x = NodeTraits::get_right(x); + } + else { + y = x; + x = NodeTraits::get_left(x); + } + } + + while(xu){ + if(comp(key, xu)){ + yu = xu; + xu = NodeTraits::get_left(xu); + } + else { + xu = NodeTraits::get_right(xu); + } + } + return std::pair (y, yu); + } + } + return std::pair (y, y); + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is + //! not less than "key" according to "comp" or "header" if that element does + //! not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr lower_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { + node_ptr y = uncast(header); + node_ptr x = NodeTraits::get_parent(header); + while(x){ + if(comp(x, key)){ + x = NodeTraits::get_right(x); + } + else { + y = x; + x = NodeTraits::get_left(x); + } + } + return y; + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is greater + //! than "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr upper_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { + node_ptr y = uncast(header); + node_ptr x = NodeTraits::get_parent(header); + while(x){ + if(comp(key, x)){ + y = x; + x = NodeTraits::get_left(x); + } + else { + x = NodeTraits::get_right(x); + } + } + return y; + } + + //! Requires: "header" must be the header node of a tree. + //! "commit_data" must have been obtained from a previous call to + //! "insert_unique_check". No objects should have been inserted or erased + //! from the set between the "insert_unique_check" that filled "commit_data" + //! and the call to "insert_commit". + //! + //! + //! Effects: Inserts new_node in the set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_unique_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + static void insert_unique_commit + (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data) + { return insert_commit(header, new_value, commit_data); } + + static void insert_commit + (node_ptr header, node_ptr new_node, const insert_commit_data &commit_data) + { + //Check if commit_data has not been initialized by a insert_unique_check call. + BOOST_INTRUSIVE_INVARIANT_ASSERT(commit_data.node != 0); + node_ptr parent_node(commit_data.node); + if(parent_node == header){ + NodeTraits::set_parent(header, new_node); + NodeTraits::set_right(header, new_node); + NodeTraits::set_left(header, new_node); + } + else if(commit_data.link_left){ + NodeTraits::set_left(parent_node, new_node); + if(parent_node == NodeTraits::get_left(header)) + NodeTraits::set_left(header, new_node); + } + else{ + NodeTraits::set_right(parent_node, new_node); + if(parent_node == NodeTraits::get_right(header)) + NodeTraits::set_right(header, new_node); + } + NodeTraits::set_parent(new_node, parent_node); + NodeTraits::set_right(new_node, node_ptr(0)); + NodeTraits::set_left(new_node, node_ptr(0)); + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data, std::size_t *pdepth = 0) + { + std::size_t depth = 0; + node_ptr h(uncast(header)); + node_ptr y(h); + node_ptr x(NodeTraits::get_parent(y)); + node_ptr prev(0); + + //Find the upper bound, cache the previous value and if we should + //store it in the left or right node + bool left_child = true; + while(x){ + ++depth; + y = x; + x = (left_child = comp(key, x)) ? + NodeTraits::get_left(x) : (prev = y, NodeTraits::get_right(x)); + } + + if(pdepth) *pdepth = depth; + + //Since we've found the upper bound there is no other value with the same key if: + // - There is no previous node + // - The previous node is less than the key + if(!prev || comp(prev, key)){ + commit_data.link_left = left_child; + commit_data.node = y; + return std::pair(node_ptr(), true); + } + //If the previous value was not less than key, it means that it's equal + //(because we've checked the upper bound) + else{ + return std::pair(prev, false); + } + } + + template + static std::pair insert_unique_check + (const_node_ptr header, node_ptr hint, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data, std::size_t *pdepth = 0) + { + //hint must be bigger than the key + if(hint == header || comp(key, hint)){ + node_ptr prev(hint); + //Previous value should be less than the key + if(hint == begin_node(header)|| comp((prev = prev_node(hint)), key)){ + commit_data.link_left = unique(header) || !NodeTraits::get_left(hint); + commit_data.node = commit_data.link_left ? hint : prev; + if(pdepth){ + *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1; + } + return std::pair(node_ptr(), true); + } + } + //Hint was wrong, use hintless insertion + return insert_unique_check(header, key, comp, commit_data, pdepth); + } + + template + static void insert_equal_check + ( node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp + , insert_commit_data &commit_data, std::size_t *pdepth = 0) + { + if(hint == header || !comp(hint, new_node)){ + node_ptr prev(hint); + if(hint == NodeTraits::get_left(header) || + !comp(new_node, (prev = prev_node(hint)))){ + bool link_left = unique(header) || !NodeTraits::get_left(hint); + commit_data.link_left = link_left; + commit_data.node = link_left ? hint : prev; + if(pdepth){ + *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1; + } + } + else{ + insert_equal_upper_bound_check(header, new_node, comp, commit_data, pdepth); + } + } + else{ + insert_equal_lower_bound_check(header, new_node, comp, commit_data, pdepth); + } + } + + template + static void insert_equal_upper_bound_check + (node_ptr h, node_ptr new_node, NodePtrCompare comp, insert_commit_data & commit_data, std::size_t *pdepth = 0) + { insert_equal_check_impl(true, h, new_node, comp, commit_data, pdepth); } + + template + static void insert_equal_lower_bound_check + (node_ptr h, node_ptr new_node, NodePtrCompare comp, insert_commit_data & commit_data, std::size_t *pdepth = 0) + { insert_equal_check_impl(false, h, new_node, comp, commit_data, pdepth); } + + template + static node_ptr insert_equal + (node_ptr h, node_ptr hint, node_ptr new_node, NodePtrCompare comp, std::size_t *pdepth = 0) + { + insert_commit_data commit_data; + insert_equal_check(h, hint, new_node, comp, commit_data, pdepth); + insert_commit(h, new_node, commit_data); + return new_node; + } + + template + static node_ptr insert_equal_upper_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp, std::size_t *pdepth = 0) + { + insert_commit_data commit_data; + insert_equal_upper_bound_check(h, new_node, comp, commit_data, pdepth); + insert_commit(h, new_node, commit_data); + return new_node; + } + + template + static node_ptr insert_equal_lower_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp, std::size_t *pdepth = 0) + { + insert_commit_data commit_data; + insert_equal_lower_bound_check(h, new_node, comp, commit_data, pdepth); + insert_commit(h, new_node, commit_data); + return new_node; + } + + static node_ptr insert_before + (node_ptr header, node_ptr pos, node_ptr new_node, std::size_t *pdepth = 0) + { + insert_commit_data commit_data; + insert_before_check(header, pos, commit_data, pdepth); + insert_commit(header, new_node, commit_data); + return new_node; + } + + static void insert_before_check + ( node_ptr header, node_ptr pos + , insert_commit_data &commit_data, std::size_t *pdepth = 0) + { + node_ptr prev(pos); + if(pos != NodeTraits::get_left(header)) + prev = prev_node(pos); + bool link_left = unique(header) || !NodeTraits::get_left(pos); + commit_data.link_left = link_left; + commit_data.node = link_left ? pos : prev; + if(pdepth){ + *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1; + } + } + + static void push_back + (node_ptr header, node_ptr new_node, std::size_t *pdepth = 0) + { + insert_commit_data commit_data; + push_back_check(header, commit_data, pdepth); + insert_commit(header, new_node, commit_data); + } + + static void push_back_check + (node_ptr header, insert_commit_data &commit_data, std::size_t *pdepth = 0) + { + node_ptr prev(NodeTraits::get_right(header)); + if(pdepth){ + *pdepth = prev == header ? 0 : depth(prev) + 1; + } + commit_data.link_left = false; + commit_data.node = prev; + } + + static void push_front + (node_ptr header, node_ptr new_node, std::size_t *pdepth = 0) + { + insert_commit_data commit_data; + push_front_check(header, commit_data, pdepth); + insert_commit(header, new_node, commit_data); + } + + static void push_front_check + (node_ptr header, insert_commit_data &commit_data, std::size_t *pdepth = 0) + { + node_ptr pos(NodeTraits::get_left(header)); + if(pdepth){ + *pdepth = pos == header ? 0 : depth(pos) + 1; + } + commit_data.link_left = true; + commit_data.node = pos; + } + + //! Requires: p can't be a header node. + //! + //! Effects: Calculates the depth of a node: the depth of a + //! node is the length (number of edges) of the path from the root + //! to that node. (The root node is at depth 0.) + //! + //! Complexity: Logarithmic to the number of nodes in the tree. + //! + //! Throws: Nothing. + static std::size_t depth(const_node_ptr p) + { + std::size_t depth = 0; + node_ptr p_parent; + while(p != NodeTraits::get_parent(p_parent = NodeTraits::get_parent(p))){ + ++depth; + p = p_parent; + } + return depth; + } + + //! Requires: "cloner" must be a function + //! object taking a node_ptr and returning a new cloned node of it. "disposer" must + //! take a node_ptr and shouldn't throw. + //! + //! Effects: First empties target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Then, duplicates the entire tree pointed by "source_header" cloning each + //! source node with node_ptr Cloner::operator()(node_ptr) to obtain + //! the nodes of the target tree. If "cloner" throws, the cloned target nodes + //! are disposed using void disposer(node_ptr). + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clone + (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer) + { + if(!unique(target_header)){ + clear_and_dispose(target_header, disposer); + } + + node_ptr leftmost, rightmost; + node_ptr new_root = clone_subtree + (source_header, target_header, cloner, disposer, leftmost, rightmost); + + //Now update header node + NodeTraits::set_parent(target_header, new_root); + NodeTraits::set_left (target_header, leftmost); + NodeTraits::set_right (target_header, rightmost); + } + + template + static node_ptr clone_subtree + ( const_node_ptr source_parent, node_ptr target_parent + , Cloner cloner, Disposer disposer + , node_ptr &leftmost_out, node_ptr &rightmost_out + ) + { + node_ptr target_sub_root = target_parent; + node_ptr source_root = NodeTraits::get_parent(source_parent); + if(!source_root){ + leftmost_out = rightmost_out = source_root; + } + else{ + //We'll calculate leftmost and rightmost nodes while iterating + node_ptr current = source_root; + node_ptr insertion_point = target_sub_root = cloner(current); + + //We'll calculate leftmost and rightmost nodes while iterating + node_ptr leftmost = target_sub_root; + node_ptr rightmost = target_sub_root; + + //First set the subroot + NodeTraits::set_left(target_sub_root, node_ptr(0)); + NodeTraits::set_right(target_sub_root, node_ptr(0)); + NodeTraits::set_parent(target_sub_root, target_parent); + + dispose_subtree_disposer rollback(disposer, target_sub_root); + while(true) { + //First clone left nodes + if( NodeTraits::get_left(current) && + !NodeTraits::get_left(insertion_point)) { + current = NodeTraits::get_left(current); + node_ptr temp = insertion_point; + //Clone and mark as leaf + insertion_point = cloner(current); + NodeTraits::set_left (insertion_point, node_ptr(0)); + NodeTraits::set_right (insertion_point, node_ptr(0)); + //Insert left + NodeTraits::set_parent(insertion_point, temp); + NodeTraits::set_left (temp, insertion_point); + //Update leftmost + if(rightmost == target_sub_root) + leftmost = insertion_point; + } + //Then clone right nodes + else if( NodeTraits::get_right(current) && + !NodeTraits::get_right(insertion_point)){ + current = NodeTraits::get_right(current); + node_ptr temp = insertion_point; + //Clone and mark as leaf + insertion_point = cloner(current); + NodeTraits::set_left (insertion_point, node_ptr(0)); + NodeTraits::set_right (insertion_point, node_ptr(0)); + //Insert right + NodeTraits::set_parent(insertion_point, temp); + NodeTraits::set_right (temp, insertion_point); + //Update rightmost + rightmost = insertion_point; + } + //If not, go up + else if(current == source_root){ + break; + } + else{ + //Branch completed, go up searching more nodes to clone + current = NodeTraits::get_parent(current); + insertion_point = NodeTraits::get_parent(insertion_point); + } + } + rollback.release(); + leftmost_out = leftmost; + rightmost_out = rightmost; + } + return target_sub_root; + } + + template + static void dispose_subtree(node_ptr x, Disposer disposer) + { + node_ptr save; + while (x){ + save = NodeTraits::get_left(x); + if (save) { + // Right rotation + NodeTraits::set_left(x, NodeTraits::get_right(save)); + NodeTraits::set_right(save, x); + } + else { + save = NodeTraits::get_right(x); + init(x); + disposer(x); + } + x = save; + } + } + + //! Requires: p is a node of a tree. + //! + //! Effects: Returns true if p is a left child. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static bool is_left_child(node_ptr p) + { return NodeTraits::get_left(NodeTraits::get_parent(p)) == p; } + + //! Requires: p is a node of a tree. + //! + //! Effects: Returns true if p is a right child. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static bool is_right_child(node_ptr p) + { return NodeTraits::get_right(NodeTraits::get_parent(p)) == p; } + + //Fix header and own's parent data when replacing x with own, providing own's old data with parent + static void replace_own_impl(node_ptr own, node_ptr x, node_ptr header, node_ptr own_parent, bool own_was_left) + { + if(NodeTraits::get_parent(header) == own) + NodeTraits::set_parent(header, x); + else if(own_was_left) + NodeTraits::set_left(own_parent, x); + else + NodeTraits::set_right(own_parent, x); + } + + //Fix header and own's parent data when replacing x with own, supposing own + //links with its parent are still ok + static void replace_own(node_ptr own, node_ptr x, node_ptr header) + { + node_ptr own_parent(NodeTraits::get_parent(own)); + bool own_is_left(NodeTraits::get_left(own_parent) == own); + replace_own_impl(own, x, header, own_parent, own_is_left); + } + + // rotate parent p to left (no header and p's parent fixup) + static node_ptr rotate_left(node_ptr p) + { + node_ptr x(NodeTraits::get_right(p)); + node_ptr x_left(NodeTraits::get_left(x)); + NodeTraits::set_right(p, x_left); + if(x_left){ + NodeTraits::set_parent(x_left, p); + } + NodeTraits::set_left(x, p); + NodeTraits::set_parent(p, x); + return x; + } + + // rotate parent p to left (with header and p's parent fixup) + static void rotate_left(node_ptr p, node_ptr header) + { + bool p_was_left(is_left_child(p)); + node_ptr p_old_parent(NodeTraits::get_parent(p)); + node_ptr x(rotate_left(p)); + NodeTraits::set_parent(x, p_old_parent); + replace_own_impl(p, x, header, p_old_parent, p_was_left); + } + + // rotate parent p to right (no header and p's parent fixup) + static node_ptr rotate_right(node_ptr p) + { + node_ptr x(NodeTraits::get_left(p)); + node_ptr x_right(NodeTraits::get_right(x)); + NodeTraits::set_left(p, x_right); + if(x_right){ + NodeTraits::set_parent(x_right, p); + } + NodeTraits::set_right(x, p); + NodeTraits::set_parent(p, x); + return x; + } + + // rotate parent p to right (with header and p's parent fixup) + static void rotate_right(node_ptr p, node_ptr header) + { + bool p_was_left(is_left_child(p)); + node_ptr p_old_parent(NodeTraits::get_parent(p)); + node_ptr x(rotate_right(p)); + NodeTraits::set_parent(x, p_old_parent); + replace_own_impl(p, x, header, p_old_parent, p_was_left); + } + + static void erase(node_ptr header, node_ptr z) + { + data_for_rebalance ignored; + erase_impl(header, z, ignored); + } + + struct data_for_rebalance + { + node_ptr x; + node_ptr x_parent; + node_ptr y; + }; + + template + static void erase(node_ptr header, node_ptr z, F z_and_successor_fixup, data_for_rebalance &info) + { + erase_impl(header, z, info); + if(info.y != z){ + z_and_successor_fixup(z, info.y); + } + } + + static void unlink(node_ptr node) + { + node_ptr x = NodeTraits::get_parent(node); + if(x){ + while(!is_header(x)) + x = NodeTraits::get_parent(x); + erase(x, node); + } + } + + static void tree_to_vine(node_ptr header) + { subtree_to_vine(NodeTraits::get_parent(header)); } + + static void vine_to_tree(node_ptr header, std::size_t count) + { vine_to_subtree(NodeTraits::get_parent(header), count); } + + static void rebalance(node_ptr header) + { + //Taken from: + //"Tree rebalancing in optimal time and space" + //Quentin F. Stout and Bette L. Warren + std::size_t len = 0; + subtree_to_vine(NodeTraits::get_parent(header), &len); + vine_to_subtree(NodeTraits::get_parent(header), len); + } + + static node_ptr rebalance_subtree(node_ptr old_root) + { + std::size_t len = 0; + node_ptr new_root = subtree_to_vine(old_root, &len); + return vine_to_subtree(new_root, len); + } + + static node_ptr subtree_to_vine(node_ptr old_root, std::size_t *plen = 0) + { + std::size_t len; + len = 0; + if(!old_root) return node_ptr(0); + + //To avoid irregularities in the algorithm (old_root can be a + //left or right child or even the root of the tree) just put the + //root as the right child of its parent. Before doing this backup + //information to restore the original relationship after + //the algorithm is applied. + node_ptr super_root = NodeTraits::get_parent(old_root); + BOOST_INTRUSIVE_INVARIANT_ASSERT(super_root); + + //Get info + node_ptr super_root_right_backup = NodeTraits::get_right(super_root); + bool super_root_is_header = is_header(super_root); + bool old_root_is_right = is_right_child(old_root); + + node_ptr x(old_root); + node_ptr new_root(x); + node_ptr save; + bool moved_to_right = false; + for( ; x; x = save){ + save = NodeTraits::get_left(x); + if(save){ + // Right rotation + node_ptr save_right = NodeTraits::get_right(save); + node_ptr x_parent = NodeTraits::get_parent(x); + NodeTraits::set_parent(save, x_parent); + NodeTraits::set_right (x_parent, save); + NodeTraits::set_parent(x, save); + NodeTraits::set_right (save, x); + NodeTraits::set_left(x, save_right); + if(save_right) + NodeTraits::set_parent(save_right, x); + if(!moved_to_right) + new_root = save; + } + else{ + moved_to_right = true; + save = NodeTraits::get_right(x); + ++len; + } + } + + if(super_root_is_header){ + NodeTraits::set_right(super_root, super_root_right_backup); + NodeTraits::set_parent(super_root, new_root); + } + else if(old_root_is_right){ + NodeTraits::set_right(super_root, new_root); + } + else{ + NodeTraits::set_right(super_root, super_root_right_backup); + NodeTraits::set_left(super_root, new_root); + } + if(plen) *plen = len; + return new_root; + } + + static node_ptr vine_to_subtree(node_ptr old_root, std::size_t count) + { + std::size_t leaf_nodes = count + 1 - ((std::size_t) 1 << floor_log2 (count + 1)); + std::size_t vine_nodes = count - leaf_nodes; + + node_ptr new_root = compress_subtree(old_root, leaf_nodes); + while(vine_nodes > 1){ + vine_nodes /= 2; + new_root = compress_subtree(new_root, vine_nodes); + } + return new_root; + } + + static node_ptr compress_subtree(node_ptr old_root, std::size_t count) + { + if(!old_root) return old_root; + + //To avoid irregularities in the algorithm (old_root can be + //left or right child or even the root of the tree) just put the + //root as the right child of its parent. First obtain + //information to restore the original relationship after + //the algorithm is applied. + node_ptr super_root = NodeTraits::get_parent(old_root); + BOOST_INTRUSIVE_INVARIANT_ASSERT(super_root); + + //Get info + node_ptr super_root_right_backup = NodeTraits::get_right(super_root); + bool super_root_is_header = is_header(super_root); + bool old_root_is_right = is_right_child(old_root); + + //Put old_root as right child + NodeTraits::set_right(super_root, old_root); + + //Start the compression algorithm + node_ptr even_parent = super_root; + node_ptr new_root = old_root; + + while(count--){ + node_ptr even = NodeTraits::get_right(even_parent); + node_ptr odd = NodeTraits::get_right(even); + + if(new_root == old_root) + new_root = odd; + + node_ptr even_right = NodeTraits::get_left(odd); + NodeTraits::set_right(even, even_right); + if (even_right) + NodeTraits::set_parent(even_right, even); + + NodeTraits::set_right(even_parent, odd); + NodeTraits::set_parent(odd, even_parent); + NodeTraits::set_left(odd, even); + NodeTraits::set_parent(even, odd); + even_parent = odd; + } + + if(super_root_is_header){ + NodeTraits::set_parent(super_root, new_root); + NodeTraits::set_right(super_root, super_root_right_backup); + } + else if(old_root_is_right){ + NodeTraits::set_right(super_root, new_root); + } + else{ + NodeTraits::set_left(super_root, new_root); + NodeTraits::set_right(super_root, super_root_right_backup); + } + return new_root; + } + + //! Requires: "n" must be a node inserted in a tree. + //! + //! Effects: Returns a pointer to the header node of the tree. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + static node_ptr get_root(node_ptr node) + { + BOOST_INTRUSIVE_INVARIANT_ASSERT((!inited(node))); + node_ptr x = NodeTraits::get_parent(node); + if(x){ + while(!is_header(x)){ + x = NodeTraits::get_parent(x); + } + return x; + } + else{ + return node; + } + } + + private: + template + static void insert_equal_check_impl + (bool upper, node_ptr h, node_ptr new_node, NodePtrCompare comp, insert_commit_data & commit_data, std::size_t *pdepth = 0) + { + std::size_t depth = 0; + node_ptr y(h); + node_ptr x(NodeTraits::get_parent(y)); + bool link_left; + + if(upper){ + while(x){ + ++depth; + y = x; + x = comp(new_node, x) ? + NodeTraits::get_left(x) : NodeTraits::get_right(x); + } + link_left = (y == h) || comp(new_node, y); + } + else{ + while(x){ + ++depth; + y = x; + x = !comp(x, new_node) ? + NodeTraits::get_left(x) : NodeTraits::get_right(x); + } + link_left = (y == h) || !comp(y, new_node); + } + + commit_data.link_left = link_left; + commit_data.node = y; + if(pdepth) *pdepth = depth; + } + + static void erase_impl(node_ptr header, node_ptr z, data_for_rebalance &info) + { + node_ptr y(z); + node_ptr x; + node_ptr x_parent(0); + node_ptr z_left(NodeTraits::get_left(z)); + node_ptr z_right(NodeTraits::get_right(z)); + if(!z_left){ + x = z_right; // x might be null. + } + else if(!z_right){ // z has exactly one non-null child. y == z. + x = z_left; // x is not null. + } + else{ + // find z's successor + y = tree_algorithms::minimum (z_right); + x = NodeTraits::get_right(y); // x might be null. + } + + if(y != z){ + // relink y in place of z. y is z's successor + NodeTraits::set_parent(NodeTraits::get_left(z), y); + NodeTraits::set_left(y, NodeTraits::get_left(z)); + if(y != NodeTraits::get_right(z)){ + x_parent = NodeTraits::get_parent(y); + if(x) + NodeTraits::set_parent(x, x_parent); + NodeTraits::set_left(x_parent, x); // y must be a child of left_ + NodeTraits::set_right(y, NodeTraits::get_right(z)); + NodeTraits::set_parent(NodeTraits::get_right(z), y); + } + else + x_parent = y; + tree_algorithms::replace_own (z, y, header); + NodeTraits::set_parent(y, NodeTraits::get_parent(z)); + } + else { // y == z --> z has only one child, or none + x_parent = NodeTraits::get_parent(z); + if(x) + NodeTraits::set_parent(x, x_parent); + tree_algorithms::replace_own (z, x, header); + if(NodeTraits::get_left(header) == z){ + NodeTraits::set_left(header, !NodeTraits::get_right(z) ? // z->get_left() must be null also + NodeTraits::get_parent(z) : // makes leftmost == header if z == root + tree_algorithms::minimum (x)); + } + if(NodeTraits::get_right(header) == z){ + NodeTraits::set_right(header, !NodeTraits::get_left(z) ? // z->get_right() must be null also + NodeTraits::get_parent(z) : // makes rightmost == header if z == root + tree_algorithms::maximum(x)); + } + } + + info.x = x; + info.x_parent = x_parent; + info.y = y; + } +}; + +} //namespace detail { +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_TREE_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/tree_node.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/tree_node.hpp new file mode 100644 index 0000000000..f6a678dc43 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/tree_node.hpp @@ -0,0 +1,190 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_TREE_NODE_HPP +#define BOOST_INTRUSIVE_TREE_NODE_HPP + +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +template +struct tree_node +{ + typedef typename pointer_to_other + >::type node_ptr; + + node_ptr parent_, left_, right_; +}; + +template +struct tree_node_traits +{ + typedef tree_node node; + + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + static node_ptr get_parent(const_node_ptr n) + { return n->parent_; } + + static void set_parent(node_ptr n, node_ptr p) + { n->parent_ = p; } + + static node_ptr get_left(const_node_ptr n) + { return n->left_; } + + static void set_left(node_ptr n, node_ptr l) + { n->left_ = l; } + + static node_ptr get_right(const_node_ptr n) + { return n->right_; } + + static void set_right(node_ptr n, node_ptr r) + { n->right_ = r; } +}; + +///////////////////////////////////////////////////////////////////////////// +// // +// Implementation of the tree iterator // +// // +///////////////////////////////////////////////////////////////////////////// + +// tree_iterator provides some basic functions for a +// node oriented bidirectional iterator: +template +class tree_iterator + : public std::iterator + < std::bidirectional_iterator_tag + , typename Container::value_type + , typename Container::difference_type + , typename detail::if_c::type + , typename detail::if_c::type + > +{ + protected: + typedef typename Container::real_value_traits real_value_traits; + typedef typename Container::node_algorithms node_algorithms; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename node_traits::node_ptr node_ptr; + typedef typename boost::pointer_to_other + ::type void_pointer; + static const bool store_container_ptr = + detail::store_cont_ptr_on_it::value; + + public: + typedef typename Container::value_type value_type; + typedef typename detail::if_c::type pointer; + typedef typename detail::if_c::type reference; + + + tree_iterator() + : members_ (0, 0) + {} + + explicit tree_iterator(node_ptr nodeptr, const Container *cont_ptr) + : members_ (nodeptr, cont_ptr) + {} + + tree_iterator(tree_iterator const& other) + : members_(other.pointed_node(), other.get_container()) + {} + + const node_ptr &pointed_node() const + { return members_.nodeptr_; } + + tree_iterator &operator=(const node_ptr &nodeptr) + { members_.nodeptr_ = nodeptr; return static_cast(*this); } + + public: + tree_iterator& operator++() + { + members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_); + return static_cast (*this); + } + + tree_iterator operator++(int) + { + tree_iterator result (*this); + members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_); + return result; + } + + tree_iterator& operator--() + { + members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_); + return static_cast (*this); + } + + tree_iterator operator--(int) + { + tree_iterator result (*this); + members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_); + return result; + } + + friend bool operator== (const tree_iterator& l, const tree_iterator& r) + { return l.pointed_node() == r.pointed_node(); } + + friend bool operator!= (const tree_iterator& l, const tree_iterator& r) + { return !(l == r); } + + reference operator*() const + { return *operator->(); } + + pointer operator->() const + { return detail::boost_intrusive_get_pointer(this->get_real_value_traits()->to_value_ptr(members_.nodeptr_)); } + + const Container *get_container() const + { return static_cast(members_.get_ptr()); } + + const real_value_traits *get_real_value_traits() const + { return &this->get_container()->get_real_value_traits(); } + + tree_iterator end_iterator_from_it() const + { + return tree_iterator(node_algorithms::get_header(this->pointed_node()), this->get_container()); + } + + tree_iterator unconst() const + { return tree_iterator(this->pointed_node(), this->get_container()); } + + private: + struct members + : public detail::select_constptr + ::type + { + typedef typename detail::select_constptr + ::type Base; + + members(const node_ptr &n_ptr, const void *cont) + : Base(cont), nodeptr_(n_ptr) + {} + + node_ptr nodeptr_; + } members_; +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_TREE_NODE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/utilities.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/utilities.hpp new file mode 100644 index 0000000000..064ff6e5de --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/utilities.hpp @@ -0,0 +1,740 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_UTILITIES_HPP +#define BOOST_INTRUSIVE_DETAIL_UTILITIES_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { +namespace detail { + +template +struct internal_member_value_traits +{ + template static detail::one test(...); + template static detail::two test(typename U::member_value_traits* = 0); + static const bool value = sizeof(test(0)) == sizeof(detail::two); +}; + +template +struct internal_base_hook_bool +{ + template + struct two_or_three {one _[2 + Add];}; + template static one test(...); + template static two_or_three test (int); + static const std::size_t value = sizeof(test(0)); +}; + +template +struct internal_base_hook_bool_is_true +{ + static const bool value = internal_base_hook_bool::value > sizeof(one)*2; +}; + +template +struct internal_any_hook_bool +{ + template + struct two_or_three {one _[2 + Add];}; + template static one test(...); + template static two_or_three test (int); + static const std::size_t value = sizeof(test(0)); +}; + +template +struct internal_any_hook_bool_is_true +{ + static const bool value = internal_any_hook_bool::value > sizeof(one)*2; +}; + + +template +struct external_value_traits_bool +{ + template + struct two_or_three {one _[2 + Add];}; + template static one test(...); + template static two_or_three test (int); + static const std::size_t value = sizeof(test(0)); +}; + +template +struct external_bucket_traits_bool +{ + template + struct two_or_three {one _[2 + Add];}; + template static one test(...); + template static two_or_three test (int); + static const std::size_t value = sizeof(test(0)); +}; + +template +struct external_value_traits_is_true +{ + static const bool value = external_value_traits_bool::value > sizeof(one)*2; +}; + +template +struct node_holder + : public Node +{}; + +template +struct smart_ptr_type +{ + typedef typename SmartPtr::value_type value_type; + typedef value_type *pointer; + static pointer get (const SmartPtr &smartptr) + { return smartptr.get();} +}; + +template +struct smart_ptr_type +{ + typedef T value_type; + typedef value_type *pointer; + static pointer get (pointer ptr) + { return ptr;} +}; + +//!Overload for smart pointers to avoid ADL problems with boost_intrusive_get_pointer +template +inline typename smart_ptr_type::pointer +boost_intrusive_get_pointer(const Ptr &ptr) +{ return smart_ptr_type::get(ptr); } + +//This functor compares a stored value +//and the one passed as an argument +template +class equal_to_value +{ + ConstReference t_; + + public: + equal_to_value(ConstReference t) + : t_(t) + {} + + bool operator()(ConstReference t)const + { return t_ == t; } +}; + +class null_disposer +{ + public: + template + void operator()(Pointer) + {} +}; + +template +class init_disposer +{ + typedef typename NodeAlgorithms::node_ptr node_ptr; + + public: + void operator()(node_ptr p) + { NodeAlgorithms::init(p); } +}; + +template +struct size_holder +{ + static const bool constant_time_size = ConstantSize; + typedef SizeType size_type; + + SizeType get_size() const + { return size_; } + + void set_size(SizeType size) + { size_ = size; } + + void decrement() + { --size_; } + + void increment() + { ++size_; } + + SizeType size_; +}; + +template +struct size_holder +{ + static const bool constant_time_size = false; + typedef SizeType size_type; + + size_type get_size() const + { return 0; } + + void set_size(size_type) + {} + + void decrement() + {} + + void increment() + {} +}; + +template +struct key_nodeptr_comp + : private detail::ebo_functor_holder +{ + typedef typename Container::real_value_traits real_value_traits; + typedef typename real_value_traits::node_ptr node_ptr; + typedef typename real_value_traits::const_node_ptr const_node_ptr; + typedef detail::ebo_functor_holder base_t; + key_nodeptr_comp(KeyValueCompare kcomp, const Container *cont) + : base_t(kcomp), cont_(cont) + {} + + template + bool operator()( const_node_ptr node, const KeyType &key + , typename enable_if_c + ::value>::type * = 0) const + { return base_t::get()(*cont_->get_real_value_traits().to_value_ptr(node), key); } + + template + bool operator()(const KeyType &key, const_node_ptr node + , typename enable_if_c + ::value>::type * = 0) const + { return base_t::get()(key, *cont_->get_real_value_traits().to_value_ptr(node)); } + + bool operator()(const_node_ptr node1, const_node_ptr node2) const + { + return base_t::get() + ( *cont_->get_real_value_traits().to_value_ptr(node1) + , *cont_->get_real_value_traits().to_value_ptr(node2) + ); + } + + const Container *cont_; +}; + +template +struct node_cloner + : private detail::ebo_functor_holder +{ + typedef typename Container::real_value_traits real_value_traits; + typedef typename Container::node_algorithms node_algorithms; + typedef typename real_value_traits::value_type value_type; + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::node_traits::node node; + typedef typename real_value_traits::node_ptr node_ptr; + typedef typename real_value_traits::const_node_ptr const_node_ptr; + typedef detail::ebo_functor_holder base_t; + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + node_cloner(F f, const Container *cont) + : base_t(f), cont_(cont) + {} + + node_ptr operator()(node_ptr p) + { return this->operator()(*p); } + + node_ptr operator()(const node &to_clone) + { + const value_type &v = + *cont_->get_real_value_traits().to_value_ptr(const_node_ptr(&to_clone)); + node_ptr n = cont_->get_real_value_traits().to_node_ptr(*base_t::get()(v)); + //Cloned node must be in default mode if the linking mode requires it + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(n)); + return n; + } + + const Container *cont_; +}; + +template +struct node_disposer + : private detail::ebo_functor_holder +{ + typedef typename Container::real_value_traits real_value_traits; + typedef typename real_value_traits::node_ptr node_ptr; + typedef detail::ebo_functor_holder base_t; + typedef typename Container::node_algorithms node_algorithms; + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + node_disposer(F f, const Container *cont) + : base_t(f), cont_(cont) + {} + + void operator()(node_ptr p) + { + if(safemode_or_autounlink) + node_algorithms::init(p); + base_t::get()(cont_->get_real_value_traits().to_value_ptr(p)); + } + const Container *cont_; +}; + +struct dummy_constptr +{ + dummy_constptr(const void *) + {} + + const void *get_ptr() const + { return 0; } +}; + +template +struct constptr +{ + typedef typename boost::pointer_to_other + ::type ConstVoidPtr; + + constptr(const void *ptr) + : const_void_ptr_(ptr) + {} + + const void *get_ptr() const + { return detail::boost_intrusive_get_pointer(const_void_ptr_); } + + ConstVoidPtr const_void_ptr_; +}; + +template +struct select_constptr +{ + typedef typename detail::if_c + < store_ptr + , constptr + , dummy_constptr + >::type type; +}; + +template +struct add_const_if_c +{ + typedef typename detail::if_c + < Add + , typename detail::add_const::type + , T + >::type type; +}; + +template +struct link_dispatch +{}; + +template +void destructor_impl(Hook &hook, detail::link_dispatch) +{ //If this assertion raises, you might have destroyed an object + //while it was still inserted in a container that is alive. + //If so, remove the object from the container before destroying it. + (void)hook; BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT(!hook.is_linked()); +} + +template +void destructor_impl(Hook &hook, detail::link_dispatch) +{ hook.unlink(); } + +template +void destructor_impl(Hook &, detail::link_dispatch) +{} + +template +struct base_hook_traits +{ + public: + typedef detail::node_holder + node_holder; + typedef NodeTraits node_traits; + typedef T value_type; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + typedef typename boost::pointer_to_other::type pointer; + typedef typename boost::pointer_to_other::type const_pointer; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + static const link_mode_type link_mode = LinkMode; + + static node_ptr to_node_ptr(reference value) + { return static_cast(&value); } + + static const_node_ptr to_node_ptr(const_reference value) + { return static_cast(&value); } + + static pointer to_value_ptr(node_ptr n) + { return static_cast(static_cast(&*n)); } + + static const_pointer to_value_ptr(const_node_ptr n) + { return static_cast(static_cast(&*n)); } +}; + +template +struct member_hook_traits +{ + public: + typedef Hook hook_type; + typedef typename hook_type::boost_intrusive_tags::node_traits node_traits; + typedef typename node_traits::node node; + typedef T value_type; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + typedef typename boost::pointer_to_other::type pointer; + typedef typename boost::pointer_to_other::type const_pointer; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + static const link_mode_type link_mode = Hook::boost_intrusive_tags::link_mode; + + static node_ptr to_node_ptr(reference value) + { return static_cast(&(value.*P)); } + + static const_node_ptr to_node_ptr(const_reference value) + { return static_cast(&(value.*P)); } + + static pointer to_value_ptr(node_ptr n) + { + return detail::parent_from_member + (static_cast(detail::boost_intrusive_get_pointer(n)), P); + } + + static const_pointer to_value_ptr(const_node_ptr n) + { + return detail::parent_from_member + (static_cast(detail::boost_intrusive_get_pointer(n)), P); + } +}; + +template +struct function_hook_traits +{ + public: + typedef typename Functor::hook_type hook_type; + typedef typename Functor::hook_ptr hook_ptr; + typedef typename Functor::const_hook_ptr const_hook_ptr; + typedef typename hook_type::boost_intrusive_tags::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename Functor::value_type value_type; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + typedef typename boost::pointer_to_other::type pointer; + typedef typename boost::pointer_to_other::type const_pointer; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + static const link_mode_type link_mode = hook_type::boost_intrusive_tags::link_mode; + + static node_ptr to_node_ptr(reference value) + { return static_cast(&*Functor::to_hook_ptr(value)); } + + static const_node_ptr to_node_ptr(const_reference value) + { return static_cast(&*Functor::to_hook_ptr(value)); } + + static pointer to_value_ptr(node_ptr n) + { return Functor::to_value_ptr(to_hook_ptr(n)); } + + static const_pointer to_value_ptr(const_node_ptr n) + { return Functor::to_value_ptr(to_hook_ptr(n)); } + + private: + static hook_ptr to_hook_ptr(node_ptr n) + { return hook_ptr(&*static_cast(&*n)); } + + static const_hook_ptr to_hook_ptr(const_node_ptr n) + { return const_hook_ptr(&*static_cast(&*n)); } +}; + + +//This function uses binary search to discover the +//highest set bit of the integer +inline std::size_t floor_log2 (std::size_t x) +{ + const std::size_t Bits = sizeof(std::size_t)*CHAR_BIT; + const bool Size_t_Bits_Power_2= !(Bits & (Bits-1)); + BOOST_STATIC_ASSERT(Size_t_Bits_Power_2); + + std::size_t n = x; + std::size_t log2 = 0; + + for(std::size_t shift = Bits >> 1; shift; shift >>= 1){ + std::size_t tmp = n >> shift; + if (tmp) + log2 += shift, n = tmp; + } + + return log2; +} + +inline float fast_log2 (float val) +{ + union caster_t + { + boost::uint32_t x; + float val; + } caster; + + caster.val = val; + boost::uint32_t x = caster.x; + const int log_2 = (int)(((x >> 23) & 255) - 128); + x &= ~(255 << 23); + x += 127 << 23; + caster.x = x; + val = caster.val; + val = ((-1.0f/3) * val + 2) * val - 2.0f/3; + + return (val + log_2); +} + +inline std::size_t ceil_log2 (std::size_t x) +{ + return ((x & (x-1))!= 0) + floor_log2(x); +} + +template +struct numbits_eq +{ + static const bool value = sizeof(SizeType)*CHAR_BIT == N; +}; + +template +struct sqrt2_pow_max; + +template +struct sqrt2_pow_max >::type> +{ + static const boost::uint32_t value = 0xb504f334; + static const std::size_t pow = 31; +}; + +template +struct sqrt2_pow_max >::type> +{ + static const boost::uint64_t value = 0xb504f333f9de6484ull; + static const std::size_t pow = 63; +}; + +// Returns floor(pow(sqrt(2), x * 2 + 1)). +// Defined for X from 0 up to the number of bits in size_t minus 1. +inline std::size_t sqrt2_pow_2xplus1 (std::size_t x) +{ + const std::size_t value = (std::size_t)sqrt2_pow_max::value; + const std::size_t pow = (std::size_t)sqrt2_pow_max::pow; + return (value >> (pow - x)) + 1; +} + +template +class exception_disposer +{ + Container *cont_; + Disposer &disp_; + + exception_disposer(const exception_disposer&); + exception_disposer &operator=(const exception_disposer&); + + public: + exception_disposer(Container &cont, Disposer &disp) + : cont_(&cont), disp_(disp) + {} + + void release() + { cont_ = 0; } + + ~exception_disposer() + { + if(cont_){ + cont_->clear_and_dispose(disp_); + } + } +}; + +template +class exception_array_disposer +{ + Container *cont_; + Disposer &disp_; + typename Container::size_type &constructed_; + + exception_array_disposer(const exception_array_disposer&); + exception_array_disposer &operator=(const exception_array_disposer&); + + public: + typedef typename Container::size_type size_type; + exception_array_disposer + (Container &cont, Disposer &disp, size_type &constructed) + : cont_(&cont), disp_(disp), constructed_(constructed) + {} + + void release() + { cont_ = 0; } + + ~exception_array_disposer() + { + size_type n = constructed_; + if(cont_){ + while(n--){ + cont_[n].clear_and_dispose(disp_); + } + } + } +}; + +template +struct store_cont_ptr_on_it_impl +{ + static const bool value = is_stateful_value_traits::value; +}; + +template +struct store_cont_ptr_on_it_impl +{ + static const bool value = true; +}; + +template +struct store_cont_ptr_on_it +{ + typedef typename Container::value_traits value_traits; + static const bool value = store_cont_ptr_on_it_impl + ::value>::value; +}; + +template +struct node_to_value + : public detail::select_constptr + < typename boost::pointer_to_other + ::type + , detail::store_cont_ptr_on_it::value + >::type +{ + static const bool store_container_ptr = + detail::store_cont_ptr_on_it::value; + + typedef typename Container::real_value_traits real_value_traits; + typedef typename real_value_traits::value_type value_type; + typedef typename detail::select_constptr + < typename boost::pointer_to_other + ::type + , store_container_ptr >::type Base; + typedef typename real_value_traits::node_traits::node node; + typedef typename detail::add_const_if_c + ::type vtype; + typedef typename detail::add_const_if_c + ::type ntype; + typedef typename boost::pointer_to_other + ::type npointer; + + node_to_value(const Container *cont) + : Base(cont) + {} + + typedef vtype & result_type; + typedef ntype & first_argument_type; + + const Container *get_container() const + { + if(store_container_ptr) + return static_cast(Base::get_ptr()); + else + return 0; + } + + const real_value_traits *get_real_value_traits() const + { + if(store_container_ptr) + return &this->get_container()->get_real_value_traits(); + else + return 0; + } + + result_type operator()(first_argument_type arg) const + { return *(this->get_real_value_traits()->to_value_ptr(npointer(&arg))); } +}; + +//This is not standard, but should work with all compilers +union max_align +{ + char char_; + short short_; + int int_; + long long_; + #ifdef BOOST_HAS_LONG_LONG + long long long_long_; + #endif + float float_; + double double_; + long double long_double_; + void * void_ptr_; +}; + +template +class array_initializer +{ + public: + template + array_initializer(const CommonInitializer &init) + { + char *init_buf = (char*)rawbuf; + std::size_t i = 0; + try{ + for(; i != N; ++i){ + new(init_buf)T(init); + init_buf += sizeof(T); + } + } + catch(...){ + while(i--){ + init_buf -= sizeof(T); + ((T*)init_buf)->~T(); + } + throw; + } + } + + operator T* () + { return (T*)(rawbuf); } + + operator const T*() const + { return (const T*)(rawbuf); } + + ~array_initializer() + { + char *init_buf = (char*)rawbuf + N*sizeof(T); + for(std::size_t i = 0; i != N; ++i){ + init_buf -= sizeof(T); + ((T*)init_buf)->~T(); + } + } + + private: + detail::max_align rawbuf[(N*sizeof(T)-1)/sizeof(detail::max_align)+1]; +}; + +} //namespace detail +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_DETAIL_UTILITIES_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/workaround.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/workaround.hpp new file mode 100644 index 0000000000..dd70862f85 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/detail/workaround.hpp @@ -0,0 +1,30 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_WRKRND_HPP +#define BOOST_INTRUSIVE_DETAIL_WRKRND_HPP + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) +// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are +// passed on the command line, which in turn defines +// __GXX_EXPERIMENTAL_CXX0X__. Note: __GXX_EXPERIMENTAL_CPP0X__ is +// defined by some very early development versions of GCC 4.3; we will +// remove this part of the check in the near future. +# if defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_INTRUSIVE_RVALUE_REFERENCE +# define BOOST_INTRUSIVE_VARIADIC_TEMPLATES +# endif +#endif + +#if defined(BOOST_INTRUSIVE_RVALUE_REFERENCE) && defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +#define BOOST_INTRUSIVE_PERFECT_FORWARDING +#endif + +#endif //#ifndef BOOST_INTRUSIVE_DETAIL_WRKRND_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/hashtable.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/hashtable.hpp new file mode 100644 index 0000000000..1493eacafb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/hashtable.hpp @@ -0,0 +1,3020 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_HASHTABLE_HPP +#define BOOST_INTRUSIVE_HASHTABLE_HPP + +#include +//std C++ +#include //std::equal_to +#include //std::pair +#include //std::swap, std::lower_bound, std::upper_bound +#include //std::size_t +#include //std::iterator_traits +//boost +#include +#include +#include +#include +//General intrusive utilities +#include +#include +#include +#include +#include +#include +#include +//Implementation utilities +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond + +namespace detail { + +struct hash_bool_flags +{ + static const std::size_t unique_keys_pos = 1u; + static const std::size_t constant_time_size_pos = 2u; + static const std::size_t power_2_buckets_pos = 4u; + static const std::size_t cache_begin_pos = 8u; + static const std::size_t compare_hash_pos = 16u; + static const std::size_t incremental_pos = 32u; +}; + +template + < class ValueTraits + , class Hash + , class Equal + , class SizeType + , class BucketTraits + , std::size_t BoolFlags + > +struct usetopt +{ + typedef ValueTraits value_traits; + typedef Hash hash; + typedef Equal equal; + typedef SizeType size_type; + typedef BucketTraits bucket_traits; + static const std::size_t bool_flags = BoolFlags; +}; + +template + < class UsetOpt + , std::size_t BoolMask + > +struct usetopt_mask +{ + typedef usetopt + type; +}; + +template +struct hash_reduced_slist_node_traits +{ + template static detail::one test(...); + template static detail::two test(typename U::reduced_slist_node_traits* = 0); + static const bool value = sizeof(test(0)) == sizeof(detail::two); +}; + +template +struct apply_reduced_slist_node_traits +{ + typedef typename NodeTraits::reduced_slist_node_traits type; +}; + +template +struct reduced_slist_node_traits +{ + typedef typename detail::eval_if_c + < hash_reduced_slist_node_traits::value + , apply_reduced_slist_node_traits + , detail::identity + >::type type; +}; + +template +struct get_slist_impl +{ + typedef trivial_value_traits trivial_traits; + + //Reducing symbol length + struct type : make_slist + < typename NodeTraits::node + , boost::intrusive::value_traits + , boost::intrusive::constant_time_size + , boost::intrusive::size_type + >::type + {}; +}; + +template +struct real_from_supposed_value_traits +{ + typedef typename detail::eval_if_c + < detail::external_value_traits_is_true + ::value + , detail::eval_value_traits + + , detail::identity + + >::type type; +}; + +template +struct get_slist_impl_from_supposed_value_traits +{ + typedef typename + real_from_supposed_value_traits + < SupposedValueTraits>::type real_value_traits; + typedef typename detail::get_node_traits + ::type node_traits; + typedef typename get_slist_impl + ::type + >::type type; +}; + +template +struct unordered_bucket_impl +{ + typedef typename + get_slist_impl_from_supposed_value_traits + ::type slist_impl; + typedef detail::bucket_impl implementation_defined; + typedef implementation_defined type; +}; + +template +struct unordered_bucket_ptr_impl +{ + typedef typename detail::get_node_traits + ::type::node_ptr node_ptr; + typedef typename unordered_bucket_impl + ::type bucket_type; + typedef typename boost::pointer_to_other + ::type implementation_defined; + typedef implementation_defined type; +}; + +template +struct store_hash_bool +{ + template + struct two_or_three {one _[2 + Add];}; + template static one test(...); + template static two_or_three test (int); + static const std::size_t value = sizeof(test(0)); +}; + +template +struct store_hash_is_true +{ + static const bool value = store_hash_bool::value > sizeof(one)*2; +}; + +template +struct optimize_multikey_bool +{ + template + struct two_or_three {one _[2 + Add];}; + template static one test(...); + template static two_or_three test (int); + static const std::size_t value = sizeof(test(0)); +}; + +template +struct optimize_multikey_is_true +{ + static const bool value = optimize_multikey_bool::value > sizeof(one)*2; +}; + +template +struct bucket_plus_size + : public detail::size_holder + < 0 != (Config::bool_flags & hash_bool_flags::constant_time_size_pos) + , typename Config::size_type> +{ + typedef detail::size_holder + < 0 != (Config::bool_flags & hash_bool_flags::constant_time_size_pos) + , typename Config::size_type> size_traits; + typedef typename Config::bucket_traits bucket_traits; + + bucket_plus_size(const bucket_traits &b_traits) + : bucket_traits_(b_traits) + {} + bucket_traits bucket_traits_; +}; + +template +struct bucket_hash_t + : public detail::ebo_functor_holder +{ + typedef typename Config::hash hasher; + typedef detail::size_holder + < 0 != (Config::bool_flags & hash_bool_flags::constant_time_size_pos) + , typename Config::size_type> size_traits; + typedef typename Config::bucket_traits bucket_traits; + + bucket_hash_t(const bucket_traits &b_traits, const hasher & h) + : detail::ebo_functor_holder(h), bucket_plus_size_(b_traits) + {} + + bucket_plus_size bucket_plus_size_; +}; + +template +struct bucket_hash_equal_t : public detail::ebo_functor_holder +{ + typedef typename Config::equal equal; + typedef typename Config::hash hasher; + typedef typename Config::bucket_traits bucket_traits; + + bucket_hash_equal_t(const bucket_traits &b_traits, const hasher & h, const equal &e) + : detail::ebo_functor_holder(e), bucket_hash(b_traits, h) + {} + bucket_hash_t bucket_hash; +}; + +template //cache_begin == true version +struct bucket_hash_equal_t + : public detail::ebo_functor_holder +{ + typedef typename Config::equal equal; + typedef typename Config::hash hasher; + typedef typename Config::bucket_traits bucket_traits; + typedef typename unordered_bucket_ptr_impl + ::type bucket_ptr; + + bucket_hash_equal_t(const bucket_traits &b_traits, const hasher & h, const equal &e) + : detail::ebo_functor_holder(e), bucket_hash(b_traits, h) + {} + bucket_hash_t bucket_hash; + bucket_ptr cached_begin_; +}; + +template +struct hashtable_data_t : public Config::value_traits +{ + static const std::size_t bool_flags = Config::bool_flags; + typedef typename Config::value_traits value_traits; + typedef typename Config::equal equal; + typedef typename Config::hash hasher; + typedef typename Config::bucket_traits bucket_traits; + + hashtable_data_t( const bucket_traits &b_traits, const hasher & h + , const equal &e, const value_traits &val_traits) + : Config::value_traits(val_traits), internal_(b_traits, h, e) + {} + typedef typename detail::usetopt_mask + < Config + , detail::hash_bool_flags::constant_time_size_pos + | detail::hash_bool_flags::incremental_pos + >::type masked_config_t; + struct internal + : public detail::size_holder + < 0 != (Config::bool_flags & hash_bool_flags::incremental_pos) + , typename Config::size_type> + { + internal(const bucket_traits &b_traits, const hasher & h, const equal &e) + : bucket_hash_equal_(b_traits, h, e) + {} + + bucket_hash_equal_t + < masked_config_t + , 0 != (bool_flags & hash_bool_flags::cache_begin_pos) + > bucket_hash_equal_; + } internal_; +}; + +struct insert_commit_data_impl +{ + std::size_t hash; +}; + +template +struct group_functions +{ + typedef NodeTraits node_traits; + typedef unordered_group_adapter group_traits; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::node node; + typedef typename reduced_slist_node_traits + ::type reduced_node_traits; + typedef typename reduced_node_traits::node_ptr slist_node_ptr; + typedef typename reduced_node_traits::node slist_node; + typedef circular_slist_algorithms group_algorithms; + + static node_ptr dcast_bucket_ptr(slist_node_ptr p) + { +// This still fails in gcc < 4.4 so forget about it +// using ::boost::static_pointer_cast; +// return static_pointer_cast(p); + return node_ptr(&static_cast(*p)); + } + + static slist_node_ptr priv_get_bucket_before_begin + (slist_node_ptr bucket_beg, slist_node_ptr bucket_end, node_ptr p) + { + //First find the last node of p's group. + //This requires checking the first node of the next group or + //the bucket node. + node_ptr prev_node = p; + node_ptr nxt(node_traits::get_next(p)); + while(!(bucket_beg <= nxt && nxt <= bucket_end) && + (group_traits::get_next(nxt) == prev_node)){ + prev_node = nxt; + nxt = node_traits::get_next(nxt); + } + + //If we've reached the bucket node just return it. + if(bucket_beg <= nxt && nxt <= bucket_end){ + return nxt; + } + + //Otherwise, iterate using group links until the bucket node + node_ptr first_node_of_group = nxt; + node_ptr last_node_group = group_traits::get_next(first_node_of_group); + slist_node_ptr possible_end = node_traits::get_next(last_node_group); + + while(!(bucket_beg <= possible_end && possible_end <= bucket_end)){ + first_node_of_group = dcast_bucket_ptr(possible_end); + last_node_group = group_traits::get_next(first_node_of_group); + possible_end = node_traits::get_next(last_node_group); + } + return possible_end; + } + + static node_ptr priv_get_prev_to_first_in_group(slist_node_ptr bucket_node, node_ptr first_in_group) + { + //Just iterate using group links and obtain the node + //before "first_in_group)" + node_ptr prev_node = dcast_bucket_ptr(bucket_node); + node_ptr nxt(node_traits::get_next(prev_node)); + while(nxt != first_in_group){ + prev_node = group_traits::get_next(nxt); + nxt = node_traits::get_next(prev_node); + } + return prev_node; + } + + static node_ptr priv_get_first_in_group_of_last_in_group(node_ptr last_in_group) + { + //Just iterate using group links and obtain the node + //before "last_in_group" + node_ptr possible_first = group_traits::get_next(last_in_group); + node_ptr possible_first_prev = group_traits::get_next(possible_first); + // The deleted node is at the end of the group, so the + // node in the group pointing to it is at the beginning + // of the group. Find that to change its pointer. + while(possible_first_prev != last_in_group){ + possible_first = possible_first_prev; + possible_first_prev = group_traits::get_next(possible_first); + } + return possible_first; + } + + + static void priv_erase_from_group(slist_node_ptr end_ptr, node_ptr to_erase_ptr, detail::true_) + { + node_ptr nxt_ptr(node_traits::get_next(to_erase_ptr)); + node_ptr prev_in_group_ptr(group_traits::get_next(to_erase_ptr)); + bool last_in_group = (end_ptr == nxt_ptr) || + (group_traits::get_next(nxt_ptr) != to_erase_ptr); + bool first_in_group = node_traits::get_next(prev_in_group_ptr) != to_erase_ptr; + + if(first_in_group && last_in_group){ + group_algorithms::init(to_erase_ptr); + } + else if(first_in_group){ + group_algorithms::unlink_after(nxt_ptr); + } + else if(last_in_group){ + node_ptr first_in_group = + priv_get_first_in_group_of_last_in_group(to_erase_ptr); + group_algorithms::unlink_after(first_in_group); + } + else{ + group_algorithms::unlink_after(nxt_ptr); + } + } + + static void priv_erase_from_group(slist_node_ptr, node_ptr, detail::false_) + {} + + static node_ptr priv_get_last_in_group(node_ptr first_in_group, detail::true_) + { return group_traits::get_next(first_in_group); } + + static node_ptr priv_get_last_in_group(node_ptr n, detail::false_) + { return n; } +}; + +template +class incremental_rehash_rollback +{ + private: + typedef BucketType bucket_type; + typedef SplitTraits split_traits; + + incremental_rehash_rollback(); + incremental_rehash_rollback & operator=(const incremental_rehash_rollback &); + incremental_rehash_rollback (const incremental_rehash_rollback &); + + public: + incremental_rehash_rollback + (bucket_type &source_bucket, bucket_type &destiny_bucket, split_traits &split_traits) + : source_bucket_(source_bucket), destiny_bucket_(destiny_bucket) + , split_traits_(split_traits), released_(false) + {} + + void release() + { released_ = true; } + + ~incremental_rehash_rollback() + { + if(!released_){ + //If an exception is thrown, just put all moved nodes back in the old bucket + //and move back the split mark. + destiny_bucket_.splice_after(destiny_bucket_.before_begin(), source_bucket_); + split_traits_.decrement(); + } + } + + private: + bucket_type &source_bucket_; + bucket_type &destiny_bucket_; + split_traits &split_traits_; + bool released_; +}; + +} //namespace detail { + +//!This metafunction will obtain the type of a bucket +//!from the value_traits or hook option to be used with +//!a hash container. +template +struct unordered_bucket + : public detail::unordered_bucket_impl + ::value_traits + > +{}; + +//!This metafunction will obtain the type of a bucket pointer +//!from the value_traits or hook option to be used with +//!a hash container. +template +struct unordered_bucket_ptr + : public detail::unordered_bucket_ptr_impl + ::value_traits + > +{}; + +//!This metafunction will obtain the type of the default bucket traits +//!(when the user does not specify the bucket_traits<> option) from the +//!value_traits or hook option to be used with +//!a hash container. +template +struct unordered_default_bucket_traits +{ + typedef typename ValueTraitsOrHookOption:: + template pack::value_traits supposed_value_traits; + typedef typename detail:: + get_slist_impl_from_supposed_value_traits + ::type slist_impl; + typedef detail::bucket_traits_impl + implementation_defined; + typedef implementation_defined type; +}; + +struct default_bucket_traits; + +template +struct uset_defaults + : pack_options + < none + , base_hook + , constant_time_size + , size_type + , equal > + , hash > + , bucket_traits + , power_2_buckets + , cache_begin + , compare_hash + , incremental + >::type +{}; + +/// @endcond + +//! The class template hashtable is an intrusive hash table container, that +//! is used to construct intrusive unordered_set and unordered_multiset containers. The +//! no-throw guarantee holds only, if the Equal object and Hasher don't throw. +//! +//! hashtable is a semi-intrusive container: each object to be stored in the +//! container must contain a proper hook, but the container also needs +//! additional auxiliary memory to work: hashtable needs a pointer to an array +//! of type `bucket_type` to be passed in the constructor. This bucket array must +//! have at least the same lifetime as the container. This makes the use of +//! hashtable more complicated than purely intrusive containers. +//! `bucket_type` is default-constructible, copyable and assignable +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<> +//! \c bucket_traits<>, power_2_buckets<>, cache_begin<> and incremental<>. +//! +//! hashtable only provides forward iterators but it provides 4 iterator types: +//! iterator and const_iterator to navigate through the whole container and +//! local_iterator and const_local_iterator to navigate through the values +//! stored in a single bucket. Local iterators are faster and smaller. +//! +//! It's not recommended to use non constant-time size hashtables because several +//! key functions, like "empty()", become non-constant time functions. Non +//! constant_time size hashtables are mainly provided to support auto-unlink hooks. +//! +//! hashtables, does not make automatic rehashings nor +//! offers functions related to a load factor. Rehashing can be explicitly requested +//! and the user must provide a new bucket array that will be used from that moment. +//! +//! Since no automatic rehashing is done, iterators are never invalidated when +//! inserting or erasing elements. Iterators are only invalidated when rehashing. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class hashtable_impl + : private detail::clear_on_destructor_base > +{ + template friend class detail::clear_on_destructor_base; + public: + typedef typename Config::value_traits value_traits; + + /// @cond + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + typedef typename Config::bucket_traits bucket_traits; + static const bool external_bucket_traits = + detail::external_bucket_traits_is_true::value; + typedef typename detail::eval_if_c + < external_bucket_traits + , detail::eval_bucket_traits + , detail::identity + >::type real_bucket_traits; + typedef typename detail::get_slist_impl + ::type + >::type slist_impl; + /// @endcond + + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::const_pointer const_pointer; + typedef typename real_value_traits::value_type value_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename Config::size_type size_type; + typedef value_type key_type; + typedef typename Config::equal key_equal; + typedef typename Config::hash hasher; + typedef detail::bucket_impl bucket_type; + typedef typename boost::pointer_to_other + ::type bucket_ptr; + typedef typename slist_impl::iterator siterator; + typedef typename slist_impl::const_iterator const_siterator; + typedef detail::hashtable_iterator iterator; + typedef detail::hashtable_iterator const_iterator; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef typename slist_impl::node_algorithms node_algorithms; + + static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + static const bool store_hash = detail::store_hash_is_true::value; + + static const bool unique_keys = 0 != (Config::bool_flags & detail::hash_bool_flags::unique_keys_pos); + static const bool constant_time_size = 0 != (Config::bool_flags & detail::hash_bool_flags::constant_time_size_pos); + static const bool cache_begin = 0 != (Config::bool_flags & detail::hash_bool_flags::cache_begin_pos); + static const bool compare_hash = 0 != (Config::bool_flags & detail::hash_bool_flags::compare_hash_pos); + static const bool incremental = 0 != (Config::bool_flags & detail::hash_bool_flags::incremental_pos); + static const bool power_2_buckets = incremental || (0 != (Config::bool_flags & detail::hash_bool_flags::power_2_buckets_pos)); + + static const bool optimize_multikey + = detail::optimize_multikey_is_true::value && !unique_keys; + + /// @cond + private: + + //Configuration error: compare_hash<> can't be specified without store_hash<> + //See documentation for more explanations + BOOST_STATIC_ASSERT((!compare_hash || store_hash)); + + typedef typename slist_impl::node_ptr slist_node_ptr; + typedef typename boost::pointer_to_other + ::type void_pointer; + //We'll define group traits, but these won't be instantiated if + //optimize_multikey is not true + typedef unordered_group_adapter group_traits; + typedef circular_slist_algorithms group_algorithms; + typedef detail::bool_ store_hash_t; + typedef detail::bool_ optimize_multikey_t; + typedef detail::bool_ cache_begin_t; + typedef detail::bool_ power_2_buckets_t; + typedef detail::size_holder size_traits; + typedef detail::size_holder split_traits; + typedef detail::group_functions group_functions_t; + + static const std::size_t hashtable_data_bool_flags_mask = + ( detail::hash_bool_flags::cache_begin_pos + | detail::hash_bool_flags::constant_time_size_pos + | detail::hash_bool_flags::incremental_pos + ); + typedef typename detail::usetopt_mask + ::type masked_config_t; + detail::hashtable_data_t data_; + + template + struct downcast_node_to_value + : public detail::node_to_value + { + typedef detail::node_to_value base_t; + typedef typename base_t::result_type result_type; + typedef typename detail::add_const_if_c + ::type &first_argument_type; + typedef typename detail::add_const_if_c + ::type &intermediate_argument_type; + + downcast_node_to_value(const hashtable_impl *cont) + : base_t(cont) + {} + + result_type operator()(first_argument_type arg) const + { return this->base_t::operator()(static_cast(arg)); } + }; + + template + struct node_cast_adaptor + : private detail::ebo_functor_holder + { + typedef detail::ebo_functor_holder base_t; + + template + node_cast_adaptor(const ConvertibleToF &c2f, const hashtable_impl *cont) + : base_t(base_t(c2f, cont)) + {} + + typename base_t::node_ptr operator()(const typename slist_impl::node &to_clone) + { return base_t::operator()(static_cast(to_clone)); } + + void operator()(typename slist_impl::node_ptr to_clone) + { base_t::operator()(node_ptr(&static_cast(*to_clone))); } + }; + + private: + //noncopyable + hashtable_impl (const hashtable_impl&); + hashtable_impl operator =(const hashtable_impl&); + + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + //Constant-time size is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(constant_time_size && ((int)real_value_traits::link_mode == (int)auto_unlink))); + //Cache begin is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(cache_begin && ((int)real_value_traits::link_mode == (int)auto_unlink))); + + template + node_cast_adaptor > + make_node_disposer(const Disposer &disposer) const + { return node_cast_adaptor >(disposer, this); } + + /// @endcond + + public: + typedef detail::insert_commit_data_impl insert_commit_data; + + typedef detail::transform_iterator + < typename slist_impl::iterator + , downcast_node_to_value > local_iterator; + + typedef detail::transform_iterator + < typename slist_impl::iterator + , downcast_node_to_value > const_local_iterator; + + /// @cond + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return this->data_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_.get_value_traits(*this); } + + real_value_traits &get_real_value_traits(detail::bool_) + { return this->data_; } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_.get_value_traits(*this); } + + /// @endcond + + public: + + const real_value_traits &get_real_value_traits() const + { return this->get_real_value_traits(detail::bool_()); } + + real_value_traits &get_real_value_traits() + { return this->get_real_value_traits(detail::bool_()); } + + //! Requires: buckets must not be being used by any other resource. + //! + //! Effects: Constructs an empty unordered_set, storing a reference + //! to the bucket array and copies of the key_hasher and equal_func functors. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor or invocation of hash_func or equal_func throws. + //! + //! Notes: buckets array must be disposed only after + //! *this is disposed. + hashtable_impl ( const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : data_(b_traits, hash_func, equal_func, v_traits) + { + priv_initialize_buckets(); + this->priv_size_traits().set_size(size_type(0)); + size_type bucket_size = this->priv_buckets_len(); + BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_size != 0); + //Check power of two bucket array if the option is activated + BOOST_INTRUSIVE_INVARIANT_ASSERT + (!power_2_buckets || (0 == (bucket_size & (bucket_size-1)))); + priv_split_traits().set_size(bucket_size>>1); + } + + //! Effects: Detaches all elements from this. The objects in the unordered_set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements in the unordered_set, if + //! it's a safe-mode or auto-unlink value. Otherwise constant. + //! + //! Throws: Nothing. + ~hashtable_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the unordered_set. + //! + //! Complexity: Amortized constant time. + //! Worst case (empty unordered_set): O(this->bucket_count()) + //! + //! Throws: Nothing. + iterator begin() + { return iterator(this->priv_begin(), this); } + + //! Effects: Returns a const_iterator pointing to the beginning + //! of the unordered_set. + //! + //! Complexity: Amortized constant time. + //! Worst case (empty unordered_set): O(this->bucket_count()) + //! + //! Throws: Nothing. + const_iterator begin() const + { return this->cbegin(); } + + //! Effects: Returns a const_iterator pointing to the beginning + //! of the unordered_set. + //! + //! Complexity: Amortized constant time. + //! Worst case (empty unordered_set): O(this->bucket_count()) + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return const_iterator(this->priv_begin(), this); } + + //! Effects: Returns an iterator pointing to the end of the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return iterator(priv_invalid_local_it(), 0); } + + //! Effects: Returns a const_iterator pointing to the end of the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return this->cend(); } + + //! Effects: Returns a const_iterator pointing to the end of the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return const_iterator(priv_invalid_local_it(), 0); } + + //! Effects: Returns the hasher object used by the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: If hasher copy-constructor throws. + hasher hash_function() const + { return this->priv_hasher(); } + + //! Effects: Returns the key_equal object used by the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: If key_equal copy-constructor throws. + key_equal key_eq() const + { return this->priv_equal(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: if constant-time size and cache_begin options are disabled, + //! average constant time (worst case, with empty() == true: O(this->bucket_count()). + //! Otherwise constant. + //! + //! Throws: Nothing. + bool empty() const + { + if(constant_time_size){ + return !this->size(); + } + else if(cache_begin){ + return this->begin() == this->end(); + } + else{ + size_type buckets_len = this->priv_buckets_len(); + const bucket_type *b = detail::boost_intrusive_get_pointer(this->priv_buckets()); + for (size_type n = 0; n < buckets_len; ++n, ++b){ + if(!b->empty()){ + return false; + } + } + return true; + } + } + + //! Effects: Returns the number of elements stored in the unordered_set. + //! + //! Complexity: Linear to elements contained in *this if + //! constant_time_size is false. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { + if(constant_time_size) + return this->priv_size_traits().get_size(); + else{ + size_type len = 0; + size_type buckets_len = this->priv_buckets_len(); + const bucket_type *b = detail::boost_intrusive_get_pointer(this->priv_buckets()); + for (size_type n = 0; n < buckets_len; ++n, ++b){ + len += b->size(); + } + return len; + } + } + + //! Requires: the hasher and the equality function unqualified swap + //! call should not throw. + //! + //! Effects: Swaps the contents of two unordered_sets. + //! Swaps also the contained bucket array and equality and hasher functors. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison or hash functors + //! found using ADL throw. Basic guarantee. + void swap(hashtable_impl& other) + { + using std::swap; + //These can throw + swap(this->priv_equal(), other.priv_equal()); + swap(this->priv_hasher(), other.priv_hasher()); + //These can't throw + swap(this->priv_real_bucket_traits(), other.priv_real_bucket_traits()); + priv_swap_cache(cache_begin_t(), other); + if(constant_time_size){ + size_type backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(other.priv_size_traits().get_size()); + other.priv_size_traits().set_size(backup); + } + else if(incremental){ + size_type backup = this->priv_split_traits().get_size(); + this->priv_split_traits().set_size(other.priv_split_traits().get_size()); + other.priv_split_traits().set_size(backup); + } + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw + //! Cloner should yield to nodes that compare equal and produce the same + //! hash than the original node. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. The hash function and the equality + //! predicate are copied from the source. + //! + //! If store_hash option is true, this method does not use the hash function. + //! + //! If any operation throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner or hasher throw or hash or equality predicate copying + //! throws. Basic guarantee. + template + void clone_from(const hashtable_impl &src, Cloner cloner, Disposer disposer) + { + this->clear_and_dispose(disposer); + if(!constant_time_size || !src.empty()){ + const size_type src_bucket_count = src.bucket_count(); + const size_type dst_bucket_count = this->bucket_count(); + //Check power of two bucket array if the option is activated + BOOST_INTRUSIVE_INVARIANT_ASSERT + (!power_2_buckets || (0 == (src_bucket_count & (src_bucket_count-1)))); + BOOST_INTRUSIVE_INVARIANT_ASSERT + (!power_2_buckets || (0 == (dst_bucket_count & (dst_bucket_count-1)))); + + //If src bucket count is bigger or equal, structural copy is possible + if(!incremental && (src_bucket_count >= dst_bucket_count)){ + //First clone the first ones + const bucket_ptr src_buckets = src.priv_buckets(); + const bucket_ptr dst_buckets = this->priv_buckets(); + size_type constructed; + typedef node_cast_adaptor > NodeDisposer; + typedef node_cast_adaptor > NodeCloner; + NodeDisposer node_disp(disposer, this); + + detail::exception_array_disposer + rollback(dst_buckets[0], node_disp, constructed); + for( constructed = 0 + ; constructed < dst_bucket_count + ; ++constructed){ + dst_buckets[constructed].clone_from + ( src_buckets[constructed] + , NodeCloner(cloner, this), node_disp); + } + if(src_bucket_count != dst_bucket_count){ + //Now insert the remaining ones using the modulo trick + for(//"constructed" comes from the previous loop + ; constructed < src_bucket_count + ; ++constructed){ + bucket_type &dst_b = + dst_buckets[priv_hash_to_bucket(constructed, dst_bucket_count, dst_bucket_count)]; + bucket_type &src_b = src_buckets[constructed]; + for( siterator b(src_b.begin()), e(src_b.end()) + ; b != e + ; ++b){ + dst_b.push_front(*(NodeCloner(cloner, this)(*b.pointed_node()))); + } + } + } + this->priv_hasher() = src.priv_hasher(); + this->priv_equal() = src.priv_equal(); + rollback.release(); + this->priv_size_traits().set_size(src.priv_size_traits().get_size()); + this->priv_split_traits().set_size(dst_bucket_count); + priv_insertion_update_cache(0u); + priv_erasure_update_cache(); + } + else if(store_hash){ + //Unlike previous cloning algorithm, this can throw + //if cloner, hasher or comparison functor throw + const_iterator b(src.begin()), e(src.end()); + detail::exception_disposer + rollback(*this, disposer); + for(; b != e; ++b){ + std::size_t hash_value = this->priv_stored_or_compute_hash(*b, store_hash_t());; + this->priv_insert_equal_with_hash(*cloner(*b), hash_value); + } + rollback.release(); + } + else{ + //Unlike previous cloning algorithm, this can throw + //if cloner, hasher or comparison functor throw + const_iterator b(src.begin()), e(src.end()); + detail::exception_disposer + rollback(*this, disposer); + for(; b != e; ++b){ + this->insert_equal(*cloner(*b)); + } + rollback.release(); + } + } + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts the value into the unordered_set. + //! + //! Returns: An iterator to the inserted value. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(reference value) + { + size_type bucket_num; + std::size_t hash_value; + siterator prev; + siterator it = this->priv_find + (value, this->priv_hasher(), this->priv_equal(), bucket_num, hash_value, prev); + return priv_insert_equal_find(value, bucket_num, hash_value, it); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Equivalent to this->insert_equal(t) for each element in [b, e). + //! + //! Complexity: Average case O(N), where N is std::distance(b, e). + //! Worst case O(N*this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_equal(Iterator b, Iterator e) + { + for (; b != e; ++b) + this->insert_equal(*b); + } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to inserts value into the unordered_set. + //! + //! Returns: If the value + //! is not already present inserts it and returns a pair containing the + //! iterator to the new value and true. If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert_unique(reference value) + { + insert_commit_data commit_data; + std::pair ret = this->insert_unique_check + (value, this->priv_hasher(), this->priv_equal(), commit_data); + if(!ret.second) + return ret; + return std::pair + (this->insert_unique_commit(value, commit_data), true); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Equivalent to this->insert_unique(t) for each element in [b, e). + //! + //! Complexity: Average case O(N), where N is std::distance(b, e). + //! Worst case O(N*this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_unique(Iterator b, Iterator e) + { + for (; b != e; ++b) + this->insert_unique(*b); + } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the unordered_set, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the hash or the equality is much cheaper to + //! construct than the value_type and this function offers the possibility to + //! use that the part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the unordered_set. + //! + //! After a successful rehashing insert_commit_data remains valid. + template + std::pair insert_unique_check + ( const KeyType &key + , KeyHasher hash_func + , KeyValueEqual equal_func + , insert_commit_data &commit_data) + { + size_type bucket_num; + siterator prev; + siterator prev_pos = + this->priv_find(key, hash_func, equal_func, bucket_num, commit_data.hash, prev); + bool success = prev_pos == priv_invalid_local_it(); + if(success){ + prev_pos = prev; + } + return std::pair(iterator(prev_pos, this),success); + } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the unordered_set between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the unordered_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + //! + //! After a successful rehashing insert_commit_data remains valid. + iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) + { + size_type bucket_num = priv_hash_to_bucket(commit_data.hash); + bucket_type &b = this->priv_buckets()[bucket_num]; + this->priv_size_traits().increment(); + node_ptr n = node_ptr(&priv_value_to_node(value)); + this->priv_store_hash(n, commit_data.hash, store_hash_t()); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(n)); + priv_insertion_update_cache(bucket_num); + this->priv_insert_in_group(node_ptr(0), n, optimize_multikey_t()); + return iterator(b.insert_after(b.before_begin(), *n), this); + } + + //! Effects: Erases the element pointed to by i. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased element. No destructors are called. + void erase(const_iterator i) + { this->erase_and_dispose(i, detail::null_disposer()); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average case O(std::distance(b, e)), + //! worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void erase(const_iterator b, const_iterator e) + { this->erase_and_dispose(b, e, detail::null_disposer()); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + //! Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return this->erase(value, this->priv_hasher(), this->priv_equal()); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Erases all the elements that have the same hash and + //! compare equal with the given key. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) + { return this->erase_and_dispose(key, hash_func, equal_func, detail::null_disposer()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by i. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + void erase_and_dispose(const_iterator i, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + priv_erase(i, disposer, optimize_multikey_t()); + this->priv_size_traits().decrement(); + priv_erasure_update_cache(); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average case O(std::distance(b, e)), + //! worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { + if(b != e){ + //Get the bucket number and local iterator for both iterators + siterator first_local_it(b.slist_it()); + size_type first_bucket_num = this->priv_get_bucket_num(first_local_it); + + siterator before_first_local_it + = priv_get_previous(priv_buckets()[first_bucket_num], first_local_it); + size_type last_bucket_num; + siterator last_local_it; + + //For the end iterator, we will assign the end iterator + //of the last bucket + if(e == this->end()){ + last_bucket_num = this->bucket_count() - 1; + last_local_it = priv_buckets()[last_bucket_num].end(); + } + else{ + last_local_it = e.slist_it(); + last_bucket_num = this->priv_get_bucket_num(last_local_it); + } + priv_erase_range(before_first_local_it, first_bucket_num, last_local_it, last_bucket_num, disposer); + priv_erasure_update_cache(first_bucket_num, last_bucket_num); + } + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + //! Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return this->erase_and_dispose(value, priv_hasher(), priv_equal(), disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "equal_func". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func + ,KeyValueEqual equal_func, Disposer disposer) + { + size_type bucket_num; + std::size_t h; + siterator prev; + siterator it = + this->priv_find(key, hash_func, equal_func, bucket_num, h, prev); + bool success = it != priv_invalid_local_it(); + size_type count(0); + if(!success){ + return 0; + } + else if(optimize_multikey){ + siterator last = bucket_type::s_iterator_to + (*node_traits::get_next(group_functions_t::priv_get_last_in_group + (dcast_bucket_ptr(it.pointed_node()), optimize_multikey_t()))); + this->priv_erase_range_impl(bucket_num, prev, last, disposer, count); + } + else{ + //If found erase all equal values + bucket_type &b = this->priv_buckets()[bucket_num]; + for(siterator end = b.end(); it != end; ++count, ++it){ + slist_node_ptr n(it.pointed_node()); + const value_type &v = priv_value_from_slist_node(n); + if(compare_hash){ + std::size_t vh = this->priv_stored_or_compute_hash(v, store_hash_t()); + if(h != vh || !equal_func(key, v)){ + break; + } + } + else if(!equal_func(key, v)){ + break; + } + this->priv_size_traits().decrement(); + } + b.erase_after_and_dispose(prev, it, make_node_disposer(disposer)); + } + priv_erasure_update_cache(); + return count; + } + + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { + priv_clear_buckets(); + this->priv_size_traits().set_size(size_type(0)); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { + if(!constant_time_size || !this->empty()){ + size_type num_buckets = this->bucket_count(); + bucket_ptr b = this->priv_buckets(); + for(; num_buckets--; ++b){ + b->clear_and_dispose(make_node_disposer(disposer)); + } + this->priv_size_traits().set_size(size_type(0)); + } + priv_initialize_cache(); + } + + //! Effects: Returns the number of contained elements with the given value + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + size_type count(const_reference value) const + { return this->count(value, this->priv_hasher(), this->priv_equal()); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If hash_func or equal throw. + template + size_type count(const KeyType &key, const KeyHasher &hash_func, const KeyValueEqual &equal_func) const + { + size_type bucket_n1, bucket_n2, count; + this->priv_equal_range(key, hash_func, equal_func, bucket_n1, bucket_n2, count); + return count; + } + + //! Effects: Finds an iterator to the first element is equal to + //! "value" or end() if that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + iterator find(const_reference value) + { return this->find(value, this->priv_hasher(), this->priv_equal()); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the given hash and equality functor or end() if + //! that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType &key, KeyHasher hash_func, KeyValueEqual equal_func) + { + size_type bucket_n; + std::size_t hash; + siterator prev; + siterator local_it = this->priv_find(key, hash_func, equal_func, bucket_n, hash, prev); + return iterator(local_it, this); + } + + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" or end() if that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + const_iterator find(const_reference value) const + { return this->find(value, this->priv_hasher(), this->priv_equal()); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the given hasher and equality functor or end() if + //! that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find + (const KeyType &key, KeyHasher hash_func, KeyValueEqual equal_func) const + { + size_type bucket_n; + std::size_t hash_value; + siterator prev; + siterator sit = this->priv_find(key, hash_func, equal_func, bucket_n, hash_value, prev); + return const_iterator(sit, this); + } + + //! Effects: Returns a range containing all elements with values equivalent + //! to value. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(value)). Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + std::pair equal_range(const_reference value) + { return this->equal_range(value, this->priv_hasher(), this->priv_equal()); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Returns a range containing all elements with equivalent + //! keys. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(key, hash_func, equal_func)). + //! Worst case O(this->size()). + //! + //! Throws: If hash_func or the equal_func throw. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range + (const KeyType &key, KeyHasher hash_func, KeyValueEqual equal_func) + { + size_type bucket_n1, bucket_n2, count; + std::pair ret = this->priv_equal_range + (key, hash_func, equal_func, bucket_n1, bucket_n2, count); + return std::pair + (iterator(ret.first, this), iterator(ret.second, this)); + } + + //! Effects: Returns a range containing all elements with values equivalent + //! to value. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(value)). Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + std::pair + equal_range(const_reference value) const + { return this->equal_range(value, this->priv_hasher(), this->priv_equal()); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Returns a range containing all elements with equivalent + //! keys. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(key, hash_func, equal_func)). + //! Worst case O(this->size()). + //! + //! Throws: If the hasher or equal_func throw. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range + (const KeyType &key, KeyHasher hash_func, KeyValueEqual equal_func) const + { + size_type bucket_n1, bucket_n2, count; + std::pair ret = + this->priv_equal_range(key, hash_func, equal_func, bucket_n1, bucket_n2, count); + return std::pair + (const_iterator(ret.first, this), const_iterator(ret.second, this)); + } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator belonging to the unordered_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: If the internal hash function throws. + iterator iterator_to(reference value) + { + return iterator(bucket_type::s_iterator_to(priv_value_to_node(value)), this); + } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator belonging to the + //! unordered_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: If the internal hash function throws. + const_iterator iterator_to(const_reference value) const + { + return const_iterator(bucket_type::s_iterator_to(priv_value_to_node(const_cast(value))), this); + } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid local_iterator belonging to the unordered_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static local_iterator s_local_iterator_to(reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + siterator sit = bucket_type::s_iterator_to(((hashtable_impl*)0)->priv_value_to_node(value)); + return local_iterator(sit, (hashtable_impl*)0); + } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_local_iterator belonging to + //! the unordered_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_local_iterator s_local_iterator_to(const_reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + siterator sit = bucket_type::s_iterator_to(((hashtable_impl*)0)->priv_value_to_node(const_cast(value))); + return const_local_iterator(sit, (hashtable_impl*)0); + } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid local_iterator belonging to the unordered_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + local_iterator local_iterator_to(reference value) + { + siterator sit = bucket_type::s_iterator_to(this->priv_value_to_node(value)); + return local_iterator(sit, this); + } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_local_iterator belonging to + //! the unordered_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_local_iterator local_iterator_to(const_reference value) const + { + siterator sit = bucket_type::s_iterator_to + (const_cast(this->priv_value_to_node(value))); + return const_local_iterator(sit, this); + } + + //! Effects: Returns the number of buckets passed in the constructor + //! or the last rehash function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + size_type bucket_count() const + { return this->priv_buckets_len(); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns the number of elements in the nth bucket. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + size_type bucket_size(size_type n) const + { return this->priv_buckets()[n].size(); } + + //! Effects: Returns the index of the bucket in which elements + //! with keys equivalent to k would be found, if any such element existed. + //! + //! Complexity: Constant. + //! + //! Throws: If the hash functor throws. + //! + //! Note: the return value is in the range [0, this->bucket_count()). + size_type bucket(const key_type& k) const + { return this->bucket(k, this->priv_hasher()); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! Effects: Returns the index of the bucket in which elements + //! with keys equivalent to k would be found, if any such element existed. + //! + //! Complexity: Constant. + //! + //! Throws: If hash_func throws. + //! + //! Note: the return value is in the range [0, this->bucket_count()). + template + size_type bucket(const KeyType& k, const KeyHasher &hash_func) const + { return priv_hash_to_bucket(hash_func(k)); } + + //! Effects: Returns the bucket array pointer passed in the constructor + //! or the last rehash function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bucket_ptr bucket_pointer() const + { return this->priv_buckets(); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + local_iterator begin(size_type n) + { return local_iterator(this->priv_buckets()[n].begin(), this); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator begin(size_type n) const + { return this->cbegin(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator cbegin(size_type n) const + { + siterator sit = const_cast(this->priv_buckets()[n]).begin(); + return const_local_iterator(sit, this); + } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + local_iterator end(size_type n) + { return local_iterator(this->priv_buckets()[n].end(), this); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator end(size_type n) const + { return this->cend(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator cend(size_type n) const + { return const_local_iterator(const_cast(this->priv_buckets()[n]).end(), this); } + + //! Requires: new_buckets must be a pointer to a new bucket array + //! or the same as the old bucket array. new_size is the length of the + //! the array pointed by new_buckets. If new_buckets == this->bucket_pointer() + //! n can be bigger or smaller than this->bucket_count(). + //! 'new_bucket_traits' copy constructor should not throw. + //! + //! Effects: Updates the internal reference with the new bucket erases + //! the values from the old bucket and inserts then in the new one. + //! Bucket traits hold by *this is assigned from new_bucket_traits. + //! If the container is configured as incremental<>, the split bucket is set + //! to the new bucket_len(). + //! + //! If store_hash option is true, this method does not use the hash function. + //! + //! Complexity: Average case linear in this->size(), worst case quadratic. + //! + //! Throws: If the hasher functor throws. Basic guarantee. + void rehash(const bucket_traits &new_bucket_traits) + { + bucket_ptr new_buckets = new_bucket_traits.bucket_begin(); + size_type new_buckets_len = new_bucket_traits.bucket_count(); + bucket_ptr old_buckets = this->priv_buckets(); + size_type old_buckets_len = this->priv_buckets_len(); + + //Check power of two bucket array if the option is activated + BOOST_INTRUSIVE_INVARIANT_ASSERT + (!power_2_buckets || (0 == (new_buckets_len & (new_buckets_len-1u)))); + + size_type n = priv_get_cache_bucket_num(); + const bool same_buffer = old_buckets == new_buckets; + //If the new bucket length is a common factor + //of the old one we can avoid hash calculations. + const bool fast_shrink = (!incremental) && (old_buckets_len > new_buckets_len) && + (power_2_buckets ||(old_buckets_len % new_buckets_len) == 0); + //If we are shrinking the same bucket array and it's + //is a fast shrink, just rehash the last nodes + size_type new_first_bucket_num = new_buckets_len; + if(same_buffer && fast_shrink && (n < new_buckets_len)){ + n = new_buckets_len; + new_first_bucket_num = priv_get_cache_bucket_num(); + } + + //Anti-exception stuff: they destroy the elements if something goes wrong. + //If the source and destination buckets are the same, the second rollback function + //is harmless, because all elements have been already unlinked and destroyed + typedef detail::init_disposer NodeDisposer; + NodeDisposer node_disp; + detail::exception_array_disposer + rollback1(new_buckets[0], node_disp, new_buckets_len); + detail::exception_array_disposer + rollback2(old_buckets[0], node_disp, old_buckets_len); + + //Put size in a safe value for rollback exception + size_type size_backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(0); + //Put cache to safe position + priv_initialize_cache(); + priv_insertion_update_cache(size_type(0u)); + + //Iterate through nodes + for(; n < old_buckets_len; ++n){ + bucket_type &old_bucket = old_buckets[n]; + + if(!fast_shrink){ + siterator before_i(old_bucket.before_begin()); + siterator end(old_bucket.end()); + siterator i(old_bucket.begin()); + for(;i != end; ++i){ + const value_type &v = priv_value_from_slist_node(i.pointed_node()); + const std::size_t hash_value = this->priv_stored_or_compute_hash(v, store_hash_t()); + const size_type new_n = priv_hash_to_bucket(hash_value, new_buckets_len, new_buckets_len); + if(cache_begin && new_n < new_first_bucket_num) + new_first_bucket_num = new_n; + siterator last = bucket_type::s_iterator_to + (*group_functions_t::priv_get_last_in_group + (dcast_bucket_ptr(i.pointed_node()), optimize_multikey_t())); + if(same_buffer && new_n == n){ + before_i = last; + } + else{ + bucket_type &new_b = new_buckets[new_n]; + new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last); + } + i = before_i; + } + } + else{ + const size_type new_n = priv_hash_to_bucket(n, new_buckets_len, new_buckets_len); + if(cache_begin && new_n < new_first_bucket_num) + new_first_bucket_num = new_n; + bucket_type &new_b = new_buckets[new_n]; + if(!old_bucket.empty()){ + new_b.splice_after( new_b.before_begin() + , old_bucket + , old_bucket.before_begin() + , priv_get_last(old_bucket)); + } + } + } + + this->priv_size_traits().set_size(size_backup); + this->priv_split_traits().set_size(new_buckets_len); + this->priv_real_bucket_traits() = new_bucket_traits; + priv_initialize_cache(); + priv_insertion_update_cache(new_first_bucket_num); + rollback1.release(); + rollback2.release(); + } + + //! Requires: + //! + //! Effects: + //! + //! Complexity: + //! + //! Throws: + //! + //! Note: this method is only available if incremental option is activated. + bool incremental_rehash(bool grow = true) + { + //This function is only available for containers with incremental hashing + BOOST_STATIC_ASSERT(( incremental && power_2_buckets )); + size_type split_idx = priv_split_traits().get_size(); + size_type bucket_len = priv_buckets_len(); + + if(grow){ + //Test if the split variable can be changed + if(split_idx >= bucket_len) + return false; + + size_type bucket_len = priv_buckets_len(); + size_type bucket_to_rehash = split_idx - bucket_len/2; + bucket_type &old_bucket = this->priv_buckets()[bucket_to_rehash]; + siterator before_i(old_bucket.before_begin()); + siterator end(old_bucket.end()); + siterator i(old_bucket.begin()); + priv_split_traits().increment(); + + //Anti-exception stuff: if an exception is thrown while + //moving elements from old_bucket to the target bucket, all moved + //elements are moved back to the original one. + detail::incremental_rehash_rollback rollback + ( this->priv_buckets()[split_idx], old_bucket, priv_split_traits()); + for(;i != end; ++i){ + const value_type &v = priv_value_from_slist_node(i.pointed_node()); + const std::size_t hash_value = this->priv_stored_or_compute_hash(v, store_hash_t()); + const size_type new_n = priv_hash_to_bucket(hash_value); + siterator last = bucket_type::s_iterator_to + (*group_functions_t::priv_get_last_in_group + (dcast_bucket_ptr(i.pointed_node()), optimize_multikey_t())); + if(new_n == bucket_to_rehash){ + before_i = last; + } + else{ + bucket_type &new_b = this->priv_buckets()[new_n]; + new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last); + } + i = before_i; + } + rollback.release(); + priv_erasure_update_cache(); + return true; + } + else{ + //Test if the split variable can be changed + if(split_idx <= bucket_len/2) + return false; + const size_type target_bucket_num = split_idx - 1 - bucket_len/2; + bucket_type &target_bucket = this->priv_buckets()[target_bucket_num]; + bucket_type &source_bucket = this->priv_buckets()[split_idx-1]; + target_bucket.splice_after(target_bucket.cbefore_begin(), source_bucket); + priv_split_traits().decrement(); + priv_insertion_update_cache(target_bucket_num); + return true; + } + } + + //! Effects: If new_bucket_traits.bucket_count() is not + //! this->bucket_count()/2 or this->bucket_count()*2, or + //! this->split_bucket() != new_bucket_traits.bucket_count() returns false + //! and does nothing. + //! + //! Otherwise, copy assigns new_bucket_traits to the internal bucket_traits + //! and transfers all the objects from old buckets to the new ones. + //! + //! Complexity: Linear to size(). + //! + //! Throws: Nothing + //! + //! Note: this method is only available if incremental option is activated. + bool incremental_rehash(const bucket_traits &new_bucket_traits) + { + //This function is only available for containers with incremental hashing + BOOST_STATIC_ASSERT(( incremental && power_2_buckets )); + size_type new_bucket_traits_size = new_bucket_traits.bucket_count(); + size_type cur_bucket_traits = this->priv_buckets_len(); + if(new_bucket_traits_size/2 != cur_bucket_traits && new_bucket_traits_size != cur_bucket_traits/2){ + return false; + } + + const size_type split_idx = this->split_count(); + + if(new_bucket_traits_size/2 == cur_bucket_traits){ + //Test if the split variable can be changed + if(!(split_idx >= cur_bucket_traits)) + return false; + } + else{ + //Test if the split variable can be changed + if(!(split_idx <= cur_bucket_traits/2)) + return false; + } + + const size_type ini_n = priv_get_cache_bucket_num(); + const bucket_ptr old_buckets = this->priv_buckets(); + this->priv_real_bucket_traits() = new_bucket_traits; + if(new_bucket_traits.bucket_begin() != old_buckets){ + for(size_type n = ini_n; n < split_idx; ++n){ + bucket_type &new_bucket = new_bucket_traits.bucket_begin()[n]; + bucket_type &old_bucket = old_buckets[n]; + new_bucket.splice_after(new_bucket.cbefore_begin(), old_bucket); + } + //Put cache to safe position + priv_initialize_cache(); + priv_insertion_update_cache(ini_n); + } + return true; + } + + //! Requires: + //! + //! Effects: + //! + //! Complexity: + //! + //! Throws: + size_type split_count() const + { + //This function is only available if incremental hashing is activated + BOOST_STATIC_ASSERT(( incremental && power_2_buckets )); + return this->priv_split_traits().get_size(); + } + + //! Effects: Returns the nearest new bucket count optimized for + //! the container that is bigger or equal than n. This suggestion can be + //! used to create bucket arrays with a size that will usually improve + //! container's performance. If such value does not exist, the + //! higher possible value is returned. + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + static size_type suggested_upper_bucket_count(size_type n) + { + const std::size_t *primes = &detail::prime_list_holder<0>::prime_list[0]; + const std::size_t *primes_end = primes + detail::prime_list_holder<0>::prime_list_size; + size_type const* bound = std::lower_bound(primes, primes_end, n); + if(bound == primes_end) + --bound; + return size_type(*bound); + } + + //! Effects: Returns the nearest new bucket count optimized for + //! the container that is smaller or equal than n. This suggestion can be + //! used to create bucket arrays with a size that will usually improve + //! container's performance. If such value does not exist, the + //! lowest possible value is returned. + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + static size_type suggested_lower_bucket_count(size_type n) + { + const std::size_t *primes = &detail::prime_list_holder<0>::prime_list[0]; + const std::size_t *primes_end = primes + detail::prime_list_holder<0>::prime_list_size; + size_type const* bound = std::upper_bound(primes, primes_end, n); + if(bound != primes) + --bound; + return size_type(*bound); + } + + /// @cond + private: + + std::size_t priv_hash_to_bucket(std::size_t hash_value) const + { return priv_hash_to_bucket(hash_value, this->priv_real_bucket_traits().bucket_count(), priv_split_traits().get_size()); } + + std::size_t priv_hash_to_bucket(std::size_t hash_value, std::size_t bucket_len, std::size_t split) const + { + std::size_t bucket_number = priv_hash_to_bucket_impl(hash_value, bucket_len, power_2_buckets_t()); + if(incremental) + if(bucket_number >= split) + bucket_number -= bucket_len/2; + return bucket_number; + } + + std::size_t priv_hash_to_bucket_impl(std::size_t hash_value, std::size_t bucket_len, detail::bool_) const + { return hash_value % bucket_len; } + + std::size_t priv_hash_to_bucket_impl(std::size_t hash_value, std::size_t bucket_len, detail::bool_) const + { return hash_value & (bucket_len - 1); } + + const key_equal &priv_equal() const + { return static_cast(this->data_.internal_.bucket_hash_equal_.get()); } + + key_equal &priv_equal() + { return static_cast(this->data_.internal_.bucket_hash_equal_.get()); } + + value_type &priv_value_from_slist_node(slist_node_ptr n) + { return *this->get_real_value_traits().to_value_ptr(dcast_bucket_ptr(n)); } + + const value_type &priv_value_from_slist_node(slist_node_ptr n) const + { return *this->get_real_value_traits().to_value_ptr(dcast_bucket_ptr(n)); } + + const real_bucket_traits &priv_real_bucket_traits(detail::bool_) const + { return this->data_.internal_.bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_; } + + const real_bucket_traits &priv_real_bucket_traits(detail::bool_) const + { return this->data_.internal_.bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_.get_bucket_traits(*this); } + + real_bucket_traits &priv_real_bucket_traits(detail::bool_) + { return this->data_.internal_.bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_; } + + real_bucket_traits &priv_real_bucket_traits(detail::bool_) + { return this->data_.internal_.bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_.get_bucket_traits(*this); } + + const real_bucket_traits &priv_real_bucket_traits() const + { return this->priv_real_bucket_traits(detail::bool_()); } + + real_bucket_traits &priv_real_bucket_traits() + { return this->priv_real_bucket_traits(detail::bool_()); } + + const hasher &priv_hasher() const + { return static_cast(this->data_.internal_.bucket_hash_equal_.bucket_hash.get()); } + + hasher &priv_hasher() + { return static_cast(this->data_.internal_.bucket_hash_equal_.bucket_hash.get()); } + + bucket_ptr priv_buckets() const + { return this->priv_real_bucket_traits().bucket_begin(); } + + size_type priv_buckets_len() const + { return this->priv_real_bucket_traits().bucket_count(); } + + static node_ptr uncast(const_node_ptr ptr) + { return node_ptr(const_cast(detail::boost_intrusive_get_pointer(ptr))); } + + node &priv_value_to_node(value_type &v) + { return *this->get_real_value_traits().to_node_ptr(v); } + + const node &priv_value_to_node(const value_type &v) const + { return *this->get_real_value_traits().to_node_ptr(v); } + + size_traits &priv_size_traits() + { return this->data_.internal_.bucket_hash_equal_.bucket_hash.bucket_plus_size_; } + + const size_traits &priv_size_traits() const + { return this->data_.internal_.bucket_hash_equal_.bucket_hash.bucket_plus_size_; } + + split_traits &priv_split_traits() + { return this->data_.internal_; } + + const split_traits &priv_split_traits() const + { return this->data_.internal_; } + + template + void priv_erase_range_impl + (size_type bucket_num, siterator before_first_it, siterator end, Disposer disposer, size_type &num_erased) + { + const bucket_ptr buckets = priv_buckets(); + bucket_type &b = buckets[bucket_num]; + + if(before_first_it == b.before_begin() && end == b.end()){ + priv_erase_range_impl(bucket_num, 1, disposer, num_erased); + } + else{ + num_erased = 0; + siterator to_erase(before_first_it); + ++to_erase; + slist_node_ptr end_ptr = end.pointed_node(); + while(to_erase != end){ + group_functions_t::priv_erase_from_group(end_ptr, dcast_bucket_ptr(to_erase.pointed_node()), optimize_multikey_t()); + to_erase = b.erase_after_and_dispose(before_first_it, make_node_disposer(disposer)); + ++num_erased; + } + this->priv_size_traits().set_size(this->priv_size_traits().get_size()-num_erased); + } + } + + template + void priv_erase_range_impl + (size_type first_bucket_num, size_type num_buckets, Disposer disposer, size_type &num_erased) + { + //Now fully clear the intermediate buckets + const bucket_ptr buckets = priv_buckets(); + num_erased = 0; + for(size_type i = first_bucket_num; i < (num_buckets + first_bucket_num); ++i){ + bucket_type &b = buckets[i]; + siterator b_begin(b.before_begin()); + siterator nxt(b_begin); + ++nxt; + siterator end(b.end()); + while(nxt != end){ + priv_init_group(nxt.pointed_node(), optimize_multikey_t()); + nxt = b.erase_after_and_dispose + (b_begin, make_node_disposer(disposer)); + this->priv_size_traits().decrement(); + ++num_erased; + } + } + } + + template + void priv_erase_range( siterator before_first_it, size_type first_bucket + , siterator last_it, size_type last_bucket + , Disposer disposer) + { + size_type num_erased; + if (first_bucket == last_bucket){ + priv_erase_range_impl(first_bucket, before_first_it, last_it, disposer, num_erased); + } + else { + bucket_type *b = (&this->priv_buckets()[0]); + priv_erase_range_impl(first_bucket, before_first_it, b[first_bucket].end(), disposer, num_erased); + if(size_type n = (last_bucket - first_bucket - 1)) + priv_erase_range_impl(first_bucket + 1, n, disposer, num_erased); + priv_erase_range_impl(last_bucket, b[last_bucket].before_begin(), last_it, disposer, num_erased); + } + } + + static node_ptr dcast_bucket_ptr(typename slist_impl::node_ptr p) + { +// This still fails in gcc < 4.4 so forget about it +// using ::boost::static_pointer_cast; +// return static_pointer_cast(p); + return node_ptr(&static_cast(*p)); + } + + std::size_t priv_stored_or_compute_hash(const value_type &v, detail::true_) const + { return node_traits::get_hash(this->get_real_value_traits().to_node_ptr(v)); } + + std::size_t priv_stored_or_compute_hash(const value_type &v, detail::false_) const + { return priv_hasher()(v); } + + std::size_t priv_stored_hash(slist_node_ptr n, detail::true_) const + { return node_traits::get_hash(dcast_bucket_ptr(n)); } + + std::size_t priv_stored_hash(slist_node_ptr, detail::false_) const + { + //This code should never be reached! + BOOST_INTRUSIVE_INVARIANT_ASSERT(0); + return 0; + } + + static void priv_store_hash(node_ptr p, std::size_t h, detail::true_) + { return node_traits::set_hash(p, h); } + + static void priv_store_hash(node_ptr, std::size_t, detail::false_) + {} + + static void priv_clear_group_nodes(bucket_type &b, detail::true_) + { + siterator it(b.begin()), itend(b.end()); + while(it != itend){ + node_ptr to_erase(dcast_bucket_ptr(it.pointed_node())); + ++it; + group_algorithms::init(to_erase); + } + } + + static void priv_clear_group_nodes(bucket_type &, detail::false_) + {} + + std::size_t priv_get_bucket_num(siterator it) + { return priv_get_bucket_num_hash_dispatch(it, store_hash_t()); } + + std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::true_) + { + return this->priv_hash_to_bucket + (this->priv_stored_hash(it.pointed_node(), store_hash_t())); + } + + std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::false_) + { return priv_get_bucket_num_no_hash_store(it, optimize_multikey_t()); } + + std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::true_) + { + bucket_ptr f(priv_buckets()), l(f + priv_buckets_len() - 1); + slist_node_ptr bb = group_functions_t::priv_get_bucket_before_begin + ( f->end().pointed_node() + , l->end().pointed_node() + , dcast_bucket_ptr(it.pointed_node())); + //Now get the bucket_impl from the iterator + const bucket_type &b = static_cast + (bucket_type::slist_type::container_from_end_iterator(bucket_type::s_iterator_to(*bb))); + //Now just calculate the index b has in the bucket array + return static_cast(&b - &*f); + } + + std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::false_) + { + bucket_ptr f(priv_buckets()), l(f + priv_buckets_len() - 1); + slist_node_ptr first_ptr(f->cend().pointed_node()) + , last_ptr(l->cend().pointed_node()); + + //The end node is embedded in the singly linked list: + //iterate until we reach it. + while(!(first_ptr <= it.pointed_node() && it.pointed_node() <= last_ptr)){ + ++it; + } + //Now get the bucket_impl from the iterator + const bucket_type &b = static_cast + (bucket_type::container_from_end_iterator(it)); + + //Now just calculate the index b has in the bucket array + return static_cast(&b - &*f); + } + + void priv_init_group(slist_node_ptr n, detail::true_) + { group_algorithms::init(dcast_bucket_ptr(n)); } + + void priv_init_group(slist_node_ptr, detail::false_) + {} + + void priv_insert_in_group(node_ptr first_in_group, node_ptr n, detail::true_) + { + if(first_in_group){ + if(group_algorithms::unique(first_in_group)) + group_algorithms::link_after(first_in_group, n); + else{ + group_algorithms::link_after(node_traits::get_next(first_in_group), n); + } + } + else{ + group_algorithms::init_header(n); + } + } + + void priv_insert_in_group(node_ptr, node_ptr, detail::false_) + {} + + siterator priv_get_previous + (bucket_type &b, siterator i) + { return priv_get_previous(b, i, optimize_multikey_t()); } + + siterator priv_get_previous + (bucket_type &b, siterator i, detail::true_) + { + node_ptr elem(dcast_bucket_ptr(i.pointed_node())); + node_ptr prev_in_group(group_traits::get_next(elem)); + bool first_in_group = node_traits::get_next(prev_in_group) != elem; + typename bucket_type::node &n = first_in_group + ? *group_functions_t::priv_get_prev_to_first_in_group(b.end().pointed_node(), elem) + : *group_traits::get_next(elem) + ; + return bucket_type::s_iterator_to(n); + } + + siterator priv_get_previous + (bucket_type &b, siterator i, detail::false_) + { return b.previous(i); } + + static siterator priv_get_last(bucket_type &b) + { return priv_get_last(b, optimize_multikey_t()); } + + static siterator priv_get_last(bucket_type &b, detail::true_) + { + //First find the last node of p's group. + //This requires checking the first node of the next group or + //the bucket node. + slist_node_ptr end_ptr(b.end().pointed_node()); + node_ptr possible_end(node_traits::get_next( dcast_bucket_ptr(end_ptr))); + node_ptr last_node_group(possible_end); + + while(end_ptr != possible_end){ + last_node_group = group_traits::get_next(dcast_bucket_ptr(possible_end)); + possible_end = node_traits::get_next(last_node_group); + } + return bucket_type::s_iterator_to(*last_node_group); + } + + static siterator priv_get_last(bucket_type &b, detail::false_) + { return b.previous(b.end()); } + + siterator priv_get_previous_and_next_in_group + (siterator i, node_ptr &nxt_in_group) + { + siterator prev; + node_ptr elem(dcast_bucket_ptr(i.pointed_node())); + bucket_ptr f(priv_buckets()), l(f + priv_buckets_len() - 1); + + slist_node_ptr first_end_ptr(f->cend().pointed_node()); + slist_node_ptr last_end_ptr (l->cend().pointed_node()); + + node_ptr nxt(node_traits::get_next(elem)); + node_ptr prev_in_group(group_traits::get_next(elem)); + bool last_in_group = (first_end_ptr <= nxt && nxt <= last_end_ptr) || + (group_traits::get_next(nxt) != elem); + bool first_in_group = node_traits::get_next(prev_in_group) != elem; + + if(first_in_group){ + node_ptr start_pos; + if(last_in_group){ + start_pos = elem; + nxt_in_group = 0; + } + else{ + start_pos = prev_in_group; + nxt_in_group = node_traits::get_next(elem); + } + slist_node_ptr bucket_node; + if(store_hash){ + bucket_node = this->priv_buckets() + [this->priv_hash_to_bucket + (this->priv_stored_hash(elem, store_hash_t())) + ].before_begin().pointed_node(); + } + else{ + bucket_node = group_functions_t::priv_get_bucket_before_begin + (first_end_ptr, last_end_ptr, start_pos); + } + prev = bucket_type::s_iterator_to + (*group_functions_t::priv_get_prev_to_first_in_group(bucket_node, elem)); + } + else{ + if(last_in_group){ + nxt_in_group = group_functions_t::priv_get_first_in_group_of_last_in_group(elem); + } + else{ + nxt_in_group = node_traits::get_next(elem); + } + prev = bucket_type::s_iterator_to(*group_traits::get_next(elem)); + } + return prev; + } + + template + void priv_erase(const_iterator i, Disposer disposer, detail::true_) + { + siterator elem(i.slist_it()); + node_ptr nxt_in_group; + siterator prev = priv_get_previous_and_next_in_group(elem, nxt_in_group); + bucket_type::s_erase_after_and_dispose(prev, make_node_disposer(disposer)); + if(nxt_in_group) + group_algorithms::unlink_after(nxt_in_group); + if(safemode_or_autounlink) + group_algorithms::init(dcast_bucket_ptr(elem.pointed_node())); + } + + template + void priv_erase(const_iterator i, Disposer disposer, detail::false_) + { + siterator to_erase(i.slist_it()); + bucket_type &b = this->priv_buckets()[this->priv_get_bucket_num(to_erase)]; + siterator prev(priv_get_previous(b, to_erase)); + b.erase_after_and_dispose(prev, make_node_disposer(disposer)); + } + + bucket_ptr priv_invalid_bucket() const + { + const real_bucket_traits &rbt = this->priv_real_bucket_traits(); + return rbt.bucket_begin() + rbt.bucket_count(); + } + + siterator priv_invalid_local_it() const + { return priv_invalid_bucket()->end(); } + + siterator priv_begin() const + { return priv_begin(cache_begin_t()); } + + siterator priv_begin(detail::bool_) const + { + size_type n = 0; + size_type buckets_len = this->priv_buckets_len(); + for (n = 0; n < buckets_len; ++n){ + bucket_type &b = this->priv_buckets()[n]; + if(!b.empty()){ + return b.begin(); + } + } + return priv_invalid_local_it(); + } + + siterator priv_begin(detail::bool_) const + { + if(this->data_.internal_.bucket_hash_equal_.cached_begin_ == priv_invalid_bucket()){ + return priv_invalid_local_it(); + } + else{ + return this->data_.internal_.bucket_hash_equal_.cached_begin_->begin(); + } + } + + void priv_initialize_cache() + { priv_initialize_cache(cache_begin_t()); } + + void priv_initialize_cache(detail::bool_) + { this->data_.internal_.bucket_hash_equal_.cached_begin_ = priv_invalid_bucket(); } + + void priv_initialize_cache(detail::bool_) + {} + + void priv_insertion_update_cache(size_type insertion_bucket) + { priv_insertion_update_cache(insertion_bucket, cache_begin_t()); } + + void priv_insertion_update_cache(size_type insertion_bucket, detail::bool_) + { + bucket_ptr p = priv_buckets() + insertion_bucket; + if(p < this->data_.internal_.bucket_hash_equal_.cached_begin_){ + this->data_.internal_.bucket_hash_equal_.cached_begin_ = p; + } + } + + void priv_insertion_update_cache(size_type, detail::bool_) + {} + + void priv_erasure_update_cache(size_type first_bucket, size_type last_bucket) + { priv_erasure_update_cache(first_bucket, last_bucket, cache_begin_t()); } + + void priv_erasure_update_cache(size_type first_bucket_num, size_type last_bucket_num, detail::bool_) + { + //If the last bucket is the end, the cache must be updated + //to the last position if all + if(priv_get_cache_bucket_num() == first_bucket_num && + priv_buckets()[first_bucket_num].empty() ){ + priv_set_cache(priv_buckets() + last_bucket_num); + priv_erasure_update_cache(); + } + } + + void priv_erasure_update_cache(size_type, size_type, detail::bool_) + {} + + void priv_erasure_update_cache() + { priv_erasure_update_cache(cache_begin_t()); } + + void priv_erasure_update_cache(detail::bool_) + { + if(constant_time_size && !size()){ + priv_initialize_cache(); + } + else{ + size_type current_n = this->data_.internal_.bucket_hash_equal_.cached_begin_ - priv_buckets(); + for( const size_type num_buckets = this->priv_buckets_len() + ; current_n < num_buckets + ; ++current_n, ++this->data_.internal_.bucket_hash_equal_.cached_begin_){ + if(!this->data_.internal_.bucket_hash_equal_.cached_begin_->empty()){ + return; + } + } + priv_initialize_cache(); + } + } + + void priv_erasure_update_cache(detail::bool_) + {} + + void priv_swap_cache(detail::bool_, hashtable_impl &other) + { + std::swap( this->data_.internal_.bucket_hash_equal_.cached_begin_ + , other.data_.internal_.bucket_hash_equal_.cached_begin_); + } + + void priv_swap_cache(detail::bool_, hashtable_impl &) + {} + + bucket_ptr priv_get_cache() + { return priv_get_cache(cache_begin_t()); } + + bucket_ptr priv_get_cache(detail::bool_) + { return this->data_.internal_.bucket_hash_equal_.cached_begin_; } + + bucket_ptr priv_get_cache(detail::bool_) + { return this->priv_buckets(); } + + void priv_set_cache(bucket_ptr p) + { priv_set_cache(p, cache_begin_t()); } + + void priv_set_cache(bucket_ptr p, detail::bool_) + { this->data_.internal_.bucket_hash_equal_.cached_begin_ = p; } + + void priv_set_cache(bucket_ptr, detail::bool_) + {} + + size_type priv_get_cache_bucket_num() + { return priv_get_cache_bucket_num(cache_begin_t()); } + + size_type priv_get_cache_bucket_num(detail::bool_) + { return this->data_.internal_.bucket_hash_equal_.cached_begin_ - this->priv_buckets(); } + + size_type priv_get_cache_bucket_num(detail::bool_) + { return 0u; } + + void priv_clear_buckets() + { + this->priv_clear_buckets + ( priv_get_cache() + , this->priv_buckets_len() - (priv_get_cache() - priv_buckets())); + } + + void priv_initialize_buckets() + { this->priv_clear_buckets(priv_buckets(), this->priv_buckets_len()); } + + void priv_clear_buckets(bucket_ptr buckets_ptr, size_type buckets_len) + { + for(; buckets_len--; ++buckets_ptr){ + if(safemode_or_autounlink){ + priv_clear_group_nodes(*buckets_ptr, optimize_multikey_t()); + buckets_ptr->clear_and_dispose(detail::init_disposer()); + } + else{ + buckets_ptr->clear(); + } + } + priv_initialize_cache(); + } + + template + siterator priv_find + ( const KeyType &key, KeyHasher hash_func + , KeyValueEqual equal_func, size_type &bucket_number, std::size_t &h, siterator &previt) const + { + h = hash_func(key); + return priv_find_with_hash(key, equal_func, bucket_number, h, previt); + } + + template + siterator priv_find_with_hash + ( const KeyType &key, KeyValueEqual equal_func, size_type &bucket_number, const std::size_t h, siterator &previt) const + { + bucket_number = priv_hash_to_bucket(h); + bucket_type &b = this->priv_buckets()[bucket_number]; + previt = b.before_begin(); + if(constant_time_size && this->empty()){ + return priv_invalid_local_it(); + } + + siterator it = previt; + ++it; + + while(it != b.end()){ + const value_type &v = priv_value_from_slist_node(it.pointed_node()); + if(compare_hash){ + std::size_t vh = this->priv_stored_or_compute_hash(v, store_hash_t()); + if(h == vh && equal_func(key, v)){ + return it; + } + } + else if(equal_func(key, v)){ + return it; + } + if(optimize_multikey){ + previt = bucket_type::s_iterator_to + (*group_functions_t::priv_get_last_in_group + (dcast_bucket_ptr(it.pointed_node()), optimize_multikey_t())); + it = previt; + } + else{ + previt = it; + } + ++it; + } + previt = b.before_begin(); + return priv_invalid_local_it(); + } + + iterator priv_insert_equal_with_hash(reference value, std::size_t hash_value) + { + size_type bucket_num; + siterator prev; + siterator it = this->priv_find_with_hash + (value, this->priv_equal(), bucket_num, hash_value, prev); + return priv_insert_equal_find(value, bucket_num, hash_value, it); + } + + iterator priv_insert_equal_find(reference value, size_type bucket_num, std::size_t hash_value, siterator it) + { + bucket_type &b = this->priv_buckets()[bucket_num]; + bool found_equal = it != priv_invalid_local_it(); + if(!found_equal){ + it = b.before_begin(); + } + //Now store hash if needed + node_ptr n = node_ptr(&priv_value_to_node(value)); + this->priv_store_hash(n, hash_value, store_hash_t()); + //Checks for some modes + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(n)); + //Shorcut for optimize_multikey cases + if(optimize_multikey){ + node_ptr first_in_group = found_equal ? + dcast_bucket_ptr(it.pointed_node()) : node_ptr(0); + this->priv_insert_in_group(first_in_group, n, optimize_multikey_t()); + } + //Update cache and increment size if needed + priv_insertion_update_cache(bucket_num); + this->priv_size_traits().increment(); + //Insert the element in the bucket after it + return iterator(b.insert_after(it, *n), this); + } + + template + std::pair priv_equal_range + ( const KeyType &key + , KeyHasher hash_func + , KeyValueEqual equal_func + , size_type &bucket_number_first + , size_type &bucket_number_second + , size_type &count) const + { + std::size_t h; + count = 0; + siterator prev; + //Let's see if the element is present + std::pair to_return + ( priv_find(key, hash_func, equal_func, bucket_number_first, h, prev) + , priv_invalid_local_it()); + if(to_return.first == to_return.second){ + bucket_number_second = bucket_number_first; + return to_return; + } + //If it's present, find the first that it's not equal in + //the same bucket + bucket_type &b = this->priv_buckets()[bucket_number_first]; + siterator it = to_return.first; + if(optimize_multikey){ + to_return.second = bucket_type::s_iterator_to + (*node_traits::get_next(group_functions_t::priv_get_last_in_group + (dcast_bucket_ptr(it.pointed_node()), optimize_multikey_t()))); + count = std::distance(it, to_return.second); + if(to_return.second != b.end()){ + bucket_number_second = bucket_number_first; + return to_return; + } + } + else{ + ++count; + ++it; + while(it != b.end()){ + const value_type &v = priv_value_from_slist_node(it.pointed_node()); + if(compare_hash){ + std::size_t hv = this->priv_stored_or_compute_hash(v, store_hash_t()); + if(hv != h || !equal_func(key, v)){ + to_return.second = it; + bucket_number_second = bucket_number_first; + return to_return; + } + } + else if(!equal_func(key, v)){ + to_return.second = it; + bucket_number_second = bucket_number_first; + return to_return; + } + ++it; + ++count; + } + } + + //If we reached the end, find the first, non-empty bucket + for(bucket_number_second = bucket_number_first+1 + ; bucket_number_second != this->priv_buckets_len() + ; ++bucket_number_second){ + bucket_type &b = this->priv_buckets()[bucket_number_second]; + if(!b.empty()){ + to_return.second = b.begin(); + return to_return; + } + } + + //Otherwise, return the end node + to_return.second = priv_invalid_local_it(); + return to_return; + } + /// @endcond +}; + +/// @cond +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template < class T + , bool UniqueKeys + , class O1 = none, class O2 = none + , class O3 = none, class O4 = none + , class O5 = none, class O6 = none + , class O7 = none, class O8 = none + , class O9 = none, class O10= none + > +#else +template +#endif +struct make_hashtable_opt +{ + typedef typename pack_options + < uset_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4, O5, O6, O7, O8, O9, O10 + #else + Options... + #endif + >::type packed_options; + + //Real value traits must be calculated from options + typedef typename detail::get_value_traits + ::type value_traits; + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + typedef typename packed_options::bucket_traits specified_bucket_traits; + + //Real bucket traits must be calculated from options and calculated value_traits + typedef typename detail::get_slist_impl + ::type + >::type slist_impl; + + typedef typename + detail::if_c< detail::is_same + < specified_bucket_traits + , default_bucket_traits + >::value + , detail::bucket_traits_impl + , specified_bucket_traits + >::type real_bucket_traits; + + typedef detail::usetopt + < value_traits + , typename packed_options::hash + , typename packed_options::equal + , typename packed_options::size_type + , real_bucket_traits + , (std::size_t(UniqueKeys)*detail::hash_bool_flags::unique_keys_pos) + | (std::size_t(packed_options::constant_time_size)*detail::hash_bool_flags::constant_time_size_pos) + | (std::size_t(packed_options::power_2_buckets)*detail::hash_bool_flags::power_2_buckets_pos) + | (std::size_t(packed_options::cache_begin)*detail::hash_bool_flags::cache_begin_pos) + | (std::size_t(packed_options::compare_hash)*detail::hash_bool_flags::compare_hash_pos) + | (std::size_t(packed_options::incremental)*detail::hash_bool_flags::incremental_pos) + > type; +}; +/// @endcond + +//! Helper metafunction to define a \c hashtable that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_hashtable +{ + /// @cond + typedef hashtable_impl + < typename make_hashtable_opt + ::type + > implementation_defined; + + /// @endcond + typedef implementation_defined type; +}; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + +#if defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class hashtable + : public make_hashtable::type +{ + typedef typename make_hashtable::type Base; + + public: + typedef typename Base::value_traits value_traits; + typedef typename Base::real_value_traits real_value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + typedef typename Base::bucket_ptr bucket_ptr; + typedef typename Base::size_type size_type; + typedef typename Base::hasher hasher; + typedef typename Base::bucket_traits bucket_traits; + typedef typename Base::key_equal key_equal; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + hashtable ( const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : Base(b_traits, hash_func, equal_func, v_traits) + {} +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_HASHTABLE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/intrusive_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/intrusive_fwd.hpp new file mode 100644 index 0000000000..dc185667e0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/intrusive_fwd.hpp @@ -0,0 +1,542 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_FWD_HPP +#define BOOST_INTRUSIVE_FWD_HPP + +#include +#include +#include + +/// @cond + +namespace boost { + +namespace intrusive { + +struct none; + +} //namespace intrusive{ +} //namespace boost{ + +namespace boost { +namespace intrusive { + +//////////////////////////// +// Node algorithms +//////////////////////////// + +//Algorithms predeclarations +template +class circular_list_algorithms; + +template +class circular_slist_algorithms; + +template +class rbtree_algorithms; + +//////////////////////////// +// Containers +//////////////////////////// + +//slist +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + , class O5 = none + > +#else +template +#endif +class slist; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class slist_base_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class slist_member_hook; + +//list +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class list; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class list_base_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class list_member_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class list_hook; + +//rbtree/set/multiset +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class rbtree; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class set; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class multiset; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class set_base_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class set_member_hook; + +//splaytree/splay_set/splay_multiset +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class splaytree; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class splay_set; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class splay_multiset; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class splay_set_base_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class splay_set_member_hook; + +//avltree/avl_set/avl_multiset +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class avltree; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class avl_set; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class avl_multiset; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class avl_set_base_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class avl_set_member_hook; + + +//treap/treap_set/treap_multiset +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class treap; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class treap_set; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class treap_multiset; + +//Default priority comparison functor +template +struct priority_compare; + +//sgtree/sg_set/sg_multiset +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class sgtree; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class sg_set; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class sg_multiset; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class bs_set_base_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class bs_set_member_hook; + +//hashtable/unordered_set/unordered_multiset + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + , class O5 = none + , class O6 = none + , class O7 = none + , class O8 = none + , class O9 = none + , class O10 = none + > +#else +template +#endif +class hashtable; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + , class O5 = none + , class O6 = none + , class O7 = none + , class O8 = none + , class O9 = none + , class O10 = none + > +#else +template +#endif +class unordered_set; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class T + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + , class O5 = none + , class O6 = none + , class O7 = none + , class O8 = none + , class O9 = none + , class O10 = none + > +#else +template +#endif +class unordered_multiset; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class unordered_set_base_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + > +#else +template +#endif +class unordered_set_member_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class any_base_hook; + +#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template + < class O1 = none + , class O2 = none + , class O3 = none + > +#else +template +#endif +class any_member_hook; + +} //namespace intrusive { +} //namespace boost { + +/// @endcond + +#endif //#ifndef BOOST_INTRUSIVE_FWD_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/linear_slist_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/linear_slist_algorithms.hpp new file mode 100644 index 0000000000..193b449b40 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/linear_slist_algorithms.hpp @@ -0,0 +1,327 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! linear_slist_algorithms provides basic algorithms to manipulate nodes +//! forming a linear singly linked list. +//! +//! linear_slist_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the linear list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! Static functions: +//! +//! static node_ptr get_next(const_node_ptr n); +//! +//! static void set_next(node_ptr n, node_ptr next); +template +class linear_slist_algorithms + /// @cond + : public detail::common_slist_algorithms + /// @endcond +{ + /// @cond + typedef detail::common_slist_algorithms base_t; + /// @endcond + public: + typedef typename NodeTraits::node node; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + typedef NodeTraits node_traits; + + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + + //! Effects: Constructs an non-used list element, putting the next + //! pointer to null: + //! NodeTraits::get_next(this_node) == 0 + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void init(node_ptr this_node); + + //! Requires: this_node must be in a circular list or be an empty circular list. + //! + //! Effects: Returns true is "this_node" is the only node of a circular list: + //! or it's a not inserted node: + //! return !NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static bool unique(const_node_ptr this_node); + + //! Effects: Returns true is "this_node" has the same state as if + //! it was inited using "init(node_ptr)" + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static bool inited(const_node_ptr this_node); + + //! Requires: prev_node must be in a circular list or be an empty circular list. + //! + //! Effects: Unlinks the next node of prev_node from the circular list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void unlink_after(node_ptr prev_node); + + //! Requires: prev_node and last_node must be in a circular list + //! or be an empty circular list. + //! + //! Effects: Unlinks the range (prev_node, last_node) from the linear list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void unlink_after(node_ptr prev_node, node_ptr last_node); + + //! Requires: prev_node must be a node of a linear list. + //! + //! Effects: Links this_node after prev_node in the linear list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void link_after(node_ptr prev_node, node_ptr this_node); + + //! Requires: b and e must be nodes of the same linear list or an empty range. + //! and p must be a node of a different linear list. + //! + //! Effects: Removes the nodes from (b, e] range from their linear list and inserts + //! them after p in p's linear list. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void transfer_after(node_ptr p, node_ptr b, node_ptr e); + + #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + + //! Effects: Constructs an empty list, making this_node the only + //! node of the circular list: + //! NodeTraits::get_next(this_node) == this_node. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void init_header(node_ptr this_node) + { NodeTraits::set_next(this_node, node_ptr(0)); } + + //! Requires: this_node and prev_init_node must be in the same linear list. + //! + //! Effects: Returns the previous node of this_node in the linear list starting. + //! the search from prev_init_node. The first node checked for equality + //! is NodeTraits::get_next(prev_init_node). + //! + //! Complexity: Linear to the number of elements between prev_init_node and this_node. + //! + //! Throws: Nothing. + static node_ptr get_previous_node(node_ptr prev_init_node, node_ptr this_node) + { return base_t::get_previous_node(prev_init_node, this_node); } + + //! Requires: this_node must be in a linear list or be an empty linear list. + //! + //! Effects: Returns the number of nodes in a linear list. If the linear list + //! is empty, returns 1. + //! + //! Complexity: Linear + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr this_node) + { + std::size_t result = 0; + const_node_ptr p = this_node; + do{ + p = NodeTraits::get_next(p); + ++result; + } while (p); + return result; + } + + //! Requires: this_node and other_node must be nodes inserted + //! in linear lists or be empty linear lists. + //! + //! Effects: Moves all the nodes previously chained after this_node after other_node + //! and vice-versa. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + static void swap_trailing_nodes(node_ptr this_node, node_ptr other_node) + { + node_ptr this_nxt = NodeTraits::get_next(this_node); + node_ptr other_nxt = NodeTraits::get_next(other_node); + NodeTraits::set_next(this_node, other_nxt); + NodeTraits::set_next(other_node, this_nxt); + } + + //! Effects: Reverses the order of elements in the list. + //! + //! Returns: The new first node of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: This function is linear to the contained elements. + static node_ptr reverse(node_ptr p) + { + if(!p) return node_ptr(0); + node_ptr i = NodeTraits::get_next(p); + node_ptr first(p); + while(i){ + node_ptr nxti(NodeTraits::get_next(i)); + base_t::unlink_after(p); + NodeTraits::set_next(i, first); + first = i; + i = nxti; + } + return first; + } + + //! Effects: Moves the first n nodes starting at p to the end of the list. + //! + //! Returns: A pair containing the new first and last node of the list or + //! if there has been any movement, a null pair if n leads to no movement. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements plus the number moved positions. + static std::pair move_first_n_backwards(node_ptr p, std::size_t n) + { + std::pair ret(node_ptr(0), node_ptr(0)); + //Null shift, or count() == 0 or 1, nothing to do + if(!n || !p || !NodeTraits::get_next(p)){ + return ret; + } + + node_ptr first = p; + bool end_found = false; + node_ptr new_last(0); + node_ptr old_last(0); + + //Now find the new last node according to the shift count. + //If we find 0 before finding the new last node + //unlink p, shortcut the search now that we know the size of the list + //and continue. + for(std::size_t i = 1; i <= n; ++i){ + new_last = first; + first = NodeTraits::get_next(first); + if(first == 0){ + //Shortcut the shift with the modulo of the size of the list + n %= i; + if(!n) return ret; + old_last = new_last; + i = 0; + //Unlink p and continue the new first node search + first = p; + //unlink_after(new_last); + end_found = true; + } + } + + //If the p has not been found in the previous loop, find it + //starting in the new first node and unlink it + if(!end_found){ + old_last = base_t::get_previous_node(first, node_ptr(0)); + } + + //Now link p after the new last node + NodeTraits::set_next(old_last, p); + NodeTraits::set_next(new_last, node_ptr(0)); + ret.first = first; + ret.second = new_last; + return ret; + } + + //! Effects: Moves the first n nodes starting at p to the beginning of the list. + //! + //! Returns: A pair containing the new first and last node of the list or + //! if there has been any movement, a null pair if n leads to no movement. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements plus the number moved positions. + static std::pair move_first_n_forward(node_ptr p, std::size_t n) + { + std::pair ret(node_ptr(0), node_ptr(0)); + //Null shift, or count() == 0 or 1, nothing to do + if(!n || !p || !NodeTraits::get_next(p)) + return ret; + + node_ptr first = p; + + //Iterate until p is found to know where the current last node is. + //If the shift count is less than the size of the list, we can also obtain + //the position of the new last node after the shift. + node_ptr old_last(first), next_to_it, new_last(p); + std::size_t distance = 1; + while(!!(next_to_it = node_traits::get_next(old_last))){ + if(distance++ > n) + new_last = node_traits::get_next(new_last); + old_last = next_to_it; + } + //If the shift was bigger or equal than the size, obtain the equivalent + //forward shifts and find the new last node. + if(distance <= n){ + //Now find the equivalent forward shifts. + //Shortcut the shift with the modulo of the size of the list + std::size_t new_before_last_pos = (distance - (n % distance))% distance; + //If the shift is a multiple of the size there is nothing to do + if(!new_before_last_pos) + return ret; + + for( new_last = p + ; --new_before_last_pos + ; new_last = node_traits::get_next(new_last)){ + //empty + } + } + + //Get the first new node + node_ptr new_first(node_traits::get_next(new_last)); + //Now put the old beginning after the old end + NodeTraits::set_next(old_last, p); + NodeTraits::set_next(new_last, node_ptr(0)); + ret.first = new_first; + ret.second = new_last; + return ret; + } +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/link_mode.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/link_mode.hpp new file mode 100644 index 0000000000..17012c93cb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/link_mode.hpp @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP +#define BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP + +namespace boost { +namespace intrusive { + +//!This enumeration defines the type of value_traits that can be defined +//!for Boost.Intrusive containers +enum link_mode_type{ + //!If this linking policy is specified in a value_traits class + //!as the link_mode, containers + //!configured with such value_traits won't set the hooks + //!of the erased values to a default state. Containers also won't + //!check that the hooks of the new values are default initialized. + normal_link, + + //!If this linking policy is specified in a value_traits class + //!as the link_mode, containers + //!configured with such value_traits will set the hooks + //!of the erased values to a default state. Containers also will + //!check that the hooks of the new values are default initialized. + safe_link, + + //!Same as "safe_link" but the user type is an auto-unlink + //!type, so the containers with constant-time size features won't be + //!compatible with value_traits configured with this policy. + //!Containers also know that the a value can be silently erased from + //!the container without using any function provided by the containers. + auto_unlink +}; +} //namespace intrusive +} //namespace boost + +#endif //BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/list.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/list.hpp new file mode 100644 index 0000000000..ee3e5baa21 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/list.hpp @@ -0,0 +1,1504 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_LIST_HPP +#define BOOST_INTRUSIVE_LIST_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//iG pending #include + +namespace boost { +namespace intrusive { + +/// @cond + +template +struct listopt +{ + typedef ValueTraits value_traits; + typedef SizeType size_type; + static const bool constant_time_size = ConstantTimeSize; +}; + + +template +struct list_defaults + : pack_options + < none + , base_hook + , constant_time_size + , size_type + >::type +{}; + +/// @endcond + +//! The class template list is an intrusive container that mimics most of the +//! interface of std::list as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<> and \c size_type<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class list_impl + : private detail::clear_on_destructor_base< list_impl > +{ + template friend class detail::clear_on_destructor_base; + //Public typedefs + public: + typedef typename Config::value_traits value_traits; + /// @cond + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + /// @endcond + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::const_pointer const_pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename Config::size_type size_type; + typedef list_iterator iterator; + typedef list_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + typedef circular_list_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + + /// @cond + + private: + typedef detail::size_holder size_traits; + + //Non-copyable and non-moveable + list_impl (const list_impl&); + list_impl &operator =(const list_impl&); + + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + //Constant-time size is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(constant_time_size && + ((int)real_value_traits::link_mode == (int)auto_unlink) + )); + + //Const cast emulation for smart pointers + static node_ptr uncast(const_node_ptr ptr) + { + return const_cast(detail::boost_intrusive_get_pointer(ptr)); + //iG pending return node_ptr(boost::const_pointer_cast(ptr)); + } + + node_ptr get_root_node() + { return node_ptr(&data_.root_plus_size_.root_); } + + const_node_ptr get_root_node() const + { return const_node_ptr(&data_.root_plus_size_.root_); } + + struct root_plus_size : public size_traits + { + node root_; + }; + + struct data_t : public value_traits + { + typedef typename list_impl::value_traits value_traits; + data_t(const value_traits &val_traits) + : value_traits(val_traits) + {} + + root_plus_size root_plus_size_; + } data_; + + size_traits &priv_size_traits() + { return data_.root_plus_size_; } + + const size_traits &priv_size_traits() const + { return data_.root_plus_size_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_.get_value_traits(*this); } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_; } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_.get_value_traits(*this); } + + const value_traits &get_value_traits() const + { return data_; } + + value_traits &get_value_traits() + { return data_; } + + protected: + node &prot_root_node() + { return data_.root_plus_size_.root_; } + + node const &prot_root_node() const + { return data_.root_plus_size_.root_; } + + void prot_set_size(size_type s) + { data_.root_plus_size_.set_size(s); } + + /// @endcond + + public: + + const real_value_traits &get_real_value_traits() const + { return this->get_real_value_traits(detail::bool_()); } + + real_value_traits &get_real_value_traits() + { return this->get_real_value_traits(detail::bool_()); } + + //! Effects: constructs an empty list. + //! + //! Complexity: Constant + //! + //! Throws: If real_value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks). + list_impl(const value_traits &v_traits = value_traits()) + : data_(v_traits) + { + this->priv_size_traits().set_size(size_type(0)); + node_algorithms::init_header(this->get_root_node()); + } + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! + //! Effects: Constructs a list equal to the range [first,last). + //! + //! Complexity: Linear in std::distance(b, e). No copy constructors are called. + //! + //! Throws: If real_value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks). + template + list_impl(Iterator b, Iterator e, const value_traits &v_traits = value_traits()) + : data_(v_traits) + { + this->priv_size_traits().set_size(size_type(0)); + node_algorithms::init_header(this->get_root_node()); + this->insert(this->cend(), b, e); + } + + //! Effects: If it's not a safe-mode or an auto-unlink value_type + //! the destructor does nothing + //! (ie. no code is generated). Otherwise it detaches all elements from this. + //! In this case the objects in the list are not deleted (i.e. no destructors + //! are called), but the hooks according to the ValueTraits template parameter + //! are set to their default value. + //! + //! Complexity: Linear to the number of elements in the list, if + //! it's a safe-mode or auto-unlink value . Otherwise constant. + ~list_impl() + {} + + //! Requires: value must be an lvalue. + //! + //! Effects: Inserts the value in the back of the list. + //! No copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + void push_back(reference value) + { + node_ptr to_insert = get_real_value_traits().to_node_ptr(value); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::inited(to_insert)); + node_algorithms::link_before(this->get_root_node(), to_insert); + this->priv_size_traits().increment(); + } + + //! Requires: value must be an lvalue. + //! + //! Effects: Inserts the value in the front of the list. + //! No copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + void push_front(reference value) + { + node_ptr to_insert = get_real_value_traits().to_node_ptr(value); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::inited(to_insert)); + node_algorithms::link_before(node_traits::get_next(this->get_root_node()), to_insert); + this->priv_size_traits().increment(); + } + + //! Effects: Erases the last element of the list. + //! No destructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators (but not the references) to the erased element. + void pop_back() + { return this->pop_back_and_dispose(detail::null_disposer()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the last element of the list. + //! No destructors are called. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators to the erased element. + template + void pop_back_and_dispose(Disposer disposer) + { + node_ptr to_erase = node_traits::get_previous(this->get_root_node()); + node_algorithms::unlink(to_erase); + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + } + + //! Effects: Erases the first element of the list. + //! No destructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators (but not the references) to the erased element. + void pop_front() + { return this->pop_front_and_dispose(detail::null_disposer()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the first element of the list. + //! No destructors are called. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators to the erased element. + template + void pop_front_and_dispose(Disposer disposer) + { + node_ptr to_erase = node_traits::get_next(this->get_root_node()); + node_algorithms::unlink(to_erase); + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + } + + //! Effects: Returns a reference to the first element of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + reference front() + { return *get_real_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); } + + //! Effects: Returns a const_reference to the first element of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_reference front() const + { return *get_real_value_traits().to_value_ptr(uncast(node_traits::get_next(this->get_root_node()))); } + + //! Effects: Returns a reference to the last element of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + reference back() + { return *get_real_value_traits().to_value_ptr(node_traits::get_previous(this->get_root_node())); } + + //! Effects: Returns a const_reference to the last element of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_reference back() const + { return *get_real_value_traits().to_value_ptr(uncast(node_traits::get_previous(this->get_root_node()))); } + + //! Effects: Returns an iterator to the first element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + iterator begin() + { return iterator(node_traits::get_next(this->get_root_node()), this); } + + //! Effects: Returns a const_iterator to the first element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator begin() const + { return this->cbegin(); } + + //! Effects: Returns a const_iterator to the first element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator cbegin() const + { return const_iterator(node_traits::get_next(this->get_root_node()), this); } + + //! Effects: Returns an iterator to the end of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + iterator end() + { return iterator(this->get_root_node(), this); } + + //! Effects: Returns a const_iterator to the end of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator end() const + { return this->cend(); } + + //! Effects: Returns a constant iterator to the end of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator cend() const + { return const_iterator(uncast(this->get_root_node()), this); } + + //! Effects: Returns a reverse_iterator pointing to the beginning + //! of the reversed list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + reverse_iterator rbegin() + { return reverse_iterator(this->end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_reverse_iterator rbegin() const + { return this->crbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_reverse_iterator crbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + reverse_iterator rend() + { return reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_reverse_iterator rend() const + { return this->crend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_reverse_iterator crend() const + { return const_reverse_iterator(this->begin()); } + + //! Precondition: end_iterator must be a valid end iterator + //! of list. + //! + //! Effects: Returns a const reference to the list associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static list_impl &container_from_end_iterator(iterator end_iterator) + { return list_impl::priv_container_from_end_iterator(end_iterator); } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of list. + //! + //! Effects: Returns a const reference to the list associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const list_impl &container_from_end_iterator(const_iterator end_iterator) + { return list_impl::priv_container_from_end_iterator(end_iterator); } + + //! Effects: Returns the number of the elements contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements contained in the list. + //! if constant-time size option is disabled. Constant time otherwise. + //! + //! Note: Does not affect the validity of iterators and references. + size_type size() const + { + if(constant_time_size) + return this->priv_size_traits().get_size(); + else + return node_algorithms::count(this->get_root_node()) - 1; + } + + //! Effects: Returns true if the list contains no elements. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + bool empty() const + { return node_algorithms::unique(this->get_root_node()); } + + //! Effects: Swaps the elements of x and *this. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + void swap(list_impl& other) + { + node_algorithms::swap_nodes(this->get_root_node(), other.get_root_node()); + if(constant_time_size){ + size_type backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(other.priv_size_traits().get_size()); + other.priv_size_traits().set_size(backup); + } + } + + //! Effects: Moves backwards all the elements, so that the first + //! element becomes the second, the second becomes the third... + //! the last element becomes the first one. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of shifts. + //! + //! Note: Does not affect the validity of iterators and references. + void shift_backwards(size_type n = 1) + { node_algorithms::move_forward(this->get_root_node(), n); } + + //! Effects: Moves forward all the elements, so that the second + //! element becomes the first, the third becomes the second... + //! the first element becomes the last one. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of shifts. + //! + //! Note: Does not affect the validity of iterators and references. + void shift_forward(size_type n = 1) + { node_algorithms::move_backwards(this->get_root_node(), n); } + + //! Effects: Erases the element pointed by i of the list. + //! No destructors are called. + //! + //! Returns: the first element remaining beyond the removed element, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased element. + iterator erase(const_iterator i) + { return this->erase_and_dispose(i, detail::null_disposer()); } + + //! Requires: b and e must be valid iterators to elements in *this. + //! + //! Effects: Erases the element range pointed by b and e + //! No destructors are called. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of erased elements if it's a safe-mode + //! or auto-unlink value, or constant-time size is enabled. Constant-time otherwise. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased elements. + iterator erase(const_iterator b, const_iterator e) + { + if(safemode_or_autounlink || constant_time_size){ + return this->erase_and_dispose(b, e, detail::null_disposer()); + } + else{ + node_algorithms::unlink(b.pointed_node(), e.pointed_node()); + return e.unconst(); + } + } + + //! Requires: b and e must be valid iterators to elements in *this. + //! n must be std::distance(b, e). + //! + //! Effects: Erases the element range pointed by b and e + //! No destructors are called. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of erased elements if it's a safe-mode + //! or auto-unlink value is enabled. Constant-time otherwise. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased elements. + iterator erase(const_iterator b, const_iterator e, difference_type n) + { + BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(b, e) == difference_type(n)); + if(safemode_or_autounlink || constant_time_size){ + return this->erase_and_dispose(b, e, detail::null_disposer()); + } + else{ + if(constant_time_size){ + this->priv_size_traits().set_size(this->priv_size_traits().get_size() - n); + } + node_algorithms::unlink(b.pointed_node(), e.pointed_node()); + return e.unconst(); + } + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed by i of the list. + //! No destructors are called. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Returns: the first element remaining beyond the removed element, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators to the erased element. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { + node_ptr to_erase(i.pointed_node()); + ++i; + node_algorithms::unlink(to_erase); + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(this->get_real_value_traits().to_value_ptr(to_erase)); + return i.unconst(); + } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element range pointed by b and e + //! No destructors are called. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements erased. + //! + //! Note: Invalidates the iterators to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { + node_ptr bp(b.pointed_node()), ep(e.pointed_node()); + node_algorithms::unlink(bp, ep); + while(bp != ep){ + node_ptr to_erase(bp); + bp = node_traits::get_next(bp); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + this->priv_size_traits().decrement(); + } + return e.unconst(); + } + + //! Effects: Erases all the elements of the container. + //! No destructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements of the list. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Note: Invalidates the iterators (but not the references) to the erased elements. + void clear() + { + if(safemode_or_autounlink){ + this->clear_and_dispose(detail::null_disposer()); + } + else{ + node_algorithms::init_header(this->get_root_node()); + this->priv_size_traits().set_size(size_type(0)); + } + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! No destructors are called. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements of the list. + //! + //! Note: Invalidates the iterators to the erased elements. + template + void clear_and_dispose(Disposer disposer) + { + const_iterator it(this->begin()), itend(this->end()); + while(it != itend){ + node_ptr to_erase(it.pointed_node()); + ++it; + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + } + node_algorithms::init_header(this->get_root_node()); + this->priv_size_traits().set_size(0); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws. Basic guarantee. + template + void clone_from(const list_impl &src, Cloner cloner, Disposer disposer) + { + this->clear_and_dispose(disposer); + detail::exception_disposer + rollback(*this, disposer); + const_iterator b(src.begin()), e(src.end()); + for(; b != e; ++b){ + this->push_back(*cloner(*b)); + } + rollback.release(); + } + + //! Requires: value must be an lvalue and p must be a valid iterator of *this. + //! + //! Effects: Inserts the value before the position pointed by p. + //! + //! Returns: An iterator to the inserted element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. No copy constructors are called. + //! + //! Note: Does not affect the validity of iterators and references. + iterator insert(const_iterator p, reference value) + { + node_ptr to_insert = this->get_real_value_traits().to_node_ptr(value); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::inited(to_insert)); + node_algorithms::link_before(p.pointed_node(), to_insert); + this->priv_size_traits().increment(); + return iterator(to_insert, this); + } + + //! Requires: Dereferencing iterator must yield + //! an lvalue of type value_type and p must be a valid iterator of *this. + //! + //! Effects: Inserts the range pointed by b and e before the position p. + //! No copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements inserted. + //! + //! Note: Does not affect the validity of iterators and references. + template + void insert(const_iterator p, Iterator b, Iterator e) + { + for (; b != e; ++b) + this->insert(p, *b); + } + + //! Requires: Dereferencing iterator must yield + //! an lvalue of type value_type. + //! + //! Effects: Clears the list and inserts the range pointed by b and e. + //! No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements inserted plus + //! linear to the elements contained in the list if it's a safe-mode + //! or auto-unlink value. + //! Linear to the number of elements inserted in the list otherwise. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. + template + void assign(Iterator b, Iterator e) + { + this->clear(); + this->insert(this->cend(), b, e); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Requires: Dereferencing iterator must yield + //! an lvalue of type value_type. + //! + //! Effects: Clears the list and inserts the range pointed by b and e. + //! No destructors or copy constructors are called. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements inserted plus + //! linear to the elements contained in the list. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. + template + void dispose_and_assign(Disposer disposer, Iterator b, Iterator e) + { + this->clear_and_dispose(disposer); + this->insert(this->cend(), b, e); + } + + //! Requires: p must be a valid iterator of *this. + //! + //! Effects: Transfers all the elements of list x to this list, before the + //! the element pointed by p. No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Iterators of values obtained from list x now point to elements of + //! this list. Iterators of this list and all the references are not invalidated. + void splice(const_iterator p, list_impl& x) + { + if(!x.empty()){ + size_traits &thist = this->priv_size_traits(); + size_traits &xt = x.priv_size_traits(); + node_algorithms::transfer + (p.pointed_node(), x.begin().pointed_node(), x.end().pointed_node()); + thist.set_size(thist.get_size() + xt.get_size()); + xt.set_size(size_type(0)); + } + } + + //! Requires: p must be a valid iterator of *this. + //! new_ele must point to an element contained in list x. + //! + //! Effects: Transfers the value pointed by new_ele, from list x to this list, + //! before the the element pointed by p. No destructors or copy constructors are called. + //! If p == new_ele or p == ++new_ele, this function is a null operation. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice(const_iterator p, list_impl&x, const_iterator new_ele) + { + node_algorithms::transfer(p.pointed_node(), new_ele.pointed_node()); + x.priv_size_traits().decrement(); + this->priv_size_traits().increment(); + } + + //! Requires: p must be a valid iterator of *this. + //! start and end must point to elements contained in list x. + //! + //! Effects: Transfers the range pointed by start and end from list x to this list, + //! before the the element pointed by p. No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements transferred + //! if constant-time size option is enabled. Constant-time otherwise. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice(const_iterator p, list_impl&x, const_iterator start, const_iterator end) + { + if(constant_time_size) + this->splice(p, x, start, end, std::distance(start, end)); + else + this->splice(p, x, start, end, 1);//distance is a dummy value + } + + //! Requires: p must be a valid iterator of *this. + //! start and end must point to elements contained in list x. + //! n == std::distance(start, end) + //! + //! Effects: Transfers the range pointed by start and end from list x to this list, + //! before the the element pointed by p. No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice(const_iterator p, list_impl&x, const_iterator start, const_iterator end, difference_type n) + { + if(n){ + if(constant_time_size){ + size_traits &thist = this->priv_size_traits(); + size_traits &xt = x.priv_size_traits(); + BOOST_INTRUSIVE_INVARIANT_ASSERT(n == std::distance(start, end)); + node_algorithms::transfer(p.pointed_node(), start.pointed_node(), end.pointed_node()); + thist.set_size(thist.get_size() + n); + xt.set_size(xt.get_size() - n); + } + else{ + node_algorithms::transfer(p.pointed_node(), start.pointed_node(), end.pointed_node()); + } + } + } + + //! Effects: This function sorts the list *this according to std::less. + //! The sort is stable, that is, the relative order of equivalent elements is preserved. + //! + //! Throws: If real_value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or std::less throws. Basic guarantee. + //! + //! Notes: Iterators and references are not invalidated. + //! + //! Complexity: The number of comparisons is approximately N log N, where N + //! is the list's size. + void sort() + { this->sort(std::less()); } + + //! Requires: p must be a comparison function that induces a strict weak ordering + //! + //! Effects: This function sorts the list *this according to p. The sort is + //! stable, that is, the relative order of equivalent elements is preserved. + //! + //! Throws: If real_value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the predicate throws. Basic guarantee. + //! + //! Notes: This won't throw if list_base_hook<> or + //! list_member_hook are used. + //! Iterators and references are not invalidated. + //! + //! Complexity: The number of comparisons is approximately N log N, where N + //! is the list's size. + template + void sort(Predicate p) + { + if(node_traits::get_next(this->get_root_node()) + != node_traits::get_previous(this->get_root_node())){ + list_impl carry(this->get_value_traits()); + detail::array_initializer counter(this->get_value_traits()); + int fill = 0; + while(!this->empty()){ + carry.splice(carry.cbegin(), *this, this->cbegin()); + int i = 0; + while(i < fill && !counter[i].empty()) { + counter[i].merge(carry, p); + carry.swap(counter[i++]); + } + carry.swap(counter[i]); + if(i == fill) + ++fill; + } + for (int i = 1; i < fill; ++i) + counter[i].merge(counter[i-1], p); + this->swap(counter[fill-1]); + } + } + + //! Effects: This function removes all of x's elements and inserts them + //! in order into *this according to std::less. The merge is stable; + //! that is, if an element from *this is equivalent to one from x, then the element + //! from *this will precede the one from x. + //! + //! Throws: If std::less throws. Basic guarantee. + //! + //! Complexity: This function is linear time: it performs at most + //! size() + x.size() - 1 comparisons. + //! + //! Note: Iterators and references are not invalidated + void merge(list_impl& x) + { this->merge(x, std::less()); } + + //! Requires: p must be a comparison function that induces a strict weak + //! ordering and both *this and x must be sorted according to that ordering + //! The lists x and *this must be distinct. + //! + //! Effects: This function removes all of x's elements and inserts them + //! in order into *this. The merge is stable; that is, if an element from *this is + //! equivalent to one from x, then the element from *this will precede the one from x. + //! + //! Throws: If the predicate throws. Basic guarantee. + //! + //! Complexity: This function is linear time: it performs at most + //! size() + x.size() - 1 comparisons. + //! + //! Note: Iterators and references are not invalidated. + template + void merge(list_impl& x, Predicate p) + { + const_iterator e(this->cend()), ex(x.cend()); + const_iterator b(this->cbegin()); + while(!x.empty()){ + const_iterator ix(x.cbegin()); + while (b != e && !p(*ix, *b)){ + ++b; + } + if(b == e){ + //Now transfer the rest to the end of the container + this->splice(e, x); + break; + } + else{ + size_type n(0); + do{ + ++ix; ++n; + } while(ix != ex && p(*ix, *b)); + this->splice(b, x, x.begin(), ix, n); + } + } + } + + //! Effects: Reverses the order of elements in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: This function is linear time. + //! + //! Note: Iterators and references are not invalidated + void reverse() + { node_algorithms::reverse(this->get_root_node()); } + + //! Effects: Removes all the elements that compare equal to value. + //! No destructors are called. + //! + //! Throws: If std::equal_to throws. Basic guarantee. + //! + //! Complexity: Linear time. It performs exactly size() comparisons for equality. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + void remove(const_reference value) + { this->remove_if(detail::equal_to_value(value)); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Removes all the elements that compare equal to value. + //! Disposer::operator()(pointer) is called for every removed element. + //! + //! Throws: If std::equal_to throws. Basic guarantee. + //! + //! Complexity: Linear time. It performs exactly size() comparisons for equality. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void remove_and_dispose(const_reference value, Disposer disposer) + { this->remove_and_dispose_if(detail::equal_to_value(value), disposer); } + + //! Effects: Removes all the elements for which a specified + //! predicate is satisfied. No destructors are called. + //! + //! Throws: If pred throws. Basic guarantee. + //! + //! Complexity: Linear time. It performs exactly size() calls to the predicate. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void remove_if(Pred pred) + { this->remove_and_dispose_if(pred, detail::null_disposer()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Removes all the elements for which a specified + //! predicate is satisfied. + //! Disposer::operator()(pointer) is called for every removed element. + //! + //! Throws: If pred throws. Basic guarantee. + //! + //! Complexity: Linear time. It performs exactly size() comparisons for equality. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void remove_and_dispose_if(Pred pred, Disposer disposer) + { + const_iterator cur(this->cbegin()); + const_iterator last(this->cend()); + while(cur != last) { + if(pred(*cur)){ + cur = this->erase_and_dispose(cur, disposer); + } + else{ + ++cur; + } + } + } + + //! Effects: Removes adjacent duplicate elements or adjacent + //! elements that are equal from the list. No destructors are called. + //! + //! Throws: If std::equal_toComplexity: Linear time (size()-1 comparisons calls to pred()). + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + void unique() + { this->unique_and_dispose(std::equal_to(), detail::null_disposer()); } + + //! Effects: Removes adjacent duplicate elements or adjacent + //! elements that satisfy some binary predicate from the list. + //! No destructors are called. + //! + //! Throws: If pred throws. Basic guarantee. + //! + //! Complexity: Linear time (size()-1 comparisons equality comparisons). + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void unique(BinaryPredicate pred) + { this->unique_and_dispose(pred, detail::null_disposer()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Removes adjacent duplicate elements or adjacent + //! elements that are equal from the list. + //! Disposer::operator()(pointer) is called for every removed element. + //! + //! Throws: If std::equal_toComplexity: Linear time (size()-1) comparisons equality comparisons. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void unique_and_dispose(Disposer disposer) + { this->unique_and_dispose(std::equal_to(), disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Removes adjacent duplicate elements or adjacent + //! elements that satisfy some binary predicate from the list. + //! Disposer::operator()(pointer) is called for every removed element. + //! + //! Throws: If pred throws. Basic guarantee. + //! + //! Complexity: Linear time (size()-1) comparisons equality comparisons. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void unique_and_dispose(BinaryPredicate pred, Disposer disposer) + { + const_iterator itend(this->cend()); + const_iterator cur(this->cbegin()); + + if(cur != itend){ + const_iterator after(cur); + ++after; + while(after != itend){ + if(pred(*cur, *after)){ + after = this->erase_and_dispose(after, disposer); + } + else{ + cur = after; + ++after; + } + } + } + } + + //! Requires: value must be a reference to a value inserted in a list. + //! + //! Effects: This function returns a const_iterator pointing to the element + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators and references are not invalidated. + //! This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(real_value_traits::to_node_ptr(value))); + return iterator(real_value_traits::to_node_ptr(value), 0); + } + + //! Requires: value must be a const reference to a value inserted in a list. + //! + //! Effects: This function returns an iterator pointing to the element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators and references are not invalidated. + //! This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(real_value_traits::to_node_ptr(const_cast (value)))); + return const_iterator(real_value_traits::to_node_ptr(const_cast (value)), 0); + } + + //! Requires: value must be a reference to a value inserted in a list. + //! + //! Effects: This function returns a const_iterator pointing to the element + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators and references are not invalidated. + iterator iterator_to(reference value) + { + BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(real_value_traits::to_node_ptr(value))); + return iterator(real_value_traits::to_node_ptr(value), this); + } + + //! Requires: value must be a const reference to a value inserted in a list. + //! + //! Effects: This function returns an iterator pointing to the element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators and references are not invalidated. + const_iterator iterator_to(const_reference value) const + { + BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(real_value_traits::to_node_ptr(const_cast (value)))); + return const_iterator(real_value_traits::to_node_ptr(const_cast (value)), this); + } + + /// @cond + + private: + static list_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) + { + root_plus_size *r = detail::parent_from_member + ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), &root_plus_size::root_); + data_t *d = detail::parent_from_member + ( r, &data_t::root_plus_size_); + list_impl *s = detail::parent_from_member(d, &list_impl::data_); + return *s; + } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator< +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const list_impl &x, const list_impl &y) +#else +(const list_impl &x, const list_impl &y) +#endif +{ return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +bool operator== +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const list_impl &x, const list_impl &y) +#else +(const list_impl &x, const list_impl &y) +#endif +{ + typedef list_impl list_type; + typedef typename list_type::const_iterator const_iterator; + const bool C = list_type::constant_time_size; + if(C && x.size() != y.size()){ + return false; + } + const_iterator end1 = x.end(); + + const_iterator i1 = x.begin(); + const_iterator i2 = y.begin(); + if(C){ + while (i1 != end1 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1; + } + else{ + const_iterator end2 = y.end(); + while (i1 != end1 && i2 != end2 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1 && i2 == end2; + } +} + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const list_impl &x, const list_impl &y) +#else +(const list_impl &x, const list_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const list_impl &x, const list_impl &y) +#else +(const list_impl &x, const list_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const list_impl &x, const list_impl &y) +#else +(const list_impl &x, const list_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const list_impl &x, const list_impl &y) +#else +(const list_impl &x, const list_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(list_impl &x, list_impl &y) +#else +(list_impl &x, list_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c list that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_list +{ + /// @cond + typedef typename pack_options + < list_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef typename detail::get_value_traits + ::type value_traits; + + typedef list_impl + < + listopt + < value_traits + , typename packed_options::size_type + , packed_options::constant_time_size + > + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class list + : public make_list::type +{ + typedef typename make_list + ::type Base; + typedef typename Base::real_value_traits real_value_traits; + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + public: + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + list(const value_traits &v_traits = value_traits()) + : Base(v_traits) + {} + + template + list(Iterator b, Iterator e, const value_traits &v_traits = value_traits()) + : Base(b, e, v_traits) + {} + + static list &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const list &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_LIST_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/list_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/list_hook.hpp new file mode 100644 index 0000000000..ed93434a3f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/list_hook.hpp @@ -0,0 +1,290 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_LIST_HOOK_HPP +#define BOOST_INTRUSIVE_LIST_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond +template +struct get_list_node_algo +{ + typedef circular_list_algorithms > type; +}; +/// @endcond + +//! Helper metafunction to define a \c \c list_base_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_list_base_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_list_node_algo + , typename packed_options::tag + , packed_options::link_mode + , detail::ListBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Derive a class from this hook in order to store objects of that class +//! in an list. +//! +//! The hook admits the following options: \c tag<>, \c void_pointer<> and +//! \c link_mode<>. +//! +//! \c tag<> defines a tag to identify the node. +//! The same tag value can be used in different classes, but if a class is +//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its +//! unique tag. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class list_base_hook + : public make_list_base_hook + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + list_base_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + list_base_hook(const list_base_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + list_base_hook& operator=(const list_base_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in an list an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~list_base_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(list_base_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c list::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +//! Helper metafunction to define a \c \c list_member_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_list_member_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_list_node_algo + , member_tag + , packed_options::link_mode + , detail::NoBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Store this hook in a class to be inserted +//! in an list. +//! +//! The hook admits the following options: \c void_pointer<> and +//! \c link_mode<>. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class list_member_hook + : public make_list_member_hook + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + + #else + + #endif + ::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + list_member_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + list_member_hook(const list_member_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + list_member_hook& operator=(const list_member_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in an list an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~list_member_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(list_member_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c list::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_LIST_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/member_value_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/member_value_traits.hpp new file mode 100644 index 0000000000..4490d4949d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/member_value_traits.hpp @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_MEMBER_VALUE_TRAITS_HPP +#define BOOST_INTRUSIVE_MEMBER_VALUE_TRAITS_HPP + +#include +#include +#include + +namespace boost { +namespace intrusive { + +//!This value traits template is used to create value traits +//!from user defined node traits where value_traits::value_type will +//!store a node_traits::node +template< class T, class NodeTraits + , typename NodeTraits::node T::* PtrToMember + , link_mode_type LinkMode = safe_link> +struct member_value_traits +{ + public: + typedef NodeTraits node_traits; + typedef T value_type; + typedef typename node_traits::node node; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + typedef typename boost::pointer_to_other::type pointer; + typedef typename boost::pointer_to_other::type const_pointer; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + static const link_mode_type link_mode = LinkMode; + + static node_ptr to_node_ptr(reference value) + { return node_ptr(&(value.*PtrToMember)); } + + static const_node_ptr to_node_ptr(const_reference value) + { return node_ptr(&(value.*PtrToMember)); } + + static pointer to_value_ptr(node_ptr n) + { + return pointer(detail::parent_from_member + (detail::boost_intrusive_get_pointer(n), PtrToMember)); + } + + static const_pointer to_value_ptr(const_node_ptr n) + { + return pointer(detail::parent_from_member + (detail::boost_intrusive_get_pointer(n), PtrToMember)); + } +}; + +} //namespace intrusive +} //namespace boost + +#endif //BOOST_INTRUSIVE_MEMBER_VALUE_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/options.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/options.hpp new file mode 100644 index 0000000000..973165118b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/options.hpp @@ -0,0 +1,812 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_OPTIONS_HPP +#define BOOST_INTRUSIVE_OPTIONS_HPP + +#include +#include +#include +#include +#include +#include + + +namespace boost { +namespace intrusive { + +/// @cond + +struct default_tag; +struct member_tag; + +namespace detail{ + +struct default_hook_tag{}; + +#define BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER) \ +struct BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER : public default_hook_tag\ +{\ + template \ + struct apply\ + { typedef typename T::BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER type; };\ +}\ + +BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_list_hook); +BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_slist_hook); +BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_set_hook); +BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_uset_hook); +BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_avl_set_hook); +BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_splay_set_hook); +BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_bs_set_hook); + +#undef BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION + +template +struct eval_value_traits +{ + typedef typename ValueTraits::value_traits type; +}; + +template +struct external_bucket_traits_is_true +{ + static const bool value = external_bucket_traits_bool::value == 3; +}; + +template +struct eval_bucket_traits +{ + typedef typename BucketTraits::bucket_traits type; +}; + +template +struct concrete_hook_base_value_traits +{ + typedef typename BaseHook::boost_intrusive_tags tags; + typedef detail::base_hook_traits + < T + , typename tags::node_traits + , tags::link_mode + , typename tags::tag + , tags::hook_type> type; +}; + +template +struct concrete_hook_base_node_traits +{ typedef typename BaseHook::boost_intrusive_tags::node_traits type; }; + +template +struct any_hook_base_value_traits +{ + typedef typename BaseHook::boost_intrusive_tags tags; + typedef detail::base_hook_traits + < T + , typename BaseHook::node_traits + , tags::link_mode + , typename tags::tag + , tags::hook_type> type; +}; + +template +struct any_hook_base_node_traits +{ typedef typename BaseHook::node_traits type; }; + +template +struct get_base_value_traits +{ + typedef typename detail::eval_if_c + < internal_any_hook_bool_is_true::value + , any_hook_base_value_traits + , concrete_hook_base_value_traits + >::type type; +}; + +template +struct get_base_node_traits +{ + typedef typename detail::eval_if_c + < internal_any_hook_bool_is_true::value + , any_hook_base_node_traits + , concrete_hook_base_node_traits + >::type type; +}; + +template +struct get_member_value_traits +{ + typedef typename MemberHook::member_value_traits type; +}; + +template +struct get_member_node_traits +{ + typedef typename MemberHook::member_value_traits::node_traits type; +}; + +template +struct get_value_traits +{ + typedef typename detail::eval_if_c + ::value + ,detail::apply + ,detail::identity + >::type supposed_value_traits; + //...if it's a default hook + typedef typename detail::eval_if_c + < internal_base_hook_bool_is_true::value + //...get it's internal value traits using + //the provided T value type. + , get_base_value_traits + //...else use it's internal value traits tag + //(member hooks and custom value traits are in this group) + , detail::eval_if_c + < internal_member_value_traits::value + , get_member_value_traits + , detail::identity + > + >::type type; +}; + +template +struct get_explicit_node_traits +{ + typedef typename ValueTraits::node_traits type; +}; + +template +struct get_node_traits +{ + typedef SupposedValueTraits supposed_value_traits; + //...if it's a base hook + typedef typename detail::eval_if_c + < internal_base_hook_bool_is_true::value + //...get it's internal value traits using + //the provided T value type. + , get_base_node_traits + //...else use it's internal value traits tag + //(member hooks and custom value traits are in this group) + , detail::eval_if_c + < internal_member_value_traits::value + , get_member_node_traits + , get_explicit_node_traits + > + >::type type; +}; + +} //namespace detail{ + + +//!This type indicates that no option is being used +//!and that the default options should be used +struct none +{ + template + struct pack : Base + { }; +}; + +/// @endcond + +//!This option setter specifies if the intrusive +//!container stores its size as a member to +//!obtain constant-time size() member. +template +struct constant_time_size +{ +/// @cond + template + struct pack : Base + { + static const bool constant_time_size = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies the type that +//!the container will use to store its size. +template +struct size_type +{ +/// @cond + template + struct pack : Base + { + typedef SizeType size_type; + }; +/// @endcond +}; + +//!This option setter specifies the strict weak ordering +//!comparison functor for the value type +template +struct compare +{ +/// @cond + template + struct pack : Base + { + typedef Compare compare; + }; +/// @endcond +}; + +//!This option setter for scapegoat containers specifies if +//!the intrusive scapegoat container should use a non-variable +//!alpha value that does not need floating-point operations. +//! +//!If activated, the fixed alpha value is 1/sqrt(2). This +//!option also saves some space in the container since +//!the alpha value and some additional data does not need +//!to be stored in the container. +//! +//!If the user only needs an alpha value near 1/sqrt(2), this +//!option also improves performance since avoids logarithm +//!and division operations when rebalancing the tree. +template +struct floating_point +{ +/// @cond + template + struct pack : Base + { + static const bool floating_point = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies the equality +//!functor for the value type +template +struct equal +{ +/// @cond + template + struct pack : Base + { + typedef Equal equal; + }; +/// @endcond +}; + +//!This option setter specifies the equality +//!functor for the value type +template +struct priority +{ +/// @cond + template + struct pack : Base + { + typedef Priority priority; + }; +/// @endcond +}; + +//!This option setter specifies the hash +//!functor for the value type +template +struct hash +{ +/// @cond + template + struct pack : Base + { + typedef Hash hash; + }; +/// @endcond +}; + +//!This option setter specifies the relationship between the type +//!to be managed by the container (the value type) and the node to be +//!used in the node algorithms. It also specifies the linking policy. +template +struct value_traits +{ +/// @cond + template + struct pack : Base + { + typedef ValueTraits value_traits; + }; +/// @endcond +}; + +//!This option setter specifies the member hook the +//!container must use. +template< typename Parent + , typename MemberHook + , MemberHook Parent::* PtrToMember> +struct member_hook +{ +/// @cond + typedef detail::member_hook_traits + < Parent + , MemberHook + , PtrToMember + > member_value_traits; + template + struct pack : Base + { + typedef member_value_traits value_traits; + }; +/// @endcond +}; + + +//!This option setter specifies the function object that will +//!be used to convert between values to be inserted in a container +//!and the hook to be used for that purpose. +template< typename Functor> +struct function_hook +{ +/// @cond + typedef detail::function_hook_traits + function_value_traits; + template + struct pack : Base + { + typedef function_value_traits value_traits; + }; +/// @endcond +}; + + +//!This option setter specifies that the container +//!must use the specified base hook +template +struct base_hook +{ +/// @cond + template + struct pack : Base + { + typedef BaseHook value_traits; + }; +/// @endcond +}; + +//!This option setter specifies the type of +//!a void pointer. This will instruct the hook +//!to use this type of pointer instead of the +//!default one +template +struct void_pointer +{ +/// @cond + template + struct pack : Base + { + typedef VoidPointer void_pointer; + }; +/// @endcond +}; + +//!This option setter specifies the type of +//!the tag of a base hook. A type cannot have two +//!base hooks of the same type, so a tag can be used +//!to differentiate two base hooks with otherwise same type +template +struct tag +{ +/// @cond + template + struct pack : Base + { + typedef Tag tag; + }; +/// @endcond +}; + +//!This option setter specifies the link mode +//!(normal_link, safe_link or auto_unlink) +template +struct link_mode +{ +/// @cond + template + struct pack : Base + { + static const link_mode_type link_mode = LinkType; + }; +/// @endcond +}; + +//!This option setter specifies if the hook +//!should be optimized for size instead of for speed. +template +struct optimize_size +{ +/// @cond + template + struct pack : Base + { + static const bool optimize_size = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies if the list container should +//!use a linear implementation instead of a circular one. +template +struct linear +{ +/// @cond + template + struct pack : Base + { + static const bool linear = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies if the list container should +//!use a linear implementation instead of a circular one. +template +struct cache_last +{ +/// @cond + template + struct pack : Base + { + static const bool cache_last = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies the bucket traits +//!class for unordered associative containers. When this option is specified, +//!instead of using the default bucket traits, a user defined holder will be defined +template +struct bucket_traits +{ +/// @cond + template + struct pack : Base + { + typedef BucketTraits bucket_traits; + }; +/// @endcond +}; + +//!This option setter specifies if the unordered hook +//!should offer room to store the hash value. +//!Storing the hash in the hook will speed up rehashing +//!processes in applications where rehashing is frequent, +//!rehashing might throw or the value is heavy to hash. +template +struct store_hash +{ +/// @cond + template + struct pack : Base + { + static const bool store_hash = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies if the unordered hook +//!should offer room to store another link to another node +//!with the same key. +//!Storing this link will speed up lookups and insertions on +//!unordered_multiset containers with a great number of elements +//!with the same key. +template +struct optimize_multikey +{ +/// @cond + template + struct pack : Base + { + static const bool optimize_multikey = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies if the bucket array will be always power of two. +//!This allows using masks instead of the default modulo operation to determine +//!the bucket number from the hash value, leading to better performance. +//!In debug mode, if power of two buckets mode is activated, the bucket length +//!will be checked to through assertions to assure the bucket length is power of two. +template +struct power_2_buckets +{ +/// @cond + template + struct pack : Base + { + static const bool power_2_buckets = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies if the container will cache a pointer to the first +//!non-empty bucket so that begin() is always constant-time. +//!This is specially helpful when we can have containers with a few elements +//!but with big bucket arrays (that is, hashtables with low load factors). +template +struct cache_begin +{ +/// @cond + template + struct pack : Base + { + static const bool cache_begin = Enabled; + }; +/// @endcond +}; + + +//!This option setter specifies if the container will compare the hash value +//!before comparing objects. This option can't be specified if store_hash<> +//!is not true. +//!This is specially helpful when we have containers with a high load factor. +//!and the comparison function is much more expensive that comparing already +//!stored hash values. +template +struct compare_hash +{ +/// @cond + template + struct pack : Base + { + static const bool compare_hash = Enabled; + }; +/// @endcond +}; + +//!This option setter specifies if the hash container will use incremental +//!hashing. With incremental hashing the cost of hash table expansion is spread +//!out across each hash table insertion operation, as opposed to be incurred all at once. +//!Therefore linear hashing is well suited for interactive applications or real-time +//!appplications where the worst-case insertion time of non-incremental hash containers +//!(rehashing the whole bucket array) is not admisible. +template +struct incremental +{ + /// @cond + template + struct pack : Base + { + static const bool incremental = Enabled; + }; + /// @endcond +}; + +/// @cond + +//To-do: pass to variadic templates +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + +template +struct do_pack +{ + //Use "pack" member template to pack options + typedef typename Next::template pack type; +}; + +template +struct do_pack +{ + //Avoid packing "none" to shorten template names + typedef Prev type; +}; + +template + < class DefaultOptions + , class O1 = none + , class O2 = none + , class O3 = none + , class O4 = none + , class O5 = none + , class O6 = none + , class O7 = none + , class O8 = none + , class O9 = none + , class O10 = none + , class O11 = none + > +struct pack_options +{ + // join options + typedef + typename do_pack + < typename do_pack + < typename do_pack + < typename do_pack + < typename do_pack + < typename do_pack + < typename do_pack + < typename do_pack + < typename do_pack + < typename do_pack + < typename do_pack + < DefaultOptions + , O1 + >::type + , O2 + >::type + , O3 + >::type + , O4 + >::type + , O5 + >::type + , O6 + >::type + , O7 + >::type + , O8 + >::type + , O9 + >::type + , O10 + >::type + , O11 + >::type + type; +}; +#else + +//index_tuple +template +struct index_tuple{}; + +//build_number_seq +template > +struct build_number_seq; + +template +struct build_number_seq > + : build_number_seq > +{}; + +template +struct build_number_seq<0, index_tuple > +{ typedef index_tuple type; }; + +template +struct typelist +{}; + +//invert_typelist +template +struct invert_typelist; + +template +struct typelist_element; + +template +struct typelist_element > +{ + typedef typename typelist_element >::type type; +}; + +template +struct typelist_element<0, typelist > +{ + typedef Head type; +}; + +template +typelist >::type...> + inverted_typelist(index_tuple, typelist) +{ + return typelist >::type...>(); +} + +//sizeof_typelist +template +struct sizeof_typelist; + +template +struct sizeof_typelist< typelist > +{ + static const std::size_t value = sizeof...(Types); +}; + +//invert_typelist_impl +template +struct invert_typelist_impl; + + +template +struct invert_typelist_impl< Typelist, index_tuple > +{ + static const std::size_t last_idx = sizeof_typelist::value - 1; + typedef typelist + ::type...> type; +}; + +template +struct invert_typelist_impl< Typelist, index_tuple > +{ + typedef Typelist type; +}; + +template +struct invert_typelist_impl< Typelist, index_tuple<> > +{ + typedef Typelist type; +}; + +//invert_typelist +template +struct invert_typelist; + +template +struct invert_typelist< typelist > +{ + typedef typelist typelist_t; + typedef typename build_number_seq::type indexes_t; + typedef typename invert_typelist_impl::type type; +}; + +//Do pack +template +struct do_pack; + +template<> +struct do_pack >; + +template +struct do_pack > +{ + typedef Prev type; +}; + +template +struct do_pack > +{ + typedef typename Prev::template pack type; +}; + +template +struct do_pack > +{ + typedef typename Prev::template pack + >::type> type; +}; + + +template +struct pack_options +{ + typedef typelist typelist_t; + typedef typename invert_typelist::type inverted_typelist; + typedef typename do_pack::type type; +}; + +#endif + +struct hook_defaults + : public pack_options + < none + , void_pointer + , link_mode + , tag + , optimize_size + , store_hash + , linear + , optimize_multikey + >::type +{}; + +/// @endcond + +} //namespace intrusive { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_INTRUSIVE_OPTIONS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/parent_from_member.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/parent_from_member.hpp new file mode 100644 index 0000000000..882c073531 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/parent_from_member.hpp @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2010-2010 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_GET_PARENT_FROM_MEMBER_HPP +#define BOOST_INTRUSIVE_GET_PARENT_FROM_MEMBER_HPP + +#include +#include + +namespace boost { +namespace intrusive { + +//! Given a pointer to a member and its corresponding pointer to data member, +//! this function returns the pointer of the parent containing that member. +//! Note: this function does not work with pointer to members that rely on +//! virtual inheritance. +template +inline Parent *get_parent_from_member(Member *member, const Member Parent::* ptr_to_member) +{ return ::boost::intrusive::detail::parent_from_member(member, ptr_to_member); } + +//! Given a const pointer to a member and its corresponding const pointer to data member, +//! this function returns the const pointer of the parent containing that member. +//! Note: this function does not work with pointer to members that rely on +//! virtual inheritance. +template +inline const Parent *get_parent_from_member(const Member *member, const Member Parent::* ptr_to_member) +{ return ::boost::intrusive::detail::parent_from_member(member, ptr_to_member); } + +} //namespace intrusive { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_INTRUSIVE_GET_PARENT_FROM_MEMBER_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/pointer_plus_bits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/pointer_plus_bits.hpp new file mode 100644 index 0000000000..10b2fe0eb9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/pointer_plus_bits.hpp @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_POINTER_PLUS_BITS_HPP +#define BOOST_INTRUSIVE_POINTER_PLUS_BITS_HPP + +#include //ls_zeros +#include //BOOST_INTRUSIVE_INVARIANT_ASSERT + +namespace boost { +namespace intrusive { + +//!This trait class is used to know if a pointer +//!can embed extra bits of information if +//!it's going to be used to point to objects +//!with an alignment of "Alignment" bytes. +template +struct max_pointer_plus_bits +{ + static const std::size_t value = 0; +}; + +//!This is a specialization for raw pointers. +//!Raw pointers can embed extra bits in the lower bits +//!if the alignment is multiple of 2pow(NumBits). +template +struct max_pointer_plus_bits +{ + static const std::size_t value = detail::ls_zeros::value; +}; + +//!This is class that is supposed to have static methods +//!to embed extra bits of information in a pointer. +//!This is a declaration and there is no default implementation, +//!because operations to embed the bits change with every pointer type. +//! +//!An implementation that detects that a pointer type whose +//!has_pointer_plus_bits<>::value is non-zero can make use of these +//!operations to embed the bits in the pointer. +template +struct pointer_plus_bits; + +//!This is the specialization to embed extra bits of information +//!in a raw pointer. The extra bits are stored in the lower bits of the pointer. +template +struct pointer_plus_bits +{ + static const std::size_t Mask = ((std::size_t(1u) << NumBits) - 1); + typedef T* pointer; + + static pointer get_pointer(pointer n) + { return pointer(std::size_t(n) & ~Mask); } + + static void set_pointer(pointer &n, pointer p) + { + BOOST_INTRUSIVE_INVARIANT_ASSERT(0 == (std::size_t(p) & Mask)); + n = pointer(std::size_t(p) | (std::size_t(n) & Mask)); + } + + static std::size_t get_bits(pointer n) + { return (std::size_t(n) & Mask); } + + static void set_bits(pointer &n, std::size_t c) + { + BOOST_INTRUSIVE_INVARIANT_ASSERT(c <= Mask); + n = pointer(std::size_t(get_pointer(n)) | c); + } +}; + +} //namespace intrusive +} //namespace boost + +#endif //BOOST_INTRUSIVE_POINTER_PLUS_BITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/priority_compare.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/priority_compare.hpp new file mode 100644 index 0000000000..abde27ac0d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/priority_compare.hpp @@ -0,0 +1,39 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP +#define BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP + +#include +#include + +#include + +namespace boost { +namespace intrusive { + +template +struct priority_compare + : public std::binary_function +{ + bool operator()(const T &val, const T &val2) const + { + return priority_order(val, val2); + } +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/rbtree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/rbtree.hpp new file mode 100644 index 0000000000..c8e8ab5001 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/rbtree.hpp @@ -0,0 +1,1656 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_RBTREE_HPP +#define BOOST_INTRUSIVE_RBTREE_HPP + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//iG pending #include + +namespace boost { +namespace intrusive { + +/// @cond + +template +struct setopt +{ + typedef ValueTraits value_traits; + typedef Compare compare; + typedef SizeType size_type; + static const bool constant_time_size = ConstantTimeSize; +}; + +template +struct set_defaults + : pack_options + < none + , base_hook + , constant_time_size + , size_type + , compare > + >::type +{}; + +/// @endcond + +//! The class template rbtree is an intrusive red-black tree container, that +//! is used to construct intrusive set and multiset containers. The no-throw +//! guarantee holds only, if the value_compare object +//! doesn't throw. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class rbtree_impl + : private detail::clear_on_destructor_base > +{ + template friend class detail::clear_on_destructor_base; + public: + typedef typename Config::value_traits value_traits; + /// @cond + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + /// @endcond + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::const_pointer const_pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef value_type key_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename Config::size_type size_type; + typedef typename Config::compare value_compare; + typedef value_compare key_compare; + typedef tree_iterator iterator; + typedef tree_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + typedef rbtree_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + /// @cond + private: + typedef detail::size_holder size_traits; + + //noncopyable + rbtree_impl (const rbtree_impl&); + rbtree_impl operator =(const rbtree_impl&); + + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + //Constant-time size is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(constant_time_size && ((int)real_value_traits::link_mode == (int)auto_unlink))); + + struct header_plus_size : public size_traits + { node header_; }; + + struct node_plus_pred_t : public detail::ebo_functor_holder + { + node_plus_pred_t(const value_compare &comp) + : detail::ebo_functor_holder(comp) + {} + header_plus_size header_plus_size_; + }; + + struct data_t : public rbtree_impl::value_traits + { + typedef typename rbtree_impl::value_traits value_traits; + data_t(const value_compare & comp, const value_traits &val_traits) + : value_traits(val_traits), node_plus_pred_(comp) + {} + node_plus_pred_t node_plus_pred_; + } data_; + + const value_compare &priv_comp() const + { return data_.node_plus_pred_.get(); } + + value_compare &priv_comp() + { return data_.node_plus_pred_.get(); } + + const node &priv_header() const + { return data_.node_plus_pred_.header_plus_size_.header_; } + + node &priv_header() + { return data_.node_plus_pred_.header_plus_size_.header_; } + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(detail::boost_intrusive_get_pointer(ptr))); +//iG pending return node_ptr(boost::const_pointer_cast(ptr)); + } + + size_traits &priv_size_traits() + { return data_.node_plus_pred_.header_plus_size_; } + + const size_traits &priv_size_traits() const + { return data_.node_plus_pred_.header_plus_size_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_.get_value_traits(*this); } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_; } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_.get_value_traits(*this); } + + protected: + value_compare &prot_comp() + { return priv_comp(); } + + const node &prot_header_node() const + { return priv_header(); } + + node &prot_header_node() + { return priv_header(); } + + void prot_set_size(size_type s) + { this->priv_size_traits().set_size(s); } + + /// @endcond + + public: + + const real_value_traits &get_real_value_traits() const + { return this->get_real_value_traits(detail::bool_()); } + + real_value_traits &get_real_value_traits() + { return this->get_real_value_traits(detail::bool_()); } + + typedef typename node_algorithms::insert_commit_data insert_commit_data; + + //! Effects: Constructs an empty tree. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructorof the value_compare object throws. Basic guarantee. + rbtree_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + } + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty tree and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is the distance between first and last. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. Basic guarantee. + template + rbtree_impl( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + if(unique) + this->insert_unique(b, e); + else + this->insert_equal(b, e); + } + + //! Effects: Detaches all elements from this. The objects in the set + //! are not deleted (i.e. no destructors are called), but the nodes according to + //! the value_traits template parameter are reinitialized and thus can be reused. + //! + //! Complexity: Linear to elements contained in *this. + //! + //! Throws: Nothing. + ~rbtree_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return iterator (node_traits::get_left(node_ptr(&priv_header())), this); } + + //! Effects: Returns a const_iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return cbegin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return const_iterator (node_traits::get_left(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns an iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return iterator (node_ptr(&priv_header()), this); } + + //! Effects: Returns a const_iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return cend(); } + + //! Effects: Returns a const_iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return const_iterator (uncast(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return reverse_iterator(end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return const_reverse_iterator(begin()); } + + //! Precondition: end_iterator must be a valid end iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the rbtree associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static rbtree_impl &container_from_end_iterator(iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the rbtree associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const rbtree_impl &container_from_end_iterator(const_iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: it must be a valid iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the tree associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static rbtree_impl &container_from_iterator(iterator it) + { return priv_container_from_iterator(it); } + + //! Precondition: it must be a valid end const_iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the tree associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const rbtree_impl &container_from_iterator(const_iterator it) + { return priv_container_from_iterator(it); } + + //! Effects: Returns the value_compare object used by the tree. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return priv_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return node_algorithms::unique(const_node_ptr(&priv_header())); } + + //! Effects: Returns the number of elements stored in the tree. + //! + //! Complexity: Linear to elements contained in *this + //! if constant-time size option is disabled. Constant time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { + if(constant_time_size) + return this->priv_size_traits().get_size(); + else{ + return (size_type)node_algorithms::size(const_node_ptr(&priv_header())); + } + } + + //! Effects: Swaps the contents of two rbtrees. + //! + //! Complexity: Constant. + //! + //! Throws: If the comparison functor's swap call throws. + void swap(rbtree_impl& other) + { + //This can throw + using std::swap; + swap(priv_comp(), priv_comp()); + //These can't throw + node_algorithms::swap_tree(node_ptr(&priv_header()), node_ptr(&other.priv_header())); + if(constant_time_size){ + size_type backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(other.priv_size_traits().get_size()); + other.priv_size_traits().set_size(backup); + } + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the tree before the upper bound. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_equal_upper_bound + (node_ptr(&priv_header()), to_insert, key_node_comp), this); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator. + //! + //! Effects: Inserts x into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case) + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(const_iterator hint, reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_equal + (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a each element of a range into the tree + //! before the upper bound of the key of each element. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_equal(Iterator b, Iterator e) + { + iterator iend(this->end()); + for (; b != e; ++b) + this->insert_equal(iend, *b); + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the tree if the value + //! is not already present. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert_unique(reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(value, priv_comp(), commit_data); + if(!ret.second) + return ret; + return std::pair (insert_unique_commit(value, commit_data), true); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator + //! + //! Effects: Tries to insert x into the tree, using "hint" as a hint + //! to where it will be inserted. + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time (two comparisons in the worst case) + //! if t is inserted immediately before hint. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_unique(const_iterator hint, reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(hint, value, priv_comp(), commit_data); + if(!ret.second) + return ret.first; + return insert_unique_commit(value, commit_data); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Tries to insert each element of a range into the tree. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_unique(Iterator b, Iterator e) + { + if(this->empty()){ + iterator iend(this->end()); + for (; b != e; ++b) + this->insert_unique(iend, *b); + } + else{ + for (; b != e; ++b) + this->insert_unique(*b); + } + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), key, comp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + (const_iterator hint, const KeyType &key + ,KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), hint.pointed_node(), key, comp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the container between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the avl_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + node_algorithms::insert_unique_commit + (node_ptr(&priv_header()), to_insert, commit_data); + return iterator(to_insert, this); + } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" tree ordering invariant will be broken. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_before + (node_ptr(&priv_header()), pos.pointed_node(), to_insert), this); + } + + //! Requires: value must be an lvalue, and it must be no less + //! than the greatest inserted key + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + node_algorithms::push_back(node_ptr(&priv_header()), to_insert); + } + + //! Requires: value must be an lvalue, and it must be no greater + //! than the minimum inserted key + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than the minimum inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + node_algorithms::push_front(node_ptr(&priv_header()), to_insert); + } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { + const_iterator ret(i); + ++ret; + node_ptr to_erase(i.pointed_node()); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase)); + node_algorithms::erase(&priv_header(), to_erase); + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + return ret.unconst(); + } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { size_type n; return private_erase(b, e, n); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return this->erase(value, priv_comp()); } + + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { + node_ptr to_erase(i.pointed_node()); + iterator ret(this->erase(i)); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + return ret; + } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { + std::pair p = this->equal_range(value); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { size_type n; return private_erase(b, e, n, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { + if(safemode_or_autounlink){ + this->clear_and_dispose(detail::null_disposer()); + } + else{ + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(0); + } + } + + //! Effects: Erases all of the elements calling disposer(p) for + //! each node to be erased. + //! Complexity: Average complexity for is at most O(log(size() + N)), + //! where N is the number of elements in the container. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. Calls N times to disposer functor. + template + void clear_and_dispose(Disposer disposer) + { + node_algorithms::clear_and_dispose(node_ptr(&priv_header()) + , detail::node_disposer(disposer, this)); + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(0); + } + + //! Effects: Returns the number of contained elements with the given value + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given value. + //! + //! Throws: Nothing. + size_type count(const_reference value) const + { return this->count(value, priv_comp()); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: Nothing. + template + size_type count(const KeyType &key, KeyValueCompare comp) const + { + std::pair ret = this->equal_range(key, comp); + return std::distance(ret.first, ret.second); + } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator lower_bound(const_reference value) + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator lower_bound(const_reference value) const + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator lower_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator lower_bound(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator upper_bound(const_reference value) + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator upper_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator upper_bound(const_reference value) const + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator upper_bound(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator find(const_reference value) + { return this->find(value, priv_comp()); } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator find(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator find(const_reference value) const + { return this->find(value, priv_comp()); } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator find(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair equal_range(const_reference value) + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair equal_range(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(iterator(ret.first, this), iterator(ret.second, this)); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair + equal_range(const_reference value) const + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair + equal_range(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(const_iterator(ret.first, this), const_iterator(ret.second, this)); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const rbtree_impl &src, Cloner cloner, Disposer disposer) + { + this->clear_and_dispose(disposer); + if(!src.empty()){ + detail::exception_disposer + rollback(*this, disposer); + node_algorithms::clone + (const_node_ptr(&src.priv_header()) + ,node_ptr(&this->priv_header()) + ,detail::node_cloner(cloner, this) + ,detail::node_disposer(disposer, this)); + this->priv_size_traits().set_size(src.priv_size_traits().get_size()); + this->priv_comp() = src.priv_comp(); + rollback.release(); + } + } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { + node_ptr to_be_disposed(node_algorithms::unlink_leftmost_without_rebalance + (node_ptr(&priv_header()))); + if(!to_be_disposed) + return 0; + this->priv_size_traits().decrement(); + if(safemode_or_autounlink)//If this is commented does not work with normal_link + node_algorithms::init(to_be_disposed); + return get_real_value_traits().to_value_ptr(to_be_disposed); + } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { + node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this) + , node_ptr(&priv_header()) + , get_real_value_traits().to_node_ptr(with_this)); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return iterator (value_traits::to_node_ptr(value), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return const_iterator (value_traits::to_node_ptr(const_cast (value)), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return iterator (value_traits::to_node_ptr(value), this); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return const_iterator (value_traits::to_node_ptr(const_cast (value)), this); } + + //! Requires: value shall not be in a tree. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { node_algorithms::init(value_traits::to_node_ptr(value)); } + + //! Effects: removes "value" from the container. + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic time. + //! + //! Note: This static function is only usable with non-constant + //! time size containers that have stateless comparison functors. + //! + //! If the user calls + //! this function with a constant time size container or stateful comparison + //! functor a compilation error will be issued. + static void remove_node(reference value) + { + BOOST_STATIC_ASSERT((!constant_time_size)); + node_ptr to_remove(value_traits::to_node_ptr(value)); + node_algorithms::unlink(to_remove); + if(safemode_or_autounlink) + node_algorithms::init(to_remove); + } + + /// @cond + private: + template + iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer) + { + for(n = 0; b != e; ++n) + this->erase_and_dispose(b++, disposer); + return b.unconst(); + } + + iterator private_erase(const_iterator b, const_iterator e, size_type &n) + { + for(n = 0; b != e; ++n) + this->erase(b++); + return b.unconst(); + } + /// @endcond + + private: + static rbtree_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) + { + header_plus_size *r = detail::parent_from_member + ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), &header_plus_size::header_); + node_plus_pred_t *n = detail::parent_from_member + (r, &node_plus_pred_t::header_plus_size_); + data_t *d = detail::parent_from_member(n, &data_t::node_plus_pred_); + rbtree_impl *rb = detail::parent_from_member(d, &rbtree_impl::data_); + return *rb; + } + + static rbtree_impl &priv_container_from_iterator(const const_iterator &it) + { return priv_container_from_end_iterator(it.end_iterator_from_it()); } +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator< +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const rbtree_impl &x, const rbtree_impl &y) +#else +(const rbtree_impl &x, const rbtree_impl &y) +#endif +{ return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +bool operator== +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const rbtree_impl &x, const rbtree_impl &y) +#else +(const rbtree_impl &x, const rbtree_impl &y) +#endif +{ + typedef rbtree_impl tree_type; + typedef typename tree_type::const_iterator const_iterator; + + if(tree_type::constant_time_size && x.size() != y.size()){ + return false; + } + const_iterator end1 = x.end(); + const_iterator i1 = x.begin(); + const_iterator i2 = y.begin(); + if(tree_type::constant_time_size){ + while (i1 != end1 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1; + } + else{ + const_iterator end2 = y.end(); + while (i1 != end1 && i2 != end2 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1 && i2 == end2; + } +} + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const rbtree_impl &x, const rbtree_impl &y) +#else +(const rbtree_impl &x, const rbtree_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const rbtree_impl &x, const rbtree_impl &y) +#else +(const rbtree_impl &x, const rbtree_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const rbtree_impl &x, const rbtree_impl &y) +#else +(const rbtree_impl &x, const rbtree_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const rbtree_impl &x, const rbtree_impl &y) +#else +(const rbtree_impl &x, const rbtree_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(rbtree_impl &x, rbtree_impl &y) +#else +(rbtree_impl &x, rbtree_impl &y) +#endif +{ x.swap(y); } + +/// @cond +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_rbtree_opt +{ + typedef typename pack_options + < set_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + typedef typename detail::get_value_traits + ::type value_traits; + + typedef setopt + < value_traits + , typename packed_options::compare + , typename packed_options::size_type + , packed_options::constant_time_size + > type; +}; +/// @endcond + +//! Helper metafunction to define a \c rbtree that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_rbtree +{ + /// @cond + typedef rbtree_impl + < typename make_rbtree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class rbtree + : public make_rbtree::type +{ + typedef typename make_rbtree + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::real_value_traits real_value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + rbtree( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + rbtree( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(unique, b, e, cmp, v_traits) + {} + + static rbtree &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const rbtree &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static rbtree &container_from_it(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const rbtree &container_from_it(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_RBTREE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/rbtree_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/rbtree_algorithms.hpp new file mode 100644 index 0000000000..5458e4fef5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/rbtree_algorithms.hpp @@ -0,0 +1,909 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +// The internal implementation of red-black trees is based on that of SGI STL +// stl_tree.h file: +// +// Copyright (c) 1996,1997 +// Silicon Graphics Computer Systems, Inc. +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Silicon Graphics makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// +// +// Copyright (c) 1994 +// Hewlett-Packard Company +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Hewlett-Packard Company makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// +// The tree destruction algorithm is based on Julienne Walker and The EC Team code: +// +// This code is in the public domain. Anyone may use it or change it in any way that +// they see fit. The author assumes no responsibility for damages incurred through +// use of the original code or any variations thereof. +// +// It is requested, but not required, that due credit is given to the original author +// and anyone who has modified the code through a header comment, such as this one. + +#ifndef BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP + +#include + +#include +#include + +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! rbtree_algorithms provides basic algorithms to manipulate +//! nodes forming a red-black tree. The insertion and deletion algorithms are +//! based on those in Cormen, Leiserson, and Rivest, Introduction to Algorithms +//! (MIT Press, 1990), except that +//! +//! (1) the header node is maintained with links not only to the root +//! but also to the leftmost node of the tree, to enable constant time +//! begin(), and to the rightmost node of the tree, to enable linear time +//! performance when used with the generic set algorithms (set_union, +//! etc.); +//! +//! (2) when a node being deleted has two children its successor node is +//! relinked into its place, rather than copied, so that the only +//! pointers invalidated are those referring to the deleted node. +//! +//! rbtree_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the circular list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! color: The type that can store the color of a node +//! +//! Static functions: +//! +//! static node_ptr get_parent(const_node_ptr n); +//! +//! static void set_parent(node_ptr n, node_ptr parent); +//! +//! static node_ptr get_left(const_node_ptr n); +//! +//! static void set_left(node_ptr n, node_ptr left); +//! +//! static node_ptr get_right(const_node_ptr n); +//! +//! static void set_right(node_ptr n, node_ptr right); +//! +//! static color get_color(const_node_ptr n); +//! +//! static void set_color(node_ptr n, color c); +//! +//! static color black(); +//! +//! static color red(); +template +class rbtree_algorithms +{ + public: + typedef NodeTraits node_traits; + typedef typename NodeTraits::node node; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + typedef typename NodeTraits::color color; + + /// @cond + private: + + typedef detail::tree_algorithms tree_algorithms; + + template + struct rbtree_node_cloner + : private detail::ebo_functor_holder + { + typedef detail::ebo_functor_holder base_t; + + rbtree_node_cloner(F f) + : base_t(f) + {} + + node_ptr operator()(node_ptr p) + { + node_ptr n = base_t::get()(p); + NodeTraits::set_color(n, NodeTraits::get_color(p)); + return n; + } + }; + + struct rbtree_erase_fixup + { + void operator()(node_ptr to_erase, node_ptr successor) + { + //Swap color of y and z + color tmp(NodeTraits::get_color(successor)); + NodeTraits::set_color(successor, NodeTraits::get_color(to_erase)); + NodeTraits::set_color(to_erase, tmp); + } + }; + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(::boost::intrusive::detail::boost_intrusive_get_pointer(ptr))); + } + /// @endcond + + public: + static node_ptr begin_node(const_node_ptr header) + { return tree_algorithms::begin_node(header); } + + static node_ptr end_node(const_node_ptr header) + { return tree_algorithms::end_node(header); } + + //! This type is the information that will be + //! filled by insert_unique_check + typedef typename tree_algorithms::insert_commit_data insert_commit_data; + + //! Requires: header1 and header2 must be the header nodes + //! of two trees. + //! + //! Effects: Swaps two trees. After the function header1 will contain + //! links to the second tree and header2 will have links to the first tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static void swap_tree(node_ptr header1, node_ptr header2) + { return tree_algorithms::swap_tree(header1, header2); } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr node2) + { + if(node1 == node2) + return; + + node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2)); + swap_nodes(node1, header1, node2, header2); + } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees with header header1 and header2. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) + { + if(node1 == node2) return; + + tree_algorithms::swap_nodes(node1, header1, node2, header2); + //Swap color + color c = NodeTraits::get_color(node1); + NodeTraits::set_color(node1, NodeTraits::get_color(node2)); + NodeTraits::set_color(node2, c); + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing and comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) + { + if(node_to_be_replaced == new_node) + return; + replace_node(node_to_be_replaced, tree_algorithms::get_header(node_to_be_replaced), new_node); + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! with header "header" and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) + { + tree_algorithms::replace_node(node_to_be_replaced, header, new_node); + NodeTraits::set_color(new_node, NodeTraits::get_color(node_to_be_replaced)); + } + + //! Requires: node is a tree node but not the header. + //! + //! Effects: Unlinks the node and rebalances the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + static void unlink(node_ptr node) + { + node_ptr x = NodeTraits::get_parent(node); + if(x){ + while(!is_header(x)) + x = NodeTraits::get_parent(x); + erase(x, node); + } + } + + //! Requires: header is the header of a tree. + //! + //! Effects: Unlinks the leftmost node from the tree, and + //! updates the header link to the new leftmost node. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + static node_ptr unlink_leftmost_without_rebalance(node_ptr header) + { return tree_algorithms::unlink_leftmost_without_rebalance(header); } + + //! Requires: node is a node of the tree or an node initialized + //! by init(...). + //! + //! Effects: Returns true if the node is initialized by init(). + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + static bool unique(const_node_ptr node) + { return tree_algorithms::unique(node); } + + //! Requires: node is a node of the tree but it's not the header. + //! + //! Effects: Returns the number of nodes of the subtree. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr node) + { return tree_algorithms::count(node); } + + //! Requires: header is the header node of the tree. + //! + //! Effects: Returns the number of nodes above the header. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t size(const_node_ptr header) + { return tree_algorithms::size(header); } + + //! Requires: p is a node from the tree except the header. + //! + //! Effects: Returns the next node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr next_node(node_ptr p) + { return tree_algorithms::next_node(p); } + + //! Requires: p is a node from the tree except the leftmost node. + //! + //! Effects: Returns the previous node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr prev_node(node_ptr p) + { return tree_algorithms::prev_node(p); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: After the function unique(node) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init(node_ptr node) + { tree_algorithms::init(node); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: Initializes the header to represent an empty tree. + //! unique(header) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init_header(node_ptr header) + { + tree_algorithms::init_header(header); + NodeTraits::set_color(header, NodeTraits::red()); + } + + //! Requires: header must be the header of a tree, z a node + //! of that tree and z != header. + //! + //! Effects: Erases node "z" from the tree with header "header". + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + static node_ptr erase(node_ptr header, node_ptr z) + { + typename tree_algorithms::data_for_rebalance info; + tree_algorithms::erase(header, z, rbtree_erase_fixup(), info); + node_ptr x = info.x; + node_ptr x_parent = info.x_parent; + + //Rebalance rbtree + if(NodeTraits::get_color(z) != NodeTraits::red()){ + rebalance_after_erasure(header, x, x_parent); + } + return z; + } + + //! Requires: "cloner" must be a function + //! object taking a node_ptr and returning a new cloned node of it. "disposer" must + //! take a node_ptr and shouldn't throw. + //! + //! Effects: First empties target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Then, duplicates the entire tree pointed by "source_header" cloning each + //! source node with node_ptr Cloner::operator()(node_ptr) to obtain + //! the nodes of the target tree. If "cloner" throws, the cloned target nodes + //! are disposed using void disposer(node_ptr). + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clone + (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer) + { + rbtree_node_cloner new_cloner(cloner); + tree_algorithms::clone(source_header, target_header, new_cloner, disposer); + } + + //! Requires: "disposer" must be an object function + //! taking a node_ptr parameter and shouldn't throw. + //! + //! Effects: Empties the target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clear_and_dispose(node_ptr header, Disposer disposer) + { tree_algorithms::clear_and_dispose(header, disposer); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is + //! not less than "key" according to "comp" or "header" if that element does + //! not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr lower_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::lower_bound(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is greater + //! than "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr upper_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::upper_bound(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the element that is equivalent to + //! "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr find + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::find(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an a pair of node_ptr delimiting a range containing + //! all elements that are equivalent to "key" according to "comp" or an + //! empty range that indicates the position where those elements would be + //! if they there are no equivalent elements. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static std::pair equal_range + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::equal_range(header, key, comp); } + + //! Requires: "h" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the upper bound + //! according to "comp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_upper_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp) + { + tree_algorithms::insert_equal_upper_bound(h, new_node, comp); + rebalance_after_insertion(h, new_node); + return new_node; + } + + //! Requires: "h" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the lower bound + //! according to "comp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_lower_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp) + { + tree_algorithms::insert_equal_lower_bound(h, new_node, comp); + rebalance_after_insertion(h, new_node); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from + //! the "header"'s tree. + //! + //! Effects: Inserts new_node into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case). + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if new_node is inserted immediately before "hint". + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal + (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp) + { + tree_algorithms::insert_equal(header, hint, new_node, comp); + rebalance_after_insertion(header, new_node); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! "pos" must be a valid iterator or header (end) node. + //! "pos" must be an iterator pointing to the successor to "new_node" + //! once inserted according to the order of already inserted nodes. This function does not + //! check "pos" and this precondition must be guaranteed by the caller. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "pos" is not the successor of the newly inserted "new_node" + //! tree invariants might be broken. + static node_ptr insert_before + (node_ptr header, node_ptr pos, node_ptr new_node) + { + tree_algorithms::insert_before(header, pos, new_node); + rebalance_after_insertion(header, new_node); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering no less than the + //! greatest inserted key. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "new_node" is less than the greatest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + static void push_back(node_ptr header, node_ptr new_node) + { + tree_algorithms::push_back(header, new_node); + rebalance_after_insertion(header, new_node); + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering, no greater than the + //! lowest inserted key. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "new_node" is greater than the lowest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + static void push_front(node_ptr header, node_ptr new_node) + { + tree_algorithms::push_front(header, new_node); + rebalance_after_insertion(header, new_node); + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data) + { return tree_algorithms::insert_unique_check(header, key, comp, commit_data); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! "hint" is node from the "header"'s tree. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" using "hint" as a hint to where it should be + //! inserted and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! If "hint" is the upper_bound the function has constant time + //! complexity (two comparisons in the worst case). + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic, but it is + //! amortized constant time if new_node should be inserted immediately before "hint". + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, node_ptr hint, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data) + { return tree_algorithms::insert_unique_check(header, hint, key, comp, commit_data); } + + //! Requires: "header" must be the header node of a tree. + //! "commit_data" must have been obtained from a previous call to + //! "insert_unique_check". No objects should have been inserted or erased + //! from the set between the "insert_unique_check" that filled "commit_data" + //! and the call to "insert_commit". + //! + //! + //! Effects: Inserts new_node in the set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_unique_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + static void insert_unique_commit + (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data) + { + tree_algorithms::insert_unique_commit(header, new_value, commit_data); + rebalance_after_insertion(header, new_value); + } + + //! Requires: "n" must be a node inserted in a tree. + //! + //! Effects: Returns a pointer to the header node of the tree. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + static node_ptr get_header(node_ptr n) + { return tree_algorithms::get_header(n); } + + /// @cond + private: + + //! Requires: p is a node of a tree. + //! + //! Effects: Returns true if p is the header of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static bool is_header(const_node_ptr p) + { + return NodeTraits::get_color(p) == NodeTraits::red() && + tree_algorithms::is_header(p); + //return NodeTraits::get_color(p) == NodeTraits::red() && + // NodeTraits::get_parent(NodeTraits::get_parent(p)) == p; + } + + static void rebalance_after_erasure(node_ptr header, node_ptr x, node_ptr x_parent) + { + while(x != NodeTraits::get_parent(header) && (x == 0 || NodeTraits::get_color(x) == NodeTraits::black())){ + if(x == NodeTraits::get_left(x_parent)){ + node_ptr w = NodeTraits::get_right(x_parent); + if(NodeTraits::get_color(w) == NodeTraits::red()){ + NodeTraits::set_color(w, NodeTraits::black()); + NodeTraits::set_color(x_parent, NodeTraits::red()); + tree_algorithms::rotate_left(x_parent, header); + w = NodeTraits::get_right(x_parent); + } + if((NodeTraits::get_left(w) == 0 || NodeTraits::get_color(NodeTraits::get_left(w)) == NodeTraits::black()) && + (NodeTraits::get_right(w) == 0 || NodeTraits::get_color(NodeTraits::get_right(w)) == NodeTraits::black())){ + NodeTraits::set_color(w, NodeTraits::red()); + x = x_parent; + x_parent = NodeTraits::get_parent(x_parent); + } + else { + if(NodeTraits::get_right(w) == 0 || NodeTraits::get_color(NodeTraits::get_right(w)) == NodeTraits::black()){ + NodeTraits::set_color(NodeTraits::get_left(w), NodeTraits::black()); + NodeTraits::set_color(w, NodeTraits::red()); + tree_algorithms::rotate_right(w, header); + w = NodeTraits::get_right(x_parent); + } + NodeTraits::set_color(w, NodeTraits::get_color(x_parent)); + NodeTraits::set_color(x_parent, NodeTraits::black()); + if(NodeTraits::get_right(w)) + NodeTraits::set_color(NodeTraits::get_right(w), NodeTraits::black()); + tree_algorithms::rotate_left(x_parent, header); + break; + } + } + else { + // same as above, with right_ <-> left_. + node_ptr w = NodeTraits::get_left(x_parent); + if(NodeTraits::get_color(w) == NodeTraits::red()){ + NodeTraits::set_color(w, NodeTraits::black()); + NodeTraits::set_color(x_parent, NodeTraits::red()); + tree_algorithms::rotate_right(x_parent, header); + w = NodeTraits::get_left(x_parent); + } + if((NodeTraits::get_right(w) == 0 || NodeTraits::get_color(NodeTraits::get_right(w)) == NodeTraits::black()) && + (NodeTraits::get_left(w) == 0 || NodeTraits::get_color(NodeTraits::get_left(w)) == NodeTraits::black())){ + NodeTraits::set_color(w, NodeTraits::red()); + x = x_parent; + x_parent = NodeTraits::get_parent(x_parent); + } + else { + if(NodeTraits::get_left(w) == 0 || NodeTraits::get_color(NodeTraits::get_left(w)) == NodeTraits::black()){ + NodeTraits::set_color(NodeTraits::get_right(w), NodeTraits::black()); + NodeTraits::set_color(w, NodeTraits::red()); + tree_algorithms::rotate_left(w, header); + w = NodeTraits::get_left(x_parent); + } + NodeTraits::set_color(w, NodeTraits::get_color(x_parent)); + NodeTraits::set_color(x_parent, NodeTraits::black()); + if(NodeTraits::get_left(w)) + NodeTraits::set_color(NodeTraits::get_left(w), NodeTraits::black()); + tree_algorithms::rotate_right(x_parent, header); + break; + } + } + } + if(x) + NodeTraits::set_color(x, NodeTraits::black()); + } + + + static void rebalance_after_insertion(node_ptr header, node_ptr p) + { + NodeTraits::set_color(p, NodeTraits::red()); + while(p != NodeTraits::get_parent(header) && NodeTraits::get_color(NodeTraits::get_parent(p)) == NodeTraits::red()){ + node_ptr p_parent(NodeTraits::get_parent(p)); + node_ptr p_parent_parent(NodeTraits::get_parent(p_parent)); + if(tree_algorithms::is_left_child(p_parent)){ + node_ptr x = NodeTraits::get_right(p_parent_parent); + if(x && NodeTraits::get_color(x) == NodeTraits::red()){ + NodeTraits::set_color(p_parent, NodeTraits::black()); + NodeTraits::set_color(p_parent_parent, NodeTraits::red()); + NodeTraits::set_color(x, NodeTraits::black()); + p = p_parent_parent; + } + else { + if(!tree_algorithms::is_left_child(p)){ + p = p_parent; + tree_algorithms::rotate_left(p, header); + } + node_ptr new_p_parent(NodeTraits::get_parent(p)); + node_ptr new_p_parent_parent(NodeTraits::get_parent(new_p_parent)); + NodeTraits::set_color(new_p_parent, NodeTraits::black()); + NodeTraits::set_color(new_p_parent_parent, NodeTraits::red()); + tree_algorithms::rotate_right(new_p_parent_parent, header); + } + } + else{ + node_ptr x = NodeTraits::get_left(p_parent_parent); + if(x && NodeTraits::get_color(x) == NodeTraits::red()){ + NodeTraits::set_color(p_parent, NodeTraits::black()); + NodeTraits::set_color(p_parent_parent, NodeTraits::red()); + NodeTraits::set_color(x, NodeTraits::black()); + p = p_parent_parent; + } + else{ + if(tree_algorithms::is_left_child(p)){ + p = p_parent; + tree_algorithms::rotate_right(p, header); + } + node_ptr new_p_parent(NodeTraits::get_parent(p)); + node_ptr new_p_parent_parent(NodeTraits::get_parent(new_p_parent)); + NodeTraits::set_color(new_p_parent, NodeTraits::black()); + NodeTraits::set_color(new_p_parent_parent, NodeTraits::red()); + tree_algorithms::rotate_left(new_p_parent_parent, header); + } + } + } + NodeTraits::set_color(NodeTraits::get_parent(header), NodeTraits::black()); + } + /// @endcond +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/set.hpp new file mode 100644 index 0000000000..c85ab08888 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/set.hpp @@ -0,0 +1,2352 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_SET_HPP +#define BOOST_INTRUSIVE_SET_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! The class template set is an intrusive container, that mimics most of +//! the interface of std::set as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class set_impl +{ + /// @cond + typedef rbtree_impl tree_type; + //! This class is + //! non-copyable + set_impl (const set_impl&); + + //! This class is + //! non-assignable + set_impl &operator =(const set_impl&); + + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + //static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + + /// @cond + private: + tree_type tree_; + + protected: + node &prot_header_node(){ return tree_.prot_header_node(); } + node const &prot_header_node() const{ return tree_.prot_header_node(); } + void prot_set_size(size_type s){ tree_.prot_set_size(s); } + value_compare &prot_comp(){ return tree_.prot_comp(); } + + /// @endcond + + public: + //! Effects: Constructs an empty set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor of the value_compare object throws. + set_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty set and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is std::distance(last, first). + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + set_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(true, b, e, cmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~set_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of set. + //! + //! Effects: Returns a reference to the set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static set_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &set_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of set. + //! + //! Effects: Returns a const reference to the set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const set_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &set_impl::tree_); + } + + //! Precondition: it must be a valid iterator of set. + //! + //! Effects: Returns a reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static set_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &set_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of set. + //! + //! Effects: Returns a const reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const set_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &set_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the set. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the set. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two sets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(set_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const set_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to inserts value into the set. + //! + //! Returns: If the value + //! is not already present inserts it and returns a pair containing the + //! iterator to the new value and true. If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert(reference value) + { return tree_.insert_unique(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to to insert x into the set, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: An iterator that points to the position where the + //! new element was inserted into the set. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_unique(hint, value); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the set, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the set. + template + std::pair insert_check + (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { return tree_.insert_unique_check(key, key_value_comp, commit_data); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the set, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the set. + template + std::pair insert_check + (const_iterator hint, const KeyType &key + ,KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { return tree_.insert_unique_check(hint, key, key_value_comp, commit_data); } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the set between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_commit(reference value, const insert_commit_data &commit_data) + { return tree_.insert_unique_commit(value, commit_data); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the set. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_unique(b, e); } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate. "value" must not be equal to any + //! inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" or "value" is not unique tree ordering and uniqueness + //! invariants will be broken respectively. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { return tree_.insert_before(pos, value); } + + //! Requires: value must be an lvalue, and it must be greater than + //! any inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than or equal to the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { tree_.push_back(value); } + + //! Requires: value must be an lvalue, and it must be less + //! than any inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than or equal to the the mimum inserted key tree ordering or uniqueness + //! invariants will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { tree_.push_front(value); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size()) + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If the comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: If the internal value_compare ordering function throws. + //! + //! Complexity: O(log(size() + this->count(value)). Basic guarantee. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) const + { return tree_.find(value) != end(); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp) != end(); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound(const_reference value) const + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound(const_reference value) const + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find(const_reference value) const + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range(const_reference value) const + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range(key, comp); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a set/multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + /// @cond + friend bool operator==(const set_impl &x, const set_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const set_impl &x, const set_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const set_impl &x, const set_impl &y) +#else +(const set_impl &x, const set_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const set_impl &x, const set_impl &y) +#else +(const set_impl &x, const set_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const set_impl &x, const set_impl &y) +#else +(const set_impl &x, const set_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const set_impl &x, const set_impl &y) +#else +(const set_impl &x, const set_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(set_impl &x, set_impl &y) +#else +(set_impl &x, set_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c set that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_set +{ + /// @cond + typedef set_impl + < typename make_rbtree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class set + : public make_set::type +{ + typedef typename make_set + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + set( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + set( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, v_traits) + {} + + static set &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const set &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static set &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const set &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + +//! The class template multiset is an intrusive container, that mimics most of +//! the interface of std::multiset as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class multiset_impl +{ + /// @cond + typedef rbtree_impl tree_type; + + //Non-copyable and non-assignable + multiset_impl (const multiset_impl&); + multiset_impl &operator =(const multiset_impl&); + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + //static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + + /// @cond + private: + tree_type tree_; + + protected: + node &prot_header_node(){ return tree_.prot_header_node(); } + node const &prot_header_node() const{ return tree_.prot_header_node(); } + void prot_set_size(size_type s){ tree_.prot_set_size(s); } + value_compare &prot_comp(){ return tree_.prot_comp(); } + /// @endcond + + public: + //! Effects: Constructs an empty multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + multiset_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty multiset and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is the distance between first and last + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + multiset_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(false, b, e, cmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~multiset_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static multiset_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &multiset_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const multiset_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &multiset_impl::tree_); + } + + //! Precondition: it must be a valid iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static multiset_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &multiset_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const multiset_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &multiset_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the multiset. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two multisets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(multiset_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const multiset_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(reference value) + { return tree_.insert_equal(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts x into the multiset, using pos as a hint to + //! where it will be inserted. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_equal(hint, value); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_equal(b, e); } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" tree ordering invariant will be broken. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { return tree_.insert_before(pos, value); } + + //! Requires: value must be an lvalue, and it must be no less + //! than the greatest inserted key + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { tree_.push_back(value); } + + //! Requires: value must be an lvalue, and it must be no greater + //! than the minimum inserted key + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than the minimum inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { tree_.push_front(value); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) const + { return tree_.count(value); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) const + { return tree_.count(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound(const_reference value) const + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound(const_reference value) const + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find(const_reference value) const + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range(const_reference value) const + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range(key, comp); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a set/multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + //! Effects: removes "value" from the container. + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic time. + //! + //! Note: This static function is only usable with non-constant + //! time size containers that have stateless comparison functors. + //! + //! If the user calls + //! this function with a constant time size container or stateful comparison + //! functor a compilation error will be issued. + static void remove_node(reference value) + { tree_type::remove_node(value); } + + /// @cond + friend bool operator==(const multiset_impl &x, const multiset_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const multiset_impl &x, const multiset_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const multiset_impl &x, const multiset_impl &y) +#else +(const multiset_impl &x, const multiset_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const multiset_impl &x, const multiset_impl &y) +#else +(const multiset_impl &x, const multiset_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const multiset_impl &x, const multiset_impl &y) +#else +(const multiset_impl &x, const multiset_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const multiset_impl &x, const multiset_impl &y) +#else +(const multiset_impl &x, const multiset_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(multiset_impl &x, multiset_impl &y) +#else +(multiset_impl &x, multiset_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c multiset that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_multiset +{ + /// @cond + typedef multiset_impl + < typename make_rbtree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class multiset + : public make_multiset::type +{ + typedef typename make_multiset::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + multiset( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + multiset( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, v_traits) + {} + + static multiset &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const multiset &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static multiset &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const multiset &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/set_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/set_hook.hpp new file mode 100644 index 0000000000..35746a29a5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/set_hook.hpp @@ -0,0 +1,300 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_SET_HOOK_HPP +#define BOOST_INTRUSIVE_SET_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond +template +struct get_set_node_algo +{ + typedef rbtree_algorithms > type; +}; +/// @endcond + +//! Helper metafunction to define a \c set_base_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_set_base_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_set_node_algo + , typename packed_options::tag + , packed_options::link_mode + , detail::SetBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Derive a class from set_base_hook in order to store objects in +//! in a set/multiset. set_base_hook holds the data necessary to maintain +//! the set/multiset and provides an appropriate value_traits class for set/multiset. +//! +//! The hook admits the following options: \c tag<>, \c void_pointer<>, +//! \c link_mode<> and \c optimize_size<>. +//! +//! \c tag<> defines a tag to identify the node. +//! The same tag value can be used in different classes, but if a class is +//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its +//! unique tag. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c optimize_size<> will tell the hook to optimize the hook for size instead +//! of speed. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class set_base_hook + : public make_set_base_hook< + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + set_base_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + set_base_hook(const set_base_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + set_base_hook& operator=(const set_base_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~set_base_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(set_base_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +//! Helper metafunction to define a \c set_member_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_set_member_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_set_node_algo + , member_tag + , packed_options::link_mode + , detail::NoBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Put a public data member set_member_hook in order to store objects of this class in +//! a set/multiset. set_member_hook holds the data necessary for maintaining the +//! set/multiset and provides an appropriate value_traits class for set/multiset. +//! +//! The hook admits the following options: \c void_pointer<>, +//! \c link_mode<> and \c optimize_size<>. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c optimize_size<> will tell the hook to optimize the hook for size instead +//! of speed. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class set_member_hook + : public make_set_member_hook< + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + set_member_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + set_member_hook(const set_member_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + set_member_hook& operator=(const set_member_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~set_member_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(set_member_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SET_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sg_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sg_set.hpp new file mode 100644 index 0000000000..3a7c77a89e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sg_set.hpp @@ -0,0 +1,2397 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_SG_SET_HPP +#define BOOST_INTRUSIVE_SG_SET_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! The class template sg_set is an intrusive container, that mimics most of +//! the interface of std::set as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class sg_set_impl +{ + /// @cond + typedef sgtree_impl tree_type; + //! This class is + //! non-copyable + sg_set_impl (const sg_set_impl&); + + //! This class is + //! non-assignable + sg_set_impl &operator =(const sg_set_impl&); + + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + /// @cond + private: + tree_type tree_; + /// @endcond + + public: + //! Effects: Constructs an empty sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor of the value_compare object throws. + sg_set_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty sg_set and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is std::distance(last, first). + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + sg_set_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(true, b, e, cmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the sg_set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~sg_set_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of sg_set. + //! + //! Effects: Returns a const reference to the sg_set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static sg_set_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &sg_set_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of sg_set. + //! + //! Effects: Returns a const reference to the sg_set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const sg_set_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &sg_set_impl::tree_); + } + + //! Precondition: it must be a valid iterator of set. + //! + //! Effects: Returns a reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static sg_set_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &sg_set_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of set. + //! + //! Effects: Returns a const reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const sg_set_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &sg_set_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the sg_set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the sg_set. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two sets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(sg_set_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const sg_set_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to inserts value into the sg_set. + //! + //! Returns: If the value + //! is not already present inserts it and returns a pair containing the + //! iterator to the new value and true. If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert(reference value) + { return tree_.insert_unique(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to to insert x into the sg_set, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: An iterator that points to the position where the + //! new element was inserted into the sg_set. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_unique(hint, value); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the sg_set, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the sg_set. + template + std::pair insert_check + (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { return tree_.insert_unique_check(key, key_value_comp, commit_data); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the sg_set, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the sg_set. + template + std::pair insert_check + (const_iterator hint, const KeyType &key + ,KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { return tree_.insert_unique_check(hint, key, key_value_comp, commit_data); } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the sg_set between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the sg_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_commit(reference value, const insert_commit_data &commit_data) + { return tree_.insert_unique_commit(value, commit_data); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the sg_set. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_unique(b, e); } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate. "value" must not be equal to any + //! inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" or "value" is not unique tree ordering and uniqueness + //! invariants will be broken respectively. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { return tree_.insert_before(pos, value); } + + //! Requires: value must be an lvalue, and it must be greater than + //! any inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than or equal to the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { tree_.push_back(value); } + + //! Requires: value must be an lvalue, and it must be less + //! than any inserted key according to the predicate. + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than or equal to the the mimum inserted key tree ordering or uniqueness + //! invariants will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { tree_.push_front(value); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size()) + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If the comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: If the internal value_compare ordering function throws. + //! + //! Complexity: O(log(size() + this->count(value)). Basic guarantee. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) const + { return tree_.find(value) != end(); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp) != end(); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound(const_reference value) const + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound(const_reference value) const + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find(const_reference value) const + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range(const_reference value) const + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range(key, comp); } + + //! Requires: value must be an lvalue and shall be in a sg_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the sg_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a sg_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! sg_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a sg_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the sg_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a sg_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! sg_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a sg_set/sg_multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + void rebalance() + { tree_.rebalance(); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + iterator rebalance_subtree(iterator root) + { return tree_.rebalance_subtree(root); } + + //! Returns: The balance factor (alpha) used in this tree + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + float balance_factor() const + { return tree_.balance_factor(); } + + //! Requires: new_alpha must be a value between 0.5 and 1.0 + //! + //! Effects: Establishes a new balance factor (alpha) and rebalances + //! the tree if the new balance factor is stricter (less) than the old factor. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + void balance_factor(float new_alpha) + { tree_.balance_factor(new_alpha); } + + /// @cond + friend bool operator==(const sg_set_impl &x, const sg_set_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const sg_set_impl &x, const sg_set_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sg_set_impl &x, const sg_set_impl &y) +#else +(const sg_set_impl &x, const sg_set_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sg_set_impl &x, const sg_set_impl &y) +#else +(const sg_set_impl &x, const sg_set_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sg_set_impl &x, const sg_set_impl &y) +#else +(const sg_set_impl &x, const sg_set_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sg_set_impl &x, const sg_set_impl &y) +#else +(const sg_set_impl &x, const sg_set_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(sg_set_impl &x, sg_set_impl &y) +#else +(sg_set_impl &x, sg_set_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c sg_set that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_sg_set +{ + /// @cond + typedef sg_set_impl + < typename make_sgtree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class sg_set + : public make_sg_set::type +{ + typedef typename make_sg_set + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + sg_set( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + sg_set( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, v_traits) + {} + + static sg_set &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const sg_set &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static sg_set &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const sg_set &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + +//! The class template sg_multiset is an intrusive container, that mimics most of +//! the interface of std::sg_multiset as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class sg_multiset_impl +{ + /// @cond + typedef sgtree_impl tree_type; + + //Non-copyable and non-assignable + sg_multiset_impl (const sg_multiset_impl&); + sg_multiset_impl &operator =(const sg_multiset_impl&); + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + /// @cond + private: + tree_type tree_; + /// @endcond + + public: + //! Effects: Constructs an empty sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + sg_multiset_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty sg_multiset and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is the distance between first and last + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + sg_multiset_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(false, b, e, cmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the sg_multiset + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~sg_multiset_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of sg_multiset. + //! + //! Effects: Returns a const reference to the sg_multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static sg_multiset_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &sg_multiset_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of sg_multiset. + //! + //! Effects: Returns a const reference to the sg_multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const sg_multiset_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &sg_multiset_impl::tree_); + } + + //! Precondition: it must be a valid iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static sg_multiset_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &sg_multiset_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const sg_multiset_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &sg_multiset_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the sg_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the sg_multiset. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two sg_multisets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(sg_multiset_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const sg_multiset_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the sg_multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(reference value) + { return tree_.insert_equal(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts x into the sg_multiset, using pos as a hint to + //! where it will be inserted. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_equal(hint, value); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the sg_multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_equal(b, e); } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" tree ordering invariant will be broken. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { return tree_.insert_before(pos, value); } + + //! Requires: value must be an lvalue, and it must be no less + //! than the greatest inserted key + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { tree_.push_back(value); } + + //! Requires: value must be an lvalue, and it must be no greater + //! than the minimum inserted key + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than the minimum inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { tree_.push_front(value); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) const + { return tree_.count(value); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) const + { return tree_.count(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound(const_reference value) const + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound(const_reference value) const + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find(const_reference value) const + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range(const_reference value) const + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range(key, comp); } + + //! Requires: value must be an lvalue and shall be in a sg_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the sg_multiset + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a sg_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! sg_multiset that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a sg_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the sg_multiset + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a sg_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! sg_multiset that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a sg_multiset/sg_multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + void rebalance() + { tree_.rebalance(); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + iterator rebalance_subtree(iterator root) + { return tree_.rebalance_subtree(root); } + + //! Returns: The balance factor (alpha) used in this tree + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + float balance_factor() const + { return tree_.balance_factor(); } + + //! Requires: new_alpha must be a value between 0.5 and 1.0 + //! + //! Effects: Establishes a new balance factor (alpha) and rebalances + //! the tree if the new balance factor is stricter (less) than the old factor. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + void balance_factor(float new_alpha) + { tree_.balance_factor(new_alpha); } + + /// @cond + friend bool operator==(const sg_multiset_impl &x, const sg_multiset_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const sg_multiset_impl &x, const sg_multiset_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sg_multiset_impl &x, const sg_multiset_impl &y) +#else +(const sg_multiset_impl &x, const sg_multiset_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sg_multiset_impl &x, const sg_multiset_impl &y) +#else +(const sg_multiset_impl &x, const sg_multiset_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sg_multiset_impl &x, const sg_multiset_impl &y) +#else +(const sg_multiset_impl &x, const sg_multiset_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sg_multiset_impl &x, const sg_multiset_impl &y) +#else +(const sg_multiset_impl &x, const sg_multiset_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(sg_multiset_impl &x, sg_multiset_impl &y) +#else +(sg_multiset_impl &x, sg_multiset_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c sg_multiset that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_sg_multiset +{ + /// @cond + typedef sg_multiset_impl + < typename make_sgtree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class sg_multiset + : public make_sg_multiset::type +{ + typedef typename make_sg_multiset + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + sg_multiset( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + sg_multiset( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, v_traits) + {} + + static sg_multiset &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const sg_multiset &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static sg_multiset &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const sg_multiset &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SG_SET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sgtree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sgtree.hpp new file mode 100644 index 0000000000..5cc361ab60 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sgtree.hpp @@ -0,0 +1,1876 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +// +// The option that yields to non-floating point 1/sqrt(2) alpha is taken +// from the scapegoat tree implementation of the PSPP library. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_SGTREE_HPP +#define BOOST_INTRUSIVE_SGTREE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond + +namespace detail{ + +//! Returns floor(log(n)/log(sqrt(2))) -> floor(2*log2(n)) +//! Undefined if N is 0. +//! +//! This function does not use float point operations. +inline std::size_t calculate_h_sqrt2 (std::size_t n) +{ + std::size_t f_log2 = detail::floor_log2(n); + return (2*f_log2) + (n >= detail::sqrt2_pow_2xplus1 (f_log2)); +} + +struct h_alpha_sqrt2_t +{ + h_alpha_sqrt2_t(void){} + std::size_t operator()(std::size_t n) const + { return calculate_h_sqrt2(n); } +}; + +struct alpha_0_75_by_max_size_t +{ + alpha_0_75_by_max_size_t(void){} + std::size_t operator()(std::size_t max_tree_size) const + { + const std::size_t max_tree_size_limit = ((~std::size_t(0))/std::size_t(3)); + return max_tree_size > max_tree_size_limit ? max_tree_size/4*3 : max_tree_size*3/4; + } +}; + +struct h_alpha_t +{ + h_alpha_t(float inv_minus_logalpha) + : inv_minus_logalpha_(inv_minus_logalpha) + {} + + std::size_t operator()(std::size_t n) const + { + //Returns floor(log1/alpha(n)) -> + // floor(log(n)/log(1/alpha)) -> + // floor(log(n)/(-log(alpha))) + //return static_cast(std::log(float(n))*inv_minus_logalpha_); + return static_cast(detail::fast_log2(float(n))*inv_minus_logalpha_); + } + + private: + //Since the function will be repeatedly called + //precalculate constant data to avoid repeated + //calls to log and division. + //This will store 1/(-std::log(alpha_)) + float inv_minus_logalpha_; +}; + +struct alpha_by_max_size_t +{ + alpha_by_max_size_t(float alpha) + : alpha_(alpha) + {} + + float operator()(std::size_t max_tree_size) const + { return float(max_tree_size)*alpha_; } + + private: + float alpha_; + float inv_minus_logalpha_; +}; + +template +struct alpha_holder +{ + typedef boost::intrusive::detail::h_alpha_t h_alpha_t; + typedef boost::intrusive::detail::alpha_by_max_size_t multiply_by_alpha_t; + + alpha_holder() + { set_alpha(0.7f); } + + float get_alpha() const + { return alpha_; } + + void set_alpha(float alpha) + { + alpha_ = alpha; + inv_minus_logalpha_ = 1/(-detail::fast_log2(alpha)); + } + + h_alpha_t get_h_alpha_t() const + { return h_alpha_t(inv_minus_logalpha_); } + + multiply_by_alpha_t get_multiply_by_alpha_t() const + { return multiply_by_alpha_t(alpha_); } + + private: + float alpha_; + float inv_minus_logalpha_; +}; + +template<> +struct alpha_holder +{ + //This specialization uses alpha = 1/sqrt(2) + //without using floating point operations + //Downside: alpha CAN't be changed. + typedef boost::intrusive::detail::h_alpha_sqrt2_t h_alpha_t; + typedef boost::intrusive::detail::alpha_0_75_by_max_size_t multiply_by_alpha_t; + + float get_alpha() const + { return 0.70710677f; } + + void set_alpha(float) + { //alpha CAN't be changed. + BOOST_INTRUSIVE_INVARIANT_ASSERT(0); + } + + h_alpha_t get_h_alpha_t() const + { return h_alpha_t(); } + + multiply_by_alpha_t get_multiply_by_alpha_t() const + { return multiply_by_alpha_t(); } +}; + +} //namespace detail{ + +template +struct sg_setopt +{ + typedef ValueTraits value_traits; + typedef Compare compare; + typedef SizeType size_type; + static const bool floating_point = FloatingPoint; +}; + +template +struct sg_set_defaults + : pack_options + < none + , base_hook + , floating_point + , size_type + , compare > + >::type +{}; + +/// @endcond + +//! The class template sgtree is an intrusive scapegoat tree container, that +//! is used to construct intrusive sg_set and sg_multiset containers. +//! The no-throw guarantee holds only, if the value_compare object +//! doesn't throw. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c floating_point<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class sgtree_impl + : private detail::clear_on_destructor_base > +{ + template friend class detail::clear_on_destructor_base; + public: + typedef typename Config::value_traits value_traits; + /// @cond + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + /// @endcond + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::const_pointer const_pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef value_type key_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename Config::size_type size_type; + typedef typename Config::compare value_compare; + typedef value_compare key_compare; + typedef tree_iterator iterator; + typedef tree_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef sgtree_algorithms node_algorithms; + + static const bool floating_point = Config::floating_point; + static const bool constant_time_size = true; + static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + + /// @cond + private: + typedef detail::size_holder size_traits; + typedef detail::alpha_holder alpha_traits; + typedef typename alpha_traits::h_alpha_t h_alpha_t; + typedef typename alpha_traits::multiply_by_alpha_t multiply_by_alpha_t; + + //noncopyable + sgtree_impl (const sgtree_impl&); + sgtree_impl operator =(const sgtree_impl&); + + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + BOOST_STATIC_ASSERT(((int)real_value_traits::link_mode != (int)auto_unlink)); + + //BOOST_STATIC_ASSERT(( + // (int)real_value_traits::link_mode != (int)auto_unlink || + // !floating_point + // )); + + struct header_plus_alpha : public alpha_traits + { node header_; }; + + struct node_plus_pred_t : public detail::ebo_functor_holder + { + node_plus_pred_t(const value_compare &comp) + : detail::ebo_functor_holder(comp) + {} + header_plus_alpha header_plus_alpha_; + size_traits size_traits_; + }; + + struct data_t : public sgtree_impl::value_traits + { + typedef typename sgtree_impl::value_traits value_traits; + data_t(const value_compare & comp, const value_traits &val_traits) + : value_traits(val_traits), node_plus_pred_(comp) + , max_tree_size_(0) + {} + node_plus_pred_t node_plus_pred_; + size_type max_tree_size_; + } data_; + + float priv_alpha() const + { return this->priv_alpha_traits().get_alpha(); } + + void priv_alpha(float alpha) + { return this->priv_alpha_traits().set_alpha(alpha); } + + const value_compare &priv_comp() const + { return data_.node_plus_pred_.get(); } + + value_compare &priv_comp() + { return data_.node_plus_pred_.get(); } + + const node &priv_header() const + { return data_.node_plus_pred_.header_plus_alpha_.header_; } + + node &priv_header() + { return data_.node_plus_pred_.header_plus_alpha_.header_; } + + static node_ptr uncast(const_node_ptr ptr) + { return node_ptr(const_cast(detail::boost_intrusive_get_pointer(ptr))); } + + size_traits &priv_size_traits() + { return data_.node_plus_pred_.size_traits_; } + + const size_traits &priv_size_traits() const + { return data_.node_plus_pred_.size_traits_; } + + alpha_traits &priv_alpha_traits() + { return data_.node_plus_pred_.header_plus_alpha_; } + + const alpha_traits &priv_alpha_traits() const + { return data_.node_plus_pred_.header_plus_alpha_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_.get_value_traits(*this); } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_; } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_.get_value_traits(*this); } + + h_alpha_t get_h_alpha_func() const + { return priv_alpha_traits().get_h_alpha_t(); } + + multiply_by_alpha_t get_alpha_by_max_size_func() const + { return priv_alpha_traits().get_multiply_by_alpha_t(); } + + /// @endcond + + public: + + const real_value_traits &get_real_value_traits() const + { return this->get_real_value_traits(detail::bool_()); } + + real_value_traits &get_real_value_traits() + { return this->get_real_value_traits(detail::bool_()); } + + typedef typename node_algorithms::insert_commit_data insert_commit_data; + + //! Effects: Constructs an empty tree. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructorof the value_compare object throws. Basic guarantee. + sgtree_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + } + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty tree and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is the distance between first and last. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. Basic guarantee. + template + sgtree_impl( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + if(unique) + this->insert_unique(b, e); + else + this->insert_equal(b, e); + } + + //! Effects: Detaches all elements from this. The objects in the set + //! are not deleted (i.e. no destructors are called), but the nodes according to + //! the value_traits template parameter are reinitialized and thus can be reused. + //! + //! Complexity: Linear to elements contained in *this. + //! + //! Throws: Nothing. + ~sgtree_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return iterator (node_traits::get_left(node_ptr(&priv_header())), this); } + + //! Effects: Returns a const_iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return cbegin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return const_iterator (node_traits::get_left(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns an iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return iterator (node_ptr(&priv_header()), this); } + + //! Effects: Returns a const_iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return cend(); } + + //! Effects: Returns a const_iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return const_iterator (uncast(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return reverse_iterator(end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return const_reverse_iterator(begin()); } + + //! Precondition: end_iterator must be a valid end iterator + //! of sgtree. + //! + //! Effects: Returns a const reference to the sgtree associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static sgtree_impl &container_from_end_iterator(iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of sgtree. + //! + //! Effects: Returns a const reference to the sgtree associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const sgtree_impl &container_from_end_iterator(const_iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: it must be a valid iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the tree associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static sgtree_impl &container_from_iterator(iterator it) + { return priv_container_from_iterator(it); } + + //! Precondition: it must be a valid end const_iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the tree associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const sgtree_impl &container_from_iterator(const_iterator it) + { return priv_container_from_iterator(it); } + + //! Effects: Returns the value_compare object used by the tree. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return priv_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return node_algorithms::unique(const_node_ptr(&priv_header())); } + + //! Effects: Returns the number of elements stored in the tree. + //! + //! Complexity: Linear to elements contained in *this + //! if constant-time size option is disabled. Constant time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { + if(constant_time_size) + return this->priv_size_traits().get_size(); + else{ + return (size_type)node_algorithms::size(const_node_ptr(&priv_header())); + } + } + + //! Effects: Swaps the contents of two sgtrees. + //! + //! Complexity: Constant. + //! + //! Throws: If the comparison functor's swap call throws. + void swap(sgtree_impl& other) + { + //This can throw + using std::swap; + swap(priv_comp(), priv_comp()); + swap(priv_alpha_traits(), priv_alpha_traits()); + swap(data_.max_tree_size_, other.data_.max_tree_size_); + //These can't throw + node_algorithms::swap_tree(node_ptr(&priv_header()), node_ptr(&other.priv_header())); + if(constant_time_size){ + size_type backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(other.priv_size_traits().get_size()); + other.priv_size_traits().set_size(backup); + } + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the tree before the upper bound. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; + node_ptr p = node_algorithms::insert_equal_upper_bound + (node_ptr(&priv_header()), to_insert, key_node_comp + , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size); + data_.max_tree_size_ = (size_type)max_tree_size; + return iterator(p, this); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator. + //! + //! Effects: Inserts x into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case) + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(const_iterator hint, reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; + node_ptr p = node_algorithms::insert_equal + (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp + , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size); + data_.max_tree_size_ = (size_type)max_tree_size; + return iterator(p, this); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a each element of a range into the tree + //! before the upper bound of the key of each element. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_equal(Iterator b, Iterator e) + { + iterator end(this->end()); + for (; b != e; ++b) + this->insert_equal(end, *b); + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the tree if the value + //! is not already present. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert_unique(reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(value, priv_comp(), commit_data); + if(!ret.second) + return ret; + return std::pair (insert_unique_commit(value, commit_data), true); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator + //! + //! Effects: Tries to insert x into the tree, using "hint" as a hint + //! to where it will be inserted. + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time (two comparisons in the worst case) + //! if t is inserted immediately before hint. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_unique(const_iterator hint, reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(hint, value, priv_comp(), commit_data); + if(!ret.second) + return ret.first; + return insert_unique_commit(value, commit_data); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Tries to insert each element of a range into the tree. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_unique(Iterator b, Iterator e) + { + if(this->empty()){ + iterator end(this->end()); + for (; b != e; ++b) + this->insert_unique(end, *b); + } + else{ + for (; b != e; ++b) + this->insert_unique(*b); + } + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), key, comp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + (const_iterator hint, const KeyType &key + ,KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), hint.pointed_node(), key, comp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the container between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the avl_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; + node_algorithms::insert_unique_commit + ( node_ptr(&priv_header()), to_insert, commit_data + , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size); + data_.max_tree_size_ = (size_type)max_tree_size; + return iterator(to_insert, this); + } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate + //! + //! Effects: Inserts x into the tree before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" tree ordering invariant will be broken. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; + node_ptr p = node_algorithms::insert_before + ( node_ptr(&priv_header()), pos.pointed_node(), to_insert + , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size); + data_.max_tree_size_ = (size_type)max_tree_size; + return iterator(p, this); + } + + //! Requires: value must be an lvalue, and it must be no less + //! than the greatest inserted key + //! + //! Effects: Inserts x into the tree in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! less than the greatest inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; + node_algorithms::push_back + ( node_ptr(&priv_header()), to_insert + , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size); + data_.max_tree_size_ = (size_type)max_tree_size; + } + + //! Requires: value must be an lvalue, and it must be no greater + //! than the minimum inserted key + //! + //! Effects: Inserts x into the tree in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Note: This function does not check preconditions so if value is + //! greater than the minimum inserted key tree ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; + node_algorithms::push_front + ( node_ptr(&priv_header()), to_insert + , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size); + data_.max_tree_size_ = (size_type)max_tree_size; + } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { + const_iterator ret(i); + ++ret; + node_ptr to_erase(i.pointed_node()); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase)); + std::size_t max_tree_size = data_.max_tree_size_; + node_algorithms::erase + ( &priv_header(), to_erase, (std::size_t)this->size() + , max_tree_size, this->get_alpha_by_max_size_func()); + data_.max_tree_size_ = (size_type)max_tree_size; + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + return ret.unconst(); + } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { size_type n; return private_erase(b, e, n); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return this->erase(value, priv_comp()); } + + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { + node_ptr to_erase(i.pointed_node()); + iterator ret(this->erase(i)); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + return ret; + } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { size_type n; return private_erase(b, e, n, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { + std::pair p = this->equal_range(value); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { + if(safemode_or_autounlink){ + this->clear_and_dispose(detail::null_disposer()); + } + else{ + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(0); + } + } + + //! Effects: Erases all of the elements calling disposer(p) for + //! each node to be erased. + //! Complexity: Average complexity for is at most O(log(size() + N)), + //! where N is the number of elements in the container. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. Calls N times to disposer functor. + template + void clear_and_dispose(Disposer disposer) + { + node_algorithms::clear_and_dispose(node_ptr(&priv_header()) + , detail::node_disposer(disposer, this)); + this->priv_size_traits().set_size(0); + } + + //! Effects: Returns the number of contained elements with the given value + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given value. + //! + //! Throws: Nothing. + size_type count(const_reference value) const + { return this->count(value, priv_comp()); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: Nothing. + template + size_type count(const KeyType &key, KeyValueCompare comp) const + { + std::pair ret = this->equal_range(key, comp); + return std::distance(ret.first, ret.second); + } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator lower_bound(const_reference value) + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator lower_bound(const_reference value) const + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator lower_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator lower_bound(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator upper_bound(const_reference value) + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator upper_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator upper_bound(const_reference value) const + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator upper_bound(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator find(const_reference value) + { return this->find(value, priv_comp()); } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator find(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator find(const_reference value) const + { return this->find(value, priv_comp()); } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator find(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair equal_range(const_reference value) + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair equal_range(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(iterator(ret.first, this), iterator(ret.second, this)); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair + equal_range(const_reference value) const + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair + equal_range(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(const_iterator(ret.first, this), const_iterator(ret.second, this)); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const sgtree_impl &src, Cloner cloner, Disposer disposer) + { + this->clear_and_dispose(disposer); + if(!src.empty()){ + detail::exception_disposer + rollback(*this, disposer); + node_algorithms::clone + (const_node_ptr(&src.priv_header()) + ,node_ptr(&this->priv_header()) + ,detail::node_cloner(cloner, this) + ,detail::node_disposer(disposer, this)); + this->priv_size_traits().set_size(src.priv_size_traits().get_size()); + this->priv_comp() = src.priv_comp(); + rollback.release(); + } + } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { + node_ptr to_be_disposed(node_algorithms::unlink_leftmost_without_rebalance + (node_ptr(&priv_header()))); + if(!to_be_disposed) + return 0; + this->priv_size_traits().decrement(); + if(safemode_or_autounlink)//If this is commented does not work with normal_link + node_algorithms::init(to_be_disposed); + return get_real_value_traits().to_value_ptr(to_be_disposed); + } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { + node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this) + , node_ptr(&priv_header()) + , get_real_value_traits().to_node_ptr(with_this)); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return iterator (value_traits::to_node_ptr(value), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return const_iterator (value_traits::to_node_ptr(const_cast (value)), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return iterator (value_traits::to_node_ptr(value), this); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return const_iterator (value_traits::to_node_ptr(const_cast (value)), this); } + + //! Requires: value shall not be in a tree. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { node_algorithms::init(value_traits::to_node_ptr(value)); } + + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + void rebalance() + { node_algorithms::rebalance(node_ptr(&priv_header())); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + iterator rebalance_subtree(iterator root) + { return iterator(node_algorithms::rebalance_subtree(root.pointed_node()), this); } + + //! Returns: The balance factor (alpha) used in this tree + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + float balance_factor() const + { return this->priv_alpha(); } + + //! Requires: new_alpha must be a value between 0.5 and 1.0 + //! + //! Effects: Establishes a new balance factor (alpha) and rebalances + //! the tree if the new balance factor is stricter (less) than the old factor. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + void balance_factor(float new_alpha) + { + BOOST_INTRUSIVE_INVARIANT_ASSERT((new_alpha > 0.5f && new_alpha < 1.0f)); + if(new_alpha < 0.5f && new_alpha >= 1.0f) return; + + //The alpha factor CAN't be changed if the fixed, floating operation-less + //1/sqrt(2) alpha factor option is activated + BOOST_STATIC_ASSERT((floating_point)); + float old_alpha = this->priv_alpha(); + this->priv_alpha(new_alpha); + + if(new_alpha < old_alpha){ + data_.max_tree_size_ = this->size(); + this->rebalance(); + } + } +/* + //! Effects: removes x from a tree of the appropriate type. It has no effect, + //! if x is not in such a tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This static function is only usable with the "safe mode" + //! hook and non-constant time size lists. Otherwise, the user must use + //! the non-static "erase(reference )" member. If the user calls + //! this function with a non "safe mode" or constant time size list + //! a compilation error will be issued. + template + static void remove_node(T& value) + { + //This function is only usable for safe mode hooks and non-constant + //time lists. + //BOOST_STATIC_ASSERT((!(safemode_or_autounlink && constant_time_size))); + BOOST_STATIC_ASSERT((!constant_time_size)); + BOOST_STATIC_ASSERT((boost::is_convertible::value)); + node_ptr to_remove(value_traits::to_node_ptr(value)); + node_algorithms::unlink_and_rebalance(to_remove); + if(safemode_or_autounlink) + node_algorithms::init(to_remove); + } +*/ + + /// @cond + private: + template + iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer) + { + for(n = 0; b != e; ++n) + this->erase_and_dispose(b++, disposer); + return b.unconst(); + } + + iterator private_erase(const_iterator b, const_iterator e, size_type &n) + { + for(n = 0; b != e; ++n) + this->erase(b++); + return b.unconst(); + } + /// @endcond + + private: + static sgtree_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) + { + header_plus_alpha *r = detail::parent_from_member + ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), &header_plus_alpha::header_); + node_plus_pred_t *n = detail::parent_from_member + (r, &node_plus_pred_t::header_plus_alpha_); + data_t *d = detail::parent_from_member(n, &data_t::node_plus_pred_); + sgtree_impl *scapegoat = detail::parent_from_member(d, &sgtree_impl::data_); + return *scapegoat; + } + + static sgtree_impl &priv_container_from_iterator(const const_iterator &it) + { return priv_container_from_end_iterator(it.end_iterator_from_it()); } +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator< +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sgtree_impl &x, const sgtree_impl &y) +#else +(const sgtree_impl &x, const sgtree_impl &y) +#endif +{ return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +bool operator== +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sgtree_impl &x, const sgtree_impl &y) +#else +(const sgtree_impl &x, const sgtree_impl &y) +#endif +{ + typedef sgtree_impl tree_type; + typedef typename tree_type::const_iterator const_iterator; + + if(tree_type::constant_time_size && x.size() != y.size()){ + return false; + } + const_iterator end1 = x.end(); + const_iterator i1 = x.begin(); + const_iterator i2 = y.begin(); + if(tree_type::constant_time_size){ + while (i1 != end1 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1; + } + else{ + const_iterator end2 = y.end(); + while (i1 != end1 && i2 != end2 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1 && i2 == end2; + } +} + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sgtree_impl &x, const sgtree_impl &y) +#else +(const sgtree_impl &x, const sgtree_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sgtree_impl &x, const sgtree_impl &y) +#else +(const sgtree_impl &x, const sgtree_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sgtree_impl &x, const sgtree_impl &y) +#else +(const sgtree_impl &x, const sgtree_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const sgtree_impl &x, const sgtree_impl &y) +#else +(const sgtree_impl &x, const sgtree_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(sgtree_impl &x, sgtree_impl &y) +#else +(sgtree_impl &x, sgtree_impl &y) +#endif +{ x.swap(y); } + +/// @cond +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_sgtree_opt +{ + typedef typename pack_options + < sg_set_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + typedef typename detail::get_value_traits + ::type value_traits; + + typedef sg_setopt + < value_traits + , typename packed_options::compare + , typename packed_options::size_type + , packed_options::floating_point + > type; +}; +/// @endcond + +//! Helper metafunction to define a \c sgtree that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_sgtree +{ + /// @cond + typedef sgtree_impl + < typename make_sgtree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class sgtree + : public make_sgtree::type +{ + typedef typename make_sgtree + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::real_value_traits real_value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + sgtree( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + sgtree( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(unique, b, e, cmp, v_traits) + {} + + static sgtree &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const sgtree &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } +}; + +#endif + + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SGTREE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sgtree_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sgtree_algorithms.hpp new file mode 100644 index 0000000000..99e9d3980f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/sgtree_algorithms.hpp @@ -0,0 +1,783 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +// +// Scapegoat tree algorithms are taken from the paper titled: +// "Scapegoat Trees" by Igal Galperin Ronald L. Rivest. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP + +#include + +#include +#include +#include +#include +#include + + +namespace boost { +namespace intrusive { + +//! sgtree_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the circular list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! Static functions: +//! +//! static node_ptr get_parent(const_node_ptr n); +//! +//! static void set_parent(node_ptr n, node_ptr parent); +//! +//! static node_ptr get_left(const_node_ptr n); +//! +//! static void set_left(node_ptr n, node_ptr left); +//! +//! static node_ptr get_right(const_node_ptr n); +//! +//! static void set_right(node_ptr n, node_ptr right); +template +class sgtree_algorithms +{ + public: + typedef typename NodeTraits::node node; + typedef NodeTraits node_traits; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + + /// @cond + private: + + typedef detail::tree_algorithms tree_algorithms; + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(::boost::intrusive::detail::boost_intrusive_get_pointer(ptr))); + } + /// @endcond + + public: + static node_ptr begin_node(const_node_ptr header) + { return tree_algorithms::begin_node(header); } + + static node_ptr end_node(const_node_ptr header) + { return tree_algorithms::end_node(header); } + + //! This type is the information that will be + //! filled by insert_unique_check + struct insert_commit_data + : tree_algorithms::insert_commit_data + { + std::size_t depth; + }; + + //! Requires: header1 and header2 must be the header nodes + //! of two trees. + //! + //! Effects: Swaps two trees. After the function header1 will contain + //! links to the second tree and header2 will have links to the first tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static void swap_tree(node_ptr header1, node_ptr header2) + { return tree_algorithms::swap_tree(header1, header2); } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr node2) + { + if(node1 == node2) + return; + + node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2)); + swap_nodes(node1, header1, node2, header2); + } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees with header header1 and header2. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) + { tree_algorithms::swap_nodes(node1, header1, node2, header2); } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing and comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) + { + if(node_to_be_replaced == new_node) + return; + replace_node(node_to_be_replaced, tree_algorithms::get_header(node_to_be_replaced), new_node); + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! with header "header" and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) + { tree_algorithms::replace_node(node_to_be_replaced, header, new_node); } + + //! Requires: node is a tree node but not the header. + //! + //! Effects: Unlinks the node and rebalances the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + static void unlink(node_ptr node) + { + node_ptr x = NodeTraits::get_parent(node); + if(x){ + while(!is_header(x)) + x = NodeTraits::get_parent(x); + tree_algorithms::erase(x, node); + } + } + + //! Requires: header is the header of a tree. + //! + //! Effects: Unlinks the leftmost node from the tree, and + //! updates the header link to the new leftmost node. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + static node_ptr unlink_leftmost_without_rebalance(node_ptr header) + { return tree_algorithms::unlink_leftmost_without_rebalance(header); } + + //! Requires: node is a node of the tree or an node initialized + //! by init(...). + //! + //! Effects: Returns true if the node is initialized by init(). + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + static bool unique(const_node_ptr node) + { return tree_algorithms::unique(node); } + + //! Requires: node is a node of the tree but it's not the header. + //! + //! Effects: Returns the number of nodes of the subtree. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr node) + { return tree_algorithms::count(node); } + + //! Requires: header is the header node of the tree. + //! + //! Effects: Returns the number of nodes above the header. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t size(const_node_ptr header) + { return tree_algorithms::size(header); } + + //! Requires: p is a node from the tree except the header. + //! + //! Effects: Returns the next node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr next_node(node_ptr p) + { return tree_algorithms::next_node(p); } + + //! Requires: p is a node from the tree except the leftmost node. + //! + //! Effects: Returns the previous node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr prev_node(node_ptr p) + { return tree_algorithms::prev_node(p); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: After the function unique(node) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init(node_ptr node) + { tree_algorithms::init(node); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: Initializes the header to represent an empty tree. + //! unique(header) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init_header(node_ptr header) + { tree_algorithms::init_header(header); } + + //! Requires: header must be the header of a tree, z a node + //! of that tree and z != header. + //! + //! Effects: Erases node "z" from the tree with header "header". + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + template + static node_ptr erase(node_ptr header, node_ptr z, std::size_t tree_size, std::size_t &max_tree_size, AlphaByMaxSize alpha_by_maxsize) + { + //typename tree_algorithms::data_for_rebalance info; + tree_algorithms::erase(header, z); + --tree_size; + if (tree_size > 0 && + tree_size < alpha_by_maxsize(max_tree_size)){ + tree_algorithms::rebalance(header); + max_tree_size = tree_size; + } + return z; + } + + //! Requires: "cloner" must be a function + //! object taking a node_ptr and returning a new cloned node of it. "disposer" must + //! take a node_ptr and shouldn't throw. + //! + //! Effects: First empties target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Then, duplicates the entire tree pointed by "source_header" cloning each + //! source node with node_ptr Cloner::operator()(node_ptr) to obtain + //! the nodes of the target tree. If "cloner" throws, the cloned target nodes + //! are disposed using void disposer(node_ptr). + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clone + (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer) + { + tree_algorithms::clone(source_header, target_header, cloner, disposer); + } + + //! Requires: "disposer" must be an object function + //! taking a node_ptr parameter and shouldn't throw. + //! + //! Effects: Empties the target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clear_and_dispose(node_ptr header, Disposer disposer) + { tree_algorithms::clear_and_dispose(header, disposer); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is + //! not less than "key" according to "comp" or "header" if that element does + //! not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr lower_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::lower_bound(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is greater + //! than "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr upper_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::upper_bound(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the element that is equivalent to + //! "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr find + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::find(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an a pair of node_ptr delimiting a range containing + //! all elements that are equivalent to "key" according to "comp" or an + //! empty range that indicates the position where those elements would be + //! if they there are no equivalent elements. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static std::pair equal_range + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::equal_range(header, key, comp); } + + //! Requires: "h" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the upper bound + //! according to "comp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_upper_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp + ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) + { + std::size_t depth; + tree_algorithms::insert_equal_upper_bound(h, new_node, comp, &depth); + rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size); + return new_node; + } + + //! Requires: "h" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the lower bound + //! according to "comp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_lower_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp + ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) + { + std::size_t depth; + tree_algorithms::insert_equal_lower_bound(h, new_node, comp, &depth); + rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from + //! the "header"'s tree. + //! + //! Effects: Inserts new_node into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case). + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if new_node is inserted immediately before "hint". + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal + (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp + ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) + { + std::size_t depth; + tree_algorithms::insert_equal(header, hint, new_node, comp, &depth); + rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data) + { + std::size_t depth; + std::pair ret = + tree_algorithms::insert_unique_check(header, key, comp, commit_data, &depth); + commit_data.depth = depth; + return ret; + } + + + //! Requires: "header" must be the header node of a tree. + //! "pos" must be a valid iterator or header (end) node. + //! "pos" must be an iterator pointing to the successor to "new_node" + //! once inserted according to the order of already inserted nodes. This function does not + //! check "pos" and this precondition must be guaranteed by the caller. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "pos" is not the successor of the newly inserted "new_node" + //! tree invariants might be broken. + template + static node_ptr insert_before + (node_ptr header, node_ptr pos, node_ptr new_node + ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) + { + std::size_t depth; + tree_algorithms::insert_before(header, pos, new_node, &depth); + rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering no less than the + //! greatest inserted key. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "new_node" is less than the greatest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + template + static void push_back(node_ptr header, node_ptr new_node + ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) + { + std::size_t depth; + tree_algorithms::push_back(header, new_node, &depth); + rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size); + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering, no greater than the + //! lowest inserted key. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "new_node" is greater than the lowest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + template + static void push_front(node_ptr header, node_ptr new_node + ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) + { + std::size_t depth; + tree_algorithms::push_front(header, new_node, &depth); + rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size); + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! "hint" is node from the "header"'s tree. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" using "hint" as a hint to where it should be + //! inserted and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! If "hint" is the upper_bound the function has constant time + //! complexity (two comparisons in the worst case). + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic, but it is + //! amortized constant time if new_node should be inserted immediately before "hint". + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, node_ptr hint, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data) + { + std::size_t depth; + std::pair ret = + tree_algorithms::insert_unique_check + (header, hint, key, comp, commit_data, &depth); + commit_data.depth = depth; + return ret; + } + + //! Requires: "header" must be the header node of a tree. + //! "commit_data" must have been obtained from a previous call to + //! "insert_unique_check". No objects should have been inserted or erased + //! from the set between the "insert_unique_check" that filled "commit_data" + //! and the call to "insert_commit". + //! + //! + //! Effects: Inserts new_node in the set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_unique_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + template + static void insert_unique_commit + (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data + ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) + { + tree_algorithms::insert_unique_commit(header, new_value, commit_data); + rebalance_after_insertion(new_value, commit_data.depth, tree_size+1, h_alpha, max_tree_size); + } + + //! Requires: header must be the header of a tree. + //! + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + static void rebalance(node_ptr header) + { tree_algorithms::rebalance(header); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + static node_ptr rebalance_subtree(node_ptr old_root) + { return tree_algorithms::rebalance_subtree(old_root); } + + //! Requires: "n" must be a node inserted in a tree. + //! + //! Effects: Returns a pointer to the header node of the tree. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + static node_ptr get_header(node_ptr n) + { return tree_algorithms::get_header(n); } + + /// @cond + private: + + //! Requires: p is a node of a tree. + //! + //! Effects: Returns true if p is the header of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static bool is_header(const_node_ptr p) + { return tree_algorithms::is_header(p); } + + template + static void rebalance_after_insertion + ( node_ptr x, std::size_t depth + , std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) + { + if(tree_size > max_tree_size) + max_tree_size = tree_size; + + if(tree_size != 1 && depth > h_alpha(tree_size)){ + //Find the first non height-balanced node + //as described in the section 4.2 of the paper. + //This method is the alternative method described + //in the paper. Authors claim that this method + //may tend to yield more balanced trees on the average + //than the weight balanced method. + node_ptr s = x; + std::size_t size = 1; + + for(std::size_t i = 1; true; ++i){ + bool rebalance = false; + if(i == depth){ + BOOST_INTRUSIVE_INVARIANT_ASSERT(tree_size == count(s)); + rebalance = true; + } + else if(i > h_alpha(size)){ + node_ptr s_parent = NodeTraits::get_parent(s); + node_ptr s_parent_left = NodeTraits::get_left(s_parent); + size += 1 + tree_algorithms::count + ( s_parent_left == s ? NodeTraits::get_right(s_parent) : s_parent_left ); + s = s_parent; + rebalance = true; + } + if(rebalance){ + rebalance_subtree(s); + break; + } + } + } + } + + /// @endcond +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/slist.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/slist.hpp new file mode 100644 index 0000000000..6aad69ebbe --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/slist.hpp @@ -0,0 +1,2115 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_SLIST_HPP +#define BOOST_INTRUSIVE_SLIST_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //std::size_t +#include //std::pair +//iG pending #include + +namespace boost { +namespace intrusive { + +/// @cond + +template +struct slistopt +{ + typedef ValueTraits value_traits; + typedef SizeType size_type; + static const bool constant_time_size = ConstantTimeSize; + static const bool linear = Linear; + static const bool cache_last = CacheLast; +}; + +template +struct root_plus_last +{ + Node root_; + NodePtr last_; +}; + +template +struct root_plus_last +{ + Node root_; +}; + +template +struct slist_defaults + : pack_options + < none + , base_hook + , constant_time_size + , linear + , size_type + , cache_last + >::type +{}; + +/// @endcond + +//! The class template slist is an intrusive container, that encapsulates +//! a singly-linked list. You can use such a list to squeeze the last bit +//! of performance from your application. Unfortunately, the little gains +//! come with some huge drawbacks. A lot of member functions can't be +//! implemented as efficiently as for standard containers. To overcome +//! this limitation some other member functions with rather unusual semantics +//! have to be introduced. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<>, +//! \c linear<> and \c cache_last<>. +//! +//! The iterators of slist are forward iterators. slist provides a static +//! function called "previous" to compute the previous iterator of a given iterator. +//! This function has linear complexity. To improve the usability esp. with +//! the '*_after' functions, ++end() == begin() and previous(begin()) == end() +//! are defined. An new special function "before_begin()" is defined, which returns +//! an iterator that points one less the beginning of the list: ++before_begin() == begin() +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class slist_impl + : private detail::clear_on_destructor_base > +{ + template friend class detail::clear_on_destructor_base; + //Public typedefs + public: + typedef typename Config::value_traits value_traits; + /// @cond + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + /// @endcond + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::const_pointer const_pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename Config::size_type size_type; + typedef slist_iterator iterator; + typedef slist_iterator const_iterator; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + + typedef typename detail::if_c + < Config::linear + , linear_slist_algorithms + , circular_slist_algorithms + >::type node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + static const bool linear = Config::linear; + static const bool cache_last = Config::cache_last; + + /// @cond + private: + typedef detail::size_holder size_traits; + + //! This class is + //! non-copyable + slist_impl (const slist_impl&); + + //! This class is + //! non-asignable + slist_impl &operator =(const slist_impl&); + + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + //Constant-time size is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(constant_time_size && ((int)real_value_traits::link_mode == (int)auto_unlink))); + //Linear singly linked lists are incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(linear && ((int)real_value_traits::link_mode == (int)auto_unlink))); + //A list with cached last node is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(cache_last && ((int)real_value_traits::link_mode == (int)auto_unlink))); + + node_ptr get_end_node() + { return node_ptr(linear ? node_ptr(0) : this->get_root_node()); } + + const_node_ptr get_end_node() const + { + return const_node_ptr + (linear ? const_node_ptr(0) : this->get_root_node()); } + + node_ptr get_root_node() + { return node_ptr(&data_.root_plus_size_.root_); } + + const_node_ptr get_root_node() const + { return const_node_ptr(&data_.root_plus_size_.root_); } + + node_ptr get_last_node() + { return this->get_last_node(detail::bool_()); } + + const_node_ptr get_last_node() const + { return this->get_last_node(detail::bool_()); } + + void set_last_node(node_ptr n) + { return this->set_last_node(n, detail::bool_()); } + + static node_ptr get_last_node(detail::bool_) + { return node_ptr(0); } + + static void set_last_node(node_ptr, detail::bool_) + {} + + node_ptr get_last_node(detail::bool_) + { return node_ptr(data_.root_plus_size_.last_); } + + const_node_ptr get_last_node(detail::bool_) const + { return const_node_ptr(data_.root_plus_size_.last_); } + + void set_last_node(node_ptr n, detail::bool_) + { data_.root_plus_size_.last_ = n; } + + static node_ptr uncast(const_node_ptr ptr) + { return node_ptr(const_cast(detail::boost_intrusive_get_pointer(ptr))); } +//iG pending { return boost::const_pointer_cast(ptr); } + + void set_default_constructed_state() + { + node_algorithms::init_header(this->get_root_node()); + this->priv_size_traits().set_size(size_type(0)); + if(cache_last){ + this->set_last_node(this->get_root_node()); + } + } + + struct root_plus_size + : public size_traits + , public root_plus_last + {}; + + struct data_t + : public slist_impl::value_traits + { + typedef typename slist_impl::value_traits value_traits; + data_t(const value_traits &val_traits) + : value_traits(val_traits) + {} + + root_plus_size root_plus_size_; + } data_; + + size_traits &priv_size_traits() + { return data_.root_plus_size_; } + + const size_traits &priv_size_traits() const + { return data_.root_plus_size_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_.get_value_traits(*this); } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_; } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_.get_value_traits(*this); } + + const value_traits &get_value_traits() const + { return data_; } + + value_traits &get_value_traits() + { return data_; } + + protected: + node &prot_root_node() + { return data_.root_plus_size_.root_; } + + node const &prot_root_node() const + { return data_.root_plus_size_.root_; } + + void prot_set_size(size_type s) + { data_.root_plus_size_.set_size(s); } + + /// @endcond + + public: + + const real_value_traits &get_real_value_traits() const + { return this->get_real_value_traits(detail::bool_()); } + + real_value_traits &get_real_value_traits() + { return this->get_real_value_traits(detail::bool_()); } + + public: + //! Effects: constructs an empty list. + //! + //! Complexity: Constant + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks). + slist_impl(const value_traits &v_traits = value_traits()) + : data_(v_traits) + { this->set_default_constructed_state(); } + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! + //! Effects: Constructs a list equal to [first,last). + //! + //! Complexity: Linear in std::distance(b, e). No copy constructors are called. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks). + template + slist_impl(Iterator b, Iterator e, const value_traits &v_traits = value_traits()) + : data_(v_traits) + { + this->set_default_constructed_state(); + this->insert_after(this->cbefore_begin(), b, e); + } + + //! Effects: If it's a safe-mode + //! or auto-unlink value, the destructor does nothing + //! (ie. no code is generated). Otherwise it detaches all elements from this. + //! In this case the objects in the list are not deleted (i.e. no destructors + //! are called), but the hooks according to the value_traits template parameter + //! are set to their default value. + //! + //! Complexity: Linear to the number of elements in the list, if + //! it's a safe-mode or auto-unlink value. Otherwise constant. + ~slist_impl() + {} + + //! Effects: Erases all the elements of the container. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements of the list. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Note: Invalidates the iterators (but not the references) to the erased elements. + void clear() + { + if(safemode_or_autounlink){ + this->clear_and_dispose(detail::null_disposer()); + } + else{ + this->set_default_constructed_state(); + } + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements of the list. + //! + //! Note: Invalidates the iterators to the erased elements. + template + void clear_and_dispose(Disposer disposer) + { + const_iterator it(this->begin()), itend(this->end()); + while(it != itend){ + node_ptr to_erase(it.pointed_node()); + ++it; + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + } + this->set_default_constructed_state(); + } + + //! Requires: value must be an lvalue. + //! + //! Effects: Inserts the value in the front of the list. + //! No copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + void push_front(reference value) + { + node_ptr to_insert = get_real_value_traits().to_node_ptr(value); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::inited(to_insert)); + if(cache_last){ + if(this->empty()){ + this->set_last_node(to_insert); + } + } + node_algorithms::link_after(this->get_root_node(), to_insert); + this->priv_size_traits().increment(); + } + + //! Requires: value must be an lvalue. + //! + //! Effects: Inserts the value in the back of the list. + //! No copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + //! This function is only available is cache_last<> is true. + void push_back(reference value) + { + BOOST_STATIC_ASSERT((cache_last != 0)); + this->insert_after(const_iterator(this->get_last_node(), this), value); + } + + //! Effects: Erases the first element of the list. + //! No destructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators (but not the references) to the erased element. + void pop_front() + { return this->pop_front_and_dispose(detail::null_disposer()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the first element of the list. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators to the erased element. + template + void pop_front_and_dispose(Disposer disposer) + { + node_ptr to_erase = node_traits::get_next(this->get_root_node()); + node_algorithms::unlink_after(this->get_root_node()); + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + if(cache_last){ + if(this->empty()){ + this->set_last_node(this->get_root_node()); + } + } + } + + //! Effects: Returns a reference to the first element of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + reference front() + { return *this->get_real_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); } + + //! Effects: Returns a const_reference to the first element of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_reference front() const + { return *this->get_real_value_traits().to_value_ptr(uncast(node_traits::get_next(this->get_root_node()))); } + + //! Effects: Returns a reference to the last element of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + //! This function is only available is cache_last<> is true. + reference back() + { + BOOST_STATIC_ASSERT((cache_last != 0)); + return *this->get_real_value_traits().to_value_ptr(this->get_last_node()); + } + + //! Effects: Returns a const_reference to the last element of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + //! This function is only available is cache_last<> is true. + const_reference back() const + { + BOOST_STATIC_ASSERT((cache_last != 0)); + return *this->get_real_value_traits().to_value_ptr(this->get_last_node()); + } + + //! Effects: Returns an iterator to the first element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + iterator begin() + { return iterator (node_traits::get_next(this->get_root_node()), this); } + + //! Effects: Returns a const_iterator to the first element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator begin() const + { return const_iterator (node_traits::get_next(this->get_root_node()), this); } + + //! Effects: Returns a const_iterator to the first element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator cbegin() const + { return const_iterator(node_traits::get_next(this->get_root_node()), this); } + + //! Effects: Returns an iterator to the end of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + iterator end() + { return iterator(this->get_end_node(), this); } + + //! Effects: Returns a const_iterator to the end of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator end() const + { return const_iterator(uncast(this->get_end_node()), this); } + + //! Effects: Returns a const_iterator to the end of the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator cend() const + { return this->end(); } + + //! Effects: Returns an iterator that points to a position + //! before the first element. Equivalent to "end()" + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + iterator before_begin() + { return iterator(this->get_root_node(), this); } + + //! Effects: Returns an iterator that points to a position + //! before the first element. Equivalent to "end()" + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator before_begin() const + { return const_iterator(uncast(this->get_root_node()), this); } + + //! Effects: Returns an iterator that points to a position + //! before the first element. Equivalent to "end()" + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + const_iterator cbefore_begin() const + { return this->before_begin(); } + + //! Effects: Returns an iterator to the last element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: This function is present only if cached_last<> option is true. + iterator last() + { return iterator (this->get_last_node(), this); } + + //! Effects: Returns a const_iterator to the first element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: This function is present only if cached_last<> option is true. + const_iterator last() const + { return const_iterator (this->get_last_node(), this); } + + //! Effects: Returns a const_iterator to the first element contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: This function is present only if cached_last<> option is true. + const_iterator clast() const + { return const_iterator(this->get_last_node(), this); } + + //! Precondition: end_iterator must be a valid end iterator + //! of slist. + //! + //! Effects: Returns a const reference to the slist associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static slist_impl &container_from_end_iterator(iterator end_iterator) + { return slist_impl::priv_container_from_end_iterator(end_iterator); } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of slist. + //! + //! Effects: Returns a const reference to the slist associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const slist_impl &container_from_end_iterator(const_iterator end_iterator) + { return slist_impl::priv_container_from_end_iterator(end_iterator); } + + //! Effects: Returns the number of the elements contained in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements contained in the list. + //! if constant_time_size is false. Constant time otherwise. + //! + //! Note: Does not affect the validity of iterators and references. + size_type size() const + { + if(constant_time_size) + return this->priv_size_traits().get_size(); + else + return node_algorithms::count(this->get_root_node()) - 1; + } + + //! Effects: Returns true if the list contains no elements. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + bool empty() const + { return node_algorithms::unique(this->get_root_node()); } + + //! Effects: Swaps the elements of x and *this. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements of both lists. + //! Constant-time if linear<> and/or cache_last<> options are used. + //! + //! Note: Does not affect the validity of iterators and references. + void swap(slist_impl& other) + { + if(cache_last){ + priv_swap_cache_last(this, &other); + } + else{ + this->priv_swap_lists(this->get_root_node(), other.get_root_node(), detail::bool_()); + } + if(constant_time_size){ + size_type backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(other.priv_size_traits().get_size()); + other.priv_size_traits().set_size(backup); + } + } + + //! Effects: Moves backwards all the elements, so that the first + //! element becomes the second, the second becomes the third... + //! the last element becomes the first one. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements plus the number shifts. + //! + //! Note: Iterators Does not affect the validity of iterators and references. + void shift_backwards(size_type n = 1) + { this->priv_shift_backwards(n, detail::bool_()); } + + //! Effects: Moves forward all the elements, so that the second + //! element becomes the first, the third becomes the second... + //! the first element becomes the last one. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements plus the number shifts. + //! + //! Note: Does not affect the validity of iterators and references. + void shift_forward(size_type n = 1) + { this->priv_shift_forward(n, detail::bool_()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws. + template + void clone_from(const slist_impl &src, Cloner cloner, Disposer disposer) + { + this->clear_and_dispose(disposer); + detail::exception_disposer + rollback(*this, disposer); + const_iterator prev(this->cbefore_begin()); + const_iterator b(src.begin()), e(src.end()); + for(; b != e; ++b){ + prev = this->insert_after(prev, *cloner(*b)); + } + rollback.release(); + } + + //! Requires: value must be an lvalue and prev_p must point to an element + //! contained by the list or to end(). + //! + //! Effects: Inserts the value after the position pointed by prev_p. + //! No copy constructor is called. + //! + //! Returns: An iterator to the inserted element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Does not affect the validity of iterators and references. + iterator insert_after(const_iterator prev_p, reference value) + { + node_ptr n = get_real_value_traits().to_node_ptr(value); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::inited(n)); + node_ptr prev_n(prev_p.pointed_node()); + node_algorithms::link_after(prev_n, n); + if(cache_last && (this->get_last_node() == prev_n)){ + this->set_last_node(n); + } + this->priv_size_traits().increment(); + return iterator (n, this); + } + + //! Requires: Dereferencing iterator must yield + //! an lvalue of type value_type and prev_p must point to an element + //! contained by the list or to the end node. + //! + //! Effects: Inserts the [first, last) + //! after the position prev_p. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements inserted. + //! + //! Note: Does not affect the validity of iterators and references. + template + void insert_after(const_iterator prev_p, Iterator first, Iterator last) + { + for (; first != last; ++first) + prev_p = this->insert_after(prev_p, *first); + } + + //! Requires: value must be an lvalue and p must point to an element + //! contained by the list or to end(). + //! + //! Effects: Inserts the value before the position pointed by p. + //! No copy constructor is called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements before p. + //! Constant-time if cache_last<> is true and p == end(). + //! + //! Note: Does not affect the validity of iterators and references. + iterator insert(const_iterator p, reference value) + { return this->insert_after(this->previous(p), value); } + + //! Requires: Dereferencing iterator must yield + //! an lvalue of type value_type and p must point to an element + //! contained by the list or to the end node. + //! + //! Effects: Inserts the pointed by b and e + //! before the position p. No copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements inserted plus linear + //! to the elements before b. + //! Linear to the number of elements to insert if cache_last<> option is true and p == end(). + //! + //! Note: Does not affect the validity of iterators and references. + template + void insert(const_iterator p, Iterator b, Iterator e) + { return this->insert_after(this->previous(p), b, e); } + + //! Effects: Erases the element after the element pointed by prev of + //! the list. No destructors are called. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased element. + iterator erase_after(const_iterator prev) + { return this->erase_after_and_dispose(prev, detail::null_disposer()); } + + //! Effects: Erases the range (before_first, last) from + //! the list. No destructors are called. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of erased elements if it's a safe-mode + //! , auto-unlink value or constant-time size is activated. Constant time otherwise. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased element. + iterator erase_after(const_iterator before_first, const_iterator last) + { + if(safemode_or_autounlink || constant_time_size){ + return this->erase_after_and_dispose(before_first, last, detail::null_disposer()); + } + else{ + node_ptr bfp = before_first.pointed_node(); + node_ptr lp = last.pointed_node(); + if(cache_last){ + if((lp == this->get_end_node())){ + this->set_last_node(bfp); + } + } + node_algorithms::unlink_after(bfp, lp); + return last.unconst(); + } + } + + //! Effects: Erases the range (before_first, last) from + //! the list. n must be std::distance(before_first, last) - 1. + //! No destructors are called. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: constant-time if link_mode is normal_link. + //! Linear to the elements (last - before_first) otherwise. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased element. + iterator erase_after(const_iterator before_first, const_iterator last, difference_type n) + { + BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(++const_iterator(before_first), last) == difference_type(n)); + if(safemode_or_autounlink){ + return this->erase_after(before_first, last); + } + else{ + node_ptr bfp = before_first.pointed_node(); + node_ptr lp = last.pointed_node(); + if(cache_last){ + if((lp == this->get_end_node())){ + this->set_last_node(bfp); + } + } + node_algorithms::unlink_after(bfp, lp); + if(constant_time_size){ + this->priv_size_traits().set_size(this->priv_size_traits().get_size() - n); + } + return last.unconst(); + } + } + + //! Effects: Erases the element pointed by i of the list. + //! No destructors are called. + //! + //! Returns: the first element remaining beyond the removed element, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements before i. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased element. + iterator erase(const_iterator i) + { return this->erase_after(this->previous(i)); } + + //! Requires: first and last must be valid iterator to elements in *this. + //! + //! Effects: Erases the range pointed by b and e. + //! No destructors are called. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements before last. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased elements. + iterator erase(const_iterator first, const_iterator last) + { return this->erase_after(this->previous(first), last); } + + //! Effects: Erases the range [first, last) from + //! the list. n must be std::distance(first, last). + //! No destructors are called. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: linear to the elements before first if link_mode is normal_link + //! and constant_time_size is activated. Linear to the elements before last otherwise. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased element. + iterator erase(const_iterator first, const_iterator last, difference_type n) + { return this->erase_after(this->previous(first), last, n); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element after the element pointed by prev of + //! the list. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Invalidates the iterators to the erased element. + template + iterator erase_after_and_dispose(const_iterator prev, Disposer disposer) + { + const_iterator it(prev); + ++it; + node_ptr to_erase(it.pointed_node()); + ++it; + node_ptr prev_n(prev.pointed_node()); + node_algorithms::unlink_after(prev_n); + if(cache_last && (to_erase == this->get_last_node())){ + this->set_last_node(prev_n); + } + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + this->priv_size_traits().decrement(); + return it.unconst(); + } + + /// @cond + + template + static iterator s_erase_after_and_dispose(const_iterator prev, Disposer disposer) + { + BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits))); + const_iterator it(prev); + ++it; + node_ptr to_erase(it.pointed_node()); + ++it; + node_ptr prev_n(prev.pointed_node()); + node_algorithms::unlink_after(prev_n); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(real_value_traits::to_value_ptr(to_erase)); + return it.unconst(); + } + + static iterator s_erase_after(const_iterator prev) + { return s_erase_after_and_dispose(prev, detail::null_disposer()); } + + /// @endcond + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range (before_first, last) from + //! the list. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Lineal to the elements (last - before_first + 1). + //! + //! Note: Invalidates the iterators to the erased element. + template + iterator erase_after_and_dispose(const_iterator before_first, const_iterator last, Disposer disposer) + { + node_ptr bfp(before_first.pointed_node()), lp(last.pointed_node()); + node_ptr fp(node_traits::get_next(bfp)); + node_algorithms::unlink_after(bfp, lp); + while(fp != lp){ + node_ptr to_erase(fp); + fp = node_traits::get_next(fp); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + this->priv_size_traits().decrement(); + } + if(cache_last && (node_traits::get_next(bfp) == this->get_end_node())){ + this->set_last_node(bfp); + } + return last.unconst(); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed by i of the list. + //! No destructors are called. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Returns: the first element remaining beyond the removed element, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements before i. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased element. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return this->erase_after_and_dispose(this->previous(i), disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: first and last must be valid iterator to elements in *this. + //! Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed by b and e. + //! No destructors are called. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: the first element remaining beyond the removed elements, + //! or end() if no such element exists. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of erased elements plus linear + //! to the elements before first. + //! + //! Note: Invalidates the iterators (but not the references) to the + //! erased elements. + template + iterator erase_and_dispose(const_iterator first, const_iterator last, Disposer disposer) + { return this->erase_after_and_dispose(this->previous(first), last, disposer); } + + //! Requires: Dereferencing iterator must yield + //! an lvalue of type value_type. + //! + //! Effects: Clears the list and inserts the range pointed by b and e. + //! No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements inserted plus + //! linear to the elements contained in the list if it's a safe-mode + //! or auto-unlink value. + //! Linear to the number of elements inserted in the list otherwise. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. + template + void assign(Iterator b, Iterator e) + { + this->clear(); + this->insert_after(this->cbefore_begin(), b, e); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Requires: Dereferencing iterator must yield + //! an lvalue of type value_type. + //! + //! Effects: Clears the list and inserts the range pointed by b and e. + //! No destructors or copy constructors are called. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements inserted plus + //! linear to the elements contained in the list. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. + template + void dispose_and_assign(Disposer disposer, Iterator b, Iterator e) + { + this->clear_and_dispose(disposer); + this->insert_after(this->cbefore_begin(), b, e, disposer); + } + + //! Requires: prev is an iterator to an element or x.end()/x.before_begin() in x. + //! + //! Effects: Transfers all the elements of list x to this list, after the + //! the element pointed by prev. No destructors or copy constructors are called. + //! + //! Returns: Nothing. + //! + //! Throws: Nothing. + //! + //! Complexity: In general, linear to the elements contained in x. + //! Constant-time if cache_last<> option is true and also constant-time if + //! linear<> option is true "this" is empty and "last" is not used. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + //! + //! Additional note: If the optional parameter "last" is provided, it will be + //! assigned to the last spliced element or prev if x is empty. + //! This iterator can be used as new "prev" iterator for a new splice_after call. + //! that will splice new values after the previously spliced values. + void splice_after(const_iterator prev, slist_impl &x, const_iterator *last = 0) + { + if(x.empty()){ + if(last) *last = prev; + } + else if(linear && this->empty()){ + this->swap(x); + if(last) *last = this->previous(this->cend()); + } + else{ + const_iterator last_x(x.previous(x.end())); //<- constant time if cache_last is active + node_ptr prev_n(prev.pointed_node()); + node_ptr last_x_n(last_x.pointed_node()); + if(cache_last){ + x.set_last_node(x.get_root_node()); + if(node_traits::get_next(prev_n) == this->get_end_node()){ + this->set_last_node(last_x_n); + } + } + node_algorithms::transfer_after( prev_n, x.before_begin().pointed_node(), last_x_n); + this->priv_size_traits().set_size(this->priv_size_traits().get_size() + x.priv_size_traits().get_size()); + x.priv_size_traits().set_size(size_type(0)); + if(last) *last = last_x; + } + } + + //! Requires: prev must point to an element contained by this list or + //! to the before_begin() element. prev_ele must point to an element contained in list + //! x or must be x.before_begin(). + //! + //! Effects: Transfers the element after prev_ele, from list x to this list, + //! after the element pointed by prev. No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator prev_ele) + { + const_iterator elem = prev_ele; + this->splice_after(prev_pos, x, prev_ele, ++elem, 1); + } + + //! Requires: prev_pos must be a dereferenceable iterator in *this or be + //! before_begin(), and before_first and before_last belong to x and + //! ++before_first != x.end() && before_last != x.end(). + //! + //! Effects: Transfers the range (before_first, before_last] from list x to this + //! list, after the element pointed by prev_pos. + //! No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements transferred + //! if constant_time_size is true. Constant-time otherwise. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_first, const_iterator before_last) + { + if(constant_time_size) + this->splice_after(prev_pos, x, before_first, before_last, std::distance(before_first, before_last)); + else + this->priv_splice_after + (prev_pos.pointed_node(), x, before_first.pointed_node(), before_last.pointed_node()); + } + + //! Requires: prev_pos must be a dereferenceable iterator in *this or be + //! before_begin(), and before_first and before_last belong to x and + //! ++before_first != x.end() && before_last != x.end() and + //! n == std::distance(before_first, before_last). + //! + //! Effects: Transfers the range (before_first, before_last] from list x to this + //! list, after the element pointed by p. No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_first, const_iterator before_last, difference_type n) + { + if(n){ + BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(before_first, before_last) == n); + this->priv_splice_after + (prev_pos.pointed_node(), x, before_first.pointed_node(), before_last.pointed_node()); + if(constant_time_size){ + this->priv_size_traits().set_size(this->priv_size_traits().get_size() + n); + x.priv_size_traits().set_size(x.priv_size_traits().get_size() - n); + } + } + } + + //! Requires: it is an iterator to an element in x. + //! + //! Effects: Transfers all the elements of list x to this list, before the + //! the element pointed by it. No destructors or copy constructors are called. + //! + //! Returns: Nothing. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements contained in x plus linear to + //! the elements before it. + //! Linear to the elements before it if cache_last<> option is true. + //! Constant-time if cache_last<> option is true and it == end(). + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + //! + //! Additional note: If the optional parameter "last" is provided, it will be + //! assigned to the last spliced element or prev if x is empty. + //! This iterator can be used as new "prev" iterator for a new splice_after call. + //! that will splice new values after the previously spliced values. + void splice(const_iterator it, slist_impl &x, const_iterator *last = 0) + { this->splice_after(this->previous(it), x, last); } + + //! Requires: it p must be a valid iterator of *this. + //! elem must point to an element contained in list + //! x. + //! + //! Effects: Transfers the element elem, from list x to this list, + //! before the element pointed by pos. No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements before pos and before elem. + //! Linear to the elements before elem if cache_last<> option is true and pos == end(). + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice(const_iterator pos, slist_impl &x, const_iterator elem) + { return this->splice_after(this->previous(pos), x, x.previous(elem)); } + + //! Requires: pos must be a dereferenceable iterator in *this + //! and first and last belong to x and first and last a valid range on x. + //! + //! Effects: Transfers the range [first, last) from list x to this + //! list, before the element pointed by pos. + //! No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the sum of elements before pos, first, and last + //! plus linear to the number of elements transferred if constant_time_size is true. + //! Linear to the sum of elements before first, and last + //! plus linear to the number of elements transferred if constant_time_size is true + //! if cache_last<> is true and pos == end() + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice(const_iterator pos, slist_impl &x, const_iterator first, const_iterator last) + { return this->splice_after(this->previous(pos), x, x.previous(first), x.previous(last)); } + + //! Requires: pos must be a dereferenceable iterator in *this + //! and first and last belong to x and first and last a valid range on x. + //! n == std::distance(first, last). + //! + //! Effects: Transfers the range [first, last) from list x to this + //! list, before the element pointed by pos. + //! No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the sum of elements before pos, first, and last. + //! Linear to the sum of elements before first and last + //! if cache_last<> is true and pos == end(). + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void splice(const_iterator pos, slist_impl &x, const_iterator first, const_iterator last, difference_type n) + { return this->splice_after(this->previous(pos), x, x.previous(first), x.previous(last), n); } + + //! Effects: This function sorts the list *this according to std::less. + //! The sort is stable, that is, the relative order of equivalent elements is preserved. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the predicate throws. Basic guarantee. + //! + //! Complexity: The number of comparisons is approximately N log N, where N + //! is the list's size. + //! + //! Note: Iterators and references are not invalidated + template + void sort(Predicate p) + { + if (node_traits::get_next(node_traits::get_next(this->get_root_node())) + != this->get_root_node()) { + + slist_impl carry(this->get_value_traits()); + detail::array_initializer counter(this->get_value_traits()); + int fill = 0; + const_iterator last_inserted; + while(!this->empty()){ + last_inserted = this->cbegin(); + carry.splice_after(carry.cbefore_begin(), *this, this->cbefore_begin()); + int i = 0; + while(i < fill && !counter[i].empty()) { + carry.swap(counter[i]); + carry.merge(counter[i++], p, &last_inserted); + } + BOOST_INTRUSIVE_INVARIANT_ASSERT(counter[i].empty()); + const_iterator last_element(carry.previous(last_inserted, carry.end())); + + if(constant_time_size){ + counter[i].splice_after( counter[i].cbefore_begin(), carry + , carry.cbefore_begin(), last_element + , carry.size()); + } + else{ + counter[i].splice_after( counter[i].cbefore_begin(), carry + , carry.cbefore_begin(), last_element); + } + if(i == fill) + ++fill; + } + + for (int i = 1; i < fill; ++i) + counter[i].merge(counter[i-1], p, &last_inserted); + --fill; + const_iterator last_element(counter[fill].previous(last_inserted, counter[fill].end())); + if(constant_time_size){ + this->splice_after( cbefore_begin(), counter[fill], counter[fill].cbefore_begin() + , last_element, counter[fill].size()); + } + else{ + this->splice_after( cbefore_begin(), counter[fill], counter[fill].cbefore_begin() + , last_element); + } + } + } + + //! Requires: p must be a comparison function that induces a strict weak + //! ordering and both *this and x must be sorted according to that ordering + //! The lists x and *this must be distinct. + //! + //! Effects: This function removes all of x's elements and inserts them + //! in order into *this. The merge is stable; that is, if an element from *this is + //! equivalent to one from x, then the element from *this will precede the one from x. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or std::less throws. Basic guarantee. + //! + //! Complexity: This function is linear time: it performs at most + //! size() + x.size() - 1 comparisons. + //! + //! Note: Iterators and references are not invalidated. + void sort() + { this->sort(std::less()); } + + //! Requires: p must be a comparison function that induces a strict weak + //! ordering and both *this and x must be sorted according to that ordering + //! The lists x and *this must be distinct. + //! + //! Effects: This function removes all of x's elements and inserts them + //! in order into *this. The merge is stable; that is, if an element from *this is + //! equivalent to one from x, then the element from *this will precede the one from x. + //! + //! Returns: Nothing. + //! + //! Throws: If the predicate throws. Basic guarantee. + //! + //! Complexity: This function is linear time: it performs at most + //! size() + x.size() - 1 comparisons. + //! + //! Note: Iterators and references are not invalidated. + //! + //! Additional note: If optional "last" argument is passed, it is assigned + //! to an iterator to the last transferred value or end() is x is empty. + template + void merge(slist_impl& x, Predicate p, const_iterator *last = 0) + { + const_iterator e(this->cend()), ex(x.cend()), bb(this->cbefore_begin()), + bb_next; + if(last) *last = e.unconst(); + while(!x.empty()){ + const_iterator ibx_next(x.cbefore_begin()), ibx(ibx_next++); + while (++(bb_next = bb) != e && !p(*ibx_next, *bb_next)){ + bb = bb_next; + } + if(bb_next == e){ + //Now transfer the rest to the end of the container + this->splice_after(bb, x, last); + break; + } + else{ + size_type n(0); + do{ + ibx = ibx_next; ++n; + } while(++(ibx_next = ibx) != ex && p(*ibx_next, *bb_next)); + this->splice_after(bb, x, x.before_begin(), ibx, n); + if(last) *last = ibx; + } + } + } + + //! Effects: This function removes all of x's elements and inserts them + //! in order into *this according to std::less. The merge is stable; + //! that is, if an element from *this is equivalent to one from x, then the element + //! from *this will precede the one from x. + //! + //! Throws: if std::less throws. Basic guarantee. + //! + //! Complexity: This function is linear time: it performs at most + //! size() + x.size() - 1 comparisons. + //! + //! Note: Iterators and references are not invalidated + void merge(slist_impl& x) + { this->merge(x, std::less()); } + + //! Effects: Reverses the order of elements in the list. + //! + //! Throws: Nothing. + //! + //! Complexity: This function is linear to the contained elements. + //! + //! Note: Iterators and references are not invalidated + void reverse() + { + if(cache_last && !this->empty()){ + this->set_last_node(node_traits::get_next(this->get_root_node())); + } + this->priv_reverse(detail::bool_()); + } + + //! Effects: Removes all the elements that compare equal to value. + //! No destructors are called. + //! + //! Throws: If std::equal_to throws. Basic guarantee. + //! + //! Complexity: Linear time. It performs exactly size() comparisons for equality. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. This function is + //! linear time: it performs exactly size() comparisons for equality. + void remove(const_reference value) + { this->remove_if(detail::equal_to_value(value)); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Removes all the elements that compare equal to value. + //! Disposer::operator()(pointer) is called for every removed element. + //! + //! Throws: If std::equal_to throws. Basic guarantee. + //! + //! Complexity: Linear time. It performs exactly size() comparisons for equality. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void remove_and_dispose(const_reference value, Disposer disposer) + { this->remove_and_dispose_if(detail::equal_to_value(value), disposer); } + + //! Effects: Removes all the elements for which a specified + //! predicate is satisfied. No destructors are called. + //! + //! Throws: If pred throws. Basic guarantee. + //! + //! Complexity: Linear time. It performs exactly size() calls to the predicate. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void remove_if(Pred pred) + { this->remove_and_dispose_if(pred, detail::null_disposer()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Removes all the elements for which a specified + //! predicate is satisfied. + //! Disposer::operator()(pointer) is called for every removed element. + //! + //! Throws: If pred throws. Basic guarantee. + //! + //! Complexity: Linear time. It performs exactly size() comparisons for equality. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void remove_and_dispose_if(Pred pred, Disposer disposer) + { + const_iterator bcur(this->before_begin()), cur(this->begin()), e(this->end()); + + while(cur != e){ + if (pred(*cur)){ + cur = this->erase_after_and_dispose(bcur, disposer); + } + else{ + bcur = cur; + ++cur; + } + } + if(cache_last){ + this->set_last_node(bcur.pointed_node()); + } + } + + //! Effects: Removes adjacent duplicate elements or adjacent + //! elements that are equal from the list. No destructors are called. + //! + //! Throws: If std::equal_to throws. Basic guarantee. + //! + //! Complexity: Linear time (size()-1) comparisons calls to pred()). + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + void unique() + { this->unique_and_dispose(std::equal_to(), detail::null_disposer()); } + + //! Effects: Removes adjacent duplicate elements or adjacent + //! elements that satisfy some binary predicate from the list. + //! No destructors are called. + //! + //! Throws: If the predicate throws. Basic guarantee. + //! + //! Complexity: Linear time (size()-1) comparisons equality comparisons. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void unique(BinaryPredicate pred) + { this->unique_and_dispose(pred, detail::null_disposer()); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Removes adjacent duplicate elements or adjacent + //! elements that satisfy some binary predicate from the list. + //! Disposer::operator()(pointer) is called for every removed element. + //! + //! Throws: If std::equal_to throws. Basic guarantee. + //! + //! Complexity: Linear time (size()-1) comparisons equality comparisons. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void unique_and_dispose(Disposer disposer) + { this->unique(std::equal_to(), disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Removes adjacent duplicate elements or adjacent + //! elements that satisfy some binary predicate from the list. + //! Disposer::operator()(pointer) is called for every removed element. + //! + //! Throws: If the predicate throws. Basic guarantee. + //! + //! Complexity: Linear time (size()-1) comparisons equality comparisons. + //! + //! Note: The relative order of elements that are not removed is unchanged, + //! and iterators to elements that are not removed remain valid. + template + void unique_and_dispose(BinaryPredicate pred, Disposer disposer) + { + const_iterator end_n(this->cend()); + const_iterator bcur(this->cbegin()); + if(bcur != end_n){ + const_iterator cur(bcur); + ++cur; + while(cur != end_n) { + if (pred(*bcur, *cur)){ + cur = this->erase_after_and_dispose(bcur, disposer); + } + else{ + bcur = cur; + ++cur; + } + } + if(cache_last){ + this->set_last_node(bcur.pointed_node()); + } + } + } + + //! Requires: value must be a reference to a value inserted in a list. + //! + //! Effects: This function returns a const_iterator pointing to the element + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators and references are not invalidated. + //! This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + //BOOST_INTRUSIVE_INVARIANT_ASSERT (!node_algorithms::inited(value_traits::to_node_ptr(value))); + return iterator (value_traits::to_node_ptr(value), 0); + } + + //! Requires: value must be a const reference to a value inserted in a list. + //! + //! Effects: This function returns an iterator pointing to the element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators and references are not invalidated. + //! This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + //BOOST_INTRUSIVE_INVARIANT_ASSERT (!node_algorithms::inited(value_traits::to_node_ptr(const_cast (value)))); + return const_iterator (value_traits::to_node_ptr(const_cast (value)), 0); + } + + //! Requires: value must be a reference to a value inserted in a list. + //! + //! Effects: This function returns a const_iterator pointing to the element + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators and references are not invalidated. + iterator iterator_to(reference value) + { + //BOOST_INTRUSIVE_INVARIANT_ASSERT (!node_algorithms::inited(value_traits::to_node_ptr(value))); + return iterator (value_traits::to_node_ptr(value), this); + } + + //! Requires: value must be a const reference to a value inserted in a list. + //! + //! Effects: This function returns an iterator pointing to the element. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators and references are not invalidated. + const_iterator iterator_to(const_reference value) const + { + //BOOST_INTRUSIVE_INVARIANT_ASSERT (!node_algorithms::inited(value_traits::to_node_ptr(const_cast (value)))); + return const_iterator (value_traits::to_node_ptr(const_cast (value)), this); + } + + //! Returns: The iterator to the element before i in the list. + //! Returns the end-iterator, if either i is the begin-iterator or the + //! list is empty. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements before i. + //! Constant if cache_last<> is true and i == end(). + iterator previous(iterator i) + { return this->previous(this->cbefore_begin(), i); } + + //! Returns: The const_iterator to the element before i in the list. + //! Returns the end-const_iterator, if either i is the begin-const_iterator or + //! the list is empty. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements before i. + //! Constant if cache_last<> is true and i == end(). + const_iterator previous(const_iterator i) const + { return this->previous(this->cbefore_begin(), i); } + + //! Returns: The iterator to the element before i in the list, + //! starting the search on element after prev_from. + //! Returns the end-iterator, if either i is the begin-iterator or the + //! list is empty. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements before i. + //! Constant if cache_last<> is true and i == end(). + iterator previous(const_iterator prev_from, iterator i) + { return this->previous(prev_from, const_iterator(i)).unconst(); } + + //! Returns: The const_iterator to the element before i in the list, + //! starting the search on element after prev_from. + //! Returns the end-const_iterator, if either i is the begin-const_iterator or + //! the list is empty. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements before i. + //! Constant if cache_last<> is true and i == end(). + const_iterator previous(const_iterator prev_from, const_iterator i) const + { + if(cache_last && (i.pointed_node() == this->get_end_node())){ + return const_iterator(uncast(this->get_last_node()), this); + } + return const_iterator + (node_algorithms::get_previous_node + (prev_from.pointed_node(), i.pointed_node()), this); + } + + //! Requires: prev_pos must be a dereferenceable iterator in *this or be + //! before_begin(), and before_first and before_last belong to x and + //! ++before_first != x.end() && before_last != x.end(). + //! + //! Effects: Transfers the range (before_first, before_last] to this + //! list, after the element pointed by prev_pos. + //! No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the number of elements transferred + //! if constant_time_size is true. Constant-time otherwise. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void incorporate_after(const_iterator prev_from, node_ptr first, node_ptr before_last) + { + if(constant_time_size) + this->incorporate_after(prev_from, first, before_last, std::distance(first, before_last)+1); + else + this->priv_incorporate_after + (prev_from.pointed_node(), first, before_last); + } + + //! Requires: prev_pos must be a dereferenceable iterator in *this or be + //! before_begin(), and before_first and before_last belong to x and + //! ++before_first != x.end() && before_last != x.end() and + //! n == std::distance(first, before_last) + 1. + //! + //! Effects: Transfers the range (before_first, before_last] from list x to this + //! list, after the element pointed by p. No destructors or copy constructors are called. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: Iterators of values obtained from list x now point to elements of this + //! list. Iterators of this list and all the references are not invalidated. + void incorporate_after(const_iterator prev_pos, node_ptr first, node_ptr before_last, difference_type n) + { + if(n){ + BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(iterator(first, this), iterator(before_last, this))+1 == n); + this->priv_incorporate_after(prev_pos.pointed_node(), first, before_last); + if(constant_time_size){ + this->priv_size_traits().set_size(this->priv_size_traits().get_size() + n); + } + } + } + + private: + void priv_splice_after(node_ptr prev_pos_n, slist_impl &x, node_ptr before_first_n, node_ptr before_last_n) + { + if (before_first_n != before_last_n && prev_pos_n != before_first_n && prev_pos_n != before_last_n) + { + if(cache_last){ + if(node_traits::get_next(prev_pos_n) == this->get_end_node()){ + this->set_last_node(before_last_n); + } + if(node_traits::get_next(before_last_n) == x.get_end_node()){ + x.set_last_node(before_first_n); + } + } + node_algorithms::transfer_after(prev_pos_n, before_first_n, before_last_n); + } + } + + void priv_incorporate_after(node_ptr prev_pos_n, node_ptr first_n, node_ptr before_last_n) + { + if(cache_last){ + if(node_traits::get_next(prev_pos_n) == this->get_end_node()){ + this->set_last_node(before_last_n); + } + } + node_algorithms::incorporate_after(prev_pos_n, first_n, before_last_n); + } + + void priv_reverse(detail::bool_) + { node_algorithms::reverse(this->get_root_node()); } + + void priv_reverse(detail::bool_) + { + node_ptr new_first = node_algorithms::reverse + (node_traits::get_next(this->get_root_node())); + node_traits::set_next(this->get_root_node(), new_first); + } + + void priv_shift_backwards(size_type n, detail::bool_) + { + node_ptr last = node_algorithms::move_forward(this->get_root_node(), (std::size_t)n); + if(cache_last && last){ + this->set_last_node(last); + } + } + + void priv_shift_backwards(size_type n, detail::bool_) + { + std::pair ret( + node_algorithms::move_first_n_forward + (node_traits::get_next(this->get_root_node()), (std::size_t)n)); + if(ret.first){ + node_traits::set_next(this->get_root_node(), ret.first); + if(cache_last){ + this->set_last_node(ret.second); + } + } + } + + void priv_shift_forward(size_type n, detail::bool_) + { + node_ptr last = node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n); + if(cache_last && last){ + this->set_last_node(last); + } + } + + void priv_shift_forward(size_type n, detail::bool_) + { + std::pair ret( + node_algorithms::move_first_n_backwards + (node_traits::get_next(this->get_root_node()), (std::size_t)n)); + if(ret.first){ + node_traits::set_next(this->get_root_node(), ret.first); + if(cache_last){ + this->set_last_node(ret.second); + } + } + } + + static void priv_swap_cache_last(slist_impl *this_impl, slist_impl *other_impl) + { + bool other_was_empty = false; + if(this_impl->empty()){ + //Check if both are empty or + if(other_impl->empty()) + return; + //If this is empty swap pointers + slist_impl *tmp = this_impl; + this_impl = other_impl; + other_impl = tmp; + other_was_empty = true; + } + else{ + other_was_empty = other_impl->empty(); + } + + //Precondition: this is not empty + node_ptr other_old_last(other_impl->get_last_node()); + node_ptr other_bfirst(other_impl->get_root_node()); + node_ptr this_bfirst(this_impl->get_root_node()); + node_ptr this_old_last(this_impl->get_last_node()); + + //Move all nodes from this to other's beginning + node_algorithms::transfer_after(other_bfirst, this_bfirst, this_old_last); + other_impl->set_last_node(this_old_last); + + if(other_was_empty){ + this_impl->set_last_node(this_bfirst); + } + else{ + //Move trailing nodes from other to this + node_algorithms::transfer_after(this_bfirst, this_old_last, other_old_last); + this_impl->set_last_node(other_old_last); + } + } + + //circular version + static void priv_swap_lists(node_ptr this_node, node_ptr other_node, detail::bool_) + { node_algorithms::swap_nodes(this_node, other_node); } + + //linear version + static void priv_swap_lists(node_ptr this_node, node_ptr other_node, detail::bool_) + { node_algorithms::swap_trailing_nodes(this_node, other_node); } + + static slist_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) + { + //Obtaining the container from the end iterator is not possible with linear + //singly linked lists (because "end" is represented by the null pointer) + BOOST_STATIC_ASSERT(!linear); + root_plus_size *r = detail::parent_from_member + ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), (&root_plus_size::root_)); + data_t *d = detail::parent_from_member + ( r, &data_t::root_plus_size_); + slist_impl *s = detail::parent_from_member(d, &slist_impl::data_); + return *s; + } +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator< +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const slist_impl &x, const slist_impl &y) +#else +(const slist_impl &x, const slist_impl &y) +#endif +{ return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +bool operator== +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const slist_impl &x, const slist_impl &y) +#else +(const slist_impl &x, const slist_impl &y) +#endif +{ + typedef slist_impl slist_type; + typedef typename slist_type::const_iterator const_iterator; + const bool C = slist_type::constant_time_size; + if(C && x.size() != y.size()){ + return false; + } + const_iterator end1 = x.end(); + + const_iterator i1 = x.begin(); + const_iterator i2 = y.begin(); + if(C){ + while (i1 != end1 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1; + } + else{ + const_iterator end2 = y.end(); + while (i1 != end1 && i2 != end2 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1 && i2 == end2; + } +} + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const slist_impl &x, const slist_impl &y) +#else +(const slist_impl &x, const slist_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const slist_impl &x, const slist_impl &y) +#else +(const slist_impl &x, const slist_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const slist_impl &x, const slist_impl &y) +#else +(const slist_impl &x, const slist_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const slist_impl &x, const slist_impl &y) +#else +(const slist_impl &x, const slist_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(slist_impl &x, slist_impl &y) +#else +(slist_impl &x, slist_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c slist that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_slist +{ + /// @cond + typedef typename pack_options + < slist_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4, O5 + #else + Options... + #endif + >::type packed_options; + typedef typename detail::get_value_traits + ::type value_traits; + typedef slist_impl + < + slistopt + < value_traits + , typename packed_options::size_type + , packed_options::constant_time_size + , packed_options::linear + , packed_options::cache_last + > + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class slist + : public make_slist::type +{ + typedef typename make_slist + ::type Base; + typedef typename Base::real_value_traits real_value_traits; + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + public: + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + slist(const value_traits &v_traits = value_traits()) + : Base(v_traits) + {} + + template + slist(Iterator b, Iterator e, const value_traits &v_traits = value_traits()) + : Base(b, e, v_traits) + {} + + static slist &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const slist &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SLIST_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/slist_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/slist_hook.hpp new file mode 100644 index 0000000000..1debe66c86 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/slist_hook.hpp @@ -0,0 +1,294 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_SLIST_HOOK_HPP +#define BOOST_INTRUSIVE_SLIST_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond +template +struct get_slist_node_algo +{ + typedef circular_slist_algorithms > type; +}; + +/// @endcond + +//! Helper metafunction to define a \c slist_base_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_slist_base_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_slist_node_algo + , typename packed_options::tag + , packed_options::link_mode + , detail::SlistBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Derive a class from slist_base_hook in order to store objects in +//! in an list. slist_base_hook holds the data necessary to maintain the +//! list and provides an appropriate value_traits class for list. +//! +//! The hook admits the following options: \c tag<>, \c void_pointer<> and +//! \c link_mode<>. +//! +//! \c tag<> defines a tag to identify the node. +//! The same tag value can be used in different classes, but if a class is +//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its +//! unique tag. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class slist_base_hook + : public make_slist_base_hook< + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + slist_base_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + slist_base_hook(const slist_base_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + slist_base_hook& operator=(const slist_base_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in an slist an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~slist_base_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(slist_base_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c slist::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +//! Helper metafunction to define a \c slist_member_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_slist_member_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_slist_node_algo + , member_tag + , packed_options::link_mode + , detail::NoBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Put a public data member slist_member_hook in order to store objects of this class in +//! an list. slist_member_hook holds the data necessary for maintaining the list and +//! provides an appropriate value_traits class for list. +//! +//! The hook admits the following options: \c void_pointer<> and +//! \c link_mode<>. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class slist_member_hook + : public make_slist_member_hook< + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + slist_member_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + slist_member_hook(const slist_member_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + slist_member_hook& operator=(const slist_member_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in an slist an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~slist_member_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(slist_member_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c slist::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SLIST_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splay_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splay_set.hpp new file mode 100644 index 0000000000..f899e78a44 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splay_set.hpp @@ -0,0 +1,2369 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_SPLAY_SET_HPP +#define BOOST_INTRUSIVE_SPLAY_SET_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! The class template splay_set is an intrusive container, that mimics most of +//! the interface of std::set as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class splay_set_impl +{ + /// @cond + typedef splaytree_impl tree_type; + //! This class is + //! non-copyable + splay_set_impl (const splay_set_impl&); + + //! This class is + //! non-assignable + splay_set_impl &operator =(const splay_set_impl&); + + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + + /// @cond + private: + tree_type tree_; + /// @endcond + + public: + //! Effects: Constructs an empty splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor of the value_compare object throws. + splay_set_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty splay_set and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise amortized N * log N, where N is std::distance(last, first). + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + splay_set_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(true, b, e, cmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the splay_set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~splay_set_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of splay_set. + //! + //! Effects: Returns a const reference to the splay_set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static splay_set_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &splay_set_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of splay_set. + //! + //! Effects: Returns a const reference to the splay_set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const splay_set_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &splay_set_impl::tree_); + } + + //! Precondition: it must be a valid iterator of set. + //! + //! Effects: Returns a reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static splay_set_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &splay_set_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of set. + //! + //! Effects: Returns a const reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const splay_set_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &splay_set_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the splay_set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the splay_set. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two splay_sets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(splay_set_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const splay_set_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to inserts value into the splay_set. + //! + //! Returns: If the value + //! is not already present inserts it and returns a pair containing the + //! iterator to the new value and true. If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert(reference value) + { return tree_.insert_unique(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to to insert x into the splay_set, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: An iterator that points to the position where the + //! new element was inserted into the splay_set. + //! + //! Complexity: Amortized logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_unique(hint, value); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the splay_set, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the splay_set. + template + std::pair insert_check + (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { return tree_.insert_unique_check(key, key_value_comp, commit_data); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the splay_set, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Amortized logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the splay_set. + template + std::pair insert_check + (const_iterator hint, const KeyType &key + ,KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { return tree_.insert_unique_check(hint, key, key_value_comp, commit_data); } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the splay_set between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the splay_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_commit(reference value, const insert_commit_data &commit_data) + { return tree_.insert_unique_commit(value, commit_data); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the splay_set. + //! + //! Complexity: Insert range is amortized O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_unique(b, e); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is amortized + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size()) + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + this->count(key, comp)). + //! + //! Throws: If the comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: If the internal value_compare ordering function throws. + //! + //! Complexity: Amortized O(log(size() + this->count(value)). Basic guarantee. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Amortized logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) + { return tree_.find(value) != end(); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Amortized logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp) != end(); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count_dont_splay(const_reference value)const + { return tree_.find_dont_splay(value) != end(); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count_dont_splay(const KeyType& key, KeyValueCompare comp)const + { return tree_.find_dont_splay(key, comp) != end(); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound_dont_splay(const_reference value) const + { return tree_.lower_bound_dont_splay(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound_dont_splay(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound_dont_splay(const_reference value) const + { return tree_.upper_bound_dont_splay(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound_dont_splay(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find_dont_splay(const_reference value) const + { return tree_.find_dont_splay(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.find_dont_splay(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range_dont_splay(const_reference value) const + { return tree_.equal_range_dont_splay(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range_dont_splay(key, comp); } + + //! Requires: value must be an lvalue and shall be in a splay_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the splay_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a splay_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! splay_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a splay_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the splay_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a splay_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! splay_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a splay_set/multisplay_set. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + //! Requires: i must be a valid iterator of *this. + //! + //! Effects: Rearranges the splay set so that the element pointed by i + //! is placed as the root of the tree, improving future searches of this value. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + void splay_up(iterator i) + { tree_.splay_up(i); } + + //! Effects: Rearranges the splay set so that if *this stores an element + //! with a key equivalent to value the element is placed as the root of the + //! tree. If the element is not present returns the last node compared with the key. + //! If the tree is empty, end() is returned. + //! + //! Complexity: Amortized logarithmic. + //! + //! Returns: An iterator to the new root of the tree, end() if the tree is empty. + //! + //! Throws: If the comparison functor throws. + template + iterator splay_down(const KeyType &key, KeyNodePtrCompare comp) + { return tree_.splay_down(key, comp); } + + //! Effects: Rearranges the splay set so that if *this stores an element + //! with a key equivalent to value the element is placed as the root of the + //! tree. + //! + //! Complexity: Amortized logarithmic. + //! + //! Returns: An iterator to the new root of the tree, end() if the tree is empty. + //! + //! Throws: If the predicate throws. + iterator splay_down(const value_type &value) + { return tree_.splay_down(value); } + + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + void rebalance() + { tree_.rebalance(); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + iterator rebalance_subtree(iterator root) + { return tree_.rebalance_subtree(root); } + + /// @cond + friend bool operator==(const splay_set_impl &x, const splay_set_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const splay_set_impl &x, const splay_set_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splay_set_impl &x, const splay_set_impl &y) +#else +(const splay_set_impl &x, const splay_set_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splay_set_impl &x, const splay_set_impl &y) +#else +(const splay_set_impl &x, const splay_set_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splay_set_impl &x, const splay_set_impl &y) +#else +(const splay_set_impl &x, const splay_set_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splay_set_impl &x, const splay_set_impl &y) +#else +(const splay_set_impl &x, const splay_set_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(splay_set_impl &x, splay_set_impl &y) +#else +(splay_set_impl &x, splay_set_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c splay_set that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_splay_set +{ + /// @cond + typedef splay_set_impl + < typename make_splaytree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class splay_set + : public make_splay_set::type +{ + typedef typename make_splay_set + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + splay_set( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + splay_set( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, v_traits) + {} + + static splay_set &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const splay_set &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static splay_set &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const splay_set &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + +//! The class template splay_multiset is an intrusive container, that mimics most of +//! the interface of std::multiset as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class splay_multiset_impl +{ + /// @cond + typedef splaytree_impl tree_type; + + //Non-copyable and non-assignable + splay_multiset_impl (const splay_multiset_impl&); + splay_multiset_impl &operator =(const splay_multiset_impl&); + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + + /// @cond + private: + tree_type tree_; + /// @endcond + + public: + //! Effects: Constructs an empty splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + splay_multiset_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty splay_multiset and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise amortized N * log N, where N is the distance between first and last. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + splay_multiset_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : tree_(false, b, e, cmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~splay_multiset_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of splay_multiset. + //! + //! Effects: Returns a const reference to the splay_multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static splay_multiset_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &splay_multiset_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of splay_multiset. + //! + //! Effects: Returns a const reference to the splay_multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const splay_multiset_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &splay_multiset_impl::tree_); + } + + //! Precondition: it must be a valid iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static splay_multiset_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &splay_multiset_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const splay_multiset_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &splay_multiset_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the splay_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the splay_multiset. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two splay_multisets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(splay_multiset_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const splay_multiset_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the splay_multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(reference value) + { return tree_.insert_equal(this->end(), value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts x into the splay_multiset, using pos as a hint to + //! where it will be inserted. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Amortized logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_equal(hint, value); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the splay_multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Insert range is amortized O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_equal(b, e); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Complexity: Average complexity for erase range is amortized + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is amortized + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Amortized logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) + { return tree_.count(value); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Amortized logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) + { return tree_.count(key, comp); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count_dont_splay(const_reference value) const + { return tree_.count_dont_splay(value); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.count_dont_splay(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound_dont_splay(const_reference value) const + { return tree_.lower_bound_dont_splay(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound_dont_splay(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound_dont_splay(const_reference value) const + { return tree_.upper_bound_dont_splay(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound_dont_splay(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find_dont_splay(const_reference value) const + { return tree_.find_dont_splay(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.find_dont_splay(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range_dont_splay(const_reference value) const + { return tree_.equal_range_dont_splay(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range_dont_splay(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range_dont_splay(key, comp); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a set/splay_multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + //! Requires: i must be a valid iterator of *this. + //! + //! Effects: Rearranges the splay set so that the element pointed by i + //! is placed as the root of the tree, improving future searches of this value. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + void splay_up(iterator i) + { tree_.splay_up(i); } + + //! Effects: Rearranges the splay set so that if *this stores an element + //! with a key equivalent to value the element is placed as the root of the + //! tree. If the element is not present returns the last node compared with the key. + //! If the tree is empty, end() is returned. + //! + //! Complexity: Amortized logarithmic. + //! + //! Returns: An iterator to the new root of the tree, end() if the tree is empty. + //! + //! Throws: If the comparison functor throws. + template + iterator splay_down(const KeyType &key, KeyNodePtrCompare comp) + { return tree_.splay_down(key, comp); } + + //! Effects: Rearranges the splay set so that if *this stores an element + //! with a key equivalent to value the element is placed as the root of the + //! tree. + //! + //! Complexity: Amortized logarithmic. + //! + //! Returns: An iterator to the new root of the tree, end() if the tree is empty. + //! + //! Throws: If the predicate throws. + iterator splay_down(const value_type &value) + { return tree_.splay_down(value); } + + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + void rebalance() + { tree_.rebalance(); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + iterator rebalance_subtree(iterator root) + { return tree_.rebalance_subtree(root); } + + /// @cond + friend bool operator==(const splay_multiset_impl &x, const splay_multiset_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const splay_multiset_impl &x, const splay_multiset_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splay_multiset_impl &x, const splay_multiset_impl &y) +#else +(const splay_multiset_impl &x, const splay_multiset_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splay_multiset_impl &x, const splay_multiset_impl &y) +#else +(const splay_multiset_impl &x, const splay_multiset_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splay_multiset_impl &x, const splay_multiset_impl &y) +#else +(const splay_multiset_impl &x, const splay_multiset_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splay_multiset_impl &x, const splay_multiset_impl &y) +#else +(const splay_multiset_impl &x, const splay_multiset_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(splay_multiset_impl &x, splay_multiset_impl &y) +#else +(splay_multiset_impl &x, splay_multiset_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c splay_multiset that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_splay_multiset +{ + /// @cond + typedef splay_multiset_impl + < typename make_splaytree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class splay_multiset + : public make_splay_multiset::type +{ + typedef typename make_splay_multiset + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + splay_multiset( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + splay_multiset( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, v_traits) + {} + + static splay_multiset &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const splay_multiset &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static splay_multiset &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const splay_multiset &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SPLAY_SET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splay_set_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splay_set_hook.hpp new file mode 100644 index 0000000000..d42f4c8bee --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splay_set_hook.hpp @@ -0,0 +1,292 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_SPLAY_SET_HOOK_HPP +#define BOOST_INTRUSIVE_SPLAY_SET_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond +template +struct get_splay_set_node_algo +{ + typedef splaytree_algorithms > type; +}; +/// @endcond + +//! Helper metafunction to define a \c splay_set_base_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_splay_set_base_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_splay_set_node_algo + , typename packed_options::tag + , packed_options::link_mode + , detail::SplaySetBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Derive a class from splay_set_base_hook in order to store objects in +//! in a splay_set/splay_multiset. splay_set_base_hook holds the data necessary to maintain +//! the splay_set/splay_multiset and provides an appropriate value_traits class for splay_set/splay_multiset. +//! +//! The hook admits the following options: \c tag<>, \c void_pointer<>, +//! \c link_mode<> and \c optimize_size<>. +//! +//! \c tag<> defines a tag to identify the node. +//! The same tag value can be used in different classes, but if a class is +//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its +//! unique tag. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class splay_set_base_hook + : public make_splay_set_base_hook< + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + splay_set_base_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + splay_set_base_hook(const splay_set_base_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + splay_set_base_hook& operator=(const splay_set_base_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~splay_set_base_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(splay_set_base_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +//! Helper metafunction to define a \c splay_set_member_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_splay_set_member_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_splay_set_node_algo + , member_tag + , packed_options::link_mode + , detail::NoBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Put a public data member splay_set_member_hook in order to store objects of this +//! class in a splay_set/splay_multiset. splay_set_member_hook holds the data +//! necessary for maintaining the splay_set/splay_multiset and provides an appropriate +//! value_traits class for splay_set/splay_multiset. +//! +//! The hook admits the following options: \c void_pointer<>, +//! \c link_mode<> and \c optimize_size<>. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class splay_set_member_hook + : public make_splay_set_member_hook< + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3 + #else + Options... + #endif + >::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + splay_set_member_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + splay_set_member_hook(const splay_set_member_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + splay_set_member_hook& operator=(const splay_set_member_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in a set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~splay_set_member_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(splay_set_member_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SPLAY_SET_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splaytree.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splaytree.hpp new file mode 100644 index 0000000000..1cb2a2a797 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splaytree.hpp @@ -0,0 +1,1651 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_SPLAYTREE_HPP +#define BOOST_INTRUSIVE_SPLAYTREE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace boost { +namespace intrusive { + +/// @cond + +template +struct splaysetopt +{ + typedef ValueTraits value_traits; + typedef Compare compare; + typedef SizeType size_type; + static const bool constant_time_size = ConstantTimeSize; +}; + +template +struct splay_set_defaults + : pack_options + < none + , base_hook + , constant_time_size + , size_type + , compare > + >::type +{}; + +/// @endcond + +//! The class template splaytree is an intrusive splay tree container that +//! is used to construct intrusive splay_set and splay_multiset containers. The no-throw +//! guarantee holds only, if the value_compare object +//! doesn't throw. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<> and +//! \c compare<>. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class splaytree_impl + : private detail::clear_on_destructor_base > +{ + template friend class detail::clear_on_destructor_base; + public: + typedef typename Config::value_traits value_traits; + /// @cond + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + /// @endcond + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::const_pointer const_pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef value_type key_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename Config::size_type size_type; + typedef typename Config::compare value_compare; + typedef value_compare key_compare; + typedef tree_iterator iterator; + typedef tree_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef splaytree_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + + /// @cond + private: + typedef detail::size_holder size_traits; + + //noncopyable + splaytree_impl (const splaytree_impl&); + splaytree_impl operator =(const splaytree_impl&); + + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + //Constant-time size is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(constant_time_size && ((int)real_value_traits::link_mode == (int)auto_unlink))); + + struct header_plus_size : public size_traits + { node header_; }; + + struct node_plus_pred_t : public detail::ebo_functor_holder + { + node_plus_pred_t(const value_compare &comp) + : detail::ebo_functor_holder(comp) + {} + header_plus_size header_plus_size_; + }; + + struct data_t : public splaytree_impl::value_traits + { + typedef typename splaytree_impl::value_traits value_traits; + data_t(const value_compare & comp, const value_traits &val_traits) + : value_traits(val_traits), node_plus_pred_(comp) + {} + node_plus_pred_t node_plus_pred_; + } data_; + + const value_compare &priv_comp() const + { return data_.node_plus_pred_.get(); } + + value_compare &priv_comp() + { return data_.node_plus_pred_.get(); } + + const node &priv_header() const + { return data_.node_plus_pred_.header_plus_size_.header_; } + + node &priv_header() + { return data_.node_plus_pred_.header_plus_size_.header_; } + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(detail::boost_intrusive_get_pointer(ptr))); + } + + size_traits &priv_size_traits() + { return data_.node_plus_pred_.header_plus_size_; } + + const size_traits &priv_size_traits() const + { return data_.node_plus_pred_.header_plus_size_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_.get_value_traits(*this); } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_; } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_.get_value_traits(*this); } + + /// @endcond + + public: + + const real_value_traits &get_real_value_traits() const + { return this->get_real_value_traits(detail::bool_()); } + + real_value_traits &get_real_value_traits() + { return this->get_real_value_traits(detail::bool_()); } + + typedef typename node_algorithms::insert_commit_data insert_commit_data; + + //! Effects: Constructs an empty tree. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructorof the value_compare object throws. Basic guarantee. + splaytree_impl( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + } + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty tree and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise amortized N * log N, where N is the distance between first and last. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. Basic guarantee. + template + splaytree_impl ( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + if(unique) + this->insert_unique(b, e); + else + this->insert_equal(b, e); + } + + //! Effects: Detaches all elements from this. The objects in the set + //! are not deleted (i.e. no destructors are called), but the nodes according to + //! the value_traits template parameter are reinitialized and thus can be reused. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~splaytree_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return iterator(node_algorithms::begin_node(&priv_header()), this); } + + //! Effects: Returns a const_iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return cbegin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return const_iterator(node_algorithms::begin_node(&priv_header()), this); } + + //! Effects: Returns an iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return iterator (node_ptr(&priv_header()), this); } + + //! Effects: Returns a const_iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return cend(); } + + //! Effects: Returns a const_iterator pointing to the end of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return const_iterator (uncast(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return reverse_iterator(end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return const_reverse_iterator(end()); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return const_reverse_iterator(begin()); } + + //! Precondition: end_iterator must be a valid end iterator + //! of splaytree. + //! + //! Effects: Returns a const reference to the splaytree associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static splaytree_impl &container_from_end_iterator(iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of splaytree. + //! + //! Effects: Returns a const reference to the splaytree associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const splaytree_impl &container_from_end_iterator(const_iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: it must be a valid iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the tree associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static splaytree_impl &container_from_iterator(iterator it) + { return priv_container_from_iterator(it); } + + //! Precondition: it must be a valid end const_iterator + //! of rbtree. + //! + //! Effects: Returns a const reference to the tree associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const splaytree_impl &container_from_iterator(const_iterator it) + { return priv_container_from_iterator(it); } + + //! Effects: Returns the value_compare object used by the tree. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return priv_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return this->cbegin() == this->cend(); } + + //! Effects: Returns the number of elements stored in the tree. + //! + //! Complexity: Linear to elements contained in *this + //! if constant-time size option is disabled. Constant time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { + if(constant_time_size){ + return this->priv_size_traits().get_size(); + } + else{ + return (size_type)node_algorithms::size(const_node_ptr(&priv_header())); + } + } + + //! Effects: Swaps the contents of two splaytrees. + //! + //! Complexity: Constant. + //! + //! Throws: If the comparison functor's swap call throws. + void swap(splaytree_impl& other) + { + //This can throw + using std::swap; + swap(priv_comp(), priv_comp()); + //These can't throw + node_algorithms::swap_tree(node_ptr(&priv_header()), node_ptr(&other.priv_header())); + if(constant_time_size){ + size_type backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(other.priv_size_traits().get_size()); + other.priv_size_traits().set_size(backup); + } + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the tree before the lower bound. + //! + //! Complexity: Average complexity for insert element is amortized + //! logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_equal_lower_bound + (node_ptr(&priv_header()), to_insert, key_node_comp), this); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator. + //! + //! Effects: Inserts x into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case) + //! + //! Complexity: Amortized logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare ordering function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(const_iterator hint, reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_equal + (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a each element of a range into the tree + //! before the upper bound of the key of each element. + //! + //! Complexity: Insert range is in general amortized O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_equal(Iterator b, Iterator e) + { + if(this->empty()){ + iterator end(this->end()); + for (; b != e; ++b) + this->insert_equal(end, *b); + } + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the tree if the value + //! is not already present. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert_unique(reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(value, priv_comp(), commit_data); + if(!ret.second) + return ret; + return std::pair (insert_unique_commit(value, commit_data), true); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator + //! + //! Effects: Tries to insert x into the tree, using "hint" as a hint + //! to where it will be inserted. + //! + //! Complexity: Amortized logarithmic in general, but it is amortized + //! constant time (two comparisons in the worst case) + //! if t is inserted immediately before hint. + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_unique(const_iterator hint, reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(hint, value, priv_comp(), commit_data); + if(!ret.second) + return ret.first; + return insert_unique_commit(value, commit_data); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Tries to insert each element of a range into the tree. + //! + //! Complexity: Insert range is in general amortized O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: Nothing. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_unique(Iterator b, Iterator e) + { + for (; b != e; ++b) + this->insert_unique(*b); + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), key, comp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. The difference is that + //! key_value_comp compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp ordering function throws. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + (const_iterator hint, const KeyType &key + ,KeyValueCompare key_value_comp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + std::pair ret = + node_algorithms::insert_unique_check + (node_ptr(&priv_header()), hint.pointed_node(), key, comp, commit_data); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the container between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the avl_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + node_algorithms::insert_unique_commit + (node_ptr(&priv_header()), to_insert, commit_data); + return iterator(to_insert, this); + } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { + const_iterator ret(i); + ++ret; + node_ptr to_erase(i.pointed_node()); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase)); + node_algorithms::erase(&priv_header(), to_erase); + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + return ret.unconst(); + } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is amortized + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { size_type n; return private_erase(b, e, n); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return this->erase(value, priv_comp()); } + + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { + node_ptr to_erase(i.pointed_node()); + iterator ret(this->erase(i)); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + return ret; + } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is amortized + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { size_type n; return private_erase(b, e, n, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { + std::pair p = this->equal_range(value); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Amortized O(log(size() + N). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { + if(safemode_or_autounlink){ + this->clear_and_dispose(detail::null_disposer()); + } + else{ + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(0); + } + } + + //! Effects: Erases all of the elements calling disposer(p) for + //! each node to be erased. + //! Complexity: Amortized O(log(size() + N)), + //! where N is the number of elements in the container. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. Calls N times to disposer functor. + template + void clear_and_dispose(Disposer disposer) + { + node_algorithms::clear_and_dispose(node_ptr(&priv_header()) + , detail::node_disposer(disposer, this)); + this->priv_size_traits().set_size(0); + } + + //! Effects: Returns the number of contained elements with the given value + //! + //! Complexity: Amortized logarithmic to the number of elements contained plus lineal + //! to number of objects with the given value. + //! + //! Throws: Nothing. + size_type count(const_reference value) + { return this->count(value, priv_comp()); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Amortized logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: Nothing. + template + size_type count(const KeyType &key, KeyValueCompare comp) + { + std::pair ret = this->equal_range(key, comp); + return std::distance(ret.first, ret.second); + } + + //! Effects: Returns the number of contained elements with the given value + //! + //! Complexity: Amortized logarithmic to the number of elements contained plus lineal + //! to number of objects with the given value. + //! + //! Throws: Nothing. + size_type count_dont_splay(const_reference value) const + { return this->count_dont_splay(value, priv_comp()); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Amortized logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: Nothing. + template + size_type count_dont_splay(const KeyType &key, KeyValueCompare comp) const + { + std::pair ret = this->equal_range_dont_splay(key, comp); + return std::distance(ret.first, ret.second); + } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + iterator lower_bound(const_reference value) + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator lower_bound_dont_splay(const_reference value) const + { return this->lower_bound_dont_splay(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator lower_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator lower_bound_dont_splay(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp, false), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + iterator upper_bound(const_reference value) + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + template + iterator upper_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator upper_bound_dont_splay(const_reference value) const + { return this->upper_bound_dont_splay(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator upper_bound_dont_splay(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::upper_bound_dont_splay + (const_node_ptr(&priv_header()), key, key_node_comp, false), this); + } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + iterator find(const_reference value) + { return this->find(value, priv_comp()); } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + template + iterator find(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator find_dont_splay(const_reference value) const + { return this->find_dont_splay(value, priv_comp()); } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator find_dont_splay(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp, false), this); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + std::pair equal_range(const_reference value) + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + template + std::pair equal_range(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(iterator(ret.first, this), iterator(ret.second, this)); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair + equal_range_dont_splay(const_reference value) const + { return this->equal_range_dont_splay(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair + equal_range_dont_splay(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp, false)); + return std::pair(const_iterator(ret.first, this), const_iterator(ret.second, this)); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const splaytree_impl &src, Cloner cloner, Disposer disposer) + { + this->clear_and_dispose(disposer); + if(!src.empty()){ + detail::exception_disposer + rollback(*this, disposer); + node_algorithms::clone + (const_node_ptr(&src.priv_header()) + ,node_ptr(&this->priv_header()) + ,detail::node_cloner(cloner, this) + ,detail::node_disposer(disposer, this)); + this->priv_size_traits().set_size(src.priv_size_traits().get_size()); + this->priv_comp() = src.priv_comp(); + rollback.release(); + } + } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { + node_ptr to_be_disposed(node_algorithms::unlink_leftmost_without_rebalance + (node_ptr(&priv_header()))); + if(!to_be_disposed) + return 0; + this->priv_size_traits().decrement(); + if(safemode_or_autounlink)//If this is commented does not work with normal_link + node_algorithms::init(to_be_disposed); + return get_real_value_traits().to_value_ptr(to_be_disposed); + } + + //! Requires: i must be a valid iterator of *this. + //! + //! Effects: Rearranges the splay set so that the element pointed by i + //! is placed as the root of the tree, improving future searches of this value. + //! + //! Complexity: Amortized logarithmic. + //! + //! Throws: Nothing. + void splay_up(iterator i) + { return node_algorithms::splay_up(i.pointed_node(), &priv_header()); } + + //! Effects: Rearranges the splay set so that if *this stores an element + //! with a key equivalent to value the element is placed as the root of the + //! tree. If the element is not present returns the last node compared with the key. + //! If the tree is empty, end() is returned. + //! + //! Complexity: Amortized logarithmic. + //! + //! Returns: An iterator to the new root of the tree, end() if the tree is empty. + //! + //! Throws: If the comparison functor throws. + template + iterator splay_down(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + node_ptr r = node_algorithms::splay_down(&priv_header(), key, key_node_comp); + return iterator(r, this); + } + + //! Effects: Rearranges the splay set so that if *this stores an element + //! with a key equivalent to value the element is placed as the root of the + //! tree. + //! + //! Complexity: Amortized logarithmic. + //! + //! Returns: An iterator to the new root of the tree, end() if the tree is empty. + //! + //! Throws: If the predicate throws. + iterator splay_down(const value_type &value) + { return this->splay_down(value, priv_comp()); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { + node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this) + , node_ptr(&priv_header()) + , get_real_value_traits().to_node_ptr(with_this)); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return iterator (value_traits::to_node_ptr(value), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return const_iterator (value_traits::to_node_ptr(const_cast (value)), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return iterator (value_traits::to_node_ptr(value), this); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return const_iterator (value_traits::to_node_ptr(const_cast (value)), this); } + + //! Requires: value shall not be in a tree. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { node_algorithms::init(value_traits::to_node_ptr(value)); } + + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + void rebalance() + { node_algorithms::rebalance(node_ptr(&priv_header())); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + iterator rebalance_subtree(iterator root) + { return iterator(node_algorithms::rebalance_subtree(root.pointed_node()), this); } + +/* + //! Effects: removes x from a tree of the appropriate type. It has no effect, + //! if x is not in such a tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This static function is only usable with the "safe mode" + //! hook and non-constant time size lists. Otherwise, the user must use + //! the non-static "erase(reference )" member. If the user calls + //! this function with a non "safe mode" or constant time size list + //! a compilation error will be issued. + template + static void remove_node(T& value) + { + //This function is only usable for safe mode hooks and non-constant + //time lists. + //BOOST_STATIC_ASSERT((!(safemode_or_autounlink && constant_time_size))); + BOOST_STATIC_ASSERT((!constant_time_size)); + BOOST_STATIC_ASSERT((boost::is_convertible::value)); + node_ptr to_remove(value_traits::to_node_ptr(value)); + node_algorithms::unlink_and_rebalance(to_remove); + if(safemode_or_autounlink) + node_algorithms::init(to_remove); + } +*/ + + /// @cond + private: + template + iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer) + { + for(n = 0; b != e; ++n) + this->erase_and_dispose(b++, disposer); + return b.unconst(); + } + + iterator private_erase(const_iterator b, const_iterator e, size_type &n) + { + for(n = 0; b != e; ++n) + this->erase(b++); + return b.unconst(); + } + /// @endcond + + private: + static splaytree_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) + { + header_plus_size *r = detail::parent_from_member + ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), &header_plus_size::header_); + node_plus_pred_t *n = detail::parent_from_member + (r, &node_plus_pred_t::header_plus_size_); + data_t *d = detail::parent_from_member(n, &data_t::node_plus_pred_); + splaytree_impl *rb = detail::parent_from_member(d, &splaytree_impl::data_); + return *rb; + } + + static splaytree_impl &priv_container_from_iterator(const const_iterator &it) + { return priv_container_from_end_iterator(it.end_iterator_from_it()); } +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator< +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splaytree_impl &x, const splaytree_impl &y) +#else +(const splaytree_impl &x, const splaytree_impl &y) +#endif +{ return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +bool operator== +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splaytree_impl &x, const splaytree_impl &y) +#else +(const splaytree_impl &x, const splaytree_impl &y) +#endif +{ + typedef splaytree_impl tree_type; + typedef typename tree_type::const_iterator const_iterator; + + if(tree_type::constant_time_size && x.size() != y.size()){ + return false; + } + const_iterator end1 = x.end(); + const_iterator i1 = x.begin(); + const_iterator i2 = y.begin(); + if(tree_type::constant_time_size){ + while (i1 != end1 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1; + } + else{ + const_iterator end2 = y.end(); + while (i1 != end1 && i2 != end2 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1 && i2 == end2; + } +} + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splaytree_impl &x, const splaytree_impl &y) +#else +(const splaytree_impl &x, const splaytree_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splaytree_impl &x, const splaytree_impl &y) +#else +(const splaytree_impl &x, const splaytree_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splaytree_impl &x, const splaytree_impl &y) +#else +(const splaytree_impl &x, const splaytree_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const splaytree_impl &x, const splaytree_impl &y) +#else +(const splaytree_impl &x, const splaytree_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(splaytree_impl &x, splaytree_impl &y) +#else +(splaytree_impl &x, splaytree_impl &y) +#endif +{ x.swap(y); } + +/// @cond + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_splaytree_opt +{ + typedef typename pack_options + < splay_set_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + typedef typename detail::get_value_traits + ::type value_traits; + + typedef splaysetopt + < value_traits + , typename packed_options::compare + , typename packed_options::size_type + , packed_options::constant_time_size + > type; +}; +/// @endcond + +//! Helper metafunction to define a \c splaytree that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_splaytree +{ + /// @cond + typedef splaytree_impl + < typename make_splaytree_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class splaytree + : public make_splaytree::type +{ + typedef typename make_splaytree + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::real_value_traits real_value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + splaytree( const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, v_traits) + {} + + template + splaytree( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const value_traits &v_traits = value_traits()) + : Base(unique, b, e, cmp, v_traits) + {} + + static splaytree &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const splaytree &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } +}; + +#endif + + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SPLAYTREE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splaytree_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splaytree_algorithms.hpp new file mode 100644 index 0000000000..777b3b9b5e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/splaytree_algorithms.hpp @@ -0,0 +1,976 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +// The implementation of splay trees is based on the article and code published +// in C++ Users Journal "Implementing Splay Trees in C++" (September 1, 2005). +// +// The code has been modified and (supposely) improved by Ion Gaztanaga. +// Here is the header of the file used as base code: +// +// splay_tree.h -- implementation of a STL complatible splay tree. +// +// Copyright (c) 2004 Ralf Mattethat +// +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. +// This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. +// +// Please send questions, comments, complaints, performance data, etc to +// ralf.mattethat@teknologisk.dk +// +// Requirements for element type +// * must be copy-constructible +// * destructor must not throw exception +// +// Methods marked with note A only throws an exception if the evaluation of the +// predicate throws an exception. If an exception is thrown the call has no +// effect on the containers state +// +// Methods marked with note B only throws an exception if the coppy constructor +// or assignment operator of the predicate throws an exception. If an exception +// is thrown the call has no effect on the containers state +// +// iterators are only invalidated, if the element pointed to by the iterator +// is deleted. The same goes for element references +// + +#ifndef BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond +namespace detail { + +template +struct splaydown_rollback +{ + typedef typename NodeTraits::node_ptr node_ptr; + splaydown_rollback( const node_ptr *pcur_subtree, node_ptr header + , node_ptr leftmost , node_ptr rightmost) + : pcur_subtree_(pcur_subtree) , header_(header) + , leftmost_(leftmost) , rightmost_(rightmost) + {} + + void release() + { pcur_subtree_ = 0; } + + ~splaydown_rollback() + { + if(pcur_subtree_){ + //Exception can only be thrown by comp, but + //tree invariants still hold. *pcur_subtree is the current root + //so link it to the header. + NodeTraits::set_parent(*pcur_subtree_, header_); + NodeTraits::set_parent(header_, *pcur_subtree_); + //Recover leftmost/rightmost pointers + NodeTraits::set_left (header_, leftmost_); + NodeTraits::set_right(header_, rightmost_); + } + } + const node_ptr *pcur_subtree_; + node_ptr header_, leftmost_, rightmost_; +}; + +} //namespace detail { +/// @endcond + +//! A splay tree is an implementation of a binary search tree. The tree is +//! self balancing using the splay algorithm as described in +//! +//! "Self-Adjusting Binary Search Trees +//! by Daniel Dominic Sleator and Robert Endre Tarjan +//! AT&T Bell Laboratories, Murray Hill, NJ +//! Journal of the ACM, Vol 32, no 3, July 1985, pp 652-686 + +//! splaytree_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the circular list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! Static functions: +//! +//! static node_ptr get_parent(const_node_ptr n); +//! +//! static void set_parent(node_ptr n, node_ptr parent); +//! +//! static node_ptr get_left(const_node_ptr n); +//! +//! static void set_left(node_ptr n, node_ptr left); +//! +//! static node_ptr get_right(const_node_ptr n); +//! +//! static void set_right(node_ptr n, node_ptr right); +template +class splaytree_algorithms +{ + /// @cond + private: + typedef detail::tree_algorithms tree_algorithms; + /// @endcond + + public: + typedef typename NodeTraits::node node; + typedef NodeTraits node_traits; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + + //! This type is the information that will be + //! filled by insert_unique_check + typedef typename tree_algorithms::insert_commit_data insert_commit_data; + + /// @cond + private: + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(::boost::intrusive::detail::boost_intrusive_get_pointer(ptr))); + } + /// @endcond + + public: + static node_ptr begin_node(const_node_ptr header) + { return tree_algorithms::begin_node(header); } + + static node_ptr end_node(const_node_ptr header) + { return tree_algorithms::end_node(header); } + + //! Requires: node is a node of the tree or an node initialized + //! by init(...). + //! + //! Effects: Returns true if the node is initialized by init(). + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + static bool unique(const_node_ptr node) + { return tree_algorithms::unique(node); } + + static void unlink(node_ptr node) + { tree_algorithms::unlink(node); } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr node2) + { + if(node1 == node2) + return; + + node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2)); + swap_nodes(node1, header1, node2, header2); + } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees with header header1 and header2. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) + { tree_algorithms::swap_nodes(node1, header1, node2, header2); } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing and comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) + { + if(node_to_be_replaced == new_node) + return; + replace_node(node_to_be_replaced, tree_algorithms::get_header(node_to_be_replaced), new_node); + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! with header "header" and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) + { tree_algorithms::replace_node(node_to_be_replaced, header, new_node); } + + //! Requires: p is a node from the tree except the header. + //! + //! Effects: Returns the next node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr next_node(node_ptr p) + { return tree_algorithms::next_node(p); } + + //! Requires: p is a node from the tree except the leftmost node. + //! + //! Effects: Returns the previous node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr prev_node(node_ptr p) + { return tree_algorithms::prev_node(p); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: After the function unique(node) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init(node_ptr node) + { tree_algorithms::init(node); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: Initializes the header to represent an empty tree. + //! unique(header) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init_header(node_ptr header) + { tree_algorithms::init_header(header); } + + //! Requires: "disposer" must be an object function + //! taking a node_ptr parameter and shouldn't throw. + //! + //! Effects: Empties the target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clear_and_dispose(node_ptr header, Disposer disposer) + { tree_algorithms::clear_and_dispose(header, disposer); } + + //! Requires: node is a node of the tree but it's not the header. + //! + //! Effects: Returns the number of nodes of the subtree. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr node) + { return tree_algorithms::count(node); } + + //! Requires: header is the header node of the tree. + //! + //! Effects: Returns the number of nodes above the header. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t size(const_node_ptr header) + { return tree_algorithms::size(header); } + + //! Requires: header1 and header2 must be the header nodes + //! of two trees. + //! + //! Effects: Swaps two trees. After the function header1 will contain + //! links to the second tree and header2 will have links to the first tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static void swap_tree(node_ptr header1, node_ptr header2) + { return tree_algorithms::swap_tree(header1, header2); } + + //! Requires: "header" must be the header node of a tree. + //! "commit_data" must have been obtained from a previous call to + //! "insert_unique_check". No objects should have been inserted or erased + //! from the set between the "insert_unique_check" that filled "commit_data" + //! and the call to "insert_commit". + //! + //! + //! Effects: Inserts new_node in the set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_unique_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + static void insert_unique_commit + (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data) + { tree_algorithms::insert_unique_commit(header, new_value, commit_data); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (node_ptr header, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data) + { + splay_down(header, key, comp); + return tree_algorithms::insert_unique_check(header, key, comp, commit_data); + } + + template + static std::pair insert_unique_check + (node_ptr header, node_ptr hint, const KeyType &key + ,KeyNodePtrCompare comp, insert_commit_data &commit_data) + { + splay_down(header, key, comp); + return tree_algorithms::insert_unique_check(header, hint, key, comp, commit_data); + } + + static bool is_header(const_node_ptr p) + { return tree_algorithms::is_header(p); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the element that is equivalent to + //! "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr find + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp, bool splay = true) + { + if(splay) + splay_down(uncast(header), key, comp); + node_ptr end = uncast(header); + node_ptr y = lower_bound(header, key, comp, false); + node_ptr r = (y == end || comp(key, y)) ? end : y; + return r; + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an a pair of node_ptr delimiting a range containing + //! all elements that are equivalent to "key" according to "comp" or an + //! empty range that indicates the position where those elements would be + //! if they there are no equivalent elements. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static std::pair equal_range + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp, bool splay = true) + { + //if(splay) + //splay_down(uncast(header), key, comp); + std::pair ret = + tree_algorithms::equal_range(header, key, comp); + + if(splay) + splay_up(ret.first, uncast(header)); + return ret; + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is + //! not less than "key" according to "comp" or "header" if that element does + //! not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr lower_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp, bool splay = true) + { + //if(splay) + //splay_down(uncast(header), key, comp); + node_ptr y = tree_algorithms::lower_bound(header, key, comp); + if(splay) + splay_up(y, uncast(header)); + return y; + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is greater + //! than "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr upper_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp, bool splay = true) + { + //if(splay) + //splay_down(uncast(header), key, comp); + node_ptr y = tree_algorithms::upper_bound(header, key, comp); + if(splay) + splay_up(y, uncast(header)); + return y; + } + + //! Requires: "header" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from + //! the "header"'s tree. + //! + //! Effects: Inserts new_node into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case). + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if new_node is inserted immediately before "hint". + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal + (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp) + { + splay_down(header, new_node, comp); + return tree_algorithms::insert_equal(header, hint, new_node, comp); + } + + + //! Requires: "header" must be the header node of a tree. + //! "pos" must be a valid iterator or header (end) node. + //! "pos" must be an iterator pointing to the successor to "new_node" + //! once inserted according to the order of already inserted nodes. This function does not + //! check "pos" and this precondition must be guaranteed by the caller. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "pos" is not the successor of the newly inserted "new_node" + //! tree invariants might be broken. + static node_ptr insert_before + (node_ptr header, node_ptr pos, node_ptr new_node) + { + tree_algorithms::insert_before(header, pos, new_node); + splay_up(new_node, header); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering no less than the + //! greatest inserted key. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "new_node" is less than the greatest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + static void push_back(node_ptr header, node_ptr new_node) + { + tree_algorithms::push_back(header, new_node); + splay_up(new_node, header); + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering, no greater than the + //! lowest inserted key. + //! + //! Effects: Inserts new_node into the tree before "pos". + //! + //! Complexity: Constant-time. + //! + //! Throws: Nothing. + //! + //! Note: If "new_node" is greater than the lowest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + static void push_front(node_ptr header, node_ptr new_node) + { + tree_algorithms::push_front(header, new_node); + splay_up(new_node, header); + } + + //! Requires: "header" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the upper bound + //! according to "comp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_upper_bound + (node_ptr header, node_ptr new_node, NodePtrCompare comp) + { + splay_down(header, new_node, comp); + return tree_algorithms::insert_equal_upper_bound(header, new_node, comp); + } + + //! Requires: "header" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the lower bound + //! according to "comp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_lower_bound + (node_ptr header, node_ptr new_node, NodePtrCompare comp) + { + splay_down(header, new_node, comp); + return tree_algorithms::insert_equal_lower_bound(header, new_node, comp); + } + + //! Requires: "cloner" must be a function + //! object taking a node_ptr and returning a new cloned node of it. "disposer" must + //! take a node_ptr and shouldn't throw. + //! + //! Effects: First empties target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Then, duplicates the entire tree pointed by "source_header" cloning each + //! source node with node_ptr Cloner::operator()(node_ptr) to obtain + //! the nodes of the target tree. If "cloner" throws, the cloned target nodes + //! are disposed using void disposer(node_ptr). + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clone + (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer) + { tree_algorithms::clone(source_header, target_header, cloner, disposer); } + + // delete node | complexity : constant | exception : nothrow + static void erase(node_ptr header, node_ptr z, bool splay = true) + { +// node_base* n = t->right; +// if( t->left != 0 ){ +// node_base* l = t->previous(); +// splay_up( l , t ); +// n = t->left; +// n->right = t->right; +// if( n->right != 0 ) +// n->right->parent = n; +// } +// +// if( n != 0 ) +// n->parent = t->parent; +// +// if( t->parent->left == t ) +// t->parent->left = n; +// else // must be ( t->parent->right == t ) +// t->parent->right = n; +// +// if( data_->parent == t ) +// data_->parent = find_leftmost(); + //posibility 1 + if(splay && NodeTraits::get_left(z)){ + splay_up(prev_node(z), header); + } + /* + //possibility 2 + if(splay && NodeTraits::get_left(z) != 0 ){ + node_ptr l = NodeTraits::get_left(z); + splay_up(l, header); + }*//* + if(splay && NodeTraits::get_left(z) != 0 ){ + node_ptr l = prev_node(z); + splay_up_impl(l, z); + }*/ + /* + //possibility 4 + if(splay){ + splay_up(z, header); + }*/ + + //if(splay) + //splay_up(z, header); + tree_algorithms::erase(header, z); + } + + // bottom-up splay, use data_ as parent for n | complexity : logarithmic | exception : nothrow + static void splay_up(node_ptr n, node_ptr header) + { + if(n == header){ // do a splay for the right most node instead + // this is to boost performance of equal_range/count on equivalent containers in the case + // where there are many equal elements at the end + n = NodeTraits::get_right(header); + } + + node_ptr t = header; + + if( n == t ) return; + + for( ;; ){ + node_ptr p(NodeTraits::get_parent(n)); + node_ptr g(NodeTraits::get_parent(p)); + + if( p == t ) break; + + if( g == t ){ + // zig + rotate(n); + } + else if ((NodeTraits::get_left(p) == n && NodeTraits::get_left(g) == p) || + (NodeTraits::get_right(p) == n && NodeTraits::get_right(g) == p) ){ + // zig-zig + rotate(p); + rotate(n); + } + else{ + // zig-zag + rotate(n); + rotate(n); + } + } + } + + // top-down splay | complexity : logarithmic | exception : strong, note A + template + static node_ptr splay_down(node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { + if(!NodeTraits::get_parent(header)) + return header; + //Most splay tree implementations use a dummy/null node to implement. + //this function. This has some problems for a generic library like Intrusive: + // + // * The node might not have a default constructor. + // * The default constructor could throw. + // + //We already have a header node. Leftmost and rightmost nodes of the tree + //are not changed when splaying (because the invariants of the tree don't + //change) We can back up them, use the header as the null node and + //reassign old values after the function has been completed. + node_ptr t = NodeTraits::get_parent(header); + //Check if tree has a single node + if(!NodeTraits::get_left(t) && !NodeTraits::get_right(t)) + return t; + //Backup leftmost/rightmost + node_ptr leftmost (NodeTraits::get_left(header)); + node_ptr rightmost(NodeTraits::get_right(header)); + { + detail::splaydown_rollback rollback(&t, header, leftmost, rightmost); + node_ptr null = header; + node_ptr l = null; + node_ptr r = null; + + for( ;; ){ + if(comp(key, t)){ + if(NodeTraits::get_left(t) == 0 ) + break; + if(comp(key, NodeTraits::get_left(t))){ + t = tree_algorithms::rotate_right(t); + + if(NodeTraits::get_left(t) == 0) + break; + link_right(t, r); + } + else if(comp(NodeTraits::get_left(t), key)){ + link_right(t, r); + + if(NodeTraits::get_right(t) == 0 ) + break; + link_left(t, l); + } + else{ + link_right(t, r); + } + } + else if(comp(t, key)){ + if(NodeTraits::get_right(t) == 0 ) + break; + + if(comp(NodeTraits::get_right(t), key)){ + t = tree_algorithms::rotate_left( t ); + + if(NodeTraits::get_right(t) == 0 ) + break; + link_left(t, l); + } + else if(comp(key, NodeTraits::get_right(t))){ + link_left(t, l); + + if(NodeTraits::get_left(t) == 0) + break; + + link_right(t, r); + } + else{ + link_left(t, l); + } + } + else{ + break; + } + } + + assemble(t, l, r, null); + rollback.release(); + } + + //t is the current root + NodeTraits::set_parent(header, t); + NodeTraits::set_parent(t, header); + //Recover leftmost/rightmost pointers + NodeTraits::set_left (header, leftmost); + NodeTraits::set_right(header, rightmost); + return t; + } + + //! Requires: header must be the header of a tree. + //! + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + static void rebalance(node_ptr header) + { tree_algorithms::rebalance(header); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + static node_ptr rebalance_subtree(node_ptr old_root) + { return tree_algorithms::rebalance_subtree(old_root); } + + + //! Requires: "n" must be a node inserted in a tree. + //! + //! Effects: Returns a pointer to the header node of the tree. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + static node_ptr get_header(node_ptr n) + { return tree_algorithms::get_header(n); } + + private: + + /// @cond + + // assemble the three sub-trees into new tree pointed to by t | complexity : constant | exception : nothrow + static void assemble( node_ptr t, node_ptr l, node_ptr r, const_node_ptr null_node ) + { + NodeTraits::set_right(l, NodeTraits::get_left(t)); + NodeTraits::set_left(r, NodeTraits::get_right(t)); + + if(NodeTraits::get_right(l) != 0){ + NodeTraits::set_parent(NodeTraits::get_right(l), l); + } + + if(NodeTraits::get_left(r) != 0){ + NodeTraits::set_parent(NodeTraits::get_left(r), r); + } + + NodeTraits::set_left (t, NodeTraits::get_right(null_node)); + NodeTraits::set_right(t, NodeTraits::get_left(null_node)); + + if( NodeTraits::get_left(t) != 0 ){ + NodeTraits::set_parent(NodeTraits::get_left(t), t); + } + + if( NodeTraits::get_right(t) ){ + NodeTraits::set_parent(NodeTraits::get_right(t), t); + } + } + + // break link to left child node and attach it to left tree pointed to by l | complexity : constant | exception : nothrow + static void link_left(node_ptr& t, node_ptr& l) + { + NodeTraits::set_right(l, t); + NodeTraits::set_parent(t, l); + l = t; + t = NodeTraits::get_right(t); + } + + // break link to right child node and attach it to right tree pointed to by r | complexity : constant | exception : nothrow + static void link_right(node_ptr& t, node_ptr& r) + { + NodeTraits::set_left(r, t); + NodeTraits::set_parent(t, r); + r = t; + t = NodeTraits::get_left(t); + } + + // rotate n with its parent | complexity : constant | exception : nothrow + static void rotate(node_ptr n) + { + node_ptr p = NodeTraits::get_parent(n); + node_ptr g = NodeTraits::get_parent(p); + //Test if g is header before breaking tree + //invariants that would make is_header invalid + bool g_is_header = is_header(g); + + if(NodeTraits::get_left(p) == n){ + NodeTraits::set_left(p, NodeTraits::get_right(n)); + if(NodeTraits::get_left(p) != 0) + NodeTraits::set_parent(NodeTraits::get_left(p), p); + NodeTraits::set_right(n, p); + } + else{ // must be ( p->right == n ) + NodeTraits::set_right(p, NodeTraits::get_left(n)); + if(NodeTraits::get_right(p) != 0) + NodeTraits::set_parent(NodeTraits::get_right(p), p); + NodeTraits::set_left(n, p); + } + + NodeTraits::set_parent(p, n); + NodeTraits::set_parent(n, g); + + if(g_is_header){ + if(NodeTraits::get_parent(g) == p) + NodeTraits::set_parent(g, n); + else{//must be ( g->right == p ) + BOOST_INTRUSIVE_INVARIANT_ASSERT(0); + NodeTraits::set_right(g, n); + } + } + else{ + if(NodeTraits::get_left(g) == p) + NodeTraits::set_left(g, n); + else //must be ( g->right == p ) + NodeTraits::set_right(g, n); + } + } + + /// @endcond +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap.hpp new file mode 100644 index 0000000000..86bdd0145a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap.hpp @@ -0,0 +1,1746 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2008 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_TRIE_HPP +#define BOOST_INTRUSIVE_TRIE_HPP + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond + +template +struct treap_setopt +{ + typedef ValueTraits value_traits; + typedef Compare compare; + typedef PrioCompare priority_compare; + typedef SizeType size_type; + static const bool constant_time_size = ConstantTimeSize; +}; + +template +struct treap_set_defaults + : pack_options + < none + , base_hook + , constant_time_size + , size_type + , compare > + , priority > + >::type +{}; + +/// @endcond + +//! The class template treap is an intrusive treap container that +//! is used to construct intrusive set and multiset containers. The no-throw +//! guarantee holds only, if the value_compare object and priority_compare object +//! don't throw. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<>, +//! \c compare<> and \c priority_compare<> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class treap_impl + : private detail::clear_on_destructor_base > +{ + template friend class detail::clear_on_destructor_base; + public: + typedef typename Config::value_traits value_traits; + /// @cond + static const bool external_value_traits = + detail::external_value_traits_is_true::value; + typedef typename detail::eval_if_c + < external_value_traits + , detail::eval_value_traits + , detail::identity + >::type real_value_traits; + /// @endcond + typedef typename real_value_traits::pointer pointer; + typedef typename real_value_traits::const_pointer const_pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef value_type key_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::reference const_reference; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename Config::size_type size_type; + typedef typename Config::compare value_compare; + typedef typename Config::priority_compare priority_compare; + typedef value_compare key_compare; + typedef tree_iterator iterator; + typedef tree_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef typename real_value_traits::node_traits node_traits; + typedef typename node_traits::node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + typedef treap_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + static const bool stateful_value_traits = detail::is_stateful_value_traits::value; + + /// @cond + private: + typedef detail::size_holder size_traits; + + //noncopyable + treap_impl (const treap_impl&); + treap_impl operator =(const treap_impl&); + + enum { safemode_or_autounlink = + (int)real_value_traits::link_mode == (int)auto_unlink || + (int)real_value_traits::link_mode == (int)safe_link }; + + //Constant-time size is incompatible with auto-unlink hooks! + BOOST_STATIC_ASSERT(!(constant_time_size && ((int)real_value_traits::link_mode == (int)auto_unlink))); + + struct header_plus_size : public size_traits + { node header_; }; + + struct node_plus_pred_t : public detail::ebo_functor_holder + { + node_plus_pred_t(const value_compare &comp, const priority_compare &p_comp) + : detail::ebo_functor_holder(comp) + , header_plus_priority_size_(p_comp) + {} + struct header_plus_priority_size + : public detail::ebo_functor_holder + { + header_plus_priority_size(const priority_compare &p_comp) + : detail::ebo_functor_holder(p_comp) + {} + header_plus_size header_plus_size_; + } header_plus_priority_size_; + }; + + struct data_t : public treap_impl::value_traits + { + typedef typename treap_impl::value_traits value_traits; + data_t(const value_compare & comp, const priority_compare &pcomp, const value_traits &val_traits) + : value_traits(val_traits), node_plus_pred_(comp, pcomp) + {} + node_plus_pred_t node_plus_pred_; + } data_; + + const value_compare &priv_comp() const + { return data_.node_plus_pred_.get(); } + + value_compare &priv_comp() + { return data_.node_plus_pred_.get(); } + + const priority_compare &priv_pcomp() const + { return data_.node_plus_pred_.header_plus_priority_size_.get(); } + + priority_compare &priv_pcomp() + { return data_.node_plus_pred_.header_plus_priority_size_.get(); } + + const node &priv_header() const + { return data_.node_plus_pred_.header_plus_priority_size_.header_plus_size_.header_; } + + node &priv_header() + { return data_.node_plus_pred_.header_plus_priority_size_.header_plus_size_.header_; } + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(detail::boost_intrusive_get_pointer(ptr))); + } + + size_traits &priv_size_traits() + { return data_.node_plus_pred_.header_plus_priority_size_.header_plus_size_; } + + const size_traits &priv_size_traits() const + { return data_.node_plus_pred_.header_plus_priority_size_.header_plus_size_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_; } + + const real_value_traits &get_real_value_traits(detail::bool_) const + { return data_.get_value_traits(*this); } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_; } + + real_value_traits &get_real_value_traits(detail::bool_) + { return data_.get_value_traits(*this); } + + /// @endcond + + public: + + const real_value_traits &get_real_value_traits() const + { return this->get_real_value_traits(detail::bool_()); } + + real_value_traits &get_real_value_traits() + { return this->get_real_value_traits(detail::bool_()); } + + typedef typename node_algorithms::insert_commit_data insert_commit_data; + + //! Effects: Constructs an empty treap. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee. + treap_impl( const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, pcmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + } + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty treap and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is the distance between first and last. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare/priority_compare objects + //! throw. Basic guarantee. + template + treap_impl( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : data_(cmp, pcmp, v_traits) + { + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(size_type(0)); + if(unique) + this->insert_unique(b, e); + else + this->insert_equal(b, e); + } + + //! Effects: Detaches all elements from this. The objects in the set + //! are not deleted (i.e. no destructors are called), but the nodes according to + //! the value_traits template parameter are reinitialized and thus can be reused. + //! + //! Complexity: Linear to elements contained in *this + //! if constant-time size option is disabled. Constant time otherwise. + //! + //! Throws: Nothing. + ~treap_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return iterator (node_traits::get_left(node_ptr(&priv_header())), this); } + + //! Effects: Returns a const_iterator pointing to the beginning of the treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return this->cbegin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return const_iterator (node_traits::get_left(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns an iterator pointing to the end of the treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return iterator (node_ptr(&priv_header()), this); } + + //! Effects: Returns a const_iterator pointing to the end of the treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return this->cend(); } + + //! Effects: Returns a const_iterator pointing to the end of the treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return const_iterator (uncast(const_node_ptr(&priv_header())), this); } + + + //! Effects: Returns an iterator pointing to the highest priority object of the treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator top() + { return this->empty() ? this->end() : iterator (node_traits::get_parent(node_ptr(&priv_header())), this); } + + //! Effects: Returns a const_iterator pointing to the highest priority object of the treap.. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator top() const + { return this->ctop(); } + + //! Effects: Returns a const_iterator pointing to the highest priority object of the treap.. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator ctop() const + { return this->empty() ? this->cend() : const_iterator (node_traits::get_parent(const_node_ptr(&priv_header())), this); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return reverse_iterator(this->end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return const_reverse_iterator(this->end()); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return const_reverse_iterator(this->end()); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return reverse_iterator(this->begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return const_reverse_iterator(this->begin()); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return const_reverse_iterator(this->begin()); } + + //! Effects: Returns a reverse_iterator pointing to the highest priority object of the + //! reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rtop() + { return reverse_iterator(this->top()); } + + //! Effects: Returns a const_reverse_iterator pointing to the highest priority objec + //! of the reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rtop() const + { return const_reverse_iterator(this->top()); } + + //! Effects: Returns a const_reverse_iterator pointing to the highest priority object + //! of the reversed treap. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crtop() const + { return const_reverse_iterator(this->top()); } + + //! Precondition: end_iterator must be a valid end iterator + //! of treap. + //! + //! Effects: Returns a const reference to the treap associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static treap_impl &container_from_end_iterator(iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of treap. + //! + //! Effects: Returns a const reference to the treap associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const treap_impl &container_from_end_iterator(const_iterator end_iterator) + { return priv_container_from_end_iterator(end_iterator); } + + //! Precondition: it must be a valid iterator + //! of treap. + //! + //! Effects: Returns a const reference to the treap associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static treap_impl &container_from_iterator(iterator it) + { return priv_container_from_iterator(it); } + + //! Precondition: it must be a valid end const_iterator + //! of treap. + //! + //! Effects: Returns a const reference to the treap associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const treap_impl &container_from_iterator(const_iterator it) + { return priv_container_from_iterator(it); } + + //! Effects: Returns the value_compare object used by the treap. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return this->priv_comp(); } + + //! Effects: Returns the priority_compare object used by the treap. + //! + //! Complexity: Constant. + //! + //! Throws: If priority_compare copy-constructor throws. + priority_compare priority_comp() const + { return this->priv_pcomp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return node_algorithms::unique(const_node_ptr(&priv_header())); } + + //! Effects: Returns the number of elements stored in the treap. + //! + //! Complexity: Linear to elements contained in *this + //! if constant-time size option is disabled. Constant time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { + if(constant_time_size) + return this->priv_size_traits().get_size(); + else{ + return (size_type)node_algorithms::size(const_node_ptr(&priv_header())); + } + } + + //! Effects: Swaps the contents of two treaps. + //! + //! Complexity: Constant. + //! + //! Throws: If the comparison functor's swap call throws. + void swap(treap_impl& other) + { + //This can throw + using std::swap; + swap(priv_comp(), priv_comp()); + swap(priv_pcomp(), priv_pcomp()); + //These can't throw + node_algorithms::swap_tree(node_ptr(&priv_header()), node_ptr(&other.priv_header())); + if(constant_time_size){ + size_type backup = this->priv_size_traits().get_size(); + this->priv_size_traits().set_size(other.priv_size_traits().get_size()); + other.priv_size_traits().set_size(backup); + } + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the treap before the upper bound. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare or priority_compare functions throw. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + detail::key_nodeptr_comp + key_node_pcomp(priv_pcomp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_equal_upper_bound + (node_ptr(&priv_header()), to_insert, key_node_comp, key_node_pcomp), this); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator. + //! + //! Effects: Inserts x into the treap, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case) + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare or priority_compare functions throw. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_equal(const_iterator hint, reference value) + { + detail::key_nodeptr_comp + key_node_comp(priv_comp(), this); + detail::key_nodeptr_comp + key_node_pcomp(priv_pcomp(), this); + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + return iterator(node_algorithms::insert_equal + (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp, key_node_pcomp), this); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a each element of a range into the treap + //! before the upper bound of the key of each element. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare or priority_compare functions throw. + //! Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_equal(Iterator b, Iterator e) + { + iterator end(this->end()); + for (; b != e; ++b) + this->insert_equal(end, *b); + } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the treap if the value + //! is not already present. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare or priority_compare functions throw. + //! Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert_unique(reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(value, priv_comp(), priv_pcomp(), commit_data); + if(!ret.second) + return ret; + return std::pair (insert_unique_commit(value, commit_data), true); + } + + //! Requires: value must be an lvalue, and "hint" must be + //! a valid iterator + //! + //! Effects: Tries to insert x into the treap, using "hint" as a hint + //! to where it will be inserted. + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time (two comparisons in the worst case) + //! if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare or priority_compare functions throw. + //! Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert_unique(const_iterator hint, reference value) + { + insert_commit_data commit_data; + std::pair ret = insert_unique_check(hint, value, priv_comp(), priv_pcomp(), commit_data); + if(!ret.second) + return ret.first; + return insert_unique_commit(value, commit_data); + } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Tries to insert each element of a range into the treap. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare or priority_compare functions throw. + //! Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert_unique(Iterator b, Iterator e) + { + if(this->empty()){ + iterator end(this->end()); + for (; b != e; ++b) + this->insert_unique(end, *b); + } + else{ + for (; b != e; ++b) + this->insert_unique(*b); + } + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. + //! key_value_pcomp must be a comparison function that induces + //! the same strict weak ordering as priority_compare. The difference is that + //! key_value_pcomp and key_value_comp compare an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If the key_value_comp or key_value_pcomp + //! ordering functions throw. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + ( const KeyType &key, KeyValueCompare key_value_comp + , KeyValuePrioCompare key_value_pcomp, insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + detail::key_nodeptr_comp + pcomp(key_value_pcomp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), key, comp, pcomp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. + //! key_value_pcomp must be a comparison function that induces + //! the same strict weak ordering as priority_compare. The difference is that + //! key_value_pcomp and key_value_comp compare an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the container, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the key_value_comp or key_value_pcomp + //! ordering functions throw. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the container. + template + std::pair insert_unique_check + ( const_iterator hint, const KeyType &key + , KeyValueCompare key_value_comp + , KeyValuePrioCompare key_value_pcomp + , insert_commit_data &commit_data) + { + detail::key_nodeptr_comp + comp(key_value_comp, this); + detail::key_nodeptr_comp + pcomp(key_value_pcomp, this); + std::pair ret = + (node_algorithms::insert_unique_check + (node_ptr(&priv_header()), hint.pointed_node(), key, comp, pcomp, commit_data)); + return std::pair(iterator(ret.first, this), ret.second); + } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the container between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the avl_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + node_algorithms::insert_unique_commit(node_ptr(&priv_header()), to_insert, commit_data); + return iterator(to_insert, this); + } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate + //! + //! Effects: Inserts x into the treap before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" treap ordering invariant will be broken. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + detail::key_nodeptr_comp + pcomp(priv_pcomp(), this); + return iterator(node_algorithms::insert_before + (node_ptr(&priv_header()), pos.pointed_node(), to_insert, pcomp), this); + } + + //! Requires: value must be an lvalue, and it must be no less + //! than the greatest inserted key + //! + //! Effects: Inserts x into the treap in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if value is + //! less than the greatest inserted key treap ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + detail::key_nodeptr_comp + pcomp(priv_pcomp(), this); + node_algorithms::push_back(node_ptr(&priv_header()), to_insert, pcomp); + } + + //! Requires: value must be an lvalue, and it must be no greater + //! than the minimum inserted key + //! + //! Effects: Inserts x into the treap in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if value is + //! greater than the minimum inserted key treap ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { + node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); + this->priv_size_traits().increment(); + detail::key_nodeptr_comp + pcomp(priv_pcomp(), this); + node_algorithms::push_front(node_ptr(&priv_header()), to_insert, pcomp); + } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: if the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { + const_iterator ret(i); + ++ret; + node_ptr to_erase(i.pointed_node()); + if(safemode_or_autounlink) + BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase)); + detail::key_nodeptr_comp + key_node_pcomp(priv_pcomp(), this); + node_algorithms::erase(&priv_header(), to_erase, key_node_pcomp); + this->priv_size_traits().decrement(); + if(safemode_or_autounlink) + node_algorithms::init(to_erase); + return ret.unconst(); + } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: if the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { size_type n; return private_erase(b, e, n); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: if the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return this->erase(value, priv_comp()); } + + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: if the internal priority_compare function throws. + //! Equivalent guarantee to while(beg != end) erase(beg++); + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: if the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { + node_ptr to_erase(i.pointed_node()); + iterator ret(this->erase(i)); + disposer(get_real_value_traits().to_value_ptr(to_erase)); + return ret; + } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: if the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { size_type n; return private_erase(b, e, n, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: if the priority_compare function throws then weak guarantee and heap invariants are broken. + //! The safest thing would be to clear or destroy the container. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { + std::pair p = this->equal_range(value); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + N). + //! + //! Throws: if the priority_compare function throws then weak guarantee and heap invariants are broken. + //! The safest thing would be to clear or destroy the container. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { + std::pair p = this->equal_range(key, comp); + size_type n; + private_erase(p.first, p.second, n, disposer); + return n; + } + + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { + if(safemode_or_autounlink){ + this->clear_and_dispose(detail::null_disposer()); + } + else{ + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(0); + } + } + + //! Effects: Erases all of the elements calling disposer(p) for + //! each node to be erased. + //! Complexity: Average complexity for is at most O(log(size() + N)), + //! where N is the number of elements in the container. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. Calls N times to disposer functor. + template + void clear_and_dispose(Disposer disposer) + { + node_algorithms::clear_and_dispose(node_ptr(&priv_header()) + , detail::node_disposer(disposer, this)); + node_algorithms::init_header(&priv_header()); + this->priv_size_traits().set_size(0); + } + + //! Effects: Returns the number of contained elements with the given value + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given value. + //! + //! Throws: Nothing. + size_type count(const_reference value) const + { return this->count(value, priv_comp()); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: Nothing. + template + size_type count(const KeyType &key, KeyValueCompare comp) const + { + std::pair ret = this->equal_range(key, comp); + return std::distance(ret.first, ret.second); + } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator lower_bound(const_reference value) + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator lower_bound(const_reference value) const + { return this->lower_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator lower_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator lower_bound(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::lower_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator upper_bound(const_reference value) + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator upper_bound(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator upper_bound(const_reference value) const + { return this->upper_bound(value, priv_comp()); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k according to comp or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator upper_bound(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator(node_algorithms::upper_bound + (const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + iterator find(const_reference value) + { return this->find(value, priv_comp()); } + + //! Effects: Finds an iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + iterator find(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + const_iterator find(const_reference value) const + { return this->find(value, priv_comp()); } + + //! Effects: Finds a const_iterator to the first element whose key is + //! k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + const_iterator find(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + return const_iterator + (node_algorithms::find(const_node_ptr(&priv_header()), key, key_node_comp), this); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair equal_range(const_reference value) + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair equal_range(const KeyType &key, KeyValueCompare comp) + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(iterator(ret.first, this), iterator(ret.second, this)); + } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + std::pair + equal_range(const_reference value) const + { return this->equal_range(value, priv_comp()); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + template + std::pair + equal_range(const KeyType &key, KeyValueCompare comp) const + { + detail::key_nodeptr_comp + key_node_comp(comp, this); + std::pair ret + (node_algorithms::equal_range(const_node_ptr(&priv_header()), key, key_node_comp)); + return std::pair(const_iterator(ret.first, this), const_iterator(ret.second, this)); + } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const treap_impl &src, Cloner cloner, Disposer disposer) + { + this->clear_and_dispose(disposer); + if(!src.empty()){ + detail::exception_disposer + rollback(*this, disposer); + node_algorithms::clone + (const_node_ptr(&src.priv_header()) + ,node_ptr(&this->priv_header()) + ,detail::node_cloner(cloner, this) + ,detail::node_disposer(disposer, this)); + this->priv_size_traits().set_size(src.priv_size_traits().get_size()); + this->priv_comp() = src.priv_comp(); + rollback.release(); + } + } + + //! Effects: Unlinks the leftmost node from the treap. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the treap and the treap can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the treap. + pointer unlink_leftmost_without_rebalance() + { + node_ptr to_be_disposed(node_algorithms::unlink_leftmost_without_rebalance + (node_ptr(&priv_header()))); + if(!to_be_disposed) + return 0; + this->priv_size_traits().decrement(); + if(safemode_or_autounlink)//If this is commented does not work with normal_link + node_algorithms::init(to_be_disposed); + return get_real_value_traits().to_value_ptr(to_be_disposed); + } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any treap. + //! + //! Effects: Replaces replace_this in its position in the + //! treap with with_this. The treap does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering and priority rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { + node_algorithms::replace_node( get_real_value_traits().to_node_ptr(*replace_this) + , node_ptr(&priv_header()) + , get_real_value_traits().to_node_ptr(with_this)); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return iterator (value_traits::to_node_ptr(value), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { + BOOST_STATIC_ASSERT((!stateful_value_traits)); + return const_iterator (value_traits::to_node_ptr(const_cast (value)), 0); + } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return iterator (value_traits::to_node_ptr(value), this); } + + //! Requires: value must be an lvalue and shall be in a set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return const_iterator (value_traits::to_node_ptr(const_cast (value)), this); } + + //! Requires: value shall not be in a treap. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { node_algorithms::init(value_traits::to_node_ptr(value)); } + + /// @cond + private: + template + iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer) + { + for(n = 0; b != e; ++n) + this->erase_and_dispose(b++, disposer); + return b.unconst(); + } + + iterator private_erase(const_iterator b, const_iterator e, size_type &n) + { + for(n = 0; b != e; ++n) + this->erase(b++); + return b.unconst(); + } + /// @endcond + + private: + static treap_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) + { + header_plus_size *r = detail::parent_from_member + ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), &header_plus_size::header_); + typename node_plus_pred_t::header_plus_priority_size *n = + detail::parent_from_member + < typename node_plus_pred_t::header_plus_priority_size + , header_plus_size> + (r, &node_plus_pred_t::header_plus_priority_size::header_plus_size_); + node_plus_pred_t *pn = detail::parent_from_member + < node_plus_pred_t + , typename node_plus_pred_t::header_plus_priority_size> + (n, &node_plus_pred_t::header_plus_priority_size_); + data_t *d = detail::parent_from_member(pn, &data_t::node_plus_pred_); + treap_impl *tr = detail::parent_from_member(d, &treap_impl::data_); + return *tr; + } + + static treap_impl &priv_container_from_iterator(const const_iterator &it) + { return priv_container_from_end_iterator(it.end_iterator_from_it()); } +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator< +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_impl &x, const treap_impl &y) +#else +(const treap_impl &x, const treap_impl &y) +#endif +{ return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +bool operator== +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_impl &x, const treap_impl &y) +#else +(const treap_impl &x, const treap_impl &y) +#endif +{ + typedef treap_impl tree_type; + typedef typename tree_type::const_iterator const_iterator; + + if(tree_type::constant_time_size && x.size() != y.size()){ + return false; + } + const_iterator end1 = x.end(); + const_iterator i1 = x.begin(); + const_iterator i2 = y.begin(); + if(tree_type::constant_time_size){ + while (i1 != end1 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1; + } + else{ + const_iterator end2 = y.end(); + while (i1 != end1 && i2 != end2 && *i1 == *i2) { + ++i1; + ++i2; + } + return i1 == end1 && i2 == end2; + } +} + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_impl &x, const treap_impl &y) +#else +(const treap_impl &x, const treap_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_impl &x, const treap_impl &y) +#else +(const treap_impl &x, const treap_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_impl &x, const treap_impl &y) +#else +(const treap_impl &x, const treap_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_impl &x, const treap_impl &y) +#else +(const treap_impl &x, const treap_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(treap_impl &x, treap_impl &y) +#else +(treap_impl &x, treap_impl &y) +#endif +{ x.swap(y); } + +/// @cond +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_treap_opt +{ + typedef typename pack_options + < treap_set_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + typedef typename detail::get_value_traits + ::type value_traits; + + typedef treap_setopt + < value_traits + , typename packed_options::compare + , typename packed_options::priority + , typename packed_options::size_type + , packed_options::constant_time_size + > type; +}; +/// @endcond + +//! Helper metafunction to define a \c treap that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_trie +{ + /// @cond + typedef treap_impl + < typename make_treap_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class treap + : public make_trie::type +{ + typedef typename make_trie + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::priority_compare priority_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::real_value_traits real_value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + treap( const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, pcmp, v_traits) + {} + + template + treap( bool unique, Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : Base(unique, b, e, cmp, pcmp, v_traits) + {} + + static treap &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const treap &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static treap &container_from_it(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const treap &container_from_it(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_TRIE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap_algorithms.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap_algorithms.hpp new file mode 100644 index 0000000000..a1208156c1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap_algorithms.hpp @@ -0,0 +1,894 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP +#define BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP + +#include + +#include +#include + +#include +#include +#include +#include + + +namespace boost { +namespace intrusive { + +//! treap_algorithms provides basic algorithms to manipulate +//! nodes forming a treap. +//! +//! (1) the header node is maintained with links not only to the root +//! but also to the leftmost node of the tree, to enable constant time +//! begin(), and to the rightmost node of the tree, to enable linear time +//! performance when used with the generic set algorithms (set_union, +//! etc.); +//! +//! (2) when a node being deleted has two children its successor node is +//! relinked into its place, rather than copied, so that the only +//! pointers invalidated are those referring to the deleted node. +//! +//! treap_algorithms is configured with a NodeTraits class, which encapsulates the +//! information about the node to be manipulated. NodeTraits must support the +//! following interface: +//! +//! Typedefs: +//! +//! node: The type of the node that forms the circular list +//! +//! node_ptr: A pointer to a node +//! +//! const_node_ptr: A pointer to a const node +//! +//! Static functions: +//! +//! static node_ptr get_parent(const_node_ptr n); +//! +//! static void set_parent(node_ptr n, node_ptr parent); +//! +//! static node_ptr get_left(const_node_ptr n); +//! +//! static void set_left(node_ptr n, node_ptr left); +//! +//! static node_ptr get_right(const_node_ptr n); +//! +//! static void set_right(node_ptr n, node_ptr right); +template +class treap_algorithms +{ + public: + typedef NodeTraits node_traits; + typedef typename NodeTraits::node node; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + + /// @cond + private: + + class remove_on_destroy + { + remove_on_destroy(const remove_on_destroy&); + remove_on_destroy& operator=(const remove_on_destroy&); + public: + remove_on_destroy(node_ptr header, node_ptr z) + : header_(header), z_(z), remove_it_(true) + {} + ~remove_on_destroy() + { + if(remove_it_){ + tree_algorithms::erase(header_, z_); + } + } + + void release() + { remove_it_ = false; } + + const node_ptr header_; + const node_ptr z_; + bool remove_it_; + }; + + class rerotate_on_destroy + { + rerotate_on_destroy(const remove_on_destroy&); + rerotate_on_destroy& operator=(const rerotate_on_destroy&); + + public: + rerotate_on_destroy(node_ptr header, node_ptr p, std::size_t &n) + : header_(header), p_(p), n_(n), remove_it_(true) + {} + + ~rerotate_on_destroy() + { + if(remove_it_){ + rotate_up_n(header_, p_, n_); + } + } + + void release() + { remove_it_ = false; } + + const node_ptr header_; + const node_ptr p_; + std::size_t &n_; + bool remove_it_; + }; + + static void rotate_up_n(const node_ptr header, const node_ptr p, std::size_t n) + { + for( node_ptr p_parent = NodeTraits::get_parent(p) + ; n-- + ; p_parent = NodeTraits::get_parent(p)){ + //Check if left child + if(p == NodeTraits::get_left(p_parent)){ + tree_algorithms::rotate_right(p_parent, header); + } + else{ //Right child + tree_algorithms::rotate_left(p_parent, header); + } + } + } + + typedef detail::tree_algorithms tree_algorithms; + + static node_ptr uncast(const_node_ptr ptr) + { + return node_ptr(const_cast(::boost::intrusive::detail::boost_intrusive_get_pointer(ptr))); + } + /// @endcond + + public: + static node_ptr begin_node(const_node_ptr header) + { return tree_algorithms::begin_node(header); } + + static node_ptr end_node(const_node_ptr header) + { return tree_algorithms::end_node(header); } + + //! This type is the information that will be + //! filled by insert_unique_check + struct insert_commit_data + /// @cond + : public tree_algorithms::insert_commit_data + /// @endcond + { + /// @cond + std::size_t rotations; + /// @endcond + }; + + //! Requires: header1 and header2 must be the header nodes + //! of two trees. + //! + //! Effects: Swaps two trees. After the function header1 will contain + //! links to the second tree and header2 will have links to the first tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static void swap_tree(node_ptr header1, node_ptr header2) + { return tree_algorithms::swap_tree(header1, header2); } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr node2) + { + if(node1 == node2) + return; + + node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2)); + swap_nodes(node1, header1, node2, header2); + } + + //! Requires: node1 and node2 can't be header nodes + //! of two trees with header header1 and header2. + //! + //! Effects: Swaps two nodes. After the function node1 will be inserted + //! in the position node2 before the function. node2 will be inserted in the + //! position node1 had before the function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! node1 and node2 are not equivalent according to the ordering rules. + //! + //!Experimental function + static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) + { tree_algorithms::swap_nodes(node1, header1, node2, header2); } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing and comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) + { + if(node_to_be_replaced == new_node) + return; + replace_node(node_to_be_replaced, tree_algorithms::get_header(node_to_be_replaced), new_node); + } + + //! Requires: node_to_be_replaced must be inserted in a tree + //! with header "header" and new_node must not be inserted in a tree. + //! + //! Effects: Replaces node_to_be_replaced in its position in the + //! tree with new_node. The tree does not need to be rebalanced + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! new_node is not equivalent to node_to_be_replaced according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + //! + //!Experimental function + static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) + { tree_algorithms::replace_node(node_to_be_replaced, header, new_node); } + + //! Requires: node is a tree node but not the header. + //! + //! Effects: Unlinks the node and rebalances the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: If "pcomp" throws, strong guarantee + template + static void unlink(node_ptr node, NodePtrPriorityCompare pcomp) + { + node_ptr x = NodeTraits::get_parent(node); + if(x){ + while(!is_header(x)) + x = NodeTraits::get_parent(x); + erase(x, node, pcomp); + } + } + + //! Requires: header is the header of a tree. + //! + //! Effects: Unlinks the leftmost node from the tree, and + //! updates the header link to the new leftmost node. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + static node_ptr unlink_leftmost_without_rebalance(node_ptr header) + { return tree_algorithms::unlink_leftmost_without_rebalance(header); } + + //! Requires: node is a node of the tree or an node initialized + //! by init(...). + //! + //! Effects: Returns true if the node is initialized by init(). + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + static bool unique(const_node_ptr node) + { return tree_algorithms::unique(node); } + + //! Requires: node is a node of the tree but it's not the header. + //! + //! Effects: Returns the number of nodes of the subtree. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t count(const_node_ptr node) + { return tree_algorithms::count(node); } + + //! Requires: header is the header node of the tree. + //! + //! Effects: Returns the number of nodes above the header. + //! + //! Complexity: Linear time. + //! + //! Throws: Nothing. + static std::size_t size(const_node_ptr header) + { return tree_algorithms::size(header); } + + //! Requires: p is a node from the tree except the header. + //! + //! Effects: Returns the next node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr next_node(node_ptr p) + { return tree_algorithms::next_node(p); } + + //! Requires: p is a node from the tree except the leftmost node. + //! + //! Effects: Returns the previous node of the tree. + //! + //! Complexity: Average constant time. + //! + //! Throws: Nothing. + static node_ptr prev_node(node_ptr p) + { return tree_algorithms::prev_node(p); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: After the function unique(node) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init(node_ptr node) + { tree_algorithms::init(node); } + + //! Requires: node must not be part of any tree. + //! + //! Effects: Initializes the header to represent an empty tree. + //! unique(header) == true. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Nodes: If node is inserted in a tree, this function corrupts the tree. + static void init_header(node_ptr header) + { + tree_algorithms::init_header(header); + } + + //! Requires: header must be the header of a tree, z a node + //! of that tree and z != header. + //! + //! Effects: Erases node "z" from the tree with header "header". + //! + //! Complexity: Amortized constant time. + //! + //! Throws: If "pcomp" throws, strong guarantee. + template + static node_ptr erase(node_ptr header, node_ptr z, NodePtrPriorityCompare pcomp) + { + rebalance_for_erasure(header, z, pcomp); + tree_algorithms::erase(header, z); +// assert(check_invariant(header, pcomp)); + return z; + } + + //! Requires: "cloner" must be a function + //! object taking a node_ptr and returning a new cloned node of it. "disposer" must + //! take a node_ptr and shouldn't throw. + //! + //! Effects: First empties target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Then, duplicates the entire tree pointed by "source_header" cloning each + //! source node with node_ptr Cloner::operator()(node_ptr) to obtain + //! the nodes of the target tree. If "cloner" throws, the cloned target nodes + //! are disposed using void disposer(node_ptr). + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clone + (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer) + { + tree_algorithms::clone(source_header, target_header, cloner, disposer); + } + + //! Requires: "disposer" must be an object function + //! taking a node_ptr parameter and shouldn't throw. + //! + //! Effects: Empties the target tree calling + //! void disposer::operator()(node_ptr) for every node of the tree + //! except the header. + //! + //! Complexity: Linear to the number of element of the source tree plus the. + //! number of elements of tree target tree when calling this function. + //! + //! Throws: If cloner functor throws. If this happens target nodes are disposed. + template + static void clear_and_dispose(node_ptr header, Disposer disposer) + { tree_algorithms::clear_and_dispose(header, disposer); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is + //! not less than "key" according to "comp" or "header" if that element does + //! not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr lower_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::lower_bound(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the first element that is greater + //! than "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr upper_bound + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::upper_bound(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an node_ptr to the element that is equivalent to + //! "key" according to "comp" or "header" if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr find + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::find(header, key, comp); } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs. + //! + //! Effects: Returns an a pair of node_ptr delimiting a range containing + //! all elements that are equivalent to "key" according to "comp" or an + //! empty range that indicates the position where those elements would be + //! if they there are no equivalent elements. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If "comp" throws. + template + static std::pair equal_range + (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp) + { return tree_algorithms::equal_range(header, key, comp); } + + //! Requires: "h" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! NodePtrPriorityCompare is a priority function object that induces a strict weak + //! ordering compatible with the one used to create the + //! the tree. NodePtrPriorityCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the upper bound + //! according to "comp" and rotates the tree according to "pcomp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throw or "pcomp" throw. + template + static node_ptr insert_equal_upper_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp) + { + insert_commit_data commit_data; + tree_algorithms::insert_equal_upper_bound_check(h, new_node, comp, commit_data); + rebalance_check_and_commit(h, new_node, pcomp, commit_data); + return new_node; + } + + //! Requires: "h" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. + //! NodePtrPriorityCompare is a priority function object that induces a strict weak + //! ordering compatible with the one used to create the + //! the tree. NodePtrPriorityCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before the upper bound + //! according to "comp" and rotates the tree according to "pcomp". + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If "comp" throws. + template + static node_ptr insert_equal_lower_bound + (node_ptr h, node_ptr new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp) + { + insert_commit_data commit_data; + tree_algorithms::insert_equal_lower_bound_check(h, new_node, comp, commit_data); + rebalance_check_and_commit(h, new_node, pcomp, commit_data); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! NodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from + //! the "header"'s tree. + //! NodePtrPriorityCompare is a priority function object that induces a strict weak + //! ordering compatible with the one used to create the + //! the tree. NodePtrPriorityCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree, using "hint" as a hint to + //! where it will be inserted. If "hint" is the upper_bound + //! the insertion takes constant time (two comparisons in the worst case). + //! Rotates the tree according to "pcomp". + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if new_node is inserted immediately before "hint". + //! + //! Throws: If "comp" throw or "pcomp" throw. + template + static node_ptr insert_equal + (node_ptr h, node_ptr hint, node_ptr new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp) + { + insert_commit_data commit_data; + tree_algorithms::insert_equal_check(h, hint, new_node, comp, commit_data); + rebalance_check_and_commit(h, new_node, pcomp, commit_data); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! "pos" must be a valid node of the tree (including header end) node. + //! "pos" must be a node pointing to the successor to "new_node" + //! once inserted according to the order of already inserted nodes. This function does not + //! check "pos" and this precondition must be guaranteed by the caller. + //! NodePtrPriorityCompare is a priority function object that induces a strict weak + //! ordering compatible with the one used to create the + //! the tree. NodePtrPriorityCompare compares two node_ptrs. + //! + //! Effects: Inserts new_node into the tree before "pos" + //! and rotates the tree according to "pcomp". + //! + //! Complexity: Constant-time. + //! + //! Throws: If "pcomp" throws, strong guarantee. + //! + //! Note: If "pos" is not the successor of the newly inserted "new_node" + //! tree invariants might be broken. + template + static node_ptr insert_before + (node_ptr header, node_ptr pos, node_ptr new_node, NodePtrPriorityCompare pcomp) + { + insert_commit_data commit_data; + tree_algorithms::insert_before_check(header, pos, commit_data); + rebalance_check_and_commit(header, new_node, pcomp, commit_data); + return new_node; + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering no less than the + //! greatest inserted key. + //! NodePtrPriorityCompare is a priority function object that induces a strict weak + //! ordering compatible with the one used to create the + //! the tree. NodePtrPriorityCompare compares two node_ptrs. + //! + //! Effects: Inserts x into the tree in the last position + //! and rotates the tree according to "pcomp". + //! + //! Complexity: Constant-time. + //! + //! Throws: If "pcomp" throws, strong guarantee. + //! + //! Note: If "new_node" is less than the greatest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + template + static void push_back(node_ptr header, node_ptr new_node, NodePtrPriorityCompare pcomp) + { + insert_commit_data commit_data; + tree_algorithms::push_back_check(header, commit_data); + rebalance_check_and_commit(header, new_node, pcomp, commit_data); + } + + //! Requires: "header" must be the header node of a tree. + //! "new_node" must be, according to the used ordering, no greater than the + //! lowest inserted key. + //! NodePtrPriorityCompare is a priority function object that induces a strict weak + //! ordering compatible with the one used to create the + //! the tree. NodePtrPriorityCompare compares two node_ptrs. + //! + //! Effects: Inserts x into the tree in the first position + //! and rotates the tree according to "pcomp". + //! + //! Complexity: Constant-time. + //! + //! Throws: If "pcomp" throws, strong guarantee. + //! + //! Note: If "new_node" is greater than the lowest inserted key + //! tree invariants are broken. This function is slightly faster than + //! using "insert_before". + template + static void push_front(node_ptr header, node_ptr new_node, NodePtrPriorityCompare pcomp) + { + insert_commit_data commit_data; + tree_algorithms::push_front_check(header, commit_data); + rebalance_check_and_commit(header, new_node, pcomp, commit_data); + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, const KeyType &key + ,KeyNodePtrCompare comp, KeyNodePtrPrioCompare pcomp + ,insert_commit_data &commit_data) + { + std::pair ret = + tree_algorithms::insert_unique_check(header, key, comp, commit_data); + if(ret.second) + rebalance_after_insertion_check(header, commit_data.node, key, pcomp, commit_data.rotations); + return ret; + } + + //! Requires: "header" must be the header node of a tree. + //! KeyNodePtrCompare is a function object that induces a strict weak + //! ordering compatible with the strict weak ordering used to create the + //! the tree. NodePtrCompare compares KeyType with a node_ptr. + //! "hint" is node from the "header"'s tree. + //! + //! Effects: Checks if there is an equivalent node to "key" in the + //! tree according to "comp" using "hint" as a hint to where it should be + //! inserted and obtains the needed information to realize + //! a constant-time node insertion if there is no equivalent node. + //! If "hint" is the upper_bound the function has constant time + //! complexity (two comparisons in the worst case). + //! + //! Returns: If there is an equivalent value + //! returns a pair containing a node_ptr to the already present node + //! and false. If there is not equivalent key can be inserted returns true + //! in the returned pair's boolean and fills "commit_data" that is meant to + //! be used with the "insert_commit" function to achieve a constant-time + //! insertion function. + //! + //! Complexity: Average complexity is at most logarithmic, but it is + //! amortized constant time if new_node should be inserted immediately before "hint". + //! + //! Throws: If "comp" throws. + //! + //! Notes: This function is used to improve performance when constructing + //! a node is expensive and the user does not want to have two equivalent nodes + //! in the tree: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the node and this function offers the possibility to use that part + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the node and use + //! "insert_commit" to insert the node in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_unique_commit" only + //! if no more objects are inserted or erased from the set. + template + static std::pair insert_unique_check + (const_node_ptr header, node_ptr hint, const KeyType &key + ,KeyNodePtrCompare comp, KeyNodePtrPrioCompare pcomp, insert_commit_data &commit_data) + { + std::pair ret = + tree_algorithms::insert_unique_check(header, hint, key, comp, commit_data); + if(ret.second) + rebalance_after_insertion_check(header, commit_data.node, key, pcomp, commit_data.rotations); + return ret; + } + + //! Requires: "header" must be the header node of a tree. + //! "commit_data" must have been obtained from a previous call to + //! "insert_unique_check". No objects should have been inserted or erased + //! from the set between the "insert_unique_check" that filled "commit_data" + //! and the call to "insert_commit". + //! + //! + //! Effects: Inserts new_node in the set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_unique_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + static void insert_unique_commit + (node_ptr header, node_ptr new_node, const insert_commit_data &commit_data) + { + tree_algorithms::insert_unique_commit(header, new_node, commit_data); + rebalance_after_insertion_commit(header, new_node, commit_data.rotations); + } + + //! Requires: "n" must be a node inserted in a tree. + //! + //! Effects: Returns a pointer to the header node of the tree. + //! + //! Complexity: Logarithmic. + //! + //! Throws: Nothing. + static node_ptr get_header(node_ptr n) + { return tree_algorithms::get_header(n); } + + /// @cond + private: + + //! Requires: p is a node of a tree. + //! + //! Effects: Returns true if p is the header of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + static bool is_header(const_node_ptr p) + { + return tree_algorithms::is_header(p); + } + + template + static void rebalance_for_erasure(node_ptr header, node_ptr z, NodePtrPriorityCompare pcomp) + { + std::size_t n = 0; + rerotate_on_destroy rb(header, z, n); + + node_ptr z_left = NodeTraits::get_left(z); + node_ptr z_right = NodeTraits::get_right(z); + while(z_left || z_right){ + if(!z_right || (z_left && pcomp(z_left, z_right))){ + tree_algorithms::rotate_right(z, header); + } + else{ + tree_algorithms::rotate_left(z, header); + } + ++n; + z_left = NodeTraits::get_left(z); + z_right = NodeTraits::get_right(z); + } + rb.release(); + } + + template + static void rebalance_check_and_commit + (node_ptr h, node_ptr new_node, NodePtrPriorityCompare pcomp, insert_commit_data &commit_data) + { + rebalance_after_insertion_check(h, commit_data.node, new_node, pcomp, commit_data.rotations); + //No-throw + tree_algorithms::insert_unique_commit(h, new_node, commit_data); + rebalance_after_insertion_commit(h, new_node, commit_data.rotations); + } + + + template + static void rebalance_after_insertion_check + ( const_node_ptr header, const_node_ptr upnode, const Key &k + , KeyNodePriorityCompare pcomp, std::size_t &num_rotations) + { + //First check rotations since pcomp can throw + num_rotations = 0; + std::size_t n = 0; + while(upnode != header && pcomp(k, upnode)){ + ++n; + upnode = NodeTraits::get_parent(upnode); + } + num_rotations = n; + } + + static void rebalance_after_insertion_commit(node_ptr header, node_ptr p, std::size_t n) + { + // Now execute n rotations + for( node_ptr p_parent = NodeTraits::get_parent(p) + ; n-- + ; p_parent = NodeTraits::get_parent(p)){ + //Check if left child + if(p == NodeTraits::get_left(p_parent)){ + tree_algorithms::rotate_right(p_parent, header); + } + else{ //Right child + tree_algorithms::rotate_left(p_parent, header); + } + } + } + + template + static bool check_invariant(const_node_ptr header, NodePtrPriorityCompare pcomp) + { + node_ptr beg = begin_node(header); + node_ptr end = end_node(header); + + while(beg != end){ + node_ptr p = NodeTraits::get_parent(beg); + if(p != header){ + if(pcomp(beg, p)) + return false; + } + beg = next_node(beg); + } + return true; + } + + /// @endcond +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap_set.hpp new file mode 100644 index 0000000000..ef38a1ed6a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/treap_set.hpp @@ -0,0 +1,2547 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2007-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_TRIE_SET_HPP +#define BOOST_INTRUSIVE_TRIE_SET_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! The class template treap_set is an intrusive container, that mimics most of +//! the interface of std::set as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<>, +//! \c compare<> and \c priority_compare<> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class treap_set_impl +{ + /// @cond + typedef treap_impl tree_type; + //! This class is + //! non-copyable + treap_set_impl (const treap_set_impl&); + + //! This class is + //! non-assignable + treap_set_impl &operator =(const treap_set_impl&); + + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::priority_compare priority_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + + /// @cond + private: + tree_type tree_; + /// @endcond + + public: + //! Effects: Constructs an empty treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor of the value_compare object throws. + treap_set_impl( const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, pcmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty treap_set and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is std::distance(last, first). + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare object throws. + template + treap_set_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : tree_(true, b, e, cmp, pcmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the treap_set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~treap_set_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns an iterator pointing to the highest priority object of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator top() + { return tree_.top(); } + + //! Effects: Returns a const_iterator pointing to the highest priority object of the tree.. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator top() const + { return this->ctop(); } + + //! Effects: Returns a const_iterator pointing to the highest priority object of the tree.. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator ctop() const + { return tree_.ctop(); } + + //! Effects: Returns a const_iterator pointing to the end of the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Effects: Returns a reverse_iterator pointing to the highest priority object of the + //! reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rtop() + { return tree_.rtop(); } + + //! Effects: Returns a const_reverse_iterator pointing to the highest priority objec + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rtop() const + { return tree_.crtop(); } + + //! Effects: Returns a const_reverse_iterator pointing to the highest priority object + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crtop() const + { return tree_.crtop(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of treap_set. + //! + //! Effects: Returns a const reference to the treap_set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static treap_set_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &treap_set_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of treap_set. + //! + //! Effects: Returns a const reference to the treap_set associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const treap_set_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &treap_set_impl::tree_); + } + + //! Precondition: it must be a valid iterator of set. + //! + //! Effects: Returns a reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static treap_set_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &treap_set_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of set. + //! + //! Effects: Returns a const reference to the set associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Logarithmic. + static const treap_set_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &treap_set_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the priority_compare object used by the treap_set. + //! + //! Complexity: Constant. + //! + //! Throws: If priority_compare copy-constructor throws. + priority_compare priority_comp() const + { return tree_.priority_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the treap_set. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two sets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(treap_set_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const treap_set_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to inserts value into the treap_set. + //! + //! Returns: If the value + //! is not already present inserts it and returns a pair containing the + //! iterator to the new value and true. If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare or priority_compare ordering function throw. + //! Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert(reference value) + { return tree_.insert_unique(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to to insert x into the treap_set, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: An iterator that points to the position where the + //! new element was inserted into the treap_set. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If the internal value_compare or priority_compare ordering + //! functions throw. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_unique(hint, value); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. + //! key_value_pcomp must be a comparison function that induces + //! the same strict weak ordering as priority_compare. The difference is that + //! key_value_pcomp and key_value_comp compare an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the treap_set, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average complexity is at most logarithmic. + //! + //! Throws: If key_value_comp or key_value_pcomp ordering function throw. + //! Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that + //! part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This gives a total + //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the treap_set. + template + std::pair insert_check + ( const KeyType &key, KeyValueCompare key_value_comp, KeyValuePriorityCompare key_value_pcomp + , insert_commit_data &commit_data) + { return tree_.insert_unique_check(key, key_value_comp, key_value_pcomp, commit_data); } + + //! Requires: key_value_comp must be a comparison function that induces + //! the same strict weak ordering as value_compare. + //! key_value_pcomp must be a comparison function that induces + //! the same strict weak ordering as priority_compare. The difference is that + //! key_value_pcomp and key_value_comp compare an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the treap_set, using + //! a user provided key instead of the value itself, using "hint" + //! as a hint to where it will be inserted. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Logarithmic in general, but it's amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If key_value_comp or key_value_pcomp ordering function throw. + //! Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! constructing that is used to impose the order is much cheaper to construct + //! than the value_type and this function offers the possibility to use that key + //! to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. This can give a total + //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)). + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the treap_set. + template + std::pair insert_check + ( const_iterator hint, const KeyType &key + , KeyValueCompare key_value_comp, KeyValuePriorityCompare key_value_pcomp + , insert_commit_data &commit_data) + { return tree_.insert_unique_check(hint, key, key_value_comp, key_value_pcomp, commit_data); } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the treap_set between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the treap_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + iterator insert_commit(reference value, const insert_commit_data &commit_data) + { return tree_.insert_unique_commit(value, commit_data); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the treap_set. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If the internal value_compare or priority_compare ordering function + //! throw. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_unique(b, e); } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate. "value" must not be equal to any + //! inserted key according to the predicate. + //! + //! Effects: Inserts x into the treap before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" treap ordering invariant will be broken. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { return tree_.insert_before(pos, value); } + + //! Requires: value must be an lvalue, and it must be greater than + //! any inserted key according to the predicate. + //! + //! Effects: Inserts x into the treap in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if value is + //! less than the greatest inserted key treap ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { tree_.push_back(value); } + + //! Requires: value must be an lvalue, and it must be less + //! than any inserted key according to the predicate. + //! + //! Effects: Inserts x into the treap in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if value is + //! greater than the minimum inserted key treap ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { tree_.push_front(value); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: If the internal priority_compare function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size()) + this->count(value)). + //! + //! Throws: If internal value_compare or priority_compare + //! ordering functions throw. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp or internal priority_compare + //! ordering functions throw. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Throws: If the internal priority_compare function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: If the internal value_compare ordering function throws. + //! + //! Complexity: O(log(size() + this->count(value)). Basic guarantee. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp or internal priority_compare ordering functions throw. + //! Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) const + { return tree_.find(value) != end(); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp) != end(); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound(const_reference value) const + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound(const_reference value) const + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find(const_reference value) const + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range(const_reference value) const + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range(key, comp); } + + //! Requires: value must be an lvalue and shall be in a treap_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the treap_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a treap_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! treap_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a treap_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the treap_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a treap_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! treap_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a treap_set/treap_multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + void rebalance() + { tree_.rebalance(); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + iterator rebalance_subtree(iterator root) + { return tree_.rebalance_subtree(root); } + + //! Returns: The balance factor (alpha) used in this tree + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + float balance_factor() const + { return tree_.balance_factor(); } + + //! Requires: new_alpha must be a value between 0.5 and 1.0 + //! + //! Effects: Establishes a new balance factor (alpha) and rebalances + //! the tree if the new balance factor is stricter (less) than the old factor. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + void balance_factor(float new_alpha) + { tree_.balance_factor(new_alpha); } + + /// @cond + friend bool operator==(const treap_set_impl &x, const treap_set_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const treap_set_impl &x, const treap_set_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_set_impl &x, const treap_set_impl &y) +#else +(const treap_set_impl &x, const treap_set_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_set_impl &x, const treap_set_impl &y) +#else +(const treap_set_impl &x, const treap_set_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_set_impl &x, const treap_set_impl &y) +#else +(const treap_set_impl &x, const treap_set_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_set_impl &x, const treap_set_impl &y) +#else +(const treap_set_impl &x, const treap_set_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(treap_set_impl &x, treap_set_impl &y) +#else +(treap_set_impl &x, treap_set_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c treap_set that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_treap_set +{ + /// @cond + typedef treap_set_impl + < typename make_treap_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class treap_set + : public make_treap_set::type +{ + typedef typename make_treap_set + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::priority_compare priority_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + treap_set( const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, pcmp, v_traits) + {} + + template + treap_set( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, pcmp, v_traits) + {} + + static treap_set &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const treap_set &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static treap_set &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const treap_set &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + +//! The class template treap_multiset is an intrusive container, that mimics most of +//! the interface of std::treap_multiset as described in the C++ standard. +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<>, +//! \c compare<> and \c priority_compare<> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class treap_multiset_impl +{ + /// @cond + typedef treap_impl tree_type; + + //Non-copyable and non-assignable + treap_multiset_impl (const treap_multiset_impl&); + treap_multiset_impl &operator =(const treap_multiset_impl&); + typedef tree_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::value_compare value_compare; + typedef typename implementation_defined::priority_compare priority_compare; + typedef typename implementation_defined::key_compare key_compare; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::reverse_iterator reverse_iterator; + typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + static const bool constant_time_size = Config::constant_time_size; + + /// @cond + private: + tree_type tree_; + /// @endcond + + public: + //! Effects: Constructs an empty treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor of the value_compare/priority_compare objects throw. + treap_multiset_impl( const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : tree_(cmp, pcmp, v_traits) + {} + + //! Requires: Dereferencing iterator must yield an lvalue of type value_type. + //! cmp must be a comparison function that induces a strict weak ordering. + //! + //! Effects: Constructs an empty treap_multiset and inserts elements from + //! [b, e). + //! + //! Complexity: Linear in N if [b, e) is already sorted using + //! comp and otherwise N * log N, where N is the distance between first and last + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor/operator() of the value_compare/priority_compare objects throw. + template + treap_multiset_impl( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : tree_(false, b, e, cmp, pcmp, v_traits) + {} + + //! Effects: Detaches all elements from this. The objects in the treap_multiset + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + ~treap_multiset_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator begin() + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator begin() const + { return tree_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning of the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return tree_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return tree_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return tree_.cend(); } + + //! Effects: Returns an iterator pointing to the highest priority object of the tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator top() + { return tree_.top(); } + + //! Effects: Returns a const_iterator pointing to the highest priority object of the tree.. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator top() const + { return this->ctop(); } + + //! Effects: Returns a const_iterator pointing to the highest priority object of the tree.. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator ctop() const + { return tree_.ctop(); } + + //! Effects: Returns a reverse_iterator pointing to the beginning of the + //! reversed treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rbegin() + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rbegin() const + { return tree_.rbegin(); } + + //! Effects: Returns a const_reverse_iterator pointing to the beginning + //! of the reversed treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crbegin() const + { return tree_.crbegin(); } + + //! Effects: Returns a reverse_iterator pointing to the end + //! of the reversed treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rend() + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rend() const + { return tree_.rend(); } + + //! Effects: Returns a const_reverse_iterator pointing to the end + //! of the reversed treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crend() const + { return tree_.crend(); } + + //! Effects: Returns a reverse_iterator pointing to the highest priority object of the + //! reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + reverse_iterator rtop() + { return tree_.rtop(); } + + //! Effects: Returns a const_reverse_iterator pointing to the highest priority objec + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator rtop() const + { return tree_.crtop(); } + + //! Effects: Returns a const_reverse_iterator pointing to the highest priority object + //! of the reversed tree. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_reverse_iterator crtop() const + { return tree_.crtop(); } + + //! Precondition: end_iterator must be a valid end iterator + //! of treap_multiset. + //! + //! Effects: Returns a const reference to the treap_multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static treap_multiset_impl &container_from_end_iterator(iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &treap_multiset_impl::tree_); + } + + //! Precondition: end_iterator must be a valid end const_iterator + //! of treap_multiset. + //! + //! Effects: Returns a const reference to the treap_multiset associated to the end iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const treap_multiset_impl &container_from_end_iterator(const_iterator end_iterator) + { + return *detail::parent_from_member + ( &tree_type::container_from_end_iterator(end_iterator) + , &treap_multiset_impl::tree_); + } + + //! Precondition: it must be a valid iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static treap_multiset_impl &container_from_iterator(iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &treap_multiset_impl::tree_); + } + + //! Precondition: it must be a valid const_iterator of multiset. + //! + //! Effects: Returns a const reference to the multiset associated to the iterator + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + static const treap_multiset_impl &container_from_iterator(const_iterator it) + { + return *detail::parent_from_member + ( &tree_type::container_from_iterator(it) + , &treap_multiset_impl::tree_); + } + + //! Effects: Returns the key_compare object used by the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If key_compare copy-constructor throws. + key_compare key_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the value_compare object used by the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If value_compare copy-constructor throws. + value_compare value_comp() const + { return tree_.value_comp(); } + + //! Effects: Returns the priority_compare object used by the treap_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If priority_compare copy-constructor throws. + priority_compare priority_comp() const + { return tree_.priority_comp(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bool empty() const + { return tree_.empty(); } + + //! Effects: Returns the number of elements stored in the treap_multiset. + //! + //! Complexity: Linear to elements contained in *this if, + //! constant-time size option is enabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return tree_.size(); } + + //! Effects: Swaps the contents of two treap_multisets. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison functor + //! found using ADL throws. Strong guarantee. + void swap(treap_multiset_impl& other) + { tree_.swap(other.tree_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes equivalent to the original nodes. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. Copies the predicate from the source container. + //! + //! If cloner throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. + template + void clone_from(const treap_multiset_impl &src, Cloner cloner, Disposer disposer) + { tree_.clone_from(src.tree_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the treap_multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Average complexity for insert element is at + //! most logarithmic. + //! + //! Throws: If the internal value_compare or priority_compare ordering + //! function throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(reference value) + { return tree_.insert_equal(value); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts x into the treap_multiset, using pos as a hint to + //! where it will be inserted. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Logarithmic in general, but it is amortized + //! constant time if t is inserted immediately before hint. + //! + //! Throws: If internal value_compare or priority_compare ordering functions throw. + //! Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(const_iterator hint, reference value) + { return tree_.insert_equal(hint, value); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Inserts a range into the treap_multiset. + //! + //! Returns: An iterator that points to the position where the new + //! element was inserted. + //! + //! Complexity: Insert range is in general O(N * log(N)), where N is the + //! size of the range. However, it is linear in N if the range is already sorted + //! by value_comp(). + //! + //! Throws: If internal value_compare or priority_compare ordering functions throw. + //! Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { tree_.insert_equal(b, e); } + + //! Requires: value must be an lvalue, "pos" must be + //! a valid iterator (or end) and must be the succesor of value + //! once inserted according to the predicate + //! + //! Effects: Inserts x into the treap before "pos". + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if "pos" is not + //! the successor of "value" treap ordering invariant will be broken. + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + iterator insert_before(const_iterator pos, reference value) + { return tree_.insert_before(pos, value); } + + //! Requires: value must be an lvalue, and it must be no less + //! than the greatest inserted key. + //! + //! Effects: Inserts x into the treap in the last position. + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if value is + //! less than the greatest inserted key treap ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_back(reference value) + { tree_.push_back(value); } + + //! Requires: value must be an lvalue, and it must be no greater + //! than the minimum inserted key + //! + //! Effects: Inserts x into the treap in the first position. + //! + //! Complexity: Constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: This function does not check preconditions so if value is + //! greater than the minimum inserted key treap ordering invariant will be broken. + //! This function is slightly more efficient than using "insert_before". + //! This is a low-level function to be used only for performance reasons + //! by advanced users. + void push_front(reference value) + { tree_.push_front(value); } + + //! Effects: Erases the element pointed to by pos. + //! + //! Complexity: Average complexity is constant time. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator i) + { return tree_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: If the internal priority_compare function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + iterator erase(const_iterator b, const_iterator e) + { return tree_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare or priority_compare ordering + //! functiona throw. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return tree_.erase(value); } + + //! Effects: Erases all the elements that compare equal with + //! the given key and the given comparison functor. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp or internal priority_compare ordering functions throw. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyValueCompare comp + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase(key, comp); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased element. + //! + //! Effects: Erases the element pointed to by pos. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average complexity for erase element is constant time. + //! + //! Throws: If the internal priority_compare function throws. Strong guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator i, Disposer disposer) + { return tree_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + iterator erase_and_dispose(iterator i, Disposer disposer) + { return this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Returns: An iterator to the element after the erased elements. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average complexity for erase range is at most + //! O(log(size() + N)), where N is the number of elements in the range. + //! + //! Throws: If the internal priority_compare function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { return tree_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(value)). + //! + //! Throws: If the internal value_compare ordering function throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return tree_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "comp". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: O(log(size() + this->count(key, comp)). + //! + //! Throws: If comp or internal priority_compare ordering functions throw. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyValueCompare comp, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { return tree_.erase_and_dispose(key, comp, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return tree_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return tree_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If the internal value_compare ordering function throws. + size_type count(const_reference value) const + { return tree_.count(value); } + + //! Effects: Returns the number of contained elements with the same key + //! compared with the given comparison functor. + //! + //! Complexity: Logarithmic to the number of elements contained plus lineal + //! to number of objects with the given key. + //! + //! Throws: If comp ordering function throws. + template + size_type count(const KeyType& key, KeyValueCompare comp) const + { return tree_.count(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator lower_bound(const_reference value) + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator lower_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns a const iterator to the first element whose + //! key is not less than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator lower_bound(const_reference value) const + { return tree_.lower_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is not less than k or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator lower_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.lower_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator upper_bound(const_reference value) + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns an iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator upper_bound(const KeyType& key, KeyValueCompare comp) + { return tree_.upper_bound(key, comp); } + + //! Effects: Returns an iterator to the first element whose + //! key is greater than k or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator upper_bound(const_reference value) const + { return tree_.upper_bound(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Returns a const_iterator to the first element whose + //! key according to the comparison functor is greater than key or + //! end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator upper_bound(const KeyType& key, KeyValueCompare comp) const + { return tree_.upper_bound(key, comp); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + iterator find(const_reference value) + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyValueCompare comp) + { return tree_.find(key, comp); } + + //! Effects: Finds a const_iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + const_iterator find(const_reference value) const + { return tree_.find(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" according to the comparison functor or end() if that element + //! does not exist. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyValueCompare comp) const + { return tree_.find(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair equal_range(const_reference value) + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyValueCompare comp) + { return tree_.equal_range(key, comp); } + + //! Effects: Finds a range containing all elements whose key is k or + //! an empty range that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If the internal value_compare ordering function throws. + std::pair + equal_range(const_reference value) const + { return tree_.equal_range(value); } + + //! Requires: comp must imply the same element order as + //! value_compare. Usually key is the part of the value_type + //! that is used in the ordering functor. + //! + //! Effects: Finds a range containing all elements whose key is k + //! according to the comparison functor or an empty range + //! that indicates the position where those elements would be + //! if they there is no elements with key k. + //! + //! Complexity: Logarithmic. + //! + //! Throws: If comp ordering function throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyValueCompare comp) const + { return tree_.equal_range(key, comp); } + + //! Requires: value must be an lvalue and shall be in a treap_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the treap_multiset + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static iterator s_iterator_to(reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a treap_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! treap_multiset that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_iterator s_iterator_to(const_reference value) + { return tree_type::s_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a treap_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator i belonging to the treap_multiset + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator iterator_to(reference value) + { return tree_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a treap_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator i belonging to the + //! treap_multiset that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator iterator_to(const_reference value) const + { return tree_.iterator_to(value); } + + //! Requires: value shall not be in a treap_multiset/treap_multiset. + //! + //! Effects: init_node puts the hook of a value in a well-known default + //! state. + //! + //! Throws: Nothing. + //! + //! Complexity: Constant time. + //! + //! Note: This function puts the hook in the well-known default state + //! used by auto_unlink and safe hooks. + static void init_node(reference value) + { tree_type::init_node(value); } + + //! Effects: Unlinks the leftmost node from the tree. + //! + //! Complexity: Average complexity is constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function breaks the tree and the tree can + //! only be used for more unlink_leftmost_without_rebalance calls. + //! This function is normally used to achieve a step by step + //! controlled destruction of the tree. + pointer unlink_leftmost_without_rebalance() + { return tree_.unlink_leftmost_without_rebalance(); } + + //! Requires: replace_this must be a valid iterator of *this + //! and with_this must not be inserted in any tree. + //! + //! Effects: Replaces replace_this in its position in the + //! tree with with_this. The tree does not need to be rebalanced. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This function will break container ordering invariants if + //! with_this is not equivalent to *replace_this according to the + //! ordering rules. This function is faster than erasing and inserting + //! the node, since no rebalancing or comparison is needed. + void replace_node(iterator replace_this, reference with_this) + { tree_.replace_node(replace_this, with_this); } + + //! Effects: Rebalances the tree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear. + void rebalance() + { tree_.rebalance(); } + + //! Requires: old_root is a node of a tree. + //! + //! Effects: Rebalances the subtree rooted at old_root. + //! + //! Returns: The new root of the subtree. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + iterator rebalance_subtree(iterator root) + { return tree_.rebalance_subtree(root); } + + //! Returns: The balance factor (alpha) used in this tree + //! + //! Throws: Nothing. + //! + //! Complexity: Constant. + float balance_factor() const + { return tree_.balance_factor(); } + + //! Requires: new_alpha must be a value between 0.5 and 1.0 + //! + //! Effects: Establishes a new balance factor (alpha) and rebalances + //! the tree if the new balance factor is stricter (less) than the old factor. + //! + //! Throws: Nothing. + //! + //! Complexity: Linear to the elements in the subtree. + void balance_factor(float new_alpha) + { tree_.balance_factor(new_alpha); } + + /// @cond + friend bool operator==(const treap_multiset_impl &x, const treap_multiset_impl &y) + { return x.tree_ == y.tree_; } + + friend bool operator<(const treap_multiset_impl &x, const treap_multiset_impl &y) + { return x.tree_ < y.tree_; } + /// @endcond +}; + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator!= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_multiset_impl &x, const treap_multiset_impl &y) +#else +(const treap_multiset_impl &x, const treap_multiset_impl &y) +#endif +{ return !(x == y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator> +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_multiset_impl &x, const treap_multiset_impl &y) +#else +(const treap_multiset_impl &x, const treap_multiset_impl &y) +#endif +{ return y < x; } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator<= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_multiset_impl &x, const treap_multiset_impl &y) +#else +(const treap_multiset_impl &x, const treap_multiset_impl &y) +#endif +{ return !(y < x); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline bool operator>= +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(const treap_multiset_impl &x, const treap_multiset_impl &y) +#else +(const treap_multiset_impl &x, const treap_multiset_impl &y) +#endif +{ return !(x < y); } + +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +inline void swap +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +(treap_multiset_impl &x, treap_multiset_impl &y) +#else +(treap_multiset_impl &x, treap_multiset_impl &y) +#endif +{ x.swap(y); } + +//! Helper metafunction to define a \c treap_multiset that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_treap_multiset +{ + /// @cond + typedef treap_multiset_impl + < typename make_treap_opt::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class treap_multiset + : public make_treap_multiset::type +{ + typedef typename make_treap_multiset + ::type Base; + + public: + typedef typename Base::value_compare value_compare; + typedef typename Base::priority_compare priority_compare; + typedef typename Base::value_traits value_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + treap_multiset( const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : Base(cmp, pcmp, v_traits) + {} + + template + treap_multiset( Iterator b, Iterator e + , const value_compare &cmp = value_compare() + , const priority_compare &pcmp = priority_compare() + , const value_traits &v_traits = value_traits()) + : Base(b, e, cmp, pcmp, v_traits) + {} + + static treap_multiset &container_from_end_iterator(iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static const treap_multiset &container_from_end_iterator(const_iterator end_iterator) + { return static_cast(Base::container_from_end_iterator(end_iterator)); } + + static treap_multiset &container_from_iterator(iterator it) + { return static_cast(Base::container_from_iterator(it)); } + + static const treap_multiset &container_from_iterator(const_iterator it) + { return static_cast(Base::container_from_iterator(it)); } +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_TRIE_SET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/trivial_value_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/trivial_value_traits.hpp new file mode 100644 index 0000000000..4527d7c4c4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/trivial_value_traits.hpp @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_TRIVIAL_VALUE_TRAITS_HPP +#define BOOST_INTRUSIVE_TRIVIAL_VALUE_TRAITS_HPP + +#include + +namespace boost { +namespace intrusive { + +//!This value traits template is used to create value traits +//!from user defined node traits where value_traits::value_type and +//!node_traits::node should be equal +template +struct trivial_value_traits +{ + typedef NodeTraits node_traits; + typedef typename node_traits::node_ptr node_ptr; + typedef typename node_traits::const_node_ptr const_node_ptr; + typedef typename node_traits::node value_type; + typedef node_ptr pointer; + typedef const_node_ptr const_pointer; + static const link_mode_type link_mode = LinkMode; + static node_ptr to_node_ptr (value_type &value) { return node_ptr(&value); } + static const_node_ptr to_node_ptr (const value_type &value) { return const_node_ptr(&value); } + static pointer to_value_ptr(node_ptr n) { return pointer(n); } + static const_pointer to_value_ptr(const_node_ptr n) { return const_pointer(n); } +}; + +} //namespace intrusive +} //namespace boost + +#endif //BOOST_INTRUSIVE_TRIVIAL_VALUE_TRAITS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/unordered_set.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/unordered_set.hpp new file mode 100644 index 0000000000..2b40f6148b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/unordered_set.hpp @@ -0,0 +1,2084 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_INTRUSIVE_UNORDERED_SET_HPP +#define BOOST_INTRUSIVE_UNORDERED_SET_HPP + +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +//! The class template unordered_set is an intrusive container, that mimics most of +//! the interface of std::tr1::unordered_set as described in the C++ TR1. +//! +//! unordered_set is a semi-intrusive container: each object to be stored in the +//! container must contain a proper hook, but the container also needs +//! additional auxiliary memory to work: unordered_set needs a pointer to an array +//! of type `bucket_type` to be passed in the constructor. This bucket array must +//! have at least the same lifetime as the container. This makes the use of +//! unordered_set more complicated than purely intrusive containers. +//! `bucket_type` is default-constructible, copyable and assignable +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<> +//! \c bucket_traits<>, power_2_buckets<> and cache_begin<>. +//! +//! unordered_set only provides forward iterators but it provides 4 iterator types: +//! iterator and const_iterator to navigate through the whole container and +//! local_iterator and const_local_iterator to navigate through the values +//! stored in a single bucket. Local iterators are faster and smaller. +//! +//! It's not recommended to use non constant-time size unordered_sets because several +//! key functions, like "empty()", become non-constant time functions. Non +//! constant-time size unordered_sets are mainly provided to support auto-unlink hooks. +//! +//! unordered_set, unlike std::unordered_set, does not make automatic rehashings nor +//! offers functions related to a load factor. Rehashing can be explicitly requested +//! and the user must provide a new bucket array that will be used from that moment. +//! +//! Since no automatic rehashing is done, iterators are never invalidated when +//! inserting or erasing elements. Iterators are only invalidated when rehasing. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class unordered_set_impl +{ + /// @cond + private: + typedef hashtable_impl table_type; + + //! This class is + //! non-copyable + unordered_set_impl (const unordered_set_impl&); + + //! This class is + //! non-assignable + unordered_set_impl &operator =(const unordered_set_impl&); + + typedef table_type implementation_defined; + /// @endcond + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::bucket_traits bucket_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::key_type key_type; + typedef typename implementation_defined::key_equal key_equal; + typedef typename implementation_defined::hasher hasher; + typedef typename implementation_defined::bucket_type bucket_type; + typedef typename implementation_defined::bucket_ptr bucket_ptr; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::local_iterator local_iterator; + typedef typename implementation_defined::const_local_iterator const_local_iterator; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + /// @cond + private: + table_type table_; + /// @endcond + + public: + + //! Requires: buckets must not be being used by any other resource. + //! + //! Effects: Constructs an empty unordered_set_impl, storing a reference + //! to the bucket array and copies of the hasher and equal functors. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor or invocation of Hash or Equal throws. + //! + //! Notes: buckets array must be disposed only after + //! *this is disposed. + unordered_set_impl( const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : table_(b_traits, hash_func, equal_func, v_traits) + {} + + //! Requires: buckets must not be being used by any other resource + //! and Dereferencing iterator must yield an lvalue of type value_type. + //! + //! Effects: Constructs an empty unordered_set and inserts elements from + //! [b, e). + //! + //! Complexity: If N is std::distance(b, e): Average case is O(N) + //! (with a good hash function and with buckets_len >= N),worst case O(N2). + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor or invocation of hasher or key_equal throws. + //! + //! Notes: buckets array must be disposed only after + //! *this is disposed. + template + unordered_set_impl( Iterator b + , Iterator e + , const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : table_(b_traits, hash_func, equal_func, v_traits) + { table_.insert_unique(b, e); } + + //! Effects: Detaches all elements from this. The objects in the unordered_set + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements in the unordered_set, if + //! it's a safe-mode or auto-unlink value. Otherwise constant. + //! + //! Throws: Nothing. + ~unordered_set_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the unordered_set. + //! + //! Complexity: Constant time if `cache_begin<>` is true. Amortized + //! constant time with worst case (empty unordered_set) O(this->bucket_count()) + //! + //! Throws: Nothing. + iterator begin() + { return table_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning + //! of the unordered_set. + //! + //! Complexity: Constant time if `cache_begin<>` is true. Amortized + //! constant time with worst case (empty unordered_set) O(this->bucket_count()) + //! + //! Throws: Nothing. + const_iterator begin() const + { return table_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning + //! of the unordered_set. + //! + //! Complexity: Constant time if `cache_begin<>` is true. Amortized + //! constant time with worst case (empty unordered_set) O(this->bucket_count()) + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return table_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return table_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return table_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return table_.cend(); } + + //! Effects: Returns the hasher object used by the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: If hasher copy-constructor throws. + hasher hash_function() const + { return table_.hash_function(); } + + //! Effects: Returns the key_equal object used by the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: If key_equal copy-constructor throws. + key_equal key_eq() const + { return table_.key_eq(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: if constant-time size and cache_last options are disabled, + //! average constant time (worst case, with empty() == true: O(this->bucket_count()). + //! Otherwise constant. + //! + //! Throws: Nothing. + bool empty() const + { return table_.empty(); } + + //! Effects: Returns the number of elements stored in the unordered_set. + //! + //! Complexity: Linear to elements contained in *this if + //! constant-time size option is disabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return table_.size(); } + + //! Requires: the hasher and the equality function unqualified swap + //! call should not throw. + //! + //! Effects: Swaps the contents of two unordered_sets. + //! Swaps also the contained bucket array and equality and hasher functors. + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison or hash functors + //! found using ADL throw. Basic guarantee. + void swap(unordered_set_impl& other) + { table_.swap(other.table_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes that compare equal and produce the same + //! hash than the original node. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. The hash function and the equality + //! predicate are copied from the source. + //! + //! If store_hash option is true, this method does not use the hash function. + //! + //! If any operation throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner or hasher throw or hash or equality predicate copying + //! throws. Basic guarantee. + template + void clone_from(const unordered_set_impl &src, Cloner cloner, Disposer disposer) + { table_.clone_from(src.table_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Tries to inserts value into the unordered_set. + //! + //! Returns: If the value + //! is not already present inserts it and returns a pair containing the + //! iterator to the new value and true. If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + std::pair insert(reference value) + { return table_.insert_unique(value); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Equivalent to this->insert(t) for each element in [b, e). + //! + //! Complexity: Average case O(N), where N is std::distance(b, e). + //! Worst case O(N*this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { table_.insert_unique(b, e); } + + //! Requires: "hasher" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hasher" hashes the given key instead of the value_type. + //! + //! "key_value_equal" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "key_value_equal" compares an arbitrary key with the contained values. + //! + //! Effects: Checks if a value can be inserted in the unordered_set, using + //! a user provided key instead of the value itself. + //! + //! Returns: If there is an equivalent value + //! returns a pair containing an iterator to the already present value + //! and false. If the value can be inserted returns true in the returned + //! pair boolean and fills "commit_data" that is meant to be used with + //! the "insert_commit" function. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If hasher or key_value_equal throw. Strong guarantee. + //! + //! Notes: This function is used to improve performance when constructing + //! a value_type is expensive: if there is an equivalent value + //! the constructed object must be discarded. Many times, the part of the + //! node that is used to impose the hash or the equality is much cheaper to + //! construct than the value_type and this function offers the possibility to + //! use that the part to check if the insertion will be successful. + //! + //! If the check is successful, the user can construct the value_type and use + //! "insert_commit" to insert the object in constant-time. + //! + //! "commit_data" remains valid for a subsequent "insert_commit" only if no more + //! objects are inserted or erased from the unordered_set. + //! + //! After a successful rehashing insert_commit_data remains valid. + template + std::pair insert_check + (const KeyType &key, KeyHasher hasher, KeyValueEqual key_value_equal, insert_commit_data &commit_data) + { return table_.insert_unique_check(key, hasher, key_value_equal, commit_data); } + + //! Requires: value must be an lvalue of type value_type. commit_data + //! must have been obtained from a previous call to "insert_check". + //! No objects should have been inserted or erased from the unordered_set between + //! the "insert_check" that filled "commit_data" and the call to "insert_commit". + //! + //! Effects: Inserts the value in the unordered_set using the information obtained + //! from the "commit_data" that a previous "insert_check" filled. + //! + //! Returns: An iterator to the newly inserted object. + //! + //! Complexity: Constant time. + //! + //! Throws: Nothing. + //! + //! Notes: This function has only sense if a "insert_check" has been + //! previously executed to fill "commit_data". No value should be inserted or + //! erased between the "insert_check" and "insert_commit" calls. + //! + //! After a successful rehashing insert_commit_data remains valid. + iterator insert_commit(reference value, const insert_commit_data &commit_data) + { return table_.insert_unique_commit(value, commit_data); } + + //! Effects: Erases the element pointed to by i. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased element. No destructors are called. + void erase(const_iterator i) + { table_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average case O(std::distance(b, e)), + //! worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void erase(const_iterator b, const_iterator e) + { table_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return table_.erase(value); } + + //! Requires: "hasher" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hasher" hashes the given key instead of the value_type. + //! + //! "key_value_equal" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "key_value_equal" compares an arbitrary key with the contained values. + //! + //! Effects: Erases all the elements that have the same hash and + //! compare equal with the given key. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) + { return table_.erase(key, hash_func, equal_func); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by i. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + void erase_and_dispose(const_iterator i, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { table_.erase_and_dispose(i, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average case O(std::distance(b, e)), + //! worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { table_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return table_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "equal_func". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func, Disposer disposer) + { return table_.erase_and_dispose(key, hash_func, equal_func, disposer); } + + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return table_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all of the elements. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return table_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given value + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + size_type count(const_reference value) const + { return table_.find(value) != end(); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. + template + size_type count(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) const + { return table_.find(key, hash_func, equal_func) != end(); } + + //! Effects: Finds an iterator to the first element is equal to + //! "value" or end() if that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + iterator find(const_reference value) + { return table_.find(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the given hasher and equality functor or end() if + //! that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) + { return table_.find(key, hash_func, equal_func); } + + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" or end() if that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + const_iterator find(const_reference value) const + { return table_.find(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the given hasher and equality functor or end() if + //! that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) const + { return table_.find(key, hash_func, equal_func); } + + //! Effects: Returns a range containing all elements with values equivalent + //! to value. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(value)). Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + std::pair equal_range(const_reference value) + { return table_.equal_range(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Returns a range containing all elements with equivalent + //! keys. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(key, hash_func, hash_func)). + //! Worst case O(this->size()). + //! + //! Throws: If hash_func or the equal_func throw. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) + { return table_.equal_range(key, hash_func, equal_func); } + + //! Effects: Returns a range containing all elements with values equivalent + //! to value. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(value)). Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + std::pair + equal_range(const_reference value) const + { return table_.equal_range(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "equal_func" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "equal_func" compares an arbitrary key with the contained values. + //! + //! Effects: Returns a range containing all elements with equivalent + //! keys. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(key, hash_func, equal_func)). + //! Worst case O(this->size()). + //! + //! Throws: If the hash_func or equal_func throw. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) const + { return table_.equal_range(key, hash_func, equal_func); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator belonging to the unordered_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: If the internal hash function throws. + iterator iterator_to(reference value) + { return table_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator belonging to the + //! unordered_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: If the internal hash function throws. + const_iterator iterator_to(const_reference value) const + { return table_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid local_iterator belonging to the unordered_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static local_iterator s_local_iterator_to(reference value) + { return table_type::s_local_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_local_iterator belonging to + //! the unordered_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_local_iterator s_local_iterator_to(const_reference value) + { return table_type::s_local_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid local_iterator belonging to the unordered_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + local_iterator local_iterator_to(reference value) + { return table_.local_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_local_iterator belonging to + //! the unordered_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_local_iterator local_iterator_to(const_reference value) const + { return table_.local_iterator_to(value); } + + //! Effects: Returns the number of buckets passed in the constructor + //! or the last rehash function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + size_type bucket_count() const + { return table_.bucket_count(); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns the number of elements in the nth bucket. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + size_type bucket_size(size_type n) const + { return table_.bucket_size(n); } + + //! Effects: Returns the index of the bucket in which elements + //! with keys equivalent to k would be found, if any such element existed. + //! + //! Complexity: Constant. + //! + //! Throws: If the hash functor throws. + //! + //! Note: the return value is in the range [0, this->bucket_count()). + size_type bucket(const value_type& k) const + { return table_.bucket(k); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! Effects: Returns the index of the bucket in which elements + //! with keys equivalent to k would be found, if any such element existed. + //! + //! Complexity: Constant. + //! + //! Throws: If hash_func throws. + //! + //! Note: the return value is in the range [0, this->bucket_count()). + template + size_type bucket(const KeyType& k, KeyHasher hash_func) const + { return table_.bucket(k, hash_func); } + + //! Effects: Returns the bucket array pointer passed in the constructor + //! or the last rehash function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bucket_ptr bucket_pointer() const + { return table_.bucket_pointer(); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + local_iterator begin(size_type n) + { return table_.begin(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator begin(size_type n) const + { return table_.begin(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator cbegin(size_type n) const + { return table_.cbegin(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + local_iterator end(size_type n) + { return table_.end(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator end(size_type n) const + { return table_.end(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator cend(size_type n) const + { return table_.cend(n); } + + //! Requires: new_buckets must be a pointer to a new bucket array + //! or the same as the old bucket array. new_size is the length of the + //! the array pointed by new_buckets. If new_buckets == this->bucket_pointer() + //! n can be bigger or smaller than this->bucket_count(). + //! + //! Effects: Updates the internal reference with the new bucket erases + //! the values from the old bucket and inserts then in the new one. + //! + //! If store_hash option is true, this method does not use the hash function. + //! + //! Complexity: Average case linear in this->size(), worst case quadratic. + //! + //! Throws: If the hasher functor throws. Basic guarantee. + void rehash(const bucket_traits &new_bucket_traits) + { table_.rehash(new_bucket_traits); } + + //! Requires: + //! + //! Effects: + //! + //! Complexity: + //! + //! Throws: + //! + //! Note: this method is only available if incremental option is activated. + bool incremental_rehash(bool grow = true) + { return table_.incremental_rehash(grow); } + + //! Note: this method is only available if incremental option is activated. + bool incremental_rehash(const bucket_traits &new_bucket_traits) + { return table_.incremental_rehash(new_bucket_traits); } + + //! Requires: + //! + //! Effects: + //! + //! Complexity: + //! + //! Throws: + size_type split_count() const + { return table_.split_count(); } + + //! Effects: Returns the nearest new bucket count optimized for + //! the container that is bigger than n. This suggestion can be used + //! to create bucket arrays with a size that will usually improve + //! container's performance. If such value does not exist, the + //! higher possible value is returned. + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + static size_type suggested_upper_bucket_count(size_type n) + { return table_type::suggested_upper_bucket_count(n); } + + //! Effects: Returns the nearest new bucket count optimized for + //! the container that is smaller than n. This suggestion can be used + //! to create bucket arrays with a size that will usually improve + //! container's performance. If such value does not exist, the + //! lower possible value is returned. + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + static size_type suggested_lower_bucket_count(size_type n) + { return table_type::suggested_lower_bucket_count(n); } +}; + +//! Helper metafunction to define an \c unordered_set that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_unordered_set +{ + /// @cond + typedef unordered_set_impl + < typename make_hashtable_opt + ::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class unordered_set + : public make_unordered_set::type +{ + typedef typename make_unordered_set + ::type Base; + + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + public: + typedef typename Base::value_traits value_traits; + typedef typename Base::bucket_traits bucket_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + typedef typename Base::bucket_ptr bucket_ptr; + typedef typename Base::size_type size_type; + typedef typename Base::hasher hasher; + typedef typename Base::key_equal key_equal; + + unordered_set ( const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : Base(b_traits, hash_func, equal_func, v_traits) + {} + + template + unordered_set ( Iterator b + , Iterator e + , const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : Base(b, e, b_traits, hash_func, equal_func, v_traits) + {} +}; + +#endif + + +//! The class template unordered_multiset is an intrusive container, that mimics most of +//! the interface of std::tr1::unordered_multiset as described in the C++ TR1. +//! +//! unordered_multiset is a semi-intrusive container: each object to be stored in the +//! container must contain a proper hook, but the container also needs +//! additional auxiliary memory to work: unordered_multiset needs a pointer to an array +//! of type `bucket_type` to be passed in the constructor. This bucket array must +//! have at least the same lifetime as the container. This makes the use of +//! unordered_multiset more complicated than purely intrusive containers. +//! `bucket_type` is default-constructible, copyable and assignable +//! +//! The template parameter \c T is the type to be managed by the container. +//! The user can specify additional options and if no options are provided +//! default options are used. +//! +//! The container supports the following options: +//! \c base_hook<>/member_hook<>/value_traits<>, +//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<> +//! \c bucket_traits<>, power_2_buckets<> and cache_begin<>. +//! +//! unordered_multiset only provides forward iterators but it provides 4 iterator types: +//! iterator and const_iterator to navigate through the whole container and +//! local_iterator and const_local_iterator to navigate through the values +//! stored in a single bucket. Local iterators are faster and smaller. +//! +//! It's not recommended to use non constant-time size unordered_multisets because several +//! key functions, like "empty()", become non-constant time functions. Non +//! constant-time size unordered_multisets are mainly provided to support auto-unlink hooks. +//! +//! unordered_multiset, unlike std::unordered_set, does not make automatic rehashings nor +//! offers functions related to a load factor. Rehashing can be explicitly requested +//! and the user must provide a new bucket array that will be used from that moment. +//! +//! Since no automatic rehashing is done, iterators are never invalidated when +//! inserting or erasing elements. Iterators are only invalidated when rehasing. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) +template +#else +template +#endif +class unordered_multiset_impl +{ + /// @cond + private: + typedef hashtable_impl table_type; + /// @endcond + + //! This class is + //! non-copyable + unordered_multiset_impl (const unordered_multiset_impl&); + + //! This class is + //! non-assignable + unordered_multiset_impl &operator =(const unordered_multiset_impl&); + + typedef table_type implementation_defined; + + public: + typedef typename implementation_defined::value_type value_type; + typedef typename implementation_defined::value_traits value_traits; + typedef typename implementation_defined::bucket_traits bucket_traits; + typedef typename implementation_defined::pointer pointer; + typedef typename implementation_defined::const_pointer const_pointer; + typedef typename implementation_defined::reference reference; + typedef typename implementation_defined::const_reference const_reference; + typedef typename implementation_defined::difference_type difference_type; + typedef typename implementation_defined::size_type size_type; + typedef typename implementation_defined::key_type key_type; + typedef typename implementation_defined::key_equal key_equal; + typedef typename implementation_defined::hasher hasher; + typedef typename implementation_defined::bucket_type bucket_type; + typedef typename implementation_defined::bucket_ptr bucket_ptr; + typedef typename implementation_defined::iterator iterator; + typedef typename implementation_defined::const_iterator const_iterator; + typedef typename implementation_defined::insert_commit_data insert_commit_data; + typedef typename implementation_defined::local_iterator local_iterator; + typedef typename implementation_defined::const_local_iterator const_local_iterator; + typedef typename implementation_defined::node_traits node_traits; + typedef typename implementation_defined::node node; + typedef typename implementation_defined::node_ptr node_ptr; + typedef typename implementation_defined::const_node_ptr const_node_ptr; + typedef typename implementation_defined::node_algorithms node_algorithms; + + /// @cond + private: + table_type table_; + /// @endcond + + public: + + //! Requires: buckets must not be being used by any other resource. + //! + //! Effects: Constructs an empty unordered_multiset, storing a reference + //! to the bucket array and copies of the hasher and equal functors. + //! + //! Complexity: Constant. + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor or invocation of Hash or Equal throws. + //! + //! Notes: buckets array must be disposed only after + //! *this is disposed. + unordered_multiset_impl ( const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : table_(b_traits, hash_func, equal_func, v_traits) + {} + + //! Requires: buckets must not be being used by any other resource + //! and Dereferencing iterator must yield an lvalue of type value_type. + //! + //! Effects: Constructs an empty unordered_multiset and inserts elements from + //! [b, e). + //! + //! Complexity: If N is std::distance(b, e): Average case is O(N) + //! (with a good hash function and with buckets_len >= N),worst case O(N2). + //! + //! Throws: If value_traits::node_traits::node + //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) + //! or the copy constructor or invocation of hasher or key_equal throws. + //! + //! Notes: buckets array must be disposed only after + //! *this is disposed. + template + unordered_multiset_impl ( Iterator b + , Iterator e + , const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : table_(b_traits, hash_func, equal_func, v_traits) + { table_.insert_equal(b, e); } + + //! Effects: Detaches all elements from this. The objects in the unordered_multiset + //! are not deleted (i.e. no destructors are called). + //! + //! Complexity: Linear to the number of elements in the unordered_multiset, if + //! it's a safe-mode or auto-unlink value. Otherwise constant. + //! + //! Throws: Nothing. + ~unordered_multiset_impl() + {} + + //! Effects: Returns an iterator pointing to the beginning of the unordered_multiset. + //! + //! Complexity: Constant time if `cache_begin<>` is true. Amortized + //! constant time with worst case (empty unordered_set) O(this->bucket_count()) + //! + //! Throws: Nothing. + iterator begin() + { return table_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning + //! of the unordered_multiset. + //! + //! Complexity: Constant time if `cache_begin<>` is true. Amortized + //! constant time with worst case (empty unordered_set) O(this->bucket_count()) + //! + //! Throws: Nothing. + const_iterator begin() const + { return table_.begin(); } + + //! Effects: Returns a const_iterator pointing to the beginning + //! of the unordered_multiset. + //! + //! Complexity: Constant time if `cache_begin<>` is true. Amortized + //! constant time with worst case (empty unordered_set) O(this->bucket_count()) + //! + //! Throws: Nothing. + const_iterator cbegin() const + { return table_.cbegin(); } + + //! Effects: Returns an iterator pointing to the end of the unordered_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + iterator end() + { return table_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the unordered_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator end() const + { return table_.end(); } + + //! Effects: Returns a const_iterator pointing to the end of the unordered_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_iterator cend() const + { return table_.cend(); } + + //! Effects: Returns the hasher object used by the unordered_set. + //! + //! Complexity: Constant. + //! + //! Throws: If hasher copy-constructor throws. + hasher hash_function() const + { return table_.hash_function(); } + + //! Effects: Returns the key_equal object used by the unordered_multiset. + //! + //! Complexity: Constant. + //! + //! Throws: If key_equal copy-constructor throws. + key_equal key_eq() const + { return table_.key_eq(); } + + //! Effects: Returns true if the container is empty. + //! + //! Complexity: if constant-time size and cache_last options are disabled, + //! average constant time (worst case, with empty() == true: O(this->bucket_count()). + //! Otherwise constant. + //! + //! Throws: Nothing. + bool empty() const + { return table_.empty(); } + + //! Effects: Returns the number of elements stored in the unordered_multiset. + //! + //! Complexity: Linear to elements contained in *this if + //! constant-time size option is disabled. Constant-time otherwise. + //! + //! Throws: Nothing. + size_type size() const + { return table_.size(); } + + //! Requires: the hasher and the equality function unqualified swap + //! call should not throw. + //! + //! Effects: Swaps the contents of two unordered_multisets. + //! Swaps also the contained bucket array and equality and hasher functors. + //! + //! + //! Complexity: Constant. + //! + //! Throws: If the swap() call for the comparison or hash functors + //! found using ADL throw. Basic guarantee. + void swap(unordered_multiset_impl& other) + { table_.swap(other.table_); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! Cloner should yield to nodes that compare equal and produce the same + //! hash than the original node. + //! + //! Effects: Erases all the elements from *this + //! calling Disposer::operator()(pointer), clones all the + //! elements from src calling Cloner::operator()(const_reference ) + //! and inserts them on *this. The hash function and the equality + //! predicate are copied from the source. + //! + //! If store_hash option is true, this method does not use the hash function. + //! + //! If any operation throws, all cloned elements are unlinked and disposed + //! calling Disposer::operator()(pointer). + //! + //! Complexity: Linear to erased plus inserted elements. + //! + //! Throws: If cloner or hasher throw or hash or equality predicate copying + //! throws. Basic guarantee. + template + void clone_from(const unordered_multiset_impl &src, Cloner cloner, Disposer disposer) + { table_.clone_from(src.table_, cloner, disposer); } + + //! Requires: value must be an lvalue + //! + //! Effects: Inserts value into the unordered_multiset. + //! + //! Returns: An iterator to the new inserted value. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Strong guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + iterator insert(reference value) + { return table_.insert_equal(value); } + + //! Requires: Dereferencing iterator must yield an lvalue + //! of type value_type. + //! + //! Effects: Equivalent to this->insert(t) for each element in [b, e). + //! + //! Complexity: Average case is O(N), where N is the + //! size of the range. + //! + //! Throws: If the internal hasher or the equality functor throws. Basic guarantee. + //! + //! Note: Does not affect the validity of iterators and references. + //! No copy-constructors are called. + template + void insert(Iterator b, Iterator e) + { table_.insert_equal(b, e); } + + //! Effects: Erases the element pointed to by i. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased element. No destructors are called. + void erase(const_iterator i) + { table_.erase(i); } + + //! Effects: Erases the range pointed to by b end e. + //! + //! Complexity: Average case O(std::distance(b, e)), + //! worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void erase(const_iterator b, const_iterator e) + { table_.erase(b, e); } + + //! Effects: Erases all the elements with the given value. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + size_type erase(const_reference value) + { return table_.erase(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "key_value_equal" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "key_value_equal" compares an arbitrary key with the contained values. + //! + //! Effects: Erases all the elements that have the same hash and + //! compare equal with the given key. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If the hash_func or the equal_func functors throws. + //! Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) + { return table_.erase(key, hash_func, equal_func); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the element pointed to by i. + //! Disposer::operator()(pointer) is called for the removed element. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + void erase_and_dispose(const_iterator i, Disposer disposer + /// @cond + , typename detail::enable_if_c::value >::type * = 0 + /// @endcond + ) + { table_.erase_and_dispose(i, disposer); } + + #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + template + void erase_and_dispose(const_iterator i, Disposer disposer) + { this->erase_and_dispose(const_iterator(i), disposer); } + #endif + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases the range pointed to by b end e. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Complexity: Average case O(std::distance(b, e)), + //! worst case O(this->size()). + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) + { table_.erase_and_dispose(b, e, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given value. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. Basic guarantee. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + size_type erase_and_dispose(const_reference value, Disposer disposer) + { return table_.erase_and_dispose(value, disposer); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements with the given key. + //! according to the comparison functor "equal_func". + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Returns: The number of erased elements. + //! + //! Complexity: Average case O(this->count(value)). + //! Worst case O(this->size()). + //! + //! Throws: If hash_func or equal_func throw. Basic guarantee. + //! + //! Note: Invalidates the iterators + //! to the erased elements. + template + size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func, Disposer disposer) + { return table_.erase_and_dispose(key, hash_func, equal_func, disposer); } + + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + void clear() + { return table_.clear(); } + + //! Requires: Disposer::operator()(pointer) shouldn't throw. + //! + //! Effects: Erases all the elements of the container. + //! + //! Complexity: Linear to the number of elements on the container. + //! Disposer::operator()(pointer) is called for the removed elements. + //! + //! Throws: Nothing. + //! + //! Note: Invalidates the iterators (but not the references) + //! to the erased elements. No destructors are called. + template + void clear_and_dispose(Disposer disposer) + { return table_.clear_and_dispose(disposer); } + + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + size_type count(const_reference value) const + { return table_.count(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "key_value_equal" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "key_value_equal" compares an arbitrary key with the contained values. + //! + //! Effects: Returns the number of contained elements with the given key + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + template + size_type count(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) const + { return table_.count(key, hash_func, equal_func); } + + //! Effects: Finds an iterator to the first element whose value is + //! "value" or end() if that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + iterator find(const_reference value) + { return table_.find(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "key_value_equal" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "key_value_equal" compares an arbitrary key with the contained values. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the given hasher and equality functor or end() if + //! that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + iterator find(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) + { return table_.find(key, hash_func, equal_func); } + + //! Effects: Finds a const_iterator to the first element whose key is + //! "key" or end() if that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + const_iterator find(const_reference value) const + { return table_.find(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "key_value_equal" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "key_value_equal" compares an arbitrary key with the contained values. + //! + //! Effects: Finds an iterator to the first element whose key is + //! "key" according to the given hasher and equality functor or end() if + //! that element does not exist. + //! + //! Complexity: Average case O(1), worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + const_iterator find(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) const + { return table_.find(key, hash_func, equal_func); } + + //! Effects: Returns a range containing all elements with values equivalent + //! to value. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(value)). Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + std::pair equal_range(const_reference value) + { return table_.equal_range(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "key_value_equal" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "key_value_equal" compares an arbitrary key with the contained values. + //! + //! Effects: Returns a range containing all elements with equivalent + //! keys. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(key, hash_func, equal_func)). + //! Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair equal_range + (const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) + { return table_.equal_range(key, hash_func, equal_func); } + + //! Effects: Returns a range containing all elements with values equivalent + //! to value. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(value)). Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + std::pair + equal_range(const_reference value) const + { return table_.equal_range(value); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! "key_value_equal" must be a equality function that induces + //! the same equality as key_equal. The difference is that + //! "key_value_equal" compares an arbitrary key with the contained values. + //! + //! Effects: Returns a range containing all elements with equivalent + //! keys. Returns std::make_pair(this->end(), this->end()) if no such + //! elements exist. + //! + //! Complexity: Average case O(this->count(key, hash_func, equal_func)). + //! Worst case O(this->size()). + //! + //! Throws: If the internal hasher or the equality functor throws. + //! + //! Note: This function is used when constructing a value_type + //! is expensive and the value_type can be compared with a cheaper + //! key type. Usually this key is part of the value_type. + template + std::pair + equal_range(const KeyType& key, KeyHasher hash_func, KeyValueEqual equal_func) const + { return table_.equal_range(key, hash_func, equal_func); } + + //! Requires: value must be an lvalue and shall be in a unordered_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid iterator belonging to the unordered_multiset + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: If the hash function throws. + iterator iterator_to(reference value) + { return table_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_multiset of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_iterator belonging to the + //! unordered_multiset that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: If the hash function throws. + const_iterator iterator_to(const_reference value) const + { return table_.iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid local_iterator belonging to the unordered_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static local_iterator s_local_iterator_to(reference value) + { return table_type::s_local_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_local_iterator belonging to + //! the unordered_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: This static function is available only if the value traits + //! is stateless. + static const_local_iterator s_local_iterator_to(const_reference value) + { return table_type::s_local_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid local_iterator belonging to the unordered_set + //! that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + local_iterator local_iterator_to(reference value) + { return table_.local_iterator_to(value); } + + //! Requires: value must be an lvalue and shall be in a unordered_set of + //! appropriate type. Otherwise the behavior is undefined. + //! + //! Effects: Returns: a valid const_local_iterator belonging to + //! the unordered_set that points to the value + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + const_local_iterator local_iterator_to(const_reference value) const + { return table_.local_iterator_to(value); } + + //! Effects: Returns the number of buckets passed in the constructor + //! or the last rehash function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + size_type bucket_count() const + { return table_.bucket_count(); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns the number of elements in the nth bucket. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + size_type bucket_size(size_type n) const + { return table_.bucket_size(n); } + + //! Effects: Returns the index of the bucket in which elements + //! with keys equivalent to k would be found, if any such element existed. + //! + //! Complexity: Constant. + //! + //! Throws: If the hash functor throws. + //! + //! Note: the return value is in the range [0, this->bucket_count()). + size_type bucket(const value_type& k) const + { return table_.bucket(k); } + + //! Requires: "hash_func" must be a hash function that induces + //! the same hash values as the stored hasher. The difference is that + //! "hash_func" hashes the given key instead of the value_type. + //! + //! Effects: Returns the index of the bucket in which elements + //! with keys equivalent to k would be found, if any such element existed. + //! + //! Complexity: Constant. + //! + //! Throws: If the hash functor throws. + //! + //! Note: the return value is in the range [0, this->bucket_count()). + template + size_type bucket(const KeyType& k, const KeyHasher &hash_func) const + { return table_.bucket(k, hash_func); } + + //! Effects: Returns the bucket array pointer passed in the constructor + //! or the last rehash function. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + bucket_ptr bucket_pointer() const + { return table_.bucket_pointer(); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + local_iterator begin(size_type n) + { return table_.begin(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator begin(size_type n) const + { return table_.begin(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the beginning + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator cbegin(size_type n) const + { return table_.cbegin(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + local_iterator end(size_type n) + { return table_.end(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator end(size_type n) const + { return table_.end(n); } + + //! Requires: n is in the range [0, this->bucket_count()). + //! + //! Effects: Returns a const_local_iterator pointing to the end + //! of the sequence stored in the bucket n. + //! + //! Complexity: Constant. + //! + //! Throws: Nothing. + //! + //! Note: [this->begin(n), this->end(n)) is a valid range + //! containing all of the elements in the nth bucket. + const_local_iterator cend(size_type n) const + { return table_.cend(n); } + + //! Requires: new_buckets must be a pointer to a new bucket array + //! or the same as the old bucket array. new_size is the length of the + //! the array pointed by new_buckets. If new_buckets == this->bucket_pointer() + //! n can be bigger or smaller than this->bucket_count(). + //! + //! Effects: Updates the internal reference with the new bucket erases + //! the values from the old bucket and inserts then in the new one. + //! + //! If store_hash option is true, this method does not use the hash function. + //! + //! Complexity: Average case linear in this->size(), worst case quadratic. + //! + //! Throws: If the hasher functor throws. + void rehash(const bucket_traits &new_bucket_traits) + { table_.rehash(new_bucket_traits); } + + //! Requires: + //! + //! Effects: + //! + //! Complexity: + //! + //! Throws: + //! + //! Note: this method is only available if incremental option is activated. + bool incremental_rehash(bool grow = true) + { return table_.incremental_rehash(grow); } + + //! Note: this method is only available if incremental option is activated. + bool incremental_rehash(const bucket_traits &new_bucket_traits) + { return table_.incremental_rehash(new_bucket_traits); } + + //! Requires: + //! + //! Effects: + //! + //! Complexity: + //! + //! Throws: + size_type split_count() const + { return table_.split_count(); } + + //! Effects: Returns the nearest new bucket count optimized for + //! the container that is bigger than n. This suggestion can be used + //! to create bucket arrays with a size that will usually improve + //! container's performance. If such value does not exist, the + //! higher possible value is returned. + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + static size_type suggested_upper_bucket_count(size_type n) + { return table_type::suggested_upper_bucket_count(n); } + + //! Effects: Returns the nearest new bucket count optimized for + //! the container that is smaller than n. This suggestion can be used + //! to create bucket arrays with a size that will usually improve + //! container's performance. If such value does not exist, the + //! lower possible value is returned. + //! + //! Complexity: Amortized constant time. + //! + //! Throws: Nothing. + static size_type suggested_lower_bucket_count(size_type n) + { return table_type::suggested_lower_bucket_count(n); } +}; + +//! Helper metafunction to define an \c unordered_multiset that yields to the same type when the +//! same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_unordered_multiset +{ + /// @cond + typedef unordered_multiset_impl + < typename make_hashtable_opt + ::type + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class unordered_multiset + : public make_unordered_multiset::type +{ + typedef typename make_unordered_multiset + ::type Base; + //Assert if passed value traits are compatible with the type + BOOST_STATIC_ASSERT((detail::is_same::value)); + + public: + typedef typename Base::value_traits value_traits; + typedef typename Base::bucket_traits bucket_traits; + typedef typename Base::iterator iterator; + typedef typename Base::const_iterator const_iterator; + typedef typename Base::bucket_ptr bucket_ptr; + typedef typename Base::size_type size_type; + typedef typename Base::hasher hasher; + typedef typename Base::key_equal key_equal; + + unordered_multiset( const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : Base(b_traits, hash_func, equal_func, v_traits) + {} + + template + unordered_multiset( Iterator b + , Iterator e + , const bucket_traits &b_traits + , const hasher & hash_func = hasher() + , const key_equal &equal_func = key_equal() + , const value_traits &v_traits = value_traits()) + : Base(b, e, b_traits, hash_func, equal_func, v_traits) + {} +}; + +#endif + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_UNORDERED_SET_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive/unordered_set_hook.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/unordered_set_hook.hpp new file mode 100644 index 0000000000..61f4a72c9c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive/unordered_set_hook.hpp @@ -0,0 +1,433 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Olaf Krzikalla 2004-2006. +// (C) Copyright Ion Gaztanaga 2006-2009 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP +#define BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace intrusive { + +/// @cond + +template +struct unordered_node + : public slist_node +{ + typedef typename boost::pointer_to_other + < VoidPointer + , unordered_node + >::type node_ptr; + node_ptr prev_in_group_; + std::size_t hash_; +}; + +template +struct unordered_node + : public slist_node +{ + typedef typename boost::pointer_to_other + < VoidPointer + , unordered_node + >::type node_ptr; + node_ptr prev_in_group_; +}; + +template +struct unordered_node + : public slist_node +{ + typedef typename boost::pointer_to_other + < VoidPointer + , unordered_node + >::type node_ptr; + std::size_t hash_; +}; + +template +struct unordered_node_traits + : public slist_node_traits +{ + typedef slist_node_traits reduced_slist_node_traits; + typedef unordered_node node; + typedef typename boost::pointer_to_other + ::type node_ptr; + typedef typename boost::pointer_to_other + ::type const_node_ptr; + + static const bool store_hash = StoreHash; + static const bool optimize_multikey = OptimizeMultiKey; + + static node_ptr get_next(const_node_ptr n) + { +// This still fails in gcc < 4.4 so forget about it +// using ::boost::static_pointer_cast; +// return static_pointer_cast(n->next_); + return node_ptr(&static_cast(*n->next_)); + } + + static void set_next(node_ptr n, node_ptr next) + { n->next_ = next; } + + static node_ptr get_prev_in_group(const_node_ptr n) + { return n->prev_in_group_; } + + static void set_prev_in_group(node_ptr n, node_ptr prev) + { n->prev_in_group_ = prev; } + + static std::size_t get_hash(const_node_ptr n) + { return n->hash_; } + + static void set_hash(node_ptr n, std::size_t h) + { n->hash_ = h; } +}; + +template +struct unordered_group_adapter +{ + typedef typename NodeTraits::node node; + typedef typename NodeTraits::node_ptr node_ptr; + typedef typename NodeTraits::const_node_ptr const_node_ptr; + + static node_ptr get_next(const_node_ptr n) + { return NodeTraits::get_prev_in_group(n); } + + static void set_next(node_ptr n, node_ptr next) + { NodeTraits::set_prev_in_group(n, next); } +}; + +template +struct unordered_algorithms + : public circular_slist_algorithms +{ + typedef circular_slist_algorithms base_type; + typedef unordered_group_adapter group_traits; + typedef circular_slist_algorithms group_algorithms; + + static void init(typename base_type::node_ptr n) + { + base_type::init(n); + group_algorithms::init(n); + } + + static void init_header(typename base_type::node_ptr n) + { + base_type::init_header(n); + group_algorithms::init_header(n); + } + + static void unlink(typename base_type::node_ptr n) + { + base_type::unlink(n); + group_algorithms::unlink(n); + } +}; + +template +struct get_uset_node_algo +{ + typedef typename detail::if_c + < (StoreHash || OptimizeMultiKey) + , unordered_node_traits + , slist_node_traits + >::type node_traits_type; + typedef typename detail::if_c + < OptimizeMultiKey + , unordered_algorithms + , circular_slist_algorithms + >::type type; +}; +/// @endcond + +//! Helper metafunction to define a \c unordered_set_base_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_unordered_set_base_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_uset_node_algo + , typename packed_options::tag + , packed_options::link_mode + , detail::UsetBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Derive a class from unordered_set_base_hook in order to store objects in +//! in an unordered_set/unordered_multi_set. unordered_set_base_hook holds the data necessary to maintain +//! the unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set. +//! +//! The hook admits the following options: \c tag<>, \c void_pointer<>, +//! \c link_mode<>, \c store_hash<> and \c optimize_multikey<>. +//! +//! \c tag<> defines a tag to identify the node. +//! The same tag value can be used in different classes, but if a class is +//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its +//! unique tag. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c store_hash<> will tell the hook to store the hash of the value +//! to speed up rehashings. +//! +//! \c optimize_multikey<> will tell the hook to store a link to form a group +//! with other value with the same value to speed up searches and insertions +//! in unordered_multisets with a great number of with equivalent keys. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class unordered_set_base_hook + : public make_unordered_set_base_hook< + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + unordered_set_base_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + unordered_set_base_hook(const unordered_set_base_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + unordered_set_base_hook& operator=(const unordered_set_base_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in an unordered_set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~unordered_set_base_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(unordered_set_base_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c unordered_set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + + +//! Helper metafunction to define a \c unordered_set_member_hook that yields to the same +//! type when the same options (either explicitly or implicitly) are used. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct make_unordered_set_member_hook +{ + /// @cond + typedef typename pack_options + < hook_defaults, + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + + typedef detail::generic_hook + < get_uset_node_algo< typename packed_options::void_pointer + , packed_options::store_hash + , packed_options::optimize_multikey + > + , member_tag + , packed_options::link_mode + , detail::NoBaseHook + > implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +//! Put a public data member unordered_set_member_hook in order to store objects of this class in +//! an unordered_set/unordered_multi_set. unordered_set_member_hook holds the data necessary for maintaining the +//! unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set. +//! +//! The hook admits the following options: \c void_pointer<>, +//! \c link_mode<> and \c store_hash<>. +//! +//! \c void_pointer<> is the pointer type that will be used internally in the hook +//! and the the container configured to use this hook. +//! +//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, +//! \c auto_unlink or \c safe_link). +//! +//! \c store_hash<> will tell the hook to store the hash of the value +//! to speed up rehashings. +#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) +template +#else +template +#endif +class unordered_set_member_hook + : public make_unordered_set_member_hook< + #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type +{ + #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) + public: + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. + //! + //! Throws: Nothing. + unordered_set_member_hook(); + + //! Effects: If link_mode is \c auto_unlink or \c safe_link + //! initializes the node to an unlinked state. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing a copy-constructor + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + unordered_set_member_hook(const unordered_set_member_hook& ); + + //! Effects: Empty function. The argument is ignored. + //! + //! Throws: Nothing. + //! + //! Rationale: Providing an assignment operator + //! makes classes using the hook STL-compliant without forcing the + //! user to do some additional work. \c swap can be used to emulate + //! move-semantics. + unordered_set_member_hook& operator=(const unordered_set_member_hook& ); + + //! Effects: If link_mode is \c normal_link, the destructor does + //! nothing (ie. no code is generated). If link_mode is \c safe_link and the + //! object is stored in an unordered_set an assertion is raised. If link_mode is + //! \c auto_unlink and \c is_linked() is true, the node is unlinked. + //! + //! Throws: Nothing. + ~unordered_set_member_hook(); + + //! Effects: Swapping two nodes swaps the position of the elements + //! related to those nodes in one or two containers. That is, if the node + //! this is part of the element e1, the node x is part of the element e2 + //! and both elements are included in the containers s1 and s2, then after + //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1 + //! at the position of e1. If one element is not in a container, then + //! after the swap-operation the other element is not in a container. + //! Iterators to e1 and e2 related to those nodes are invalidated. + //! + //! Complexity: Constant + //! + //! Throws: Nothing. + void swap_nodes(unordered_set_member_hook &other); + + //! Precondition: link_mode must be \c safe_link or \c auto_unlink. + //! + //! Returns: true, if the node belongs to a container, false + //! otherwise. This function can be used to test whether \c unordered_set::iterator_to + //! will return a valid iterator. + //! + //! Complexity: Constant + bool is_linked() const; + + //! Effects: Removes the node if it's inserted in a container. + //! This function is only allowed if link_mode is \c auto_unlink. + //! + //! Throws: Nothing. + void unlink(); + #endif +}; + +} //namespace intrusive +} //namespace boost + +#include + +#endif //BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/intrusive_ptr.hpp b/deal.II/contrib/boost-1.45.0/include/boost/intrusive_ptr.hpp new file mode 100644 index 0000000000..63036dcd6e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/intrusive_ptr.hpp @@ -0,0 +1,18 @@ +#ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED +#define BOOST_INTRUSIVE_PTR_HPP_INCLUDED + +// +// intrusive_ptr.hpp +// +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// See http://www.boost.org/libs/smart_ptr/intrusive_ptr.html for documentation. +// + +#include + +#endif // #ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/io/detail/quoted_manip.hpp b/deal.II/contrib/boost-1.45.0/include/boost/io/detail/quoted_manip.hpp new file mode 100644 index 0000000000..13cfc3537a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/io/detail/quoted_manip.hpp @@ -0,0 +1,190 @@ +// boost/io/quoted_manip.hpp ---------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page http://www.boost.org/libs/io + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_IO_QUOTED_MANIP +#define BOOST_IO_QUOTED_MANIP + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace io + { + namespace detail { template struct quoted_proxy; } + + // ------------ public interface ------------------------------------------------// + + // manipulator for const std::basic_string& + template + detail::quoted_proxy const &, Char> + quoted(const std::basic_string& s, + Char escape='\\', Char delim='\"'); + + // manipulator for non-const std::basic_string& + template + detail::quoted_proxy &, Char> + quoted(std::basic_string& s, + Char escape='\\', Char delim='\"'); + + // manipulator for const C-string* + template + detail::quoted_proxy + quoted(const Char* s, Char escape='\\', Char delim='\"'); + + // ----------- implementation details -------------------------------------------// + + namespace detail + { + // proxy used as an argument pack + template + struct quoted_proxy + { + String string; + Char escape; + Char delim; + + quoted_proxy(String s_, Char escape_, Char delim_) + : string(s_), escape(escape_), delim(delim_) {} + private: + // String may be a const type, so disable the assignment operator + quoted_proxy& operator=(const quoted_proxy&); // = deleted + }; + + // abstract away difference between proxies with const or non-const basic_strings + template + std::basic_ostream& + basic_string_inserter_imp(std::basic_ostream& os, + std::basic_string const & string, Char escape, Char delim) + { + os << delim; + typename std::basic_string::const_iterator + end_it = string.end(); + for (typename std::basic_string::const_iterator + it = string.begin(); + it != end_it; + ++it ) + { + if (*it == delim || *it == escape) + os << escape; + os << *it; + } + os << delim; + return os; + } + + // inserter for const std::basic_string& proxies + template + inline + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy const &, Char>& proxy) + { + return basic_string_inserter_imp(os, proxy.string, proxy.escape, proxy.delim); + } + + // inserter for non-const std::basic_string& proxies + template + inline + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy&, Char>& proxy) + { + return basic_string_inserter_imp(os, proxy.string, proxy.escape, proxy.delim); + } + + // inserter for const C-string* proxies + template + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy& proxy) + { + os << proxy.delim; + for (const Char* it = proxy.string; + *it; + ++it ) + { + if (*it == proxy.delim || *it == proxy.escape) + os << proxy.escape; + os << *it; + } + os << proxy.delim; + return os; + } + + // extractor for non-const std::basic_string& proxies + template + std::basic_istream& operator>>(std::basic_istream& is, + const quoted_proxy&, Char>& proxy) + { + Char c; + is >> c; + if (c != proxy.delim) + { + proxy.string = c; + is >> proxy.string; + return is; + } + proxy.string.clear(); + { + boost::io::ios_flags_saver ifs(is); + is >> std::noskipws; + for (;;) + { + is >> c; + if (!is.good()) // cope with I/O errors or end-of-file + break; + if (c == proxy.escape) + { + is >> c; + if (!is.good()) // cope with I/O errors or end-of-file + break; + } + else if (c == proxy.delim) + break; + proxy.string += c; + } + } + return is; + } + + } // namespace detail + + // manipulator implementation for const std::basic_string& + template + inline detail::quoted_proxy const &, Char> + quoted(const std::basic_string& s, Char escape, Char delim) + { + return detail::quoted_proxy const &, Char> + (s, escape, delim); + } + + // manipulator implementation for non-const std::basic_string& + template + inline detail::quoted_proxy &, Char> + quoted(std::basic_string& s, Char escape, Char delim) + { + return detail::quoted_proxy&, Char> + (s, escape, delim); + } + + // manipulator implementation for const C-string* + template + inline detail::quoted_proxy + quoted(const Char* s, Char escape, Char delim) + { + return detail::quoted_proxy (s, escape, delim); + } + + } // namespace io +} // namespace boost + +#endif // BOOST_IO_QUOTED_MANIP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/io/ios_state.hpp b/deal.II/contrib/boost-1.45.0/include/boost/io/ios_state.hpp new file mode 100644 index 0000000000..07cfb345ff --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/io/ios_state.hpp @@ -0,0 +1,439 @@ +// Boost io/ios_state.hpp header file --------------------------------------// + +// Copyright 2002, 2005 Daryle Walker. Use, modification, and distribution +// are subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_IO_IOS_STATE_HPP +#define BOOST_IO_IOS_STATE_HPP + +#include // self include +#include + +#include // for std::ios_base, std::basic_ios, etc. +#ifndef BOOST_NO_STD_LOCALE +#include // for std::locale +#endif +#include // for std::basic_ostream +#include // for std::basic_streambuf +#include // for std::char_traits + + +namespace boost +{ +namespace io +{ + + +// Basic stream state saver class declarations -----------------------------// + +class ios_flags_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::ios_base::fmtflags aspect_type; + + explicit ios_flags_saver( state_type &s ) + : s_save_( s ), a_save_( s.flags() ) + {} + ios_flags_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.flags(a) ) + {} + ~ios_flags_saver() + { this->restore(); } + + void restore() + { s_save_.flags( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + + ios_flags_saver& operator=(const ios_flags_saver&); +}; + +class ios_precision_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::streamsize aspect_type; + + explicit ios_precision_saver( state_type &s ) + : s_save_( s ), a_save_( s.precision() ) + {} + ios_precision_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.precision(a) ) + {} + ~ios_precision_saver() + { this->restore(); } + + void restore() + { s_save_.precision( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + + ios_precision_saver& operator=(const ios_precision_saver&); +}; + +class ios_width_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::streamsize aspect_type; + + explicit ios_width_saver( state_type &s ) + : s_save_( s ), a_save_( s.width() ) + {} + ios_width_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.width(a) ) + {} + ~ios_width_saver() + { this->restore(); } + + void restore() + { s_save_.width( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + ios_width_saver& operator=(const ios_width_saver&); +}; + + +// Advanced stream state saver class template declarations -----------------// + +template < typename Ch, class Tr > +class basic_ios_iostate_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::ios_base::iostate aspect_type; + + explicit basic_ios_iostate_saver( state_type &s ) + : s_save_( s ), a_save_( s.rdstate() ) + {} + basic_ios_iostate_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.rdstate() ) + { s.clear(a); } + ~basic_ios_iostate_saver() + { this->restore(); } + + void restore() + { s_save_.clear( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_iostate_saver& operator=(const basic_ios_iostate_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_exception_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::ios_base::iostate aspect_type; + + explicit basic_ios_exception_saver( state_type &s ) + : s_save_( s ), a_save_( s.exceptions() ) + {} +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + basic_ios_exception_saver( state_type &s, aspect_type a ) +#else + basic_ios_exception_saver( state_type &s, aspect_type const &a ) +#endif + : s_save_( s ), a_save_( s.exceptions() ) + { s.exceptions(a); } + ~basic_ios_exception_saver() + { this->restore(); } + + void restore() + { s_save_.exceptions( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_exception_saver& operator=(const basic_ios_exception_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_tie_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::basic_ostream * aspect_type; + + explicit basic_ios_tie_saver( state_type &s ) + : s_save_( s ), a_save_( s.tie() ) + {} + basic_ios_tie_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.tie(a) ) + {} + ~basic_ios_tie_saver() + { this->restore(); } + + void restore() + { s_save_.tie( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_tie_saver& operator=(const basic_ios_tie_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_rdbuf_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::basic_streambuf * aspect_type; + + explicit basic_ios_rdbuf_saver( state_type &s ) + : s_save_( s ), a_save_( s.rdbuf() ) + {} + basic_ios_rdbuf_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.rdbuf(a) ) + {} + ~basic_ios_rdbuf_saver() + { this->restore(); } + + void restore() + { s_save_.rdbuf( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_rdbuf_saver& operator=(const basic_ios_rdbuf_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_fill_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef typename state_type::char_type aspect_type; + + explicit basic_ios_fill_saver( state_type &s ) + : s_save_( s ), a_save_( s.fill() ) + {} + basic_ios_fill_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.fill(a) ) + {} + ~basic_ios_fill_saver() + { this->restore(); } + + void restore() + { s_save_.fill( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_fill_saver& operator=(const basic_ios_fill_saver&); +}; + +#ifndef BOOST_NO_STD_LOCALE +template < typename Ch, class Tr > +class basic_ios_locale_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::locale aspect_type; + + explicit basic_ios_locale_saver( state_type &s ) + : s_save_( s ), a_save_( s.getloc() ) + {} + basic_ios_locale_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.imbue(a) ) + {} + ~basic_ios_locale_saver() + { this->restore(); } + + void restore() + { s_save_.imbue( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_locale_saver& operator=(const basic_ios_locale_saver&); +}; +#endif + + +// User-defined stream state saver class declarations ----------------------// + +class ios_iword_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + typedef long aspect_type; + + explicit ios_iword_saver( state_type &s, index_type i ) + : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) + {} + ios_iword_saver( state_type &s, index_type i, aspect_type const &a ) + : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) + { s.iword(i) = a; } + ~ios_iword_saver() + { this->restore(); } + + void restore() + { s_save_.iword( i_save_ ) = a_save_; } + +private: + state_type & s_save_; + aspect_type const a_save_; + index_type const i_save_; + + ios_iword_saver& operator=(const ios_iword_saver&); +}; + +class ios_pword_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + typedef void * aspect_type; + + explicit ios_pword_saver( state_type &s, index_type i ) + : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) + {} + ios_pword_saver( state_type &s, index_type i, aspect_type const &a ) + : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) + { s.pword(i) = a; } + ~ios_pword_saver() + { this->restore(); } + + void restore() + { s_save_.pword( i_save_ ) = a_save_; } + +private: + state_type & s_save_; + aspect_type const a_save_; + index_type const i_save_; + + ios_pword_saver operator=(const ios_pword_saver&); +}; + + +// Combined stream state saver class (template) declarations ---------------// + +class ios_base_all_saver +{ +public: + typedef ::std::ios_base state_type; + + explicit ios_base_all_saver( state_type &s ) + : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) + , a3_save_( s.width() ) + {} + + ~ios_base_all_saver() + { this->restore(); } + + void restore() + { + s_save_.width( a3_save_ ); + s_save_.precision( a2_save_ ); + s_save_.flags( a1_save_ ); + } + +private: + state_type & s_save_; + state_type::fmtflags const a1_save_; + ::std::streamsize const a2_save_; + ::std::streamsize const a3_save_; + + ios_base_all_saver& operator=(const ios_base_all_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_all_saver +{ +public: + typedef ::std::basic_ios state_type; + + explicit basic_ios_all_saver( state_type &s ) + : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) + , a3_save_( s.width() ), a4_save_( s.rdstate() ) + , a5_save_( s.exceptions() ), a6_save_( s.tie() ) + , a7_save_( s.rdbuf() ), a8_save_( s.fill() ) + #ifndef BOOST_NO_STD_LOCALE + , a9_save_( s.getloc() ) + #endif + {} + + ~basic_ios_all_saver() + { this->restore(); } + + void restore() + { + #ifndef BOOST_NO_STD_LOCALE + s_save_.imbue( a9_save_ ); + #endif + s_save_.fill( a8_save_ ); + s_save_.rdbuf( a7_save_ ); + s_save_.tie( a6_save_ ); + s_save_.exceptions( a5_save_ ); + s_save_.clear( a4_save_ ); + s_save_.width( a3_save_ ); + s_save_.precision( a2_save_ ); + s_save_.flags( a1_save_ ); + } + +private: + state_type & s_save_; + typename state_type::fmtflags const a1_save_; + ::std::streamsize const a2_save_; + ::std::streamsize const a3_save_; + typename state_type::iostate const a4_save_; + typename state_type::iostate const a5_save_; + ::std::basic_ostream * const a6_save_; + ::std::basic_streambuf * const a7_save_; + typename state_type::char_type const a8_save_; + #ifndef BOOST_NO_STD_LOCALE + ::std::locale const a9_save_; + #endif + + basic_ios_all_saver& operator=(const basic_ios_all_saver&); +}; + +class ios_all_word_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + + ios_all_word_saver( state_type &s, index_type i ) + : s_save_( s ), i_save_( i ), a1_save_( s.iword(i) ) + , a2_save_( s.pword(i) ) + {} + + ~ios_all_word_saver() + { this->restore(); } + + void restore() + { + s_save_.pword( i_save_ ) = a2_save_; + s_save_.iword( i_save_ ) = a1_save_; + } + +private: + state_type & s_save_; + index_type const i_save_; + long const a1_save_; + void * const a2_save_; + + ios_all_word_saver& operator=(const ios_all_word_saver&); +}; + + +} // namespace io +} // namespace boost + + +#endif // BOOST_IO_IOS_STATE_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/io_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/io_fwd.hpp new file mode 100644 index 0000000000..417b81e3e1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/io_fwd.hpp @@ -0,0 +1,67 @@ +// Boost io_fwd.hpp header file --------------------------------------------// + +// Copyright 2002 Daryle Walker. Use, modification, and distribution are subject +// to the Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_IO_FWD_HPP +#define BOOST_IO_FWD_HPP + +#include // for std::char_traits (declaration) + + +namespace boost +{ +namespace io +{ + + +// From -------------------------------------------// + +class ios_flags_saver; +class ios_precision_saver; +class ios_width_saver; +class ios_base_all_saver; + +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_iostate_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_exception_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_tie_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_rdbuf_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_fill_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_locale_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_all_saver; + +typedef basic_ios_iostate_saver ios_iostate_saver; +typedef basic_ios_iostate_saver wios_iostate_saver; +typedef basic_ios_exception_saver ios_exception_saver; +typedef basic_ios_exception_saver wios_exception_saver; +typedef basic_ios_tie_saver ios_tie_saver; +typedef basic_ios_tie_saver wios_tie_saver; +typedef basic_ios_rdbuf_saver ios_rdbuf_saver; +typedef basic_ios_rdbuf_saver wios_rdbuf_saver; +typedef basic_ios_fill_saver ios_fill_saver; +typedef basic_ios_fill_saver wios_fill_saver; +typedef basic_ios_locale_saver ios_locale_saver; +typedef basic_ios_locale_saver wios_locale_saver; +typedef basic_ios_all_saver ios_all_saver; +typedef basic_ios_all_saver wios_all_saver; + +class ios_iword_saver; +class ios_pword_saver; +class ios_all_word_saver; + + +} // namespace io +} // namespace boost + + +#endif // BOOST_IO_FWD_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/categories.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/categories.hpp new file mode 100644 index 0000000000..faadba11e0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/categories.hpp @@ -0,0 +1,175 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains category and mode tags for classifying filters, devices and +// standard stream and stream buffers types. + +#ifndef BOOST_IOSTREAMS_CATEGORIES_HPP_INCLUDED +#define BOOST_IOSTREAMS_CATEGORIES_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +namespace boost { namespace iostreams { + +//------------------Tags for dispatch according to i/o mode-------------------// + +struct any_tag { }; +namespace detail { struct two_sequence : virtual any_tag { }; } +namespace detail { struct random_access : virtual any_tag { }; } +namespace detail { struct one_head : virtual any_tag { }; } +namespace detail { struct two_head : virtual any_tag { }; } +struct input : virtual any_tag { }; +struct output : virtual any_tag { }; +struct bidirectional : virtual input, virtual output, detail::two_sequence { }; +struct dual_use : virtual input, virtual output { }; // Pseudo-mode. +struct input_seekable : virtual input, virtual detail::random_access { }; +struct output_seekable : virtual output, virtual detail::random_access { }; +struct seekable + : virtual input_seekable, + virtual output_seekable, + detail::one_head + { }; +struct dual_seekable + : virtual input_seekable, + virtual output_seekable, + detail::two_head + { }; +struct bidirectional_seekable + : input_seekable, output_seekable, + bidirectional, detail::two_head + { }; + +//------------------Tags for use as i/o categories----------------------------// + +struct device_tag : virtual any_tag { }; +struct filter_tag : virtual any_tag { }; + + // + // Tags for optional behavior. + // + +struct peekable_tag : virtual any_tag { }; // Devices. +struct closable_tag : virtual any_tag { }; +struct flushable_tag : virtual any_tag { }; +struct localizable_tag : virtual any_tag { }; +struct optimally_buffered_tag : virtual any_tag { }; +struct direct_tag : virtual any_tag { }; // Devices. +struct multichar_tag : virtual any_tag { }; // Filters. + +struct source_tag : device_tag, input { }; +struct sink_tag : device_tag, output { }; +struct bidirectional_device_tag : device_tag, bidirectional { }; +struct seekable_device_tag : virtual device_tag, seekable { }; + +struct input_filter_tag : filter_tag, input { }; +struct output_filter_tag : filter_tag, output { }; +struct bidirectional_filter_tag : filter_tag, bidirectional { }; +struct seekable_filter_tag : filter_tag, seekable { }; +struct dual_use_filter_tag : filter_tag, dual_use { }; + +struct multichar_input_filter_tag + : multichar_tag, + input_filter_tag + { }; +struct multichar_output_filter_tag + : multichar_tag, + output_filter_tag + { }; +struct multichar_bidirectional_filter_tag + : multichar_tag, + bidirectional_filter_tag + { }; +struct multichar_seekable_filter_tag + : multichar_tag, + seekable_filter_tag + { }; +struct multichar_dual_use_filter_tag + : multichar_tag, + dual_use_filter_tag + { }; + + // + // Tags for standard streams and streambufs. + // + +struct std_io_tag : virtual localizable_tag { }; +struct istream_tag + : virtual device_tag, + virtual peekable_tag, + virtual std_io_tag + { }; +struct ostream_tag + : virtual device_tag, + virtual std_io_tag + { }; +struct iostream_tag + : istream_tag, + ostream_tag + { }; +struct streambuf_tag + : device_tag, + peekable_tag, + std_io_tag + { }; +struct ifstream_tag + : input_seekable, + closable_tag, + istream_tag + { }; +struct ofstream_tag + : output_seekable, + closable_tag, + ostream_tag + { }; +struct fstream_tag + : seekable, + closable_tag, + iostream_tag + { }; +struct filebuf_tag + : seekable, + closable_tag, + streambuf_tag + { }; +struct istringstream_tag + : input_seekable, + istream_tag + { }; +struct ostringstream_tag + : output_seekable, + ostream_tag + { }; +struct stringstream_tag + : dual_seekable, + iostream_tag + { }; +struct stringbuf_tag + : dual_seekable, + streambuf_tag + { }; +struct generic_istream_tag + : input_seekable, + istream_tag + { }; +struct generic_ostream_tag + : output_seekable, + ostream_tag + { }; +struct generic_iostream_tag + : seekable, + iostream_tag + { }; +struct generic_streambuf_tag + : seekable, + streambuf_tag + { }; + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_CATEGORIES_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/chain.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/chain.hpp new file mode 100644 index 0000000000..90fd18410d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/chain.hpp @@ -0,0 +1,594 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include // unary_function. +#include // advance. +#include +#include // allocator, auto_ptr. +#include +#include // logic_error, out_of_range. +#include +#include // BOOST_MSVC, template friends, +#include // BOOST_NESTED_TEMPLATE +#include +#include +#include +#include +#include // pubsync. +#include +#include +#include +#include // is_filter. +#include +#include +#include +#include +#include +#include +#include +#include // VC6.5 requires this +#if BOOST_WORKAROUND(BOOST_MSVC, < 1310) // #include order +# include +#endif + +// Sometimes type_info objects must be compared by name. Borrowed from +// Boost.Python and Boost.Function. +#if (defined(__GNUC__) && __GNUC__ >= 3) || \ + defined(_AIX) || \ + (defined(__sgi) && defined(__host_mips)) || \ + (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) \ + /**/ +# include +# define BOOST_IOSTREAMS_COMPARE_TYPE_ID(X,Y) \ + (std::strcmp((X).name(),(Y).name()) == 0) +#else +# define BOOST_IOSTREAMS_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) +#endif + +// Deprecated +#define BOOST_IOSTREAMS_COMPONENT_TYPE(chain, index) \ + chain.component_type( index ) \ + /**/ + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) +# define BOOST_IOSTREAMS_COMPONENT(chain, index, target) \ + chain.component< target >( index ) \ + /**/ +#else +# define BOOST_IOSTREAMS_COMPONENT(chain, index, target) \ + chain.component( index, ::boost::type< target >() ) \ + /**/ +#endif + +namespace boost { namespace iostreams { + +//--------------Definition of chain and wchain--------------------------------// + +namespace detail { + +template class chain_client; + +// +// Concept name: Chain. +// Description: Represents a chain of stream buffers which provides access +// to the first buffer in the chain and send notifications when the +// streambufs are added to or removed from chain. +// Refines: Closable device with mode equal to typename Chain::mode. +// Models: chain, converting_chain. +// Example: +// +// class chain { +// public: +// typedef xxx chain_type; +// typedef xxx client_type; +// typedef xxx mode; +// bool is_complete() const; // Ready for i/o. +// template +// void push( const T& t, // Adds a stream buffer to +// streamsize, // chain, based on t, with +// streamsize ); // given buffer and putback +// // buffer sizes. Pass -1 to +// // request default size. +// protected: +// void register_client(client_type* client); // Associate client. +// void notify(); // Notify client. +// }; +// + +// +// Description: Represents a chain of filters with an optional device at the +// end. +// Template parameters: +// Self - A class deriving from the current instantiation of this template. +// This is an example of the Curiously Recurring Template Pattern. +// Ch - The character type. +// Tr - The character traits type. +// Alloc - The allocator type. +// Mode - A mode tag. +// +template +class chain_base { +public: + typedef Ch char_type; + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) + typedef Alloc allocator_type; + typedef Mode mode; + struct category + : Mode, + device_tag + { }; + typedef chain_client client_type; + friend class chain_client; +private: + typedef linked_streambuf streambuf_type; + typedef std::list list_type; + typedef chain_base my_type; +protected: + chain_base() : pimpl_(new chain_impl) { } + chain_base(const chain_base& rhs): pimpl_(rhs.pimpl_) { } +public: + + // dual_use is a pseudo-mode to facilitate filter writing, + // not a genuine mode. + BOOST_STATIC_ASSERT((!is_convertible::value)); + + //----------Buffer sizing-------------------------------------------------// + + // Sets the size of the buffer created for the devices to be added to this + // chain. Does not affect the size of the buffer for devices already + // added. + void set_device_buffer_size(std::streamsize n) + { pimpl_->device_buffer_size_ = n; } + + // Sets the size of the buffer created for the filters to be added + // to this chain. Does not affect the size of the buffer for filters already + // added. + void set_filter_buffer_size(std::streamsize n) + { pimpl_->filter_buffer_size_ = n; } + + // Sets the size of the putback buffer for filters and devices to be added + // to this chain. Does not affect the size of the buffer for filters or + // devices already added. + void set_pback_size(std::streamsize n) + { pimpl_->pback_size_ = n; } + + //----------Device interface----------------------------------------------// + + std::streamsize read(char_type* s, std::streamsize n); + std::streamsize write(const char_type* s, std::streamsize n); + std::streampos seek(stream_offset off, BOOST_IOS::seekdir way); + + //----------Direct component access---------------------------------------// + + const std::type_info& component_type(int n) const + { + if (static_cast(n) >= size()) + boost::throw_exception(std::out_of_range("bad chain offset")); + return (*boost::next(list().begin(), n))->component_type(); + } + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) + // Deprecated. + template + const std::type_info& component_type() const { return component_type(N); } + + template + T* component(int n) const { return component(n, boost::type()); } + + // Deprecated. + template + T* component() const { return component(N); } +#endif + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) + private: +#endif + template + T* component(int n, boost::type) const + { + if (static_cast(n) >= size()) + boost::throw_exception(std::out_of_range("bad chain offset")); + streambuf_type* link = *boost::next(list().begin(), n); + if (BOOST_IOSTREAMS_COMPARE_TYPE_ID(link->component_type(), typeid(T))) + return static_cast(link->component_impl()); + else + return 0; + } +public: + + //----------Container-like interface--------------------------------------// + + typedef typename list_type::size_type size_type; + streambuf_type& front() { return *list().front(); } + BOOST_IOSTREAMS_DEFINE_PUSH(push, mode, char_type, push_impl) + void pop(); + bool empty() const { return list().empty(); } + size_type size() const { return list().size(); } + void reset(); + + //----------Additional i/o functions--------------------------------------// + + // Returns true if this chain is non-empty and its final link + // is a source or sink, i.e., if it is ready to perform i/o. + bool is_complete() const; + bool auto_close() const; + void set_auto_close(bool close); + bool sync() { return front().BOOST_IOSTREAMS_PUBSYNC() != -1; } + bool strict_sync(); +private: + template + void push_impl(const T& t, std::streamsize buffer_size = -1, + std::streamsize pback_size = -1) + { + typedef typename iostreams::category_of::type category; + typedef typename unwrap_ios::type component_type; + typedef stream_buffer< + component_type, + BOOST_IOSTREAMS_CHAR_TRAITS(char_type), + Alloc, Mode + > streambuf_t; + typedef typename list_type::iterator iterator; + BOOST_STATIC_ASSERT((is_convertible::value)); + if (is_complete()) + boost::throw_exception(std::logic_error("chain complete")); + streambuf_type* prev = !empty() ? list().back() : 0; + buffer_size = + buffer_size != -1 ? + buffer_size : + iostreams::optimal_buffer_size(t); + pback_size = + pback_size != -1 ? + pback_size : + pimpl_->pback_size_; + std::auto_ptr + buf(new streambuf_t(t, buffer_size, pback_size)); + list().push_back(buf.get()); + buf.release(); + if (is_device::value) { + pimpl_->flags_ |= f_complete | f_open; + for ( iterator first = list().begin(), + last = list().end(); + first != last; + ++first ) + { + (*first)->set_needs_close(); + } + } + if (prev) prev->set_next(list().back()); + notify(); + } + + list_type& list() { return pimpl_->links_; } + const list_type& list() const { return pimpl_->links_; } + void register_client(client_type* client) { pimpl_->client_ = client; } + void notify() { if (pimpl_->client_) pimpl_->client_->notify(); } + + //----------Nested classes------------------------------------------------// + + static void close(streambuf_type* b, BOOST_IOS::openmode m) + { + if (m == BOOST_IOS::out && is_convertible::value) + b->BOOST_IOSTREAMS_PUBSYNC(); + b->close(m); + } + + static void set_next(streambuf_type* b, streambuf_type* next) + { b->set_next(next); } + + static void set_auto_close(streambuf_type* b, bool close) + { b->set_auto_close(close); } + + struct closer : public std::unary_function { + closer(BOOST_IOS::openmode m) : mode_(m) { } + void operator() (streambuf_type* b) + { + close(b, mode_); + } + BOOST_IOS::openmode mode_; + }; + friend struct closer; + + enum flags { + f_complete = 1, + f_open = 2, + f_auto_close = 4 + }; + + struct chain_impl { + chain_impl() + : client_(0), device_buffer_size_(default_device_buffer_size), + filter_buffer_size_(default_filter_buffer_size), + pback_size_(default_pback_buffer_size), + flags_(f_auto_close) + { } + ~chain_impl() { try { close(); reset(); } catch (...) { } } + void close() + { + if ((flags_ & f_open) != 0) { + flags_ &= ~f_open; + stream_buffer< basic_null_device > null; + if ((flags_ & f_complete) == 0) { + null.open(basic_null_device()); + set_next(links_.back(), &null); + } + links_.front()->BOOST_IOSTREAMS_PUBSYNC(); + try { + boost::iostreams::detail::execute_foreach( + links_.rbegin(), links_.rend(), + closer(BOOST_IOS::in) + ); + } catch (...) { + try { + boost::iostreams::detail::execute_foreach( + links_.begin(), links_.end(), + closer(BOOST_IOS::out) + ); + } catch (...) { } + throw; + } + boost::iostreams::detail::execute_foreach( + links_.begin(), links_.end(), + closer(BOOST_IOS::out) + ); + } + } + void reset() + { + typedef typename list_type::iterator iterator; + for ( iterator first = links_.begin(), + last = links_.end(); + first != last; + ++first ) + { + if ( (flags_ & f_complete) == 0 || + (flags_ & f_auto_close) == 0 ) + { + set_auto_close(*first, false); + } + streambuf_type* buf = 0; + std::swap(buf, *first); + delete buf; + } + links_.clear(); + flags_ &= ~f_complete; + flags_ &= ~f_open; + } + list_type links_; + client_type* client_; + std::streamsize device_buffer_size_, + filter_buffer_size_, + pback_size_; + int flags_; + }; + friend struct chain_impl; + + //----------Member data---------------------------------------------------// + +private: + shared_ptr pimpl_; +}; + +} // End namespace detail. + +// +// Macro: BOOST_IOSTREAMS_DECL_CHAIN(name, category) +// Description: Defines a template derived from chain_base appropriate for a +// particular i/o category. The template has the following parameters: +// Ch - The character type. +// Tr - The character traits type. +// Alloc - The allocator type. +// Macro parameters: +// name_ - The name of the template to be defined. +// category_ - The i/o category of the template to be defined. +// +#define BOOST_IOSTREAMS_DECL_CHAIN(name_, default_char_) \ + template< typename Mode, typename Ch = default_char_, \ + typename Tr = BOOST_IOSTREAMS_CHAR_TRAITS(Ch), \ + typename Alloc = std::allocator > \ + class name_ : public boost::iostreams::detail::chain_base< \ + name_, \ + Ch, Tr, Alloc, Mode \ + > \ + { \ + public: \ + struct category : device_tag, Mode { }; \ + typedef Mode mode; \ + private: \ + typedef boost::iostreams::detail::chain_base< \ + name_, \ + Ch, Tr, Alloc, Mode \ + > base_type; \ + public: \ + typedef Ch char_type; \ + typedef Tr traits_type; \ + typedef typename traits_type::int_type int_type; \ + typedef typename traits_type::off_type off_type; \ + name_() { } \ + name_(const name_& rhs) : base_type(rhs) { } \ + name_& operator=(const name_& rhs) \ + { base_type::operator=(rhs); return *this; } \ + }; \ + /**/ +BOOST_IOSTREAMS_DECL_CHAIN(chain, char) +BOOST_IOSTREAMS_DECL_CHAIN(wchain, wchar_t) +#undef BOOST_IOSTREAMS_DECL_CHAIN + +//--------------Definition of chain_client------------------------------------// + +namespace detail { + +// +// Template name: chain_client +// Description: Class whose instances provide access to an underlying chain +// using an interface similar to the chains. +// Subclasses: the various stream and stream buffer templates. +// +template +class chain_client { +public: + typedef Chain chain_type; + typedef typename chain_type::char_type char_type; + typedef typename chain_type::traits_type traits_type; + typedef typename chain_type::size_type size_type; + typedef typename chain_type::mode mode; + + chain_client(chain_type* chn = 0) : chain_(chn ) { } + chain_client(chain_client* client) : chain_(client->chain_) { } + virtual ~chain_client() { } + + const std::type_info& component_type(int n) const + { return chain_->component_type(n); } + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) + // Deprecated. + template + const std::type_info& component_type() const + { return chain_->BOOST_NESTED_TEMPLATE component_type(); } + + template + T* component(int n) const + { return chain_->BOOST_NESTED_TEMPLATE component(n); } + + // Deprecated. + template + T* component() const + { return chain_->BOOST_NESTED_TEMPLATE component(); } +#else + template + T* component(int n, boost::type t) const + { return chain_->component(n, t); } +#endif + + bool is_complete() const { return chain_->is_complete(); } + bool auto_close() const { return chain_->auto_close(); } + void set_auto_close(bool close) { chain_->set_auto_close(close); } + bool strict_sync() { return chain_->strict_sync(); } + void set_device_buffer_size(std::streamsize n) + { chain_->set_device_buffer_size(n); } + void set_filter_buffer_size(std::streamsize n) + { chain_->set_filter_buffer_size(n); } + void set_pback_size(std::streamsize n) { chain_->set_pback_size(n); } + BOOST_IOSTREAMS_DEFINE_PUSH(push, mode, char_type, push_impl) + void pop() { chain_->pop(); } + bool empty() const { return chain_->empty(); } + size_type size() { return chain_->size(); } + void reset() { chain_->reset(); } + + // Returns a copy of the underlying chain. + chain_type filters() { return *chain_; } + chain_type filters() const { return *chain_; } +protected: + template + void push_impl(const T& t BOOST_IOSTREAMS_PUSH_PARAMS()) + { chain_->push(t BOOST_IOSTREAMS_PUSH_ARGS()); } + chain_type& ref() { return *chain_; } + void set_chain(chain_type* c) + { chain_ = c; chain_->register_client(this); } +#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && \ + (!BOOST_WORKAROUND(__BORLANDC__, < 0x600)) + template + friend class chain_base; +#else + public: +#endif + virtual void notify() { } +private: + chain_type* chain_; +}; + +//--------------Implementation of chain_base----------------------------------// + +template +inline std::streamsize chain_base::read + (char_type* s, std::streamsize n) +{ return iostreams::read(*list().front(), s, n); } + +template +inline std::streamsize chain_base::write + (const char_type* s, std::streamsize n) +{ return iostreams::write(*list().front(), s, n); } + +template +inline std::streampos chain_base::seek + (stream_offset off, BOOST_IOS::seekdir way) +{ return iostreams::seek(*list().front(), off, way); } + +template +void chain_base::reset() +{ + using namespace std; + pimpl_->close(); + pimpl_->reset(); +} + +template +bool chain_base::is_complete() const +{ + return (pimpl_->flags_ & f_complete) != 0; +} + +template +bool chain_base::auto_close() const +{ + return (pimpl_->flags_ & f_auto_close) != 0; +} + +template +void chain_base::set_auto_close(bool close) +{ + pimpl_->flags_ = + (pimpl_->flags_ & ~f_auto_close) | + (close ? f_auto_close : 0); +} + +template +bool chain_base::strict_sync() +{ + typedef typename list_type::iterator iterator; + bool result = true; + for ( iterator first = list().begin(), + last = list().end(); + first != last; + ++first ) + { + bool s = (*first)->strict_sync(); + result = result && s; + } + return result; +} + +template +void chain_base::pop() +{ + assert(!empty()); + if (auto_close()) + pimpl_->close(); + streambuf_type* buf = 0; + std::swap(buf, list().back()); + buf->set_auto_close(false); + buf->set_next(0); + delete buf; + list().pop_back(); + pimpl_->flags_ &= ~f_complete; + if (auto_close() || list().empty()) + pimpl_->flags_ &= ~f_open; +} + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/char_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/char_traits.hpp new file mode 100644 index 0000000000..4234907e47 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/char_traits.hpp @@ -0,0 +1,73 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_CHAR_TRAITS_HPP_INCLUDED +#define BOOST_IOSTREAMS_CHAR_TRAITS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include // EOF. +#include // std::char_traits. +#include +#include +#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS +# include +#endif + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { using ::wint_t; } +#endif + +namespace boost { namespace iostreams { + +// Dinkumware that comes with QNX Momentics 6.3.0, 4.0.2, incorrectly defines +// the EOF and WEOF macros to not std:: qualify the wint_t type (and so does +// Sun C++ 5.8 + STLport 4). Fix by placing the def in this scope. +// NOTE: Use BOOST_WORKAROUND? +#if (defined(__QNX__) && defined(BOOST_DINKUMWARE_STDLIB)) \ + || defined(__SUNPRO_CC) +using ::std::wint_t; +#endif + +const int WOULD_BLOCK = (int) (EOF - 1); + +#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS +const std::wint_t WWOULD_BLOCK = (std::wint_t) (WEOF - 1); +#endif + +template +struct char_traits; + +template<> +struct char_traits : BOOST_IOSTREAMS_CHAR_TRAITS(char) { + static char newline() { return '\n'; } + static int good() { return '\n'; } + static int would_block() { return WOULD_BLOCK; } + static bool is_good(int c) { return c != EOF && c != WOULD_BLOCK; } + static bool is_eof(int c) { return c == EOF; } + static bool would_block(int c) { return c == WOULD_BLOCK; } +}; + +#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS +template<> +struct char_traits : std::char_traits { + static wchar_t newline() { return L'\n'; } + static std::wint_t good() { return L'\n'; } + static std::wint_t would_block() { return WWOULD_BLOCK; } + static bool is_good(std::wint_t c) { return c != WEOF && c != WWOULD_BLOCK; } + static bool is_eof(std::wint_t c) { return c == WEOF; } + static bool would_block(std::wint_t c) { return c == WWOULD_BLOCK; } +}; +#endif + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_CHAR_TRAITS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/checked_operations.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/checked_operations.hpp new file mode 100644 index 0000000000..667d925443 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/checked_operations.hpp @@ -0,0 +1,158 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains implementations of get, read, put, write and seek which +// check a device's mode at runtime instead of compile time. + +#ifndef BOOST_IOSTREAMS_DETAIL_CHECKED_OPERATIONS_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CHECKED_OPERATIONS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct read_write_if_impl; + +template +struct seek_if_impl; + +} // End namespace detail. + +template +typename int_type_of::type get_if(T& t) +{ + typedef typename detail::dispatch::type tag; + return detail::read_write_if_impl::get(t); +} + +template +inline std::streamsize +read_if(T& t, typename char_type_of::type* s, std::streamsize n) +{ + typedef typename detail::dispatch::type tag; + return detail::read_write_if_impl::read(t, s, n); +} + +template +bool put_if(T& t, typename char_type_of::type c) +{ + typedef typename detail::dispatch::type tag; + return detail::read_write_if_impl::put(t, c); +} + +template +inline std::streamsize write_if + (T& t, const typename char_type_of::type* s, std::streamsize n) +{ + typedef typename detail::dispatch::type tag; + return detail::read_write_if_impl::write(t, s, n); +} + +template +inline std::streampos +seek_if( T& t, stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out ) +{ + using namespace detail; + typedef typename dispatch::type tag; + return seek_if_impl::seek(t, off, way, which); +} + +namespace detail { + +//------------------Specializations of read_write_if_impl---------------------// + +template<> +struct read_write_if_impl { + template + static typename int_type_of::type get(T& t) + { return iostreams::get(t); } + + template + static std::streamsize + read(T& t, typename char_type_of::type* s, std::streamsize n) + { return iostreams::read(t, s, n); } + + template + static bool put(T&, typename char_type_of::type) + { boost::throw_exception(cant_write()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(false) } + + template + static std::streamsize + write(T&, const typename char_type_of::type*, std::streamsize) + { boost::throw_exception(cant_write()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) } +}; + +template<> +struct read_write_if_impl { + template + static typename int_type_of::type get(T&) + { boost::throw_exception(cant_read()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) } + + template + static std::streamsize + read(T&, typename char_type_of::type*, std::streamsize) + { boost::throw_exception(cant_read()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) } + + template + static bool put(T& t, typename char_type_of::type c) + { return iostreams::put(t, c); } + + template + static std::streamsize + write( T& t, const typename char_type_of::type* s, + std::streamsize n ) + { return iostreams::write(t, s, n); } +}; + +//------------------Specializations of seek_if_impl---------------------------// + +template<> +struct seek_if_impl { + template + static std::streampos + seek( T& t, stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ) + { return iostreams::seek(t, off, way, which); } +}; + +template<> +struct seek_if_impl { + template + static std::streampos + seek(T&, stream_offset, BOOST_IOS::seekdir, BOOST_IOS::openmode) + { boost::throw_exception(cant_seek()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(std::streampos()) } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include // MSVC. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CHECKED_OPERATIONS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/close.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/close.hpp new file mode 100644 index 0000000000..9c544a35bb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/close.hpp @@ -0,0 +1,259 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_CLOSE_HPP_INCLUDED +#define BOOST_IOSTREAMS_CLOSE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // DEDUCED_TYPENAME, MSVC. +#include +#include +#include +#include +#include // BOOST_IOS +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +template +void close(T& t); + +template +void close(T& t, BOOST_IOS::openmode which); + +template +void close(T& t, Sink& snk, BOOST_IOS::openmode which); + +namespace detail { + +template +void close_all(T& t) +{ + try { + boost::iostreams::close(t, BOOST_IOS::in); + } catch (...) { + try { + boost::iostreams::close(t, BOOST_IOS::out); + } catch (...) { } + throw; + } + boost::iostreams::close(t, BOOST_IOS::out); +} + +template +void close_all(T& t, Sink& snk) +{ + try { + boost::iostreams::close(t, snk, BOOST_IOS::in); + } catch (...) { + try { + boost::iostreams::close(t, snk, BOOST_IOS::out); + } catch (...) { } + throw; + } + boost::iostreams::close(t, snk, BOOST_IOS::out); +} + +} // End namespaces detail. + +} } // End namespaces iostreams, boost. + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------// +# include +#else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------// + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct close_impl; + +} // End namespace detail. + +template +void close(T& t) { detail::close_all(t); } + +template +void close(T& t, BOOST_IOS::openmode which) +{ +#ifdef BOOST_IOSTREAMS_STRICT + assert(which == BOOST_IOS::in || which == BOOST_IOS::out); +#else + if (which == (BOOST_IOS::in | BOOST_IOS::out)) { + detail::close_all(t); + return; + } +#endif + detail::close_impl::close(detail::unwrap(t), which); +} + +template +void close(T& t, Sink& snk, BOOST_IOS::openmode which) +{ +#ifdef BOOST_IOSTREAMS_STRICT + assert(which == BOOST_IOS::in || which == BOOST_IOS::out); +#else + if (which == (BOOST_IOS::in | BOOST_IOS::out)) { + detail::close_all(t, snk); + return; + } +#endif + detail::close_impl::close(detail::unwrap(t), snk, which); +} + +namespace detail { + +//------------------Definition of close_impl----------------------------------// + +struct close_boost_stream { }; +struct close_filtering_stream { }; + +template +struct close_tag { + typedef typename category_of::type category; + typedef typename detail::unwrapped_type::type unwrapped; + typedef typename + iostreams::select< + mpl::not_< is_convertible >, + any_tag, + mpl::or_< + is_boost_stream, + is_boost_stream_buffer + >, + close_boost_stream, + mpl::or_< + is_filtering_stream, + is_filtering_streambuf + >, + close_filtering_stream, + mpl::or_< + is_convertible, + is_convertible + >, + two_sequence, + else_, + closable_tag + >::type type; +}; + +template +struct close_impl + : mpl::if_< + is_custom, + operations, + close_impl::type> + >::type + { }; + +template<> +struct close_impl { + template + static void close(T& t, BOOST_IOS::openmode which) + { + if (which == BOOST_IOS::out) + iostreams::flush(t); + } + + template + static void close(T& t, Sink& snk, BOOST_IOS::openmode which) + { + if (which == BOOST_IOS::out) { + non_blocking_adapter nb(snk); + iostreams::flush(t, nb); + } + } +}; + +template<> +struct close_impl { + template + static void close(T& t) + { + t.close(); + } + template + static void close(T& t, BOOST_IOS::openmode which) + { + if (which == BOOST_IOS::out) + t.close(); + } +}; + +template<> +struct close_impl { + template + static void close(T& t, BOOST_IOS::openmode which) + { + typedef typename category_of::type category; + const bool in = is_convertible::value && + !is_convertible::value; + if (in == (which == BOOST_IOS::in) && t.is_complete()) + t.pop(); + } +}; + +template<> +struct close_impl { + template + static void close(T& t, BOOST_IOS::openmode which) + { + typedef typename category_of::type category; + const bool in = is_convertible::value && + !is_convertible::value; + if (in == (which == BOOST_IOS::in)) + t.close(); + } + template + static void close(T& t, Sink& snk, BOOST_IOS::openmode which) + { + typedef typename category_of::type category; + const bool in = is_convertible::value && + !is_convertible::value; + if (in == (which == BOOST_IOS::in)) { + non_blocking_adapter nb(snk); + t.close(nb); + } + } +}; + +template<> +struct close_impl { + template + static void close(T& t, BOOST_IOS::openmode which) { t.close(which); } + template + static void close(T& t, Sink& snk, BOOST_IOS::openmode which) + { + non_blocking_adapter nb(snk); + t.close(nb, which); + } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------// + +#include + +#endif // #ifndef BOOST_IOSTREAMS_CLOSE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/code_converter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/code_converter.hpp new file mode 100644 index 0000000000..280a5d0974 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/code_converter.hpp @@ -0,0 +1,424 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains machinery for performing code conversion. + +#ifndef BOOST_IOSTREAMS_CODE_CONVERTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_CODE_CONVERTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#if defined(BOOST_IOSTREAMS_NO_WIDE_STREAMS) || \ + defined(BOOST_IOSTREAMS_NO_LOCALE) \ + /**/ +# error code conversion not supported on this platform +#endif + +#include // max. +#include // memcpy. +#include +#include // DEDUCED_TYPENAME, +#include +#include // default_filter_buffer_size. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // failure, openmode, int types. +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // Borland 5.x + +namespace boost { namespace iostreams { + +struct code_conversion_error : BOOST_IOSTREAMS_FAILURE { + code_conversion_error() + : BOOST_IOSTREAMS_FAILURE("code conversion error") + { } +}; + +namespace detail { + +//--------------Definition of strncpy_if_same---------------------------------// + +// Helper template for strncpy_if_same, below. +template +struct strncpy_if_same_impl; + +template<> +struct strncpy_if_same_impl { + template + static Ch* copy(Ch* tgt, const Ch* src, std::streamsize n) + { return BOOST_IOSTREAMS_CHAR_TRAITS(Ch)::copy(tgt, src, n); } +}; + +template<> +struct strncpy_if_same_impl { + template + static Tgt* copy(Tgt* tgt, const Src*, std::streamsize) { return tgt; } +}; + +template +Tgt* strncpy_if_same(Tgt* tgt, const Src* src, std::streamsize n) +{ + typedef strncpy_if_same_impl::value> impl; + return impl::copy(tgt, src, n); +} + +//--------------Definition of conversion_buffer-------------------------------// + +// Buffer and conversion state for reading. +template +class conversion_buffer + : public buffer< + BOOST_DEDUCED_TYPENAME detail::codecvt_extern::type, + Alloc + > +{ +public: + typedef typename Codecvt::state_type state_type; + conversion_buffer() + : buffer< + BOOST_DEDUCED_TYPENAME detail::codecvt_extern::type, + Alloc + >(0) + { + reset(); + } + state_type& state() { return state_; } + void reset() + { + if (this->size()) + this->set(0, 0); + state_ = state_type(); + } +private: + state_type state_; +}; + +//--------------Definition of converter_impl----------------------------------// + +// Contains member data, open/is_open/close and buffer management functions. +template +struct code_converter_impl { + typedef typename codecvt_extern::type extern_type; + typedef typename category_of::type device_category; + typedef is_convertible can_read; + typedef is_convertible can_write; + typedef is_convertible is_bidir; + typedef typename + iostreams::select< // Disambiguation for Tru64. + is_bidir, bidirectional, + can_read, input, + can_write, output + >::type mode; + typedef typename + mpl::if_< + is_direct, + direct_adapter, + Device + >::type device_type; + typedef optional< concept_adapter > storage_type; + typedef is_convertible is_double; + typedef conversion_buffer buffer_type; + + code_converter_impl() : cvt_(), flags_(0) { } + + ~code_converter_impl() + { + try { + if (flags_ & f_open) close(); + } catch (...) { /* */ } + } + + template + void open(const T& dev, int buffer_size) + { + if (flags_ & f_open) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("already open")); + if (buffer_size == -1) + buffer_size = default_filter_buffer_size; + int max_length = cvt_.get().max_length(); + buffer_size = (std::max)(buffer_size, 2 * max_length); + if (can_read::value) { + buf_.first().resize(buffer_size); + buf_.first().set(0, 0); + } + if (can_write::value && !is_double::value) { + buf_.second().resize(buffer_size); + buf_.second().set(0, 0); + } + dev_.reset(concept_adapter(dev)); + flags_ = f_open; + } + + void close() + { + detail::execute_all( + detail::call_member_close(*this, BOOST_IOS::in), + detail::call_member_close(*this, BOOST_IOS::out) + ); + } + + void close(BOOST_IOS::openmode which) + { + if (which == BOOST_IOS::in && (flags_ & f_input_closed) == 0) { + flags_ |= f_input_closed; + iostreams::close(dev(), BOOST_IOS::in); + } + if (which == BOOST_IOS::out && (flags_ & f_output_closed) == 0) { + flags_ |= f_output_closed; + detail::execute_all( + detail::flush_buffer(buf_.second(), dev(), can_write::value), + detail::call_close(dev(), BOOST_IOS::out), + detail::call_reset(dev_), + detail::call_reset(buf_.first()), + detail::call_reset(buf_.second()) + ); + } + } + + bool is_open() const { return (flags_ & f_open) != 0;} + + device_type& dev() { return **dev_; } + + enum flag_type { + f_open = 1, + f_input_closed = f_open << 1, + f_output_closed = f_input_closed << 1 + }; + + codecvt_holder cvt_; + storage_type dev_; + double_object< + buffer_type, + is_double + > buf_; + int flags_; +}; + +} // End namespace detail. + +//--------------Definition of converter---------------------------------------// + +#define BOOST_IOSTREAMS_CONVERTER_PARAMS() , int buffer_size = -1 +#define BOOST_IOSTREAMS_CONVERTER_ARGS() , buffer_size + +template +struct code_converter_base { + typedef detail::code_converter_impl< + Device, Codecvt, Alloc + > impl_type; + code_converter_base() : pimpl_(new impl_type) { } + shared_ptr pimpl_; +}; + +template< typename Device, + typename Codecvt = detail::default_codecvt, + typename Alloc = std::allocator > +class code_converter + : protected code_converter_base +{ +private: + typedef detail::code_converter_impl< + Device, Codecvt, Alloc + > impl_type; + typedef typename impl_type::device_type device_type; + typedef typename impl_type::buffer_type buffer_type; + typedef typename detail::codecvt_holder::codecvt_type codecvt_type; + typedef typename detail::codecvt_intern::type intern_type; + typedef typename detail::codecvt_extern::type extern_type; + typedef typename detail::codecvt_state::type state_type; +public: + typedef intern_type char_type; + struct category + : impl_type::mode, device_tag, closable_tag, localizable_tag + { }; + BOOST_STATIC_ASSERT(( + is_same< + extern_type, + BOOST_DEDUCED_TYPENAME char_type_of::type + >::value + )); +public: + code_converter() { } +#if BOOST_WORKAROUND(__GNUC__, < 3) + code_converter(code_converter& rhs) + : code_converter_base(rhs) + { } + code_converter(const code_converter& rhs) + : code_converter_base(rhs) + { } +#endif + BOOST_IOSTREAMS_FORWARD( code_converter, open_impl, Device, + BOOST_IOSTREAMS_CONVERTER_PARAMS, + BOOST_IOSTREAMS_CONVERTER_ARGS ) + + // fstream-like interface. + + bool is_open() const { return this->pimpl_->is_open(); } + void close(BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out ) + { impl().close(which); } + + // Device interface. + + std::streamsize read(char_type*, std::streamsize); + std::streamsize write(const char_type*, std::streamsize); + void imbue(const std::locale& loc) { impl().cvt_.imbue(loc); } + + // Direct device access. + + Device& operator*() { return detail::unwrap_direct(dev()); } + Device* operator->() { return &detail::unwrap_direct(dev()); } +private: + template // Used for forwarding. + void open_impl(const T& t BOOST_IOSTREAMS_CONVERTER_PARAMS()) + { + impl().open(t BOOST_IOSTREAMS_CONVERTER_ARGS()); + } + + const codecvt_type& cvt() { return impl().cvt_.get(); } + device_type& dev() { return impl().dev(); } + buffer_type& in() { return impl().buf_.first(); } + buffer_type& out() { return impl().buf_.second(); } + impl_type& impl() { return *this->pimpl_; } +}; + +//--------------Implementation of converter-----------------------------------// + +// Implementation note: if end of stream contains a partial character, +// it is ignored. +template +std::streamsize code_converter::read + (char_type* s, std::streamsize n) +{ + const extern_type* next; // Next external char. + intern_type* nint; // Next internal char. + std::streamsize total = 0; // Characters read. + int status = iostreams::char_traits::good(); + bool partial = false; + buffer_type& buf = in(); + + do { + + // Fill buffer. + if (buf.ptr() == buf.eptr() || partial) { + status = buf.fill(dev()); + if (buf.ptr() == buf.eptr()) + break; + partial = false; + } + + // Convert. + std::codecvt_base::result result = + cvt().in( buf.state(), + buf.ptr(), buf.eptr(), next, + s + total, s + n, nint ); + buf.ptr() += next - buf.ptr(); + total = static_cast(nint - s); + + switch (result) { + case std::codecvt_base::partial: + partial = true; + break; + case std::codecvt_base::ok: + break; + case std::codecvt_base::noconv: + { + std::streamsize amt = + std::min(next - buf.ptr(), n - total); + detail::strncpy_if_same(s + total, buf.ptr(), amt); + total += amt; + } + break; + case std::codecvt_base::error: + default: + buf.state() = state_type(); + boost::throw_exception(code_conversion_error()); + } + + } while (total < n && status != EOF && status != WOULD_BLOCK); + + return total == 0 && status == EOF ? -1 : total; +} + +template +std::streamsize code_converter::write + (const char_type* s, std::streamsize n) +{ + buffer_type& buf = out(); + extern_type* next; // Next external char. + const intern_type* nint; // Next internal char. + std::streamsize total = 0; // Characters written. + bool partial = false; + + while (total < n) { + + // Empty buffer. + if (buf.eptr() == buf.end() || partial) { + if (!buf.flush(dev())) + break; + partial = false; + } + + // Convert. + std::codecvt_base::result result = + cvt().out( buf.state(), + s + total, s + n, nint, + buf.eptr(), buf.end(), next ); + int progress = (int) (next - buf.eptr()); + buf.eptr() += progress; + + switch (result) { + case std::codecvt_base::partial: + partial = true; // Fall through. + case std::codecvt_base::ok: + total = static_cast(nint - s); + break; + case std::codecvt_base::noconv: + { + std::streamsize amt = + std::min( nint - total - s, + buf.end() - buf.eptr() ); + detail::strncpy_if_same(buf.eptr(), s + total, amt); + total += amt; + } + break; + case std::codecvt_base::error: + default: + buf.state() = state_type(); + boost::throw_exception(code_conversion_error()); + } + } + return total; +} + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#include // Borland 5.x + +#endif // #ifndef BOOST_IOSTREAMS_CODE_CONVERTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/combine.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/combine.hpp new file mode 100644 index 0000000000..250de2a65b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/combine.hpp @@ -0,0 +1,260 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// To do: add support for random-access. + +#ifndef BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED +#define BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // NO_STD_LOCALE, DEDUCED_TYPENAME. +#ifndef BOOST_NO_STD_LOCALE +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +namespace detail { + +// +// Template name: combined_device. +// Description: Model of Device defined in terms of a Source/Sink pair. +// Template paramters: +// Source - A model of Source, with the same char_type and traits_type +// as Sink. +// Sink - A model of Sink, with the same char_type and traits_type +// as Source. +// +template +class combined_device { +private: + typedef typename category_of::type in_category; + typedef typename category_of::type out_category; + typedef typename char_type_of::type sink_char_type; +public: + typedef typename char_type_of::type char_type; + struct category + : bidirectional, + device_tag, + closable_tag, + localizable_tag + { }; + BOOST_STATIC_ASSERT(is_device::value); + BOOST_STATIC_ASSERT(is_device::value); + BOOST_STATIC_ASSERT((is_convertible::value)); + BOOST_STATIC_ASSERT((is_convertible::value)); + BOOST_STATIC_ASSERT((is_same::value)); + combined_device(const Source& src, const Sink& snk); + std::streamsize read(char_type* s, std::streamsize n); + std::streamsize write(const char_type* s, std::streamsize n); + void close(BOOST_IOS::openmode); + #ifndef BOOST_NO_STD_LOCALE + void imbue(const std::locale& loc); + #endif +private: + Source src_; + Sink sink_; +}; + +// +// Template name: combined_filter. +// Description: Model of Device defined in terms of a Source/Sink pair. +// Template paramters: +// InputFilter - A model of InputFilter, with the same char_type as +// OutputFilter. +// OutputFilter - A model of OutputFilter, with the same char_type as +// InputFilter. +// +template +class combined_filter { +private: + typedef typename category_of::type in_category; + typedef typename category_of::type out_category; + typedef typename char_type_of::type output_char_type; +public: + typedef typename char_type_of::type char_type; + struct category + : multichar_bidirectional_filter_tag, + closable_tag, + localizable_tag + { }; + BOOST_STATIC_ASSERT(is_filter::value); + BOOST_STATIC_ASSERT(is_filter::value); + BOOST_STATIC_ASSERT((is_convertible::value)); + BOOST_STATIC_ASSERT((is_convertible::value)); + BOOST_STATIC_ASSERT((is_same::value)); + combined_filter(const InputFilter& in, const OutputFilter& out); + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { return boost::iostreams::read(in_, src, s, n); } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { return boost::iostreams::write(out_, snk, s, n); } + + template + void close(Sink& snk, BOOST_IOS::openmode which) + { + if (which == BOOST_IOS::in) { + if (is_convertible::value) { + iostreams::close(in_, snk, BOOST_IOS::in); + } else { + detail::close_all(in_, snk); + } + } + if (which == BOOST_IOS::out) { + if (is_convertible::value) { + iostreams::close(out_, snk, BOOST_IOS::out); + } else { + detail::close_all(out_, snk); + } + } + } + #ifndef BOOST_NO_STD_LOCALE + void imbue(const std::locale& loc); + #endif +private: + InputFilter in_; + OutputFilter out_; +}; + +template +struct combination_traits + : mpl::if_< + is_device, + combined_device< + typename wrapped_type::type, + typename wrapped_type::type + >, + combined_filter< + typename wrapped_type::type, + typename wrapped_type::type + > + > + { }; + +} // End namespace detail. + +template +struct combination : detail::combination_traits::type { + typedef typename detail::combination_traits::type base_type; + typedef typename detail::wrapped_type::type in_type; + typedef typename detail::wrapped_type::type out_type; + combination(const in_type& in, const out_type& out) + : base_type(in, out) { } +}; + +namespace detail { + +// Workaround for VC6 ETI bug. +template +struct combine_traits { + typedef combination< + BOOST_DEDUCED_TYPENAME detail::unwrapped_type::type, + BOOST_DEDUCED_TYPENAME detail::unwrapped_type::type + > type; +}; + +} // End namespace detail. + +// +// Template name: combine. +// Description: Takes a Source/Sink pair or InputFilter/OutputFilter pair and +// returns a Reource or Filter which performs input using the first member +// of the pair and output using the second member of the pair. +// Template paramters: +// In - A model of Source or InputFilter, with the same char_type as Out. +// Out - A model of Sink or OutputFilter, with the same char_type as In. +// +template +typename detail::combine_traits::type +combine(const In& in, const Out& out) +{ + typedef typename detail::combine_traits::type return_type; + return return_type(in, out); +} + +//----------------------------------------------------------------------------// + +namespace detail { + +//--------------Implementation of combined_device-----------------------------// + +template +inline combined_device::combined_device + (const Source& src, const Sink& snk) + : src_(src), sink_(snk) { } + +template +inline std::streamsize +combined_device::read(char_type* s, std::streamsize n) +{ return iostreams::read(src_, s, n); } + +template +inline std::streamsize +combined_device::write(const char_type* s, std::streamsize n) +{ return iostreams::write(sink_, s, n); } + +template +inline void +combined_device::close(BOOST_IOS::openmode which) +{ + if (which == BOOST_IOS::in) + detail::close_all(src_); + if (which == BOOST_IOS::out) + detail::close_all(sink_); +} + +#ifndef BOOST_NO_STD_LOCALE + template + void combined_device::imbue(const std::locale& loc) + { + iostreams::imbue(src_, loc); + iostreams::imbue(sink_, loc); + } +#endif + +//--------------Implementation of filter_pair---------------------------------// + +template +inline combined_filter::combined_filter + (const InputFilter& in, const OutputFilter& out) : in_(in), out_(out) + { } + +#ifndef BOOST_NO_STD_LOCALE + template + void combined_filter::imbue + (const std::locale& loc) + { + iostreams::imbue(in_, loc); + iostreams::imbue(out_, loc); + } +#endif + + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/compose.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/compose.hpp new file mode 100644 index 0000000000..5bc5702ea9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/compose.hpp @@ -0,0 +1,494 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Note: bidirectional streams are not supported. + +#ifndef BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED +#define BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // min. +#include // pair. +#include // DEDUCED_TYPENAME. +#include +#include +#include +#include +#include +#include +#include +#include // mode_of, is_direct. +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { + +namespace detail { + +template< typename First, + typename Second, + typename FirstMode = + BOOST_DEDUCED_TYPENAME mode_of::type, + typename SecondMode = + BOOST_DEDUCED_TYPENAME mode_of::type > +struct composite_mode + : select< + is_convertible, FirstMode, + is_convertible, SecondMode, + is_convertible, input, + else_, output + > + { }; + +// +// Template name: composite_device. +// Description: Provides a Device view of a Filter, Device pair. +// Template paramters: +// Filter - A model of Filter. +// Device - An indirect model of Device. +// +template< typename Filter, + typename Device, + typename Mode = + BOOST_DEDUCED_TYPENAME composite_mode::type > +class composite_device { +private: + typedef typename detail::param_type::type param_type; + typedef typename mode_of::type filter_mode; + typedef typename mode_of::type device_mode; + typedef typename + iostreams::select< // Disambiguation for Tru64. + is_direct, direct_adapter, + is_std_io, Device&, + else_, Device + >::type value_type; + BOOST_STATIC_ASSERT(is_filter::value); + BOOST_STATIC_ASSERT(is_device::value); +public: + typedef typename char_type_of::type char_type; + struct category + : Mode, + device_tag, + closable_tag, + flushable_tag, + localizable_tag, + optimally_buffered_tag + { }; + composite_device(const Filter& flt, param_type dev); + std::streamsize read(char_type* s, std::streamsize n); + std::streamsize write(const char_type* s, std::streamsize n); + std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = + BOOST_IOS::in | BOOST_IOS::out ); + + void close(); + void close(BOOST_IOS::openmode which); + bool flush(); + std::streamsize optimal_buffer_size() const; + + template // Avoid dependency on + void imbue(const Locale& loc) + { + iostreams::imbue(filter_, loc); + iostreams::imbue(device_, loc); + } + + Filter& first() { return filter_; } + Device& second() { return device_; } +private: + Filter filter_; + value_type device_; +}; + +// +// Template name: composite_device. +// Description: Provides a Device view of a Filter, Device pair. +// Template paramters: +// Filter - A model of Filter. +// Device - An indirect model of Device. +// +template< typename Filter1, + typename Filter2, + typename Mode = + BOOST_DEDUCED_TYPENAME composite_mode::type > +class composite_filter { +private: + typedef reference_wrapper filter_ref; + typedef typename mode_of::type first_mode; + typedef typename mode_of::type second_mode; + + // A dual-use filter cannot be composed with a read-write filter + BOOST_STATIC_ASSERT( + !(is_convertible::value) || + !(is_convertible::value) || + !(is_convertible::value) || + (is_convertible::value) + ); + BOOST_STATIC_ASSERT( + !(is_convertible::value) || + !(is_convertible::value) || + !(is_convertible::value) || + (is_convertible::value) + ); + BOOST_STATIC_ASSERT(is_filter::value); + BOOST_STATIC_ASSERT(is_filter::value); +public: + typedef typename char_type_of::type char_type; + struct category + : Mode, + filter_tag, + multichar_tag, + closable_tag, + flushable_tag, + localizable_tag, + optimally_buffered_tag + { }; + composite_filter(const Filter1& filter1, const Filter2& filter2) + : filter1_(filter1), filter2_(filter2) + { } + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + composite_device cmp(boost::ref(filter2_), src); + return iostreams::read(filter1_, cmp, s, n); + } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { + composite_device cmp(boost::ref(filter2_), snk); + return iostreams::write(filter1_, cmp, s, n); + } + + template + std::streampos seek( Device& dev, stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = + BOOST_IOS::in | BOOST_IOS::out ) + { + composite_device cmp(boost::ref(filter2_), dev); + return iostreams::seek(filter1_, cmp, off, way, which); + } + + template + void close(Device& dev) + { + BOOST_STATIC_ASSERT((!is_convertible::value)); + BOOST_STATIC_ASSERT((!is_convertible::value)); + + // Create a new device by composing the second filter2_ with dev. + composite_device cmp(boost::ref(filter2_), dev); + + // Close input sequences in reverse order and output sequences in + // forward order + if (!is_convertible::value) { + detail::execute_all( + detail::call_close(filter2_, dev, BOOST_IOS::in), + detail::call_close(filter1_, cmp, BOOST_IOS::in), + detail::call_close(filter1_, cmp, BOOST_IOS::out), + detail::call_close(filter2_, dev, BOOST_IOS::out) + ); + } else if (is_convertible::value) { + detail::execute_all( + detail::call_close(filter2_, dev, BOOST_IOS::in), + detail::call_close(filter1_, cmp, BOOST_IOS::in) + ); + } else { + detail::execute_all( + detail::call_close(filter1_, cmp, BOOST_IOS::out), + detail::call_close(filter2_, dev, BOOST_IOS::out) + ); + } + } + + template + void close(Device& dev, BOOST_IOS::openmode which) + { + BOOST_STATIC_ASSERT( + (is_convertible::value) || + (is_convertible::value) + ); + + // Create a new device by composing the second filter2_ with dev. + composite_device cmp(boost::ref(filter2_), dev); + + // Close input sequences in reverse order + if ( which == BOOST_IOS::in && + ( !is_convertible::value || + is_convertible::value ) ) + { + detail::execute_all( + detail::call_close(filter2_, dev, BOOST_IOS::in), + detail::call_close(filter1_, cmp, BOOST_IOS::in) + ); + } + + // Close output sequences in forward order + if ( which == BOOST_IOS::out && + ( !is_convertible::value || + is_convertible::value ) ) + { + detail::execute_all( + detail::call_close(filter1_, cmp, BOOST_IOS::out), + detail::call_close(filter2_, dev, BOOST_IOS::out) + ); + } + } + + template + bool flush(Device& dev) + { + composite_device cmp(filter2_, dev); + return iostreams::flush(filter1_, cmp); + } + + std::streamsize optimal_buffer_size() const + { + std::streamsize first = iostreams::optimal_buffer_size(filter1_); + std::streamsize second = iostreams::optimal_buffer_size(filter2_); + return first < second ? second : first; + } + + template // Avoid dependency on + void imbue(const Locale& loc) + { // To do: consider using RAII. + iostreams::imbue(filter1_, loc); + iostreams::imbue(filter2_, loc); + } + + Filter1& first() { return filter1_; } + Filter2& second() { return filter2_; } +private: + Filter1 filter1_; + Filter2 filter2_; +}; + +template +struct composite_traits + : mpl::if_< + is_device, + composite_device, + composite_filter + > + { }; + +} // End namespace detail. + +template +struct composite : detail::composite_traits::type { + typedef typename detail::param_type::type param_type; + typedef typename detail::composite_traits::type base; + composite(const Filter& flt, param_type dev) + : base(flt, dev) + { } +}; + +//--------------Implementation of compose-------------------------------------// + +// Note: The following workarounds are patterned after resolve.hpp. It has not +// yet been confirmed that they are necessary. + +#ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //-------------------------// +# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------------------// + +template +composite +compose( const Filter& filter, const FilterOrDevice& fod + BOOST_IOSTREAMS_DISABLE_IF_STREAM(FilterOrDevice) ) +{ return composite(filter, fod); } + +template +composite< Filter, std::basic_streambuf > +compose(const Filter& filter, std::basic_streambuf& sb) +{ return composite< Filter, std::basic_streambuf >(filter, sb); } + +template +composite< Filter, std::basic_istream > +compose(const Filter& filter, std::basic_istream& is) +{ return composite< Filter, std::basic_istream >(filter, is); } + +template +composite< Filter, std::basic_ostream > +compose(const Filter& filter, std::basic_ostream& os) +{ return composite< Filter, std::basic_ostream >(filter, os); } + +template +composite< Filter, std::basic_iostream > +compose(const Filter& filter, std::basic_iostream& io) +{ return composite< Filter, std::basic_iostream >(filter, io); } + +# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //---------------------// + +template +composite +compose( const Filter& filter, const FilterOrDevice& fod + BOOST_IOSTREAMS_DISABLE_IF_STREAM(FilterOrDevice) ) +{ return composite(filter, fod); } + +template +composite +compose(const Filter& filter, std::streambuf& sb) +{ return composite(filter, sb); } + +template +composite +compose(const Filter& filter, std::istream& is) +{ return composite(filter, is); } + +template +composite +compose(const Filter& filter, std::ostream& os) +{ return composite(filter, os); } + +template +composite +compose(const Filter& filter, std::iostream& io) +{ return composite(filter, io); } + +# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------// +#else // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //----------------// + +template +composite +compose(const Filter& flt, const Stream& strm, mpl::true_) +{ // Bad overload resolution. + return composite(flt, const_cast(strm)); +} + +template +composite +compose(const Filter& flt, const FilterOrDevice& fod, mpl::false_) +{ return composite(flt, fod); } + +template +composite +compose( const Filter& flt, const FilterOrDevice& fod + BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) ) +{ return compose(flt, fod, is_std_io()); } + +# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \ + !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \ + !defined(__GNUC__) // ---------------------------------------------------// + +template +composite +compose (const Filter& filter, FilterOrDevice& fod) +{ return composite(filter, fod); } + +# endif // Borland 5.x, VC6-7.0 or GCC 2.9x //--------------------------------// +#endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------// + +//----------------------------------------------------------------------------// + +namespace detail { + +//--------------Implementation of composite_device---------------------------// + +template +composite_device::composite_device + (const Filter& flt, param_type dev) + : filter_(flt), device_(dev) + { } + +template +inline std::streamsize composite_device::read + (char_type* s, std::streamsize n) +{ return iostreams::read(filter_, device_, s, n); } + +template +inline std::streamsize composite_device::write + (const char_type* s, std::streamsize n) +{ return iostreams::write(filter_, device_, s, n); } + +template +std::streampos composite_device::seek + (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which) +{ return iostreams::seek(filter_, device_, off, way, which); } + +template +void composite_device::close() +{ + BOOST_STATIC_ASSERT((!is_convertible::value)); + BOOST_STATIC_ASSERT( + !(is_convertible::value) || + !(is_convertible::value) || + !(is_convertible::value) + ); + + // Close input sequences in reverse order and output sequences + // in forward order + if (!is_convertible::value) { + detail::execute_all( + detail::call_close(device_, BOOST_IOS::in), + detail::call_close(filter_, device_, BOOST_IOS::in), + detail::call_close(filter_, device_, BOOST_IOS::out), + detail::call_close(device_, BOOST_IOS::out) + ); + } else if (is_convertible::value) { + detail::execute_all( + detail::call_close(device_, BOOST_IOS::in), + detail::call_close(filter_, device_, BOOST_IOS::in) + ); + } else { + detail::execute_all( + detail::call_close(filter_, device_, BOOST_IOS::out), + detail::call_close(device_, BOOST_IOS::out) + ); + } +} + +template +void composite_device::close(BOOST_IOS::openmode which) +{ + BOOST_STATIC_ASSERT((is_convertible::value)); + BOOST_STATIC_ASSERT(!(is_convertible::value)); + + // Close input sequences in reverse order + if (which == BOOST_IOS::in) { + detail::execute_all( + detail::call_close(device_, BOOST_IOS::in), + detail::call_close(filter_, device_, BOOST_IOS::in) + ); + } + + // Close output sequences in forward order + if (which == BOOST_IOS::out) { + detail::execute_all( + detail::call_close(filter_, device_, BOOST_IOS::out), + detail::call_close(device_, BOOST_IOS::out) + ); + } +} + +template +bool composite_device::flush() +{ + bool r1 = iostreams::flush(filter_, device_); + bool r2 = iostreams::flush(device_); + return r1 && r2; +} + +template +std::streamsize +composite_device::optimal_buffer_size() const +{ return iostreams::optimal_buffer_size(device_); } + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/concepts.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/concepts.hpp new file mode 100644 index 0000000000..1ea104e1c6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/concepts.hpp @@ -0,0 +1,129 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_CONCEPTS_HPP_INCLUDED +#define BOOST_IOSTREAMS_CONCEPTS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC +#include +#include +#include +#include // openmode. +#include +#include +#include + +namespace boost { namespace iostreams { + +//--------------Definitions of helper templates for device concepts-----------// + +template +struct device { + typedef Ch char_type; + struct category + : Mode, + device_tag, + closable_tag, + localizable_tag + { }; + + void close() + { + using namespace detail; + BOOST_STATIC_ASSERT((!is_convertible::value)); + } + + void close(BOOST_IOS::openmode) + { + using namespace detail; + BOOST_STATIC_ASSERT((is_convertible::value)); + } + + template + void imbue(const Locale&) { } +}; + +template +struct wdevice : device { }; + +typedef device source; +typedef wdevice wsource; +typedef device sink; +typedef wdevice wsink; + +//--------------Definitions of helper templates for simple filter concepts----// + +template +struct filter { + typedef Ch char_type; + struct category + : Mode, + filter_tag, + closable_tag, + localizable_tag + { }; + + template + void close(Device&) + { + using namespace detail; + BOOST_STATIC_ASSERT((!is_convertible::value)); + BOOST_STATIC_ASSERT((!is_convertible::value)); + } + + template + void close(Device&, BOOST_IOS::openmode) + { + using namespace detail; + BOOST_STATIC_ASSERT( + (is_convertible::value) || + (is_convertible::value) + ); + } + + template + void imbue(const Locale&) { } +}; + +template +struct wfilter : filter { }; + +typedef filter input_filter; +typedef wfilter input_wfilter; +typedef filter output_filter; +typedef wfilter output_wfilter; +typedef filter seekable_filter; +typedef wfilter seekable_wfilter; +typedef filter dual_use_filter; +typedef wfilter dual_use_wfilter; + +//------Definitions of helper templates for multi-character filter cncepts----// + +template +struct multichar_filter : filter { + struct category : filter::category, multichar_tag { }; +}; + +template +struct multichar_wfilter : multichar_filter { }; + +typedef multichar_filter multichar_input_filter; +typedef multichar_wfilter multichar_input_wfilter; +typedef multichar_filter multichar_output_filter; +typedef multichar_wfilter multichar_output_wfilter; +typedef multichar_filter multichar_dual_use_filter; +typedef multichar_wfilter multichar_dual_use_wfilter; + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_CONCEPTS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/constants.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/constants.hpp new file mode 100644 index 0000000000..85eb7e7cc8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/constants.hpp @@ -0,0 +1,42 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains constants used by library. + +#ifndef BOOST_IOSTREAMS_CONSTANTS_HPP_INCLUDED +#define BOOST_IOSTREAMS_CONSTANTS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#ifndef BOOST_IOSTREAMS_DEFAULT_DEVICE_BUFFER_SIZE +# define BOOST_IOSTREAMS_DEFAULT_DEVICE_BUFFER_SIZE 4096 +#endif + +#ifndef BOOST_IOSTREAMS_DEFAULT_FILTER_BUFFER_SIZE +# define BOOST_IOSTREAMS_DEFAULT_FILTER_BUFFER_SIZE 128 +#endif + +#ifndef BOOST_IOSTREAMS_DEFAULT_PBACK_BUFFER_SIZE +# define BOOST_IOSTREAMS_DEFAULT_PBACK_BUFFER_SIZE 4 +#endif + +#include // streamsize. + +namespace boost { namespace iostreams { + +const std::streamsize default_device_buffer_size = + BOOST_IOSTREAMS_DEFAULT_DEVICE_BUFFER_SIZE; +const std::streamsize default_filter_buffer_size = + BOOST_IOSTREAMS_DEFAULT_FILTER_BUFFER_SIZE; +const std::streamsize default_pback_buffer_size = + BOOST_IOSTREAMS_DEFAULT_PBACK_BUFFER_SIZE; + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_CONSTANTS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/copy.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/copy.hpp new file mode 100644 index 0000000000..b9f748a461 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/copy.hpp @@ -0,0 +1,252 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains: The function template copy, which reads data from a Source +// and writes it to a Sink until the end of the sequence is reached, returning +// the number of characters transfered. + +// The implementation is complicated by the need to handle smart adapters +// and direct devices. + +#ifndef BOOST_IOSTREAMS_COPY_HPP_INCLUDED +#define BOOST_IOSTREAMS_COPY_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // Make sure ptrdiff_t is in std. +#include // copy, min. +#include // ptrdiff_t. +#include // pair. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // failure, streamsize. +#include +#include +#include // read, write, close. +#include +#include +#include + +namespace boost { namespace iostreams { + +namespace detail { + + // The following four overloads of copy_impl() optimize + // copying in the case that one or both of the two devices + // models Direct (see + // http://www.boost.org/libs/iostreams/doc/index.html?path=4.1.1.4) + +// Copy from a direct source to a direct sink +template +std::streamsize copy_impl( Source& src, Sink& snk, + std::streamsize /* buffer_size */, + mpl::true_, mpl::true_ ) +{ + using namespace std; + typedef typename char_type_of::type char_type; + typedef std::pair pair_type; + pair_type p1 = iostreams::input_sequence(src); + pair_type p2 = iostreams::output_sequence(snk); + std::streamsize total = + static_cast( + (std::min)(p1.second - p1.first, p2.second - p2.first) + ); + std::copy(p1.first, p1.first + total, p2.first); + return total; +} + +// Copy from a direct source to an indirect sink +template +std::streamsize copy_impl( Source& src, Sink& snk, + std::streamsize /* buffer_size */, + mpl::true_, mpl::false_ ) +{ + using namespace std; + typedef typename char_type_of::type char_type; + typedef std::pair pair_type; + pair_type p = iostreams::input_sequence(src); + std::streamsize size, total; + for ( total = 0, size = static_cast(p.second - p.first); + total < size; ) + { + std::streamsize amt = + iostreams::write(snk, p.first + total, size - total); + total += amt; + } + return total; +} + +// Copy from an indirect source to a direct sink +template +std::streamsize copy_impl( Source& src, Sink& snk, + std::streamsize buffer_size, + mpl::false_, mpl::true_ ) +{ + typedef typename char_type_of::type char_type; + typedef std::pair pair_type; + detail::basic_buffer buf(buffer_size); + pair_type p = snk.output_sequence(); + std::streamsize total = 0; + std::ptrdiff_t capacity = p.second - p.first; + while (true) { + std::streamsize amt = + iostreams::read( + src, + buf.data(), + buffer_size < capacity - total ? + buffer_size : + static_cast(capacity - total) + ); + if (amt == -1) + break; + std::copy(buf.data(), buf.data() + amt, p.first + total); + total += amt; + } + return total; +} + +// Copy from an indirect source to an indirect sink +template +std::streamsize copy_impl( Source& src, Sink& snk, + std::streamsize buffer_size, + mpl::false_, mpl::false_ ) +{ + typedef typename char_type_of::type char_type; + detail::basic_buffer buf(buffer_size); + non_blocking_adapter nb(snk); + std::streamsize total = 0; + bool done = false; + while (!done) { + std::streamsize amt; + done = (amt = iostreams::read(src, buf.data(), buffer_size)) == -1; + if (amt != -1) { + iostreams::write(nb, buf.data(), amt); + total += amt; + } + } + return total; +} + + // The following function object is used with + // boost::iostreams::detail::execute() in the primary + // overload of copy_impl(), below + +// Function object that delegates to one of the above four +// overloads of compl_impl() +template +class copy_operation { +public: + typedef std::streamsize result_type; + copy_operation(Source& src, Sink& snk, std::streamsize buffer_size) + : src_(src), snk_(snk), buffer_size_(buffer_size) + { } + std::streamsize operator()() + { + return copy_impl( src_, snk_, buffer_size_, + is_direct(), is_direct() ); + } +private: + copy_operation& operator=(const copy_operation&); + Source& src_; + Sink& snk_; + std::streamsize buffer_size_; +}; + +// Primary overload of copy_impl. Delegates to one of the above four +// overloads of compl_impl(), depending on which of the two given +// devices, if any, models Direct (see +// http://www.boost.org/libs/iostreams/doc/index.html?path=4.1.1.4) +template +std::streamsize copy_impl(Source src, Sink snk, std::streamsize buffer_size) +{ + using namespace std; + typedef typename char_type_of::type src_char; + typedef typename char_type_of::type snk_char; + BOOST_STATIC_ASSERT((is_same::value)); + return detail::execute_all( + copy_operation(src, snk, buffer_size), + detail::call_close_all(src), + detail::call_close_all(snk) + ); +} + +} // End namespace detail. + +//------------------Definition of copy----------------------------------------// + +// Overload of copy() for the case where neither the source nor the sink is +// a standard stream or stream buffer +template +std::streamsize +copy( const Source& src, const Sink& snk, + std::streamsize buffer_size = default_device_buffer_size + BOOST_IOSTREAMS_DISABLE_IF_STREAM(Source) + BOOST_IOSTREAMS_DISABLE_IF_STREAM(Sink) ) +{ + typedef typename char_type_of::type char_type; + return detail::copy_impl( detail::resolve(src), + detail::resolve(snk), + buffer_size ); +} + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + +// Overload of copy() for the case where the source, but not the sink, is +// a standard stream or stream buffer +template +std::streamsize +copy( Source& src, const Sink& snk, + std::streamsize buffer_size = default_device_buffer_size + BOOST_IOSTREAMS_ENABLE_IF_STREAM(Source) + BOOST_IOSTREAMS_DISABLE_IF_STREAM(Sink) ) +{ + typedef typename char_type_of::type char_type; + return detail::copy_impl( detail::wrap(src), + detail::resolve(snk), + buffer_size ); +} + +// Overload of copy() for the case where the sink, but not the source, is +// a standard stream or stream buffer +template +std::streamsize +copy( const Source& src, Sink& snk, + std::streamsize buffer_size = default_device_buffer_size + BOOST_IOSTREAMS_DISABLE_IF_STREAM(Source) + BOOST_IOSTREAMS_ENABLE_IF_STREAM(Sink) ) +{ + typedef typename char_type_of::type char_type; + return detail::copy_impl( detail::resolve(src), + detail::wrap(snk), buffer_size ); +} + +// Overload of copy() for the case where neither the source nor the sink is +// a standard stream or stream buffer +template +std::streamsize +copy( Source& src, Sink& snk, + std::streamsize buffer_size = default_device_buffer_size + BOOST_IOSTREAMS_ENABLE_IF_STREAM(Source) + BOOST_IOSTREAMS_ENABLE_IF_STREAM(Sink) ) +{ + return detail::copy_impl(detail::wrap(src), detail::wrap(snk), buffer_size); +} + +#endif // #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //-----------------------// + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_COPY_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/absolute_path.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/absolute_path.hpp new file mode 100644 index 0000000000..090958a95e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/absolute_path.hpp @@ -0,0 +1,46 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + + * File: boost/iostreams/detail/execute.hpp + * Date: Thu Dec 06 13:21:54 MST 2007 + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Defines the function boost::iostreams::detail::absolute_path, used for + * debug output for mapped files. + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_ABSOLUTE_PATH_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_ABSOLUTE_PATH_HPP_INCLUDED + +#include +#include +#ifdef BOOST_IOSTREAMS_WINDOWS +# include +#endif +#include + +namespace boost { namespace iostreams { namespace detail { + +// Resolves the given path relative to the current working directory +inline std::string absolute_path(const std::string& path) +{ +#ifdef BOOST_IOSTREAMS_WINDOWS + return path.size() && (path[0] == '/' || path[0] == '\\') || + path.size() > 1 && std::isalpha(path[0]) && path[1] == ':' ? + path : + current_directory() + '\\' + path; +#else // #ifdef BOOST_IOSTREAMS_WINDOWS + return path.size() && (path[0] == '/') ? + path : + current_directory() + '/' + path; +#endif // #ifdef BOOST_IOSTREAMS_WINDOWS +} + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_ABSOLUTE_PATH_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/access_control.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/access_control.hpp new file mode 100644 index 0000000000..2dce6ca8c2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/access_control.hpp @@ -0,0 +1,87 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains the definition of the class template access_control, which +// allows the type of inheritance from a provided base class to be specified +// using a template parameter. + + +#ifndef BOOST_IOSTREAMS_ACCESS_CONTROL_HPP_INCLUDED +#define BOOST_IOSTREAMS_ACCESS_CONTROL_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include + +namespace boost { namespace iostreams { + +struct protected_ { }; // Represents protected inheritance. +struct public_ { }; // Represents public inheritance. + + +namespace detail { + + // Implements protected inheritance. + template + struct prot_ : protected U + { + prot_() { } + template prot_(V v) : U(v) { } + }; + + // Implements public inheritance. + template struct pub_ : public U { + pub_() { } + template pub_(V v) : U(v) { } + }; + +// +// Used to deduce the base type for the template access_control. +// +template +struct access_control_base { + typedef int bad_access_specifier; + typedef typename + iostreams::select< // Disambiguation for Tru64 + ::boost::is_same< + Access, protected_ + >, prot_, + ::boost::is_same< + Access, public_ + >, pub_, + else_, bad_access_specifier + >::type type; +}; + +} // End namespace detail. + +// +// Template name: access_control. +// Description: Allows the type of inheritance from a provided base class +// to be specified using an int template parameter. +// Template parameters: +// Base - The class from which to inherit (indirectly.) +// Access - The type of access desired. Must be one of the +// values access_base::prot or access_base::pub. +// +template< typename T, typename Access, + typename Base = // VC6 workaraound (Compiler Error C2516) + typename detail::access_control_base::type > +struct access_control : public Base { + access_control() { } + template explicit access_control(U u) : Base(u) { } +}; + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_ACCESS_CONTROL_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/concept_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/concept_adapter.hpp new file mode 100644 index 0000000000..b6d35660e4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/concept_adapter.hpp @@ -0,0 +1,284 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONCEPT_ADAPTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONCEPT_ADAPTER_HPP_INCLUDED + +#include // SFINAE. +#include +#include +#include +#include +#include +#include +#include +#include // pubsync. +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + + +namespace boost { namespace iostreams { namespace detail { + +template struct device_wrapper_impl; +template struct flt_wrapper_impl; + +template +class concept_adapter { +private: + typedef typename detail::value_type::type value_type; + typedef typename dispatch::type input_tag; + typedef typename dispatch::type output_tag; + typedef typename + mpl::if_< + is_device, + device_wrapper_impl, + flt_wrapper_impl + >::type input_impl; + typedef typename + mpl::if_< + is_device, + device_wrapper_impl, + flt_wrapper_impl + >::type output_impl; + typedef typename + mpl::if_< + is_device, + device_wrapper_impl, + flt_wrapper_impl + >::type any_impl; +public: + typedef typename char_type_of::type char_type; + typedef typename category_of::type category; + + explicit concept_adapter(const reference_wrapper& ref) : t_(ref.get()) + { BOOST_STATIC_ASSERT(is_std_io::value); } + explicit concept_adapter(const T& t) : t_(t) + { BOOST_STATIC_ASSERT(!is_std_io::value); } + + T& operator*() { return t_; } + T* operator->() { return &t_; } + + std::streamsize read(char_type* s, std::streamsize n) + { return this->read(s, n, (basic_null_source*) 0); } + + template + std::streamsize read(char_type* s, std::streamsize n, Source* src) + { return input_impl::read(t_, src, s, n); } + + std::streamsize write(const char_type* s, std::streamsize n) + { return this->write(s, n, (basic_null_sink*) 0); } + + template + std::streamsize write(const char_type* s, std::streamsize n, Sink* snk) + { return output_impl::write(t_, snk, s, n); } + + std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ) + { + return this->seek( off, way, which, + (basic_null_device*) 0); + } + + template + std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which, Device* dev ) + { return any_impl::seek(t_, dev, off, way, which); } + + void close(BOOST_IOS::openmode which) + { this->close(which, (basic_null_device*) 0); } + + template + void close(BOOST_IOS::openmode which, Device* dev) + { any_impl::close(t_, dev, which); } + + template + bool flush( Device* dev ) + { + return any_impl::flush(t_, dev); + } + + template // Avoid dependency on + void imbue(const Locale& loc) { iostreams::imbue(t_, loc); } + + std::streamsize optimal_buffer_size() const + { return iostreams::optimal_buffer_size(t_); } +public: + concept_adapter& operator=(const concept_adapter&); + value_type t_; +}; + +//------------------Specializations of device_wrapper_impl--------------------// + +template<> +struct device_wrapper_impl { + template + static std::streampos + seek( Device& dev, Dummy*, stream_offset off, + BOOST_IOS::seekdir way, BOOST_IOS::openmode which ) + { + typedef typename category_of::type category; + return seek(dev, off, way, which, category()); + } + + template + static std::streampos + seek( Device&, stream_offset, BOOST_IOS::seekdir, + BOOST_IOS::openmode, any_tag ) + { + boost::throw_exception(cant_seek()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) + } + + template + static std::streampos + seek( Device& dev, stream_offset off, + BOOST_IOS::seekdir way, BOOST_IOS::openmode which, + random_access ) + { + return iostreams::seek(dev, off, way, which); + } + + template + static void close(Device& dev, Dummy*, BOOST_IOS::openmode which) + { iostreams::close(dev, which); } + + template + static bool flush(Device& dev, Dummy*) + { return iostreams::flush(dev); } +}; + + +template<> +struct device_wrapper_impl : device_wrapper_impl { + template + static std::streamsize + read( Device& dev, Dummy*, typename char_type_of::type* s, + std::streamsize n ) + { return iostreams::read(dev, s, n); } + + template + static std::streamsize + write( Device&, Dummy*, const typename char_type_of::type*, + std::streamsize ) + { boost::throw_exception(cant_write()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) } +}; + +template<> +struct device_wrapper_impl { + template + static std::streamsize + read(Device&, Dummy*, typename char_type_of::type*, std::streamsize) + { boost::throw_exception(cant_read()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) } + + template + static std::streamsize + write( Device& dev, Dummy*, const typename char_type_of::type* s, + std::streamsize n ) + { return iostreams::write(dev, s, n); } +}; + +//------------------Specializations of flt_wrapper_impl--------------------// + +template<> +struct flt_wrapper_impl { + template + static std::streampos + seek( Filter& f, Device* dev, stream_offset off, + BOOST_IOS::seekdir way, BOOST_IOS::openmode which ) + { + typedef typename category_of::type category; + return seek(f, dev, off, way, which, category()); + } + + template + static std::streampos + seek( Filter&, Device*, stream_offset, + BOOST_IOS::seekdir, BOOST_IOS::openmode, any_tag ) + { boost::throw_exception(cant_seek()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) } + + template + static std::streampos + seek( Filter& f, Device* dev, stream_offset off, + BOOST_IOS::seekdir way, BOOST_IOS::openmode which, + random_access tag ) + { + typedef typename category_of::type category; + return seek(f, dev, off, way, which, tag, category()); + } + + template + static std::streampos + seek( Filter& f, Device* dev, stream_offset off, + BOOST_IOS::seekdir way, BOOST_IOS::openmode, + random_access, any_tag ) + { return f.seek(*dev, off, way); } + + template + static std::streampos + seek( Filter& f, Device* dev, stream_offset off, + BOOST_IOS::seekdir way, BOOST_IOS::openmode which, + random_access, two_sequence ) + { return f.seek(*dev, off, way, which); } + + template + static void close(Filter& f, Device* dev, BOOST_IOS::openmode which) + { iostreams::close(f, *dev, which); } + + template + static bool flush(Filter& f, Device* dev) + { return iostreams::flush(f, *dev); } +}; + +template<> +struct flt_wrapper_impl { + template + static std::streamsize + read( Filter& f, Source* src, typename char_type_of::type* s, + std::streamsize n ) + { return iostreams::read(f, *src, s, n); } + + template + static std::streamsize + write( Filter&, Sink*, const typename char_type_of::type*, + std::streamsize ) + { boost::throw_exception(cant_write()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) } +}; + +template<> +struct flt_wrapper_impl { + template + static std::streamsize + read(Filter&, Source*, typename char_type_of::type*,std::streamsize) + { boost::throw_exception(cant_read()); + BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) } + + template + static std::streamsize + write( Filter& f, Sink* snk, const typename char_type_of::type* s, + std::streamsize n ) + { return iostreams::write(f, *snk, s, n); } +}; + +//----------------------------------------------------------------------------// + +} } } // End namespaces detail, iostreams, boost. + +#include // MSVC. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONCEPT_ADAPTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/device_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/device_adapter.hpp new file mode 100644 index 0000000000..9dd723a0fd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/device_adapter.hpp @@ -0,0 +1,67 @@ +/* + * Defines the class template boost::iostreams::detail::device_adapter, + * a convenience base class for device adapters. + * + * File: boost/iostreams/detail/adapter/filter_adapter.hpp + * Date: Mon Nov 26 14:35:48 MST 2007 + * + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_DEVICE_ADAPTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_DEVICE_ADAPTER_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +template +class device_adapter { +private: + typedef typename detail::value_type::type value_type; + typedef typename detail::param_type::type param_type; +public: + explicit device_adapter(param_type t) : t_(t) { } + T& component() { return t_; } + + void close() + { + detail::close_all(t_); + } + + void close(BOOST_IOS::openmode which) + { + iostreams::close(t_, which); + } + + bool flush() + { + return iostreams::flush(t_); + } + + template // Avoid dependency on + void imbue(const Locale& loc) { iostreams::imbue(t_, loc); } + + std::streamsize optimal_buffer_size() const + { return iostreams::optimal_buffer_size(t_); } +public: + value_type t_; +}; + +//----------------------------------------------------------------------------// + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DEVICE_ADAPTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/direct_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/direct_adapter.hpp new file mode 100644 index 0000000000..88ab735a17 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/direct_adapter.hpp @@ -0,0 +1,281 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // SFINAE, MSVC, put ptrdiff_t in std. +#include // copy, min. +#include // ptrdiff_t. +#include +#include +#include // forwarding. +#include // locale. +#include +#include +#include // openmode, seekdir, int types. +#include // mode_of, is_direct. +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // VC7.1 + +namespace boost { namespace iostreams { namespace detail { + +//------------------Definition of direct_adapter_base-------------------------// + +// Put all initialization in base class to faciliate forwarding. +template +class direct_adapter_base { +public: + typedef typename char_type_of::type char_type; + typedef typename mode_of::type mode_type; + struct category + : mode_type, + device_tag, + closable_tag + #ifndef BOOST_IOSTREAMS_NO_LOCALE + , localizable_tag + #endif + { }; +protected: + explicit direct_adapter_base(const Direct& d); + typedef is_convertible is_double; + struct pointers { + char_type *beg, *ptr, *end; + }; + void init_input(mpl::true_); + void init_input(mpl::false_) { } + void init_output(mpl::true_); + void init_output(mpl::false_) { } + double_object ptrs_; + Direct d_; +}; + +template +class direct_adapter : private direct_adapter_base { +private: + typedef direct_adapter_base base_type; + typedef typename base_type::pointers pointers; + typedef typename base_type::is_double is_double; + using base_type::ptrs_; + using base_type::d_; +public: + typedef typename base_type::char_type char_type; + typedef typename base_type::category category; + + // Constructors + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310) + direct_adapter(const Direct& d) : base_type(d) { } + direct_adapter(const direct_adapter& d) : base_type(d) { } +# define BOOST_PP_LOCAL_LIMITS (1, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY) +#else + template + struct is_direct + : mpl::or_< + is_same >, + is_same + > + { }; + template + direct_adapter(const U& u) + : base_type(forward(u, is_direct())) + { } +# define BOOST_PP_LOCAL_LIMITS (2, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY) +#endif + +#define BOOST_PP_LOCAL_MACRO(n) \ + template \ + direct_adapter(BOOST_PP_ENUM_BINARY_PARAMS(n, const P, &p)) \ + : base_type(Direct(BOOST_PP_ENUM_PARAMS(n, p))) \ + { } \ + /**/ +#include BOOST_PP_LOCAL_ITERATE() +#undef BOOST_PP_LOCAL_MACRO + + // Device interface. + + std::streamsize read(char_type* s, std::streamsize n); + std::streamsize write(const char_type* s, std::streamsize n); + std::streampos seek( stream_offset, BOOST_IOS::seekdir, + BOOST_IOS::openmode = BOOST_IOS::in | BOOST_IOS::out ); + void close(); + void close(BOOST_IOS::openmode which); +#ifndef BOOST_IOSTREAMS_NO_LOCALE + void imbue(const std::locale&); +#endif + + // Direct device access. + + Direct& operator*() { return d_; } + Direct* operator->() { return &d_; } +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) +private: + template + static Direct forward(const U& u, mpl::true_) { return u; } + template + static Direct forward(const U& u, mpl::false_) { return Direct(u); } +#endif +}; + +//--------------Definition of wrap_direct and unwrap_direct-------------------// + +template +struct wrap_direct_traits + : mpl::if_< + is_direct, + direct_adapter, + Device + > + { }; + +template +typename wrap_direct_traits::type +inline wrap_direct(Device dev) +{ + typedef typename wrap_direct_traits::type type; + return type(dev); +} + +template +inline Device& unwrap_direct(Device& d) { return d; } + +template +inline Device& unwrap_direct(direct_adapter& d) { return *d; } + +//--------------Implementation of direct_adapter_base-------------------------// + +template +direct_adapter_base::direct_adapter_base(const Direct& d) : d_(d) +{ + init_input(is_convertible()); + init_output(is_convertible()); +} + +template +void direct_adapter_base::init_input(mpl::true_) +{ + std::pair seq = iostreams::input_sequence(d_); + ptrs_.first().beg = seq.first; + ptrs_.first().ptr = seq.first; + ptrs_.first().end = seq.second; +} + +template +void direct_adapter_base::init_output(mpl::true_) +{ + std::pair seq = iostreams::output_sequence(d_); + ptrs_.second().beg = seq.first; + ptrs_.second().ptr = seq.first; + ptrs_.second().end = seq.second; +} + +//--------------Implementation of direct_adapter------------------------------// + +template +inline std::streamsize direct_adapter::read + (char_type* s, std::streamsize n) +{ + using namespace std; + pointers& get = ptrs_.first(); + std::streamsize avail = + static_cast(get.end - get.ptr); + std::streamsize result = (std::min)(n, avail); + std::copy(get.ptr, get.ptr + result, s); + get.ptr += result; + return result != 0 ? result : -1; +} + +template +inline std::streamsize direct_adapter::write + (const char_type* s, std::streamsize n) +{ + using namespace std; + pointers& put = ptrs_.second(); + if (n > static_cast(put.end - put.ptr)) + boost::throw_exception(write_area_exhausted()); + std::copy(s, s + n, put.ptr); + put.ptr += n; + return n; +} + +template +inline std::streampos direct_adapter::seek + ( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ) +{ + using namespace std; + pointers& get = ptrs_.first(); + pointers& put = ptrs_.second(); + if (way == BOOST_IOS::cur && get.ptr != put.ptr) + boost::throw_exception(bad_seek()); + ptrdiff_t next = 0; + if ((which & BOOST_IOS::in) || !is_double::value) { + if (way == BOOST_IOS::beg) + next = off; + else if (way == BOOST_IOS::cur) + next = get.ptr - get.beg + off; + else + next = get.end - get.beg + off; + if (next >= 0 && next <= get.end - get.beg) + get.ptr = get.beg + next; + else + boost::throw_exception(bad_seek()); + } + if ((which & BOOST_IOS::out) && is_double::value) { + if (way == BOOST_IOS::beg) + next = off; + else if (way == BOOST_IOS::cur) + next = put.ptr - put.beg + off; + else + next = put.end - put.beg + off; + if (next >= 0 && next <= put.end - put.beg) + put.ptr = put.beg + next; + else + boost::throw_exception(bad_seek()); + } + return offset_to_position(next); +} + +template +void direct_adapter::close() +{ + BOOST_STATIC_ASSERT((!is_convertible::value)); + detail::close_all(d_); +} + +template +void direct_adapter::close(BOOST_IOS::openmode which) +{ + BOOST_STATIC_ASSERT((is_convertible::value)); + boost::iostreams::close(d_, which); +} + +#ifndef BOOST_IOSTREAMS_NO_LOCALE + template + void direct_adapter::imbue(const std::locale& loc) + { boost::iostreams::imbue(d_, loc); } +#endif + +} } } // End namespaces detail, iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/filter_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/filter_adapter.hpp new file mode 100644 index 0000000000..a2ab49250b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/filter_adapter.hpp @@ -0,0 +1,69 @@ +/* + * Defines the class template boost::iostreams::detail::filter_adapter, + * a convenience base class for filter adapters. + * + * File: boost/iostreams/detail/adapter/filter_adapter.hpp + * Date: Mon Nov 26 14:35:48 MST 2007 + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_FILTER_ADAPTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_FILTER_ADAPTER_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +template +class filter_adapter { +private: + typedef typename detail::value_type::type value_type; + typedef typename detail::param_type::type param_type; +public: + explicit filter_adapter(param_type t) : t_(t) { } + T& component() { return t_; } + + template + void close(Device& dev) + { + detail::close_all(t_, dev); + } + + template + void close(Device& dev, BOOST_IOS::openmode which) + { + iostreams::close(t_, dev, which); + } + + template + void flush(Device& dev) + { + return iostreams::flush(t_, dev); + } + + template // Avoid dependency on + void imbue(const Locale& loc) { iostreams::imbue(t_, loc); } + + std::streamsize optimal_buffer_size() const + { return iostreams::optimal_buffer_size(t_); } +public: + value_type t_; +}; + +//----------------------------------------------------------------------------// + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_FILTER_ADAPTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/mode_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/mode_adapter.hpp new file mode 100644 index 0000000000..91fd97fbd4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/mode_adapter.hpp @@ -0,0 +1,123 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_MODE_ADAPTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_MODE_ADAPTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// Contains the definition of the class template mode_adapter, which allows +// a filter or device to function as if it has a different i/o mode than that +// deduced by the metafunction mode_of. + +#include // BOOST_MSVC. +#include +#include +#include // openmode, seekdir, int types. +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +template +class mode_adapter { +private: + struct empty_base { }; +public: + typedef typename wrapped_type::type component_type; + typedef typename char_type_of::type char_type; + struct category + : Mode, + device_tag, + mpl::if_, filter_tag, device_tag>, + mpl::if_, multichar_tag, empty_base>, + #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + closable_tag, // VC6 can't see member close()! + #endif + localizable_tag + { }; + explicit mode_adapter(const component_type& t) : t_(t) { } + + // Device member functions. + + std::streamsize read(char_type* s, std::streamsize n); + std::streamsize write(const char_type* s, std::streamsize n); + std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = + BOOST_IOS::in | BOOST_IOS::out ); +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + void close(); + void close(BOOST_IOS::openmode which); +#endif + + // Filter member functions. + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { return iostreams::read(t_, src, s, n); } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { return iostreams::write(t_, snk, s, n); } + + template + std::streampos seek(Device& dev, stream_offset off, BOOST_IOS::seekdir way) + { return iostreams::seek(t_, dev, off, way); } + + template + std::streampos seek( Device& dev, stream_offset off, + BOOST_IOS::seekdir way, BOOST_IOS::openmode which ) + { return iostreams::seek(t_, dev, off, way, which); } + + template + void close(Device& dev) + { detail::close_all(t_, dev); } + + template + void close(Device& dev, BOOST_IOS::openmode which) + { iostreams::close(t_, dev, which); } + + template + void imbue(const Locale& loc) + { iostreams::imbue(t_, loc); } +private: + component_type t_; +}; + +//------------------Implementation of mode_adapter----------------------------// + +template +std::streamsize mode_adapter::read + (char_type* s, std::streamsize n) +{ return boost::iostreams::read(t_, s, n); } + +template +std::streamsize mode_adapter::write + (const char_type* s, std::streamsize n) +{ return boost::iostreams::write(t_, s, n); } + +template +std::streampos mode_adapter::seek + (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which) +{ return boost::iostreams::seek(t_, off, way, which); } + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template + void mode_adapter::close() + { detail::close_all(t_); } + + template + void mode_adapter::close(BOOST_IOS::openmode which) + { iostreams::close(t_, which); } +#endif + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_MODE_ADAPTER_HPP_INCLUDED //-----// diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/non_blocking_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/non_blocking_adapter.hpp new file mode 100644 index 0000000000..1457032c71 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/non_blocking_adapter.hpp @@ -0,0 +1,59 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED + +#include // streamsize, seekdir, openmode. +#include +#include +#include +#include + +namespace boost { namespace iostreams { + +template +class non_blocking_adapter { +public: + typedef typename char_type_of::type char_type; + struct category + : mode_of::type, device_tag + { }; + explicit non_blocking_adapter(Device& dev) : device_(dev) { } + std::streamsize read(char_type* s, std::streamsize n) + { + std::streamsize result = 0; + while (result < n) { + std::streamsize amt = iostreams::read(device_, s, n); + if (amt == -1) + break; + result += amt; + } + return result != 0 ? result : -1; + } + std::streamsize write(const char_type* s, std::streamsize n) + { + std::streamsize result = 0; + while (result < n) { + std::streamsize amt = + iostreams::write(device_, s + result, n - result); + result += amt; + } + return result; + } + std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = + BOOST_IOS::in | BOOST_IOS::out ) + { return iostreams::seek(device_, off, way, which); } +public: + non_blocking_adapter& operator=(const non_blocking_adapter&); + Device& device_; +}; + +} } // End namespace iostreams. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/output_iterator_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/output_iterator_adapter.hpp new file mode 100644 index 0000000000..2944f25d75 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/output_iterator_adapter.hpp @@ -0,0 +1,41 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // copy. +#include // streamsize. +#include // tags. +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +template +class output_iterator_adapter { +public: + BOOST_STATIC_ASSERT((is_convertible::value)); + typedef Ch char_type; + typedef sink_tag category; + explicit output_iterator_adapter(OutIt out) : out_(out) { } + std::streamsize write(const char_type* s, std::streamsize n) + { + std::copy(s, s + n, out_); + return n; + } +private: + OutIt out_; +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED //-----// diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/range_adapter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/range_adapter.hpp new file mode 100644 index 0000000000..d2b9bc55fd --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/adapter/range_adapter.hpp @@ -0,0 +1,187 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // min. +#include +#include // ptrdiff_t. +#include // streamsize, streamoff. +#include // boost::iterator_traits. +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { namespace detail { + +// Used for simulated tag dispatch. +template struct range_adapter_impl; + +// +// Template name: range_adapter +// Description: Device based on an instance of boost::iterator_range. +// Template paramters: +// Mode - A mode tag. +// Range - An instance of iterator_range. +// +template +class range_adapter { +private: + typedef typename Range::iterator iterator; + typedef boost::detail::iterator_traits iter_traits; + typedef typename iter_traits::iterator_category iter_cat; +public: + typedef typename Range::value_type char_type; + struct category : Mode, device_tag { }; + typedef typename + mpl::if_< + is_convertible< + iter_cat, + std::random_access_iterator_tag + >, + std::random_access_iterator_tag, + std::forward_iterator_tag + >::type tag; + typedef range_adapter_impl impl; + + explicit range_adapter(const Range& rng); + range_adapter(iterator first, iterator last); + std::streamsize read(char_type* s, std::streamsize n); + std::streamsize write(const char_type* s, std::streamsize n); + std::streampos seek(stream_offset off, BOOST_IOS::seekdir way); +private: + iterator first_, cur_, last_; +}; + +//------------------Implementation of range_adapter---------------------------// + +template +range_adapter::range_adapter(const Range& rng) + : first_(rng.begin()), cur_(rng.begin()), last_(rng.end()) { } + +template +range_adapter::range_adapter(iterator first, iterator last) + : first_(first), cur_(first), last_(last) { } + +template +inline std::streamsize range_adapter::read + (char_type* s, std::streamsize n) +{ return impl::read(cur_, last_, s, n); } + +template +inline std::streamsize range_adapter::write + (const char_type* s, std::streamsize n) +{ return impl::write(cur_, last_, s, n); } + + +template +std::streampos range_adapter::seek + (stream_offset off, BOOST_IOS::seekdir way) +{ + impl::seek(first_, cur_, last_, off, way); + return offset_to_position(cur_ - first_); +} + +//------------------Implementation of range_adapter_impl----------------------// + +template<> +struct range_adapter_impl { + template + static std::streamsize read + (Iter& cur, Iter& last, Ch* s,std::streamsize n) + { + std::streamsize rem = n; // No. of chars remaining. + while (cur != last && rem-- > 0) *s++ = *cur++; + return n - rem != 0 ? n - rem : -1; + } + + template + static std::streamsize write + (Iter& cur, Iter& last, const Ch* s, std::streamsize n) + { + while (cur != last && n-- > 0) *cur++ = *s++; + if (cur == last && n > 0) + boost::throw_exception(write_area_exhausted()); + return n; + } +}; + +template<> +struct range_adapter_impl { + template + static std::streamsize read + (Iter& cur, Iter& last, Ch* s,std::streamsize n) + { + std::streamsize result = + (std::min)(static_cast(last - cur), n); + if (result) + std::copy(cur, cur + result, s); + cur += result; + return result != 0 ? result : -1; + } + + template + static std::streamsize write + (Iter& cur, Iter& last, const Ch* s, std::streamsize n) + { + std::streamsize count = + (std::min)(static_cast(last - cur), n); + std::copy(s, s + count, cur); + cur += count; + if (count < n) + boost::throw_exception(write_area_exhausted()); + return n; + } + + template + static void seek + ( Iter& first, Iter& cur, Iter& last, stream_offset off, + BOOST_IOS::seekdir way ) + { + using namespace std; + switch (way) { + case BOOST_IOS::beg: + if (off > last - first || off < 0) + boost::throw_exception(bad_seek()); + cur = first + off; + break; + case BOOST_IOS::cur: + { + std::ptrdiff_t newoff = cur - first + off; + if (newoff > last - first || newoff < 0) + boost::throw_exception(bad_seek()); + cur += off; + break; + } + case BOOST_IOS::end: + if (last - first + off < 0 || off > 0) + boost::throw_exception(bad_seek()); + cur = last + off; + break; + default: + assert(0); + } + } +}; + +} } } // End namespaces detail, iostreams, boost. + +#include // MSVC. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED //---------------// diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/add_facet.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/add_facet.hpp new file mode 100644 index 0000000000..65a8951444 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/add_facet.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Borrowed from + +#ifndef BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_DINKUMWARE_STDLIB. +#include + +//------------------Definition of add_facet-----------------------------------// + +// Does STLport uses old Dinkumware locale? +#if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && \ + defined(_STLP_NO_OWN_IOSTREAMS) \ + /**/ +# if (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +# define BOOST_IOSTREMS_STLPORT_WITH_OLD_DINKUMWARE +# endif +#endif + +namespace boost { namespace iostreams { namespace detail { + +template +inline std::locale add_facet(const std::locale &l, Facet * f) +{ + return + #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) || \ + defined(BOOST_IOSTREMS_STLPORT_WITH_OLD_DINKUMWARE) \ + /**/ + std::locale(std::_Addfac(l, f)); + #else + // standard compatible + std::locale(l, f); + #endif +} + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/bool_trait_def.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/bool_trait_def.hpp new file mode 100644 index 0000000000..c3fb9d587b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/bool_trait_def.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_BOOL_TRAIT_DEF_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_BOOL_TRAIT_DEF_HPP_INCLUDED + +#include // BOOST_STATIC_CONSTANT. +#include +#include +#include +#include +#include +#include + +// +// Macro name: BOOST_IOSTREAMS_BOOL_TRAIT_DEF +// Description: Used to generate the traits classes is_istream, is_ostream, +// etc. +// +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) +# define BOOST_IOSTREAMS_TRAIT_NAMESPACE(trait) +#else +# define BOOST_IOSTREAMS_TRAIT_NAMESPACE(trait) BOOST_PP_CAT(trait, _impl_):: +#endif +#define BOOST_IOSTREAMS_BOOL_TRAIT_DEF(trait, type, arity) \ + namespace BOOST_PP_CAT(trait, _impl_) { \ + BOOST_IOSTREAMS_TEMPLATE_PARAMS(arity, T) \ + type_traits::yes_type helper \ + (const volatile type BOOST_IOSTREAMS_TEMPLATE_ARGS(arity, T)*); \ + type_traits::no_type helper(...); \ + template \ + struct impl { \ + BOOST_STATIC_CONSTANT(bool, value = \ + (sizeof(BOOST_IOSTREAMS_TRAIT_NAMESPACE(trait) \ + helper(static_cast(0))) == \ + sizeof(type_traits::yes_type))); \ + }; \ + } \ + template \ + struct trait \ + : mpl::bool_::value> \ + { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, trait, (T)) }; \ + /**/ + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_BOOL_TRAIT_DEF_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/forward.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/forward.hpp new file mode 100644 index 0000000000..4444916c3a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/forward.hpp @@ -0,0 +1,31 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED + +#include // BOOST_STATIC_CONSANT. +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +template +struct forward_impl { + BOOST_STATIC_CONSTANT(bool, value = + ( !is_same< U, Device >::value && + !is_same< U, reference_wrapper >::value )); +}; + +template +struct forward + : mpl::bool_::value> + { }; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/stream.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/stream.hpp new file mode 100644 index 0000000000..834f996f40 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/stream.hpp @@ -0,0 +1,184 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_HPP_INCLUDED + +#include + +namespace boost { namespace iostreams { + +template< typename Device, + typename Tr = + BOOST_IOSTREAMS_CHAR_TRAITS( + BOOST_DEDUCED_TYPENAME char_type_of::type + ), + typename Alloc = + std::allocator< + BOOST_DEDUCED_TYPENAME char_type_of::type + > > +struct stream : detail::stream_base { +public: + typedef typename char_type_of::type char_type; + struct category + : mode_of::type, + closable_tag, + detail::stream_traits::stream_tag + { }; + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) +private: + typedef typename + detail::stream_traits< + Device, Tr + >::stream_type stream_type; +public: + stream() { } + template + stream(const U0& u0) + { + open_impl(detail::forward(), u0); + } + template + stream(const U0& u0, const U1& u1) + { + open_impl(detail::forward(), u0, u1); + } + template + stream(const U0& u0, const U1& u1, const U2& u2) + { + open_impl(detail::forward(), u0, u1, u2); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + stream(U0& u0) + { + open_impl(detail::forward(), u0); + } + template + stream(U0& u0, const U1& u1) + { + open_impl(detail::forward(), u0, u1); + } + template + stream(U0& u0, const U1& u1, const U2& u2) + { + open_impl(detail::forward(), u0, u1, u2); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + template + void open(const U0& u0) + { + open_impl(detail::forward(), u0); + } + template + void open(const U0& u0, const U1& u1) + { + open_impl(detail::forward(), u0, u1); + } + template + void open(const U0& u0, const U1& u1, const U2& u2) + { + open_impl(detail::forward(), u0, u1, u2); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open(U0& u0) + { + open_impl(detail::forward(), u0); + } + template + void open(U0& u0, const U1& u1) + { + open_impl(detail::forward(), u0, u1); + } + template + void open(U0& u0, const U1& u1, const U2& u2) + { + open_impl(detail::forward(), u0, u1, u2); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + bool is_open() const { return this->member.is_open(); } + void close() { this->member.close(); } + bool auto_close() const { return this->member.auto_close(); } + void set_auto_close(bool close) { this->member.set_auto_close(close); } + bool strict_sync() { return this->member.strict_sync(); } + Device& operator*() { return *this->member; } + Device* operator->() { return &*this->member; } +private: + template + void open_impl(mpl::false_, const U0& u0) + { + this->clear(); + this->member.open(u0); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open_impl(mpl::false_, U0& u0) + { + this->clear(); + this->member.open(detail::wrap(u0)); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + template + void open_impl(mpl::true_, const U0& u0) + { + this->clear(); + this->member.open(Device(const_cast(u0))); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open_impl(mpl::true_, U0& u0) + { + this->clear(); + this->member.open(Device(u0)); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + template + void open_impl(mpl::false_, const U0& u0, const U1& u1) + { + this->clear(); + this->member.open(u0, u1); + } + template + void open_impl(mpl::true_, const U0& u0, const U1& u1) + { + this->clear(); + this->member.open(Device(const_cast(u0), u1)); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open_impl(mpl::true_, U0& u0, const U1& u1) + { + this->clear(); + this->member.open(Device(u0, u1)); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + template + void open_impl(mpl::false_, const U0& u0, const U1& u1, const U2& u2) + { + this->clear(); + this->member.open(u0, u1, u2); + } + template + void open_impl(mpl::true_, const U0& u0, const U1& u1, const U2& u2) + { + this->clear(); + this->member.open(Device(const_cast(u0), u1, u2)); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open_impl(mpl::true_, U0& u0, const U1& u1, const U2& u2) + { + this->clear(); + this->member.open(Device(u0, u1, u2)); + } +#endif +}; + +} } // End namespaces iostreams, boost. + +#endif BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp new file mode 100644 index 0000000000..d5c7107087 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp @@ -0,0 +1,189 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_BUFFER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_BUFFER_HPP_INCLUDED + +#include +#include + +namespace boost { namespace iostreams { + +template< typename T, + typename Tr = + BOOST_IOSTREAMS_CHAR_TRAITS( + BOOST_DEDUCED_TYPENAME char_type_of::type + ), + typename Alloc = + std::allocator< + BOOST_DEDUCED_TYPENAME char_type_of::type + >, + typename Mode = BOOST_DEDUCED_TYPENAME mode_of::type > +class stream_buffer + : public detail::stream_buffer_traits::type +{ +private: + BOOST_STATIC_ASSERT(( + is_convertible< + BOOST_DEDUCED_TYPENAME iostreams::category_of::type, Mode + >::value + )); + typedef typename + detail::stream_buffer_traits< + T, Tr, Alloc, Mode + >::type base_type; +public: + typedef typename char_type_of::type char_type; + struct category + : Mode, + closable_tag, + streambuf_tag + { }; + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) + stream_buffer() { } + ~stream_buffer() + { + try { + if (this->is_open() && this->auto_close()) + this->close(); + } catch (...) { } + } + template + stream_buffer(const U0& u0) + { + open_impl(detail::forward(), u0); + } + template + stream_buffer(const U0& u0, const U1& u1) + { + open_impl(detail::forward(), u0, u1); + } + template + stream_buffer(const U0& u0, const U1& u1, const U2& u2) + { + open_impl(detail::forward(), u0, u1, u2); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + stream_buffer(U0& u0) + { + open_impl(detail::forward(), u0); + } + template + stream_buffer(U0& u0, const U1& u1) + { + open_impl(detail::forward(), u0, u1); + } + template + stream_buffer(U0& u0, const U1& u1, const U2& u2) + { + open_impl(detail::forward(), u0, u1, u2); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + template + void open(const U0& u0) + { + open_impl(detail::forward(), u0); + } + template + void open(const U0& u0, const U1& u1) + { + open_impl(detail::forward(), u0, u1); + } + template + void open(const U0& u0, const U1& u1, const U2& u2) + { + open_impl(detail::forward(), u0, u1, u2); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open(U0& u0) + { + open_impl(detail::forward(), u0); + } + template + void open(U0& u0, const U1& u1) + { + open_impl(detail::forward(), u0, u1); + } + template + void open(U0& u0, const U1& u1, const U2& u2) + { + open_impl(detail::forward(), u0, u1, u2); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + T& operator*() { return *this->component(); } + T* operator->() { return this->component(); } +private: + template + void open_impl(mpl::false_, const U0& u0) + { + base_type::open(const_cast(u0), -1, -1); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open_impl(mpl::false_, U0& u0) + { + base_type::open(detail::wrap(u0), -1, -1); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + template + void open_impl(mpl::true_, const U0& u0) + { + base_type::open(T(const_cast(u0)), -1, -1); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open_impl(mpl::true_, U0& u0) + { + base_type::open(T(u0), -1, -1); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + template + void open_impl(mpl::false_, const U0& u0, const U1& u1) + { + base_type::open(u0, u1, -1); + } + template + void open_impl(mpl::true_, const U0& u0, const U1& u1) + { + base_type::open(T(const_cast(u0), u1), -1, -1); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open_impl(mpl::true_, U0& u0, const U1& u1) + { + base_type::open(T(u0, u1), -1, -1); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + template + void open_impl(mpl::false_, const U0& u0, const U1& u1, const U2& u2) + { + base_type::open(u0, u1, u2); + } + template + void open_impl(mpl::true_, const U0& u0, const U1& u1, const U2& u2) + { + base_type::open(T(const_cast(u0), u1, u2), -1, -1); + } +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + template + void open_impl(mpl::true_, U0& u0, const U1& u1, const U2& u2) + { + base_type::open(T(u0, u1, u2), -1, -1); + } +#endif // !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------// + void check_open() + { + if (this->is_open()) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("already open")); + } +}; + +} } // End namespaces iostreams, boost. + +#endif // BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_BUFFER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/buffer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/buffer.hpp new file mode 100644 index 0000000000..c830ae5bf7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/buffer.hpp @@ -0,0 +1,200 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // swap. +#include // allocator. +#include // member templates. +#include +#include // streamsize. +#include +#include // int_type_of. +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +//----------------Buffers-----------------------------------------------------// + +// +// Template name: buffer +// Description: Character buffer. +// Template paramters: +// Ch - The character type. +// Alloc - The Allocator type. +// +template< typename Ch, + typename Alloc = std::allocator > +class basic_buffer { +private: +#ifndef BOOST_NO_STD_ALLOCATOR + typedef typename Alloc::template rebind::other allocator_type; +#else + typedef std::allocator allocator_type; +#endif +public: + basic_buffer(); + basic_buffer(int buffer_size); + ~basic_buffer(); + void resize(int buffer_size); + Ch* begin() const { return buf_; } + Ch* end() const { return buf_ + size_; } + Ch* data() const { return buf_; } + std::streamsize size() const { return size_; } + void swap(basic_buffer& rhs); +private: + // Disallow copying and assignment. + basic_buffer(const basic_buffer&); + basic_buffer& operator=(const basic_buffer&); + Ch* buf_; + std::streamsize size_; +}; + +template +void swap(basic_buffer& lhs, basic_buffer& rhs) +{ lhs.swap(rhs); } + +// +// Template name: buffer +// Description: Character buffer with two pointers accessible via ptr() and +// eptr(). +// Template paramters: +// Ch - A character type. +// +template< typename Ch, + typename Alloc = std::allocator > +class buffer : public basic_buffer { +private: + typedef basic_buffer base; +public: + typedef iostreams::char_traits traits_type; + using base::resize; + using base::data; + using base::size; + typedef Ch* const const_pointer; + buffer(int buffer_size); + Ch* & ptr() { return ptr_; } + const_pointer& ptr() const { return ptr_; } + Ch* & eptr() { return eptr_; } + const_pointer& eptr() const { return eptr_; } + void set(std::streamsize ptr, std::streamsize end); + void swap(buffer& rhs); + + // Returns an int_type as a status code. + template + typename int_type_of::type fill(Source& src) + { + using namespace std; + std::streamsize keep; + if ((keep = static_cast(eptr_ - ptr_)) > 0) + traits_type::move(this->data(), ptr_, keep); + set(0, keep); + std::streamsize result = + iostreams::read(src, this->data() + keep, this->size() - keep); + if (result != -1) + this->set(0, keep + result); + return result == -1 ? + traits_type::eof() : + result == 0 ? + traits_type::would_block() : + traits_type::good(); + + } + + // Returns true if one or more characters were written. + template + bool flush(Sink& dest) + { + using namespace std; + std::streamsize amt = static_cast(eptr_ - ptr_); + std::streamsize result = iostreams::write_if(dest, ptr_, amt); + if (result < amt) { + traits_type::move( this->data(), + ptr_ + result, + amt - result ); + } + this->set(0, amt - result); + return result != 0; + } +private: + Ch *ptr_, *eptr_; +}; + +template +void swap(buffer& lhs, buffer& rhs) +{ lhs.swap(rhs); } + +//--------------Implementation of basic_buffer--------------------------------// + +template +basic_buffer::basic_buffer() : buf_(0), size_(0) { } + +template +basic_buffer::basic_buffer(int buffer_size) + : buf_(static_cast(allocator_type().allocate(buffer_size, 0))), + size_(buffer_size) // Cast for SunPro 5.3. + { } + +template +inline basic_buffer::~basic_buffer() +{ + if (buf_) { + allocator_type().deallocate(buf_, + static_cast(size_)); + } +} + +template +inline void basic_buffer::resize(int buffer_size) +{ + if (size_ != buffer_size) { + basic_buffer temp(buffer_size); + std::swap(size_, temp.size_); + std::swap(buf_, temp.buf_); + } +} + +template +void basic_buffer::swap(basic_buffer& rhs) +{ + std::swap(buf_, rhs.buf_); + std::swap(size_, rhs.size_); +} + +//--------------Implementation of buffer--------------------------------------// + +template +buffer::buffer(int buffer_size) + : basic_buffer(buffer_size) { } + +template +inline void buffer::set(std::streamsize ptr, std::streamsize end) +{ + ptr_ = data() + ptr; + eptr_ = data() + end; +} + +template +inline void buffer::swap(buffer& rhs) +{ + base::swap(rhs); + std::swap(ptr_, rhs.ptr_); + std::swap(eptr_, rhs.eptr_); +} + +//----------------------------------------------------------------------------// + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/call_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/call_traits.hpp new file mode 100644 index 0000000000..6b04c7a656 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/call_traits.hpp @@ -0,0 +1,32 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_VALUE_TYPE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_VALUE_TYPE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +template +struct param_type { + typedef typename mpl::if_, T&, const T&>::type type; +}; + +template +struct value_type { + typedef typename mpl::if_, T&, T>::type type; +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_VALUE_TYPE_HPP_INCLUDED //-----------// diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/char_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/char_traits.hpp new file mode 100644 index 0000000000..2ee2fd0d4f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/char_traits.hpp @@ -0,0 +1,63 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// Provides std::char_traits for libraries without templated streams. Should not +// be confused with , which defines the +// template boost::iostreams::char_traits. + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_CHAR_TRAITS_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CHAR_TRAITS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# include // Make sure size_t is in std. +# include +# include +# include +#endif + +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------// +# define BOOST_IOSTREAMS_CHAR_TRAITS(ch) std::char_traits< ch > +#else +# define BOOST_IOSTREAMS_CHAR_TRAITS(ch) boost::iostreams::detail::char_traits + +namespace boost { namespace iostreams { namespace detail { + +struct char_traits { + typedef char char_type; + typedef int int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + + // Note: this may not be not conforming, since it treats chars as unsigned, + // but is only used to test for equality. + static int compare(const char* lhs, const char* rhs, std::size_t n) + { return std::strncmp(lhs, rhs, n); } + static char* copy(char *dest, const char *src, std::size_t n) + { return static_cast(std::memcpy(dest, src, n)); } + static char* move(char *dest, const char *src, std::size_t n) + { return static_cast(std::memmove(dest, src, n)); } + static const char* find(const char* s, std::size_t n, const char& c) + { return (const char*) (const void*) std::memchr(s, c, n); } + static char to_char_type(const int& c) { return c; } + static int to_int_type(const char& c) { return c; } + static bool eq_int_type(const int& lhs, const int& rhs) + { return lhs == rhs; } + static int eof() { return EOF; } + static int not_eof(const int& c) { return c != EOF ? c : '\n'; } +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-----------------------// + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CHAR_TRAITS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/codecvt_helper.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/codecvt_helper.hpp new file mode 100644 index 0000000000..deb4e30683 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/codecvt_helper.hpp @@ -0,0 +1,237 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains the definition of the template codecvt_helper, useful for +// defining specializations of std::codecvt where state_type != mbstate_t. +// Compensates for the fact that some standard library implementations +// do not derive the primiary codecvt template from locale::facet or +// provide the correct member types and functions. + +// Usage: +// +// // In global namespace: +// BOOST_IOSTREAMS_CODECVT_SPEC(mystate) +// +// // In user namespace: +// template +// struct mycodecvt : codecvt_helper { ... }; +// +// // Or: +// struct mycodecvt : codecvt_helper { ... }; +// +// Etc. + +#ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // Put size_t in std, BOOST_MSVC, Dinkum. +#include +#include // min. +#include // size_t. +#include // locale, codecvt_base, codecvt. +#include + +//------------------Definition of traits--------------------------------------// + +namespace boost { namespace iostreams { namespace detail { + +#if !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) //-----------------------// + +template +struct codecvt_intern { typedef typename T::intern_type type; }; + +template +struct codecvt_extern { typedef typename T::extern_type type; }; + +#else // #if !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) //--------------// + +template +struct codecvt_intern { typedef typename T::from_type type; }; + +template +struct codecvt_extern { typedef typename T::to_type type; }; + +#endif // #if !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) //-------------// + +template +struct codecvt_state { typedef typename T::state_type type; }; + +} } } // End namespaces detail, iostreams, boost. + +//------------------Definition of codecvt_impl--------------------------------// + +#if defined(BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION) || \ + defined(BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION) || \ + defined(BOOST_IOSTREAMS_NO_LOCALE) \ + /**/ + +namespace boost { namespace iostreams { namespace detail { + +template +struct codecvt_impl : std::locale::facet, std::codecvt_base { +public: + typedef Intern intern_type; + typedef Extern extern_type; + typedef State state_type; + + codecvt_impl(std::size_t refs = 0) : std::locale::facet(refs) { } + + std::codecvt_base::result + in( State& state, const Extern* first1, const Extern* last1, + const Extern*& next1, Intern* first2, Intern* last2, + Intern*& next2 ) const + { + return do_in(state, first1, last1, next1, first2, last2, next2); + } + + std::codecvt_base::result + out( State& state, const Intern* first1, const Intern* last1, + const Intern*& next1, Extern* first2, Extern* last2, + Extern*& next2 ) const + { + return do_out(state, first1, last1, next1, first2, last2, next2); + } + + std::codecvt_base::result + unshift(State& state, Extern* first2, Extern* last2, Extern*& next2) const + { + return do_unshift(state, first2, last2, next2); + } + + bool always_noconv() const throw() { return do_always_noconv(); } + + int max_length() const throw() { return do_max_length(); } + + int encoding() const throw() { return do_encoding(); } + + int length( BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER State& state, + const Extern* first1, const Extern* last1, + std::size_t len2 ) const throw() + { + return do_length(state, first1, last1, len2); + } +protected: + std::codecvt_base::result + virtual do_in( State&, const Extern*, const Extern*, const Extern*&, + Intern*, Intern*, Intern*& ) const + { + return std::codecvt_base::noconv; + } + + std::codecvt_base::result + virtual do_out( State&, const Intern*, const Intern*, const Intern*&, + Extern*, Extern*, Extern*& ) const + { + return std::codecvt_base::noconv; + } + + std::codecvt_base::result + virtual do_unshift(State&, Extern*, Extern*, Extern*&) const + { + return std::codecvt_base::ok; + } + + virtual bool do_always_noconv() const throw() { return true; } + + virtual int do_max_length() const throw() { return 1; } + + virtual int do_encoding() const throw() { return 1; } + + virtual int do_length( BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER State&, + const Extern* first1, const Extern* last1, + std::size_t len2 ) const throw() + { + return (std::min)(static_cast(last1 - first1), len2); + } +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // no primary codecvt definition, empty definition. + +//------------------Definition of BOOST_IOSTREAMS_CODECVT_SPEC----------------// + +#if defined(BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION) || \ + defined(BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION) \ + /**/ +# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# define BOOST_IOSTREAMS_CODECVT_SPEC(state) \ + namespace std { \ + template \ + class codecvt \ + : public ::boost::iostreams::detail::codecvt_impl< \ + Intern, Extern, state \ + > \ + { \ + public: \ + codecvt(std::size_t refs = 0) \ + : ::boost::iostreams::detail::codecvt_impl< \ + Intern, Extern, state \ + >(refs) \ + { } \ + static std::locale::id id; \ + }; \ + template \ + std::locale::id codecvt::id; \ + } \ + /**/ +# else +# define BOOST_IOSTREAMS_CODECVT_SPEC(state) \ + namespace std { \ + template<> \ + class codecvt \ + : public ::boost::iostreams::detail::codecvt_impl< \ + wchar_t, char, state \ + > \ + { \ + public: \ + codecvt(std::size_t refs = 0) \ + : ::boost::iostreams::detail::codecvt_impl< \ + wchar_t, char, state \ + >(refs) \ + { } \ + static std::locale::id id; \ + }; \ + template<> \ + std::locale::id codecvt::id; \ + } \ + /**/ +# endif +#else +# define BOOST_IOSTREAMS_CODECVT_SPEC(state) +#endif // no primary codecvt definition, or empty definition. + +namespace boost { namespace iostreams { namespace detail { + +//------------------Definition of codecvt_helper------------------------------// + +template +struct codecvt_helper : std::codecvt { + typedef Intern intern_type; + typedef Extern extern_type; + typedef State state_type; + codecvt_helper(std::size_t refs = 0) + #if !defined(BOOST_IOSTREAMS_NO_CODECVT_CTOR_FROM_SIZE_T) + : std::codecvt(refs) + #else + : std::codecvt() + #endif + { } +#ifdef BOOST_IOSTREAMS_NO_CODECVT_MAX_LENGTH + int max_length() const throw() { return do_max_length(); } +protected: + virtual int do_max_length() const throw() { return 1; } +#endif +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/codecvt_holder.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/codecvt_holder.hpp new file mode 100644 index 0000000000..6d6e1cf179 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/codecvt_holder.hpp @@ -0,0 +1,63 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains machinery for performing code conversion. + +#ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // mbstate_t. +#include // codecvt, locale. +#include // HAS_MACRO_USE_FACET. +#include + +namespace boost { namespace iostreams { namespace detail { + +struct default_codecvt { + typedef wchar_t intern_type, from_type; + typedef char extern_type, to_type; + typedef std::mbstate_t state_type; +}; + +template +struct codecvt_holder { + typedef Codecvt codecvt_type; + const codecvt_type& get() const { return codecvt_; } + void imbue(const std::locale&) { } + Codecvt codecvt_; +}; + +template<> +struct codecvt_holder { + typedef std::codecvt codecvt_type; + codecvt_holder() { reset_codecvt(); } + const codecvt_type& get() const { return *codecvt_; } + void imbue(const std::locale& loc) + { + loc_ = loc; + reset_codecvt(); + } + void reset_codecvt() + { + using namespace std; + #ifndef BOOST_HAS_MACRO_USE_FACET + codecvt_ = & use_facet< codecvt_type >(loc_); + #else + codecvt_ = & _USE(loc_, codecvt_type); + #endif + } + std::locale loc_; // Prevent codecvt_ from being freed. + const codecvt_type* codecvt_; +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/auto_link.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/auto_link.hpp new file mode 100644 index 0000000000..55f954b64f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/auto_link.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Adapted from and from +// http://www.boost.org/more/separate_compilation.html, by John Maddock. + +#ifndef BOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#if defined(BOOST_EXTERNAL_LIB_NAME) +# if defined(BOOST_MSVC) \ + || defined(__BORLANDC__) \ + || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ + || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \ + /**/ +# pragma comment(lib, BOOST_EXTERNAL_LIB_NAME) +# endif +# undef BOOST_EXTERNAL_LIB_NAME +#endif + +//------------------Enable automatic library variant selection----------------// + +#if !defined(BOOST_IOSTREAMS_SOURCE) && \ + !defined(BOOST_ALL_NO_LIB) && \ + !defined(BOOST_IOSTREAMS_NO_LIB) \ + /**/ + +// Set the name of our library, this will get undef'ed by auto_link.hpp +// once it's done with it. +# define BOOST_LIB_NAME boost_iostreams + +// If we're importing code from a dll, then tell auto_link.hpp about it. +# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK) +# define BOOST_DYN_LINK +# endif + +// And include the header that does the work. +# include +#endif // auto-linking disabled + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/bzip2.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/bzip2.hpp new file mode 100644 index 0000000000..d716fd169c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/bzip2.hpp @@ -0,0 +1,48 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Adapted from and from +// http://www.boost.org/more/separate_compilation.html, by John Maddock. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#if defined(BOOST_BZIP2_BINARY) +# if defined(BOOST_MSVC) || \ + defined(__BORLANDC__) || \ + (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \ + (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \ + /**/ + +// Specify the name of the .lib file. +# pragma comment(lib, BOOST_STRINGIZE(BOOST_BZIP2_BINARY)) +# endif +#else +# if !defined(BOOST_IOSTREAMS_SOURCE) && \ + !defined(BOOST_ALL_NO_LIB) && \ + !defined(BOOST_IOSTREAMS_NO_LIB) \ + /**/ + +// Set the name of our library, this will get undef'ed by auto_link.hpp +// once it's done with it. +# define BOOST_LIB_NAME boost_bzip2 + +// If we're importing code from a dll, then tell auto_link.hpp about it. +# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK) +# define BOOST_DYN_LINK +# endif + +// And include the header that does the work. +# include +# endif +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/codecvt.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/codecvt.hpp new file mode 100644 index 0000000000..7c6cb1f385 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/codecvt.hpp @@ -0,0 +1,80 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED + +#include +#include +#include +#include + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +//------------------Support for codecvt with user-defined state types---------// + +#if defined(__MSL_CPP__) || defined(__LIBCOMO__) || \ + BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \ + /**/ +# define BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION +#endif + +#if defined(__GLIBCPP__) || defined(__GLIBCXX__) || \ + BOOST_WORKAROUND(_STLPORT_VERSION, > 0x450) \ + /**/ +# define BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION +#endif + +//------------------Check for codecvt ctor taking a reference count-----------// + +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) || \ + BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461) \ + /**/ +# define BOOST_IOSTREAMS_NO_CODECVT_CTOR_FROM_SIZE_T +#endif + +//------------------Normalize codecvt::length---------------------------------// + +#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) && \ + (!defined(BOOST_RWSTD_VER) || BOOST_RWSTD_VER < 0x04010300) && \ + (!defined(__MACH__) || !defined(__INTEL_COMPILER)) + /**/ +# define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER const +#else +# define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER +#endif + +//------------------Check for codecvt::max_length-----------------------------// + +#if BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461) +# define BOOST_IOSTREAMS_NO_CODECVT_MAX_LENGTH +#endif + +//------------------Put mbstate_t and codecvt in std--------------------------// + +#ifndef BOOST_IOSTREAMS_NO_LOCALE +# include +#endif + +// From Robert Ramey's version of utf8_codecvt_facet. +namespace std { + +#if defined(__LIBCOMO__) + using ::mbstate_t; +#elif defined(BOOST_DINKUMWARE_STDLIB) && !defined(__BORLANDC__) + using ::mbstate_t; +#elif defined(__SGI_STL_PORT) +#elif defined(BOOST_NO_STDC_NAMESPACE) + using ::codecvt; + using ::mbstate_t; +#endif + +} // End namespace std. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/disable_warnings.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/disable_warnings.hpp new file mode 100644 index 0000000000..ef25cdb907 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/disable_warnings.hpp @@ -0,0 +1,30 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#include // BOOST_MSVC. +#include // BOOST_WORKAROUND. + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4127) // Conditional expression is constant. +# pragma warning(disable:4130) // Logical operation on address of string constant. +# pragma warning(disable:4224) // Parameter previously defined as type. +# pragma warning(disable:4244) // Conversion: possible loss of data. +# pragma warning(disable:4512) // Assignment operator could not be generated. +# pragma warning(disable:4706) // Assignment within conditional expression. +# if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(disable:6334) // sizeof applied to an expression with an operator. +# endif +#else +# if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# pragma warn -8008 // Condition always true/false. +# pragma warn -8066 // Unreachable code. +# pragma warn -8071 // Conversion may lose significant digits. +# pragma warn -8072 // Suspicious pointer arithmetic. +# pragma warn -8080 // identifier declared but never used. +# endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/dyn_link.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/dyn_link.hpp new file mode 100644 index 0000000000..518e0b03ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/dyn_link.hpp @@ -0,0 +1,37 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Adapted from http://www.boost.org/more/separate_compilation.html, by +// John Maddock. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include + +//------------------Enable dynamic linking on windows-------------------------// + +#ifdef BOOST_HAS_DECLSPEC +# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK) +# ifdef BOOST_IOSTREAMS_SOURCE +# define BOOST_IOSTREAMS_DECL __declspec(dllexport) +# else +# define BOOST_IOSTREAMS_DECL __declspec(dllimport) +# endif +# endif +#endif + +#ifndef BOOST_IOSTREAMS_DECL +# define BOOST_IOSTREAMS_DECL +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/enable_warnings.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/enable_warnings.hpp new file mode 100644 index 0000000000..5712f36442 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/enable_warnings.hpp @@ -0,0 +1,18 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#else +# if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# pragma warn .8008 // Condition always true/false. +# pragma warn .8066 // Unreachable code. +# pragma warn .8071 // Conversion may lose significant digits. +# pragma warn .8072 // Suspicious pointer arithmetic. +# pragma warn .8080 // identifier declared but never used. +# endif +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/fpos.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/fpos.hpp new file mode 100644 index 0000000000..811a8d66f6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/fpos.hpp @@ -0,0 +1,31 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + + * File: boost/iostreams/detail/execute.hpp + * Date: Thu Dec 06 13:21:54 MST 2007 + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Defines the preprocessor symbol BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS for + * platforms that use the implementation of std::fpos from the Dinkumware + * Standard Library. + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +# if (defined(_YVALS) || defined(_CPPLIB_VER)) && !defined(__SGI_STL_PORT) && \ + !defined(_STLPORT_VERSION) && !defined(__QNX__) + /**/ +# define BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS +# endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/gcc.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/gcc.hpp new file mode 100644 index 0000000000..e8512098ce --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/gcc.hpp @@ -0,0 +1,24 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Adapted from and from +// http://www.boost.org/more/separate_compilation.html, by John Maddock. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_INTEL. + +#if defined(__GNUC__) && !defined(BOOST_INTEL) +# define BOOST_IOSTREAMS_GCC (__GNUC__ * 100 + __GNUC_MINOR__) +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/limits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/limits.hpp new file mode 100644 index 0000000000..155d6b0a69 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/limits.hpp @@ -0,0 +1,19 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_LIMITS_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_LIMITS_HPP_INCLUDED + +#ifndef BOOST_IOSTREAMS_MAX_FORWARDING_ARITY +# define BOOST_IOSTREAMS_MAX_FORWARDING_ARITY 3 +#endif + +#ifndef BOOST_IOSTREAMS_MAX_EXECUTE_ARITY +# define BOOST_IOSTREAMS_MAX_EXECUTE_ARITY 5 +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_LIMITS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/overload_resolution.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/overload_resolution.hpp new file mode 100644 index 0000000000..bbdd442788 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/overload_resolution.hpp @@ -0,0 +1,32 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Adapted from and from +// http://www.boost.org/more/separate_compilation.html, by John Maddock. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC. +#include +#include + +#if !defined(BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION) +# if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) || \ + BOOST_WORKAROUND(__BORLANDC__, < 0x600) || \ + BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \ + BOOST_WORKAROUND(BOOST_IOSTREAMS_GCC, <= 295) \ + /**/ +# define BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION +# endif +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/rtl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/rtl.hpp new file mode 100644 index 0000000000..6995a50bbb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/rtl.hpp @@ -0,0 +1,72 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + * + * Defines preprocessor symbols expanding to the names of functions in the + * C runtime library used to access file descriptors and to the type used + * to store file offsets for seeking. + * + * File: boost/iostreams/detail/config/rtl.hpp + * Date: Wed Dec 26 11:58:11 MST 2007 + * + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED + +#include +#include + +// Handle open, close, read, and write +#ifdef __BORLANDC__ +# define BOOST_IOSTREAMS_RTL(x) BOOST_JOIN(_rtl_, x) +#elif defined BOOST_IOSTREAMS_WINDOWS +# define BOOST_IOSTREAMS_RTL(x) BOOST_JOIN(_, x) +#else +# define BOOST_IOSTREAMS_RTL(x) ::x // Distinguish from member function named x +#endif +#define BOOST_IOSTREAMS_FD_OPEN BOOST_IOSTREAMS_RTL(open) +#define BOOST_IOSTREAMS_FD_CLOSE BOOST_IOSTREAMS_RTL(close) +#define BOOST_IOSTREAMS_FD_READ BOOST_IOSTREAMS_RTL(read) +#define BOOST_IOSTREAMS_FD_WRITE BOOST_IOSTREAMS_RTL(write) + +// Handle lseek, off_t, ftruncate, and stat +#ifdef BOOST_IOSTREAMS_WINDOWS +# if defined(BOOST_MSVC) || defined(__MSVCRT__) // MSVC, MinGW +# define BOOST_IOSTREAMS_FD_SEEK _lseeki64 +# define BOOST_IOSTREAMS_FD_OFFSET __int64 +# else // Borland, Metrowerks, ... +# define BOOST_IOSTREAMS_FD_SEEK lseek +# define BOOST_IOSTREAMS_FD_OFFSET long +# endif +#else // Non-windows +# if defined(_LARGEFILE64_SOURCE) && \ + (!defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64) || \ + defined(_AIX) && !defined(_LARGE_FILES) || \ + defined(BOOST_IOSTREAMS_HAS_LARGE_FILE_EXTENSIONS) + /**/ + + /* Systems with transitional extensions for large file support */ + +# define BOOST_IOSTREAMS_FD_SEEK lseek64 +# define BOOST_IOSTREAMS_FD_TRUNCATE ftruncate64 +# define BOOST_IOSTREAMS_FD_MMAP mmap64 +# define BOOST_IOSTREAMS_FD_STAT stat64 +# define BOOST_IOSTREAMS_FD_FSTAT fstat64 +# define BOOST_IOSTREAMS_FD_OFFSET off64_t +# else +# define BOOST_IOSTREAMS_FD_SEEK lseek +# define BOOST_IOSTREAMS_FD_TRUNCATE ftruncate +# define BOOST_IOSTREAMS_FD_MMAP mmap +# define BOOST_IOSTREAMS_FD_STAT stat +# define BOOST_IOSTREAMS_FD_FSTAT fstat +# define BOOST_IOSTREAMS_FD_OFFSET off_t +# endif +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/unreachable_return.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/unreachable_return.hpp new file mode 100644 index 0000000000..9e40033e8d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/unreachable_return.hpp @@ -0,0 +1,25 @@ +// (C) Copyright 2010 Daniel James +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +// If Boost.Exception has BOOST_ATTRIBUTE_NORETURN +#if defined(_MSC_VER) || defined(__GNUC__) +#define BOOST_IOSTREAMS_UNREACHABLE_RETURN(x) \ + BOOST_UNREACHABLE_RETURN(x) +#else +#define BOOST_IOSTREAMS_UNREACHABLE_RETURN(x) \ + return x; +#endif + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/wide_streams.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/wide_streams.hpp new file mode 100644 index 0000000000..425875e1f8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/wide_streams.hpp @@ -0,0 +1,55 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Adapted from http://www.boost.org/more/separate_compilation.html, by +// John Maddock. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED + +#include +#include +#include + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +//------------------Templated stream support----------------------------------// + +// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for cray patch. +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# if defined(__STL_CONFIG_H) && \ + !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \ + /**/ +# define BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# endif +#endif // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES + +//------------------Wide stream support---------------------------------------// + +#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS +# if defined(BOOST_IOSTREAMS_NO_STREAM_TEMPLATES) || \ + defined (BOOST_NO_STD_WSTREAMBUF) && \ + ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \ + /**/ +# define BOOST_IOSTREAMS_NO_WIDE_STREAMS +# endif +#endif // #ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS + +//------------------Locale support--------------------------------------------// + +#ifndef BOOST_IOSTREAMS_NO_LOCALE +# if defined(BOOST_NO_STD_LOCALE) || \ + defined(__CYGWIN__) && \ + ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \ + /**/ +# define BOOST_IOSTREAMS_NO_LOCALE +# endif +#endif // #ifndef BOOST_IOSTREAMS_NO_LOCALE + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/windows_posix.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/windows_posix.hpp new file mode 100644 index 0000000000..4e73c50d0d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/windows_posix.hpp @@ -0,0 +1,25 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2004-2007 Jonathan Turkanis +// (C) Copyright 2002, 2003 Beman Dawes Boost.Filesystem +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_WINDOWS_POSIX_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_WINDOWS_POSIX_HPP_INCLUDED + +//------------------From boost/libs/filesystem/src/path_posix_windows.cpp-----// + +// BOOST_IOSTREAMS_POSIX or BOOST_IOSTREAMS_WINDOWS specify which API to use. +#if !defined( BOOST_IOSTREAMS_WINDOWS ) && !defined( BOOST_IOSTREAMS_POSIX ) +# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && \ + !defined(__CYGWIN__) \ + /**/ +# define BOOST_IOSTREAMS_WINDOWS +# else +# define BOOST_IOSTREAMS_POSIX +# endif +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_WINDOWS_POSIX_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/zlib.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/zlib.hpp new file mode 100644 index 0000000000..9283e4caa9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/config/zlib.hpp @@ -0,0 +1,50 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Adapted from and from +// http://www.boost.org/more/separate_compilation.html, by John Maddock. + +#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_STRINGIZE. + +#if defined(BOOST_ZLIB_BINARY) +# if defined(BOOST_MSVC) || \ + defined(__BORLANDC__) || \ + (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \ + (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \ + /**/ + +// Specify the name of the .lib file. +# pragma comment(lib, BOOST_STRINGIZE(BOOST_ZLIB_BINARY)) +# endif +#else +# if !defined(BOOST_IOSTREAMS_SOURCE) && \ + !defined(BOOST_ALL_NO_LIB) && \ + !defined(BOOST_IOSTREAMS_NO_LIB) \ + /**/ + +// Set the name of our library, this will get undef'ed by auto_link.hpp +// once it's done with it. +# define BOOST_LIB_NAME boost_zlib + +// If we're importing code from a dll, then tell auto_link.hpp about it. +# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK) +# define BOOST_DYN_LINK +# endif + +// And include the header that does the work. +# include +# endif +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/counted_array.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/counted_array.hpp new file mode 100644 index 0000000000..d37193e7ab --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/counted_array.hpp @@ -0,0 +1,64 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_COUNTED_ARRAY_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_COUNTED_ARRAY_HPP_INCLUDED + +#include // min. +#include +#include +#include // streamsize. + +namespace boost { namespace iostreams { namespace detail { + +template +class counted_array_source { +public: + typedef Ch char_type; + typedef source_tag category; + counted_array_source(const Ch* buf, std::streamsize size) + : buf_(buf), ptr_(0), end_(size) + { } + std::streamsize read(Ch* s, std::streamsize n) + { + std::streamsize result = (std::min)(n, end_ - ptr_); + BOOST_IOSTREAMS_CHAR_TRAITS(char_type)::copy + (s, buf_ + ptr_, result); + ptr_ += result; + return result; + } + std::streamsize count() const { return ptr_; } +private: + const Ch* buf_; + std::streamsize ptr_, end_; +}; + +template +struct counted_array_sink { +public: + typedef Ch char_type; + typedef sink_tag category; + counted_array_sink(Ch* buf, std::streamsize size) + : buf_(buf), ptr_(0), end_(size) + { } + std::streamsize write(const Ch* s, std::streamsize n) + { + std::streamsize result = (std::min)(n, end_ - ptr_); + BOOST_IOSTREAMS_CHAR_TRAITS(char_type)::copy + (buf_ + ptr_, s, result); + ptr_ += result; + return result; + } + std::streamsize count() const { return ptr_; } +private: + Ch* buf_; + std::streamsize ptr_, end_; +}; + +} } } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_COUNTED_ARRAY_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/current_directory.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/current_directory.hpp new file mode 100644 index 0000000000..374444c59f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/current_directory.hpp @@ -0,0 +1,65 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + + * File: boost/iostreams/detail/execute.hpp + * Date: Thu Dec 06 13:21:54 MST 2007 + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Defines the function boost::iostreams::detail::current_directory, used by + * boost::iostreams::detail::absolute_path. + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_CURRENT_DIRECTORY_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CURRENT_DIRECTORY_HPP_INCLUDED + +#include // make sure size_t is in std. +#include // size_t +#include +#include +#include +#include +#ifdef BOOST_IOSTREAMS_WINDOWS +# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +# include +#else +# include // sysconf. +#endif + +// Must come last. +#include + +namespace boost { namespace iostreams { namespace detail { + +// Returns the current working directory +inline std::string current_directory() +{ +#ifdef BOOST_IOSTREAMS_WINDOWS + DWORD length; + basic_buffer buf(MAX_PATH); + while (true) { + length = ::GetCurrentDirectoryA(buf.size(), buf.data()); + if (!length) + throw_system_failure("failed determining current directory"); + if (length < static_cast(buf.size())) + break; + buf.resize(buf.size() * 2); + } + return std::string(buf.data(), length); +#else // #ifdef BOOST_IOSTREAMS_WINDOWS + basic_buffer buf(pathconf(".", _PC_PATH_MAX)); + if (!getcwd(buf.data(), static_cast(buf.size()))) + throw_system_failure("failed determining current directory"); + return std::string(buf.data()); +#endif // #ifdef BOOST_IOSTREAMS_WINDOWS +} + +} } } // End namespaces detail, iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CURRENT_DIRECTORY_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/default_arg.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/default_arg.hpp new file mode 100644 index 0000000000..9364ca27fa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/default_arg.hpp @@ -0,0 +1,25 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# include +# define BOOST_IOSTREAMS_DEFAULT_ARG(arg) mpl::identity< arg >::type +#else +# define BOOST_IOSTREAMS_DEFAULT_ARG(arg) arg +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/dispatch.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/dispatch.hpp new file mode 100644 index 0000000000..b482e04319 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/dispatch.hpp @@ -0,0 +1,41 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_DEDUCED_TYPENAME. +#include +#include // category_of. +#include +#include + +namespace boost { namespace iostreams {namespace detail { + +template< typename T, typename Tag1, typename Tag2, + typename Tag3 = mpl::void_, typename Tag4 = mpl::void_, + typename Tag5 = mpl::void_, typename Tag6 = mpl::void_, + typename Category = + BOOST_DEDUCED_TYPENAME category_of::type > +struct dispatch + : iostreams::select< // Disambiguation for Tru64. + is_convertible, Tag1, + is_convertible, Tag2, + is_convertible, Tag3, + is_convertible, Tag4, + is_convertible, Tag5, + is_convertible, Tag6 + > + { }; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/double_object.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/double_object.hpp new file mode 100644 index 0000000000..69f6587753 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/double_object.hpp @@ -0,0 +1,114 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2004-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains the definition of the class template +// boost::iostreams::detail::double_object, which is similar to compressed pair +// except that both members of the pair have the same type, and +// compression occurs only if requested using a boolean template +// parameter. + +#ifndef BOOST_IOSTREAMS_DETAIL_DOUBLE_OBJECT_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_DOUBLE_OBJECT_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // swap. +#include +#include +#if BOOST_WORKAROUND(__MWERKS__, > 0x3003) +# include +#else +# include +#endif + +namespace boost { namespace iostreams { namespace detail { + +template +class single_object_holder { +public: +#if BOOST_WORKAROUND(__MWERKS__, > 0x3003) + typedef Metrowerks::call_traits traits_type; +#else + typedef boost::call_traits traits_type; +#endif + typedef typename traits_type::param_type param_type; + typedef typename traits_type::reference reference; + typedef typename traits_type::const_reference const_reference; + single_object_holder() { } + single_object_holder(param_type t) : first_(t) { } + reference first() { return first_; } + const_reference first() const { return first_; } + reference second() { return first_; } + const_reference second() const { return first_; } + void swap(single_object_holder& o) + { std::swap(first_, o.first_); } +private: + T first_; +}; + +template +struct double_object_holder { +public: +#if BOOST_WORKAROUND(__MWERKS__, > 0x3003) + typedef Metrowerks::call_traits traits_type; +#else + typedef boost::call_traits traits_type; +#endif + typedef typename traits_type::param_type param_type; + typedef typename traits_type::reference reference; + typedef typename traits_type::const_reference const_reference; + double_object_holder() { } + double_object_holder(param_type t1, param_type t2) + : first_(t1), second_(t2) { } + reference first() { return first_; } + const_reference first() const { return first_; } + reference second() { return second_; } + const_reference second() const { return second_; } + void swap(double_object_holder& d) + { + std::swap(first_, d.first_); + std::swap(second_, d.second_); + } +private: + T first_, second_; +}; + +template +class double_object + : public mpl::if_< + IsDouble, + double_object_holder, + single_object_holder + >::type +{ +private: + typedef typename + mpl::if_< + IsDouble, + double_object_holder, + single_object_holder + >::type base_type; +public: +#if BOOST_WORKAROUND(__MWERKS__, > 0x3003) + typedef Metrowerks::call_traits traits_type; +#else + typedef boost::call_traits traits_type; +#endif + typedef typename traits_type::param_type param_type; + typedef typename traits_type::reference reference; + typedef typename traits_type::const_reference const_reference; + double_object() : base_type() {} + double_object(param_type t1, param_type t2) + : base_type(t1, t2) { } + bool is_double() const { return IsDouble::value; } +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DOUBLE_OBJECT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/enable_if_stream.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/enable_if_stream.hpp new file mode 100644 index 0000000000..2cdd7068cb --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/enable_if_stream.hpp @@ -0,0 +1,32 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_ENABLE_IF_STREAM_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_ENABLE_IF_STREAM_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_NO_SFINAE. +#include +#include // is_std_io. + +#if !defined(BOOST_NO_SFINAE) && \ + !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) +# define BOOST_IOSTREAMS_ENABLE_IF_STREAM(T) \ + , typename boost::enable_if< boost::iostreams::is_std_io >::type* = 0 \ + /**/ +# define BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) \ + , typename boost::disable_if< boost::iostreams::is_std_io >::type* = 0 \ + /**/ +#else +# define BOOST_IOSTREAMS_ENABLE_IF_STREAM(T) +# define BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_ENABLE_IF_STREAM_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/error.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/error.hpp new file mode 100644 index 0000000000..57999d4ef5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/error.hpp @@ -0,0 +1,45 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // failure. + +namespace boost { namespace iostreams { namespace detail { + +inline BOOST_IOSTREAMS_FAILURE cant_read() +{ return BOOST_IOSTREAMS_FAILURE("no read access"); } + +inline BOOST_IOSTREAMS_FAILURE cant_write() +{ return BOOST_IOSTREAMS_FAILURE("no write access"); } + +inline BOOST_IOSTREAMS_FAILURE cant_seek() +{ return BOOST_IOSTREAMS_FAILURE("no random access"); } + +inline BOOST_IOSTREAMS_FAILURE bad_read() +{ return BOOST_IOSTREAMS_FAILURE("bad read"); } + +inline BOOST_IOSTREAMS_FAILURE bad_putback() +{ return BOOST_IOSTREAMS_FAILURE("putback buffer full"); } + +inline BOOST_IOSTREAMS_FAILURE bad_write() +{ return BOOST_IOSTREAMS_FAILURE("bad write"); } + +inline BOOST_IOSTREAMS_FAILURE write_area_exhausted() +{ return BOOST_IOSTREAMS_FAILURE("write area exhausted"); } + +inline BOOST_IOSTREAMS_FAILURE bad_seek() +{ return BOOST_IOSTREAMS_FAILURE("bad seek"); } + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/execute.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/execute.hpp new file mode 100644 index 0000000000..14d1a48f80 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/execute.hpp @@ -0,0 +1,135 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + + * File: boost/iostreams/detail/execute.hpp + * Date: Thu Dec 06 13:21:54 MST 2007 + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + + * Defines the overloaded function template + * boost::iostreams::detail::execute_all() and the function template + * boost::iostreams::detail::execute_foreach(). + * + * execute_all() invokes a primary operation and performs a sequence of cleanup + * operations, returning the result of the primary operation if no exceptions + * are thrown. If one of the operations throws an exception, performs the + * remaining operations and rethrows the initial exception. + * + * execute_foreach() is a variant of std::foreach which invokes a function + * object for each item in a sequence, catching all execptions and rethrowing + * the first caught exception after the function object has been invoked on each + * item. + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_EXECUTE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_EXECUTE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include // MAX_EXECUTE_ARITY +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +// Helper for class template execute_traits. +template +struct execute_traits_impl { + typedef Result result_type; + template + static Result execute(Op op) { return op(); } +}; + +// Specialization for void return. For simplicity, execute() returns int +// for operations returning void. This could be avoided with additional work. +template<> +struct execute_traits_impl { + typedef int result_type; + template + static int execute(Op op) { op(); return 0; } +}; + +// Deduces the result type of Op and allows uniform treatment of operations +// returning void and non-void. +template< typename Op, + typename Result = // VC6.5 workaround. + #if !defined(BOOST_NO_RESULT_OF) && \ + !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) + typename boost::result_of::type + #else + BOOST_DEDUCED_TYPENAME Op::result_type + #endif + > +struct execute_traits + : execute_traits_impl + { }; + +// Implementation with no cleanup operations. +template +typename execute_traits::result_type +execute_all(Op op) +{ + return execute_traits::execute(op); +} + +// Implementation with one or more cleanup operations +#define BOOST_PP_LOCAL_MACRO(n) \ + template \ + typename execute_traits::result_type \ + execute_all(Op op, BOOST_PP_ENUM_BINARY_PARAMS(n, C, c)) \ + { \ + typename execute_traits::result_type r; \ + try { \ + r = boost::iostreams::detail::execute_all( \ + op BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ + BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(n), c) \ + ); \ + } catch (...) { \ + try { \ + BOOST_PP_CAT(c, BOOST_PP_DEC(n))(); \ + } catch (...) { } \ + throw; \ + } \ + BOOST_PP_CAT(c, BOOST_PP_DEC(n))(); \ + return r; \ + } \ + /**/ + +#define BOOST_PP_LOCAL_LIMITS (1, BOOST_IOSTREAMS_MAX_EXECUTE_ARITY) +#include BOOST_PP_LOCAL_ITERATE() +#undef BOOST_PP_LOCAL_MACRO + +template +Op execute_foreach(InIt first, InIt last, Op op) +{ + if (first == last) + return op; + try { + op(*first); + } catch (...) { + try { + ++first; + boost::iostreams::detail::execute_foreach(first, last, op); + } catch (...) { } + throw; + } + ++first; + return boost::iostreams::detail::execute_foreach(first, last, op); +} + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_EXECUTE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/file_handle.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/file_handle.hpp new file mode 100644 index 0000000000..d797efb29a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/file_handle.hpp @@ -0,0 +1,32 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + * + * File: boost/iostreams/detail/file_handle.hpp + * Date: Sun Jun 22 14:23:12 MDT 2008 + * Copyright: 2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Defines the type boost::iostreams::detail::file_handle, representing an + * operating system file handle. + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_FILE_HANDLE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_FILE_HANDLE_HPP_INCLUDED + +#include + +namespace boost { namespace iostreams { namespace detail { + +#ifdef BOOST_IOSTREAMS_WINDOWS + typedef void* file_handle; // A.k.a. HANDLE +#else + typedef int file_handle; +#endif + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_FILE_HANDLE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/forward.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/forward.hpp new file mode 100644 index 0000000000..0ff2a35a98 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/forward.hpp @@ -0,0 +1,124 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_FORWARD_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_FORWARD_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC, BOOST_NO_SFINAE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//------Macros for defining forwarding constructors and open overloads--------// + +// +// Macro: BOOST_IOSTREAMS_FORWARD(class, impl, device, params, args) +// Description: Defines constructors and overloads of 'open' which construct +// a device using the specified argument list and pass it to the specified +// helper function +// class - The class name +// impl - The helper function +// device - The device type +// params - The list of formal parameters trailing the device parameter in +// the helper function's signature +// params - The list of arguments passed to the helper function, following the +// device argument +// +#define BOOST_IOSTREAMS_FORWARD(class, impl, device, params, args) \ + class(const device& t params()) \ + { this->impl(::boost::iostreams::detail::wrap(t) args()); } \ + class(device& t params()) \ + { this->impl(::boost::iostreams::detail::wrap(t) args()); } \ + class(const ::boost::reference_wrapper& ref params()) \ + { this->impl(ref args()); } \ + void open(const device& t params()) \ + { this->impl(::boost::iostreams::detail::wrap(t) args()); } \ + void open(device& t params()) \ + { this->impl(::boost::iostreams::detail::wrap(t) args()); } \ + void open(const ::boost::reference_wrapper& ref params()) \ + { this->impl(ref args()); } \ + BOOST_PP_REPEAT_FROM_TO( \ + 1, BOOST_PP_INC(BOOST_IOSTREAMS_MAX_FORWARDING_ARITY), \ + BOOST_IOSTREAMS_FORWARDING_CTOR, (class, impl, device) \ + ) \ + BOOST_PP_REPEAT_FROM_TO( \ + 1, BOOST_PP_INC(BOOST_IOSTREAMS_MAX_FORWARDING_ARITY), \ + BOOST_IOSTREAMS_FORWARDING_FN, (class, impl, device) \ + ) \ + /**/ +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple) \ + template< typename U100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ + BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), typename U) > \ + BOOST_PP_TUPLE_ELEM(3, 0, tuple) \ + ( U100& u100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ + BOOST_PP_ENUM_BINARY_PARAMS_Z(z, BOOST_PP_DEC(n), const U, &u) \ + BOOST_IOSTREAMS_DISABLE_IF_SAME(U100, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \ + { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \ + ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \ + ( u100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ + BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), u)) ); } \ + /**/ +# define BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple) \ + template< typename U100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ + BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), typename U) > \ + void open \ + ( U100& u100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ + BOOST_PP_ENUM_BINARY_PARAMS_Z(z, BOOST_PP_DEC(n), const U, &u) \ + BOOST_IOSTREAMS_DISABLE_IF_SAME(U100, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \ + { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \ + ( u100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ + BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), u) ); } \ + /**/ +#else +# define BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple) +# define BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple) +#endif +#define BOOST_IOSTREAMS_FORWARDING_CTOR(z, n, tuple) \ + template \ + BOOST_PP_TUPLE_ELEM(3, 0, tuple) \ + (BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \ + BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \ + { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \ + ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \ + (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \ + BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple) \ + /**/ +#define BOOST_IOSTREAMS_FORWARDING_FN(z, n, tuple) \ + template \ + void open(BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \ + BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \ + { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \ + ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \ + (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \ + BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple) \ + /**/ + +// Disable forwarding constructors if first parameter type is the same +// as the device type +#if !defined(BOOST_NO_SFINAE) && \ + !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) +# define BOOST_IOSTREAMS_DISABLE_IF_SAME(device, param) \ + , typename boost::disable_if< boost::is_same >::type* = 0 \ + /**/ +#else +# define BOOST_IOSTREAMS_DISABLE_IF_SAME(device, param) +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_FORWARD_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/fstream.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/fstream.hpp new file mode 100644 index 0000000000..b8070a7291 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/fstream.hpp @@ -0,0 +1,33 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_FSTREAM_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_FSTREAM_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# include +#else +# include +#endif + +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# define BOOST_IOSTREAMS_BASIC_IFSTREAM(Ch, Tr) std::basic_ifstream +# define BOOST_IOSTREAMS_BASIC_OFSTREAM(Ch, Tr) std::basic_ofstream +# define BOOST_IOSTREAMS_BASIC_FSTREAM(Ch, Tr) std::basic_fstream +# define BOOST_IOSTREAMS_BASIC_FILEBUF(Ch) std::basic_filebuf +#else +# define BOOST_IOSTREAMS_BASIC_IFSTREAM(Ch, Tr) std::ifstream +# define BOOST_IOSTREAMS_BASIC_OFSTREAM(Ch, Tr) std::ofstream +# define BOOST_IOSTREAMS_BASIC_FILEBUF(Ch) std::filebuf +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_FSTREAM_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/functional.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/functional.hpp new file mode 100644 index 0000000000..a7b9b6bbb1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/functional.hpp @@ -0,0 +1,189 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + + * File: boost/iostreams/detail/functional.hpp + * Date: Sun Dec 09 05:38:03 MST 2007 + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + + * Defines several function objects and object generators for use with + * execute_all() + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_FUNCTIONAL_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_FUNCTIONAL_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // BOOST_IOS + +namespace boost { namespace iostreams { namespace detail { + + // Function objects and object generators for invoking + // boost::iostreams::close + +template +class device_close_operation { +public: + typedef void result_type; + device_close_operation(T& t, BOOST_IOS::openmode which) + : t_(t), which_(which) + { } + void operator()() const { boost::iostreams::close(t_, which_); } +private: + device_close_operation& operator=(const device_close_operation&); + T& t_; + BOOST_IOS::openmode which_; +}; + +template +class filter_close_operation { +public: + typedef void result_type; + filter_close_operation(T& t, Sink& snk, BOOST_IOS::openmode which) + : t_(t), snk_(snk), which_(which) + { } + void operator()() const { boost::iostreams::close(t_, snk_, which_); } +private: + filter_close_operation& operator=(const filter_close_operation&); + T& t_; + Sink& snk_; + BOOST_IOS::openmode which_; +}; + +template +device_close_operation +call_close(T& t, BOOST_IOS::openmode which) +{ return device_close_operation(t, which); } + +template +filter_close_operation +call_close(T& t, Sink& snk, BOOST_IOS::openmode which) +{ return filter_close_operation(t, snk, which); } + + // Function objects and object generators for invoking + // boost::iostreams::detail::close_all + +template +class device_close_all_operation { +public: + typedef void result_type; + device_close_all_operation(T& t) : t_(t) { } + void operator()() const { detail::close_all(t_); } +private: + device_close_all_operation& operator=(const device_close_all_operation&); + T& t_; +}; + +template +class filter_close_all_operation { +public: + typedef void result_type; + filter_close_all_operation(T& t, Sink& snk) : t_(t), snk_(snk) { } + void operator()() const { detail::close_all(t_, snk_); } +private: + filter_close_all_operation& operator=(const filter_close_all_operation&); + T& t_; + Sink& snk_; +}; + +template +device_close_all_operation call_close_all(T& t) +{ return device_close_all_operation(t); } + +template +filter_close_all_operation +call_close_all(T& t, Sink& snk) +{ return filter_close_all_operation(t, snk); } + + // Function object and object generator for invoking a + // member function void close(std::ios_base::openmode) + +template +class member_close_operation { +public: + typedef void result_type; + member_close_operation(T& t, BOOST_IOS::openmode which) + : t_(t), which_(which) + { } + void operator()() const { t_.close(which_); } +private: + member_close_operation& operator=(const member_close_operation&); + T& t_; + BOOST_IOS::openmode which_; +}; + +template +member_close_operation call_member_close(T& t, BOOST_IOS::openmode which) +{ return member_close_operation(t, which); } + + // Function object and object generator for invoking a + // member function void reset() + +template +class reset_operation { +public: + reset_operation(T& t) : t_(t) { } + void operator()() const { t_.reset(); } +private: + reset_operation& operator=(const reset_operation&); + T& t_; +}; + +template +reset_operation call_reset(T& t) { return reset_operation(t); } + + // Function object and object generator for clearing a flag + +template +class clear_flags_operation { +public: + typedef void result_type; + clear_flags_operation(T& t) : t_(t) { } + void operator()() const { t_ = 0; } +private: + clear_flags_operation& operator=(const clear_flags_operation&); + T& t_; +}; + +template +clear_flags_operation clear_flags(T& t) +{ return clear_flags_operation(t); } + + // Function object and generator for flushing a buffer + +// Function object for use with execute_all() +template +class flush_buffer_operation { +public: + typedef void result_type; + flush_buffer_operation(Buffer& buf, Device& dev, bool flush) + : buf_(buf), dev_(dev), flush_(flush) + { } + void operator()() const + { + if (flush_) + buf_.flush(dev_); + } +private: + flush_buffer_operation& operator=(const flush_buffer_operation&); + Buffer& buf_; + Device& dev_; + bool flush_; +}; + +template +flush_buffer_operation +flush_buffer(Buffer& buf, Device& dev, bool flush) +{ return flush_buffer_operation(buf, dev, flush); } + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_FUNCTIONAL_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/ios.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/ios.hpp new file mode 100644 index 0000000000..4d34f8fdb0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/ios.hpp @@ -0,0 +1,66 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC. +#include +#include +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) +# include +# else +# include +# include +# endif +#else +# include +# include +#endif + +namespace boost { namespace iostreams { namespace detail { + +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------// +# define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::basic_ios< ch, tr > +# if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) && \ + !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \ + !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ + /**/ + +#define BOOST_IOS std::ios +#define BOOST_IOSTREAMS_FAILURE std::ios::failure + +# else + +#define BOOST_IOS std::ios_base +#define BOOST_IOSTREAMS_FAILURE std::ios_base::failure + +# endif +#else // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-----------------------// + +#define BOOST_IOS std::ios +#define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::ios +#define BOOST_IOSTREAMS_FAILURE boost::iostreams::detail::failure + +class failure : std::exception { +public: + explicit failure(const std::string& what_arg) : what_(what_arg) { } + const char* what() const { return what_.c_str(); } +private: + std::string what_; +}; + +#endif // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //----------------------// + +} } } // End namespace failure, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/iostream.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/iostream.hpp new file mode 100644 index 0000000000..45692b35a0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/iostream.hpp @@ -0,0 +1,34 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_IOSTREAM_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_IOSTREAM_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# include +# include +#else +# include +#endif + +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# define BOOST_IOSTREAMS_BASIC_ISTREAM(ch, tr) std::basic_istream< ch, tr > +# define BOOST_IOSTREAMS_BASIC_OSTREAM(ch, tr) std::basic_ostream< ch, tr > +# define BOOST_IOSTREAMS_BASIC_IOSTREAM(ch, tr) std::basic_iostream< ch, tr > +#else +# define BOOST_IOSTREAMS_BASIC_STREAMBUF(ch, tr) std::streambuf +# define BOOST_IOSTREAMS_BASIC_ISTREAM(ch, tr) std::istream +# define BOOST_IOSTREAMS_BASIC_OSTREAM(ch, tr) std::ostream +# define BOOST_IOSTREAMS_BASIC_IOSTREAM(ch, tr) std::iostream +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_IOSTREAM_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/is_dereferenceable.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/is_dereferenceable.hpp new file mode 100644 index 0000000000..89252a3547 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/is_dereferenceable.hpp @@ -0,0 +1,85 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// (C) Copyright David Abrahams 2004. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_IS_DEREFERENCEABLE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_IS_DEREFERENCEABLE_HPP_INCLUDED + +# include +# include +# include +# include +# include +# include + +namespace boost { namespace iostreams { namespace detail { + +// is_dereferenceable metafunction +// +// Requires: Given x of type T&, if the expression *x is well-formed +// it must have complete type; otherwise, it must neither be ambiguous +// nor violate access. + +// This namespace ensures that ADL doesn't mess things up. +namespace is_dereferenceable_ +{ + // a type returned from operator* when no increment is found in the + // type's own namespace + struct tag {}; + + // any soaks up implicit conversions and makes the following + // operator* less-preferred than any other such operator that + // might be found via ADL. + struct any { template any(T const&); }; + + // This is a last-resort operator* for when none other is found + tag operator*(any const&); + +# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_comma(a,b) (a) +# else + // In case an operator++ is found that returns void, we'll use ++x,0 + tag operator,(tag,int); +# define BOOST_comma(a,b) (a,b) +# endif + + // two check overloads help us identify which operator++ was picked + char (& check BOOST_PREVENT_MACRO_SUBSTITUTION(tag) )[2]; + + template + char check BOOST_PREVENT_MACRO_SUBSTITUTION(T const&); + + template + struct impl + { + static typename boost::remove_cv::type& x; + + BOOST_STATIC_CONSTANT( + bool + , value = sizeof(is_dereferenceable_::check BOOST_PREVENT_MACRO_SUBSTITUTION(BOOST_comma(*x,0))) == 1 + ); + }; +} + +# undef BOOST_comma + +template +struct is_dereferenceable + BOOST_TT_AUX_BOOL_C_BASE(is_dereferenceable_::impl::value) +{ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(is_dereferenceable_::impl::value) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_dereferenceable,(T)) +}; + +} } + +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::iostreams::detail::is_dereferenceable) + +} // End namespaces detail, iostreams, boost. + +#endif // BOOST_IOSTREAMS_DETAIL_IS_DEREFERENCEABLE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/is_iterator_range.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/is_iterator_range.hpp new file mode 100644 index 0000000000..ac61064022 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/is_iterator_range.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_IS_ITERATOR_RANGE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_IS_ITERATOR_RANGE_HPP_INCLUDED + +#include +#include +#include + +// Must come last. +#include + +namespace boost { + +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------// + +// We avoid dependence on Boost.Range by using a forward declaration. +template +class iterator_range; + +namespace iostreams { + +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_iterator_range, boost::iterator_range, 1) + +} // End namespace iostreams. + +# else // # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //-----------------------// + +namespace iostreams { + + template + struct is_iterator_range { + BOOST_STATIC_CONSTANT(bool, value = false); + }; + +} // End namespace iostreams. + +# endif // # if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) //----------------------// + +} // End namespace boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_IS_ITERATOR_RANGE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/newline.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/newline.hpp new file mode 100644 index 0000000000..41b5b5268d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/newline.hpp @@ -0,0 +1,32 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +namespace boost { namespace iostreams { namespace detail { + +template +struct newline; + +template<> +struct newline { + BOOST_STATIC_CONSTANT(char, value = '\n'); +}; + +template<> +struct newline { + BOOST_STATIC_CONSTANT(wchar_t, value = L'\n'); +}; + +} } } // End namespaces detaill, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/optional.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/optional.hpp new file mode 100644 index 0000000000..ee9ac3f3ea --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/optional.hpp @@ -0,0 +1,114 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Recent changes to Boost.Optional involving assigment broke Boost.Iostreams, +// in a way which could be remedied only by relying on the deprecated reset +// functions; with VC6, even reset didn't work. Until this problem is +// understood, Iostreams will use a private version of optional with a smart +// pointer interface. + +#ifndef BOOST_IOSTREAMS_DETAIL_OPTIONAL_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_OPTIONAL_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +// Taken from . +template +class aligned_storage +{ + // Borland ICEs if unnamed unions are used for this! + union dummy_u + { + char data[ sizeof(T) ]; + BOOST_DEDUCED_TYPENAME type_with_alignment< + ::boost::alignment_of::value >::type aligner_; + } dummy_ ; + + public: + + void const* address() const { return &dummy_.data[0]; } + void * address() { return &dummy_.data[0]; } +}; + +template +class optional { +public: + typedef T element_type; + optional() : initialized_(false) { } + optional(const T& t) : initialized_(false) { reset(t); } + ~optional() { reset(); } + T& operator*() + { + assert(initialized_); + return *static_cast(address()); + } + const T& operator*() const + { + assert(initialized_); + return *static_cast(address()); + } + T* operator->() + { + assert(initialized_); + return static_cast(address()); + } + const T* operator->() const + { + assert(initialized_); + return static_cast(address()); + } + T* get() + { + assert(initialized_); + return static_cast(address()); + } + const T* get() const + { + assert(initialized_); + return static_cast(address()); + } + void reset() + { + if (initialized_) { + #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \ + BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \ + /**/ + T* t = static_cast(address()); + t->~T(); + #else + static_cast(address())->T::~T(); + #endif + initialized_ = false; + } + } + void reset(const T& t) + { + reset(); + new (address()) T(t); + initialized_ = true; + } +private: + optional(const optional&); + optional& operator=(const optional&); + void* address() { return &storage_; } + const void* address() const { return &storage_; } + aligned_storage storage_; + bool initialized_; +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_OPTIONAL_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/param_type.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/param_type.hpp new file mode 100644 index 0000000000..c10f1d8bb2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/param_type.hpp @@ -0,0 +1,27 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +template +struct param_type { + typedef typename mpl::if_, T&, const T&>::type type; +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED //-----------// diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/path.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/path.hpp new file mode 100644 index 0000000000..a78e0c6be3 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/path.hpp @@ -0,0 +1,189 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + * + * File: boost/iostreams/detail/path.hpp + * Date: Sat Jun 21 21:24:05 MDT 2008 + * Copyright: 2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Defines the class boost::iostreams::detail::path, for storing a + * a std::string or std::wstring. + * + * This class allows interoperability with Boost.Filesystem without + * creating a dependence on Boost.Filesystem headers or implementation. + */ + +#ifndef BOOST_IOSTREAMS_DETAIL_PATH_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_PATH_HPP_INCLUDED + +#include +#include +#include +#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS +# include +#endif +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS //------------------------------------// + +class path { +public: + + // Default constructor + path() : narrow_(), wide_(), is_wide_(false) { } + + // Constructor taking a std::string + path(const std::string& p) : narrow_(p), wide_(), is_wide_(false) { } + + // Constructor taking a C-style string + path(const char* p) : narrow_(p), wide_(), is_wide_(false) { } + + // Constructor taking a boost::filesystem::path or boost::filesystem::wpath + template + explicit path(const Path& p, typename Path::external_string_type* = 0) + { + typedef typename Path::external_string_type string_type; + init(p, boost::type()); + } + + // Copy constructor + path(const path& p) + : narrow_(p.narrow_), wide_(p.wide_), is_wide_(p.is_wide_) + { } + + // Assignment operator taking another path + path& operator=(const path& p) + { + narrow_ = p.narrow_; + wide_ = p.wide_; + is_wide_ = p.is_wide_; + return *this; + } + + // Assignment operator taking a std::string + path& operator=(const std::string& p) + { + narrow_ = p; + wide_.clear(); + is_wide_ = false; + return *this; + } + + // Assignment operator taking a C-style string + path& operator=(const char* p) + { + narrow_.assign(p); + wide_.clear(); + is_wide_ = false; + return *this; + } + + // Assignment operator taking a Boost.Filesystem path + template + path& operator=(const Path& p) + { + typedef typename Path::external_string_type string_type; + init(p, boost::type()); + return *this; + } + + bool is_wide() const { return is_wide_; } + + // Returns a representation of the underlying path as a std::string + // Requires: is_wide() returns false + const char* c_str() const { return narrow_.c_str(); } + + // Returns a representation of the underlying path as a std::wstring + // Requires: is_wide() returns true + const wchar_t* c_wstr() const { return wide_.c_str(); } +private: + + // For wide-character paths, use a boost::filesystem::wpath instead of a + // std::wstring + path(const std::wstring&); + path& operator=(const std::wstring&); + + template + void init(const Path& p, boost::type) + { + narrow_ = p.external_file_string(); + wide_.clear(); + is_wide_ = false; + } + + template + void init(const Path& p, boost::type) + { + narrow_.clear(); + wide_ = p.external_file_string(); + is_wide_ = true; + } + + std::string narrow_; + std::wstring wide_; + bool is_wide_; +}; + +inline bool operator==(const path& lhs, const path& rhs) +{ + return lhs.is_wide() ? + rhs.is_wide() && std::wcscmp(lhs.c_wstr(), rhs.c_wstr()) == 0 : + !rhs.is_wide() && std::strcmp(lhs.c_str(), rhs.c_str()) == 0; +} + +#else // #ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS //---------------------------// + +class path { +public: + path() { } + path(const std::string& p) : path_(p) { } + path(const char* p) : path_(p) { } + template + path(const Path& p) : path_(p.external_file_string()) { } + path(const path& p) : path_(p.path_) { } + path& operator=(const path& other) + { + path_ = other.path_; + return *this; + } + path& operator=(const std::string& p) + { + path_ = p; + return *this; + } + path& operator=(const char* p) + { + path_ = p; + return *this; + } + template + path& operator=(const Path& p) + { + path_ = p.external_file_string(); + return *this; + } + bool is_wide() const { return false; } + const char* c_str() const { return path_.c_str(); } + const wchar_t* c_wstr() const { return 0; } +private: + std::string path_; +}; + +inline bool operator==(const path& lhs, const path& rhs) +{ + return std::strcmp(lhs.c_str(), rhs.c_str()) == 0 ; +} + +#endif // #ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS //--------------------------// + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_PATH_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/push.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/push.hpp new file mode 100644 index 0000000000..c1e7d9aa5e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/push.hpp @@ -0,0 +1,154 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_PUSH_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_PUSH_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// +// Macro: BOOST_IOSTREAMS_DEFINE_PUSH_CONSTRUCTOR(name, mode, ch, helper). +// Description: Defines overloads with name 'name' which forward to a function +// 'helper' which takes a filter or devide by const reference. +// +#define BOOST_IOSTREAMS_DEFINE_PUSH_CONSTRUCTOR(name, mode, ch, helper) \ + BOOST_IOSTREAMS_DEFINE_PUSH_IMPL(name, mode, ch, helper, 0, ?) \ + /**/ + +// +// Macro: BOOST_IOSTREAMS_DEFINE_PUSH(name, mode, ch, helper). +// Description: Defines constructors which forward to a function +// 'helper' which takes a filter or device by const reference. +// +#define BOOST_IOSTREAMS_DEFINE_PUSH(name, mode, ch, helper) \ + BOOST_IOSTREAMS_DEFINE_PUSH_IMPL(name, mode, ch, helper, 1, void) \ + /**/ + +//--------------------Definition of BOOST_IOSTREAMS_DEFINE_PUSH_IMPL----------// + +#define BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, arg, helper, has_return) \ + this->helper( ::boost::iostreams::detail::resolve(arg) \ + BOOST_IOSTREAMS_PUSH_ARGS() ); \ + /**/ + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \ + !BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + /**/ +# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# define BOOST_IOSTREAMS_DEFINE_PUSH_IMPL(name, mode, ch, helper, has_return, result) \ + template \ + BOOST_PP_IIF(has_return, result, explicit) \ + name(::std::basic_streambuf& sb BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, sb, helper, has_return); } \ + template \ + BOOST_PP_IIF(has_return, result, explicit) \ + name(::std::basic_istream& is BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_STATIC_ASSERT((!is_convertible::value)); \ + BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, is, helper, has_return); } \ + template \ + BOOST_PP_IIF(has_return, result, explicit) \ + name(::std::basic_ostream& os BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_STATIC_ASSERT((!is_convertible::value)); \ + BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, os, helper, has_return); } \ + template \ + BOOST_PP_IIF(has_return, result, explicit) \ + name(::std::basic_iostream& io BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, io, helper, has_return); } \ + template \ + BOOST_PP_IIF(has_return, result, explicit) \ + name(const iterator_range& rng BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_PP_EXPR_IF(has_return, return) \ + this->helper( ::boost::iostreams::detail::range_adapter< \ + mode, iterator_range \ + >(rng) \ + BOOST_IOSTREAMS_PUSH_ARGS() ); } \ + template \ + BOOST_PP_IIF(has_return, result, explicit) \ + name(const ::boost::iostreams::pipeline& p) \ + { p.push(*this); } \ + template \ + BOOST_PP_IIF(has_return, result, explicit) \ + name(const T& t BOOST_IOSTREAMS_PUSH_PARAMS() BOOST_IOSTREAMS_DISABLE_IF_STREAM(T)) \ + { this->helper( ::boost::iostreams::detail::resolve(t) \ + BOOST_IOSTREAMS_PUSH_ARGS() ); } \ + /**/ +# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# define BOOST_IOSTREAMS_DEFINE_PUSH_IMPL(name, mode, ch, helper, has_return, result) \ + BOOST_PP_IF(has_return, result, explicit) \ + name(::std::streambuf& sb BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, sb, helper, has_return); } \ + BOOST_PP_IF(has_return, result, explicit) \ + name(::std::istream& is BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_STATIC_ASSERT((!is_convertible::value)); \ + BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, is, helper, has_return); } \ + BOOST_PP_IF(has_return, result, explicit) \ + name(::std::ostream& os BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_STATIC_ASSERT((!is_convertible::value)); \ + BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, os, helper, has_return); } \ + BOOST_PP_IF(has_return, result, explicit) \ + name(::std::iostream& io BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_IOSTREAMS_ADAPT_STREAM(mode, ch, io, helper, has_return); } \ + template \ + BOOST_PP_IF(has_return, result, explicit) \ + name(const iterator_range& rng BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { BOOST_PP_EXPR_IF(has_return, return) \ + this->helper( ::boost::iostreams::detail::range_adapter< \ + mode, iterator_range \ + >(rng) \ + BOOST_IOSTREAMS_PUSH_ARGS() ); } \ + template \ + BOOST_PP_IF(has_return, result, explicit) \ + name(const ::boost::iostreams::pipeline& p) \ + { p.push(*this); } \ + template \ + BOOST_PP_EXPR_IF(has_return, result) \ + name(const T& t BOOST_IOSTREAMS_PUSH_PARAMS() BOOST_IOSTREAMS_DISABLE_IF_STREAM(T)) \ + { this->helper( ::boost::iostreams::detail::resolve(t) \ + BOOST_IOSTREAMS_PUSH_ARGS() ); } \ + /**/ +# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +#else // #if VC6, VC7.0, Borland 5.x +# define BOOST_IOSTREAMS_DEFINE_PUSH_IMPL(name, mode, ch, helper, has_return, result) \ + template \ + void BOOST_PP_CAT(name, _msvc_impl) \ + ( ::boost::mpl::true_, const T& t BOOST_IOSTREAMS_PUSH_PARAMS() ) \ + { t.push(*this); } \ + template \ + void BOOST_PP_CAT(name, _msvc_impl) \ + ( ::boost::mpl::false_, const T& t BOOST_IOSTREAMS_PUSH_PARAMS() ) \ + { this->helper( ::boost::iostreams::detail::resolve(t) \ + BOOST_IOSTREAMS_PUSH_ARGS() ); } \ + template \ + BOOST_PP_IF(has_return, result, explicit) \ + name(const T& t BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { \ + this->BOOST_PP_CAT(name, _msvc_impl) \ + ( ::boost::iostreams::detail::is_pipeline(), \ + t BOOST_IOSTREAMS_PUSH_ARGS() ); \ + } \ + /**/ +#endif // #if VC6, VC7.0, Borland 5.x + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_PUSH_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/push_params.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/push_params.hpp new file mode 100644 index 0000000000..7e80d09af1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/push_params.hpp @@ -0,0 +1,21 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_PUSH_PARAMS_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_PUSH_PARAMS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#define BOOST_IOSTREAMS_PUSH_PARAMS() \ + , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1 \ + /**/ + +#define BOOST_IOSTREAMS_PUSH_ARGS() , buffer_size, pback_size + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_PUSH_PARAMS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/resolve.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/resolve.hpp new file mode 100644 index 0000000000..fd1fbb6522 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/resolve.hpp @@ -0,0 +1,235 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // partial spec, put size_t in std. +#include // std::size_t. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // true_. +#include +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# include +#endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#include + +// Must come last. +#include // VC7.1 C4224. + +namespace boost { namespace iostreams { namespace detail { + +//------------------Definition of resolve-------------------------------------// + +#ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //-------------------------// + +template +struct resolve_traits { + typedef typename + mpl::if_< + boost::detail::is_incrementable, + output_iterator_adapter, + const T& + >::type type; +}; + +# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------------------// + +template +typename resolve_traits::type +resolve( const T& t + BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) + + // I suspect that the compilers which require this workaround may + // be correct, but I'm not sure why :( + #if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) ||\ + BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) || \ + BOOST_WORKAROUND(BOOST_IOSTREAMS_GCC, BOOST_TESTED_AT(400)) ||\ + BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(1110)) + /**/ + , typename disable_if< is_iterator_range >::type* = 0 + #endif + ) +{ + typedef typename resolve_traits::type return_type; + return return_type(t); +} + +template +mode_adapter< Mode, std::basic_streambuf > +resolve(std::basic_streambuf& sb) +{ return mode_adapter< Mode, std::basic_streambuf >(wrap(sb)); } + +template +mode_adapter< Mode, std::basic_istream > +resolve(std::basic_istream& is) +{ return mode_adapter< Mode, std::basic_istream >(wrap(is)); } + +template +mode_adapter< Mode, std::basic_ostream > +resolve(std::basic_ostream& os) +{ return mode_adapter< Mode, std::basic_ostream >(wrap(os)); } + +template +mode_adapter< Mode, std::basic_iostream > +resolve(std::basic_iostream& io) +{ return mode_adapter< Mode, std::basic_iostream >(wrap(io)); } + +template +array_adapter resolve(Ch (&array)[N]) +{ return array_adapter(array); } + +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + template + range_adapter< Mode, boost::iterator_range > + resolve(const boost::iterator_range& rng) + { return range_adapter< Mode, boost::iterator_range >(rng); } +# endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //---------------------// + +template +typename resolve_traits::type +resolve( const T& t + BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) + #if defined(__GNUC__) + , typename disable_if< is_iterator_range >::type* = 0 + #endif + ) +{ + typedef typename resolve_traits::type return_type; + return return_type(t); +} + +template +mode_adapter +resolve(std::streambuf& sb) +{ return mode_adapter(wrap(sb)); } + +template +mode_adapter +resolve(std::istream& is) +{ return mode_adapter(wrap(is)); } + +template +mode_adapter +resolve(std::ostream& os) +{ return mode_adapter(wrap(os)); } + +template +mode_adapter +resolve(std::iostream& io) +{ return mode_adapter(wrap(io)); } + +template +array_adapter resolve(Ch (&array)[N]) +{ return array_adapter(array); } + +template +range_adapter< Mode, boost::iterator_range > +resolve(const boost::iterator_range& rng) +{ return range_adapter< Mode, boost::iterator_range >(rng); } + +# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------// +#else // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //----------------// + +template +struct resolve_traits { + // Note: test for is_iterator_range must come before test for output + // iterator. + typedef typename + iostreams::select< // Disambiguation for Tru64. + is_std_io, + mode_adapter, + is_iterator_range, + range_adapter, + is_dereferenceable, + output_iterator_adapter, + is_array, + array_adapter, + else_, + #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) + const T& + #else + T + #endif + >::type type; +}; + +template +typename resolve_traits::type +resolve(const T& t, mpl::true_) +{ // Bad overload resolution. + typedef typename resolve_traits::type return_type; + return return_type(wrap(const_cast(t))); +} + +template +typename resolve_traits::type +resolve(const T& t, mpl::false_) +{ + typedef typename resolve_traits::type return_type; + return return_type(t); +} + +template +typename resolve_traits::type +resolve(const T& t BOOST_IOSTREAMS_DISABLE_IF_STREAM(T)) +{ return resolve(t, is_std_io()); } + +# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \ + !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \ + !defined(__GNUC__) // ---------------------------------------------------// + +template +typename resolve_traits::type +resolve(T& t, mpl::true_) +{ + typedef typename resolve_traits::type return_type; + return return_type(wrap(t)); +} + +template +typename resolve_traits::type +resolve(T& t, mpl::false_) +{ + typedef typename resolve_traits::type return_type; + return return_type(t); +} + +template +typename resolve_traits::type +resolve(T& t BOOST_IOSTREAMS_ENABLE_IF_STREAM(T)) +{ return resolve(t, is_std_io()); } + +# endif // Borland 5.x, VC6-7.0 or GCC 2.9x //--------------------------------// +#endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------// + +} } } // End namespaces detail, iostreams, boost. + +#include // VC7.1 4224. + +#endif // BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/restrict_impl.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/restrict_impl.hpp new file mode 100644 index 0000000000..3175bf1f2a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/restrict_impl.hpp @@ -0,0 +1,482 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + + * File: boost/iostreams/detail/restrict_impl.hpp + * Date: Sun Jan 06 12:57:30 MST 2008 + * Copyright: 2007-2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * If included with the macro BOOST_IOSTREAMS_RESTRICT undefined, defines the + * class template boost::iostreams::restriction. If included with the macro + * BOOST_IOSTREAMS_RESTRICT defined as an identifier, defines the overloaded + * function template boost::iostreams::BOOST_IOSTREAMS_RESTRICT, and object + * generator for boost::iostreams::restriction. + * + * This design allows and + * to share an implementation. + */ + +#if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) && \ + !defined(BOOST_IOSTREAMS_RESTRICT) +# define BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED + +//------------------Implementation of restriction-----------------------------// + +# include // min. +# include // pair. +# include // intmax_t. +# include // DEDUCED_TYPENAME. +# include +# include +# include +# include +# include +# include +# include +# include // failure. +# include +# include +# include +# include // mode_of, is_direct. +# include +# include +# include +# include + +# include + +namespace boost { namespace iostreams { + +namespace detail { + +// +// Template name: restricted_indirect_device. +// Description: Provides an restricted view of an indirect Device. +// Template paramters: +// Device - An indirect model of Device that models either Source or +// SeekableDevice. +// +template +class restricted_indirect_device : public device_adapter { +private: + typedef typename detail::param_type::type param_type; +public: + typedef typename char_type_of::type char_type; + typedef typename mode_of::type mode; + BOOST_STATIC_ASSERT(!(is_convertible::value)); + struct category + : mode, + device_tag, + closable_tag, + flushable_tag, + localizable_tag, + optimally_buffered_tag + { }; + restricted_indirect_device( param_type dev, stream_offset off, + stream_offset len = -1 ); + std::streamsize read(char_type* s, std::streamsize n); + std::streamsize write(const char_type* s, std::streamsize n); + std::streampos seek(stream_offset off, BOOST_IOS::seekdir way); +private: + stream_offset beg_, pos_, end_; +}; + +// +// Template name: restricted_direct_device. +// Description: Provides an restricted view of a Direct Device. +// Template paramters: +// Device - A model of Direct and Device. +// +template +class restricted_direct_device : public device_adapter { +public: + typedef typename char_type_of::type char_type; + typedef std::pair pair_type; + typedef typename mode_of::type mode; + BOOST_STATIC_ASSERT(!(is_convertible::value)); + struct category + : mode_of::type, + device_tag, + direct_tag, + closable_tag, + localizable_tag + { }; + restricted_direct_device( const Device& dev, stream_offset off, + stream_offset len = -1 ); + pair_type input_sequence(); + pair_type output_sequence(); +private: + pair_type sequence(mpl::true_); + pair_type sequence(mpl::false_); + char_type *beg_, *end_; +}; + +// +// Template name: restricted_filter. +// Description: Provides an restricted view of a Filter. +// Template paramters: +// Filter - An indirect model of Filter. +// +template +class restricted_filter : public filter_adapter { +public: + typedef typename char_type_of::type char_type; + typedef typename mode_of::type mode; + BOOST_STATIC_ASSERT(!(is_convertible::value)); + struct category + : mode, + filter_tag, + multichar_tag, + closable_tag, + localizable_tag, + optimally_buffered_tag + { }; + restricted_filter( const Filter& flt, stream_offset off, + stream_offset len = -1 ); + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + using namespace std; + if (!open_) + open(src, BOOST_IOS::in); + std::streamsize amt = + end_ != -1 ? + (std::min) (n, static_cast(end_ - pos_)) : + n; + std::streamsize result = + iostreams::read(this->component(), src, s, amt); + if (result != -1) + pos_ += result; + return result; + } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { + if (!open_) + open(snk, BOOST_IOS::out); + if (end_ != -1 && pos_ + n >= end_) { + if(pos_ < end_) + pos_ += iostreams::write(this->component(), + snk, s, end_ - pos_); + boost::throw_exception(bad_write()); + } + std::streamsize result = + iostreams::write(this->component(), snk, s, n); + pos_ += result; + return result; + } + + template + std::streampos seek(Device& dev, stream_offset off, BOOST_IOS::seekdir way) + { + stream_offset next; + if (way == BOOST_IOS::beg) { + next = beg_ + off; + } else if (way == BOOST_IOS::cur) { + next = pos_ + off; + } else if (end_ != -1) { + next = end_ + off; + } else { + // Restriction is half-open; seek relative to the actual end. + pos_ = this->component().seek(dev, off, BOOST_IOS::end); + if (pos_ < beg_) + boost::throw_exception(bad_seek()); + return offset_to_position(pos_ - beg_); + } + if (next < beg_ || (end_ != -1 && next >= end_)) + boost::throw_exception(bad_seek()); + pos_ = this->component().seek(dev, next, BOOST_IOS::cur); + return offset_to_position(pos_ - beg_); + } + + template + void close(Device& dev) + { + open_ = false; + detail::close_all(this->component(), dev); + } + + template + void close(Device& dev, BOOST_IOS::openmode which) + { + open_ = false; + iostreams::close(this->component(), dev, which); + } +private: + template + void open(Device& dev, BOOST_IOS::openmode which) + { + typedef typename is_convertible::type is_dual_use; + open_ = true; + which = is_dual_use() ? which : (BOOST_IOS::in | BOOST_IOS::out); + iostreams::skip(this->component(), dev, beg_, which); + } + + stream_offset beg_, pos_, end_; + bool open_; +}; + +template +struct restriction_traits + : iostreams::select< // Disambiguation for Tru64. + is_filter, restricted_filter, + is_direct, restricted_direct_device, + else_, restricted_indirect_device + > + { }; + +} // End namespace detail. + +template +struct restriction : public detail::restriction_traits::type { + typedef typename detail::param_type::type param_type; + typedef typename detail::restriction_traits::type base_type; + restriction(param_type t, stream_offset off, stream_offset len = -1) + : base_type(t, off, len) + { } +}; + +namespace detail { + +//--------------Implementation of restricted_indirect_device------------------// + +template +restricted_indirect_device::restricted_indirect_device + (param_type dev, stream_offset off, stream_offset len) + : device_adapter(dev), beg_(off), pos_(off), + end_(len != -1 ? off + len : -1) +{ + if (len < -1 || off < 0) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset")); + iostreams::skip(this->component(), off); +} + +template +inline std::streamsize restricted_indirect_device::read + (char_type* s, std::streamsize n) +{ + using namespace std; + std::streamsize amt = + end_ != -1 ? + (std::min) (n, static_cast(end_ - pos_)) : + n; + std::streamsize result = iostreams::read(this->component(), s, amt); + if (result != -1) + pos_ += result; + return result; +} + +template +inline std::streamsize restricted_indirect_device::write + (const char_type* s, std::streamsize n) +{ + if (end_ != -1 && pos_ + n >= end_) { + if(pos_ < end_) + pos_ += iostreams::write(this->component(), s, end_ - pos_); + boost::throw_exception(bad_write()); + } + std::streamsize result = iostreams::write(this->component(), s, n); + pos_ += result; + return result; +} + +template +std::streampos restricted_indirect_device::seek + (stream_offset off, BOOST_IOS::seekdir way) +{ + stream_offset next; + if (way == BOOST_IOS::beg) { + next = beg_ + off; + } else if (way == BOOST_IOS::cur) { + next = pos_ + off; + } else if (end_ != -1) { + next = end_ + off; + } else { + // Restriction is half-open; seek relative to the actual end. + pos_ = iostreams::seek(this->component(), off, BOOST_IOS::end); + if (pos_ < beg_) + boost::throw_exception(bad_seek()); + return offset_to_position(pos_ - beg_); + } + if (next < beg_ || (end_ != -1 && next > end_)) + boost::throw_exception(bad_seek()); + pos_ = iostreams::seek(this->component(), next - pos_, BOOST_IOS::cur); + return offset_to_position(pos_ - beg_); +} + +//--------------Implementation of restricted_direct_device--------------------// + +template +restricted_direct_device::restricted_direct_device + (const Device& dev, stream_offset off, stream_offset len) + : device_adapter(dev), beg_(0), end_(0) +{ + std::pair seq = + sequence(is_convertible()); + if ( off < 0 || len < -1 || + (len != -1 && off + len > seq.second - seq.first) ) + { + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset")); + } + beg_ = seq.first + off; + end_ = len != -1 ? + seq.first + off + len : + seq.second; +} + +template +typename restricted_direct_device::pair_type +restricted_direct_device::input_sequence() +{ + BOOST_STATIC_ASSERT((is_convertible::value)); + return std::make_pair(beg_, end_); +} + +template +typename restricted_direct_device::pair_type +restricted_direct_device::output_sequence() +{ + BOOST_STATIC_ASSERT((is_convertible::value)); + return std::make_pair(beg_, end_); +} + +template +typename restricted_direct_device::pair_type +restricted_direct_device::sequence(mpl::true_) +{ return iostreams::input_sequence(this->component()); } + +template +typename restricted_direct_device::pair_type +restricted_direct_device::sequence(mpl::false_) +{ return iostreams::output_sequence(this->component()); } + +//--------------Implementation of restricted_filter---------------------------// + +template +restricted_filter::restricted_filter + (const Filter& flt, stream_offset off, stream_offset len) + : filter_adapter(flt), beg_(off), + pos_(off), end_(len != -1 ? off + len : -1), open_(false) +{ + if (len < -1 || off < 0) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset")); +} + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#elif defined(BOOST_IOSTREAMS_RESTRICT) + +namespace boost { namespace iostreams { + +//--------------Implementation of restrict/slice------------------------------// + +// Note: The following workarounds are patterned after resolve.hpp. It has not +// yet been confirmed that they are necessary. + +# ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //------------------------// +# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //------------------------------// + +template +restriction +BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1 + BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) ) +{ return restriction(t, off, len); } + +template +restriction< std::basic_streambuf > +BOOST_IOSTREAMS_RESTRICT( std::basic_streambuf& sb, stream_offset off, + stream_offset len = -1 ) +{ return restriction< std::basic_streambuf >(sb, off, len); } + +template +restriction< std::basic_istream > +BOOST_IOSTREAMS_RESTRICT + (std::basic_istream& is, stream_offset off, stream_offset len = -1) +{ return restriction< std::basic_istream >(is, off, len); } + +template +restriction< std::basic_ostream > +BOOST_IOSTREAMS_RESTRICT + (std::basic_ostream& os, stream_offset off, stream_offset len = -1) +{ return restriction< std::basic_ostream >(os, off, len); } + +template +restriction< std::basic_iostream > +BOOST_IOSTREAMS_RESTRICT + (std::basic_iostream& io, stream_offset off, stream_offset len = -1) +{ return restriction< std::basic_iostream >(io, off, len); } + +# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------// + +template +restriction +BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1 + BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) ) +{ return restriction(t, off, len); } + +restriction +BOOST_IOSTREAMS_RESTRICT + (std::streambuf& sb, stream_offset off, stream_offset len = -1) +{ return restriction(sb, off, len); } + +restriction +BOOST_IOSTREAMS_RESTRICT + (std::istream& is, stream_offset off, stream_offset len = -1) +{ return restriction(is, off, len); } + +restriction +BOOST_IOSTREAMS_RESTRICT + (std::ostream& os, stream_offset off, stream_offset len = -1) +{ return restriction(os, off, len); } + +restriction +BOOST_IOSTREAMS_RESTRICT + (std::iostream& io, stream_offset off, stream_offset len = -1) +{ return restriction(io, off, len); } + +# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------// +# else // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------// + +template +restriction +BOOST_IOSTREAMS_RESTRICT + (const T& t, stream_offset off, stream_offset len, mpl::true_) +{ // Bad overload resolution. + return restriction(const_cast(t, off, len)); +} + +template +restriction +BOOST_IOSTREAMS_RESTRICT + (const T& t, stream_offset off, stream_offset len, mpl::false_) +{ return restriction(t, off, len); } + +template +restriction +BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1 + BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) ) +{ return BOOST_IOSTREAMS_RESTRICT(t, off, len, is_std_io()); } + +# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \ + !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \ + !defined(__GNUC__) // ---------------------------------------------------// + +template +restriction +BOOST_IOSTREAMS_RESTRICT(T& t, stream_offset off, stream_offset len = -1) +{ return restriction(t, off, len); } + +# endif // Borland 5.x, VC6-7.0 or GCC 2.9x //-------------------------------// +# endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //--------------// + +} } // End namespaces iostreams, boost. + +#endif // #if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) ... diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/select.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/select.hpp new file mode 100644 index 0000000000..bfe1d09dea --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/select.hpp @@ -0,0 +1,86 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains the metafunction select, which mimics the effect of a chain of +// nested mpl if_'s. +// +// ----------------------------------------------------------------------------- +// +// Usage: +// +// typedef typename select< +// case1, type1, +// case2, type2, +// ... +// true_, typen +// >::type selection; +// +// Here case1, case2, ... are models of MPL::IntegralConstant with value type +// bool, and n <= 12. + +#ifndef BOOST_IOSTREAMS_SELECT_HPP_INCLUDED +#define BOOST_IOSTREAMS_SELECT_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { + +typedef mpl::true_ else_; + +template< typename Case1 = mpl::true_, + typename Type1 = mpl::void_, + typename Case2 = mpl::true_, + typename Type2 = mpl::void_, + typename Case3 = mpl::true_, + typename Type3 = mpl::void_, + typename Case4 = mpl::true_, + typename Type4 = mpl::void_, + typename Case5 = mpl::true_, + typename Type5 = mpl::void_, + typename Case6 = mpl::true_, + typename Type6 = mpl::void_, + typename Case7 = mpl::true_, + typename Type7 = mpl::void_, + typename Case8 = mpl::true_, + typename Type8 = mpl::void_, + typename Case9 = mpl::true_, + typename Type9 = mpl::void_, + typename Case10 = mpl::true_, + typename Type10 = mpl::void_, + typename Case11 = mpl::true_, + typename Type11 = mpl::void_, + typename Case12 = mpl::true_, + typename Type12 = mpl::void_ > +struct select { + typedef typename + mpl::eval_if< + Case1, mpl::identity, mpl::eval_if< + Case2, mpl::identity, mpl::eval_if< + Case3, mpl::identity, mpl::eval_if< + Case4, mpl::identity, mpl::eval_if< + Case5, mpl::identity, mpl::eval_if< + Case6, mpl::identity, mpl::eval_if< + Case7, mpl::identity, mpl::eval_if< + Case8, mpl::identity, mpl::eval_if< + Case9, mpl::identity, mpl::eval_if< + Case10, mpl::identity, mpl::eval_if< + Case11, mpl::identity, mpl::if_< + Case12, Type12, mpl::void_ > > > > > > > > > > > + >::type type; +}; + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_SELECT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/select_by_size.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/select_by_size.hpp new file mode 100644 index 0000000000..72934e5a92 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/select_by_size.hpp @@ -0,0 +1,160 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2004-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// +// Intended as an alternative to type_traits::yes_type and type_traits::no_type. +// Provides an arbitrary number of types (case_<0>, case_<1>, ...) for +// determining the results of overload resultion using 'sizeof', plus a uniform +// means of using the result. yes_type and no_type are typedefs for case_<1> +// and case_<0>. A single case with negative argument, case_<-1>, is also +// provided, for convenience. +// +// This header may be included any number of times, with +// BOOST_SELECT_BY_SIZE_MAX_CASE defined to be the largest N such that case_ +// is needed for a particular application. It defaults to 20. +// +// This header depends only on Boost.Config and Boost.Preprocessor. Dependence +// on Type Traits or MPL was intentionally avoided, to leave open the +// possibility that select_by_size could be used by these libraries. +// +// Example usage: +// +// #define BOOST_SELECT_BY_SIZE_MAX_CASE 7 // (Needed when default was 2) +// #include +// +// using namespace boost::utility; +// +// case_<0> helper(bool); +// case_<1> helper(int); +// case_<2> helper(unsigned); +// case_<3> helper(long); +// case_<4> helper(unsigned long); +// case_<5> helper(float); +// case_<6> helper(double); +// case_<7> helper(const char*); +// +// struct test { +// static const int value = +// select_by_size< sizeof(helper(9876UL)) >::value; +// BOOST_STATIC_ASSERT(value == 4); +// }; +// +// For compilers with integral constant expression problems, e.g. Borland 5.x, +// one can also write +// +// struct test { +// BOOST_SELECT_BY_SIZE(int, value, helper(9876UL)); +// }; +// +// to define a static integral constant 'value' equal to +// +// select_by_size< sizeof(helper(9876UL)) >::value. +// + +// Include guards surround all contents of this header except for explicit +// specializations of select_by_size for case_ with N > 2. + +#ifndef BOOST_IOSTREAMS_DETAIL_SELECT_BY_SIZE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_SELECT_BY_SIZE_HPP_INCLUDED + +// The lowest N for which select_by_size< sizeof(case_) > has not been +// specialized. +#define SELECT_BY_SIZE_MAX_SPECIALIZED 20 + +#include // BOOST_STATIC_CONSTANT. +#include +#include + +/* Alternative implementation using max_align. + +#include +#include + +namespace boost { namespace utility { + +template +struct case_ { char c[(N + 1) * alignment_of::value]; }; + +template +struct select_by_size { + BOOST_STATIC_CONSTANT(int, value = + (Size / alignment_of::value - 1)); +}; + +} } // End namespaces utility, boost. + +*/ // End alternate implementation. + +namespace boost { namespace iostreams { namespace detail { + +//--------------Definition of case_-------------------------------------------// + +template struct case_ { char c1; case_ c2; }; +template<> struct case_<-1> { char c; }; +typedef case_ yes_type; +typedef case_ no_type; + +//--------------Declaration of select_by_size---------------------------------// + +template struct select_by_size; + +} } } // End namespaces detail, iostreams, boost. + +//--------------Definition of SELECT_BY_SIZE_SPEC-----------------------------// + +// Sepecializes select_by_size for sizeof(case). The decrement is used +// here because the preprocessor library doesn't handle negative integers. +#define SELECT_BY_SIZE_SPEC(n) \ + namespace boost { namespace iostreams { namespace detail { \ + static const int BOOST_PP_CAT(sizeof_case_, n) = sizeof(case_); \ + template<> \ + struct select_by_size< BOOST_PP_CAT(sizeof_case_, n) > { \ + struct type { BOOST_STATIC_CONSTANT(int, value = n - 1); }; \ + BOOST_STATIC_CONSTANT(int, value = type::value); \ + }; \ + } } } \ + /**/ + +//--------------Default specializations of select_by_size---------------------// + +#define BOOST_PP_LOCAL_MACRO(n) SELECT_BY_SIZE_SPEC(n) +#define BOOST_PP_LOCAL_LIMITS (0, 20) +#include BOOST_PP_LOCAL_ITERATE() +#undef BOOST_PP_LOCAL_MACRO + +//--------------Definition of SELECT_BY_SIZE----------------------------------// + +#define BOOST_SELECT_BY_SIZE(type_, name, expr) \ + BOOST_STATIC_CONSTANT( \ + unsigned, \ + BOOST_PP_CAT(boost_select_by_size_temp_, name) = sizeof(expr) \ + ); \ + BOOST_STATIC_CONSTANT( \ + type_, \ + name = \ + ( ::boost::iostreams::detail::select_by_size< \ + BOOST_PP_CAT(boost_select_by_size_temp_, name) \ + >::value ) \ + ) \ + /**/ + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_SELECT_BY_SIZE_HPP_INCLUDED + +//----------Specializations of SELECT_BY_SIZE (outside main inclued guards)---// + +#if BOOST_SELECT_BY_SIZE_MAX_CASE > SELECT_BY_SIZE_MAX_SPECIALIZED + +#define BOOST_PP_LOCAL_MACRO(n) SELECT_BY_SIZE_SPEC(n) +#define BOOST_PP_LOCAL_LIMITS \ + (SELECT_BY_SIZE_MAX_SPECIALIZED, BOOST_SELECT_BY_SIZE_MAX_CASE) \ + /**/ +#include BOOST_PP_LOCAL_ITERATE() +#undef BOOST_PP_LOCAL_MACRO +#undef SELECT_BY_SIZE_MAX_SPECIALIZED +#define SELECT_BY_SIZE_MAX_SPECIALIZED BOOST_SELECT_BY_SIZE_MAX_CASE + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf.hpp new file mode 100644 index 0000000000..49a48ce38f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf.hpp @@ -0,0 +1,34 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_STREAMBUF_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_STREAMBUF_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# include +#else +# include +#endif + +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES +# define BOOST_IOSTREAMS_BASIC_STREAMBUF(ch, tr) std::basic_streambuf< ch, tr > +# define BOOST_IOSTREAMS_PUBSYNC pubsync +# define BOOST_IOSTREAMS_PUBSEEKOFF pubseekoff +# define BOOST_IOSTREAMS_PUBSEEKPOS pubseekpos +#else +# define BOOST_IOSTREAMS_BASIC_STREAMBUF(ch, tr) std::streambuf +# define BOOST_IOSTREAMS_PUBSYNC sync +# define BOOST_IOSTREAMS_PUBSEEKOFF seekoff +# define BOOST_IOSTREAMS_PUBSEEKPOS seekpos +#endif + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_STREAMBUF_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/chainbuf.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/chainbuf.hpp new file mode 100644 index 0000000000..9481c3a9d8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/chainbuf.hpp @@ -0,0 +1,116 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_CHAINBUF_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_CHAINBUF_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC, template friends. +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +//--------------Definition of chainbuf----------------------------------------// + +// +// Template name: chainbuf. +// Description: Stream buffer which operates by delegating to the first +// linked_streambuf in a chain. +// Template paramters: +// Chain - The chain type. +// +template +class chainbuf + : public BOOST_IOSTREAMS_BASIC_STREAMBUF( + typename Chain::char_type, + typename Chain::traits_type + ), + public access_control, + private noncopyable +{ +private: + typedef access_control, Access> client_type; +public: + typedef typename Chain::char_type char_type; + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(typename Chain::traits_type) +protected: + typedef linked_streambuf delegate_type; + chainbuf() { client_type::set_chain(&chain_); } + int_type underflow() + { sentry t(this); return translate(delegate().underflow()); } + int_type pbackfail(int_type c) + { sentry t(this); return translate(delegate().pbackfail(c)); } + std::streamsize xsgetn(char_type* s, std::streamsize n) + { sentry t(this); return delegate().xsgetn(s, n); } + int_type overflow(int_type c) + { sentry t(this); return translate(delegate().overflow(c)); } + std::streamsize xsputn(const char_type* s, std::streamsize n) + { sentry t(this); return delegate().xsputn(s, n); } + int sync() { sentry t(this); return delegate().sync(); } + pos_type seekoff( off_type off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = + BOOST_IOS::in | BOOST_IOS::out ) + { sentry t(this); return delegate().seekoff(off, way, which); } + pos_type seekpos( pos_type sp, + BOOST_IOS::openmode which = + BOOST_IOS::in | BOOST_IOS::out ) + { sentry t(this); return delegate().seekpos(sp, which); } +protected: + typedef BOOST_IOSTREAMS_BASIC_STREAMBUF( + typename Chain::char_type, + typename Chain::traits_type + ) base_type; +//#if !BOOST_WORKAROUND(__GNUC__, == 2) +// BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type) +//#endif +private: + + // Translate from std int_type to chain's int_type. + typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) std_traits; + typedef typename Chain::traits_type chain_traits; + static typename chain_traits::int_type + translate(typename std_traits::int_type c) + { return translate_int_type(c); } + + delegate_type& delegate() + { return static_cast(chain_.front()); } + void get_pointers() + { + this->setg(delegate().eback(), delegate().gptr(), delegate().egptr()); + this->setp(delegate().pbase(), delegate().epptr()); + this->pbump((int) (delegate().pptr() - delegate().pbase())); + } + void set_pointers() + { + delegate().setg(this->eback(), this->gptr(), this->egptr()); + delegate().setp(this->pbase(), this->epptr()); + delegate().pbump((int) (this->pptr() - this->pbase())); + } + struct sentry { + sentry(chainbuf* buf) : buf_(buf) + { buf_->set_pointers(); } + ~sentry() { buf_->get_pointers(); } + chainbuf* buf_; + }; + friend struct sentry; + Chain chain_; +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CHAINBUF_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp new file mode 100644 index 0000000000..979f6d7b4a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp @@ -0,0 +1,313 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include // pair. +#include // BOOST_DEDUCED_TYPENAME, +#include // member template friends. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { + +namespace detail { + +template< typename T, + typename Tr = + BOOST_IOSTREAMS_CHAR_TRAITS( + BOOST_DEDUCED_TYPENAME char_type_of::type + ) > +class direct_streambuf + : public linked_streambuf::type, Tr> +{ +public: + typedef typename char_type_of::type char_type; + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) +private: + typedef linked_streambuf base_type; + typedef typename category_of::type category; + typedef BOOST_IOSTREAMS_BASIC_STREAMBUF( + char_type, traits_type + ) streambuf_type; +public: // stream needs access. + void open(const T& t, std::streamsize buffer_size, + std::streamsize pback_size); + bool is_open() const; + void close(); + bool auto_close() const { return auto_close_; } + void set_auto_close(bool close) { auto_close_ = close; } + bool strict_sync() { return true; } + + // Declared in linked_streambuf. + T* component() { return storage_.get(); } +protected: +#if !BOOST_WORKAROUND(__GNUC__, == 2) + BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type) +#endif + direct_streambuf(); + + //--------------Virtual functions-----------------------------------------// + + // Declared in linked_streambuf. + void close_impl(BOOST_IOS::openmode m); + const std::type_info& component_type() const { return typeid(T); } + void* component_impl() { return component(); } +#ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES + public: +#endif + + // Declared in basic_streambuf. + int_type underflow(); + int_type pbackfail(int_type c); + int_type overflow(int_type c); + pos_type seekoff( off_type off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ); + pos_type seekpos(pos_type sp, BOOST_IOS::openmode which); +private: + pos_type seek_impl( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ); + void init_input(any_tag) { } + void init_input(input); + void init_output(any_tag) { } + void init_output(output); + void init_get_area(); + void init_put_area(); + bool one_head() const; + bool two_head() const; + optional storage_; + char_type *ibeg_, *iend_, *obeg_, *oend_; + bool auto_close_; +}; + +//------------------Implementation of direct_streambuf------------------------// + +template +direct_streambuf::direct_streambuf() + : ibeg_(0), iend_(0), obeg_(0), oend_(0), auto_close_(true) +{ this->set_true_eof(true); } + +template +void direct_streambuf::open + (const T& t, std::streamsize, std::streamsize) +{ + storage_.reset(t); + init_input(category()); + init_output(category()); + setg(0, 0, 0); + setp(0, 0); + this->set_needs_close(); +} + +template +bool direct_streambuf::is_open() const +{ return ibeg_ != 0 || obeg_ != 0; } + +template +void direct_streambuf::close() +{ + base_type* self = this; + detail::execute_all( detail::call_member_close(*self, BOOST_IOS::in), + detail::call_member_close(*self, BOOST_IOS::out), + detail::call_reset(storage_) ); +} + +template +typename direct_streambuf::int_type +direct_streambuf::underflow() +{ + if (!ibeg_) + boost::throw_exception(cant_read()); + if (!gptr()) + init_get_area(); + return gptr() != iend_ ? + traits_type::to_int_type(*gptr()) : + traits_type::eof(); +} + +template +typename direct_streambuf::int_type +direct_streambuf::pbackfail(int_type c) +{ + using namespace std; + if (!ibeg_) + boost::throw_exception(cant_read()); + if (gptr() != 0 && gptr() != ibeg_) { + gbump(-1); + if (!traits_type::eq_int_type(c, traits_type::eof())) + *gptr() = traits_type::to_char_type(c); + return traits_type::not_eof(c); + } + boost::throw_exception(bad_putback()); +} + +template +typename direct_streambuf::int_type +direct_streambuf::overflow(int_type c) +{ + using namespace std; + if (!obeg_) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("no write access")); + if (!pptr()) init_put_area(); + if (!traits_type::eq_int_type(c, traits_type::eof())) { + if (pptr() == oend_) + boost::throw_exception( + BOOST_IOSTREAMS_FAILURE("write area exhausted") + ); + *pptr() = traits_type::to_char_type(c); + pbump(1); + return c; + } + return traits_type::not_eof(c); +} + +template +inline typename direct_streambuf::pos_type +direct_streambuf::seekoff + (off_type off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which) +{ return seek_impl(off, way, which); } + +template +inline typename direct_streambuf::pos_type +direct_streambuf::seekpos + (pos_type sp, BOOST_IOS::openmode which) +{ + return seek_impl(position_to_offset(sp), BOOST_IOS::beg, which); +} + +template +void direct_streambuf::close_impl(BOOST_IOS::openmode which) +{ + if (which == BOOST_IOS::in && ibeg_ != 0) { + setg(0, 0, 0); + ibeg_ = iend_ = 0; + } + if (which == BOOST_IOS::out && obeg_ != 0) { + sync(); + setp(0, 0); + obeg_ = oend_ = 0; + } + boost::iostreams::close(*storage_, which); +} + +template +typename direct_streambuf::pos_type direct_streambuf::seek_impl + (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which) +{ + using namespace std; + BOOST_IOS::openmode both = BOOST_IOS::in | BOOST_IOS::out; + if (two_head() && (which & both) == both) + boost::throw_exception(bad_seek()); + stream_offset result = -1; + bool one = one_head(); + if (one && (pptr() != 0 || gptr()== 0)) + init_get_area(); // Switch to input mode, for code reuse. + if (one || ((which & BOOST_IOS::in) != 0 && ibeg_ != 0)) { + if (!gptr()) setg(ibeg_, ibeg_, iend_); + ptrdiff_t next = 0; + switch (way) { + case BOOST_IOS::beg: next = off; break; + case BOOST_IOS::cur: next = (gptr() - ibeg_) + off; break; + case BOOST_IOS::end: next = (iend_ - ibeg_) + off; break; + default: assert(0); + } + if (next < 0 || next > (iend_ - ibeg_)) + boost::throw_exception(bad_seek()); + setg(ibeg_, ibeg_ + next, iend_); + result = next; + } + if (!one && (which & BOOST_IOS::out) != 0 && obeg_ != 0) { + if (!pptr()) setp(obeg_, oend_); + ptrdiff_t next = 0; + switch (way) { + case BOOST_IOS::beg: next = off; break; + case BOOST_IOS::cur: next = (pptr() - obeg_) + off; break; + case BOOST_IOS::end: next = (oend_ - obeg_) + off; break; + default: assert(0); + } + if (next < 0 || next > (oend_ - obeg_)) + boost::throw_exception(bad_seek()); + pbump(static_cast(next - (pptr() - obeg_))); + result = next; + } + return offset_to_position(result); +} + +template +void direct_streambuf::init_input(input) +{ + std::pair p = input_sequence(*storage_); + ibeg_ = p.first; + iend_ = p.second; +} + +template +void direct_streambuf::init_output(output) +{ + std::pair p = output_sequence(*storage_); + obeg_ = p.first; + oend_ = p.second; +} + +template +void direct_streambuf::init_get_area() +{ + setg(ibeg_, ibeg_, iend_); + if (one_head() && pptr()) { + gbump(static_cast(pptr() - obeg_)); + setp(0, 0); + } +} + +template +void direct_streambuf::init_put_area() +{ + setp(obeg_, oend_); + if (one_head() && gptr()) { + pbump(static_cast(gptr() - ibeg_)); + setg(0, 0, 0); + } +} + +template +inline bool direct_streambuf::one_head() const +{ return ibeg_ && obeg_ && ibeg_ == obeg_; } + +template +inline bool direct_streambuf::two_head() const +{ return ibeg_ && obeg_ && ibeg_ != obeg_; } + +//----------------------------------------------------------------------------// + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include // MSVC + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp new file mode 100644 index 0000000000..42a3c97959 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp @@ -0,0 +1,432 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) +// See http://www.boost.org/libs/iostreams for documentation. + +// This material is heavily indebted to the discussion and code samples in +// A. Langer and K. Kreft, "Standard C++ IOStreams and Locales", +// Addison-Wesley, 2000, pp. 228-43. + +// User "GMSB" provided an optimization for small seeks. + +#ifndef BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED + +#include // min, max. +#include +#include +#include +#include // Member template friends. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // MSVC, BCC 5.x + +namespace boost { namespace iostreams { namespace detail { + +// +// Description: The implementation of basic_streambuf used by chains. +// +template +class indirect_streambuf + : public linked_streambuf::type, Tr> +{ +public: + typedef typename char_type_of::type char_type; + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) +private: + typedef typename category_of::type category; + typedef concept_adapter wrapper; + typedef detail::basic_buffer buffer_type; + typedef indirect_streambuf my_type; + typedef detail::linked_streambuf base_type; + typedef linked_streambuf streambuf_type; +public: + indirect_streambuf(); + + void open(const T& t BOOST_IOSTREAMS_PUSH_PARAMS()); + bool is_open() const; + void close(); + bool auto_close() const; + void set_auto_close(bool close); + bool strict_sync(); + + // Declared in linked_streambuf. + T* component() { return &*obj(); } +protected: +#if !BOOST_WORKAROUND(__GNUC__, == 2) + BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type) +#endif + + //----------virtual functions---------------------------------------------// + +#ifndef BOOST_IOSTREAMS_NO_LOCALE + void imbue(const std::locale& loc); +#endif +#ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES + public: +#endif + int_type underflow(); + int_type pbackfail(int_type c); + int_type overflow(int_type c); + int sync(); + pos_type seekoff( off_type off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ); + pos_type seekpos(pos_type sp, BOOST_IOS::openmode which); + + // Declared in linked_streambuf. + void set_next(streambuf_type* next); + void close_impl(BOOST_IOS::openmode m); + const std::type_info& component_type() const { return typeid(T); } + void* component_impl() { return component(); } +private: + + //----------Accessor functions--------------------------------------------// + + wrapper& obj() { return *storage_; } + streambuf_type* next() const { return next_; } + buffer_type& in() { return buffer_.first(); } + buffer_type& out() { return buffer_.second(); } + bool can_read() const { return is_convertible::value; } + bool can_write() const { return is_convertible::value; } + bool output_buffered() const { return (flags_ & f_output_buffered) != 0; } + bool shared_buffer() const { return is_convertible::value; } + void set_flags(int f) { flags_ = f; } + + //----------State changing functions--------------------------------------// + + virtual void init_get_area(); + virtual void init_put_area(); + + //----------Utility function----------------------------------------------// + + pos_type seek_impl( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ); + void sync_impl(); + + enum flag_type { + f_open = 1, + f_output_buffered = f_open << 1, + f_auto_close = f_output_buffered << 1 + }; + + optional storage_; + streambuf_type* next_; + double_object< + buffer_type, + is_convertible< + Mode, + two_sequence + > + > buffer_; + std::streamsize pback_size_; + int flags_; +}; + +//--------------Implementation of indirect_streambuf--------------------------// + +template +indirect_streambuf::indirect_streambuf() + : next_(0), pback_size_(0), flags_(f_auto_close) { } + +//--------------Implementation of open, is_open and close---------------------// + +template +void indirect_streambuf::open + (const T& t, std::streamsize buffer_size, std::streamsize pback_size) +{ + using namespace std; + + // Normalize buffer sizes. + buffer_size = + (buffer_size != -1) ? + buffer_size : + iostreams::optimal_buffer_size(t); + pback_size = + (pback_size != -1) ? + pback_size : + default_pback_buffer_size; + + // Construct input buffer. + if (can_read()) { + pback_size_ = (std::max)(std::streamsize(2), pback_size); // STLPort needs 2. + std::streamsize size = + pback_size_ + + ( buffer_size ? buffer_size: 1 ); + in().resize(size); + if (!shared_buffer()) + init_get_area(); + } + + // Construct output buffer. + if (can_write() && !shared_buffer()) { + if (buffer_size != 0) + out().resize(buffer_size); + init_put_area(); + } + + storage_.reset(wrapper(t)); + flags_ |= f_open; + if (can_write() && buffer_size > 1) + flags_ |= f_output_buffered; + this->set_true_eof(false); + this->set_needs_close(); +} + +template +inline bool indirect_streambuf::is_open() const +{ return (flags_ & f_open) != 0; } + +template +void indirect_streambuf::close() +{ + using namespace std; + base_type* self = this; + detail::execute_all( + detail::call_member_close(*self, BOOST_IOS::in), + detail::call_member_close(*self, BOOST_IOS::out), + detail::call_reset(storage_), + detail::clear_flags(flags_) + ); +} + +template +bool indirect_streambuf::auto_close() const +{ return (flags_ & f_auto_close) != 0; } + +template +void indirect_streambuf::set_auto_close(bool close) +{ flags_ = (flags_ & ~f_auto_close) | (close ? f_auto_close : 0); } + +//--------------Implementation virtual functions------------------------------// + +#ifndef BOOST_IOSTREAMS_NO_LOCALE +template +void indirect_streambuf::imbue(const std::locale& loc) +{ + if (is_open()) { + obj().imbue(loc); + if (next_) + next_->pubimbue(loc); + } +} +#endif + +template +typename indirect_streambuf::int_type +indirect_streambuf::underflow() +{ + using namespace std; + if (!gptr()) init_get_area(); + buffer_type& buf = in(); + if (gptr() < egptr()) return traits_type::to_int_type(*gptr()); + + // Fill putback buffer. + std::streamsize keep = + (std::min)( static_cast(gptr() - eback()), + pback_size_ ); + if (keep) + traits_type::move( buf.data() + (pback_size_ - keep), + gptr() - keep, keep ); + + // Set pointers to reasonable values in case read throws. + setg( buf.data() + pback_size_ - keep, + buf.data() + pback_size_, + buf.data() + pback_size_ ); + + // Read from source. + std::streamsize chars = + obj().read(buf.data() + pback_size_, buf.size() - pback_size_, next_); + if (chars == -1) { + this->set_true_eof(true); + chars = 0; + } + setg(eback(), gptr(), buf.data() + pback_size_ + chars); + return chars != 0 ? + traits_type::to_int_type(*gptr()) : + traits_type::eof(); +} + +template +typename indirect_streambuf::int_type +indirect_streambuf::pbackfail(int_type c) +{ + if (gptr() != eback()) { + gbump(-1); + if (!traits_type::eq_int_type(c, traits_type::eof())) + *gptr() = traits_type::to_char_type(c); + return traits_type::not_eof(c); + } else { + boost::throw_exception(bad_putback()); + } +} + +template +typename indirect_streambuf::int_type +indirect_streambuf::overflow(int_type c) +{ + if ( (output_buffered() && pptr() == 0) || + (shared_buffer() && gptr() != 0) ) + { + init_put_area(); + } + if (!traits_type::eq_int_type(c, traits_type::eof())) { + if (output_buffered()) { + if (pptr() == epptr()) { + sync_impl(); + if (pptr() == epptr()) + return traits_type::eof(); + } + *pptr() = traits_type::to_char_type(c); + pbump(1); + } else { + char_type d = traits_type::to_char_type(c); + if (obj().write(&d, 1, next_) != 1) + return traits_type::eof(); + } + } + return traits_type::not_eof(c); +} + +template +int indirect_streambuf::sync() +{ + try { // sync() is no-throw. + sync_impl(); + obj().flush(next_); + return 0; + } catch (...) { return -1; } +} + +template +bool indirect_streambuf::strict_sync() +{ + try { // sync() is no-throw. + sync_impl(); + return obj().flush(next_); + } catch (...) { return false; } +} + +template +inline typename indirect_streambuf::pos_type +indirect_streambuf::seekoff + (off_type off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which) +{ return seek_impl(off, way, which); } + +template +inline typename indirect_streambuf::pos_type +indirect_streambuf::seekpos + (pos_type sp, BOOST_IOS::openmode which) +{ + return seek_impl(position_to_offset(sp), BOOST_IOS::beg, which); +} + +template +typename indirect_streambuf::pos_type +indirect_streambuf::seek_impl + (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which) +{ + if ( gptr() != 0 && way == BOOST_IOS::cur && which == BOOST_IOS::in && + eback() - gptr() <= off && off <= egptr() - gptr() ) + { // Small seek optimization + gbump(off); + return obj().seek(0, BOOST_IOS::cur, BOOST_IOS::in, next_) - + static_cast(egptr() - gptr()); + } + if (pptr() != 0) + this->BOOST_IOSTREAMS_PUBSYNC(); // sync() confuses VisualAge 6. + if (way == BOOST_IOS::cur && gptr()) + off -= static_cast(egptr() - gptr()); + setg(0, 0, 0); + setp(0, 0); + return obj().seek(off, way, which, next_); +} + +template +inline void indirect_streambuf::set_next + (streambuf_type* next) +{ next_ = next; } + +template +inline void indirect_streambuf::close_impl + (BOOST_IOS::openmode which) +{ + if (which == BOOST_IOS::in && is_convertible::value) { + setg(0, 0, 0); + } + if (which == BOOST_IOS::out && is_convertible::value) { + sync(); + setp(0, 0); + } + if ( !is_convertible::value || + is_convertible::value == (which == BOOST_IOS::in) ) + { + obj().close(which, next_); + } +} + +//----------State changing functions------------------------------------------// + +template +void indirect_streambuf::sync_impl() +{ + std::streamsize avail, amt; + if ((avail = static_cast(pptr() - pbase())) > 0) { + if ((amt = obj().write(pbase(), avail, next())) == avail) + setp(out().begin(), out().end()); + else { + const char_type* ptr = pptr(); + setp(out().begin() + amt, out().end()); + pbump(ptr - pptr()); + } + } +} + +template +void indirect_streambuf::init_get_area() +{ + if (shared_buffer() && pptr() != 0) { + sync_impl(); + setp(0, 0); + } + setg(in().begin(), in().begin(), in().begin()); +} + +template +void indirect_streambuf::init_put_area() +{ + using namespace std; + if (shared_buffer() && gptr() != 0) + setg(0, 0, 0); + if (output_buffered()) + setp(out().begin(), out().end()); + else + setp(0, 0); +} + +//----------------------------------------------------------------------------// + +} } } // End namespaces detail, iostreams, boost. + +#include // MSVC, BCC 5.x + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/linked_streambuf.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/linked_streambuf.hpp new file mode 100644 index 0000000000..10aedb89df --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/streambuf/linked_streambuf.hpp @@ -0,0 +1,114 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // member template friends. +#include +#include // openmode. +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { namespace detail { + +template +class chain_base; + +template class chainbuf; + +#define BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base) \ + using base::eback; using base::gptr; using base::egptr; \ + using base::setg; using base::gbump; using base::pbase; \ + using base::pptr; using base::epptr; using base::setp; \ + using base::pbump; using base::underflow; using base::pbackfail; \ + using base::xsgetn; using base::overflow; using base::xsputn; \ + using base::sync; using base::seekoff; using base::seekpos; \ + /**/ + +template +class linked_streambuf : public BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, Tr) { +protected: + linked_streambuf() : flags_(0) { } + void set_true_eof(bool eof) + { + flags_ = (flags_ & ~f_true_eof) | (eof ? f_true_eof : 0); + } +public: + + // Should be called only after receiving an ordinary EOF indication, + // to confirm that it represents EOF rather than WOULD_BLOCK. + bool true_eof() const { return (flags_ & f_true_eof) != 0; } +protected: + + //----------grant friendship to chain_base and chainbuf-------------------// + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + template< typename Self, typename ChT, typename TrT, + typename Alloc, typename Mode > + friend class chain_base; + template + friend class chainbuf; + template + friend class member_close_operation; +#else + public: + typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, Tr) base; + BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base) +#endif + void close(BOOST_IOS::openmode which) + { + if ( which == BOOST_IOS::in && + (flags_ & f_input_closed) == 0 ) + { + flags_ |= f_input_closed; + close_impl(which); + } + if ( which == BOOST_IOS::out && + (flags_ & f_output_closed) == 0 ) + { + flags_ |= f_output_closed; + close_impl(which); + } + } + void set_needs_close() + { + flags_ &= ~(f_input_closed | f_output_closed); + } + virtual void set_next(linked_streambuf* /* next */) { } + virtual void close_impl(BOOST_IOS::openmode) = 0; + virtual bool auto_close() const = 0; + virtual void set_auto_close(bool) = 0; + virtual bool strict_sync() = 0; + virtual const std::type_info& component_type() const = 0; + virtual void* component_impl() = 0; +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + private: +#else + public: +#endif +private: + enum flag_type { + f_true_eof = 1, + f_input_closed = f_true_eof << 1, + f_output_closed = f_input_closed << 1 + }; + int flags_; +}; + +} } } // End namespaces detail, iostreams, boost. + +#include // MSVC. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/system_failure.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/system_failure.hpp new file mode 100644 index 0000000000..7d86eafec4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/system_failure.hpp @@ -0,0 +1,84 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// (C) Copyright Jonathan Graehl 2004. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Used by mapped_file.cpp. + +#ifndef BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include // failure. + +#if defined(BOOST_NO_STDC_NAMESPACE) && !defined(__LIBCOMO__) +namespace std { using ::strlen; } +#endif + +#ifdef BOOST_IOSTREAMS_WINDOWS +# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +# include +#else +# include +# include +#endif + +namespace boost { namespace iostreams { namespace detail { + +inline BOOST_IOSTREAMS_FAILURE system_failure(const char* msg) +{ + std::string result; +#ifdef BOOST_IOSTREAMS_WINDOWS + DWORD err; + LPVOID lpMsgBuf; + if ( (err = ::GetLastError()) != NO_ERROR && + ::FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + err, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR) &lpMsgBuf, + 0, + NULL ) != 0 ) + { + result.reserve(std::strlen(msg) + 2 + std::strlen((LPSTR)lpMsgBuf)); + result.append(msg); + result.append(": "); + result.append((LPSTR) lpMsgBuf); + ::LocalFree(lpMsgBuf); + } else { + result += msg; + } +#else + const char* system_msg = errno ? strerror(errno) : ""; + result.reserve(std::strlen(msg) + 2 + std::strlen(system_msg)); + result.append(msg); + result.append(": "); + result.append(system_msg); +#endif + return BOOST_IOSTREAMS_FAILURE(result); +} + +inline BOOST_IOSTREAMS_FAILURE system_failure(const std::string& msg) +{ return system_failure(msg.c_str()); } + +inline void throw_system_failure(const char* msg) +{ boost::throw_exception(system_failure(msg)); } + +inline void throw_system_failure(const std::string& msg) +{ boost::throw_exception(system_failure(msg)); } + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/template_params.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/template_params.hpp new file mode 100644 index 0000000000..b07012fb82 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/template_params.hpp @@ -0,0 +1,26 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_TEMPLATE_PARAMS_HPP_INCLUDED + +#include +#include +#include + +#define BOOST_IOSTREAMS_TEMPLATE_PARAMS(arity, param) \ + BOOST_PP_EXPR_IF(arity, template<) \ + BOOST_PP_ENUM_PARAMS(arity, typename param) \ + BOOST_PP_EXPR_IF(arity, >) \ + /**/ + +#define BOOST_IOSTREAMS_TEMPLATE_ARGS(arity, param) \ + BOOST_PP_EXPR_IF(arity, <) \ + BOOST_PP_ENUM_PARAMS(arity, param) \ + BOOST_PP_EXPR_IF(arity, >) \ + /**/ + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/translate_int_type.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/translate_int_type.hpp new file mode 100644 index 0000000000..88b9341f74 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/translate_int_type.hpp @@ -0,0 +1,62 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_TRANSLATE_INT_TYPE_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_TRANSLATE_INT_TYPE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +namespace boost { namespace iostreams { namespace detail { + +template +struct translate_int_type_impl; + +// +// Template name: translate_char. +// Description: Translates a character or an end-of-file indicator from the +// int_type of one character traits type to the int_type of another. +// +template +typename TargetTr::int_type +translate_int_type(typename SourceTr::int_type c) +{ + typedef translate_int_type_impl::value> impl; + return impl::template inner::translate(c); +} + +//----------------------------------------------------------------------------// + +template<> +struct translate_int_type_impl { + template + struct inner { + static typename TargetTr::int_type + translate(typename SourceTr::int_type c) { return c; } + }; +}; + +template<> +struct translate_int_type_impl { + template + struct inner { + static typename TargetTr::int_type + translate(typename SourceTr::int_type c) + { + return SourceTr::eq_int_type(SourceTr::eof()) ? + TargetTr::eof() : + TargetTr::to_int_type(SourceTr::to_char_type(c)); + } + }; +}; + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_TRANSLATE_INT_TYPE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/close.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/close.hpp new file mode 100644 index 0000000000..f8936742b7 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/close.hpp @@ -0,0 +1,129 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct close_impl; + +} // End namespace detail. + +template +void close(T& t) { detail::close_all(t); } + +template +void close(T& t, BOOST_IOS::openmode which) +{ + typedef typename detail::unwrapped_type::type unwrapped; + detail::close_impl::inner::close(detail::unwrap(t), which); +} + +template +void close(T& t, Sink& snk, BOOST_IOS::openmode which) +{ + typedef typename detail::unwrapped_type::type unwrapped; + detail::close_impl::inner::close(detail::unwrap(t), snk, which); +} + +namespace detail { + +//------------------Definition of close_impl----------------------------------// + +template +struct close_tag { + typedef typename category_of::type category; + typedef typename + mpl::eval_if< + is_convertible, + mpl::if_< + mpl::or_< + is_convertible, + is_convertible + >, + two_sequence, + closable_tag + >, + mpl::identity + >::type type; +}; + +template +struct close_impl + : mpl::if_< + is_custom, + operations, + close_impl::type> + >::type + { }; + +template<> +struct close_impl { + template + struct inner { + static void close(T& t, BOOST_IOS::openmode which) + { + if (which == BOOST_IOS::out) + iostreams::flush(t); + } + + template + static void close(T& t, Sink& snk, BOOST_IOS::openmode which) + { + if (which == BOOST_IOS::out) { + non_blocking_adapter nb(snk); + iostreams::flush(t, nb); + } + } + }; +}; + +template<> +struct close_impl { + template + struct inner { + static void close(T& t, BOOST_IOS::openmode which) + { + typedef typename category_of::type category; + const bool in = is_convertible::value && + !is_convertible::value; + if (in == (which == BOOST_IOS::in)) + t.close(); + } + template + static void close(T& t, Sink& snk, BOOST_IOS::openmode which) + { + typedef typename category_of::type category; + const bool in = is_convertible::value && + !is_convertible::value; + if (in == (which == BOOST_IOS::in)) { + non_blocking_adapter nb(snk); + t.close(nb); + } + } + }; +}; + +template<> +struct close_impl { + template + struct inner { + static void close(T& t, BOOST_IOS::openmode which) { t.close(which); } + + template + static void close(T& t, Sink& snk, BOOST_IOS::openmode which) + { + non_blocking_adapter nb(snk); + t.close(nb, which); + } + }; +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/read.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/read.hpp new file mode 100644 index 0000000000..1e01f665b9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/read.hpp @@ -0,0 +1,238 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct read_device_impl; + +template +struct read_filter_impl; + +} // End namespace detail. + +template +typename int_type_of::type get(T& t) +{ + typedef typename detail::unwrapped_type::type unwrapped; + return detail::read_device_impl::inner::get(detail::unwrap(t)); +} + +template +inline std::streamsize +read(T& t, typename char_type_of::type* s, std::streamsize n) +{ + typedef typename detail::unwrapped_type::type unwrapped; + return detail::read_device_impl::inner::read(detail::unwrap(t), s, n); +} + +template +std::streamsize +read(T& t, Source& src, typename char_type_of::type* s, std::streamsize n) +{ + typedef typename detail::unwrapped_type::type unwrapped; + return detail::read_filter_impl::inner::read(detail::unwrap(t), src, s, n); +} + +template +bool putback(T& t, typename char_type_of::type c) +{ + typedef typename detail::unwrapped_type::type unwrapped; + return detail::read_device_impl::inner::putback(detail::unwrap(t), c); +} + +//----------------------------------------------------------------------------// + +namespace detail { + +// Helper function for adding -1 as EOF indicator. +inline std::streamsize check_eof(std::streamsize n) { return n != 0 ? n : -1; } + +// Helper templates for reading from streambufs. +template +struct true_eof_impl; + +template<> +struct true_eof_impl { + template + static bool true_eof(T& t) { return t.true_eof(); } +}; + +template<> +struct true_eof_impl { + template + static bool true_eof(T& t) { return true; } +}; + +template +inline bool true_eof(T& t) +{ + const bool linked = is_linked::value; + return true_eof_impl::true_eof(t); +} + +//------------------Definition of read_device_impl----------------------------// + +template +struct read_device_impl + : mpl::if_< + detail::is_custom, + operations, + read_device_impl< + BOOST_DEDUCED_TYPENAME + detail::dispatch< + T, istream_tag, streambuf_tag, input + >::type + > + >::type + { }; + +template<> +struct read_device_impl { + template + struct inner { + static typename int_type_of::type get(T& t) + { return t.get(); } + + static std::streamsize + read(T& t, typename char_type_of::type* s, std::streamsize n) + { return check_eof(t.rdbuf()->sgetn(s, n)); } + + static bool putback(T& t, typename char_type_of::type c) + { + typedef typename char_type_of::type char_type; + typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type; + return !traits_type::eq_int_type( t.rdbuf()->sputbackc(c), + traits_type::eof() ); + } + }; +}; + +template<> +struct read_device_impl { + template + struct inner { + static typename int_type_of::type + get(T& t) + { + typedef typename char_type_of::type char_type; + typedef char_traits traits_type; + typename int_type_of::type c; + return !traits_type::is_eof(c = t.sbumpc()) || + detail::true_eof(t) + ? + c : traits_type::would_block(); + } + + static std::streamsize + read(T& t, typename char_type_of::type* s, std::streamsize n) + { + std::streamsize amt; + return (amt = t.sgetn(s, n)) != 0 ? + amt : + detail::true_eof(t) ? + -1 : + 0; + } + + static bool putback(T& t, typename char_type_of::type c) + { + typedef typename char_type_of::type char_type; + typedef char_traits traits_type; + return !traits_type::is_eof(t.sputbackc(c)); + } + }; +}; + +template<> +struct read_device_impl { + template + struct inner { + static typename int_type_of::type + get(T& t) + { + typedef typename char_type_of::type char_type; + typedef char_traits traits_type; + char_type c; + std::streamsize amt; + return (amt = t.read(&c, 1)) == 1 ? + traits_type::to_int_type(c) : + amt == -1 ? + traits_type::eof() : + traits_type::would_block(); + } + + template + static std::streamsize + read(T& t, typename char_type_of::type* s, std::streamsize n) + { return t.read(s, n); } + + template + static bool putback(T& t, typename char_type_of::type c) + { // T must be Peekable. + return t.putback(c); + } + }; +}; + +//------------------Definition of read_filter_impl----------------------------// + +template +struct read_filter_impl + : mpl::if_< + detail::is_custom, + operations, + read_filter_impl< + BOOST_DEDUCED_TYPENAME + detail::dispatch< + T, multichar_tag, any_tag + >::type + > + >::type + { }; + +template<> +struct read_filter_impl { + template + struct inner { + template + static std::streamsize read + ( T& t, Source& src, typename char_type_of::type* s, + std::streamsize n ) + { return t.read(src, s, n); } + }; +}; + +template<> +struct read_filter_impl { + template + struct inner { + template + static std::streamsize read + ( T& t, Source& src, typename char_type_of::type* s, + std::streamsize n ) + { + typedef typename char_type_of::type char_type; + typedef char_traits traits_type; + for (std::streamsize off = 0; off < n; ++off) { + typename traits_type::int_type c = t.get(src); + if (traits_type::is_eof(c)) + return check_eof(off); + if (traits_type::would_block(c)) + return off; + s[off] = traits_type::to_char_type(c); + } + return n; + } + }; +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/write.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/write.hpp new file mode 100644 index 0000000000..ee8b9488ff --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/vc6/write.hpp @@ -0,0 +1,159 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct write_device_impl; + +template +struct write_filter_impl; + +} // End namespace detail. + +template +bool put(T& t, typename char_type_of::type c) +{ + typedef typename detail::unwrapped_type::type unwrapped; + return detail::write_device_impl::inner::put(detail::unwrap(t), c); +} + +template +inline std::streamsize write + (T& t, const typename char_type_of::type* s, std::streamsize n) +{ + typedef typename detail::unwrapped_type::type unwrapped; + return detail::write_device_impl::inner::write(detail::unwrap(t), s, n); +} + +template +inline std::streamsize +write( T& t, Sink& snk, const typename char_type_of::type* s, + std::streamsize n ) +{ + typedef typename detail::unwrapped_type::type unwrapped; + return detail::write_filter_impl::inner::write(detail::unwrap(t), snk, s, n); +} + +namespace detail { + +//------------------Definition of write_device_impl---------------------------// + +template +struct write_device_impl + : mpl::if_< + is_custom, + operations, + write_device_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, ostream_tag, streambuf_tag, output + >::type + > + >::type + { }; + +template<> +struct write_device_impl { + template + struct inner { + static bool put(T& t, typename char_type_of::type c) + { + typedef typename char_type_of::type char_type; + typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type; + return !traits_type::eq_int_type( t.rdbuf()->s.sputc(), + traits_type::eof() ); + } + + static std::streamsize write + (T& t, const typename char_type_of::type* s, std::streamsize n) + { return t.rdbuf()->sputn(s, n); } + }; +}; + +template<> +struct write_device_impl { + template + struct inner { + static bool put(T& t, typename char_type_of::type c) + { + typedef typename char_type_of::type char_type; + typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type; + return !traits_type::eq_int_type(t.sputc(c), traits_type::eof()); + } + + template + static std::streamsize write + (T& t, const typename char_type_of::type* s, std::streamsize n) + { return t.sputn(s, n); } + }; +}; + +template<> +struct write_device_impl { + template + struct inner { + static bool put(T& t, typename char_type_of::type c) + { return t.write(&c, 1) == 1; } + + template + static std::streamsize + write(T& t, const typename char_type_of::type* s, std::streamsize n) + { return t.write(s, n); } + }; +}; + +//------------------Definition of write_filter_impl---------------------------// + +template +struct write_filter_impl + : mpl::if_< + is_custom, + operations, + write_filter_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, multichar_tag, any_tag + >::type + > + >::type + { }; + +template<> +struct write_filter_impl { + template + struct inner { + template + static std::streamsize + write( T& t, Sink& snk, const typename char_type_of::type* s, + std::streamsize n ) + { return t.write(snk, s, n); } + }; +}; + +template<> +struct write_filter_impl { + template + struct inner { + template + static std::streamsize + write( T& t, Sink& snk, const typename char_type_of::type* s, + std::streamsize n ) + { + for (std::streamsize off = 0; off < n; ++off) + if (!t.put(snk, s[off])) + return off; + return n; + } + }; +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/wrap_unwrap.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/wrap_unwrap.hpp new file mode 100644 index 0000000000..6e3d231422 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/detail/wrap_unwrap.hpp @@ -0,0 +1,127 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED +#define BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // SFINAE, MSVC. +#include +#include +#include // is_std_io. +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +//------------------Definition of wrap/unwrap traits--------------------------// + +template +struct wrapped_type + : mpl::if_, reference_wrapper, T> + { }; + +template +struct unwrapped_type + : unwrap_reference + { }; + +template +struct unwrap_ios + : mpl::eval_if< + is_std_io, + unwrap_reference, + mpl::identity + > + { }; + +//------------------Definition of wrap----------------------------------------// + +#ifndef BOOST_NO_SFINAE //----------------------------------------------------// + template + inline T wrap(const T& t BOOST_IOSTREAMS_DISABLE_IF_STREAM(T)) + { return t; } + + template + inline typename wrapped_type::type + wrap(T& t BOOST_IOSTREAMS_ENABLE_IF_STREAM(T)) { return boost::ref(t); } +#else // #ifndef BOOST_NO_SFINAE //-------------------------------------------// + template + inline typename wrapped_type::type // BCC 5.x needs namespace qualification. + wrap_impl(const T& t, mpl::true_) { return boost::ref(const_cast(t)); } + + template + inline typename wrapped_type::type // BCC 5.x needs namespace qualification. + wrap_impl(T& t, mpl::true_) { return boost::ref(t); } + + template + inline typename wrapped_type::type + wrap_impl(const T& t, mpl::false_) { return t; } + + template + inline typename wrapped_type::type + wrap_impl(T& t, mpl::false_) { return t; } + + template + inline typename wrapped_type::type + wrap(const T& t) { return wrap_impl(t, is_std_io()); } + + template + inline typename wrapped_type::type + wrap(T& t) { return wrap_impl(t, is_std_io()); } +#endif // #ifndef BOOST_NO_SFINAE //------------------------------------------// + +//------------------Definition of unwrap--------------------------------------// + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //----------------------------------// + +template +typename unwrapped_type::type& +unwrap(const reference_wrapper& ref) { return ref.get(); } + +template +typename unwrapped_type::type& unwrap(T& t) { return t; } + +template +const typename unwrapped_type::type& unwrap(const T& t) { return t; } + +#else // #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //-------------------------// + +// Since unwrap is a potential bottleneck, we avoid runtime tag dispatch. +template +struct unwrap_impl; + +template<> +struct unwrap_impl { + template + static typename unwrapped_type::type& unwrap(const T& t) + { return t.get(); } +}; + +template<> +struct unwrap_impl { + template + static typename unwrapped_type::type& unwrap(const T& t) + { return const_cast(t); } +}; + +template +typename unwrapped_type::type& +unwrap(const T& t) +{ return unwrap_impl::value>::unwrap(t); } + +#endif // #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //------------------------// + +} } } // End namespaces detail, iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/array.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/array.hpp new file mode 100644 index 0000000000..3e08f04470 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/array.hpp @@ -0,0 +1,144 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2004-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_ARRAY_HPP_INCLUDED +#define BOOST_IOSTREAMS_ARRAY_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC, make sure size_t is in std. +#include +#include // std::size_t. +#include // pair. +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { + +namespace detail { + +template +class array_adapter { +public: + typedef Ch char_type; + typedef std::pair pair_type; + struct category + : public Mode, + public device_tag, + public direct_tag + { }; + array_adapter(char_type* begin, char_type* end); + array_adapter(char_type* begin, std::size_t length); + array_adapter(const char_type* begin, const char_type* end); + array_adapter(const char_type* begin, std::size_t length); +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template + array_adapter(char_type (&ar)[N]) + : begin_(ar), end_(ar + N) + { } +#endif + pair_type input_sequence(); + pair_type output_sequence(); +private: + char_type* begin_; + char_type* end_; +}; + +} // End namespace detail. + +// Local macros, #undef'd below. +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_IOSTREAMS_ARRAY_CTOR(name, ch) \ + template \ + BOOST_PP_CAT(basic_, name)(ch (&ar)[N]) \ + : base_type(ar) { } \ + /**/ +#else +# define BOOST_IOSTREAMS_ARRAY_CTOR(name, ch) +#endif +#define BOOST_IOSTREAMS_ARRAY(name, mode) \ + template \ + struct BOOST_PP_CAT(basic_, name) : detail::array_adapter { \ + private: \ + typedef detail::array_adapter base_type; \ + public: \ + typedef typename base_type::char_type char_type; \ + typedef typename base_type::category category; \ + BOOST_PP_CAT(basic_, name)(char_type* begin, char_type* end) \ + : base_type(begin, end) { } \ + BOOST_PP_CAT(basic_, name)(char_type* begin, std::size_t length) \ + : base_type(begin, length) { } \ + BOOST_PP_CAT(basic_, name)(const char_type* begin, const char_type* end) \ + : base_type(begin, end) { } \ + BOOST_PP_CAT(basic_, name)(const char_type* begin, std::size_t length) \ + : base_type(begin, length) { } \ + BOOST_IOSTREAMS_ARRAY_CTOR(name, Ch) \ + }; \ + typedef BOOST_PP_CAT(basic_, name) name; \ + typedef BOOST_PP_CAT(basic_, name) BOOST_PP_CAT(w, name); \ + /**/ +BOOST_IOSTREAMS_ARRAY(array_source, input_seekable) +BOOST_IOSTREAMS_ARRAY(array_sink, output_seekable) +BOOST_IOSTREAMS_ARRAY(array, seekable) +#undef BOOST_IOSTREAMS_ARRAY_CTOR +#undef BOOST_IOSTREAMS_ARRAY + + +//------------------Implementation of array_adapter---------------------------// + +namespace detail { + +template +array_adapter::array_adapter + (char_type* begin, char_type* end) + : begin_(begin), end_(end) + { } + +template +array_adapter::array_adapter + (char_type* begin, std::size_t length) + : begin_(begin), end_(begin + length) + { } + +template +array_adapter::array_adapter + (const char_type* begin, const char_type* end) + : begin_(const_cast(begin)), // Treated as read-only. + end_(const_cast(end)) // Treated as read-only. +{ BOOST_STATIC_ASSERT((!is_convertible::value)); } + +template +array_adapter::array_adapter + (const char_type* begin, std::size_t length) + : begin_(const_cast(begin)), // Treated as read-only. + end_(const_cast(begin) + length) // Treated as read-only. +{ BOOST_STATIC_ASSERT((!is_convertible::value)); } + +template +typename array_adapter::pair_type +array_adapter::input_sequence() +{ BOOST_STATIC_ASSERT((is_convertible::value)); + return pair_type(begin_, end_); } + +template +typename array_adapter::pair_type +array_adapter::output_sequence() +{ BOOST_STATIC_ASSERT((is_convertible::value)); + return pair_type(begin_, end_); } + +} // End namespace detail. + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_ARRAY_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/back_inserter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/back_inserter.hpp new file mode 100644 index 0000000000..563e397918 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/back_inserter.hpp @@ -0,0 +1,41 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_BACK_INSERTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_BACK_INSERTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // streamsize. +#include + +namespace boost { namespace iostreams { + +template +class back_insert_device { +public: + typedef typename Container::value_type char_type; + typedef sink_tag category; + back_insert_device(Container& cnt) : container(&cnt) { } + std::streamsize write(const char_type* s, std::streamsize n) + { + container->insert(container->end(), s, s + n); + return n; + } +protected: + Container* container; +}; + +template +back_insert_device back_inserter(Container& cnt) +{ return back_insert_device(cnt); } + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_BACK_INSERTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/file.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/file.hpp new file mode 100644 index 0000000000..f701c9d650 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/file.hpp @@ -0,0 +1,191 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_FILE_HPP_INCLUDED +#define BOOST_IOSTREAMS_FILE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#ifndef BOOST_IOSTREAMS_NO_LOCALE +# include +#endif +#include // pathnames, char_traits. +#include +#include // openmode, seekdir, int types. +#include +#include // seek. +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { + +template +class basic_file { +public: + typedef Ch char_type; + struct category + : public seekable_device_tag, + public closable_tag, + public localizable_tag, + public flushable_tag + { }; + basic_file( const std::string& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out, + BOOST_IOS::openmode base_mode = + BOOST_IOS::in | BOOST_IOS::out ); + std::streamsize read(char_type* s, std::streamsize n); + bool putback(char_type c); + std::streamsize write(const char_type* s, std::streamsize n); + std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = + BOOST_IOS::in | BOOST_IOS::out ); + void open( const std::string& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out, + BOOST_IOS::openmode base_mode = + BOOST_IOS::in | BOOST_IOS::out ); + bool is_open() const; + void close(); + bool flush(); +#ifndef BOOST_IOSTREAMS_NO_LOCALE + void imbue(const std::locale& loc) { pimpl_->file_.pubimbue(loc); } +#endif +private: + struct impl { + impl(const std::string& path, BOOST_IOS::openmode mode) + { file_.open(path.c_str(), mode); } + ~impl() { if (file_.is_open()) file_.close(); } + BOOST_IOSTREAMS_BASIC_FILEBUF(Ch) file_; + }; + shared_ptr pimpl_; +}; + +typedef basic_file file; +typedef basic_file wfile; + +template +struct basic_file_source : private basic_file { + typedef Ch char_type; + struct category + : input_seekable, + device_tag, + closable_tag + { }; + using basic_file::read; + using basic_file::putback; + using basic_file::seek; + using basic_file::is_open; + using basic_file::close; + basic_file_source( const std::string& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in ) + : basic_file(path, mode & ~BOOST_IOS::out, BOOST_IOS::in) + { } + void open( const std::string& path, + BOOST_IOS::openmode mode = BOOST_IOS::in ) + { + basic_file::open(path, mode & ~BOOST_IOS::out, BOOST_IOS::in); + } +}; + +typedef basic_file_source file_source; +typedef basic_file_source wfile_source; + +template +struct basic_file_sink : private basic_file { + typedef Ch char_type; + struct category + : output_seekable, + device_tag, + closable_tag, + flushable_tag + { }; + using basic_file::write; + using basic_file::seek; + using basic_file::is_open; + using basic_file::close; + using basic_file::flush; + basic_file_sink( const std::string& path, + BOOST_IOS::openmode mode = BOOST_IOS::out ) + : basic_file(path, mode & ~BOOST_IOS::in, BOOST_IOS::out) + { } + void open( const std::string& path, + BOOST_IOS::openmode mode = BOOST_IOS::out ) + { + basic_file::open(path, mode & ~BOOST_IOS::in, BOOST_IOS::out); + } +}; + +typedef basic_file_sink file_sink; +typedef basic_file_sink wfile_sink; + +//------------------Implementation of basic_file------------------------------// + +template +basic_file::basic_file + ( const std::string& path, BOOST_IOS::openmode mode, + BOOST_IOS::openmode base_mode ) +{ + open(path, mode, base_mode); +} + +template +inline std::streamsize basic_file::read + (char_type* s, std::streamsize n) +{ + std::streamsize result = pimpl_->file_.sgetn(s, n); + return result != 0 ? result : -1; +} + +template +inline bool basic_file::putback(char_type c) +{ + return !!pimpl_->file_.sputbackc(c); +} + +template +inline std::streamsize basic_file::write + (const char_type* s, std::streamsize n) +{ return pimpl_->file_.sputn(s, n); } + +template +std::streampos basic_file::seek + ( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode ) +{ return iostreams::seek(pimpl_->file_, off, way); } + +template +void basic_file::open + ( const std::string& path, BOOST_IOS::openmode mode, + BOOST_IOS::openmode base_mode ) +{ + pimpl_.reset(new impl(path, mode | base_mode)); +} + +template +bool basic_file::is_open() const { return pimpl_->file_.is_open(); } + +template +void basic_file::close() { pimpl_->file_.close(); } + +template +bool basic_file::flush() +{ return pimpl_->file_.BOOST_IOSTREAMS_PUBSYNC() == 0; } + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#include // MSVC + +#endif // #ifndef BOOST_IOSTREAMS_FILE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/file_descriptor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/file_descriptor.hpp new file mode 100644 index 0000000000..bb470589b0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/file_descriptor.hpp @@ -0,0 +1,318 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Inspired by fdstream.hpp, (C) Copyright Nicolai M. Josuttis 2001, +// available at http://www.josuttis.com/cppcode/fdstream.html. + +#ifndef BOOST_IOSTREAMS_FILE_DESCRIPTOR_HPP_INCLUDED +#define BOOST_IOSTREAMS_FILE_DESCRIPTOR_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // intmax_t. +#include // tags. +#include +#include +#include +#include +#include // openmode, seekdir, int types. +#include +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +// Forward declarations +class file_descriptor_source; +class file_descriptor_sink; +namespace detail { struct file_descriptor_impl; } + +enum file_descriptor_flags +{ + never_close_handle = 0, + close_handle = 3 +}; + +class BOOST_IOSTREAMS_DECL file_descriptor { +public: + friend class file_descriptor_source; + friend class file_descriptor_sink; + typedef detail::file_handle handle_type; + typedef char char_type; + struct category + : seekable_device_tag, + closable_tag + { }; + + // Default constructor + file_descriptor(); + + // Constructors taking file desciptors + file_descriptor(handle_type fd, file_descriptor_flags); +#ifdef BOOST_IOSTREAMS_WINDOWS + file_descriptor(int fd, file_descriptor_flags); +#endif + +#if defined(BOOST_IOSTREAMS_USE_DEPRECATED) + // Constructors taking file desciptors + explicit file_descriptor(handle_type fd, bool close_on_exit = false); +#ifdef BOOST_IOSTREAMS_WINDOWS + explicit file_descriptor(int fd, bool close_on_exit = false); +#endif +#endif + + // Constructor taking a std:: string + explicit file_descriptor( const std::string& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out ); + + // Constructor taking a C-style string + explicit file_descriptor( const char* path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out ); + + // Constructor taking a Boost.Filesystem path + template + explicit file_descriptor( const Path& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out ) + { + init(); + open(detail::path(path), mode); + } + + // Copy constructor + file_descriptor(const file_descriptor& other); + + // open overloads taking file descriptors + void open(handle_type fd, file_descriptor_flags); +#ifdef BOOST_IOSTREAMS_WINDOWS + void open(int fd, file_descriptor_flags); +#endif + +#if defined(BOOST_IOSTREAMS_USE_DEPRECATED) + // open overloads taking file descriptors + void open(handle_type fd, bool close_on_exit = false); +#ifdef BOOST_IOSTREAMS_WINDOWS + void open(int fd, bool close_on_exit = false); +#endif +#endif + + // open overload taking a std::string + void open( const std::string& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out ); + + // open overload taking C-style string + void open( const char* path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out ); + + // open overload taking a Boost.Filesystem path + template + void open( const Path& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out ) + { open(detail::path(path), mode); } + + bool is_open() const; + void close(); + std::streamsize read(char_type* s, std::streamsize n); + std::streamsize write(const char_type* s, std::streamsize n); + std::streampos seek(stream_offset off, BOOST_IOS::seekdir way); + handle_type handle() const; +private: + void init(); + + // open overload taking a detail::path + void open( const detail::path& path, + BOOST_IOS::openmode, + BOOST_IOS::openmode = BOOST_IOS::openmode(0) ); + + typedef detail::file_descriptor_impl impl_type; + shared_ptr pimpl_; +}; + +class BOOST_IOSTREAMS_DECL file_descriptor_source : private file_descriptor { +public: +#ifdef BOOST_IOSTREAMS_WINDOWS + typedef void* handle_type; // A.k.a HANDLE +#else + typedef int handle_type; +#endif + typedef char char_type; + struct category + : input_seekable, + device_tag, + closable_tag + { }; + using file_descriptor::is_open; + using file_descriptor::close; + using file_descriptor::read; + using file_descriptor::seek; + using file_descriptor::handle; + + // Default constructor + file_descriptor_source() { } + + // Constructors taking file desciptors + explicit file_descriptor_source(handle_type fd, file_descriptor_flags); +#ifdef BOOST_IOSTREAMS_WINDOWS + explicit file_descriptor_source(int fd, file_descriptor_flags); +#endif + +#if defined(BOOST_IOSTREAMS_USE_DEPRECATED) + // Constructors taking file desciptors + explicit file_descriptor_source(handle_type fd, bool close_on_exit = false); +#ifdef BOOST_IOSTREAMS_WINDOWS + explicit file_descriptor_source(int fd, bool close_on_exit = false); +#endif +#endif + + // Constructor taking a std:: string + explicit file_descriptor_source( const std::string& path, + BOOST_IOS::openmode mode = BOOST_IOS::in ); + + // Constructor taking a C-style string + explicit file_descriptor_source( const char* path, + BOOST_IOS::openmode mode = BOOST_IOS::in ); + + // Constructor taking a Boost.Filesystem path + template + explicit file_descriptor_source( const Path& path, + BOOST_IOS::openmode mode = BOOST_IOS::in ) + { open(detail::path(path), mode); } + + // Copy constructor + file_descriptor_source(const file_descriptor_source& other); + + // Constructors taking file desciptors + void open(handle_type fd, file_descriptor_flags); +#ifdef BOOST_IOSTREAMS_WINDOWS + void open(int fd, file_descriptor_flags); +#endif + +#if defined(BOOST_IOSTREAMS_USE_DEPRECATED) + // open overloads taking file descriptors + void open(handle_type fd, bool close_on_exit = false); +#ifdef BOOST_IOSTREAMS_WINDOWS + void open(int fd, bool close_on_exit = false); +#endif +#endif + + // open overload taking a std::string + void open(const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::in); + + // open overload taking C-style string + void open(const char* path, BOOST_IOS::openmode mode = BOOST_IOS::in); + + // open overload taking a Boost.Filesystem path + template + void open(const Path& path, BOOST_IOS::openmode mode = BOOST_IOS::in); +private: + + // open overload taking a detail::path + void open(const detail::path& path, BOOST_IOS::openmode); +}; + +class BOOST_IOSTREAMS_DECL file_descriptor_sink : private file_descriptor { +public: +#ifdef BOOST_IOSTREAMS_WINDOWS + typedef void* handle_type; // A.k.a HANDLE +#else + typedef int handle_type; +#endif + typedef char char_type; + struct category + : output_seekable, + device_tag, + closable_tag + { }; + using file_descriptor::is_open; + using file_descriptor::close; + using file_descriptor::write; + using file_descriptor::seek; + using file_descriptor::handle; + + // Default constructor + file_descriptor_sink() { } + + // Constructors taking file desciptors + file_descriptor_sink(handle_type fd, file_descriptor_flags); +#ifdef BOOST_IOSTREAMS_WINDOWS + file_descriptor_sink(int fd, file_descriptor_flags); +#endif + +#if defined(BOOST_IOSTREAMS_USE_DEPRECATED) + // Constructors taking file desciptors + explicit file_descriptor_sink(handle_type fd, bool close_on_exit = false); +#ifdef BOOST_IOSTREAMS_WINDOWS + explicit file_descriptor_sink(int fd, bool close_on_exit = false); +#endif +#endif + + // Constructor taking a std:: string + explicit file_descriptor_sink( const std::string& path, + BOOST_IOS::openmode mode = BOOST_IOS::out ); + + // Constructor taking a C-style string + explicit file_descriptor_sink( const char* path, + BOOST_IOS::openmode mode = BOOST_IOS::out ); + + // Constructor taking a Boost.Filesystem path + template + explicit file_descriptor_sink( const Path& path, + BOOST_IOS::openmode mode = BOOST_IOS::out ) + { open(detail::path(path), mode); } + + // Copy constructor + file_descriptor_sink(const file_descriptor_sink& other); + + // open overloads taking file descriptors + void open(handle_type fd, file_descriptor_flags); +#ifdef BOOST_IOSTREAMS_WINDOWS + void open(int fd, file_descriptor_flags); +#endif + +#if defined(BOOST_IOSTREAMS_USE_DEPRECATED) + // open overloads taking file descriptors + void open(handle_type fd, bool close_on_exit = false); +#ifdef BOOST_IOSTREAMS_WINDOWS + void open(int fd, bool close_on_exit = false); +#endif +#endif + + // open overload taking a std::string + void open( const std::string& path, + BOOST_IOS::openmode mode = BOOST_IOS::out ); + + // open overload taking C-style string + void open( const char* path, + BOOST_IOS::openmode mode = BOOST_IOS::out ); + + // open overload taking a Boost.Filesystem path + template + void open( const Path& path, + BOOST_IOS::openmode mode = BOOST_IOS::out ) + { open(detail::path(path), mode); } +private: + + // open overload taking a detail::path + void open(const detail::path& path, BOOST_IOS::openmode); +}; + +} } // End namespaces iostreams, boost. + +#include // pops abi_suffix.hpp pragmas + +#endif // #ifndef BOOST_IOSTREAMS_FILE_DESCRIPTOR_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/mapped_file.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/mapped_file.hpp new file mode 100644 index 0000000000..8493b17736 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/mapped_file.hpp @@ -0,0 +1,599 @@ +// (C) Copyright Jorge Lodos 2008. +// (C) Copyright Jonathan Turkanis 2003. +// (C) Copyright Craig Henderson 2002. 'boost/memmap.hpp' from sandbox +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +#ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED +#define BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // make sure size_t is in std. +#include // size_t. +#include // pathnames. +#include // pair. +#include // BOOST_MSVC. +#include +#include +#include +#include +#include +#include +#include // openmode, failure +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +//------------------Definition of mapped_file_base and mapped_file_params-----// + +// Forward declarations +class mapped_file_source; +class mapped_file_sink; +class mapped_file; +namespace detail { class mapped_file_impl; } + +class mapped_file_base { +public: + enum mapmode { + readonly = 1, + readwrite = 2, + priv = 4 + }; +}; + +// Bitmask operations for mapped_file_base::mapmode +mapped_file_base::mapmode +operator|(mapped_file_base::mapmode a, mapped_file_base::mapmode b); + +mapped_file_base::mapmode +operator&(mapped_file_base::mapmode a, mapped_file_base::mapmode b); + +mapped_file_base::mapmode +operator^(mapped_file_base::mapmode a, mapped_file_base::mapmode b); + +mapped_file_base::mapmode +operator~(mapped_file_base::mapmode a); + +mapped_file_base::mapmode +operator|=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); + +mapped_file_base::mapmode +operator&=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); + +mapped_file_base::mapmode +operator^=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); + +//------------------Definition of mapped_file_params--------------------------// + +namespace detail { + +struct mapped_file_params_base { + mapped_file_params_base() + : flags(static_cast(0)), + mode(), offset(0), length(static_cast(-1)), + new_file_size(0), hint(0) + { } +private: + friend class mapped_file_impl; + void normalize(); +public: + mapped_file_base::mapmode flags; + BOOST_IOS::openmode mode; // Deprecated + stream_offset offset; + std::size_t length; + stream_offset new_file_size; + const char* hint; +}; + +} // End namespace detail. + +// This template allows Boost.Filesystem paths to be specified when creating or +// reopening a memory mapped file, without creating a dependence on +// Boost.Filesystem. Possible values of Path include std::string, +// boost::filesystem::path, boost::filesystem::wpath, +// and boost::iostreams::detail::path (used to store either a std::string or a +// std::wstring). +template +struct basic_mapped_file_params + : detail::mapped_file_params_base +{ + typedef detail::mapped_file_params_base base_type; + + // For wide paths, instantiate basic_mapped_file_params + // with boost::filesystem::wpath +#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS + BOOST_STATIC_ASSERT((!is_same::value)); +#endif + + // Default constructor + basic_mapped_file_params() { } + + // Construction from a Path + explicit basic_mapped_file_params(const Path& p) : path(p) { } + + // Construction from a path of a different type + template + explicit basic_mapped_file_params(const PathT& p) : path(p) { } + + // Copy constructor + basic_mapped_file_params(const basic_mapped_file_params& other) + : base_type(other), path(other.path) + { } + + // Templated copy constructor + template + basic_mapped_file_params(const basic_mapped_file_params& other) + : base_type(other), path(other.path) + { } + + typedef Path path_type; + Path path; +}; + +typedef basic_mapped_file_params mapped_file_params; + +//------------------Definition of mapped_file_source--------------------------// + +class BOOST_IOSTREAMS_DECL mapped_file_source : public mapped_file_base { +private: + struct safe_bool_helper { int x; }; + typedef int safe_bool_helper::* safe_bool; + typedef detail::mapped_file_impl impl_type; + typedef basic_mapped_file_params param_type; + friend class mapped_file; + friend class detail::mapped_file_impl; + friend struct boost::iostreams::operations; +public: + typedef char char_type; + struct category + : public source_tag, + public direct_tag, + public closable_tag + { }; + typedef std::size_t size_type; + typedef const char* iterator; + BOOST_STATIC_CONSTANT(size_type, max_length = static_cast(-1)); + + // Default constructor + mapped_file_source(); + + // Constructor taking a parameters object + template + explicit mapped_file_source(const basic_mapped_file_params& p); + + // Constructor taking a list of parameters + template + explicit mapped_file_source( const Path& path, + size_type length = max_length, + boost::intmax_t offset = 0 ); + + // Copy Constructor + mapped_file_source(const mapped_file_source& other); + + //--------------Stream interface------------------------------------------// + + template + void open(const basic_mapped_file_params& p); + + template + void open( const Path& path, + size_type length = max_length, + boost::intmax_t offset = 0 ); + + bool is_open() const; + void close(); + operator safe_bool() const; + bool operator!() const; + mapmode flags() const; + + //--------------Container interface---------------------------------------// + + size_type size() const; + const char* data() const; + iterator begin() const; + iterator end() const; + + //--------------Query admissible offsets----------------------------------// + + // Returns the allocation granularity for virtual memory. Values passed + // as offsets must be multiples of this value. + static int alignment(); + +private: + void init(); + void open_impl(const param_type& p); + + boost::shared_ptr pimpl_; +}; + +//------------------Definition of mapped_file---------------------------------// + +class BOOST_IOSTREAMS_DECL mapped_file : public mapped_file_base { +private: + typedef mapped_file_source delegate_type; + typedef delegate_type::safe_bool safe_bool; + typedef basic_mapped_file_params param_type; + friend struct boost::iostreams::operations; + friend class mapped_file_sink; +public: + typedef char char_type; + struct category + : public seekable_device_tag, + public direct_tag, + public closable_tag + { }; + typedef mapped_file_source::size_type size_type; + typedef char* iterator; + typedef const char* const_iterator; + BOOST_STATIC_CONSTANT(size_type, max_length = delegate_type::max_length); + + // Default constructor + mapped_file() { } + + // Construstor taking a parameters object + template + explicit mapped_file(const basic_mapped_file_params& p); + + // Constructor taking a list of parameters + template + mapped_file( const Path& path, + mapmode flags, + size_type length = max_length, + stream_offset offset = 0 ); + + // Constructor taking a list of parameters, including a + // std::ios_base::openmode (deprecated) + template + explicit mapped_file( const Path& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out, + size_type length = max_length, + stream_offset offset = 0 ); + + // Copy Constructor + mapped_file(const mapped_file& other); + + //--------------Conversion to mapped_file_source (deprecated)-------------// + + operator mapped_file_source&() { return delegate_; } + operator const mapped_file_source&() const { return delegate_; } + + //--------------Stream interface------------------------------------------// + + // open overload taking a parameters object + template + void open(const basic_mapped_file_params& p); + + // open overload taking a list of parameters + template + void open( const Path& path, + mapmode mode, + size_type length = max_length, + stream_offset offset = 0 ); + + // open overload taking a list of parameters, including a + // std::ios_base::openmode (deprecated) + template + void open( const Path& path, + BOOST_IOS::openmode mode = + BOOST_IOS::in | BOOST_IOS::out, + size_type length = max_length, + stream_offset offset = 0 ); + + bool is_open() const { return delegate_.is_open(); } + void close() { delegate_.close(); } + operator safe_bool() const { return delegate_; } + bool operator!() const { return !delegate_; } + mapmode flags() const { return delegate_.flags(); } + + //--------------Container interface---------------------------------------// + + size_type size() const { return delegate_.size(); } + char* data() const; + const char* const_data() const { return delegate_.data(); } + iterator begin() const { return data(); } + const_iterator const_begin() const { return const_data(); } + iterator end() const { return data() + size(); } + const_iterator const_end() const { return const_data() + size(); } + + //--------------Query admissible offsets----------------------------------// + + // Returns the allocation granularity for virtual memory. Values passed + // as offsets must be multiples of this value. + static int alignment() { return mapped_file_source::alignment(); } + + //--------------File access----------------------------------------------// + + void resize(stream_offset new_size); +private: + delegate_type delegate_; +}; + +//------------------Definition of mapped_file_sink----------------------------// + +class BOOST_IOSTREAMS_DECL mapped_file_sink : private mapped_file { +public: + friend struct boost::iostreams::operations; + using mapped_file::mapmode; + using mapped_file::readonly; + using mapped_file::readwrite; + using mapped_file::priv; + using mapped_file::char_type; + struct category + : public sink_tag, + public direct_tag, + public closable_tag + { }; + using mapped_file::size_type; + using mapped_file::iterator; + using mapped_file::max_length; + using mapped_file::is_open; + using mapped_file::close; + using mapped_file::operator safe_bool; + using mapped_file::operator !; + using mapped_file::flags; + using mapped_file::size; + using mapped_file::data; + using mapped_file::begin; + using mapped_file::end; + using mapped_file::alignment; + using mapped_file::resize; + + // Default constructor + mapped_file_sink() { } + + // Constructor taking a parameters object + template + explicit mapped_file_sink(const basic_mapped_file_params& p); + + // Constructor taking a list of parameters + template + explicit mapped_file_sink( const Path& path, + size_type length = max_length, + boost::intmax_t offset = 0, + mapmode flags = readwrite ); + + // Copy Constructor + mapped_file_sink(const mapped_file_sink& other); + + // open overload taking a parameters object + template + void open(const basic_mapped_file_params& p); + + // open overload taking a list of parameters + template + void open( const Path& path, + size_type length = max_length, + boost::intmax_t offset = 0, + mapmode flags = readwrite ); +}; + +//------------------Implementation of mapped_file_source----------------------// + +template +mapped_file_source::mapped_file_source(const basic_mapped_file_params& p) +{ init(); open(p); } + +template +mapped_file_source::mapped_file_source( + const Path& path, size_type length, boost::intmax_t offset) +{ init(); open(path, length, offset); } + +template +void mapped_file_source::open(const basic_mapped_file_params& p) +{ + param_type params(p); + if (params.flags) { + if (params.flags != mapped_file::readonly) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags")); + } else { + if (params.mode & BOOST_IOS::out) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid mode")); + params.mode |= BOOST_IOS::in; + } + open_impl(params); +} + +template +void mapped_file_source::open( + const Path& path, size_type length, boost::intmax_t offset) +{ + param_type p(path); + p.length = length; + p.offset = offset; + open(p); +} + +//------------------Implementation of mapped_file-----------------------------// + +template +mapped_file::mapped_file(const basic_mapped_file_params& p) +{ open(p); } + +template +mapped_file::mapped_file( + const Path& path, mapmode flags, + size_type length, stream_offset offset ) +{ open(path, flags, length, offset); } + +template +mapped_file::mapped_file( + const Path& path, BOOST_IOS::openmode mode, + size_type length, stream_offset offset ) +{ open(path, mode, length, offset); } + +template +void mapped_file::open(const basic_mapped_file_params& p) +{ delegate_.open_impl(p); } + +template +void mapped_file::open( + const Path& path, mapmode flags, + size_type length, stream_offset offset ) +{ + param_type p(path); + p.flags = flags; + p.length = length; + p.offset = offset; + open(p); +} + +template +void mapped_file::open( + const Path& path, BOOST_IOS::openmode mode, + size_type length, stream_offset offset ) +{ + param_type p(path); + p.mode = mode; + p.length = length; + p.offset = offset; + open(p); +} + +inline char* mapped_file::data() const +{ return (flags() != readonly) ? const_cast(delegate_.data()) : 0; } + +//------------------Implementation of mapped_file_sink------------------------// + +template +mapped_file_sink::mapped_file_sink(const basic_mapped_file_params& p) +{ open(p); } + +template +mapped_file_sink::mapped_file_sink( + const Path& path, size_type length, + boost::intmax_t offset, mapmode flags ) +{ open(path, length, offset, flags); } + +template +void mapped_file_sink::open(const basic_mapped_file_params& p) +{ + param_type params(p); + if (params.flags) { + if (params.flags & mapped_file::readonly) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags")); + } else { + if (params.mode & BOOST_IOS::in) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid mode")); + params.mode |= BOOST_IOS::out; + } + mapped_file::open(params); +} + +template +void mapped_file_sink::open( + const Path& path, size_type length, + boost::intmax_t offset, mapmode flags ) +{ + param_type p(path); + p.flags = flags; + p.length = length; + p.offset = offset; + open(p); +} + +//------------------Specialization of direct_impl-----------------------------// + +template<> +struct operations + : boost::iostreams::detail::close_impl +{ + static std::pair + input_sequence(mapped_file_source& src) + { + return std::make_pair( const_cast(src.begin()), + const_cast(src.end()) ); + } +}; + +template<> +struct operations + : boost::iostreams::detail::close_impl +{ + static std::pair + input_sequence(mapped_file& file) + { + return std::make_pair(file.begin(), file.end()); + } + static std::pair + output_sequence(mapped_file& file) + { + return std::make_pair(file.begin(), file.end()); + } +}; + +template<> +struct operations + : boost::iostreams::detail::close_impl +{ + static std::pair + output_sequence(mapped_file_sink& sink) + { + return std::make_pair(sink.begin(), sink.end()); + } +}; + +//------------------Definition of mapmode operators---------------------------// + +inline mapped_file::mapmode +operator|(mapped_file::mapmode a, mapped_file::mapmode b) +{ + return static_cast + (static_cast(a) | static_cast(b)); +} + +inline mapped_file::mapmode +operator&(mapped_file::mapmode a, mapped_file::mapmode b) +{ + return static_cast + (static_cast(a) & static_cast(b)); +} + +inline mapped_file::mapmode +operator^(mapped_file::mapmode a, mapped_file::mapmode b) +{ + return static_cast + (static_cast(a) ^ static_cast(b)); +} + +inline mapped_file::mapmode +operator~(mapped_file::mapmode a) +{ + return static_cast(~static_cast(a)); +} + +inline mapped_file::mapmode +operator|=(mapped_file::mapmode& a, mapped_file::mapmode b) +{ + return a = a | b; +} + +inline mapped_file::mapmode +operator&=(mapped_file::mapmode& a, mapped_file::mapmode b) +{ + return a = a & b; +} + +inline mapped_file::mapmode +operator^=(mapped_file::mapmode& a, mapped_file::mapmode b) +{ + return a = a ^ b; +} + +} } // End namespaces iostreams, boost. + +#include // pops abi_suffix.hpp pragmas + +#endif // #ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/null.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/null.hpp new file mode 100644 index 0000000000..6a723218e6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/device/null.hpp @@ -0,0 +1,66 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2004-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Inspired by Daryle Walker's nullbuf from his More I/O submission. + +#ifndef BOOST_IOSTREAMS_NULL_HPP_INCLUDED +#define BOOST_IOSTREAMS_NULL_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // openmode, streamsize. +#include + +namespace boost { namespace iostreams { + +template +class basic_null_device { +public: + typedef Ch char_type; + struct category + : public Mode, + public device_tag, + public closable_tag + { }; + std::streamsize read(Ch*, std::streamsize) { return 0; } + std::streamsize write(const Ch*, std::streamsize n) { return n; } + std::streampos seek( stream_offset, BOOST_IOS::seekdir, + BOOST_IOS::openmode = + BOOST_IOS::in | BOOST_IOS::out ) + { return -1; } + void close() { } + void close(BOOST_IOS::openmode) { } +}; + +template +struct basic_null_source : private basic_null_device { + typedef Ch char_type; + typedef source_tag category; + using basic_null_device::read; + using basic_null_device::close; +}; + +typedef basic_null_source null_source; +typedef basic_null_source wnull_source; + +template +struct basic_null_sink : private basic_null_device { + typedef Ch char_type; + typedef sink_tag category; + using basic_null_device::write; + using basic_null_device::close; +}; + +typedef basic_null_sink null_sink; +typedef basic_null_sink wnull_sink; + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_NULL_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/aggregate.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/aggregate.hpp new file mode 100644 index 0000000000..afac8e0cf4 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/aggregate.hpp @@ -0,0 +1,168 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_AGGREGATE_FILTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_AGGREGATE_FILTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // copy, min. +#include +#include // back_inserter +#include +#include // default_device_buffer_size +#include +#include +#include // openmode, streamsize. +#include +#include // check_eof +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { + +// +// Template name: aggregate_filter. +// Template paramters: +// Ch - The character type. +// Alloc - The allocator type. +// Description: Utility for defining DualUseFilters which filter an +// entire stream at once. To use, override the protected virtual +// member do_filter. +// Note: This filter should not be copied while it is in use. +// +template > +class aggregate_filter { +public: + typedef Ch char_type; + struct category + : dual_use, + filter_tag, + multichar_tag, + closable_tag + { }; + aggregate_filter() : ptr_(0), state_(0) { } + virtual ~aggregate_filter() { } + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + using namespace std; + assert(!(state_ & f_write)); + state_ |= f_read; + if (!(state_ & f_eof)) + do_read(src); + std::streamsize amt = + (std::min)(n, static_cast(data_.size() - ptr_)); + if (amt) { + BOOST_IOSTREAMS_CHAR_TRAITS(char_type)::copy(s, &data_[ptr_], amt); + ptr_ += amt; + } + return detail::check_eof(amt); + } + + template + std::streamsize write(Sink&, const char_type* s, std::streamsize n) + { + assert(!(state_ & f_read)); + state_ |= f_write; + data_.insert(data_.end(), s, s + n); + return n; + } + + template + void close(Sink& sink, BOOST_IOS::openmode which) + { + if ((state_ & f_read) != 0 && which == BOOST_IOS::in) + close_impl(); + if ((state_ & f_write) != 0 && which == BOOST_IOS::out) { + try { + vector_type filtered; + do_filter(data_, filtered); + do_write( + sink, &filtered[0], + static_cast(filtered.size()) + ); + } catch (...) { + close_impl(); + throw; + } + close_impl(); + } + } + +protected: + typedef std::vector vector_type; + typedef typename vector_type::size_type size_type; +private: + virtual void do_filter(const vector_type& src, vector_type& dest) = 0; + virtual void do_close() { } + + template + void do_read(Source& src) + { + using std::streamsize; + vector_type data; + while (true) { + const std::streamsize size = default_device_buffer_size; + Ch buf[size]; + std::streamsize amt; + if ((amt = boost::iostreams::read(src, buf, size)) == -1) + break; + data.insert(data.end(), buf, buf + amt); + } + do_filter(data, data_); + state_ |= f_eof; + } + + template + void do_write(Sink& sink, const char_type* s, std::streamsize n) + { + typedef typename iostreams::category_of::type category; + typedef is_convertible can_write; + do_write(sink, s, n, can_write()); + } + + template + void do_write(Sink& sink, const char_type* s, std::streamsize n, mpl::true_) + { iostreams::write(sink, s, n); } + + template + void do_write(Sink&, const char_type*, std::streamsize, mpl::false_) { } + + void close_impl() + { + data_.clear(); + ptr_ = 0; + state_ = 0; + do_close(); + } + + enum flag_type { + f_read = 1, + f_write = f_read << 1, + f_eof = f_write << 1 + }; + + // Note: typically will not be copied while vector contains data. + vector_type data_; + size_type ptr_; + int state_; +}; +BOOST_IOSTREAMS_PIPABLE(aggregate_filter, 1) + +} } // End namespaces iostreams, boost. + +#include // MSVC. + +#endif // #ifndef BOOST_IOSTREAMS_AGGREGATE_FILTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/bzip2.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/bzip2.hpp new file mode 100644 index 0000000000..bc4b18f04a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/bzip2.hpp @@ -0,0 +1,414 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Note: custom allocators are not supported on VC6, since that compiler +// had trouble finding the function zlib_base::do_init. + +#ifndef BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED +#define BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // allocator. +#include // bad_alloc. +#include // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM. +#include +#include // buffer size. +#include +#include +#include +#include +#include // failure, streamsize. +#include +#include +#include + +// Must come last. +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4251 4231 4660) +#endif +#include + +// Temporary fix. +#undef small + +namespace boost { namespace iostreams { + +namespace bzip2 { + + // Typedefs. + +typedef void* (*alloc_func)(void*, int, int); +typedef void (*free_func)(void*, void*); + + // Status codes + +BOOST_IOSTREAMS_DECL extern const int ok; +BOOST_IOSTREAMS_DECL extern const int run_ok; +BOOST_IOSTREAMS_DECL extern const int flush_ok; +BOOST_IOSTREAMS_DECL extern const int finish_ok; +BOOST_IOSTREAMS_DECL extern const int stream_end; +BOOST_IOSTREAMS_DECL extern const int sequence_error; +BOOST_IOSTREAMS_DECL extern const int param_error; +BOOST_IOSTREAMS_DECL extern const int mem_error; +BOOST_IOSTREAMS_DECL extern const int data_error; +BOOST_IOSTREAMS_DECL extern const int data_error_magic; +BOOST_IOSTREAMS_DECL extern const int io_error; +BOOST_IOSTREAMS_DECL extern const int unexpected_eof; +BOOST_IOSTREAMS_DECL extern const int outbuff_full; +BOOST_IOSTREAMS_DECL extern const int config_error; + + // Action codes + +BOOST_IOSTREAMS_DECL extern const int finish; +BOOST_IOSTREAMS_DECL extern const int run; + + // Default values + +const int default_block_size = 9; +const int default_work_factor = 30; +const bool default_small = false; + +} // End namespace bzip2. + +// +// Class name: bzip2_params. +// Description: Encapsulates the parameters passed to deflateInit2 +// to customize compression. +// +struct bzip2_params { + + // Non-explicit constructor for compression. + bzip2_params( int block_size = bzip2::default_block_size, + int work_factor = bzip2::default_work_factor ) + : block_size(block_size), work_factor(work_factor) + { } + + // Constructor for decompression. + bzip2_params(bool small) + : small(small), work_factor(0) + { } + + union { + int block_size; // For compression. + bool small; // For decompression. + }; + int work_factor; +}; + +// +// Class name: bzip2_error. +// Description: Subclass of std::ios_base::failure thrown to indicate +// bzip2 errors other than out-of-memory conditions. +// +class BOOST_IOSTREAMS_DECL bzip2_error : public BOOST_IOSTREAMS_FAILURE { +public: + explicit bzip2_error(int error); + int error() const { return error_; } + static void check BOOST_PREVENT_MACRO_SUBSTITUTION(int error); +private: + int error_; +}; + +namespace detail { + +template +struct bzip2_allocator_traits { +#ifndef BOOST_NO_STD_ALLOCATOR + typedef typename Alloc::template rebind::other type; +#else + typedef std::allocator type; +#endif +}; + +template< typename Alloc, + typename Base = // VC6 workaround (C2516) + BOOST_DEDUCED_TYPENAME bzip2_allocator_traits::type > +struct bzip2_allocator : private Base { +private: + typedef typename Base::size_type size_type; +public: + BOOST_STATIC_CONSTANT(bool, custom = + (!is_same, Base>::value)); + typedef typename bzip2_allocator_traits::type allocator_type; + static void* allocate(void* self, int items, int size); + static void deallocate(void* self, void* address); +}; + +class BOOST_IOSTREAMS_DECL bzip2_base { +public: + typedef char char_type; +protected: + bzip2_base(const bzip2_params& params); + ~bzip2_base(); + bzip2_params& params() { return params_; } + bool& ready() { return ready_; } + template + void init( bool compress, + bzip2_allocator& alloc ) + { + bool custom = bzip2_allocator::custom; + do_init( compress, + #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + custom ? bzip2_allocator::allocate : 0, + custom ? bzip2_allocator::deallocate : 0, + #endif + custom ? &alloc : 0 ); + } + void before( const char*& src_begin, const char* src_end, + char*& dest_begin, char* dest_end ); + void after(const char*& src_begin, char*& dest_begin); + int check_end(const char* src_begin, const char* dest_begin); + int compress(int action); + int decompress(); + void end(bool compress); +private: + void do_init( bool compress, + #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + bzip2::alloc_func, + bzip2::free_func, + #endif + void* derived ); + bzip2_params params_; + void* stream_; // Actual type: bz_stream*. + bool ready_; +}; + +// +// Template name: bzip2_compressor_impl +// Description: Model of SymmetricFilter implementing compression by +// delegating to the libbzip2 function BZ_bzCompress. +// +template > +class bzip2_compressor_impl + : public bzip2_base, + #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) + public + #endif + bzip2_allocator +{ +public: + bzip2_compressor_impl(const bzip2_params&); + bool filter( const char*& src_begin, const char* src_end, + char*& dest_begin, char* dest_end, bool flush ); + void close(); +private: + void init(); + bool eof_; // Guard to make sure filter() isn't called after it returns false. +}; + +// +// Template name: bzip2_compressor +// Description: Model of SymmetricFilter implementing decompression by +// delegating to the libbzip2 function BZ_bzDecompress. +// +template > +class bzip2_decompressor_impl + : public bzip2_base, + #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) + public + #endif + bzip2_allocator +{ +public: + bzip2_decompressor_impl(bool small = bzip2::default_small); + bool filter( const char*& begin_in, const char* end_in, + char*& begin_out, char* end_out, bool flush ); + void close(); +private: + void init(); + bool eof_; // Guard to make sure filter() isn't called after it returns false. +}; + +} // End namespace detail. + +// +// Template name: bzip2_compressor +// Description: Model of InputFilter and OutputFilter implementing +// compression using libbzip2. +// +template > +struct basic_bzip2_compressor + : symmetric_filter, Alloc> +{ +private: + typedef detail::bzip2_compressor_impl impl_type; + typedef symmetric_filter base_type; +public: + typedef typename base_type::char_type char_type; + typedef typename base_type::category category; + basic_bzip2_compressor( const bzip2_params& = bzip2::default_block_size, + int buffer_size = default_device_buffer_size ); +}; +BOOST_IOSTREAMS_PIPABLE(basic_bzip2_compressor, 1) + +typedef basic_bzip2_compressor<> bzip2_compressor; + +// +// Template name: bzip2_decompressor +// Description: Model of InputFilter and OutputFilter implementing +// decompression using libbzip2. +// +template > +struct basic_bzip2_decompressor + : symmetric_filter, Alloc> +{ +private: + typedef detail::bzip2_decompressor_impl impl_type; + typedef symmetric_filter base_type; +public: + typedef typename base_type::char_type char_type; + typedef typename base_type::category category; + basic_bzip2_decompressor( bool small = bzip2::default_small, + int buffer_size = default_device_buffer_size ); +}; +BOOST_IOSTREAMS_PIPABLE(basic_bzip2_decompressor, 1) + +typedef basic_bzip2_decompressor<> bzip2_decompressor; + +//----------------------------------------------------------------------------// + +//------------------Implementation of bzip2_allocator-------------------------// + +namespace detail { + +template +void* bzip2_allocator::allocate(void* self, int items, int size) +{ + size_type len = items * size; + char* ptr = + static_cast(self)->allocate + (len + sizeof(size_type) + #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) + , (char*)0 + #endif + ); + *reinterpret_cast(ptr) = len; + return ptr + sizeof(size_type); +} + +template +void bzip2_allocator::deallocate(void* self, void* address) +{ + char* ptr = reinterpret_cast(address) - sizeof(size_type); + size_type len = *reinterpret_cast(ptr) + sizeof(size_type); + static_cast(self)->deallocate(ptr, len); +} + +//------------------Implementation of bzip2_compressor_impl-------------------// + +template +bzip2_compressor_impl::bzip2_compressor_impl(const bzip2_params& p) + : bzip2_base(p), eof_(false) { } + +template +bool bzip2_compressor_impl::filter + ( const char*& src_begin, const char* src_end, + char*& dest_begin, char* dest_end, bool flush ) +{ + if (!ready()) init(); + if (eof_) return false; + before(src_begin, src_end, dest_begin, dest_end); + int result = compress(flush ? bzip2::finish : bzip2::run); + after(src_begin, dest_begin); + bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result); + return !(eof_ = result == bzip2::stream_end); +} + +template +void bzip2_compressor_impl::close() +{ + try { + end(true); + } catch (...) { + eof_ = false; + throw; + } + eof_ = false; +} + +template +inline void bzip2_compressor_impl::init() +{ bzip2_base::init(true, static_cast&>(*this)); } + +//------------------Implementation of bzip2_decompressor_impl-----------------// + +template +bzip2_decompressor_impl::bzip2_decompressor_impl(bool small) + : bzip2_base(bzip2_params(small)), eof_(false) { } + +template +bool bzip2_decompressor_impl::filter + ( const char*& src_begin, const char* src_end, + char*& dest_begin, char* dest_end, bool flush ) +{ + if (eof_) { + // reset the stream if there are more characters + if(src_begin == src_end) + return false; + else + close(); + } + if (!ready()) + init(); + before(src_begin, src_end, dest_begin, dest_end); + int result = decompress(); + if(result == bzip2::ok && flush) + result = check_end(src_begin, dest_begin); + after(src_begin, dest_begin); + bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result); + eof_ = result == bzip2::stream_end; + return true; +} + +template +void bzip2_decompressor_impl::close() +{ + try { + end(false); + } catch (...) { + eof_ = false; + throw; + } + eof_ = false; +} + +template +inline void bzip2_decompressor_impl::init() +{ bzip2_base::init(false, static_cast&>(*this)); } +} // End namespace detail. + +//------------------Implementation of bzip2_decompressor----------------------// + +template +basic_bzip2_compressor::basic_bzip2_compressor + (const bzip2_params& p, int buffer_size) + : base_type(buffer_size, p) + { } + +//------------------Implementation of bzip2_decompressor----------------------// + +template +basic_bzip2_decompressor::basic_bzip2_decompressor + (bool small, int buffer_size) + : base_type(buffer_size, small) + { } + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#include // Pops abi_suffix.hpp pragmas. +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // #ifndef BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/counter.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/counter.hpp new file mode 100644 index 0000000000..e47cba9417 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/counter.hpp @@ -0,0 +1,82 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_COUNTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_COUNTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // count. +#include +#include +#include +#include + +// Must come last. +#include // VC7.1 C4244. + +namespace boost { namespace iostreams { + +// +// Template name: basic_counter. +// Template paramters: +// Ch - The character type. +// Description: Filter which counts lines and characters. +// +template +class basic_counter { +public: + typedef Ch char_type; + struct category + : dual_use, + filter_tag, + multichar_tag, + optimally_buffered_tag + { }; + explicit basic_counter(int first_line = 0, int first_char = 0) + : lines_(first_line), chars_(first_char) + { } + int lines() const { return lines_; } + int characters() const { return chars_; } + std::streamsize optimal_buffer_size() const { return 0; } + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + std::streamsize result = iostreams::read(src, s, n); + if (result == -1) + return -1; + lines_ += std::count(s, s + result, char_traits::newline()); + chars_ += result; + return result; + } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { + std::streamsize result = iostreams::write(snk, s, n); + lines_ += std::count(s, s + result, char_traits::newline()); + chars_ += result; + return result; + } +private: + int lines_; + int chars_; +}; +BOOST_IOSTREAMS_PIPABLE(basic_counter, 1) + + +typedef basic_counter counter; +typedef basic_counter wcounter; + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_COUNTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/grep.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/grep.hpp new file mode 100644 index 0000000000..a41da5b992 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/grep.hpp @@ -0,0 +1,109 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + + * File: boost/iostreams/filter/grep.hpp + * Date: Mon May 26 17:48:45 MDT 2008 + * Copyright: 2008 CodeRage, LLC + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Defines the class template basic_grep_filter and its specializations + * grep_filter and wgrep_filter. + */ + +#ifndef BOOST_IOSTREAMS_GREP_FILTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_GREP_FILTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +#include // allocator. +#include +#include +#include +#include + +namespace boost { namespace iostreams { + +namespace grep { + +const int invert = 1; +const int whole_line = invert << 1; + +} // End namespace grep. + +template< typename Ch, + typename Tr = regex_traits, + typename Alloc = std::allocator > +class basic_grep_filter : public basic_line_filter { +private: + typedef basic_line_filter base_type; +public: + typedef typename base_type::char_type char_type; + typedef typename base_type::category category; + typedef char_traits traits_type; + typedef typename base_type::string_type string_type; + typedef basic_regex regex_type; + typedef regex_constants::match_flag_type match_flag_type; + basic_grep_filter( const regex_type& re, + match_flag_type match_flags = + regex_constants::match_default, + int options = 0 ); + int count() const { return count_; } + + template + void close(Sink& snk, BOOST_IOS::openmode which) + { + base_type::close(snk, which); + options_ &= ~f_initialized; + } +private: + virtual string_type do_filter(const string_type& line) + { + if ((options_ & f_initialized) == 0) { + options_ |= f_initialized; + count_ = 0; + } + bool matches = (options_ & grep::whole_line) ? + regex_match(line, re_, match_flags_) : + regex_search(line, re_, match_flags_); + if (options_ & grep::invert) + matches = !matches; + if (matches) + ++count_; + return matches ? line + traits_type::newline() : string_type(); + } + + // Private flags bitwise OR'd with constants from namespace grep + enum flags_ { + f_initialized = 65536 + }; + + regex_type re_; + match_flag_type match_flags_; + int options_; + int count_; +}; +BOOST_IOSTREAMS_PIPABLE(basic_grep_filter, 3) + +typedef basic_grep_filter grep_filter; +typedef basic_grep_filter wgrep_filter; + +//------------------Implementation of basic_grep_filter-----------------------// + +template +basic_grep_filter::basic_grep_filter + (const regex_type& re, match_flag_type match_flags, int options) + : base_type(true), re_(re), match_flags_(match_flags), + options_(options), count_(0) + { } + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/gzip.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/gzip.hpp new file mode 100644 index 0000000000..b4982c24ac --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/gzip.hpp @@ -0,0 +1,757 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains the definitions of the class templates gzip_compressor and +// gzip_decompressor for reading and writing files in the gzip file format +// (RFC 1952). Based in part on work of Jonathan de Halleux; see [...] + +#ifndef BOOST_IOSTREAMS_GZIP_HPP_INCLUDED +#define BOOST_IOSTREAMS_GZIP_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // STATIC_CONSTANT, STDC_NAMESPACE, + // DINKUMWARE_STDLIB, __STL_CONFIG_H. +#include // min. +#include +#include // EOF. +#include // size_t. +#include // std::time_t. +#include // allocator. +#include // Put size_t in std. +#include +#include // uint8_t, uint32_t. +#include // buffer size. +#include +#include +#include +#include // failure. +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4309) // Truncation of constant value. +#endif + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { using ::time_t; } +#endif + +namespace boost { namespace iostreams { + +//------------------Definitions of constants----------------------------------// + +namespace gzip { + +using namespace boost::iostreams::zlib; + + // Error codes used by gzip_error. + +const int zlib_error = 1; +const int bad_crc = 2; // Recorded crc doesn't match data. +const int bad_length = 3; // Recorded length doesn't match data. +const int bad_header = 4; // Malformed header. +const int bad_footer = 5; // Malformed footer. +const int bad_method = 6; // Unsupported compression method. + +namespace magic { + + // Magic numbers used by gzip header. + +const int id1 = 0x1f; +const int id2 = 0x8b; + +} // End namespace magic. + +namespace method { + + // Codes used for the 'CM' byte of the gzip header. + +const int deflate = 8; + +} // End namespace method. + +namespace flags { + + // Codes used for the 'FLG' byte of the gzip header. + +const int text = 1; +const int header_crc = 2; +const int extra = 4; +const int name = 8; +const int comment = 16; + +} // End namespace flags. + +namespace extra_flags { + + // Codes used for the 'XFL' byte of the gzip header. + +const int best_compression = 2; +const int best_speed = 4; + +} // End namespace extra_flags. + + // Codes used for the 'OS' byte of the gzip header. + +const int os_fat = 0; +const int os_amiga = 1; +const int os_vms = 2; +const int os_unix = 3; +const int os_vm_cms = 4; +const int os_atari = 5; +const int os_hpfs = 6; +const int os_macintosh = 7; +const int os_z_system = 8; +const int os_cp_m = 9; +const int os_tops_20 = 10; +const int os_ntfs = 11; +const int os_qdos = 12; +const int os_acorn = 13; +const int os_unknown = 255; + +} // End namespace gzip. + +//------------------Definition of gzip_params---------------------------------// + +// +// Class name: gzip_params. +// Description: Subclass of zlib_params with an additional field +// representing a file name. +// +struct gzip_params : zlib_params { + + // Non-explicit constructor. + gzip_params( int level = gzip::default_compression, + int method = gzip::deflated, + int window_bits = gzip::default_window_bits, + int mem_level = gzip::default_mem_level, + int strategy = gzip::default_strategy, + std::string file_name = "", + std::string comment = "", + std::time_t mtime = 0 ) + : zlib_params(level, method, window_bits, mem_level, strategy), + file_name(file_name), comment(comment), mtime(mtime) + { } + std::string file_name; + std::string comment; + std::time_t mtime; +}; + +//------------------Definition of gzip_error----------------------------------// + +// +// Class name: gzip_error. +// Description: Subclass of std::ios_base::failure thrown to indicate +// zlib errors other than out-of-memory conditions. +// +class gzip_error : public BOOST_IOSTREAMS_FAILURE { +public: + explicit gzip_error(int error) + : BOOST_IOSTREAMS_FAILURE("gzip error"), + error_(error), zlib_error_code_(zlib::okay) { } + explicit gzip_error(const zlib_error& e) + : BOOST_IOSTREAMS_FAILURE("gzip error"), + error_(gzip::zlib_error), zlib_error_code_(e.error()) + { } + int error() const { return error_; } + int zlib_error_code() const { return zlib_error_code_; } +private: + int error_; + int zlib_error_code_; +}; + +//------------------Definition of gzip_compressor-----------------------------// + +// +// Template name: gzip_compressor +// Description: Model of OutputFilter implementing compression in the +// gzip format. +// +template > +class basic_gzip_compressor : basic_zlib_compressor { +private: + typedef basic_zlib_compressor base_type; +public: + typedef char char_type; + struct category + : dual_use, + filter_tag, + multichar_tag, + closable_tag + { }; + basic_gzip_compressor( const gzip_params& = gzip::default_compression, + int buffer_size = default_device_buffer_size ); + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + std::streamsize result = 0; + + // Read header. + if (!(flags_ & f_header_done)) + result += read_string(s, n, header_); + + // Read body. + if (!(flags_ & f_body_done)) { + + // Read from basic_zlib_filter. + std::streamsize amt = base_type::read(src, s + result, n - result); + if (amt != -1) { + result += amt; + if (amt < n - result) { // Double-check for EOF. + amt = base_type::read(src, s + result, n - result); + if (amt != -1) + result += amt; + } + } + if (amt == -1) + prepare_footer(); + } + + // Read footer. + if ((flags_ & f_body_done) != 0 && result < n) + result += read_string(s + result, n - result, footer_); + + return result != 0 ? result : -1; + } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { + if (!(flags_ & f_header_done)) { + std::streamsize amt = + static_cast(header_.size() - offset_); + offset_ += boost::iostreams::write(snk, header_.data() + offset_, amt); + if (offset_ == header_.size()) + flags_ |= f_header_done; + else + return 0; + } + return base_type::write(snk, s, n); + } + + template + void close(Sink& snk, BOOST_IOS::openmode m) + { + try { + // Close zlib compressor. + base_type::close(snk, m); + + if (m == BOOST_IOS::out) { + if (flags_ & f_header_done) { + + // Write final fields of gzip file format. + write_long(this->crc(), snk); + write_long(this->total_in(), snk); + } + } + } catch(...) { + close_impl(); + throw; + } + close_impl(); + } +private: + static gzip_params normalize_params(gzip_params p); + void prepare_footer(); + std::streamsize read_string(char* s, std::streamsize n, std::string& str); + + template + static void write_long(long n, Sink& next, boost::mpl::true_) + { + boost::iostreams::put(next, static_cast(0xFF & n)); + boost::iostreams::put(next, static_cast(0xFF & (n >> 8))); + boost::iostreams::put(next, static_cast(0xFF & (n >> 16))); + boost::iostreams::put(next, static_cast(0xFF & (n >> 24))); + } + template + static void write_long(long n, Sink& next, boost::mpl::false_) + { + } + template + static void write_long(long n, Sink& next) + { + typedef typename category_of::type category; + typedef is_convertible can_write; + write_long(n, next, can_write()); + } + + void close_impl() + { + #if BOOST_WORKAROUND(__GNUC__, == 2) && defined(__STL_CONFIG_H) || \ + BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) \ + /**/ + footer_.erase(0, std::string::npos); + #else + footer_.clear(); + #endif + offset_ = 0; + flags_ = 0; + } + + enum state_type { + f_header_done = 1, + f_body_done = f_header_done << 1, + f_footer_done = f_body_done << 1 + }; + std::string header_; + std::string footer_; + std::size_t offset_; + int flags_; +}; +BOOST_IOSTREAMS_PIPABLE(basic_gzip_compressor, 1) + +typedef basic_gzip_compressor<> gzip_compressor; + +//------------------Definition of helper templates for decompression----------// + +namespace detail { + +// Processes gzip headers +class BOOST_IOSTREAMS_DECL gzip_header { +public: + gzip_header() { reset(); } + + // Members for processing header data + void process(char c); + bool done() const { return state_ == s_done; } + void reset(); + + // Members for accessing header data + std::string file_name() const { return file_name_; } + std::string comment() const { return comment_; } + bool text() const { return (flags_ & gzip::flags::text) != 0; } + int os() const { return os_; } + std::time_t mtime() const { return mtime_; } +private: + enum state_type { + s_id1 = 1, + s_id2 = s_id1 + 1, + s_cm = s_id2 + 1, + s_flg = s_cm + 1, + s_mtime = s_flg + 1, + s_xfl = s_mtime + 1, + s_os = s_xfl + 1, + s_xlen = s_os + 1, + s_extra = s_xlen + 1, + s_name = s_extra + 1, + s_comment = s_name + 1, + s_hcrc = s_comment + 1, + s_done = s_hcrc + 1 + }; + std::string file_name_; + std::string comment_; + int os_; + std::time_t mtime_; + int flags_; + int state_; + int offset_; // Offset within fixed-length region. + int xlen_; // Bytes remaining in extra field. +}; + +// Processes gzip footers +class BOOST_IOSTREAMS_DECL gzip_footer { +public: + gzip_footer() { reset(); } + + // Members for processing footer data + void process(char c); + bool done() const { return state_ == s_done; } + void reset(); + + // Members for accessing footer data + zlib::ulong crc() const { return crc_; } + zlib::ulong uncompressed_size() const { return isize_; } +private: + enum state_type { + s_crc = 1, + s_isize = s_crc + 1, + s_done = s_isize + 1 + }; + zlib::ulong crc_; + zlib::ulong isize_; + int state_; + int offset_; +}; + +} // End namespace boost::iostreams::detail. + +//------------------Definition of basic_gzip_decompressor---------------------// + +// +// Template name: basic_gzip_decompressor +// Description: Model of InputFilter implementing compression in the +// gzip format. +// +template > +class basic_gzip_decompressor : basic_zlib_decompressor { +private: + typedef basic_zlib_decompressor base_type; + typedef typename base_type::string_type string_type; +public: + typedef char char_type; + struct category + : dual_use, + filter_tag, + multichar_tag, + closable_tag + { }; + basic_gzip_decompressor( int window_bits = gzip::default_window_bits, + int buffer_size = default_device_buffer_size ); + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { + std::streamsize result = 0; + while(result < n) { + if(state_ == s_start) { + state_ = s_header; + header_.reset(); + footer_.reset(); + } + if (state_ == s_header) { + int c = s[result++]; + header_.process(c); + if (header_.done()) + state_ = s_body; + } else if (state_ == s_body) { + try { + std::streamsize amt = + base_type::write(snk, s + result, n - result); + result += amt; + if (!this->eof()) { + break; + } else { + state_ = s_footer; + } + } catch (const zlib_error& e) { + boost::throw_exception(gzip_error(e)); + } + } else { // state_ == s_footer + if (footer_.done()) { + if (footer_.crc() != this->crc()) + boost::throw_exception(gzip_error(gzip::bad_crc)); + + base_type::close(snk, BOOST_IOS::out); + state_ = s_start; + } else { + int c = s[result++]; + footer_.process(c); + } + } + } + return result; + } + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + typedef char_traits traits_type; + std::streamsize result = 0; + peekable_source peek(src, putback_); + while (result < n && state_ != s_done) { + if (state_ == s_start) { + state_ = s_header; + header_.reset(); + footer_.reset(); + } + if (state_ == s_header) { + int c = boost::iostreams::get(peek); + if (traits_type::is_eof(c)) { + boost::throw_exception(gzip_error(gzip::bad_header)); + } else if (traits_type::would_block(c)) { + break; + } + header_.process(c); + if (header_.done()) + state_ = s_body; + } else if (state_ == s_body) { + try { + std::streamsize amt = + base_type::read(peek, s + result, n - result); + if (amt != -1) { + result += amt; + if (amt < n - result) + break; + } else { + peek.putback(this->unconsumed_input()); + state_ = s_footer; + } + } catch (const zlib_error& e) { + boost::throw_exception(gzip_error(e)); + } + } else { // state_ == s_footer + int c = boost::iostreams::get(peek); + if (traits_type::is_eof(c)) { + boost::throw_exception(gzip_error(gzip::bad_footer)); + } else if (traits_type::would_block(c)) { + break; + } + footer_.process(c); + if (footer_.done()) { + if (footer_.crc() != this->crc()) + boost::throw_exception(gzip_error(gzip::bad_crc)); + int c = boost::iostreams::get(peek); + if (traits_type::is_eof(c)) { + state_ = s_done; + } else { + peek.putback(c); + base_type::close(peek, BOOST_IOS::in); + state_ = s_start; + header_.reset(); + footer_.reset(); + } + } + } + } + if (peek.has_unconsumed_input()) { + putback_ = peek.unconsumed_input(); + } else { + putback_.clear(); + } + return result != 0 || state_ != s_done ? + result : + -1; + } + + template + void close(Source& src, BOOST_IOS::openmode m) + { + try { + base_type::close(src, m); + } catch (const zlib_error& e) { + state_ = s_start; + boost::throw_exception(gzip_error(e)); + } + if (m == BOOST_IOS::out) { + if (state_ == s_start || state_ == s_header) + boost::throw_exception(gzip_error(gzip::bad_header)); + else if (state_ == s_body) + boost::throw_exception(gzip_error(gzip::bad_footer)); + else if (state_ == s_footer) { + if (!footer_.done()) + boost::throw_exception(gzip_error(gzip::bad_footer)); + else if(footer_.crc() != this->crc()) + boost::throw_exception(gzip_error(gzip::bad_crc)); + } else { + assert(!"Bad state"); + } + } + state_ = s_start; + } + + std::string file_name() const { return header_.file_name(); } + std::string comment() const { return header_.comment(); } + bool text() const { return header_.text(); } + int os() const { return header_.os(); } + std::time_t mtime() const { return header_.mtime(); } +private: + static gzip_params make_params(int window_bits); + + // Source adapter allowing an arbitrary character sequence to be put back. + template + struct peekable_source { + typedef char char_type; + struct category : source_tag, peekable_tag { }; + explicit peekable_source(Source& src, const string_type& putback = "") + : src_(src), putback_(putback), offset_(0) + { } + std::streamsize read(char* s, std::streamsize n) + { + std::streamsize result = 0; + + // Copy characters from putback buffer + std::streamsize pbsize = + static_cast(putback_.size()); + if (offset_ < pbsize) { + result = (std::min)(n, pbsize - offset_); + BOOST_IOSTREAMS_CHAR_TRAITS(char)::copy( + s, putback_.data() + offset_, result); + offset_ += result; + if (result == n) + return result; + } + + // Read characters from src_ + std::streamsize amt = + boost::iostreams::read(src_, s + result, n - result); + return amt != -1 ? + result + amt : + result ? result : -1; + } + bool putback(char c) + { + if (offset_) { + putback_[--offset_] = c; + } else { + boost::throw_exception( + boost::iostreams::detail::bad_putback()); + } + return true; + } + void putback(const string_type& s) + { + putback_.replace(0, offset_, s); + offset_ = 0; + } + + // Returns true if some characters have been putback but not re-read. + bool has_unconsumed_input() const + { + return offset_ < static_cast(putback_.size()); + } + + // Returns the sequence of characters that have been put back but not re-read. + string_type unconsumed_input() const + { + return string_type(putback_, offset_, putback_.size() - offset_); + } + Source& src_; + string_type putback_; + std::streamsize offset_; + }; + + enum state_type { + s_start = 1, + s_header = s_start + 1, + s_body = s_header + 1, + s_footer = s_body + 1, + s_done = s_footer + 1 + }; + detail::gzip_header header_; + detail::gzip_footer footer_; + string_type putback_; + int state_; +}; +BOOST_IOSTREAMS_PIPABLE(basic_gzip_decompressor, 1) + +typedef basic_gzip_decompressor<> gzip_decompressor; + +//------------------Implementation of gzip_compressor-------------------------// + +template +basic_gzip_compressor::basic_gzip_compressor + (const gzip_params& p, int buffer_size) + : base_type(normalize_params(p), buffer_size), + offset_(0), flags_(0) +{ + // Calculate gzip header. + bool has_name = !p.file_name.empty(); + bool has_comment = !p.comment.empty(); + + std::string::size_type length = + 10 + + (has_name ? p.file_name.size() + 1 : 0) + + (has_comment ? p.comment.size() + 1 : 0); + // + 2; // Header crc confuses gunzip. + int flags = + //gzip::flags::header_crc + + (has_name ? gzip::flags::name : 0) + + (has_comment ? gzip::flags::comment : 0); + int extra_flags = + ( p.level == zlib::best_compression ? + gzip::extra_flags::best_compression : + 0 ) + + ( p.level == zlib::best_speed ? + gzip::extra_flags::best_speed : + 0 ); + header_.reserve(length); + header_ += gzip::magic::id1; // ID1. + header_ += gzip::magic::id2; // ID2. + header_ += gzip::method::deflate; // CM. + header_ += static_cast(flags); // FLG. + header_ += static_cast(0xFF & p.mtime); // MTIME. + header_ += static_cast(0xFF & (p.mtime >> 8)); + header_ += static_cast(0xFF & (p.mtime >> 16)); + header_ += static_cast(0xFF & (p.mtime >> 24)); + header_ += static_cast(extra_flags); // XFL. + header_ += static_cast(gzip::os_unknown); // OS. + if (has_name) { + header_ += p.file_name; + header_ += '\0'; + } + if (has_comment) { + header_ += p.comment; + header_ += '\0'; + } +} + +template +gzip_params basic_gzip_compressor::normalize_params(gzip_params p) +{ + p.noheader = true; + p.calculate_crc = true; + return p; +} + +template +void basic_gzip_compressor::prepare_footer() +{ + boost::iostreams::back_insert_device out(footer_); + write_long(this->crc(), out); + write_long(this->total_in(), out); + flags_ |= f_body_done; + offset_ = 0; +} + +template +std::streamsize basic_gzip_compressor::read_string + (char* s, std::streamsize n, std::string& str) +{ + std::streamsize avail = + static_cast(str.size() - offset_); + std::streamsize amt = (std::min)(avail, n); + std::copy( str.data() + offset_, + str.data() + offset_ + amt, + s ); + offset_ += amt; + if ( !(flags_ & f_header_done) && + offset_ == static_cast(str.size()) ) + { + flags_ |= f_header_done; + } + return amt; +} + +//------------------Implementation of gzip_decompressor-----------------------// + +template +basic_gzip_decompressor::basic_gzip_decompressor + (int window_bits, int buffer_size) + : base_type(make_params(window_bits), buffer_size), + state_(s_start) + { } + +template +gzip_params basic_gzip_decompressor::make_params(int window_bits) +{ + gzip_params p; + p.window_bits = window_bits; + p.noheader = true; + p.calculate_crc = true; + return p; +} + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif // #ifndef BOOST_IOSTREAMS_GZIP_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/line.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/line.hpp new file mode 100644 index 0000000000..081747e451 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/line.hpp @@ -0,0 +1,227 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_LINE_FILTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_LINE_FILTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // min. +#include +#include // allocator. +#include +#include // BOOST_STATIC_CONSTANT. +#include +#include +#include // openmode, streamsize. +#include // check_eof +#include +#include + +// Must come last. +#include // VC7.1 C4244. + +namespace boost { namespace iostreams { + +// +// Template name: line_filter. +// Template paramters: +// Ch - The character type. +// Alloc - The allocator type. +// Description: Filter which processes data one line at a time. +// +template< typename Ch, + typename Alloc = + #if BOOST_WORKAROUND(__GNUC__, < 3) + typename std::basic_string::allocator_type + #else + std::allocator + #endif + > +class basic_line_filter { +private: + typedef typename std::basic_string::traits_type string_traits; +public: + typedef Ch char_type; + typedef char_traits traits_type; + typedef std::basic_string< + Ch, + string_traits, + Alloc + > string_type; + struct category + : dual_use, + filter_tag, + multichar_tag, + closable_tag + { }; +protected: + basic_line_filter(bool suppress_newlines = false) + : pos_(string_type::npos), + flags_(suppress_newlines ? f_suppress : 0) + { } +public: + virtual ~basic_line_filter() { } + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + using namespace std; + assert(!(flags_ & f_write)); + flags_ |= f_read; + + // Handle unfinished business. + std::streamsize result = 0; + if (!cur_line_.empty() && (result = read_line(s, n)) == n) + return n; + + typename traits_type::int_type status = traits_type::good(); + while (result < n && !traits_type::is_eof(status)) { + + // Call next_line() to retrieve a line of filtered text, and + // read_line() to copy it into buffer s. + if (traits_type::would_block(status = next_line(src))) + return result; + result += read_line(s + result, n - result); + } + + return detail::check_eof(result); + } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { + using namespace std; + assert(!(flags_ & f_read)); + flags_ |= f_write; + + // Handle unfinished business. + if (pos_ != string_type::npos && !write_line(snk)) + return 0; + + const char_type *cur = s, *next; + while (true) { + + // Search for the next full line in [cur, s + n), filter it + // and write it to snk. + typename string_type::size_type rest = n - (cur - s); + if ((next = traits_type::find(cur, rest, traits_type::newline()))) { + cur_line_.append(cur, next - cur); + cur = next + 1; + if (!write_line(snk)) + return static_cast(cur - s); + } else { + cur_line_.append(cur, rest); + return n; + } + } + } + + template + void close(Sink& snk, BOOST_IOS::openmode which) + { + if ((flags_ & f_read) && which == BOOST_IOS::in) + close_impl(); + + if ((flags_ & f_write) && which == BOOST_IOS::out) { + try { + if (!cur_line_.empty()) + write_line(snk); + } catch (...) { + try { + close_impl(); + } catch (...) { } + throw; + } + close_impl(); + } + } +private: + virtual string_type do_filter(const string_type& line) = 0; + + // Copies filtered characters fron the current line into + // the given buffer. + std::streamsize read_line(char_type* s, std::streamsize n) + { + using namespace std; + std::streamsize result = + (std::min) (n, static_cast(cur_line_.size())); + traits_type::copy(s, cur_line_.data(), result); + cur_line_.erase(0, result); + return result; + } + + // Attempts to retrieve a line of text from the given source; returns + // an int_type as a good/eof/would_block status code. + template + typename traits_type::int_type next_line(Source& src) + { + using namespace std; + typename traits_type::int_type c; + while ( traits_type::is_good(c = iostreams::get(src)) && + c != traits_type::newline() ) + { + cur_line_ += traits_type::to_int_type(c); + } + if (!traits_type::would_block(c)) { + if (!cur_line_.empty() || c == traits_type::newline()) + cur_line_ = do_filter(cur_line_); + if (c == traits_type::newline() && (flags_ & f_suppress) == 0) + cur_line_ += c; + } + return c; // status indicator. + } + + // Filters the current line and attemps to write it to the given sink. + // Returns true for success. + template + bool write_line(Sink& snk) + { + string_type line = do_filter(cur_line_); + if ((flags_ & f_suppress) == 0) + line += traits_type::newline(); + std::streamsize amt = static_cast(line.size()); + bool result = iostreams::write_if(snk, line.data(), amt) == amt; + if (result) + clear(); + return result; + } + + void close_impl() + { + clear(); + flags_ &= f_suppress; + } + + void clear() + { + cur_line_.erase(); + pos_ = string_type::npos; + } + + enum flag_type { + f_read = 1, + f_write = f_read << 1, + f_suppress = f_write << 1 + }; + + string_type cur_line_; + typename string_type::size_type pos_; + int flags_; +}; +BOOST_IOSTREAMS_PIPABLE(basic_line_filter, 2) + +typedef basic_line_filter line_filter; +typedef basic_line_filter wline_filter; + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_LINE_FILTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/newline.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/newline.hpp new file mode 100644 index 0000000000..279fb9a831 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/newline.hpp @@ -0,0 +1,442 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// NOTE: I hope to replace the current implementation with a much simpler +// one. + +#ifndef BOOST_IOSTREAMS_NEWLINE_FILTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_NEWLINE_FILTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include // logic_error. +#include // BOOST_STATIC_CONSTANT. +#include +#include +#include // BOOST_IOSTREAMS_FAILURE +#include // get +#include // put +#include +#include +#include +#include +#include + +// Must come last. +#include + +#define BOOST_IOSTREAMS_ASSERT_UNREACHABLE(val) \ + (assert("unreachable code" == 0), val) \ + /**/ + +namespace boost { namespace iostreams { + +namespace newline { + +const char CR = 0x0D; +const char LF = 0x0A; + + // Flags for configuring newline_filter. + +// Exactly one of the following three flags must be present. + +const int posix = 1; // Use CR as line separator. +const int mac = 2; // Use LF as line separator. +const int dos = 4; // Use CRLF as line separator. +const int mixed = 8; // Mixed line endings. +const int final_newline = 16; +const int platform_mask = posix | dos | mac; + +} // End namespace newline. + +namespace detail { + +class newline_base { +public: + bool is_posix() const + { + return !is_mixed() && (flags_ & newline::posix) != 0; + } + bool is_dos() const + { + return !is_mixed() && (flags_ & newline::dos) != 0; + } + bool is_mac() const + { + return !is_mixed() && (flags_ & newline::mac) != 0; + } + bool is_mixed_posix() const { return (flags_ & newline::posix) != 0; } + bool is_mixed_dos() const { return (flags_ & newline::dos) != 0; } + bool is_mixed_mac() const { return (flags_ & newline::mac) != 0; } + bool is_mixed() const + { + int platform = + (flags_ & newline::posix) != 0 ? + newline::posix : + (flags_ & newline::dos) != 0 ? + newline::dos : + (flags_ & newline::mac) != 0 ? + newline::mac : + 0; + return (flags_ & ~platform & newline::platform_mask) != 0; + } + bool has_final_newline() const + { + return (flags_ & newline::final_newline) != 0; + } +protected: + newline_base(int flags) : flags_(flags) { } + int flags_; +}; + +} // End namespace detail. + +class newline_error + : public BOOST_IOSTREAMS_FAILURE, public detail::newline_base +{ +private: + friend class newline_checker; + newline_error(int flags) + : BOOST_IOSTREAMS_FAILURE("bad line endings"), + detail::newline_base(flags) + { } +}; + +class newline_filter { +public: + typedef char char_type; + struct category + : dual_use, + filter_tag, + closable_tag + { }; + + explicit newline_filter(int target) : flags_(target) + { + if ( target != iostreams::newline::posix && + target != iostreams::newline::dos && + target != iostreams::newline::mac ) + { + boost::throw_exception(std::logic_error("bad flags")); + } + } + + template + int get(Source& src) + { + using iostreams::newline::CR; + using iostreams::newline::LF; + + assert((flags_ & f_write) == 0); + flags_ |= f_read; + + if (flags_ & (f_has_LF | f_has_EOF)) { + if (flags_ & f_has_LF) + return newline(); + else + return EOF; + } + + int c = + (flags_ & f_has_CR) == 0 ? + iostreams::get(src) : + CR; + + if (c == WOULD_BLOCK ) + return WOULD_BLOCK; + + if (c == CR) { + flags_ |= f_has_CR; + + int d; + if ((d = iostreams::get(src)) == WOULD_BLOCK) + return WOULD_BLOCK; + + if (d == LF) { + flags_ &= ~f_has_CR; + return newline(); + } + + if (d == EOF) { + flags_ |= f_has_EOF; + } else { + iostreams::putback(src, d); + } + + flags_ &= ~f_has_CR; + return newline(); + } + + if (c == LF) + return newline(); + + return c; + } + + template + bool put(Sink& dest, char c) + { + using iostreams::newline::CR; + using iostreams::newline::LF; + + assert((flags_ & f_read) == 0); + flags_ |= f_write; + + if ((flags_ & f_has_LF) != 0) + return c == LF ? + newline(dest) : + newline(dest) && this->put(dest, c); + + if (c == LF) + return newline(dest); + + if ((flags_ & f_has_CR) != 0) + return newline(dest) ? + this->put(dest, c) : + false; + + if (c == CR) { + flags_ |= f_has_CR; + return true; + } + + return iostreams::put(dest, c); + } + + template + void close(Sink& dest, BOOST_IOS::openmode) + { + typedef typename iostreams::category_of::type category; + if ((flags_ & f_write) != 0 && (flags_ & f_has_CR) != 0) + newline_if_sink(dest); + flags_ &= ~f_has_LF; // Restore original flags. + } +private: + + // Returns the appropriate element of a newline sequence. + int newline() + { + using iostreams::newline::CR; + using iostreams::newline::LF; + + switch (flags_ & iostreams::newline::platform_mask) { + case iostreams::newline::posix: + return LF; + case iostreams::newline::mac: + return CR; + case iostreams::newline::dos: + if (flags_ & f_has_LF) { + flags_ &= ~f_has_LF; + return LF; + } else { + flags_ |= f_has_LF; + return CR; + } + } + return BOOST_IOSTREAMS_ASSERT_UNREACHABLE(0); + } + + // Writes a newline sequence. + template + bool newline(Sink& dest) + { + using iostreams::newline::CR; + using iostreams::newline::LF; + + bool success = false; + switch (flags_ & iostreams::newline::platform_mask) { + case iostreams::newline::posix: + success = boost::iostreams::put(dest, LF); + break; + case iostreams::newline::mac: + success = boost::iostreams::put(dest, CR); + break; + case iostreams::newline::dos: + if ((flags_ & f_has_LF) != 0) { + if ((success = boost::iostreams::put(dest, LF))) + flags_ &= ~f_has_LF; + } else if (boost::iostreams::put(dest, CR)) { + if (!(success = boost::iostreams::put(dest, LF))) + flags_ |= f_has_LF; + } + break; + } + if (success) + flags_ &= ~f_has_CR; + return success; + } + + // Writes a newline sequence if the given device is a Sink. + template + void newline_if_sink(Device& dest) + { + typedef typename iostreams::category_of::type category; + newline_if_sink(dest, is_convertible()); + } + + template + void newline_if_sink(Sink& dest, mpl::true_) { newline(dest); } + + template + void newline_if_sink(Source&, mpl::false_) { } + + enum flags { + f_has_LF = 32768, + f_has_CR = f_has_LF << 1, + f_has_newline = f_has_CR << 1, + f_has_EOF = f_has_newline << 1, + f_read = f_has_EOF << 1, + f_write = f_read << 1 + }; + int flags_; +}; +BOOST_IOSTREAMS_PIPABLE(newline_filter, 0) + +class newline_checker : public detail::newline_base { +public: + typedef char char_type; + struct category + : dual_use_filter_tag, + closable_tag + { }; + explicit newline_checker(int target = newline::mixed) + : detail::newline_base(0), target_(target), open_(false) + { } + template + int get(Source& src) + { + using newline::CR; + using newline::LF; + + if (!open_) { + open_ = true; + source() = 0; + } + + int c; + if ((c = iostreams::get(src)) == WOULD_BLOCK) + return WOULD_BLOCK; + + // Update source flags. + if (c != EOF) + source() &= ~f_line_complete; + if ((source() & f_has_CR) != 0) { + if (c == LF) { + source() |= newline::dos; + source() |= f_line_complete; + } else { + source() |= newline::mac; + if (c == EOF) + source() |= f_line_complete; + } + } else if (c == LF) { + source() |= newline::posix; + source() |= f_line_complete; + } + source() = (source() & ~f_has_CR) | (c == CR ? f_has_CR : 0); + + // Check for errors. + if ( c == EOF && + (target_ & newline::final_newline) != 0 && + (source() & f_line_complete) == 0 ) + { + fail(); + } + if ( (target_ & newline::platform_mask) != 0 && + (source() & ~target_ & newline::platform_mask) != 0 ) + { + fail(); + } + + return c; + } + + template + bool put(Sink& dest, int c) + { + using iostreams::newline::CR; + using iostreams::newline::LF; + + if (!open_) { + open_ = true; + source() = 0; + } + + if (!iostreams::put(dest, c)) + return false; + + // Update source flags. + source() &= ~f_line_complete; + if ((source() & f_has_CR) != 0) { + if (c == LF) { + source() |= newline::dos; + source() |= f_line_complete; + } else { + source() |= newline::mac; + } + } else if (c == LF) { + source() |= newline::posix; + source() |= f_line_complete; + } + source() = (source() & ~f_has_CR) | (c == CR ? f_has_CR : 0); + + // Check for errors. + if ( (target_ & newline::platform_mask) != 0 && + (source() & ~target_ & newline::platform_mask) != 0 ) + { + fail(); + } + + return true; + } + + template + void close(Sink&, BOOST_IOS::openmode) + { + using iostreams::newline::final_newline; + + // Update final_newline flag. + if ( (source() & f_has_CR) != 0 || + (source() & f_line_complete) != 0 ) + { + source() |= final_newline; + } + + // Clear non-sticky flags. + source() &= ~(f_has_CR | f_line_complete); + + // Check for errors. + if ( (target_ & final_newline) != 0 && + (source() & final_newline) == 0 ) + { + fail(); + } + } +private: + void fail() { boost::throw_exception(newline_error(source())); } + int& source() { return flags_; } + int source() const { return flags_; } + + enum flags { + f_has_CR = 32768, + f_line_complete = f_has_CR << 1 + }; + + int target_; // Represents expected input. + bool open_; +}; +BOOST_IOSTREAMS_PIPABLE(newline_checker, 0) + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_NEWLINE_FILTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/regex.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/regex.hpp new file mode 100644 index 0000000000..e6efd6d8ae --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/regex.hpp @@ -0,0 +1,98 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // allocator. +#include +#include +#include +#include + +namespace boost { namespace iostreams { + +template< typename Ch, + typename Tr = regex_traits, + typename Alloc = std::allocator > +class basic_regex_filter : public aggregate_filter { +private: + typedef aggregate_filter base_type; +public: + typedef typename base_type::char_type char_type; + typedef typename base_type::category category; + typedef std::basic_string string_type; + typedef basic_regex regex_type; + typedef regex_constants::match_flag_type flag_type; + typedef match_results match_type; + typedef function1 formatter; + + basic_regex_filter( const regex_type& re, + const formatter& replace, + flag_type flags = regex_constants::match_default ) + : re_(re), replace_(replace), flags_(flags) { } + basic_regex_filter( const regex_type& re, + const string_type& fmt, + flag_type flags = regex_constants::match_default, + flag_type fmt_flags = regex_constants::format_default ) + : re_(re), replace_(simple_formatter(fmt, fmt_flags)), flags_(flags) { } + basic_regex_filter( const regex_type& re, + const char_type* fmt, + flag_type flags = regex_constants::match_default, + flag_type fmt_flags = regex_constants::format_default ) + : re_(re), replace_(simple_formatter(fmt, fmt_flags)), flags_(flags) { } +private: + typedef typename base_type::vector_type vector_type; + void do_filter(const vector_type& src, vector_type& dest) + { + typedef regex_iterator iterator; + if (src.empty()) + return; + iterator first(&src[0], &src[0] + src.size(), re_, flags_); + iterator last; + const Ch* suffix = 0; + for (; first != last; ++first) { + dest.insert( dest.end(), + first->prefix().first, + first->prefix().second ); + string_type replacement = replace_(*first); + dest.insert( dest.end(), + replacement.begin(), + replacement.end() ); + suffix = first->suffix().first; + } + if (suffix) { + dest.insert(dest.end(), suffix, &src[0] + src.size()); + } else { + dest.insert(dest.end(), &src[0], &src[0] + src.size()); + } + } + struct simple_formatter { + simple_formatter(const string_type& fmt, flag_type fmt_flags) + : fmt_(fmt), fmt_flags_(fmt_flags) { } + string_type operator() (const match_type& match) const + { return match.format(fmt_, fmt_flags_); } + string_type fmt_; + flag_type fmt_flags_; + }; + regex_type re_; + formatter replace_; + flag_type flags_; +}; +BOOST_IOSTREAMS_PIPABLE(basic_regex_filter, 3) + +typedef basic_regex_filter regex_filter; +typedef basic_regex_filter wregex_filter; + + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/stdio.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/stdio.hpp new file mode 100644 index 0000000000..e2addf569c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/stdio.hpp @@ -0,0 +1,84 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Based on the work of Christopher Diggins. + +#ifndef BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // allocator. +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { + +namespace detail { + +} // End namespace detail. + +template > +class basic_stdio_filter : public aggregate_filter { +private: + typedef aggregate_filter base_type; +public: + typedef typename base_type::char_type char_type; + typedef typename base_type::category category; + typedef typename base_type::vector_type vector_type; +private: + static std::istream& standard_input(char*) { return std::cin; } + static std::ostream& standard_output(char*) { return std::cout; } +#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS + static std::wistream& standard_input(wchar_t*) { return std::wcin; } + static std::wostream& standard_output(wchar_t*) { return std::wcout; } +#endif // BOOST_IOSTREAMS_NO_WIDE_STREAMS + + struct scoped_redirector { // Thanks to Maxim Egorushkin. + typedef BOOST_IOSTREAMS_CHAR_TRAITS(Ch) traits_type; + typedef BOOST_IOSTREAMS_BASIC_IOS(Ch, traits_type) ios_type; + typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, traits_type) streambuf_type; + scoped_redirector( ios_type& ios, + streambuf_type* newbuf ) + : ios_(ios), old_(ios.rdbuf(newbuf)) + { } + ~scoped_redirector() { ios_.rdbuf(old_); } + scoped_redirector& operator=(const scoped_redirector&); + ios_type& ios_; + streambuf_type* old_; + }; + + virtual void do_filter() = 0; + virtual void do_filter(const vector_type& src, vector_type& dest) + { + stream_buffer< basic_array_source > + srcbuf(&src[0], &src[0] + src.size()); + stream_buffer< back_insert_device > + destbuf(iostreams::back_inserter(dest)); + scoped_redirector redirect_input(standard_input((Ch*)0), &srcbuf); + scoped_redirector redirect_output(standard_output((Ch*)0), &destbuf); + do_filter(); + } +}; +BOOST_IOSTREAMS_PIPABLE(basic_stdio_filter, 2) + +typedef basic_stdio_filter stdio_filter; +typedef basic_stdio_filter wstdio_wfilter; + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/symmetric.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/symmetric.hpp new file mode 100644 index 0000000000..f4e8eac145 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/symmetric.hpp @@ -0,0 +1,310 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Contains the definitions of the class templates symmetric_filter, +// which models DualUseFilter based on a model of the Symmetric Filter. + +// +// Roughly, a Symmetric Filter is a class type with the following interface: +// +// struct symmetric_filter { +// typedef xxx char_type; +// +// bool filter( const char*& begin_in, const char* end_in, +// char*& begin_out, char* end_out, bool flush ) +// { +// // Consume as many characters as possible from the interval +// // [begin_in, end_in), without exhausting the output range +// // [begin_out, end_out). If flush is true, write as mush output +// // as possible. +// // A return value of true indicates that filter should be called +// // again. More precisely, if flush is false, a return value of +// // false indicates that the natural end of stream has been reached +// // and that all filtered data has been forwarded; if flush is +// // true, a return value of false indicates that all filtered data +// // has been forwarded. +// } +// void close() { /* Reset filter's state. */ } +// }; +// +// Symmetric Filter filters need not be CopyConstructable. +// + +#ifndef BOOST_IOSTREAMS_SYMMETRIC_FILTER_HPP_INCLUDED +#define BOOST_IOSTREAMS_SYMMETRIC_FILTER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // allocator, auto_ptr. +#include // BOOST_DEDUCED_TYPENAME. +#include +#include // buffer size. +#include +#include +#include +#include +#include +#include // read, write. +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { + +template< typename SymmetricFilter, + typename Alloc = + std::allocator< + BOOST_DEDUCED_TYPENAME char_type_of::type + > > +class symmetric_filter { +public: + typedef typename char_type_of::type char_type; + typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type; + typedef std::basic_string string_type; + struct category + : dual_use, + filter_tag, + multichar_tag, + closable_tag + { }; + + // Expands to a sequence of ctors which forward to impl. + #define BOOST_PP_LOCAL_MACRO(n) \ + BOOST_IOSTREAMS_TEMPLATE_PARAMS(n, T) \ + explicit symmetric_filter( \ + int buffer_size BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM_BINARY_PARAMS(n, const T, &t) ) \ + : pimpl_(new impl(buffer_size BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM_PARAMS(n, t))) \ + { assert(buffer_size > 0); } \ + /**/ + #define BOOST_PP_LOCAL_LIMITS (0, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY) + #include BOOST_PP_LOCAL_ITERATE() + #undef BOOST_PP_LOCAL_MACRO + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + using namespace std; + if (!(state() & f_read)) + begin_read(); + + buffer_type& buf = pimpl_->buf_; + int status = (state() & f_eof) != 0 ? f_eof : f_good; + char_type *next_s = s, + *end_s = s + n; + while (true) + { + // Invoke filter if there are unconsumed characters in buffer or if + // filter must be flushed. + bool flush = status == f_eof; + if (buf.ptr() != buf.eptr() || flush) { + const char_type* next = buf.ptr(); + bool done = + !filter().filter(next, buf.eptr(), next_s, end_s, flush); + buf.ptr() = buf.data() + (next - buf.data()); + if (done) + return detail::check_eof( + static_cast(next_s - s) + ); + } + + // If no more characters are available without blocking, or + // if read request has been satisfied, return. + if ( (status == f_would_block && buf.ptr() == buf.eptr()) || + next_s == end_s ) + { + return static_cast(next_s - s); + } + + // Fill buffer. + if (status == f_good) + status = fill(src); + } + } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { + if (!(state() & f_write)) + begin_write(); + + buffer_type& buf = pimpl_->buf_; + const char_type *next_s, *end_s; + for (next_s = s, end_s = s + n; next_s != end_s; ) { + if (buf.ptr() == buf.eptr() && !flush(snk)) + break; + if(!filter().filter(next_s, end_s, buf.ptr(), buf.eptr(), false)) { + flush(snk); + break; + } + } + return static_cast(next_s - s); + } + + template + void close(Sink& snk, BOOST_IOS::openmode mode) + { + if (mode == BOOST_IOS::out) { + + if (!(state() & f_write)) + begin_write(); + + // Repeatedly invoke filter() with no input. + try { + buffer_type& buf = pimpl_->buf_; + char_type dummy; + const char_type* end = &dummy; + bool again = true; + while (again) { + if (buf.ptr() != buf.eptr()) + again = filter().filter( end, end, buf.ptr(), + buf.eptr(), true ); + flush(snk); + } + } catch (...) { + try { close_impl(); } catch (...) { } + throw; + } + close_impl(); + } else { + close_impl(); + } + } + SymmetricFilter& filter() { return *pimpl_; } + string_type unconsumed_input() const; + +// Give impl access to buffer_type on Tru64 +#if !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) + private: +#endif + typedef detail::buffer buffer_type; +private: + buffer_type& buf() { return pimpl_->buf_; } + const buffer_type& buf() const { return pimpl_->buf_; } + int& state() { return pimpl_->state_; } + void begin_read(); + void begin_write(); + + template + int fill(Source& src) + { + std::streamsize amt = iostreams::read(src, buf().data(), buf().size()); + if (amt == -1) { + state() |= f_eof; + return f_eof; + } + buf().set(0, amt); + return amt != 0 ? f_good : f_would_block; + } + + // Attempts to write the contents of the buffer the given Sink. + // Returns true if at least on character was written. + template + bool flush(Sink& snk) + { + typedef typename iostreams::category_of::type category; + typedef is_convertible can_write; + return flush(snk, can_write()); + } + + template + bool flush(Sink& snk, mpl::true_) + { + std::streamsize amt = + static_cast(buf().ptr() - buf().data()); + std::streamsize result = + boost::iostreams::write(snk, buf().data(), amt); + if (result < amt && result > 0) + traits_type::move(buf().data(), buf().data() + result, amt - result); + buf().set(amt - result, buf().size()); + return result != 0; + } + + template + bool flush(Sink&, mpl::false_) { return true;} + + void close_impl(); + + enum flag_type { + f_read = 1, + f_write = f_read << 1, + f_eof = f_write << 1, + f_good, + f_would_block + }; + + struct impl : SymmetricFilter { + + // Expands to a sequence of ctors which forward to SymmetricFilter. + #define BOOST_PP_LOCAL_MACRO(n) \ + BOOST_IOSTREAMS_TEMPLATE_PARAMS(n, T) \ + impl( int buffer_size BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM_BINARY_PARAMS(n, const T, &t) ) \ + : SymmetricFilter(BOOST_PP_ENUM_PARAMS(n, t)), \ + buf_(buffer_size), state_(0) \ + { } \ + /**/ + #define BOOST_PP_LOCAL_LIMITS (0, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY) + #include BOOST_PP_LOCAL_ITERATE() + #undef BOOST_PP_LOCAL_MACRO + + buffer_type buf_; + int state_; + }; + + shared_ptr pimpl_; +}; +BOOST_IOSTREAMS_PIPABLE(symmetric_filter, 2) + +//------------------Implementation of symmetric_filter----------------// + +template +void symmetric_filter::begin_read() +{ + assert(!(state() & f_write)); + state() |= f_read; + buf().set(0, 0); +} + +template +void symmetric_filter::begin_write() +{ + assert(!(state() & f_read)); + state() |= f_write; + buf().set(0, buf().size()); +} + +template +void symmetric_filter::close_impl() +{ + state() = 0; + buf().set(0, 0); + filter().close(); +} + +template +typename symmetric_filter::string_type +symmetric_filter::unconsumed_input() const +{ return string_type(buf().ptr(), buf().eptr()); } + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#include // MSVC. + +#endif // #ifndef BOOST_IOSTREAMS_SYMMETRIC_FILTER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/test.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/test.hpp new file mode 100644 index 0000000000..ea2fd601ca --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/test.hpp @@ -0,0 +1,322 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_FILTER_TEST_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC,put size_t in std. +#include +#include // min. +#include // size_t. +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \ + BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \ + BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ + /**/ +# include // rand. +#endif +#include // memcpy, strlen. +#include +#include +#include +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \ + !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ + !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ + /**/ +# include +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#undef memcpy +#undef rand +#undef strlen + +#if defined(BOOST_NO_STDC_NAMESPACE) && !defined(__LIBCOMO__) +namespace std { + using ::memcpy; + using ::strlen; + #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \ + BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \ + BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ + /**/ + using ::rand; + #endif +} +#endif + +namespace boost { namespace iostreams { + +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_string, std::basic_string, 3) + +const std::streamsize default_increment = 5; + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \ + !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ + !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ + /**/ + std::streamsize rand(int inc) + { + static rand48 random_gen; + static uniform_smallint random_dist(0, inc); + return random_dist(random_gen); + } +#else + std::streamsize rand(int inc) + { + return (std::rand() * inc + 1) / RAND_MAX; + } +#endif + +class non_blocking_source { +public: + typedef char char_type; + struct category + : source_tag, + peekable_tag + { }; + explicit non_blocking_source( const std::string& data, + std::streamsize inc = default_increment ) + : data_(data), inc_(inc), pos_(0) + { } + std::streamsize read(char* s, std::streamsize n) + { + if (pos_ == static_cast(data_.size())) + return -1; + std::streamsize avail = + (std::min) (n, static_cast(data_.size() - pos_)); + std::streamsize amt = (std::min) (rand(inc_), avail); + if (amt) + std::memcpy(s, data_.c_str() + pos_, amt); + pos_ += amt; + return amt; + } + + bool putback(char c) + { + if (pos_ > 0) { + data_[--pos_] = c; + return true; + } + return false; + } +private: + std::string data_; + std::streamsize inc_, pos_; +}; + +class non_blocking_sink : public sink { +public: + non_blocking_sink( std::string& dest, + std::streamsize inc = default_increment ) + : dest_(dest), inc_(inc) + { } + std::streamsize write(const char* s, std::streamsize n) + { + std::streamsize amt = (std::min) (rand(inc_), n); + dest_.insert(dest_.end(), s, s + amt); + return amt; + } +private: + non_blocking_sink& operator=(const non_blocking_sink&); + std::string& dest_; + std::streamsize inc_; +}; + +//--------------Definition of test_input_filter-------------------------------// + +template +bool test_input_filter( Filter filter, + const std::string& input, + const std::string& output, + mpl::true_ ) +{ + for ( int inc = default_increment; + inc < default_increment * 40; + inc += default_increment ) + { + non_blocking_source src(input, inc); + std::string dest; + iostreams::copy(compose(filter, src), iostreams::back_inserter(dest)); + if (dest != output) + return false; + } + return true; +} + +template +bool test_input_filter( Filter filter, + const Source1& input, + const Source2& output, + mpl::false_ ) +{ + std::string in; + std::string out; + iostreams::copy(input, iostreams::back_inserter(in)); + iostreams::copy(output, iostreams::back_inserter(out)); + return test_input_filter(filter, in, out); +} + +template +bool test_input_filter( Filter filter, + const Source1& input, + const Source2& output ) +{ + // Use tag dispatch to compensate for bad overload resolution. + return test_input_filter( filter, input, output, + is_string() ); +} + +//--------------Definition of test_output_filter------------------------------// + +template +bool test_output_filter( Filter filter, + const std::string& input, + const std::string& output, + mpl::true_ ) +{ + for ( int inc = default_increment; + inc < default_increment * 40; + inc += default_increment ) + { + array_source src(input.data(), input.data() + input.size()); + std::string dest; + iostreams::copy(src, compose(filter, non_blocking_sink(dest, inc))); + if (dest != output ) + return false; + } + return true; +} + +template +bool test_output_filter( Filter filter, + const Source1& input, + const Source2& output, + mpl::false_ ) +{ + std::string in; + std::string out; + iostreams::copy(input, iostreams::back_inserter(in)); + iostreams::copy(output, iostreams::back_inserter(out)); + return test_output_filter(filter, in, out); +} + +template +bool test_output_filter( Filter filter, + const Source1& input, + const Source2& output ) +{ + // Use tag dispatch to compensate for bad overload resolution. + return test_output_filter( filter, input, output, + is_string() ); +} + +//--------------Definition of test_filter_pair--------------------------------// + +template +bool test_filter_pair( OutputFilter out, + InputFilter in, + const std::string& data, + mpl::true_ ) +{ + for ( int inc = default_increment; + inc <= default_increment * 40; + inc += default_increment ) + { + { + array_source src(data.data(), data.data() + data.size()); + std::string temp; + std::string dest; + iostreams::copy(src, compose(out, non_blocking_sink(temp, inc))); + iostreams::copy( + compose(in, non_blocking_source(temp, inc)), + iostreams::back_inserter(dest) + ); + if (dest != data) + return false; + } + { + array_source src(data.data(), data.data() + data.size()); + std::string temp; + std::string dest; + iostreams::copy(src, compose(out, non_blocking_sink(temp, inc))); + // truncate the file, this should not loop, it may throw + // std::ios_base::failure, which we swallow. + try { + temp.resize(temp.size() / 2); + iostreams::copy( + compose(in, non_blocking_source(temp, inc)), + iostreams::back_inserter(dest) + ); + } catch(std::ios_base::failure&) {} + } + { + array_source src(data.data(), data.data() + data.size()); + std::string temp; + std::string dest; + iostreams::copy(compose(out, src), non_blocking_sink(temp, inc)); + iostreams::copy( + non_blocking_source(temp, inc), + compose(in, iostreams::back_inserter(dest)) + ); + if (dest != data) + return false; + } + { + array_source src(data.data(), data.data() + data.size()); + std::string temp; + std::string dest; + iostreams::copy(compose(out, src), non_blocking_sink(temp, inc)); + // truncate the file, this should not loop, it may throw + // std::ios_base::failure, which we swallow. + try { + temp.resize(temp.size() / 2); + iostreams::copy( + non_blocking_source(temp, inc), + compose(in, iostreams::back_inserter(dest)) + ); + } catch(std::ios_base::failure&) {} + } + } + return true; +} + +template +bool test_filter_pair( OutputFilter out, + InputFilter in, + const Source& data, + mpl::false_ ) +{ + std::string str; + iostreams::copy(data, iostreams::back_inserter(str)); + return test_filter_pair(out, in, str); +} + +template +bool test_filter_pair( OutputFilter out, + InputFilter in, + const Source& data ) +{ + // Use tag dispatch to compensate for bad overload resolution. + return test_filter_pair(out, in, data, is_string()); +} + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_FILTER_TEST_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/zlib.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/zlib.hpp new file mode 100644 index 0000000000..b0327f3cb8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filter/zlib.hpp @@ -0,0 +1,427 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Note: custom allocators are not supported on VC6, since that compiler +// had trouble finding the function zlib_base::do_init. + +#ifndef BOOST_IOSTREAMS_ZLIB_HPP_INCLUDED +#define BOOST_IOSTREAMS_ZLIB_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // streamsize. +#include // allocator, bad_alloc. +#include +#include // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM. +#include // uint*_t +#include +#include // buffer size. +#include +#include +#include +#include +#include // failure, streamsize. +#include +#include +#include + +// Must come last. +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4251 4231 4660) // Dependencies not exported. +#endif +#include + +namespace boost { namespace iostreams { + +namespace zlib { + // Typedefs + +typedef uint32_t uint; +typedef uint8_t byte; +typedef uint32_t ulong; + +// Prefix 'x' prevents symbols from being redefined when Z_PREFIX is defined +typedef void* (*xalloc_func)(void*, zlib::uint, zlib::uint); +typedef void (*xfree_func)(void*, void*); + + // Compression levels + +BOOST_IOSTREAMS_DECL extern const int no_compression; +BOOST_IOSTREAMS_DECL extern const int best_speed; +BOOST_IOSTREAMS_DECL extern const int best_compression; +BOOST_IOSTREAMS_DECL extern const int default_compression; + + // Compression methods + +BOOST_IOSTREAMS_DECL extern const int deflated; + + // Compression strategies + +BOOST_IOSTREAMS_DECL extern const int default_strategy; +BOOST_IOSTREAMS_DECL extern const int filtered; +BOOST_IOSTREAMS_DECL extern const int huffman_only; + + // Status codes + +BOOST_IOSTREAMS_DECL extern const int okay; +BOOST_IOSTREAMS_DECL extern const int stream_end; +BOOST_IOSTREAMS_DECL extern const int stream_error; +BOOST_IOSTREAMS_DECL extern const int version_error; +BOOST_IOSTREAMS_DECL extern const int data_error; +BOOST_IOSTREAMS_DECL extern const int mem_error; +BOOST_IOSTREAMS_DECL extern const int buf_error; + + // Flush codes + +BOOST_IOSTREAMS_DECL extern const int finish; +BOOST_IOSTREAMS_DECL extern const int no_flush; +BOOST_IOSTREAMS_DECL extern const int sync_flush; + + // Code for current OS + +//BOOST_IOSTREAMS_DECL extern const int os_code; + + // Null pointer constant. + +const int null = 0; + + // Default values + +const int default_window_bits = 15; +const int default_mem_level = 8; +const bool default_crc = false; +const bool default_noheader = false; + +} // End namespace zlib. + +// +// Class name: zlib_params. +// Description: Encapsulates the parameters passed to deflateInit2 +// and inflateInit2 to customize compression and decompression. +// +struct zlib_params { + + // Non-explicit constructor. + zlib_params( int level = zlib::default_compression, + int method = zlib::deflated, + int window_bits = zlib::default_window_bits, + int mem_level = zlib::default_mem_level, + int strategy = zlib::default_strategy, + bool noheader = zlib::default_noheader, + bool calculate_crc = zlib::default_crc ) + : level(level), method(method), window_bits(window_bits), + mem_level(mem_level), strategy(strategy), + noheader(noheader), calculate_crc(calculate_crc) + { } + int level; + int method; + int window_bits; + int mem_level; + int strategy; + bool noheader; + bool calculate_crc; +}; + +// +// Class name: zlib_error. +// Description: Subclass of std::ios::failure thrown to indicate +// zlib errors other than out-of-memory conditions. +// +class BOOST_IOSTREAMS_DECL zlib_error : public BOOST_IOSTREAMS_FAILURE { +public: + explicit zlib_error(int error); + int error() const { return error_; } + static void check BOOST_PREVENT_MACRO_SUBSTITUTION(int error); +private: + int error_; +}; + +namespace detail { + +template +struct zlib_allocator_traits { +#ifndef BOOST_NO_STD_ALLOCATOR + typedef typename Alloc::template rebind::other type; +#else + typedef std::allocator type; +#endif +}; + +template< typename Alloc, + typename Base = // VC6 workaround (C2516) + BOOST_DEDUCED_TYPENAME zlib_allocator_traits::type > +struct zlib_allocator : private Base { +private: + typedef typename Base::size_type size_type; +public: + BOOST_STATIC_CONSTANT(bool, custom = + (!is_same, Base>::value)); + typedef typename zlib_allocator_traits::type allocator_type; + static void* allocate(void* self, zlib::uint items, zlib::uint size); + static void deallocate(void* self, void* address); +}; + +class BOOST_IOSTREAMS_DECL zlib_base { +public: + typedef char char_type; +protected: + zlib_base(); + ~zlib_base(); + void* stream() { return stream_; } + template + void init( const zlib_params& p, + bool compress, + zlib_allocator& zalloc ) + { + bool custom = zlib_allocator::custom; + do_init( p, compress, + #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + custom ? zlib_allocator::allocate : 0, + custom ? zlib_allocator::deallocate : 0, + #endif + &zalloc ); + } + void before( const char*& src_begin, const char* src_end, + char*& dest_begin, char* dest_end ); + void after( const char*& src_begin, char*& dest_begin, + bool compress ); + int xdeflate(int flush); // Prefix 'x' prevents symbols from being + int xinflate(int flush); // redefined when Z_PREFIX is defined + void reset(bool compress, bool realloc); +public: + zlib::ulong crc() const { return crc_; } + int total_in() const { return total_in_; } + int total_out() const { return total_out_; } +private: + void do_init( const zlib_params& p, bool compress, + #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + zlib::xalloc_func, + zlib::xfree_func, + #endif + void* derived ); + void* stream_; // Actual type: z_stream*. + bool calculate_crc_; + zlib::ulong crc_; + zlib::ulong crc_imp_; + int total_in_; + int total_out_; +}; + +// +// Template name: zlib_compressor_impl +// Description: Model of C-Style Filte implementing compression by +// delegating to the zlib function deflate. +// +template > +class zlib_compressor_impl : public zlib_base, public zlib_allocator { +public: + zlib_compressor_impl(const zlib_params& = zlib::default_compression); + ~zlib_compressor_impl(); + bool filter( const char*& src_begin, const char* src_end, + char*& dest_begin, char* dest_end, bool flush ); + void close(); +}; + +// +// Template name: zlib_compressor +// Description: Model of C-Style Filte implementing decompression by +// delegating to the zlib function inflate. +// +template > +class zlib_decompressor_impl : public zlib_base, public zlib_allocator { +public: + zlib_decompressor_impl(const zlib_params&); + zlib_decompressor_impl(int window_bits = zlib::default_window_bits); + ~zlib_decompressor_impl(); + bool filter( const char*& begin_in, const char* end_in, + char*& begin_out, char* end_out, bool flush ); + void close(); + bool eof() const { return eof_; } +private: + bool eof_; +}; + +} // End namespace detail. + +// +// Template name: zlib_compressor +// Description: Model of InputFilter and OutputFilter implementing +// compression using zlib. +// +template > +struct basic_zlib_compressor + : symmetric_filter, Alloc> +{ +private: + typedef detail::zlib_compressor_impl impl_type; + typedef symmetric_filter base_type; +public: + typedef typename base_type::char_type char_type; + typedef typename base_type::category category; + basic_zlib_compressor( const zlib_params& = zlib::default_compression, + int buffer_size = default_device_buffer_size ); + zlib::ulong crc() { return this->filter().crc(); } + int total_in() { return this->filter().total_in(); } +}; +BOOST_IOSTREAMS_PIPABLE(basic_zlib_compressor, 1) + +typedef basic_zlib_compressor<> zlib_compressor; + +// +// Template name: zlib_decompressor +// Description: Model of InputFilter and OutputFilter implementing +// decompression using zlib. +// +template > +struct basic_zlib_decompressor + : symmetric_filter, Alloc> +{ +private: + typedef detail::zlib_decompressor_impl impl_type; + typedef symmetric_filter base_type; +public: + typedef typename base_type::char_type char_type; + typedef typename base_type::category category; + basic_zlib_decompressor( int window_bits = zlib::default_window_bits, + int buffer_size = default_device_buffer_size ); + basic_zlib_decompressor( const zlib_params& p, + int buffer_size = default_device_buffer_size ); + zlib::ulong crc() { return this->filter().crc(); } + int total_out() { return this->filter().total_out(); } + bool eof() { return this->filter().eof(); } +}; +BOOST_IOSTREAMS_PIPABLE(basic_zlib_decompressor, 1) + +typedef basic_zlib_decompressor<> zlib_decompressor; + +//----------------------------------------------------------------------------// + +//------------------Implementation of zlib_allocator--------------------------// + +namespace detail { + +template +void* zlib_allocator::allocate + (void* self, zlib::uint items, zlib::uint size) +{ + size_type len = items * size; + char* ptr = + static_cast(self)->allocate + (len + sizeof(size_type) + #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) + , (char*)0 + #endif + ); + *reinterpret_cast(ptr) = len; + return ptr + sizeof(size_type); +} + +template +void zlib_allocator::deallocate(void* self, void* address) +{ + char* ptr = reinterpret_cast(address) - sizeof(size_type); + size_type len = *reinterpret_cast(ptr) + sizeof(size_type); + static_cast(self)->deallocate(ptr, len); +} + +//------------------Implementation of zlib_compressor_impl--------------------// + +template +zlib_compressor_impl::zlib_compressor_impl(const zlib_params& p) +{ init(p, true, static_cast&>(*this)); } + +template +zlib_compressor_impl::~zlib_compressor_impl() +{ reset(true, false); } + +template +bool zlib_compressor_impl::filter + ( const char*& src_begin, const char* src_end, + char*& dest_begin, char* dest_end, bool flush ) +{ + before(src_begin, src_end, dest_begin, dest_end); + int result = xdeflate(flush ? zlib::finish : zlib::no_flush); + after(src_begin, dest_begin, true); + zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result); + return result != zlib::stream_end; +} + +template +void zlib_compressor_impl::close() { reset(true, true); } + +//------------------Implementation of zlib_decompressor_impl------------------// + +template +zlib_decompressor_impl::zlib_decompressor_impl(const zlib_params& p) + : eof_(false) +{ init(p, false, static_cast&>(*this)); } + +template +zlib_decompressor_impl::~zlib_decompressor_impl() +{ reset(false, false); } + +template +zlib_decompressor_impl::zlib_decompressor_impl(int window_bits) +{ + zlib_params p; + p.window_bits = window_bits; + init(p, false, static_cast&>(*this)); +} + +template +bool zlib_decompressor_impl::filter + ( const char*& src_begin, const char* src_end, + char*& dest_begin, char* dest_end, bool /* flush */ ) +{ + before(src_begin, src_end, dest_begin, dest_end); + int result = xinflate(zlib::sync_flush); + after(src_begin, dest_begin, false); + zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result); + return !(eof_ = result == zlib::stream_end); +} + +template +void zlib_decompressor_impl::close() { + eof_ = false; + reset(false, true); +} + +} // End namespace detail. + +//------------------Implementation of zlib_decompressor-----------------------// + +template +basic_zlib_compressor::basic_zlib_compressor + (const zlib_params& p, int buffer_size) + : base_type(buffer_size, p) { } + +//------------------Implementation of zlib_decompressor-----------------------// + +template +basic_zlib_decompressor::basic_zlib_decompressor + (int window_bits, int buffer_size) + : base_type(buffer_size, window_bits) { } + +template +basic_zlib_decompressor::basic_zlib_decompressor + (const zlib_params& p, int buffer_size) + : base_type(buffer_size, p) { } + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#include // Pops abi_suffix.hpp pragmas. +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // #ifndef BOOST_IOSTREAMS_ZLIB_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filtering_stream.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filtering_stream.hpp new file mode 100644 index 0000000000..548ef0c60a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filtering_stream.hpp @@ -0,0 +1,166 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2004-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_FILTER_STREAM_HPP_INCLUDED +#define BOOST_IOSTREAMS_FILTER_STREAM_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // allocator. +#include +#include +#include // standard streams. +#include +#include +#include // pubsync. +#include +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { + +//--------------Definition of filtered_istream--------------------------------// + +namespace detail { + +template +struct filtering_stream_traits { + typedef typename + iostreams::select< // Disambiguation for Tru64 + mpl::and_< + is_convertible, + is_convertible + >, + BOOST_IOSTREAMS_BASIC_IOSTREAM(Ch, Tr), + is_convertible, + BOOST_IOSTREAMS_BASIC_ISTREAM(Ch, Tr), + else_, + BOOST_IOSTREAMS_BASIC_OSTREAM(Ch, Tr) + >::type stream_type; + typedef typename + iostreams::select< // Dismbiguation required for Tru64. + mpl::and_< + is_convertible, + is_convertible + >, + iostream_tag, + is_convertible, + istream_tag, + else_, + ostream_tag + >::type stream_tag; +}; + +template +class filtering_stream_base + : public access_control< + boost::iostreams::detail::chain_client, + Access + >, + public filtering_stream_traits< + typename Chain::mode, + typename Chain::char_type, + typename Chain::traits_type + >::stream_type +{ +public: + typedef Chain chain_type; + typedef access_control< + boost::iostreams::detail::chain_client, + Access + > client_type; +protected: + typedef typename + filtering_stream_traits< + typename Chain::mode, + typename Chain::char_type, + typename Chain::traits_type + >::stream_type stream_type; + filtering_stream_base() : stream_type(0) { this->set_chain(&chain_); } +private: + void notify() { this->rdbuf(chain_.empty() ? 0 : &chain_.front()); } + Chain chain_; +}; + +} // End namespace detail. + +// +// Macro: BOOST_IOSTREAMS_DEFINE_FILTER_STREAM(name_, chain_type_, default_char_) +// Description: Defines a template derived from std::basic_streambuf which uses +// a chain to perform i/o. The template has the following parameters: +// Mode - the i/o mode. +// Ch - The character type. +// Tr - The character traits type. +// Alloc - The allocator type. +// Access - Indicates accessibility of the chain interface; must be either +// public_ or protected_; defaults to public_. +// Macro parameters: +// name_ - The name of the template to be defined. +// chain_type_ - The name of the chain template. +// default_char_ - The default value for the char template parameter. +// +#define BOOST_IOSTREAMS_DEFINE_FILTER_STREAM(name_, chain_type_, default_char_) \ + template< typename Mode, \ + typename Ch = default_char_, \ + typename Tr = BOOST_IOSTREAMS_CHAR_TRAITS(Ch), \ + typename Alloc = std::allocator, \ + typename Access = public_ > \ + class name_ \ + : public boost::iostreams::detail::filtering_stream_base< \ + chain_type_, Access \ + > \ + { \ + public: \ + typedef Ch char_type; \ + struct category \ + : Mode, \ + closable_tag, \ + detail::filtering_stream_traits::stream_tag \ + { }; \ + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) \ + typedef Mode mode; \ + typedef chain_type_ chain_type; \ + name_() { } \ + BOOST_IOSTREAMS_DEFINE_PUSH_CONSTRUCTOR(name_, mode, Ch, push_impl) \ + ~name_() { \ + if (this->is_complete()) \ + this->rdbuf()->BOOST_IOSTREAMS_PUBSYNC(); \ + } \ + private: \ + typedef access_control< \ + boost::iostreams::detail::chain_client< \ + chain_type_ \ + >, \ + Access \ + > client_type; \ + template \ + void push_impl(const T& t BOOST_IOSTREAMS_PUSH_PARAMS()) \ + { client_type::push(t BOOST_IOSTREAMS_PUSH_ARGS()); } \ + }; \ + /**/ +BOOST_IOSTREAMS_DEFINE_FILTER_STREAM(filtering_stream, boost::iostreams::chain, char) +BOOST_IOSTREAMS_DEFINE_FILTER_STREAM(wfiltering_stream, boost::iostreams::chain, wchar_t) + +typedef filtering_stream filtering_istream; +typedef filtering_stream filtering_ostream; +typedef wfiltering_stream filtering_wistream; +typedef wfiltering_stream filtering_wostream; + +//----------------------------------------------------------------------------// + +} } // End namespace iostreams, boost + +#include // MSVC + +#endif // #ifndef BOOST_IOSTREAMS_FILTER_STREAM_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filtering_streambuf.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filtering_streambuf.hpp new file mode 100644 index 0000000000..e49bf612ee --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/filtering_streambuf.hpp @@ -0,0 +1,70 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_FILTERING_STREAMBUF_HPP_INCLUDED +#define BOOST_IOSTREAMS_FILTERING_STREAMBUF_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // allocator. +#include +#include +#include +#include +#include // pubsync. +#include +#include + +namespace boost { namespace iostreams { + +// +// Macro: BOOST_IOSTREAMS_DEFINE_FILTERBUF(name_, chain_type_, default_char_) +// Description: Defines a template derived from std::basic_streambuf which uses +// a chain to perform i/o. The template has the following parameters: +// Ch - The character type. +// Tr - The character traits type. +// Alloc - The allocator type. +// Access - Indicates accessibility of the chain interface; must be either +// public_ or protected_; defaults to public_. +// +#define BOOST_IOSTREAMS_DEFINE_FILTER_STREAMBUF(name_, chain_type_, default_char_) \ + template< typename Mode, \ + typename Ch = default_char_, \ + typename Tr = BOOST_IOSTREAMS_CHAR_TRAITS(Ch), \ + typename Alloc = std::allocator, \ + typename Access = public_ > \ + class name_ : public boost::iostreams::detail::chainbuf< \ + chain_type_, Mode, Access \ + > \ + { \ + public: \ + typedef Ch char_type; \ + struct category \ + : Mode, closable_tag, streambuf_tag \ + { }; \ + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) \ + typedef Mode mode; \ + typedef chain_type_ chain_type; \ + name_() { } \ + BOOST_IOSTREAMS_DEFINE_PUSH_CONSTRUCTOR(name_, mode, Ch, push_impl) \ + ~name_() { if (this->is_complete()) this->BOOST_IOSTREAMS_PUBSYNC(); } \ + }; \ + /**/ +BOOST_IOSTREAMS_DEFINE_FILTER_STREAMBUF(filtering_streambuf, boost::iostreams::chain, char) +BOOST_IOSTREAMS_DEFINE_FILTER_STREAMBUF(filtering_wstreambuf, boost::iostreams::chain, wchar_t) + +typedef filtering_streambuf filtering_istreambuf; +typedef filtering_streambuf filtering_ostreambuf; +typedef filtering_wstreambuf filtering_wistreambuf; +typedef filtering_wstreambuf filtering_wostreambuf; + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_FILTERING_STREAMBUF_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/flush.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/flush.hpp new file mode 100644 index 0000000000..73d160051c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/flush.hpp @@ -0,0 +1,125 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_FLUSH_HPP_INCLUDED +#define BOOST_IOSTREAMS_FLUSH_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // DEDUCED_TYPENAME, MSVC. +#include +#include +#include +#include +#include +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct flush_device_impl; + +template +struct flush_filter_impl; + +} // End namespace detail. + +template +bool flush(T& t) +{ return detail::flush_device_impl::flush(detail::unwrap(t)); } + +template +bool flush(T& t, Sink& snk) +{ return detail::flush_filter_impl::flush(detail::unwrap(t), snk); } + +namespace detail { + +//------------------Definition of flush_device_impl---------------------------// + +template +struct flush_device_impl + : mpl::if_< + is_custom, + operations, + flush_device_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, ostream_tag, streambuf_tag, flushable_tag, any_tag + >::type + > + >::type + { }; + +template<> +struct flush_device_impl { + template + static bool flush(T& t) + { return t.rdbuf()->BOOST_IOSTREAMS_PUBSYNC() == 0; } +}; + +template<> +struct flush_device_impl { + template + static bool flush(T& t) + { return t.BOOST_IOSTREAMS_PUBSYNC() == 0; } +}; + +template<> +struct flush_device_impl { + template + static bool flush(T& t) { return t.flush(); } +}; + +template<> +struct flush_device_impl { + template + static bool flush(T&) { return true; } +}; + +//------------------Definition of flush_filter_impl---------------------------// + +template +struct flush_filter_impl + : mpl::if_< + is_custom, + operations, + flush_filter_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, flushable_tag, any_tag + >::type + > + >::type + { }; + +template<> +struct flush_filter_impl { + template + static bool flush(T& t, Sink& snk) { return t.flush(snk); } +}; + +template<> +struct flush_filter_impl { + template + static bool flush(T&, Sink&) { return false; } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_FLUSH_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/get.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/get.hpp new file mode 100644 index 0000000000..bb82204b79 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/get.hpp @@ -0,0 +1,17 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_GET_HPP_INCLUDED +#define BOOST_IOSTREAMS_GET_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +#endif // #ifndef BOOST_IOSTREAMS_GET_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/imbue.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/imbue.hpp new file mode 100644 index 0000000000..608481a505 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/imbue.hpp @@ -0,0 +1,82 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_IMBUE_HPP_INCLUDED +#define BOOST_IOSTREAMS_IMBUE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // DEDUCED_TYPENAME, MSVC. +#include +#include +#include +#include +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +namespace detail { + +// Implementation templates for simulated tag dispatch. +template +struct imbue_impl; + +} // End namespace detail. + +template +void imbue(T& t, const Locale& loc) +{ detail::imbue_impl::imbue(detail::unwrap(t), loc); } + +namespace detail { + +//------------------Definition of imbue_impl----------------------------------// + +template +struct imbue_impl + : mpl::if_< + is_custom, + operations, + imbue_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, streambuf_tag, localizable_tag, any_tag + >::type + > + >::type + { }; + +template<> +struct imbue_impl { + template + static void imbue(T&, const Locale&) { } +}; + +template<> +struct imbue_impl { + template + static void imbue(T& t, const Locale& loc) { t.pubimbue(loc); } +}; + +template<> +struct imbue_impl { + template + static void imbue(T& t, const Locale& loc) { t.imbue(loc); } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_IMBUE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/input_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/input_sequence.hpp new file mode 100644 index 0000000000..8e0e77b4f6 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/input_sequence.hpp @@ -0,0 +1,72 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_INPUT_SEQUENCE_HPP_INCLUDED +#define BOOST_IOSTREAMS_INPUT_SEQUENCE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // pair. +#include // DEDUCED_TYPENAME, MSVC. +#include +#include +#include // is_custom +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct input_sequence_impl; + +} // End namespace detail. + +template +inline std::pair< + BOOST_DEDUCED_TYPENAME char_type_of::type*, + BOOST_DEDUCED_TYPENAME char_type_of::type* +> +input_sequence(T& t) +{ return detail::input_sequence_impl::input_sequence(t); } + +namespace detail { + +//------------------Definition of direct_impl-------------------------------// + +template +struct input_sequence_impl + : mpl::if_< + detail::is_custom, + operations, + input_sequence_impl + >::type + { }; + +template<> +struct input_sequence_impl { + template + static std::pair< + BOOST_DEDUCED_TYPENAME char_type_of::type*, + BOOST_DEDUCED_TYPENAME char_type_of::type* + > + input_sequence(U& u) { return u.input_sequence(); } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_INPUT_SEQUENCE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/invert.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/invert.hpp new file mode 100644 index 0000000000..7c3620351e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/invert.hpp @@ -0,0 +1,167 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_INVERT_HPP_INCLUDED +#define BOOST_IOSTREAMS_INVERT_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // copy, min. +#include +#include // BOOST_DEDUCED_TYPENAME. +#include // default_filter_buffer_size. +#include +#include +#include +#include +#include +#include +#include +#include // clear_flags, call_reset +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { + +// +// Template name: inverse. +// Template paramters: +// Filter - A model of InputFilter or OutputFilter. +// Description: Generates an InputFilter from an OutputFilter or +// vice versa. +// +template +class inverse { +private: + BOOST_STATIC_ASSERT(is_filter::value); + typedef typename category_of::type base_category; + typedef reference_wrapper filter_ref; +public: + typedef typename char_type_of::type char_type; + typedef typename int_type_of::type int_type; + typedef char_traits traits_type; + typedef typename + mpl::if_< + is_convertible< + base_category, + input + >, + output, + input + >::type mode; + struct category + : mode, + filter_tag, + multichar_tag, + closable_tag + { }; + explicit inverse( const Filter& filter, + std::streamsize buffer_size = + default_filter_buffer_size) + : pimpl_(new impl(filter, buffer_size)) + { } + + template + std::streamsize read(Source& src, char* s, std::streamsize n) + { + typedef detail::counted_array_sink array_sink; + typedef composite filtered_array_sink; + + assert((flags() & f_write) == 0); + if (flags() == 0) { + flags() = f_read; + buf().set(0, 0); + } + + filtered_array_sink snk(filter(), array_sink(s, n)); + int_type status; + for ( status = traits_type::good(); + snk.second().count() < n && status == traits_type::good(); ) + { + status = buf().fill(src); + buf().flush(snk); + } + return snk.second().count() == 0 && + status == traits_type::eof() + ? + -1 + : + snk.second().count(); + } + + template + std::streamsize write(Sink& dest, const char* s, std::streamsize n) + { + typedef detail::counted_array_source array_source; + typedef composite filtered_array_source; + + assert((flags() & f_read) == 0); + if (flags() == 0) { + flags() = f_write; + buf().set(0, 0); + } + + filtered_array_source src(filter(), array_source(s, n)); + for (bool good = true; src.second().count() < n && good; ) { + buf().fill(src); + good = buf().flush(dest); + } + return src.second().count(); + } + + template + void close(Device& dev) + { + detail::execute_all( + detail::flush_buffer(buf(), dev, (flags() & f_write) != 0), + detail::call_close_all(pimpl_->filter_, dev), + detail::clear_flags(flags()) + ); + } +private: + filter_ref filter() { return boost::ref(pimpl_->filter_); } + detail::buffer& buf() { return pimpl_->buf_; } + int& flags() { return pimpl_->flags_; } + + enum flags_ { + f_read = 1, f_write = 2 + }; + + struct impl { + impl(const Filter& filter, std::streamsize n) + : filter_(filter), buf_(n), flags_(0) + { buf_.set(0, 0); } + Filter filter_; + detail::buffer buf_; + int flags_; + }; + shared_ptr pimpl_; +}; + +// +// Template name: invert. +// Template paramters: +// Filter - A model of InputFilter or OutputFilter. +// Description: Returns an instance of an appropriate specialization of inverse. +// +template +inverse invert(const Filter& f) { return inverse(f); } + +//----------------------------------------------------------------------------// + +} } // End namespaces iostreams, boost. + +#include // MSVC. + +#endif // #ifndef BOOST_IOSTREAMS_INVERT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/operations.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/operations.hpp new file mode 100644 index 0000000000..5da1610816 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/operations.hpp @@ -0,0 +1,26 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_OPERATIONS_HPP_INCLUDED +#define BOOST_IOSTREAMS_OPERATIONS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef BOOST_IOSTREAMS_OPERATIONS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/operations_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/operations_fwd.hpp new file mode 100644 index 0000000000..e2380b12f9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/operations_fwd.hpp @@ -0,0 +1,41 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_OPERATIONS_FWD_HPP_INCLUDED +#define BOOST_IOSTREAMS_OPERATIONS_FWD_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include + +namespace boost { namespace iostreams { + +template +struct operations; + +namespace detail { + +struct custom_tag { }; + +template +struct is_custom + : mpl::not_< + is_base_and_derived< custom_tag, operations > + > + { }; + +} // End namespace detail. + +template +struct operations : detail::custom_tag { }; + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_OPERATIONS_FWD_HPP_INCLUDED //--------------// diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/optimal_buffer_size.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/optimal_buffer_size.hpp new file mode 100644 index 0000000000..79715b2cb8 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/optimal_buffer_size.hpp @@ -0,0 +1,87 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_OPTIMAL_BUFFER_SIZE_HPP_INCLUDED +#define BOOST_IOSTREAMS_OPTIMAL_BUFFER_SIZE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // DEDUCED_TYPENAME, MSVC. +#include +#include // constants. +#include +#include +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct optimal_buffer_size_impl; + +} // End namespace detail. + +template +std::streamsize optimal_buffer_size(const T& t) +{ + typedef detail::optimal_buffer_size_impl impl; + return impl::optimal_buffer_size(detail::unwrap(t)); +} + +namespace detail { + +//------------------Definition of optimal_buffer_size_impl--------------------// + +template +struct optimal_buffer_size_impl + : mpl::if_< + is_custom, + operations, + optimal_buffer_size_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, optimally_buffered_tag, device_tag, filter_tag + >::type + > + >::type + { }; + +template<> +struct optimal_buffer_size_impl { + template + static std::streamsize optimal_buffer_size(const T& t) + { return t.optimal_buffer_size(); } +}; + +template<> +struct optimal_buffer_size_impl { + template + static std::streamsize optimal_buffer_size(const T&) + { return default_device_buffer_size; } +}; + +template<> +struct optimal_buffer_size_impl { + template + static std::streamsize optimal_buffer_size(const T&) + { return default_filter_buffer_size; } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_OPTIMAL_BUFFER_SIZE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/output_sequence.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/output_sequence.hpp new file mode 100644 index 0000000000..36bd7e523b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/output_sequence.hpp @@ -0,0 +1,72 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_OUTPUT_SEQUENCE_HPP_INCLUDED +#define BOOST_IOSTREAMS_OUTPUT_SEQUENCE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // pair. +#include // DEDUCED_TYPENAME, MSVC. +#include +#include +#include // is_custom +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct output_sequence_impl; + +} // End namespace detail. + +template +inline std::pair< + BOOST_DEDUCED_TYPENAME char_type_of::type*, + BOOST_DEDUCED_TYPENAME char_type_of::type* +> +output_sequence(T& t) +{ return detail::output_sequence_impl::output_sequence(t); } + +namespace detail { + +//------------------Definition of output_sequence_impl------------------------// + +template +struct output_sequence_impl + : mpl::if_< + detail::is_custom, + operations, + output_sequence_impl + >::type + { }; + +template<> +struct output_sequence_impl { + template + static std::pair< + BOOST_DEDUCED_TYPENAME char_type_of::type*, + BOOST_DEDUCED_TYPENAME char_type_of::type* + > + output_sequence(U& u) { return u.output_sequence(); } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_OUTPUT_SEQUENCE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/pipeline.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/pipeline.hpp new file mode 100644 index 0000000000..1573e160c2 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/pipeline.hpp @@ -0,0 +1,128 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_PIPABLE_HPP_INCLUDED +#define BOOST_IOSTREAMS_PIPABLE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // BOOST_MSVC. +#include +#include +#include +#include +#include +#include +#include +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# include +#endif + +#define BOOST_IOSTREAMS_PIPABLE(filter, arity) \ + template< BOOST_PP_ENUM_PARAMS(arity, typename T) \ + BOOST_PP_COMMA_IF(arity) typename Component> \ + ::boost::iostreams::pipeline< \ + ::boost::iostreams::detail::pipeline_segment< \ + filter BOOST_IOSTREAMS_TEMPLATE_ARGS(arity, T) \ + >, \ + Component \ + > operator|( const filter BOOST_IOSTREAMS_TEMPLATE_ARGS(arity, T)& f, \ + const Component& c ) \ + { \ + typedef ::boost::iostreams::detail::pipeline_segment< \ + filter BOOST_IOSTREAMS_TEMPLATE_ARGS(arity, T) \ + > segment; \ + return ::boost::iostreams::pipeline \ + (segment(f), c); \ + } \ + /**/ + +namespace boost { namespace iostreams { + +template +struct pipeline; + +namespace detail { + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + struct pipeline_base { }; + + template + struct is_pipeline + : is_base_and_derived + { }; +#endif +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) + template + struct is_pipeline : mpl::false_ { }; + + template + struct is_pipeline< pipeline > : mpl::true_ { }; +#endif + +template +class pipeline_segment +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + : pipeline_base +#endif +{ +public: + pipeline_segment(const Component& component) + : component_(component) + { } + template + void for_each(Fn fn) const { fn(component_); } + template + void push(Chain& chn) const { chn.push(component_); } +private: + pipeline_segment operator=(const pipeline_segment&); + const Component& component_; +}; + +} // End namespace detail. + +//------------------Definition of Pipeline------------------------------------// + +template +struct pipeline : Pipeline { + typedef Pipeline pipeline_type; + typedef Component component_type; + pipeline(const Pipeline& p, const Component& component) + : Pipeline(p), component_(component) + { } + template + void for_each(Fn fn) const + { + Pipeline::for_each(fn); + fn(component_); + } + template + void push(Chain& chn) const + { + Pipeline::push(chn); + chn.push(component_); + } + const Pipeline& tail() const { return *this; } + const Component& head() const { return component_; } +private: + pipeline operator=(const pipeline&); + const Component& component_; +}; + +template +pipeline, Component> +operator|(const pipeline& p, const Component& cmp) +{ + BOOST_STATIC_ASSERT(is_filter::value); + return pipeline, Component>(p, cmp); +} + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_PIPABLE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/positioning.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/positioning.hpp new file mode 100644 index 0000000000..12493d9353 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/positioning.hpp @@ -0,0 +1,117 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Thanks to Gareth Sylvester-Bradley for the Dinkumware versions of the +// positioning functions. + +#ifndef BOOST_IOSTREAMS_POSITIONING_HPP_INCLUDED +#define BOOST_IOSTREAMS_POSITIONING_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include // mbstate_t. +#include +#include // streamoff, streampos. + +// Must come last. +#include + +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std { using ::fpos_t; } +#endif + +namespace boost { namespace iostreams { + +//------------------Definition of stream_offset-------------------------------// + +typedef boost::intmax_t stream_offset; + +//------------------Definition of stream_offset_to_streamoff------------------// + +inline std::streamoff stream_offset_to_streamoff(stream_offset off) +{ return static_cast(off); } + +//------------------Definition of offset_to_position--------------------------// + +# ifndef BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS + +inline std::streampos offset_to_position(stream_offset off) { return off; } + +# else // # ifndef BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS + +inline std::streampos offset_to_position(stream_offset off) +{ return std::streampos(std::mbstate_t(), off); } + +# endif // # ifndef BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS + +//------------------Definition of position_to_offset--------------------------// + +// Hande custom pos_type's +template +inline stream_offset position_to_offset(PosType pos) +{ return std::streamoff(pos); } + +# ifndef BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS + +inline stream_offset position_to_offset(std::streampos pos) { return pos; } + +# else // # ifndef BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS + +// In the Dinkumware standard library, a std::streampos consists of two stream +// offsets -- _Fpos, of type std::fpos_t, and _Myoff, of type std::streamoff -- +// together with a conversion state. A std::streampos is converted to a +// boost::iostreams::stream_offset by extracting the two stream offsets and +// summing them. The value of _Fpos can be extracted using the implementation- +// defined member functions seekpos() or get_fpos_t(), depending on the +// Dinkumware version. The value of _Myoff cannot be extracted directly, but can +// be calculated as the difference between the result of converting the +// std::fpos to a std::streamoff and the result of converting the member _Fpos +// to a long. The latter operation is accomplished with the macro _FPOSOFF, +// which works correctly on platforms where std::fpos_t is an integral type and +// platforms where it is a struct + +// Converts a std::fpos_t to a stream_offset +inline stream_offset fpos_t_to_offset(std::fpos_t pos) +{ +# if defined(_POSIX_) || (_INTEGRAL_MAX_BITS >= 64) || defined(__IBMCPP__) + return pos; +# else + return _FPOSOFF(pos); +# endif +} + +// Extracts the member _Fpos from a std::fpos +inline std::fpos_t streampos_to_fpos_t(std::streampos pos) +{ +# if defined (_CPPLIB_VER) || defined(__IBMCPP__) + return pos.seekpos(); +# else + return pos.get_fpos_t(); +# endif +} + +inline stream_offset position_to_offset(std::streampos pos) +{ + return fpos_t_to_offset(streampos_to_fpos_t(pos)) + + static_cast( + static_cast(pos) - + _FPOSOFF(streampos_to_fpos_t(pos)) + ); +} + +# endif // # ifndef BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_POSITIONING_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/put.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/put.hpp new file mode 100644 index 0000000000..5ad96ce629 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/put.hpp @@ -0,0 +1,17 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_PUT_HPP_INCLUDED +#define BOOST_IOSTREAMS_PUT_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +#endif // #ifndef BOOST_IOSTREAMS_PUT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/putback.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/putback.hpp new file mode 100644 index 0000000000..d0fabb311c --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/putback.hpp @@ -0,0 +1,17 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_PUTBACK_HPP_INCLUDED +#define BOOST_IOSTREAMS_PUTBACK_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +#endif // #ifndef BOOST_IOSTREAMS_PUTBACK_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/read.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/read.hpp new file mode 100644 index 0000000000..4443b62804 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/read.hpp @@ -0,0 +1,247 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_READ_HPP_INCLUDED +#define BOOST_IOSTREAMS_READ_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // DEDUCED_TYPENAME, MSVC. +#include +#include +#include +#include +#include // streamsize. +#include +#include +#include +#include + +// Must come last. +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------// +# include +#else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------// + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct read_device_impl; + +template +struct read_filter_impl; + +} // End namespace detail. + +template +typename int_type_of::type get(T& t) +{ return detail::read_device_impl::get(detail::unwrap(t)); } + +template +inline std::streamsize +read(T& t, typename char_type_of::type* s, std::streamsize n) +{ return detail::read_device_impl::read(detail::unwrap(t), s, n); } + +template +std::streamsize +read(T& t, Source& src, typename char_type_of::type* s, std::streamsize n) +{ return detail::read_filter_impl::read(detail::unwrap(t), src, s, n); } + +template +bool putback(T& t, typename char_type_of::type c) +{ return detail::read_device_impl::putback(detail::unwrap(t), c); } + +//----------------------------------------------------------------------------// + +namespace detail { + +// Helper function for adding -1 as EOF indicator. +inline std::streamsize check_eof(std::streamsize n) { return n != 0 ? n : -1; } + +// Helper templates for reading from streambufs. +template +struct true_eof_impl; + +template<> +struct true_eof_impl { + template + static bool true_eof(T& t) { return t.true_eof(); } +}; + +template<> +struct true_eof_impl { + template + static bool true_eof(T&) { return true; } +}; + +template +inline bool true_eof(T& t) +{ + const bool linked = is_linked::value; + return true_eof_impl::true_eof(t); +} + +//------------------Definition of read_device_impl----------------------------// + +template +struct read_device_impl + : mpl::if_< + detail::is_custom, + operations, + read_device_impl< + BOOST_DEDUCED_TYPENAME + detail::dispatch< + T, istream_tag, streambuf_tag, input + >::type + > + >::type + { }; + +template<> +struct read_device_impl { + template + static typename int_type_of::type get(T& t) + { return t.get(); } + + template + static std::streamsize + read(T& t, typename char_type_of::type* s, std::streamsize n) + { return check_eof(t.rdbuf()->sgetn(s, n)); } + + template + static bool putback(T& t, typename char_type_of::type c) + { + typedef typename char_type_of::type char_type; + typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type; + return !traits_type::eq_int_type( t.rdbuf()->sputbackc(c), + traits_type::eof() ); + } +}; + +template<> +struct read_device_impl { + template + static typename int_type_of::type + get(T& t) + { // gcc 2.95 needs namespace qualification for char_traits. + typedef typename char_type_of::type char_type; + typedef iostreams::char_traits traits_type; + typename int_type_of::type c; + return !traits_type::is_eof(c = t.sbumpc()) || + detail::true_eof(t) + ? + c : traits_type::would_block(); + } + + template + static std::streamsize + read(T& t, typename char_type_of::type* s, std::streamsize n) + { + std::streamsize amt; + return (amt = t.sgetn(s, n)) != 0 ? + amt : + detail::true_eof(t) ? + -1 : + 0; + } + + template + static bool putback(T& t, typename char_type_of::type c) + { // gcc 2.95 needs namespace qualification for char_traits. + typedef typename char_type_of::type char_type; + typedef iostreams::char_traits traits_type; + return !traits_type::is_eof(t.sputbackc(c)); + } +}; + +template<> +struct read_device_impl { + template + static typename int_type_of::type + get(T& t) + { // gcc 2.95 needs namespace qualification for char_traits. + typedef typename char_type_of::type char_type; + typedef iostreams::char_traits traits_type; + char_type c; + std::streamsize amt; + return (amt = t.read(&c, 1)) == 1 ? + traits_type::to_int_type(c) : + amt == -1 ? + traits_type::eof() : + traits_type::would_block(); + } + + template + static std::streamsize + read(T& t, typename char_type_of::type* s, std::streamsize n) + { return t.read(s, n); } + + template + static bool putback(T& t, typename char_type_of::type c) + { // T must be Peekable. + return t.putback(c); + } +}; + +//------------------Definition of read_filter_impl----------------------------// + +template +struct read_filter_impl + : mpl::if_< + detail::is_custom, + operations, + read_filter_impl< + BOOST_DEDUCED_TYPENAME + detail::dispatch< + T, multichar_tag, any_tag + >::type + > + >::type + { }; + +template<> +struct read_filter_impl { + template + static std::streamsize read + (T& t, Source& src, typename char_type_of::type* s, std::streamsize n) + { return t.read(src, s, n); } +}; + +template<> +struct read_filter_impl { + template + static std::streamsize read + (T& t, Source& src, typename char_type_of::type* s, std::streamsize n) + { // gcc 2.95 needs namespace qualification for char_traits. + typedef typename char_type_of::type char_type; + typedef iostreams::char_traits traits_type; + for (std::streamsize off = 0; off < n; ++off) { + typename traits_type::int_type c = t.get(src); + if (traits_type::is_eof(c)) + return check_eof(off); + if (traits_type::would_block(c)) + return off; + s[off] = traits_type::to_char_type(c); + } + return n; + } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------// + +#include + +#endif // #ifndef BOOST_IOSTREAMS_READ_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/restrict.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/restrict.hpp new file mode 100644 index 0000000000..e17eb8c965 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/restrict.hpp @@ -0,0 +1,26 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + * + * File: boost/iostreams/detail/restrict.hpp + * Date: Sun Jan 06 12:57:30 MST 2008 + * Copyright: 2008 CodeRage, LLC + 2004-2007 Jonathan Turkanis + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Defines the class template boost::iostreams::restriction and the + * overloaded function template boost::iostreams::restrict + */ + +#ifndef BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED +#define BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED + +#include +#define BOOST_IOSTREAMS_RESTRICT restrict +#include +#undef BOOST_IOSTREAMS_RESTRICT + +#endif // #ifndef BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/seek.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/seek.hpp new file mode 100644 index 0000000000..efa3c7daf0 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/seek.hpp @@ -0,0 +1,180 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_SEEK_HPP_INCLUDED +#define BOOST_IOSTREAMS_SEEK_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // DEDUCED_TYPENAME, MSVC. +#include +#include +#include +#include // streamsize, seekdir, openmode. +#include +#include +#include +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct seek_device_impl; + +template +struct seek_filter_impl; + +} // End namespace detail. + +template +inline std::streampos +seek( T& t, stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out ) +{ + using namespace detail; + return seek_device_impl::seek(detail::unwrap(t), off, way, which); +} + +template +inline std::streampos +seek( T& t, Device& dev, stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out ) +{ + using namespace detail; + return seek_filter_impl::seek(detail::unwrap(t), dev, off, way, which); +} + +namespace detail { + +//------------------Definition of seek_device_impl----------------------------// + +template +struct seek_device_impl + : mpl::if_< + is_custom, + operations, + seek_device_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, iostream_tag, istream_tag, ostream_tag, + streambuf_tag, two_head, any_tag + >::type + > + >::type + { }; + +struct seek_impl_basic_ios { + template + static std::streampos seek( T& t, stream_offset off, + BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ) + { + if ( way == BOOST_IOS::beg && + ( off < integer_traits::const_min || + off > integer_traits::const_max ) ) + { + return t.rdbuf()->pubseekpos(offset_to_position(off)); + } else { + return t.rdbuf()->pubseekoff(off, way, which); + } + } +}; + +template<> +struct seek_device_impl : seek_impl_basic_ios { }; + +template<> +struct seek_device_impl : seek_impl_basic_ios { }; + +template<> +struct seek_device_impl : seek_impl_basic_ios { }; + +template<> +struct seek_device_impl { + template + static std::streampos seek( T& t, stream_offset off, + BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ) + { + if ( way == BOOST_IOS::beg && + ( off < integer_traits::const_min || + off > integer_traits::const_max ) ) + { + return t.BOOST_IOSTREAMS_PUBSEEKPOS(offset_to_position(off)); + } else { + return t.BOOST_IOSTREAMS_PUBSEEKOFF(off, way, which); + } + } +}; + +template<> +struct seek_device_impl { + template + static std::streampos seek( T& t, stream_offset off, + BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ) + { return t.seek(off, way, which); } +}; + +template<> +struct seek_device_impl { + template + static std::streampos seek( T& t, stream_offset off, + BOOST_IOS::seekdir way, + BOOST_IOS::openmode ) + { return t.seek(off, way); } +}; + +//------------------Definition of seek_filter_impl----------------------------// + +template +struct seek_filter_impl + : mpl::if_< + is_custom, + operations, + seek_filter_impl< + BOOST_DEDUCED_TYPENAME + dispatch::type + > + >::type + { }; + +template<> +struct seek_filter_impl { + template + static std::streampos seek( T& t, Device& d, + stream_offset off, + BOOST_IOS::seekdir way, + BOOST_IOS::openmode which ) + { return t.seek(d, off, way, which); } +}; + +template<> +struct seek_filter_impl { + template + static std::streampos seek( T& t, Device& d, + stream_offset off, + BOOST_IOS::seekdir way, + BOOST_IOS::openmode ) + { return t.seek(d, off, way); } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_SEEK_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/skip.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/skip.hpp new file mode 100644 index 0000000000..4c62d4528b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/skip.hpp @@ -0,0 +1,112 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// To do: handle bidirection streams and output-seekable components. + +#ifndef BOOST_IOSTREAMS_SKIP_HPP_INCLUDED +#define BOOST_IOSTREAMS_SKIP_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // failure. +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { + +namespace detail { + +template +void skip(Device& dev, stream_offset off, mpl::true_) +{ iostreams::seek(dev, off, BOOST_IOS::cur); } + +template +void skip(Device& dev, stream_offset off, mpl::false_) +{ // gcc 2.95 needs namespace qualification for char_traits. + typedef typename char_type_of::type char_type; + typedef iostreams::char_traits traits_type; + for (stream_offset z = 0; z < off; ) { + typename traits_type::int_type c; + if (traits_type::is_eof(c = iostreams::get(dev))) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset")); + if (!traits_type::would_block(c)) + ++z; + } +} + +template +void skip( Filter& flt, Device& dev, stream_offset off, + BOOST_IOS::openmode which, mpl::true_ ) +{ boost::iostreams::seek(flt, dev, off, BOOST_IOS::cur, which); } + +template +void skip( Filter& flt, Device& dev, stream_offset off, + BOOST_IOS::openmode, mpl::false_ ) +{ + typedef typename char_type_of::type char_type; + char_type c; + for (stream_offset z = 0; z < off; ) { + std::streamsize amt; + if ((amt = iostreams::read(flt, dev, &c, 1)) == -1) + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset")); + if (amt == 1) + ++z; + } +} + +} // End namespace detail. + +template +void skip(Device& dev, stream_offset off) +{ + typedef typename mode_of::type mode; + typedef mpl::or_< + is_convertible, + is_convertible + > can_seek; + BOOST_STATIC_ASSERT( + (can_seek::value || is_convertible::value) + ); + detail::skip(dev, off, can_seek()); +} + +template +void skip( Filter& flt, Device& dev, stream_offset off, + BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out ) +{ + typedef typename mode_of::type filter_mode; + typedef typename mode_of::type device_mode; + typedef mpl::or_< + mpl::and_< + is_convertible, + is_convertible + >, + mpl::and_< + is_convertible, + is_convertible + > + > can_seek; + BOOST_STATIC_ASSERT( + ( can_seek::value || + (is_convertible::value && + is_convertible::value) ) + ); + detail::skip(flt, dev, off, which, can_seek()); +} + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_SKIP_HPP_INCLUDED //------------------------// diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/slice.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/slice.hpp new file mode 100644 index 0000000000..820a316fe1 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/slice.hpp @@ -0,0 +1,28 @@ +/* + * Distributed under the Boost Software License, Version 1.0.(See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + * + * See http://www.boost.org/libs/iostreams for documentation. + * + * File: boost/iostreams/detail/restrict.hpp + * Date: Sun Jan 06 12:57:30 MST 2008 + * Copyright: 2008 CodeRage, LLC + 2004-2007 Jonathan Turkanis + * Author: Jonathan Turkanis + * Contact: turkanis at coderage dot com + * + * Defines the class template boost::iostreams::restriction and the + * overloaded function template boost::iostreams::slice. + * + * This header is provided for platforms on which "restrict" is a keyword. + */ + +#ifndef BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED +#define BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED + +#include +#define BOOST_IOSTREAMS_RESTRICT slice +#include +#undef BOOST_IOSTREAMS_RESTRICT + +#endif // #ifndef BOOST_IOSTREAMS_RESTRICT_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/stream.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/stream.hpp new file mode 100644 index 0000000000..ac9f22547a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/stream.hpp @@ -0,0 +1,151 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_STREAM_HPP_INCLUDED +#define BOOST_IOSTREAMS_STREAM_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include +#include // standard streams. +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { namespace detail { + +template +struct stream_traits { + typedef typename char_type_of::type char_type; + typedef Tr traits_type; + typedef typename category_of::type mode; + typedef typename + iostreams::select< // Dismbiguation required for Tru64. + mpl::and_< + is_convertible, + is_convertible + >, + BOOST_IOSTREAMS_BASIC_IOSTREAM(char_type, traits_type), + is_convertible, + BOOST_IOSTREAMS_BASIC_ISTREAM(char_type, traits_type), + else_, + BOOST_IOSTREAMS_BASIC_OSTREAM(char_type, traits_type) + >::type stream_type; + typedef typename + iostreams::select< // Dismbiguation required for Tru64. + mpl::and_< + is_convertible, + is_convertible + >, + iostream_tag, + is_convertible, + istream_tag, + else_, + ostream_tag + >::type stream_tag; +}; + +// By encapsulating initialization in a base, we can define the macro +// BOOST_IOSTREAMS_DEFINE_FORWARDING_FUNCTIONS to generate constuctors +// without base member initializer lists. +template< typename Device, + typename Tr = + BOOST_IOSTREAMS_CHAR_TRAITS( + BOOST_DEDUCED_TYPENAME char_type_of::type + ), + typename Alloc = + std::allocator< + BOOST_DEDUCED_TYPENAME char_type_of::type + >, + typename Base = // VC6 Workaround. + BOOST_DEDUCED_TYPENAME + detail::stream_traits::stream_type > +class stream_base + : protected base_from_member< stream_buffer >, + public Base +{ +private: + typedef base_from_member< stream_buffer > pbase_type; + typedef typename stream_traits::stream_type stream_type; +protected: + using pbase_type::member; // Avoid warning about 'this' in initializer list. +public: + stream_base() : pbase_type(), stream_type(&member) { } +}; + +} } } // End namespaces detail, iostreams, boost. + +#ifdef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION +# include +#else + +namespace boost { namespace iostreams { + +// +// Template name: stream. +// Description: A iostream which reads from and writes to an instance of a +// designated device type. +// Template paramters: +// Device - A device type. +// Alloc - The allocator type. +// +template< typename Device, + typename Tr = + BOOST_IOSTREAMS_CHAR_TRAITS( + BOOST_DEDUCED_TYPENAME char_type_of::type + ), + typename Alloc = + std::allocator< + BOOST_DEDUCED_TYPENAME char_type_of::type + > > +struct stream : detail::stream_base { +public: + typedef typename char_type_of::type char_type; + struct category + : mode_of::type, + closable_tag, + detail::stream_traits::stream_tag + { }; + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) +private: + typedef typename + detail::stream_traits< + Device, Tr + >::stream_type stream_type; +public: + stream() { } + BOOST_IOSTREAMS_FORWARD( stream, open_impl, Device, + BOOST_IOSTREAMS_PUSH_PARAMS, + BOOST_IOSTREAMS_PUSH_ARGS ) + bool is_open() const { return this->member.is_open(); } + void close() { this->member.close(); } + bool auto_close() const { return this->member.auto_close(); } + void set_auto_close(bool close) { this->member.set_auto_close(close); } + bool strict_sync() { return this->member.strict_sync(); } + Device& operator*() { return *this->member; } + Device* operator->() { return &*this->member; } + Device* component() { return this->member.component(); } +private: + void open_impl(const Device& dev BOOST_IOSTREAMS_PUSH_PARAMS()) // For forwarding. + { + this->clear(); + this->member.open(dev BOOST_IOSTREAMS_PUSH_ARGS()); + } +}; + +} } // End namespaces iostreams, boost. + +#endif // #ifdef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION + +#endif // #ifndef BOOST_IOSTREAMS_stream_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/stream_buffer.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/stream_buffer.hpp new file mode 100644 index 0000000000..0f8a64754e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/stream_buffer.hpp @@ -0,0 +1,116 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_STREAM_BUFFER_HPP_INCLUDED +#define BOOST_IOSTREAMS_STREAM_BUFFER_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // allocator. +#include // BOOST_DEDUCED_TYPENAME. +#include +#include +#include +#include // failure, streamsize. +#include +#include +#include +#include +#include +#include + +// Must come last. +#include // MSVC. + +namespace boost { namespace iostreams { namespace detail { + +template +struct stream_buffer_traits { + typedef typename + mpl::if_< + is_convertible< + BOOST_DEDUCED_TYPENAME category_of::type, + direct_tag + >, + direct_streambuf, + indirect_streambuf + >::type type; +}; + +} } } // End namespaces detail, iostreams, boost + +#ifdef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION +# include +#else + +namespace boost { namespace iostreams { + +template< typename T, + typename Tr = + BOOST_IOSTREAMS_CHAR_TRAITS( + BOOST_DEDUCED_TYPENAME char_type_of::type + ), + typename Alloc = + std::allocator< + BOOST_DEDUCED_TYPENAME char_type_of::type + >, + typename Mode = BOOST_DEDUCED_TYPENAME mode_of::type > +class stream_buffer + : public detail::stream_buffer_traits::type +{ +private: + BOOST_STATIC_ASSERT(( + is_convertible< + BOOST_DEDUCED_TYPENAME iostreams::category_of::type, Mode + >::value + )); + typedef typename + detail::stream_buffer_traits< + T, Tr, Alloc, Mode + >::type base_type; +public: + typedef typename char_type_of::type char_type; + struct category + : Mode, + closable_tag, + streambuf_tag + { }; + BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) +public: + stream_buffer() { } + ~stream_buffer() + { + try { + if (this->is_open() && this->auto_close()) + this->close(); + } catch (...) { } + } + BOOST_IOSTREAMS_FORWARD( stream_buffer, open_impl, T, + BOOST_IOSTREAMS_PUSH_PARAMS, + BOOST_IOSTREAMS_PUSH_ARGS ) + T& operator*() { return *this->component(); } + T* operator->() { return this->component(); } +private: + void open_impl(const T& t BOOST_IOSTREAMS_PUSH_PARAMS()) + { // Used for forwarding. + if (this->is_open()) + boost::throw_exception( + BOOST_IOSTREAMS_FAILURE("already open") + ); + base_type::open(t BOOST_IOSTREAMS_PUSH_ARGS()); + } +}; + +} } // End namespaces iostreams, boost. + +#endif // #ifdef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION + +#include // MSVC. + +#endif // #ifndef BOOST_IOSTREAMS_STREAM_BUFFER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/tee.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/tee.hpp new file mode 100644 index 0000000000..3638456334 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/tee.hpp @@ -0,0 +1,216 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2005-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_TEE_HPP_INCLUDED +#define BOOST_IOSTREAMS_TEE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include // BOOST_DEDUCE_TYPENAME. +#include +#include +#include +#include +#include +#include // call_close_all +#include +#include +#include +#include +#include +#include + +namespace boost { namespace iostreams { + +// +// Template name: tee_filter. +// Template paramters: +// Device - A blocking Sink. +// +template +class tee_filter : public detail::filter_adapter { +public: + typedef typename detail::param_type::type param_type; + typedef typename char_type_of::type char_type; + struct category + : dual_use_filter_tag, + multichar_tag, + closable_tag, + flushable_tag, + localizable_tag, + optimally_buffered_tag + { }; + + BOOST_STATIC_ASSERT(is_device::value); + BOOST_STATIC_ASSERT(( + is_convertible< // Using mode_of causes failures on VC6-7.0. + BOOST_DEDUCED_TYPENAME iostreams::category_of::type, output + >::value + )); + + explicit tee_filter(param_type dev) + : detail::filter_adapter(dev) + { } + + template + std::streamsize read(Source& src, char_type* s, std::streamsize n) + { + std::streamsize result = iostreams::read(src, s, n); + if (result != -1) { + std::streamsize result2 = iostreams::write(this->component(), s, result); + (void) result2; // Suppress 'unused variable' warning. + assert(result == result2); + } + return result; + } + + template + std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) + { + std::streamsize result = iostreams::write(snk, s, n); + std::streamsize result2 = iostreams::write(this->component(), s, result); + (void) result2; // Suppress 'unused variable' warning. + assert(result == result2); + return result; + } + + template + void close(Next&, BOOST_IOS::openmode) + { + detail::close_all(this->component()); + } + + template + bool flush(Sink& snk) + { + bool r1 = iostreams::flush(snk); + bool r2 = iostreams::flush(this->component()); + return r1 && r2; + } +}; +BOOST_IOSTREAMS_PIPABLE(tee_filter, 1) + +// +// Template name: tee_device. +// Template paramters: +// Device - A blocking Device. +// Sink - A blocking Sink. +// +template +class tee_device { +public: + typedef typename detail::param_type::type device_param; + typedef typename detail::param_type::type sink_param; + typedef typename detail::value_type::type device_value; + typedef typename detail::value_type::type sink_value; + typedef typename char_type_of::type char_type; + typedef typename + mpl::if_< + is_convertible< + BOOST_DEDUCED_TYPENAME + iostreams::category_of::type, + output + >, + output, + input + >::type mode; + BOOST_STATIC_ASSERT(is_device::value); + BOOST_STATIC_ASSERT(is_device::value); + BOOST_STATIC_ASSERT(( + is_same< + char_type, + BOOST_DEDUCED_TYPENAME char_type_of::type + >::value + )); + BOOST_STATIC_ASSERT(( + is_convertible< + BOOST_DEDUCED_TYPENAME iostreams::category_of::type, + output + >::value + )); + struct category + : mode, + device_tag, + closable_tag, + flushable_tag, + localizable_tag, + optimally_buffered_tag + { }; + tee_device(device_param device, sink_param sink) + : dev_(device), sink_(sink) + { } + std::streamsize read(char_type* s, std::streamsize n) + { + BOOST_STATIC_ASSERT(( + is_convertible< + BOOST_DEDUCED_TYPENAME iostreams::category_of::type, input + >::value + )); + std::streamsize result1 = iostreams::read(dev_, s, n); + if (result1 != -1) { + std::streamsize result2 = iostreams::write(sink_, s, result1); + (void) result1; // Suppress 'unused variable' warning. + (void) result2; + assert(result1 == result2); + } + return result1; + } + std::streamsize write(const char_type* s, std::streamsize n) + { + BOOST_STATIC_ASSERT(( + is_convertible< + BOOST_DEDUCED_TYPENAME iostreams::category_of::type, output + >::value + )); + std::streamsize result1 = iostreams::write(dev_, s, n); + std::streamsize result2 = iostreams::write(sink_, s, n); + (void) result1; // Suppress 'unused variable' warning. + (void) result2; + assert(result1 == n && result2 == n); + return n; + } + void close() + { + detail::execute_all( detail::call_close_all(dev_), + detail::call_close_all(sink_) ); + } + bool flush() + { + bool r1 = iostreams::flush(dev_); + bool r2 = iostreams::flush(sink_); + return r1 && r2; + } + template + void imbue(const Locale& loc) + { + iostreams::imbue(dev_, loc); + iostreams::imbue(sink_, loc); + } + std::streamsize optimal_buffer_size() const + { + return (std::max) ( iostreams::optimal_buffer_size(dev_), + iostreams::optimal_buffer_size(sink_) ); + } +private: + device_value dev_; + sink_value sink_; +}; + +template +tee_filter tee(const Sink& snk) +{ return tee_filter(snk); } + +template +tee_device tee(const Device& dev, const Sink& sink) +{ return tee_device(dev, sink); } + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_TEE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/traits.hpp new file mode 100644 index 0000000000..be7e98f1d9 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/traits.hpp @@ -0,0 +1,391 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// +// Contains metafunctions char_type_of, category_of and mode_of used for +// deducing the i/o category and i/o mode of a model of Filter or Device. +// +// Also contains several utility metafunctions, functions and macros. +// + +#ifndef BOOST_IOSTREAMS_IO_TRAITS_HPP_INCLUDED +#define BOOST_IOSTREAMS_IO_TRAITS_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // stream types, char_traits. +#include // partial spec, deduced typename. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# include +# include +#endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#include +#include + +// Must come last. +#include + +namespace boost { namespace iostreams { + +//----------Definitions of predicates for streams and stream buffers----------// + +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------// + +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_istream, std::basic_istream, 2) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_ostream, std::basic_ostream, 2) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_iostream, std::basic_iostream, 2) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_streambuf, std::basic_streambuf, 2) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_ifstream, std::basic_ifstream, 2) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_ofstream, std::basic_ofstream, 2) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_fstream, std::basic_fstream, 2) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_filebuf, std::basic_filebuf, 2) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_istringstream, std::basic_istringstream, 3) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_ostringstream, std::basic_ostringstream, 3) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_stringstream, std::basic_stringstream, 3) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_stringbuf, std::basic_stringbuf, 3) + +#else // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-----------------------// + +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_istream, std::istream, 0) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_ostream, std::ostream, 0) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_iostream, std::iostream, 0) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_streambuf, std::streambuf, 0) + +#endif // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //----------------------// + +template +struct is_std_io + : mpl::or_< is_istream, is_ostream, is_streambuf > + { }; + +template +struct is_std_file_device + : mpl::or_< + is_ifstream, + is_ofstream, + is_fstream, + is_filebuf + > + { }; + +template +struct is_std_string_device + : mpl::or_< + is_istringstream, + is_ostringstream, + is_stringstream, + is_stringbuf + > + { }; + +template +struct stream; + +template +class stream_buffer; + +template< typename Mode, typename Ch, typename Tr, + typename Alloc, typename Access > +class filtering_stream; + +template< typename Mode, typename Ch, typename Tr, + typename Alloc, typename Access > +class wfiltering_stream; + +template< typename Mode, typename Ch, typename Tr, + typename Alloc, typename Access > +class filtering_streambuf; + +template< typename Mode, typename Ch, typename Tr, + typename Alloc, typename Access > +class filtering_wstreambuf; + +namespace detail { + +template +class linked_streambuf; + +BOOST_IOSTREAMS_BOOL_TRAIT_DEF( is_boost_stream, + boost::iostreams::stream, + 3 ) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF( is_boost_stream_buffer, + boost::iostreams::stream_buffer, + 4 ) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF( is_filtering_stream_impl, + boost::iostreams::filtering_stream, + 5 ) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF( is_filtering_wstream_impl, + boost::iostreams::wfiltering_stream, + 5 ) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF( is_filtering_streambuf_impl, + boost::iostreams::filtering_streambuf, + 5 ) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF( is_filtering_wstreambuf_impl, + boost::iostreams::filtering_wstreambuf, + 5 ) +BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_linked, linked_streambuf, 2) + +template +struct is_filtering_stream + : mpl::or_< + is_filtering_stream_impl, + is_filtering_wstream_impl + > + { }; + +template +struct is_filtering_streambuf + : mpl::or_< + is_filtering_streambuf_impl, + is_filtering_wstreambuf_impl + > + { }; + +template +struct is_boost + : mpl::or_< + is_boost_stream, + is_boost_stream_buffer, + is_filtering_stream, + is_filtering_streambuf + > + { }; + +} // End namespace detail. + +//------------------Definitions of char_type_of-------------------------------// + +namespace detail { + +template +struct member_char_type { typedef typename T::char_type type; }; + +} // End namespace detail. + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //---------------------------// +# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------------------// + +template +struct char_type_of + : detail::member_char_type< + typename detail::unwrapped_type::type + > + { }; + +# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //---------------------// + +template +struct char_type_of { + typedef typename detail::unwrapped_type::type U; + typedef typename + mpl::eval_if< + is_std_io, + mpl::identity, + detail::member_char_type + >::type type; +}; + +# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------// + +template +struct char_type_of< iterator_range > { + typedef typename iterator_value::type type; +}; + +#else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //------------------// + +template +struct char_type_of { + template + struct get_value_type { + #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef typename range_value::type type; + #endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + }; + typedef typename + mpl::eval_if< + is_iterator_range, + get_value_type, + detail::member_char_type< + BOOST_DEDUCED_TYPENAME detail::unwrapped_type::type + > + >::type type; +}; + +#endif // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //-----------------// + +//------------------Definitions of category_of--------------------------------// + +namespace detail { + +template +struct member_category { typedef typename T::category type; }; + +} // End namespace detail. + +template +struct category_of { + template + struct member_category { + typedef typename U::category type; + }; + typedef typename detail::unwrapped_type::type U; + typedef typename + mpl::eval_if< + mpl::and_< + is_std_io, + mpl::not_< detail::is_boost > + >, + iostreams::select< // Disambiguation for Tru64 + is_filebuf, filebuf_tag, + is_ifstream, ifstream_tag, + is_ofstream, ofstream_tag, + is_fstream, fstream_tag, + is_stringbuf, stringbuf_tag, + is_istringstream, istringstream_tag, + is_ostringstream, ostringstream_tag, + is_stringstream, stringstream_tag, + is_streambuf, generic_streambuf_tag, + is_iostream, generic_iostream_tag, + is_istream, generic_istream_tag, + is_ostream, generic_ostream_tag + >, + detail::member_category + >::type type; +}; + +// Partial specialization for reference wrappers +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //---------------------------// + +template +struct category_of< reference_wrapper > + : category_of + { }; + +#endif // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //-----------------// + +//------------------Definition of get_category--------------------------------// + +// +// Returns an object of type category_of::type. +// +template +inline typename category_of::type get_category(const T&) +{ typedef typename category_of::type category; return category(); } + +//------------------Definition of int_type_of---------------------------------// + +template +struct int_type_of { +#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES + typedef std::char_traits< + BOOST_DEDUCED_TYPENAME char_type_of::type + > traits_type; + typedef typename traits_type::int_type type; +#else + typedef int type; +#endif +}; + +//------------------Definition of mode_of-------------------------------------// + +namespace detail { + +template struct io_mode_impl; + +#define BOOST_IOSTREAMS_MODE_HELPER(tag_, id_) \ + case_ io_mode_impl_helper(tag_); \ + template<> struct io_mode_impl { typedef tag_ type; }; \ + /**/ +BOOST_IOSTREAMS_MODE_HELPER(input, 1) +BOOST_IOSTREAMS_MODE_HELPER(output, 2) +BOOST_IOSTREAMS_MODE_HELPER(bidirectional, 3) +BOOST_IOSTREAMS_MODE_HELPER(input_seekable, 4) +BOOST_IOSTREAMS_MODE_HELPER(output_seekable, 5) +BOOST_IOSTREAMS_MODE_HELPER(seekable, 6) +BOOST_IOSTREAMS_MODE_HELPER(dual_seekable, 7) +BOOST_IOSTREAMS_MODE_HELPER(bidirectional_seekable, 8) +BOOST_IOSTREAMS_MODE_HELPER(dual_use, 9) +#undef BOOST_IOSTREAMS_MODE_HELPER + +template +struct io_mode_id { + typedef typename category_of::type category; + BOOST_SELECT_BY_SIZE(int, value, detail::io_mode_impl_helper(category())); +}; + +} // End namespace detail. + +template // Borland 5.6.4 requires this circumlocution. +struct mode_of : detail::io_mode_impl< detail::io_mode_id::value > { }; + +// Partial specialization for reference wrappers +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //---------------------------// + +template +struct mode_of< reference_wrapper > + : mode_of + { }; + +#endif // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //-----------------// + +//------------------Definition of is_device, is_filter and is_direct----------// + +namespace detail { + +template +struct has_trait_impl { + typedef typename category_of::type category; + BOOST_STATIC_CONSTANT(bool, value = (is_convertible::value)); +}; + +template +struct has_trait + : mpl::bool_::value> + { }; + +} // End namespace detail. + +template +struct is_device : detail::has_trait { }; + +template +struct is_filter : detail::has_trait { }; + +template +struct is_direct : detail::has_trait { }; + +//------------------Definition of BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS----------// + +#define BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr) \ + typedef Tr traits_type; \ + typedef typename traits_type::int_type int_type; \ + typedef typename traits_type::off_type off_type; \ + typedef typename traits_type::pos_type pos_type; \ + /**/ + +} } // End namespaces iostreams, boost. + +#include + +#endif // #ifndef BOOST_IOSTREAMS_IO_TRAITS_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/traits_fwd.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/traits_fwd.hpp new file mode 100644 index 0000000000..7114f89b36 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/traits_fwd.hpp @@ -0,0 +1,111 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +// Forward declarations of templates defined in traits.hpp. + +#ifndef BOOST_IOSTREAMS_IO_TRAITS_FWD_HPP_INCLUDED +#define BOOST_IOSTREAMS_IO_TRAITS_FWD_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // stream types, char_traits. + +namespace boost { namespace iostreams { + +template +struct is_istream; + +template +struct is_ostream; + +template +struct is_iostream; + +template +struct is_streambuf; + +template +struct is_istringstream; + +template +struct is_ostringstream; + +template +struct is_stringstream; + +template +struct is_stringbuf; + +template +struct is_ifstream; + +template +struct is_ofstream; + +template +struct is_fstream; + +template +struct is_filebuf; + +template +struct is_std_io; + +template +struct is_std_file_device; + +template +struct is_std_string_device; + +template +struct char_type_of; + +template +struct category_of; + +template +struct int_type_of; + +template +struct mode_of; + +template +struct is_device; + +template +struct is_filter; + +template +struct is_direct; + +namespace detail { + +template +struct is_boost_stream; + +template +struct is_boost_stream_buffer; + +template +struct is_filtering_stream; + +template +struct is_filtering_streambuf; + +template +struct is_linked; + +template +struct is_boost; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#endif // #ifndef BOOST_IOSTREAMS_IO_TRAITS_FWD_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iostreams/write.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/write.hpp new file mode 100644 index 0000000000..91cb9bd550 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iostreams/write.hpp @@ -0,0 +1,171 @@ +// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) +// (C) Copyright 2003-2007 Jonathan Turkanis +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) + +// See http://www.boost.org/libs/iostreams for documentation. + +#ifndef BOOST_IOSTREAMS_WRITE_HPP_INCLUDED +#define BOOST_IOSTREAMS_WRITE_HPP_INCLUDED + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include // DEDUCED_TYPENAME, MSVC. +#include +#include +#include +#include +#include // streamsize. +#include +#include +#include +#include +#include + +// Must come last. +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------// +# include +#else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------// + +namespace boost { namespace iostreams { + +namespace detail { + +template +struct write_device_impl; + +template +struct write_filter_impl; + +} // End namespace detail. + +template +bool put(T& t, typename char_type_of::type c) +{ return detail::write_device_impl::put(detail::unwrap(t), c); } + +template +inline std::streamsize write + (T& t, const typename char_type_of::type* s, std::streamsize n) +{ return detail::write_device_impl::write(detail::unwrap(t), s, n); } + +template +inline std::streamsize +write( T& t, Sink& snk, const typename char_type_of::type* s, + std::streamsize n ) +{ return detail::write_filter_impl::write(detail::unwrap(t), snk, s, n); } + +namespace detail { + +//------------------Definition of write_device_impl---------------------------// + +template +struct write_device_impl + : mpl::if_< + is_custom, + operations, + write_device_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, ostream_tag, streambuf_tag, output + >::type + > + >::type + { }; + +template<> +struct write_device_impl { + template + static bool put(T& t, typename char_type_of::type c) + { + typedef typename char_type_of::type char_type; + typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type; + return !traits_type::eq_int_type( t.rdbuf()->sputc(c), + traits_type::eof() ); + } + + template + static std::streamsize write + (T& t, const typename char_type_of::type* s, std::streamsize n) + { return t.rdbuf()->sputn(s, n); } +}; + +template<> +struct write_device_impl { + template + static bool put(T& t, typename char_type_of::type c) + { + typedef typename char_type_of::type char_type; + typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type; + return !traits_type::eq_int_type(t.sputc(c), traits_type::eof()); + } + + template + static std::streamsize write + (T& t, const typename char_type_of::type* s, std::streamsize n) + { return t.sputn(s, n); } +}; + +template<> +struct write_device_impl { + template + static bool put(T& t, typename char_type_of::type c) + { return t.write(&c, 1) == 1; } + + template + static std::streamsize + write(T& t, const typename char_type_of::type* s, std::streamsize n) + { return t.write(s, n); } +}; + +//------------------Definition of write_filter_impl---------------------------// + +template +struct write_filter_impl + : mpl::if_< + is_custom, + operations, + write_filter_impl< + BOOST_DEDUCED_TYPENAME + dispatch< + T, multichar_tag, any_tag + >::type + > + >::type + { }; + +template<> +struct write_filter_impl { + template + static std::streamsize + write( T& t, Sink& snk, const typename char_type_of::type* s, + std::streamsize n ) + { return t.write(snk, s, n); } +}; + +template<> +struct write_filter_impl { + template + static std::streamsize + write( T& t, Sink& snk, const typename char_type_of::type* s, + std::streamsize n ) + { + for (std::streamsize off = 0; off < n; ++off) + if (!t.put(snk, s[off])) + return off; + return n; + } +}; + +} // End namespace detail. + +} } // End namespaces iostreams, boost. + +#endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------// + +#include + +#endif // #ifndef BOOST_IOSTREAMS_WRITE_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/is_placeholder.hpp b/deal.II/contrib/boost-1.45.0/include/boost/is_placeholder.hpp new file mode 100644 index 0000000000..5f1b544f94 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/is_placeholder.hpp @@ -0,0 +1,31 @@ +#ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED +#define BOOST_IS_PLACEHOLDER_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined( _MSC_VER ) && ( _MSC_VER >= 1020 ) +# pragma once +#endif + + +// is_placeholder.hpp - TR1 is_placeholder metafunction +// +// Copyright (c) 2006 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + + +namespace boost +{ + +template< class T > struct is_placeholder +{ + enum _vt { value = 0 }; +}; + +} // namespace boost + +#endif // #ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator.hpp new file mode 100644 index 0000000000..a43cfe138e --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator.hpp @@ -0,0 +1,59 @@ +// interator.hpp workarounds for non-conforming standard libraries ---------// + +// (C) Copyright Beman Dawes 2000. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility for documentation. + +// Revision History +// 12 Jan 01 added for std::ptrdiff_t (Jens Maurer) +// 28 Jun 00 Workarounds to deal with known MSVC bugs (David Abrahams) +// 26 Jun 00 Initial version (Jeremy Siek) + +#ifndef BOOST_ITERATOR_HPP +#define BOOST_ITERATOR_HPP + +#include +#include // std::ptrdiff_t +#include + +namespace boost +{ +# if defined(BOOST_NO_STD_ITERATOR) && !defined(BOOST_MSVC_STD_ITERATOR) + template + struct iterator + { + typedef T value_type; + typedef Distance difference_type; + typedef Pointer pointer; + typedef Reference reference; + typedef Category iterator_category; + }; +# else + + // declare iterator_base in namespace detail to work around MSVC bugs which + // prevent derivation from an identically-named class in a different namespace. + namespace detail { + template +# if !defined(BOOST_MSVC_STD_ITERATOR) + struct iterator_base : std::iterator {}; +# else + struct iterator_base : std::iterator + { + typedef Reference reference; + typedef Pointer pointer; + typedef Distance difference_type; + }; +# endif + } + + template + struct iterator : boost::detail::iterator_base {}; +# endif +} // namespace boost + +#endif // BOOST_ITERATOR_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/counting_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/counting_iterator.hpp new file mode 100644 index 0000000000..1298a31f55 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/counting_iterator.hpp @@ -0,0 +1,215 @@ +// Copyright David Abrahams 2003. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef COUNTING_ITERATOR_DWA200348_HPP +# define COUNTING_ITERATOR_DWA200348_HPP + +# include +# include +# include +# include +# include +# include + +namespace boost { + +template < + class Incrementable + , class CategoryOrTraversal + , class Difference +> +class counting_iterator; + +namespace detail +{ + // Try to detect numeric types at compile time in ways compatible + // with the limitations of the compiler and library. + template + struct is_numeric_impl + { + // For a while, this wasn't true, but we rely on it below. This is a regression assert. + BOOST_STATIC_ASSERT(::boost::is_integral::value); + +# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + + BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits::is_specialized); + +# else + +# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) + BOOST_STATIC_CONSTANT( + bool, value = ( + boost::is_convertible::value + && boost::is_convertible::value + )); +# else + BOOST_STATIC_CONSTANT(bool, value = ::boost::is_arithmetic::value); +# endif + +# endif + }; + + template + struct is_numeric + : mpl::bool_<(::boost::detail::is_numeric_impl::value)> + {}; + +# if defined(BOOST_HAS_LONG_LONG) + template <> + struct is_numeric< ::boost::long_long_type> + : mpl::true_ {}; + + template <> + struct is_numeric< ::boost::ulong_long_type> + : mpl::true_ {}; +# endif + + // Some compilers fail to have a numeric_limits specialization + template <> + struct is_numeric + : mpl::true_ {}; + + template + struct numeric_difference + { + typedef typename boost::detail::numeric_traits::difference_type type; + }; + + BOOST_STATIC_ASSERT(is_numeric::value); + + template + struct counting_iterator_base + { + typedef typename detail::ia_dflt_help< + CategoryOrTraversal + , mpl::eval_if< + is_numeric + , mpl::identity + , iterator_traversal + > + >::type traversal; + + typedef typename detail::ia_dflt_help< + Difference + , mpl::eval_if< + is_numeric + , numeric_difference + , iterator_difference + > + >::type difference; + + typedef iterator_adaptor< + counting_iterator // self + , Incrementable // Base + , Incrementable // Value +# ifndef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY + const // MSVC won't strip this. Instead we enable Thomas' + // criterion (see boost/iterator/detail/facade_iterator_category.hpp) +# endif + , traversal + , Incrementable const& // reference + , difference + > type; + }; + + // Template class distance_policy_select -- choose a policy for computing the + // distance between counting_iterators at compile-time based on whether or not + // the iterator wraps an integer or an iterator, using "poor man's partial + // specialization". + + template struct distance_policy_select; + + // A policy for wrapped iterators + template + struct iterator_distance + { + static Difference distance(Incrementable1 x, Incrementable2 y) + { + return y - x; + } + }; + + // A policy for wrapped numbers + template + struct number_distance + { + static Difference distance(Incrementable1 x, Incrementable2 y) + { + return numeric_distance(x, y); + } + }; +} + +template < + class Incrementable + , class CategoryOrTraversal = use_default + , class Difference = use_default +> +class counting_iterator + : public detail::counting_iterator_base< + Incrementable, CategoryOrTraversal, Difference + >::type +{ + typedef typename detail::counting_iterator_base< + Incrementable, CategoryOrTraversal, Difference + >::type super_t; + + friend class iterator_core_access; + + public: + typedef typename super_t::difference_type difference_type; + + counting_iterator() { } + + counting_iterator(counting_iterator const& rhs) : super_t(rhs.base()) {} + + counting_iterator(Incrementable x) + : super_t(x) + { + } + +# if 0 + template + counting_iterator( + counting_iterator const& t + , typename enable_if_convertible::type* = 0 + ) + : super_t(t.base()) + {} +# endif + + private: + + typename super_t::reference dereference() const + { + return this->base_reference(); + } + + template + difference_type + distance_to(counting_iterator const& y) const + { + typedef typename mpl::if_< + detail::is_numeric + , detail::number_distance + , detail::iterator_distance + >::type d; + + return d::distance(this->base(), y.base()); + } +}; + +// Manufacture a counting iterator for an arbitrary incrementable type +template +inline counting_iterator +make_counting_iterator(Incrementable x) +{ + typedef counting_iterator result_t; + return result_t(x); +} + + +} // namespace boost::iterator + +#endif // COUNTING_ITERATOR_DWA200348_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/any_conversion_eater.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/any_conversion_eater.hpp new file mode 100644 index 0000000000..25fa644889 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/any_conversion_eater.hpp @@ -0,0 +1,19 @@ +// Copyright David Abrahams 2003. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef ANY_CONVERSION_EATER_DWA20031117_HPP +# define ANY_CONVERSION_EATER_DWA20031117_HPP + +namespace boost { namespace detail { + +// This type can be used in traits to "eat" up the one user-defined +// implicit conversion allowed. +struct any_conversion_eater +{ + template + any_conversion_eater(T const&); +}; + +}} // namespace boost::detail + +#endif // ANY_CONVERSION_EATER_DWA20031117_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/config_def.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/config_def.hpp new file mode 100644 index 0000000000..fa8d667d97 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/config_def.hpp @@ -0,0 +1,137 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// no include guard multiple inclusion intended + +// +// This is a temporary workaround until the bulk of this is +// available in boost config. +// 23/02/03 thw +// + +#include // for prior +#include + +#ifdef BOOST_ITERATOR_CONFIG_DEF +# error you have nested config_def #inclusion. +#else +# define BOOST_ITERATOR_CONFIG_DEF +#endif + +// We enable this always now. Otherwise, the simple case in +// libs/iterator/test/constant_iterator_arrow.cpp fails to compile +// because the operator-> return is improperly deduced as a non-const +// pointer. +#if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) + +// Recall that in general, compilers without partial specialization +// can't strip constness. Consider counting_iterator, which normally +// passes a const Value to iterator_facade. As a result, any code +// which makes a std::vector of the iterator's value_type will fail +// when its allocator declares functions overloaded on reference and +// const_reference (the same type). +// +// Furthermore, Borland 5.5.1 drops constness in enough ways that we +// end up using a proxy for operator[] when we otherwise shouldn't. +// Using reference constness gives it an extra hint that it can +// return the value_type from operator[] directly, but is not +// strictly necessary. Not sure how best to resolve this one. + +# define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1 + +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \ + || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ + || BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) + +# define BOOST_NO_LVALUE_RETURN_DETECTION + +# if 0 // test code + struct v {}; + + typedef char (&no)[3]; + + template + no foo(T const&, ...); + + template + char foo(T&, int); + + + struct value_iterator + { + v operator*() const; + }; + + template + struct lvalue_deref_helper + { + static T& x; + enum { value = (sizeof(foo(*x,0)) == 1) }; + }; + + int z2[(lvalue_deref_helper::value == 1) ? 1 : -1]; + int z[(lvalue_deref_helper::value) == 1 ? -1 : 1 ]; +# endif + +#endif + +#if BOOST_WORKAROUND(__MWERKS__, <=0x2407) +# define BOOST_NO_IS_CONVERTIBLE // "is_convertible doesn't work for simple types" +#endif + +#if BOOST_WORKAROUND(__GNUC__, == 2) \ + || BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) +# define BOOST_NO_IS_CONVERTIBLE_TEMPLATE // The following program fails to compile: + +# if 0 // test code + #include + template + struct foo + { + foo(T); + + template + foo(foo const& other) : p(other.p) { } + + T p; + }; + + bool x = boost::is_convertible, foo >::value; +# endif + +#endif + + +#if !defined(BOOST_MSVC) && (defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE)) +# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +#endif + +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_ARG_DEPENDENT_TYPENAME typename +# else +# define BOOST_ARG_DEPENDENT_TYPENAME +# endif + +# if BOOST_WORKAROUND(__GNUC__, == 2) && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(95)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + +// GCC-2.95 eagerly instantiates templated constructors and conversion +// operators in convertibility checks, causing premature errors. +// +// Borland's problems are harder to diagnose due to lack of an +// instantiation stack backtrace. They may be due in part to the fact +// that it drops cv-qualification willy-nilly in templates. +# define BOOST_NO_ONE_WAY_ITERATOR_INTEROP +# endif + +// no include guard; multiple inclusion intended diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/config_undef.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/config_undef.hpp new file mode 100644 index 0000000000..9dcd1d525f --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/config_undef.hpp @@ -0,0 +1,25 @@ +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// no include guard multiple inclusion intended + +// +// This is a temporary workaround until the bulk of this is +// available in boost config. +// 23/02/03 thw +// + +#undef BOOST_NO_IS_CONVERTIBLE +#undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE +#undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +#undef BOOST_ARG_DEPENDENT_TYPENAME +#undef BOOST_NO_LVALUE_RETURN_DETECTION +#undef BOOST_NO_ONE_WAY_ITERATOR_INTEROP + +#ifdef BOOST_ITERATOR_CONFIG_DEF +# undef BOOST_ITERATOR_CONFIG_DEF +#else +# error missing or nested #include config_def +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/enable_if.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/enable_if.hpp new file mode 100644 index 0000000000..0fd36fc4bc --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/enable_if.hpp @@ -0,0 +1,86 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ENABLE_IF_23022003THW_HPP +#define BOOST_ENABLE_IF_23022003THW_HPP + +#include +#include + +#include + +// +// Boost iterators uses its own enable_if cause we need +// special semantics for deficient compilers. +// 23/02/03 thw +// + +namespace boost +{ + + namespace iterators + { + // + // Base machinery for all kinds of enable if + // + template + struct enabled + { + template + struct base + { + typedef T type; + }; + }; + + // + // For compilers that don't support "Substitution Failure Is Not An Error" + // enable_if falls back to always enabled. See comments + // on operator implementation for consequences. + // + template<> + struct enabled + { + template + struct base + { +#ifdef BOOST_NO_SFINAE + + typedef T type; + + // This way to do it would give a nice error message containing + // invalid overload, but has the big disadvantage that + // there is no reference to user code in the error message. + // + // struct invalid_overload; + // typedef invalid_overload type; + // +#endif + }; + }; + + + template + struct enable_if +# if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_IS_CONVERTIBLE) + : enabled<(Cond::value)>::template base +# else + : mpl::identity +# endif + { +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + typedef Return type; +# endif + }; + + } // namespace iterators + +} // namespace boost + +#include + +#endif // BOOST_ENABLE_IF_23022003THW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/facade_iterator_category.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/facade_iterator_category.hpp new file mode 100644 index 0000000000..2c4771d5aa --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/facade_iterator_category.hpp @@ -0,0 +1,200 @@ +// Copyright David Abrahams 2003. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef FACADE_ITERATOR_CATEGORY_DWA20031118_HPP +# define FACADE_ITERATOR_CATEGORY_DWA20031118_HPP + +# include + +# include // used in iterator_tag inheritance logic +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +# include + +# include // try to keep this last + +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY +# include +# endif + +// +// iterator_category deduction for iterator_facade +// + +// forward declaration +namespace boost { struct use_default; } + +namespace boost { namespace detail { + +struct input_output_iterator_tag + : std::input_iterator_tag +{ + // Using inheritance for only input_iterator_tag helps to avoid + // ambiguities when a stdlib implementation dispatches on a + // function which is overloaded on both input_iterator_tag and + // output_iterator_tag, as STLPort does, in its __valid_range + // function. I claim it's better to avoid the ambiguity in these + // cases. + operator std::output_iterator_tag() const + { + return std::output_iterator_tag(); + } +}; + +// +// True iff the user has explicitly disabled writability of this +// iterator. Pass the iterator_facade's Value parameter and its +// nested ::reference type. +// +template +struct iterator_writability_disabled +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY // Adding Thomas' logic? + : mpl::or_< + is_const + , boost::detail::indirect_traits::is_reference_to_const + , is_const + > +# else + : is_const +# endif +{}; + + +// +// Convert an iterator_facade's traversal category, Value parameter, +// and ::reference type to an appropriate old-style category. +// +// If writability has been disabled per the above metafunction, the +// result will not be convertible to output_iterator_tag. +// +// Otherwise, if Traversal == single_pass_traversal_tag, the following +// conditions will result in a tag that is convertible both to +// input_iterator_tag and output_iterator_tag: +// +// 1. Reference is a reference to non-const +// 2. Reference is not a reference and is convertible to Value +// +template +struct iterator_facade_default_category + : mpl::eval_if< + mpl::and_< + is_reference + , is_convertible + > + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::if_< + is_convertible + , std::bidirectional_iterator_tag + , std::forward_iterator_tag + > + > + , typename mpl::eval_if< + mpl::and_< + is_convertible + + // check for readability + , is_convertible + > + , mpl::identity + , mpl::identity + > + > +{ +}; + +// True iff T is convertible to an old-style iterator category. +template +struct is_iterator_category + : mpl::or_< + is_convertible + , is_convertible + > +{ +}; + +template +struct is_iterator_traversal + : is_convertible +{}; + +// +// A composite iterator_category tag convertible to Category (a pure +// old-style category) and Traversal (a pure traversal tag). +// Traversal must be a strict increase of the traversal power given by +// Category. +// +template +struct iterator_category_with_traversal + : Category, Traversal +{ +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + // Make sure this isn't used to build any categories where + // convertibility to Traversal is redundant. Should just use the + // Category element in that case. + BOOST_MPL_ASSERT_NOT(( + is_convertible< + typename iterator_category_to_traversal::type + , Traversal + >)); + + BOOST_MPL_ASSERT((is_iterator_category)); + BOOST_MPL_ASSERT_NOT((is_iterator_category)); + BOOST_MPL_ASSERT_NOT((is_iterator_traversal)); +# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) + BOOST_MPL_ASSERT((is_iterator_traversal)); +# endif +# endif +}; + +// Computes an iterator_category tag whose traversal is Traversal and +// which is appropriate for an iterator +template +struct facade_iterator_category_impl +{ +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + BOOST_MPL_ASSERT_NOT((is_iterator_category)); +# endif + + typedef typename iterator_facade_default_category< + Traversal,ValueParam,Reference + >::type category; + + typedef typename mpl::if_< + is_same< + Traversal + , typename iterator_category_to_traversal::type + > + , category + , iterator_category_with_traversal + >::type type; +}; + +// +// Compute an iterator_category for iterator_facade +// +template +struct facade_iterator_category + : mpl::eval_if< + is_iterator_category + , mpl::identity // old-style categories are fine as-is + , facade_iterator_category_impl + > +{ +}; + +}} // namespace boost::detail + +# include + +#endif // FACADE_ITERATOR_CATEGORY_DWA20031118_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/minimum_category.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/minimum_category.hpp new file mode 100644 index 0000000000..96501ddd46 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/detail/minimum_category.hpp @@ -0,0 +1,116 @@ +// Copyright David Abrahams 2003. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef MINIMUM_CATEGORY_DWA20031119_HPP +# define MINIMUM_CATEGORY_DWA20031119_HPP + +# include +# include + +# include + +namespace boost { namespace detail { +// +// Returns the minimum category type or error_type +// if T1 and T2 are unrelated. +// +// For compilers not supporting is_convertible this only +// works with the new boost return and traversal category +// types. The exact boost _types_ are required. No derived types +// will work. +// +// +template +struct minimum_category_impl +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +{ + template struct apply + { + typedef T2 type; + }; + typedef void type; +} +# endif +; + +template +struct error_not_related_by_convertibility; + +template <> +struct minimum_category_impl +{ + template struct apply + { + typedef T2 type; + }; +}; + +template <> +struct minimum_category_impl +{ + template struct apply + { + typedef T1 type; + }; +}; + +template <> +struct minimum_category_impl +{ + template struct apply + { + BOOST_STATIC_ASSERT((is_same::value)); + typedef T1 type; + }; +}; + +template <> +struct minimum_category_impl +{ + template struct apply + : error_not_related_by_convertibility + { + }; +}; + +template +struct minimum_category +{ + typedef minimum_category_impl< +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround + is_same::value || +# endif + ::boost::is_convertible::value + , ::boost::is_convertible::value +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround + || is_same::value +# endif + > outer; + + typedef typename outer::template apply inner; + typedef typename inner::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,minimum_category,(T1,T2)) +}; + +template <> +struct minimum_category +{ + template + struct apply : minimum_category + {}; + + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2)) +}; + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround +template <> +struct minimum_category +{ + typedef int type; +}; +# endif + +}} // namespace boost::detail + +#endif // MINIMUM_CATEGORY_DWA20031119_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/filter_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/filter_iterator.hpp new file mode 100644 index 0000000000..14d640bf09 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/filter_iterator.hpp @@ -0,0 +1,135 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_FILTER_ITERATOR_23022003THW_HPP +#define BOOST_FILTER_ITERATOR_23022003THW_HPP + +#include +#include +#include + +#include +#include + +namespace boost +{ + template + class filter_iterator; + + namespace detail + { + template + struct filter_iterator_base + { + typedef iterator_adaptor< + filter_iterator + , Iterator + , use_default + , typename mpl::if_< + is_convertible< + typename iterator_traversal::type + , random_access_traversal_tag + > + , bidirectional_traversal_tag + , use_default + >::type + > type; + }; + } + + template + class filter_iterator + : public detail::filter_iterator_base::type + { + typedef typename detail::filter_iterator_base< + Predicate, Iterator + >::type super_t; + + friend class iterator_core_access; + + public: + filter_iterator() { } + + filter_iterator(Predicate f, Iterator x, Iterator end_ = Iterator()) + : super_t(x), m_predicate(f), m_end(end_) + { + satisfy_predicate(); + } + + filter_iterator(Iterator x, Iterator end_ = Iterator()) + : super_t(x), m_predicate(), m_end(end_) + { + // Pro8 is a little too aggressive about instantiating the + // body of this function. +#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) + // Don't allow use of this constructor if Predicate is a + // function pointer type, since it will be 0. + BOOST_STATIC_ASSERT(is_class::value); +#endif + satisfy_predicate(); + } + + template + filter_iterator( + filter_iterator const& t + , typename enable_if_convertible::type* = 0 + ) + : super_t(t.base()), m_predicate(t.predicate()), m_end(t.end()) {} + + Predicate predicate() const { return m_predicate; } + + Iterator end() const { return m_end; } + + private: + void increment() + { + ++(this->base_reference()); + satisfy_predicate(); + } + + void decrement() + { + while(!this->m_predicate(*--(this->base_reference()))){}; + } + + void satisfy_predicate() + { + while (this->base() != this->m_end && !this->m_predicate(*this->base())) + ++(this->base_reference()); + } + + // Probably should be the initial base class so it can be + // optimized away via EBO if it is an empty class. + Predicate m_predicate; + Iterator m_end; + }; + + template + filter_iterator + make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator()) + { + return filter_iterator(f,x,end); + } + + template + filter_iterator + make_filter_iterator( + typename iterators::enable_if< + is_class + , Iterator + >::type x + , Iterator end = Iterator() +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + , Predicate* = 0 +#endif + ) + { + return filter_iterator(x,end); + } + +} // namespace boost + +#endif // BOOST_FILTER_ITERATOR_23022003THW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/indirect_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/indirect_iterator.hpp new file mode 100644 index 0000000000..abff7e7634 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/indirect_iterator.hpp @@ -0,0 +1,139 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_INDIRECT_ITERATOR_23022003THW_HPP +#define BOOST_INDIRECT_ITERATOR_23022003THW_HPP + +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#ifdef BOOST_MPL_CFG_NO_HAS_XXX +# include +# include +# include +# include +#endif + +#include // must be last #include + +namespace boost +{ + template + class indirect_iterator; + + namespace detail + { + template + struct indirect_base + { + typedef typename iterator_traits::value_type dereferenceable; + + typedef iterator_adaptor< + indirect_iterator + , Iter + , typename ia_dflt_help< + Value, pointee + >::type + , Category + , typename ia_dflt_help< + Reference + , mpl::eval_if< + is_same + , indirect_reference + , add_reference + > + >::type + , Difference + > type; + }; + + template <> + struct indirect_base {}; + } // namespace detail + + + template < + class Iterator + , class Value = use_default + , class Category = use_default + , class Reference = use_default + , class Difference = use_default + > + class indirect_iterator + : public detail::indirect_base< + Iterator, Value, Category, Reference, Difference + >::type + { + typedef typename detail::indirect_base< + Iterator, Value, Category, Reference, Difference + >::type super_t; + + friend class iterator_core_access; + + public: + indirect_iterator() {} + + indirect_iterator(Iterator iter) + : super_t(iter) {} + + template < + class Iterator2, class Value2, class Category2 + , class Reference2, class Difference2 + > + indirect_iterator( + indirect_iterator< + Iterator2, Value2, Category2, Reference2, Difference2 + > const& y + , typename enable_if_convertible::type* = 0 + ) + : super_t(y.base()) + {} + + private: + typename super_t::reference dereference() const + { +# if BOOST_WORKAROUND(__BORLANDC__, < 0x5A0 ) + return const_cast(**this->base()); +# else + return **this->base(); +# endif + } + }; + + template + inline + indirect_iterator make_indirect_iterator(Iter x) + { + return indirect_iterator(x); + } + + template + inline + indirect_iterator make_indirect_iterator(Iter x, Traits* = 0) + { + return indirect_iterator(x); + } + +} // namespace boost + +#include + +#endif // BOOST_INDIRECT_ITERATOR_23022003THW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/interoperable.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/interoperable.hpp new file mode 100644 index 0000000000..c13dd9b47b --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/interoperable.hpp @@ -0,0 +1,50 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_INTEROPERABLE_23022003THW_HPP +# define BOOST_INTEROPERABLE_23022003THW_HPP + +# include +# include + +# include + +# include // must appear last + +namespace boost +{ + + // + // Meta function that determines whether two + // iterator types are considered interoperable. + // + // Two iterator types A,B are considered interoperable if either + // A is convertible to B or vice versa. + // This interoperability definition is in sync with the + // standards requirements on constant/mutable container + // iterators (23.1 [lib.container.requirements]). + // + // For compilers that don't support is_convertible + // is_interoperable gives false positives. See comments + // on operator implementation for consequences. + // + template + struct is_interoperable +# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY + : mpl::true_ +# else + : mpl::or_< + is_convertible< A, B > + , is_convertible< B, A > > +# endif + { + }; + +} // namespace boost + +# include + +#endif // BOOST_INTEROPERABLE_23022003THW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/is_lvalue_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/is_lvalue_iterator.hpp new file mode 100644 index 0000000000..3beb90df6d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/is_lvalue_iterator.hpp @@ -0,0 +1,150 @@ +// Copyright David Abrahams 2003. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef IS_LVALUE_ITERATOR_DWA2003112_HPP +# define IS_LVALUE_ITERATOR_DWA2003112_HPP + +#include + +#include +#include + +#include + +// should be the last #includes +#include +#include + +#ifndef BOOST_NO_IS_CONVERTIBLE + +namespace boost { + +namespace detail +{ +#ifndef BOOST_NO_LVALUE_RETURN_DETECTION + // Calling lvalue_preserver( , 0 ) returns a reference + // to the expression's result if is an lvalue, or + // not_an_lvalue() otherwise. + struct not_an_lvalue {}; + + template + T& lvalue_preserver(T&, int); + + template + not_an_lvalue lvalue_preserver(U const&, ...); + +# define BOOST_LVALUE_PRESERVER(expr) detail::lvalue_preserver(expr,0) + +#else + +# define BOOST_LVALUE_PRESERVER(expr) expr + +#endif + + // Guts of is_lvalue_iterator. Value is the iterator's value_type + // and the result is computed in the nested rebind template. + template + struct is_lvalue_iterator_impl + { + // Eat implicit conversions so we don't report true for things + // convertible to Value const& + struct conversion_eater + { + conversion_eater(Value&); + }; + + static char tester(conversion_eater, int); + static char (& tester(any_conversion_eater, ...) )[2]; + + template + struct rebind + { + static It& x; + + BOOST_STATIC_CONSTANT( + bool + , value = ( + sizeof( + is_lvalue_iterator_impl::tester( + BOOST_LVALUE_PRESERVER(*x), 0 + ) + ) == 1 + ) + ); + }; + }; + +#undef BOOST_LVALUE_PRESERVER + + // + // void specializations to handle std input and output iterators + // + template <> + struct is_lvalue_iterator_impl + { + template + struct rebind : boost::mpl::false_ + {}; + }; + +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS + template <> + struct is_lvalue_iterator_impl + { + template + struct rebind : boost::mpl::false_ + {}; + }; + + template <> + struct is_lvalue_iterator_impl + { + template + struct rebind : boost::mpl::false_ + {}; + }; + + template <> + struct is_lvalue_iterator_impl + { + template + struct rebind : boost::mpl::false_ + {}; + }; +#endif + + // + // This level of dispatching is required for Borland. We might save + // an instantiation by removing it for others. + // + template + struct is_readable_lvalue_iterator_impl + : is_lvalue_iterator_impl< + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type const + >::template rebind + {}; + + template + struct is_non_const_lvalue_iterator_impl + : is_lvalue_iterator_impl< + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + >::template rebind + {}; +} // namespace detail + +// Define the trait with full mpl lambda capability and various broken +// compiler workarounds +BOOST_TT_AUX_BOOL_TRAIT_DEF1( + is_lvalue_iterator,T,::boost::detail::is_readable_lvalue_iterator_impl::value) + +BOOST_TT_AUX_BOOL_TRAIT_DEF1( + is_non_const_lvalue_iterator,T,::boost::detail::is_non_const_lvalue_iterator_impl::value) + +} // namespace boost + +#endif + +#include +#include + +#endif // IS_LVALUE_ITERATOR_DWA2003112_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/is_readable_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/is_readable_iterator.hpp new file mode 100644 index 0000000000..60d6ff07f5 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/is_readable_iterator.hpp @@ -0,0 +1,108 @@ +// Copyright David Abrahams 2003. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef IS_READABLE_ITERATOR_DWA2003112_HPP +# define IS_READABLE_ITERATOR_DWA2003112_HPP + +#include +#include + +#include +#include + +// should be the last #include +#include + +#ifndef BOOST_NO_IS_CONVERTIBLE + +namespace boost { + +namespace detail +{ + // Guts of is_readable_iterator. Value is the iterator's value_type + // and the result is computed in the nested rebind template. + template + struct is_readable_iterator_impl + { + static char tester(Value&, int); + static char (& tester(any_conversion_eater, ...) )[2]; + + template + struct rebind + { + static It& x; + + BOOST_STATIC_CONSTANT( + bool + , value = ( + sizeof( + is_readable_iterator_impl::tester(*x, 1) + ) == 1 + ) + ); + }; + }; + +#undef BOOST_READABLE_PRESERVER + + // + // void specializations to handle std input and output iterators + // + template <> + struct is_readable_iterator_impl + { + template + struct rebind : boost::mpl::false_ + {}; + }; + +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS + template <> + struct is_readable_iterator_impl + { + template + struct rebind : boost::mpl::false_ + {}; + }; + + template <> + struct is_readable_iterator_impl + { + template + struct rebind : boost::mpl::false_ + {}; + }; + + template <> + struct is_readable_iterator_impl + { + template + struct rebind : boost::mpl::false_ + {}; + }; +#endif + + // + // This level of dispatching is required for Borland. We might save + // an instantiation by removing it for others. + // + template + struct is_readable_iterator_impl2 + : is_readable_iterator_impl< + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type const + >::template rebind + {}; +} // namespace detail + +// Define the trait with full mpl lambda capability and various broken +// compiler workarounds +BOOST_TT_AUX_BOOL_TRAIT_DEF1( + is_readable_iterator,T,::boost::detail::is_readable_iterator_impl2::value) + +} // namespace boost + +#endif + +#include + +#endif // IS_READABLE_ITERATOR_DWA2003112_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_adaptor.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_adaptor.hpp new file mode 100644 index 0000000000..27b08ff018 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_adaptor.hpp @@ -0,0 +1,371 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ITERATOR_ADAPTOR_23022003THW_HPP +#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY +# include + +# if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) +# include +# endif + +#else +# include +#endif + +#include + +#include + +namespace boost +{ + // Used as a default template argument internally, merely to + // indicate "use the default", this can also be passed by users + // explicitly in order to specify that the default should be used. + struct use_default; + +# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // the incompleteness of use_default causes massive problems for + // is_convertible (naturally). This workaround is fortunately not + // needed for vc6/vc7. + template + struct is_convertible + : mpl::false_ {}; +# endif + + namespace detail + { + + // + // Result type used in enable_if_convertible meta function. + // This can be an incomplete type, as only pointers to + // enable_if_convertible< ... >::type are used. + // We could have used void for this, but conversion to + // void* is just to easy. + // + struct enable_type; + } + + + // + // enable_if for use in adapted iterators constructors. + // + // In order to provide interoperability between adapted constant and + // mutable iterators, adapted iterators will usually provide templated + // conversion constructors of the following form + // + // template + // class adapted_iterator : + // public iterator_adaptor< adapted_iterator, Iterator > + // { + // public: + // + // ... + // + // template + // adapted_iterator( + // OtherIterator const& it + // , typename enable_if_convertible::type* = 0); + // + // ... + // }; + // + // enable_if_convertible is used to remove those overloads from the overload + // set that cannot be instantiated. For all practical purposes only overloads + // for constant/mutable interaction will remain. This has the advantage that + // meta functions like boost::is_convertible do not return false positives, + // as they can only look at the signature of the conversion constructor + // and not at the actual instantiation. + // + // enable_if_interoperable can be safely used in user code. It falls back to + // always enabled for compilers that don't support enable_if or is_convertible. + // There is no need for compiler specific workarounds in user code. + // + // The operators implementation relies on boost::is_convertible not returning + // false positives for user/library defined iterator types. See comments + // on operator implementation for consequences. + // +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + + template + struct enable_if_convertible + { + typedef typename mpl::if_< + mpl::or_< + is_same + , is_convertible + > + , boost::detail::enable_type + , int& + >::type type; + }; + +# elif defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE) + + template + struct enable_if_convertible + { + typedef boost::detail::enable_type type; + }; + +# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300 + + // For some reason vc7.1 needs us to "cut off" instantiation + // of is_convertible in a few cases. + template + struct enable_if_convertible + : iterators::enable_if< + mpl::or_< + is_same + , is_convertible + > + , boost::detail::enable_type + > + {}; + +# else + + template + struct enable_if_convertible + : iterators::enable_if< + is_convertible + , boost::detail::enable_type + > + {}; + +# endif + + // + // Default template argument handling for iterator_adaptor + // + namespace detail + { + // If T is use_default, return the result of invoking + // DefaultNullaryFn, otherwise return T. + template + struct ia_dflt_help + : mpl::eval_if< + is_same + , DefaultNullaryFn + , mpl::identity + > + { + }; + + // A metafunction which computes an iterator_adaptor's base class, + // a specialization of iterator_facade. + template < + class Derived + , class Base + , class Value + , class Traversal + , class Reference + , class Difference + > + struct iterator_adaptor_base + { + typedef iterator_facade< + Derived + +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY + , typename boost::detail::ia_dflt_help< + Value + , mpl::eval_if< + is_same + , iterator_value + , remove_reference + > + >::type +# else + , typename boost::detail::ia_dflt_help< + Value, iterator_value + >::type +# endif + + , typename boost::detail::ia_dflt_help< + Traversal + , iterator_traversal + >::type + + , typename boost::detail::ia_dflt_help< + Reference + , mpl::eval_if< + is_same + , iterator_reference + , add_reference + > + >::type + + , typename boost::detail::ia_dflt_help< + Difference, iterator_difference + >::type + > + type; + }; + + // workaround for aC++ CR JAGaf33512 + template + inline void iterator_adaptor_assert_traversal () + { + BOOST_STATIC_ASSERT((is_convertible::value)); + } + } + + // + // Iterator Adaptor + // + // The parameter ordering changed slightly with respect to former + // versions of iterator_adaptor The idea is that when the user needs + // to fiddle with the reference type it is highly likely that the + // iterator category has to be adjusted as well. Any of the + // following four template arguments may be ommitted or explicitly + // replaced by use_default. + // + // Value - if supplied, the value_type of the resulting iterator, unless + // const. If const, a conforming compiler strips constness for the + // value_type. If not supplied, iterator_traits::value_type is used + // + // Category - the traversal category of the resulting iterator. If not + // supplied, iterator_traversal::type is used. + // + // Reference - the reference type of the resulting iterator, and in + // particular, the result type of operator*(). If not supplied but + // Value is supplied, Value& is used. Otherwise + // iterator_traits::reference is used. + // + // Difference - the difference_type of the resulting iterator. If not + // supplied, iterator_traits::difference_type is used. + // + template < + class Derived + , class Base + , class Value = use_default + , class Traversal = use_default + , class Reference = use_default + , class Difference = use_default + > + class iterator_adaptor + : public boost::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type + { + friend class iterator_core_access; + + protected: + typedef typename boost::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type super_t; + public: + iterator_adaptor() {} + + explicit iterator_adaptor(Base const &iter) + : m_iterator(iter) + { + } + + typedef Base base_type; + + Base const& base() const + { return m_iterator; } + + protected: + // for convenience in derived classes + typedef iterator_adaptor iterator_adaptor_; + + // + // lvalue access to the Base object for Derived + // + Base const& base_reference() const + { return m_iterator; } + + Base& base_reference() + { return m_iterator; } + + private: + // + // Core iterator interface for iterator_facade. This is private + // to prevent temptation for Derived classes to use it, which + // will often result in an error. Derived classes should use + // base_reference(), above, to get direct access to m_iterator. + // + typename super_t::reference dereference() const + { return *m_iterator; } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + bool equal(iterator_adaptor const& x) const + { + // Maybe readd with same_distance + // BOOST_STATIC_ASSERT( + // (detail::same_category_and_difference::value) + // ); + return m_iterator == x.base(); + } + + typedef typename iterator_category_to_traversal< + typename super_t::iterator_category + >::type my_traversal; + +# define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \ + boost::detail::iterator_adaptor_assert_traversal(); + + void advance(typename super_t::difference_type n) + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) + m_iterator += n; + } + + void increment() { ++m_iterator; } + + void decrement() + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(bidirectional_traversal_tag) + --m_iterator; + } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + typename super_t::difference_type distance_to( + iterator_adaptor const& y) const + { + BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) + // Maybe readd with same_distance + // BOOST_STATIC_ASSERT( + // (detail::same_category_and_difference::value) + // ); + return y.base() - m_iterator; + } + +# undef BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL + + private: // data members + Base m_iterator; + }; + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_ADAPTOR_23022003THW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_archetypes.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_archetypes.hpp new file mode 100644 index 0000000000..039de1cf74 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_archetypes.hpp @@ -0,0 +1,515 @@ +// (C) Copyright Jeremy Siek 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_ARCHETYPES_HPP +#define BOOST_ITERATOR_ARCHETYPES_HPP + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { + +template +struct access_archetype; + +template +struct traversal_archetype; + +namespace iterator_archetypes +{ + enum { + readable_iterator_bit = 1 + , writable_iterator_bit = 2 + , swappable_iterator_bit = 4 + , lvalue_iterator_bit = 8 + }; + + // Not quite tags, since dispatching wouldn't work. + typedef mpl::int_::type readable_iterator_t; + typedef mpl::int_::type writable_iterator_t; + + typedef mpl::int_< + (readable_iterator_bit|writable_iterator_bit) + >::type readable_writable_iterator_t; + + typedef mpl::int_< + (readable_iterator_bit|lvalue_iterator_bit) + >::type readable_lvalue_iterator_t; + + typedef mpl::int_< + (lvalue_iterator_bit|writable_iterator_bit) + >::type writable_lvalue_iterator_t; + + typedef mpl::int_::type swappable_iterator_t; + typedef mpl::int_::type lvalue_iterator_t; + + template + struct has_access + : mpl::equal_to< + mpl::bitand_ + , Base + > + {}; +} + +namespace detail +{ + template + struct assign_proxy + { + assign_proxy& operator=(T) { return *this; } + }; + + template + struct read_proxy + { + operator T() { return static_object::get(); } + }; + + template + struct read_write_proxy + : read_proxy // Use to inherit from assign_proxy, but that doesn't work. -JGS + { + read_write_proxy& operator=(T) { return *this; } + }; + + template + struct arrow_proxy + { + T const* operator->() const { return 0; } + }; + + struct no_operator_brackets {}; + + template + struct readable_operator_brackets + { + read_proxy operator[](std::ptrdiff_t n) const { return read_proxy(); } + }; + + template + struct writable_operator_brackets + { + read_write_proxy operator[](std::ptrdiff_t n) const { return read_write_proxy(); } + }; + + template + struct operator_brackets + : mpl::aux::msvc_eti_base< + typename mpl::eval_if< + is_convertible + , mpl::eval_if< + iterator_archetypes::has_access< + AccessCategory + , iterator_archetypes::writable_iterator_t + > + , mpl::identity > + , mpl::if_< + iterator_archetypes::has_access< + AccessCategory + , iterator_archetypes::readable_iterator_t + > + , readable_operator_brackets + , no_operator_brackets + > + > + , mpl::identity + >::type + >::type + {}; + + template + struct traversal_archetype_impl + { + template struct archetype; + }; + + // Constructor argument for those iterators that + // are not default constructible + struct ctor_arg {}; + + template + struct traversal_archetype_ + : mpl::aux::msvc_eti_base< + typename traversal_archetype_impl::template archetype + >::type + { + typedef typename + traversal_archetype_impl::template archetype + base; + + traversal_archetype_() {} + + traversal_archetype_(ctor_arg arg) + : base(arg) + {} + }; + + template <> + struct traversal_archetype_impl + { + template + struct archetype + { + explicit archetype(ctor_arg) {} + + struct bogus { }; // This use to be void, but that causes trouble for iterator_facade. Need more research. -JGS + typedef bogus difference_type; + + Derived& operator++() { return (Derived&)static_object::get(); } + Derived operator++(int) const { return (Derived&)static_object::get(); } + }; + }; + + template <> + struct traversal_archetype_impl + { + template + struct archetype + : public equality_comparable< traversal_archetype_ >, + public traversal_archetype_ + { + explicit archetype(ctor_arg arg) + : traversal_archetype_(arg) + {} + + typedef std::ptrdiff_t difference_type; + }; + }; + + template + bool operator==(traversal_archetype_ const&, + traversal_archetype_ const&) { return true; } + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + // doesn't seem to pick up != from equality_comparable + template + bool operator!=(traversal_archetype_ const&, + traversal_archetype_ const&) { return true; } +#endif + template <> + struct traversal_archetype_impl + { + template + struct archetype + : public traversal_archetype_ + { + archetype() + : traversal_archetype_(ctor_arg()) + {} + }; + }; + + template <> + struct traversal_archetype_impl + { + template + struct archetype + : public traversal_archetype_ + { + Derived& operator--() { return static_object::get(); } + Derived operator--(int) const { return static_object::get(); } + }; + }; + + template <> + struct traversal_archetype_impl + { + template + struct archetype + : public traversal_archetype_ + { + Derived& operator+=(std::ptrdiff_t) { return static_object::get(); } + Derived& operator-=(std::ptrdiff_t) { return static_object::get(); } + }; + }; + + template + Derived& operator+(traversal_archetype_ const&, + std::ptrdiff_t) { return static_object::get(); } + + template + Derived& operator+(std::ptrdiff_t, + traversal_archetype_ const&) + { return static_object::get(); } + + template + Derived& operator-(traversal_archetype_ const&, + std::ptrdiff_t) + { return static_object::get(); } + + template + std::ptrdiff_t operator-(traversal_archetype_ const&, + traversal_archetype_ const&) + { return 0; } + + template + bool operator<(traversal_archetype_ const&, + traversal_archetype_ const&) + { return true; } + + template + bool operator>(traversal_archetype_ const&, + traversal_archetype_ const&) + { return true; } + + template + bool operator<=(traversal_archetype_ const&, + traversal_archetype_ const&) + { return true; } + + template + bool operator>=(traversal_archetype_ const&, + traversal_archetype_ const&) + { return true; } + + struct bogus_type; + + template + struct convertible_type + : mpl::if_< is_const, + typename remove_const::type, + bogus_type > + {}; + +} // namespace detail + + +template struct undefined; + +template +struct iterator_access_archetype_impl +{ + template struct archetype; +}; + +template +struct iterator_access_archetype + : mpl::aux::msvc_eti_base< + typename iterator_access_archetype_impl< + AccessCategory + >::template archetype + >::type +{ +}; + +template <> +struct iterator_access_archetype_impl< + iterator_archetypes::readable_iterator_t +> +{ + template + struct archetype + { + typedef typename remove_cv::type value_type; + typedef Value reference; + typedef Value* pointer; + + value_type operator*() const { return static_object::get(); } + + detail::arrow_proxy operator->() const { return detail::arrow_proxy(); } + }; +}; + +template <> +struct iterator_access_archetype_impl< + iterator_archetypes::writable_iterator_t +> +{ + template + struct archetype + { +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + BOOST_STATIC_ASSERT(!is_const::value); +# endif + typedef void value_type; + typedef void reference; + typedef void pointer; + + detail::assign_proxy operator*() const { return detail::assign_proxy(); } + }; +}; + +template <> +struct iterator_access_archetype_impl< + iterator_archetypes::readable_writable_iterator_t +> +{ + template + struct archetype + : public virtual iterator_access_archetype< + Value, iterator_archetypes::readable_iterator_t + > + { + typedef detail::read_write_proxy reference; + + detail::read_write_proxy operator*() const { return detail::read_write_proxy(); } + }; +}; + +template <> +struct iterator_access_archetype_impl +{ + template + struct archetype + : public virtual iterator_access_archetype< + Value, iterator_archetypes::readable_iterator_t + > + { + typedef Value& reference; + + Value& operator*() const { return static_object::get(); } + Value* operator->() const { return 0; } + }; +}; + +template <> +struct iterator_access_archetype_impl +{ + template + struct archetype + : public virtual iterator_access_archetype< + Value, iterator_archetypes::readable_lvalue_iterator_t + > + { +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + BOOST_STATIC_ASSERT((!is_const::value)); +# endif + }; +}; + + +template +struct iterator_archetype; + +template +struct traversal_archetype_base + : detail::operator_brackets< + typename remove_cv::type + , AccessCategory + , TraversalCategory + > + , detail::traversal_archetype_< + iterator_archetype + , Value + , TraversalCategory + > +{ +}; + +namespace detail +{ + template + struct iterator_archetype_base + : iterator_access_archetype + , traversal_archetype_base + { + typedef iterator_access_archetype access; + + typedef typename detail::facade_iterator_category< + TraversalCategory + , typename mpl::eval_if< + iterator_archetypes::has_access< + AccessCategory, iterator_archetypes::writable_iterator_t + > + , remove_const + , add_const + >::type + , typename access::reference + >::type iterator_category; + + // Needed for some broken libraries (see below) + typedef boost::iterator< + iterator_category + , Value + , typename traversal_archetype_base< + Value, AccessCategory, TraversalCategory + >::difference_type + , typename access::pointer + , typename access::reference + > workaround_iterator_base; + }; +} + +template +struct iterator_archetype + : public detail::iterator_archetype_base + + // These broken libraries require derivation from std::iterator + // (or related magic) in order to handle iter_swap and other + // iterator operations +# if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, < 310) \ + || BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(0x20101)) + , public detail::iterator_archetype_base< + Value, AccessCategory, TraversalCategory + >::workaround_iterator_base +# endif +{ + // Derivation from std::iterator above caused references to nested + // types to be ambiguous, so now we have to redeclare them all + // here. +# if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, < 310) \ + || BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(0x20101)) + + typedef detail::iterator_archetype_base< + Value,AccessCategory,TraversalCategory + > base; + + typedef typename base::value_type value_type; + typedef typename base::reference reference; + typedef typename base::pointer pointer; + typedef typename base::difference_type difference_type; + typedef typename base::iterator_category iterator_category; +# endif + + iterator_archetype() { } + iterator_archetype(iterator_archetype const& x) + : detail::iterator_archetype_base< + Value + , AccessCategory + , TraversalCategory + >(x) + {} + + iterator_archetype& operator=(iterator_archetype const&) + { return *this; } + +# if 0 + // Optional conversion from mutable + iterator_archetype( + iterator_archetype< + typename detail::convertible_type::type + , AccessCategory + , TraversalCategory> const& + ); +# endif +}; + +} // namespace boost + + +#endif // BOOST_ITERATOR_ARCHETYPES_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_categories.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_categories.hpp new file mode 100644 index 0000000000..1740d9818a --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_categories.hpp @@ -0,0 +1,188 @@ +// (C) Copyright Jeremy Siek 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_CATEGORIES_HPP +# define BOOST_ITERATOR_CATEGORIES_HPP + +# include +# include +# include + +# include + +# include +# include +# include +# include + +# include + +# include + +namespace boost { + +// +// Traversal Categories +// + +struct no_traversal_tag {}; + +struct incrementable_traversal_tag + : no_traversal_tag +{ +// incrementable_traversal_tag() {} +// incrementable_traversal_tag(std::output_iterator_tag const&) {}; +}; + +struct single_pass_traversal_tag + : incrementable_traversal_tag +{ +// single_pass_traversal_tag() {} +// single_pass_traversal_tag(std::input_iterator_tag const&) {}; +}; + +struct forward_traversal_tag + : single_pass_traversal_tag +{ +// forward_traversal_tag() {} +// forward_traversal_tag(std::forward_iterator_tag const&) {}; +}; + +struct bidirectional_traversal_tag + : forward_traversal_tag +{ +// bidirectional_traversal_tag() {}; +// bidirectional_traversal_tag(std::bidirectional_iterator_tag const&) {}; +}; + +struct random_access_traversal_tag + : bidirectional_traversal_tag +{ +// random_access_traversal_tag() {}; +// random_access_traversal_tag(std::random_access_iterator_tag const&) {}; +}; + +namespace detail +{ + // + // Convert a "strictly old-style" iterator category to a traversal + // tag. This is broken out into a separate metafunction to reduce + // the cost of instantiating iterator_category_to_traversal, below, + // for new-style types. + // + template + struct old_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + {}; + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template <> + struct old_category_to_traversal + { + typedef int type; + }; +# endif + + template + struct pure_traversal_tag + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + { + }; + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template <> + struct pure_traversal_tag + { + typedef int type; + }; +# endif + +} // namespace detail + + +// +// Convert an iterator category into a traversal tag +// +template +struct iterator_category_to_traversal + : mpl::eval_if< // if already convertible to a traversal tag, we're done. + is_convertible + , mpl::identity + , boost::detail::old_category_to_traversal + > +{}; + +// Trait to get an iterator's traversal category +template +struct iterator_traversal + : iterator_category_to_traversal< + typename boost::detail::iterator_traits::iterator_category + > +{}; + +# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT +// Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work +// out well. Instantiating the nested apply template also +// requires instantiating iterator_traits on the +// placeholder. Instead we just specialize it as a metafunction +// class. +template <> +struct iterator_traversal +{ + template + struct apply : iterator_traversal + {}; +}; +template <> +struct iterator_traversal + : iterator_traversal +{}; +# endif + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_CATEGORIES_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_concepts.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_concepts.hpp new file mode 100644 index 0000000000..ced1112a61 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_concepts.hpp @@ -0,0 +1,284 @@ +// (C) Copyright Jeremy Siek 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_CONCEPTS_HPP +#define BOOST_ITERATOR_CONCEPTS_HPP + +#include +#include + +// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems. +#include + +#include +#include + +#include +#include +#include +#include + +#include + +// Use boost/limits to work around missing limits headers on some compilers +#include +#include + +#include + +#include + +namespace boost_concepts +{ + // Used a different namespace here (instead of "boost") so that the + // concept descriptions do not take for granted the names in + // namespace boost. + + //=========================================================================== + // Iterator Access Concepts + + BOOST_concept(ReadableIterator,(Iterator)) + : boost::Assignable + , boost::CopyConstructible + + { + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type value_type; + typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference reference; + + BOOST_CONCEPT_USAGE(ReadableIterator) + { + + value_type v = *i; + boost::ignore_unused_variable_warning(v); + } + private: + Iterator i; + }; + + template < + typename Iterator + , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + > + struct WritableIterator + : boost::CopyConstructible + { + BOOST_CONCEPT_USAGE(WritableIterator) + { + *i = v; + } + private: + ValueType v; + Iterator i; + }; + + template < + typename Iterator + , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type + > + struct WritableIteratorConcept : WritableIterator {}; + + BOOST_concept(SwappableIterator,(Iterator)) + { + BOOST_CONCEPT_USAGE(SwappableIterator) + { + std::iter_swap(i1, i2); + } + private: + Iterator i1; + Iterator i2; + }; + + BOOST_concept(LvalueIterator,(Iterator)) + { + typedef typename boost::detail::iterator_traits::value_type value_type; + + BOOST_CONCEPT_USAGE(LvalueIterator) + { + value_type& r = const_cast(*i); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; + }; + + + //=========================================================================== + // Iterator Traversal Concepts + + BOOST_concept(IncrementableIterator,(Iterator)) + : boost::Assignable + , boost::CopyConstructible + { + typedef typename boost::iterator_traversal::type traversal_category; + + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + traversal_category + , boost::incrementable_traversal_tag + >)); + + BOOST_CONCEPT_USAGE(IncrementableIterator) + { + ++i; + (void)i++; + } + private: + Iterator i; + }; + + BOOST_concept(SinglePassIterator,(Iterator)) + : IncrementableIterator + , boost::EqualityComparable + + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME SinglePassIterator::traversal_category + , boost::single_pass_traversal_tag + > )); + }; + + BOOST_concept(ForwardTraversal,(Iterator)) + : SinglePassIterator + , boost::DefaultConstructible + { + typedef typename boost::detail::iterator_traits::difference_type difference_type; + + BOOST_MPL_ASSERT((boost::is_integral)); + BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); + + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME ForwardTraversal::traversal_category + , boost::forward_traversal_tag + > )); + }; + + BOOST_concept(BidirectionalTraversal,(Iterator)) + : ForwardTraversal + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalTraversal::traversal_category + , boost::bidirectional_traversal_tag + > )); + + BOOST_CONCEPT_USAGE(BidirectionalTraversal) + { + --i; + (void)i--; + } + private: + Iterator i; + }; + + BOOST_concept(RandomAccessTraversal,(Iterator)) + : BidirectionalTraversal + { + BOOST_CONCEPT_ASSERT(( + boost::Convertible< + BOOST_DEDUCED_TYPENAME RandomAccessTraversal::traversal_category + , boost::random_access_traversal_tag + > )); + + BOOST_CONCEPT_USAGE(RandomAccessTraversal) + { + i += n; + i = i + n; + i = n + i; + i -= n; + i = i - n; + n = i - j; + } + + private: + typename BidirectionalTraversal::difference_type n; + Iterator i, j; + }; + + //=========================================================================== + // Iterator Interoperability + + namespace detail + { + template + void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2) + { + bool b; + b = i1 == i2; + b = i1 != i2; + + b = i2 == i1; + b = i2 != i1; + boost::ignore_unused_variable_warning(b); + } + + template + void interop_rand_access_constraints( + Iterator1 const& i1, Iterator2 const& i2, + boost::random_access_traversal_tag, boost::random_access_traversal_tag) + { + bool b; + typename boost::detail::iterator_traits::difference_type n; + b = i1 < i2; + b = i1 <= i2; + b = i1 > i2; + b = i1 >= i2; + n = i1 - i2; + + b = i2 < i1; + b = i2 <= i1; + b = i2 > i1; + b = i2 >= i1; + n = i2 - i1; + boost::ignore_unused_variable_warning(b); + boost::ignore_unused_variable_warning(n); + } + + template + void interop_rand_access_constraints( + Iterator1 const&, Iterator2 const&, + boost::single_pass_traversal_tag, boost::single_pass_traversal_tag) + { } + + } // namespace detail + + BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator)) + { + private: + typedef typename boost::detail::pure_traversal_tag< + typename boost::iterator_traversal< + Iterator + >::type + >::type traversal_category; + + typedef typename boost::detail::pure_traversal_tag< + typename boost::iterator_traversal< + ConstIterator + >::type + >::type const_traversal_category; + + public: + BOOST_CONCEPT_ASSERT((SinglePassIterator)); + BOOST_CONCEPT_ASSERT((SinglePassIterator)); + + BOOST_CONCEPT_USAGE(InteroperableIterator) + { + detail::interop_single_pass_constraints(i, ci); + detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category()); + + ci = i; + } + + private: + Iterator i; + ConstIterator ci; + }; + +} // namespace boost_concepts + +#include + +#endif // BOOST_ITERATOR_CONCEPTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_facade.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_facade.hpp new file mode 100644 index 0000000000..967d60f2ba --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_facade.hpp @@ -0,0 +1,878 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP +#define BOOST_ITERATOR_FACADE_23022003THW_HPP + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include // this goes last + +namespace boost +{ + // This forward declaration is required for the friend declaration + // in iterator_core_access + template class iterator_facade; + + namespace detail + { + // A binary metafunction class that always returns bool. VC6 + // ICEs on mpl::always, probably because of the default + // parameters. + struct always_bool2 + { + template + struct apply + { + typedef bool type; + }; + }; + + // + // enable if for use in operator implementation. + // + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + { + typedef typename mpl::if_< + mpl::or_< + is_convertible + , is_convertible + > + , Return + , int[3] + >::type type; + }; +#else + : ::boost::iterators::enable_if< + mpl::or_< + is_convertible + , is_convertible + > + , Return + > + {}; +#endif + + // + // Generates associated types for an iterator_facade with the + // given parameters. + // + template < + class ValueParam + , class CategoryOrTraversal + , class Reference + , class Difference + > + struct iterator_facade_types + { + typedef typename facade_iterator_category< + CategoryOrTraversal, ValueParam, Reference + >::type iterator_category; + + typedef typename remove_const::type value_type; + + typedef typename mpl::eval_if< + boost::detail::iterator_writability_disabled + , add_pointer + , add_pointer + >::type pointer; + +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \ + || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \ + || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101)) \ + || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310) + + // To interoperate with some broken library/compiler + // combinations, user-defined iterators must be derived from + // std::iterator. It is possible to implement a standard + // library for broken compilers without this limitation. +# define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1 + + typedef + iterator + base; +# endif + }; + + // iterators whose dereference operators reference the same value + // for all iterators into the same sequence (like many input + // iterators) need help with their postfix ++: the referenced + // value must be read and stored away before the increment occurs + // so that *a++ yields the originally referenced element and not + // the next one. + template + class postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + {} + + // Returning a mutable reference allows nonsense like + // (*r++).mutate(), but it imposes fewer assumptions about the + // behavior of the value_type. In particular, recall taht + // (*r).mutate() is legal if operator* returns by value. + value_type& + operator*() const + { + return this->stored_value; + } + private: + mutable value_type stored_value; + }; + + // + // In general, we can't determine that such an iterator isn't + // writable -- we also need to store a copy of the old iterator so + // that it can be written into. + template + class writable_postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit writable_postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + , stored_iterator(x) + {} + + // Dereferencing must return a proxy so that both *r++ = o and + // value_type(*r++) can work. In this case, *r is the same as + // *r++, and the conversion operator below is used to ensure + // readability. + writable_postfix_increment_proxy const& + operator*() const + { + return *this; + } + + // Provides readability of *r++ + operator value_type&() const + { + return stored_value; + } + + // Provides writability of *r++ + template + T const& operator=(T const& x) const + { + *this->stored_iterator = x; + return x; + } + + // This overload just in case only non-const objects are writable + template + T& operator=(T& x) const + { + *this->stored_iterator = x; + return x; + } + + // Provides X(r++) + operator Iterator const&() const + { + return stored_iterator; + } + + private: + mutable value_type stored_value; + Iterator stored_iterator; + }; + +# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + template + struct is_non_proxy_reference_impl + { + static Reference r; + + template + static typename mpl::if_< + is_convertible< + R const volatile* + , Value const volatile* + > + , char[1] + , char[2] + >::type& helper(R const&); + + BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1); + }; + + template + struct is_non_proxy_reference + : mpl::bool_< + is_non_proxy_reference_impl::value + > + {}; +# else + template + struct is_non_proxy_reference + : is_convertible< + typename remove_reference::type + const volatile* + , Value const volatile* + > + {}; +# endif + + // A metafunction to choose the result type of postfix ++ + // + // Because the C++98 input iterator requirements say that *r++ has + // type T (value_type), implementations of some standard + // algorithms like lexicographical_compare may use constructions + // like: + // + // *r++ < *s++ + // + // If *r++ returns a proxy (as required if r is writable but not + // multipass), this sort of expression will fail unless the proxy + // supports the operator<. Since there are any number of such + // operations, we're not going to try to support them. Therefore, + // even if r++ returns a proxy, *r++ will only return a proxy if + // *r also returns a proxy. + template + struct postfix_increment_result + : mpl::eval_if< + mpl::and_< + // A proxy is only needed for readable iterators + is_convertible + + // No multipass iterator can have values that disappear + // before positions can be re-visited + , mpl::not_< + is_convertible< + typename iterator_category_to_traversal::type + , forward_traversal_tag + > + > + > + , mpl::if_< + is_non_proxy_reference + , postfix_increment_proxy + , writable_postfix_increment_proxy + > + , mpl::identity + > + {}; + + // operator->() needs special support for input iterators to strictly meet the + // standard's requirements. If *i is not a reference type, we must still + // produce a lvalue to which a pointer can be formed. We do that by + // returning an instantiation of this special proxy class template. + template + struct operator_arrow_proxy + { + operator_arrow_proxy(T const* px) : m_value(*px) {} + T* operator->() const { return &m_value; } + // This function is needed for MWCW and BCC, which won't call operator-> + // again automatically per 13.3.1.2 para 8 + operator T*() const { return &m_value; } + mutable T m_value; + }; + + // A metafunction that gets the result type for operator->. Also + // has a static function make() which builds the result from a + // Reference + template + struct operator_arrow_result + { + // CWPro8.3 won't accept "operator_arrow_result::type", and we + // need that type below, so metafunction forwarding would be a + // losing proposition here. + typedef typename mpl::if_< + is_reference + , Pointer + , operator_arrow_proxy + >::type type; + + static type make(Reference x) + { + return implicit_cast(&x); + } + }; + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + // Deal with ETI + template<> + struct operator_arrow_result + { + typedef int type; + }; +# endif + + // A proxy return type for operator[], needed to deal with + // iterators that may invalidate referents upon destruction. + // Consider the temporary iterator in *(a + n) + template + class operator_brackets_proxy + { + // Iterator is actually an iterator_facade, so we do not have to + // go through iterator_traits to access the traits. + typedef typename Iterator::reference reference; + typedef typename Iterator::value_type value_type; + + public: + operator_brackets_proxy(Iterator const& iter) + : m_iter(iter) + {} + + operator reference() const + { + return *m_iter; + } + + operator_brackets_proxy& operator=(value_type const& val) + { + *m_iter = val; + return *this; + } + + private: + Iterator m_iter; + }; + + // A metafunction that determines whether operator[] must return a + // proxy, or whether it can simply return a copy of the value_type. + template + struct use_operator_brackets_proxy + : mpl::not_< + mpl::and_< + // Really we want an is_copy_constructible trait here, + // but is_POD will have to suffice in the meantime. + boost::is_POD + , iterator_writability_disabled + > + > + {}; + + template + struct operator_brackets_result + { + typedef typename mpl::if_< + use_operator_brackets_proxy + , operator_brackets_proxy + , Value + >::type type; + }; + + template + operator_brackets_proxy make_operator_brackets_result(Iterator const& iter, mpl::true_) + { + return operator_brackets_proxy(iter); + } + + template + typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) + { + return *iter; + } + + struct choose_difference_type + { + template + struct apply + : +# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP + iterator_difference +# elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) + mpl::if_< + is_convertible + , typename I1::difference_type + , typename I2::difference_type + > +# else + mpl::eval_if< + is_convertible + , iterator_difference + , iterator_difference + > +# endif + {}; + + }; + } // namespace detail + + + // Macros which describe the declarations of binary operators +# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ + template < \ + class Derived1, class V1, class TC1, class Reference1, class Difference1 \ + , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ + > \ + prefix typename mpl::apply2::type \ + operator op( \ + iterator_facade const& lhs \ + , iterator_facade const& rhs) +# else +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ + template < \ + class Derived1, class V1, class TC1, class Reference1, class Difference1 \ + , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ + > \ + prefix typename boost::detail::enable_if_interoperable< \ + Derived1, Derived2 \ + , typename mpl::apply2::type \ + >::type \ + operator op( \ + iterator_facade const& lhs \ + , iterator_facade const& rhs) +# endif + +# define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \ + template \ + prefix Derived operator+ args + + // + // Helper class for granting access to the iterator core interface. + // + // The simple core interface is used by iterator_facade. The core + // interface of a user/library defined iterator type should not be made public + // so that it does not clutter the public interface. Instead iterator_core_access + // should be made friend so that iterator_facade can access the core + // interface through iterator_core_access. + // + class iterator_core_access + { +# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + // Tasteless as this may seem, making all members public allows member templates + // to work in the absence of member template friends. + public: +# else + + template friend class iterator_facade; + +# define BOOST_ITERATOR_FACADE_RELATION(op) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::detail::always_bool2); + + BOOST_ITERATOR_FACADE_RELATION(==) + BOOST_ITERATOR_FACADE_RELATION(!=) + + BOOST_ITERATOR_FACADE_RELATION(<) + BOOST_ITERATOR_FACADE_RELATION(>) + BOOST_ITERATOR_FACADE_RELATION(<=) + BOOST_ITERATOR_FACADE_RELATION(>=) +# undef BOOST_ITERATOR_FACADE_RELATION + + BOOST_ITERATOR_FACADE_INTEROP_HEAD( + friend, -, boost::detail::choose_difference_type) + ; + + BOOST_ITERATOR_FACADE_PLUS_HEAD( + friend inline + , (iterator_facade const& + , typename Derived::difference_type) + ) + ; + + BOOST_ITERATOR_FACADE_PLUS_HEAD( + friend inline + , (typename Derived::difference_type + , iterator_facade const&) + ) + ; + +# endif + + template + static typename Facade::reference dereference(Facade const& f) + { + return f.dereference(); + } + + template + static void increment(Facade& f) + { + f.increment(); + } + + template + static void decrement(Facade& f) + { + f.decrement(); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return f1.equal(f2); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.equal(f1); + } + + template + static void advance(Facade& f, typename Facade::difference_type n) + { + f.advance(n); + } + + template + static typename Facade1::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return -f1.distance_to(f2); + } + + template + static typename Facade2::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.distance_to(f1); + } + + // + // Curiously Recurring Template interface. + // + template + static I& derived(iterator_facade& facade) + { + return *static_cast(&facade); + } + + template + static I const& derived(iterator_facade const& facade) + { + return *static_cast(&facade); + } + + private: + // objects of this class are useless + iterator_core_access(); //undefined + }; + + // + // iterator_facade - use as a public base class for defining new + // standard-conforming iterators. + // + template < + class Derived // The derived iterator type being constructed + , class Value + , class CategoryOrTraversal + , class Reference = Value& + , class Difference = std::ptrdiff_t + > + class iterator_facade +# ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE + : public boost::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + >::base +# undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE +# endif + { + private: + // + // Curiously Recurring Template interface. + // + Derived& derived() + { + return *static_cast(this); + } + + Derived const& derived() const + { + return *static_cast(this); + } + + typedef boost::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + > associated_types; + + protected: + // For use by derived classes + typedef iterator_facade iterator_facade_; + + public: + + typedef typename associated_types::value_type value_type; + typedef Reference reference; + typedef Difference difference_type; + typedef typename associated_types::pointer pointer; + typedef typename associated_types::iterator_category iterator_category; + + reference operator*() const + { + return iterator_core_access::dereference(this->derived()); + } + + typename boost::detail::operator_arrow_result< + value_type + , reference + , pointer + >::type + operator->() const + { + return boost::detail::operator_arrow_result< + value_type + , reference + , pointer + >::make(*this->derived()); + } + + typename boost::detail::operator_brackets_result::type + operator[](difference_type n) const + { + typedef boost::detail::use_operator_brackets_proxy use_proxy; + + return boost::detail::make_operator_brackets_result( + this->derived() + n + , use_proxy() + ); + } + + Derived& operator++() + { + iterator_core_access::increment(this->derived()); + return this->derived(); + } + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + typename boost::detail::postfix_increment_result::type + operator++(int) + { + typename boost::detail::postfix_increment_result::type + tmp(this->derived()); + ++*this; + return tmp; + } +# endif + + Derived& operator--() + { + iterator_core_access::decrement(this->derived()); + return this->derived(); + } + + Derived operator--(int) + { + Derived tmp(this->derived()); + --*this; + return tmp; + } + + Derived& operator+=(difference_type n) + { + iterator_core_access::advance(this->derived(), n); + return this->derived(); + } + + Derived& operator-=(difference_type n) + { + iterator_core_access::advance(this->derived(), -n); + return this->derived(); + } + + Derived operator-(difference_type x) const + { + Derived result(this->derived()); + return result -= x; + } + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + // There appears to be a bug which trashes the data of classes + // derived from iterator_facade when they are assigned unless we + // define this assignment operator. This bug is only revealed + // (so far) in STLPort debug mode, but it's clearly a codegen + // problem so we apply the workaround for all MSVC6. + iterator_facade& operator=(iterator_facade const&) + { + return *this; + } +# endif + }; + +# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template + inline typename boost::detail::postfix_increment_result::type + operator++( + iterator_facade& i + , int + ) + { + typename boost::detail::postfix_increment_result::type + tmp(*static_cast(&i)); + + ++i; + + return tmp; + } +# endif + + + // + // Comparison operator implementation. The library supplied operators + // enables the user to provide fully interoperable constant/mutable + // iterator types. I.e. the library provides all operators + // for all mutable/constant iterator combinations. + // + // Note though that this kind of interoperability for constant/mutable + // iterators is not required by the standard for container iterators. + // All the standard asks for is a conversion mutable -> constant. + // Most standard library implementations nowadays provide fully interoperable + // iterator implementations, but there are still heavily used implementations + // that do not provide them. (Actually it's even worse, they do not provide + // them for only a few iterators.) + // + // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should + // enable the user to turn off mixed type operators + // + // The library takes care to provide only the right operator overloads. + // I.e. + // + // bool operator==(Iterator, Iterator); + // bool operator==(ConstIterator, Iterator); + // bool operator==(Iterator, ConstIterator); + // bool operator==(ConstIterator, ConstIterator); + // + // ... + // + // In order to do so it uses c++ idioms that are not yet widely supported + // by current compiler releases. The library is designed to degrade gracefully + // in the face of compiler deficiencies. In general compiler + // deficiencies result in less strict error checking and more obscure + // error messages, functionality is not affected. + // + // For full operation compiler support for "Substitution Failure Is Not An Error" + // (aka. enable_if) and boost::is_convertible is required. + // + // The following problems occur if support is lacking. + // + // Pseudo code + // + // --------------- + // AdaptorA a1; + // AdaptorA a2; + // + // // This will result in a no such overload error in full operation + // // If enable_if or is_convertible is not supported + // // The instantiation will fail with an error hopefully indicating that + // // there is no operator== for Iterator1, Iterator2 + // // The same will happen if no enable_if is used to remove + // // false overloads from the templated conversion constructor + // // of AdaptorA. + // + // a1 == a2; + // ---------------- + // + // AdaptorA a; + // AdaptorB b; + // + // // This will result in a no such overload error in full operation + // // If enable_if is not supported the static assert used + // // in the operator implementation will fail. + // // This will accidently work if is_convertible is not supported. + // + // a == b; + // ---------------- + // + +# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP +# define BOOST_ITERATOR_CONVERTIBLE(a,b) mpl::true_() +# else +# define BOOST_ITERATOR_CONVERTIBLE(a,b) is_convertible() +# endif + +# define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \ + { \ + /* For those compilers that do not support enable_if */ \ + BOOST_STATIC_ASSERT(( \ + is_interoperable< Derived1, Derived2 >::value \ + )); \ + return_prefix iterator_core_access::base_op( \ + *static_cast(&lhs) \ + , *static_cast(&rhs) \ + , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \ + ); \ + } + +# define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP( \ + op \ + , boost::detail::always_bool2 \ + , return_prefix \ + , base_op \ + ) + + BOOST_ITERATOR_FACADE_RELATION(==, return, equal) + BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal) + + BOOST_ITERATOR_FACADE_RELATION(<, return 0 >, distance_from) + BOOST_ITERATOR_FACADE_RELATION(>, return 0 <, distance_from) + BOOST_ITERATOR_FACADE_RELATION(<=, return 0 >=, distance_from) + BOOST_ITERATOR_FACADE_RELATION(>=, return 0 <=, distance_from) +# undef BOOST_ITERATOR_FACADE_RELATION + + // operator- requires an additional part in the static assertion + BOOST_ITERATOR_FACADE_INTEROP( + - + , boost::detail::choose_difference_type + , return + , distance_from + ) +# undef BOOST_ITERATOR_FACADE_INTEROP +# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD + +# define BOOST_ITERATOR_FACADE_PLUS(args) \ + BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \ + { \ + Derived tmp(static_cast(i)); \ + return tmp += n; \ + } + +BOOST_ITERATOR_FACADE_PLUS(( + iterator_facade const& i + , typename Derived::difference_type n +)) + +BOOST_ITERATOR_FACADE_PLUS(( + typename Derived::difference_type n + , iterator_facade const& i +)) +# undef BOOST_ITERATOR_FACADE_PLUS +# undef BOOST_ITERATOR_FACADE_PLUS_HEAD + +} // namespace boost + +#include + +#endif // BOOST_ITERATOR_FACADE_23022003THW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_traits.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_traits.hpp new file mode 100644 index 0000000000..960970e8db --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/iterator_traits.hpp @@ -0,0 +1,92 @@ +// Copyright David Abrahams 2003. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef ITERATOR_TRAITS_DWA200347_HPP +# define ITERATOR_TRAITS_DWA200347_HPP + +# include +# include + +namespace boost { + +// Unfortunately, g++ 2.95.x chokes when we define a class template +// iterator_category which has the same name as its +// std::iterator_category() function, probably due in part to the +// "std:: is visible globally" hack it uses. Use +// BOOST_ITERATOR_CATEGORY to write code that's portable to older +// GCCs. + +# if BOOST_WORKAROUND(__GNUC__, <= 2) +# define BOOST_ITERATOR_CATEGORY iterator_category_ +# else +# define BOOST_ITERATOR_CATEGORY iterator_category +# endif + + +template +struct iterator_value +{ + typedef typename boost::detail::iterator_traits::value_type type; +}; + +template +struct iterator_reference +{ + typedef typename boost::detail::iterator_traits::reference type; +}; + + +template +struct iterator_pointer +{ + typedef typename boost::detail::iterator_traits::pointer type; +}; + +template +struct iterator_difference +{ + typedef typename boost::detail::iterator_traits::difference_type type; +}; + +template +struct BOOST_ITERATOR_CATEGORY +{ + typedef typename boost::detail::iterator_traits::iterator_category type; +}; + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +template <> +struct iterator_value +{ + typedef void type; +}; + +template <> +struct iterator_reference +{ + typedef void type; +}; + +template <> +struct iterator_pointer +{ + typedef void type; +}; + +template <> +struct iterator_difference +{ + typedef void type; +}; + +template <> +struct BOOST_ITERATOR_CATEGORY +{ + typedef void type; +}; +# endif + +} // namespace boost::iterator + +#endif // ITERATOR_TRAITS_DWA200347_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/new_iterator_tests.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/new_iterator_tests.hpp new file mode 100644 index 0000000000..caad700aef --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/new_iterator_tests.hpp @@ -0,0 +1,264 @@ +#ifndef BOOST_NEW_ITERATOR_TESTS_HPP +# define BOOST_NEW_ITERATOR_TESTS_HPP + +// +// Copyright (c) David Abrahams 2001. +// Copyright (c) Jeremy Siek 2001-2003. +// Copyright (c) Thomas Witt 2002. +// +// Use, modification and distribution is subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// This is meant to be the beginnings of a comprehensive, generic +// test suite for STL concepts such as iterators and containers. +// +// Revision History: +// 28 Oct 2002 Started update for new iterator categories +// (Jeremy Siek) +// 28 Apr 2002 Fixed input iterator requirements. +// For a == b a++ == b++ is no longer required. +// See 24.1.1/3 for details. +// (Thomas Witt) +// 08 Feb 2001 Fixed bidirectional iterator test so that +// --i is no longer a precondition. +// (Jeremy Siek) +// 04 Feb 2001 Added lvalue test, corrected preconditions +// (David Abrahams) + +# include +# include +# include +# include // for detail::dummy_constructor +# include +# include +# include +# include + +# include +# include +# include + +namespace boost { + + +// Do separate tests for *i++ so we can treat, e.g., smart pointers, +// as readable and/or writable iterators. +template +void readable_iterator_traversal_test(Iterator i1, T v, mpl::true_) +{ + T v2(*i1++); + BOOST_TEST(v == v2); +} + +template +void readable_iterator_traversal_test(const Iterator i1, T v, mpl::false_) +{} + +template +void writable_iterator_traversal_test(Iterator i1, T v, mpl::true_) +{ + ++i1; // we just wrote into that position + *i1++ = v; + Iterator x(i1++); + (void)x; +} + +template +void writable_iterator_traversal_test(const Iterator i1, T v, mpl::false_) +{} + + +// Preconditions: *i == v +template +void readable_iterator_test(const Iterator i1, T v) +{ + Iterator i2(i1); // Copy Constructible + typedef typename detail::iterator_traits::reference ref_t; + ref_t r1 = *i1; + ref_t r2 = *i2; + T v1 = r1; + T v2 = r2; + BOOST_TEST(v1 == v); + BOOST_TEST(v2 == v); + +# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) + readable_iterator_traversal_test(i1, v, detail::is_postfix_incrementable()); + + // I think we don't really need this as it checks the same things as + // the above code. + BOOST_STATIC_ASSERT(is_readable_iterator::value); +# endif +} + +template +void writable_iterator_test(Iterator i, T v, T v2) +{ + Iterator i2(i); // Copy Constructible + *i2 = v; + +# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) + writable_iterator_traversal_test( + i, v2, mpl::and_< + detail::is_incrementable + , detail::is_postfix_incrementable + >()); +# endif +} + +template +void swappable_iterator_test(Iterator i, Iterator j) +{ + Iterator i2(i), j2(j); + typename detail::iterator_traits::value_type bi = *i, bj = *j; + iter_swap(i2, j2); + typename detail::iterator_traits::value_type ai = *i, aj = *j; + BOOST_TEST(bi == aj && bj == ai); +} + +template +void constant_lvalue_iterator_test(Iterator i, T v1) +{ + Iterator i2(i); + typedef typename detail::iterator_traits::value_type value_type; + typedef typename detail::iterator_traits::reference reference; + BOOST_STATIC_ASSERT((is_same::value)); + const T& v2 = *i2; + BOOST_TEST(v1 == v2); +# ifndef BOOST_NO_LVALUE_RETURN_DETECTION + BOOST_STATIC_ASSERT(is_lvalue_iterator::value); + BOOST_STATIC_ASSERT(!is_non_const_lvalue_iterator::value); +# endif +} + +template +void non_const_lvalue_iterator_test(Iterator i, T v1, T v2) +{ + Iterator i2(i); + typedef typename detail::iterator_traits::value_type value_type; + typedef typename detail::iterator_traits::reference reference; + BOOST_STATIC_ASSERT((is_same::value)); + T& v3 = *i2; + BOOST_TEST(v1 == v3); + + // A non-const lvalue iterator is not neccessarily writable, but we + // are assuming the value_type is assignable here + *i = v2; + + T& v4 = *i2; + BOOST_TEST(v2 == v4); +# ifndef BOOST_NO_LVALUE_RETURN_DETECTION + BOOST_STATIC_ASSERT(is_lvalue_iterator::value); + BOOST_STATIC_ASSERT(is_non_const_lvalue_iterator::value); +# endif +} + +template +void forward_readable_iterator_test(Iterator i, Iterator j, T val1, T val2) +{ + Iterator i2; + Iterator i3(i); + i2 = i; + BOOST_TEST(i2 == i3); + BOOST_TEST(i != j); + BOOST_TEST(i2 != j); + readable_iterator_test(i, val1); + readable_iterator_test(i2, val1); + readable_iterator_test(i3, val1); + + BOOST_TEST(i == i2++); + BOOST_TEST(i != ++i3); + + readable_iterator_test(i2, val2); + readable_iterator_test(i3, val2); + + readable_iterator_test(i, val1); +} + +template +void forward_swappable_iterator_test(Iterator i, Iterator j, T val1, T val2) +{ + forward_readable_iterator_test(i, j, val1, val2); + Iterator i2 = i; + ++i2; + swappable_iterator_test(i, i2); +} + +// bidirectional +// Preconditions: *i == v1, *++i == v2 +template +void bidirectional_readable_iterator_test(Iterator i, T v1, T v2) +{ + Iterator j(i); + ++j; + forward_readable_iterator_test(i, j, v1, v2); + ++i; + + Iterator i1 = i, i2 = i; + + BOOST_TEST(i == i1--); + BOOST_TEST(i != --i2); + + readable_iterator_test(i, v2); + readable_iterator_test(i1, v1); + readable_iterator_test(i2, v1); + + --i; + BOOST_TEST(i == i1); + BOOST_TEST(i == i2); + ++i1; + ++i2; + + readable_iterator_test(i, v1); + readable_iterator_test(i1, v2); + readable_iterator_test(i2, v2); +} + +// random access +// Preconditions: [i,i+N) is a valid range +template +void random_access_readable_iterator_test(Iterator i, int N, TrueVals vals) +{ + bidirectional_readable_iterator_test(i, vals[0], vals[1]); + const Iterator j = i; + int c; + + for (c = 0; c < N-1; ++c) + { + BOOST_TEST(i == j + c); + BOOST_TEST(*i == vals[c]); + typename detail::iterator_traits::value_type x = j[c]; + BOOST_TEST(*i == x); + BOOST_TEST(*i == *(j + c)); + BOOST_TEST(*i == *(c + j)); + ++i; + BOOST_TEST(i > j); + BOOST_TEST(i >= j); + BOOST_TEST(j <= i); + BOOST_TEST(j < i); + } + + Iterator k = j + N - 1; + for (c = 0; c < N-1; ++c) + { + BOOST_TEST(i == k - c); + BOOST_TEST(*i == vals[N - 1 - c]); + typename detail::iterator_traits::value_type x = j[N - 1 - c]; + BOOST_TEST(*i == x); + Iterator q = k - c; + BOOST_TEST(*i == *q); + BOOST_TEST(i > j); + BOOST_TEST(i >= j); + BOOST_TEST(j <= i); + BOOST_TEST(j < i); + --i; + } +} + +} // namespace boost + +# include + +#endif // BOOST_NEW_ITERATOR_TESTS_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/permutation_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/permutation_iterator.hpp new file mode 100644 index 0000000000..23d11986da --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/permutation_iterator.hpp @@ -0,0 +1,72 @@ +// (C) Copyright Toon Knapen 2001. +// (C) Copyright David Abrahams 2003. +// (C) Copyright Roland Richter 2003. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_PERMUTATION_ITERATOR_HPP +#define BOOST_PERMUTATION_ITERATOR_HPP + +#include + +#include + + +namespace boost +{ + +template< class ElementIterator + , class IndexIterator> +class permutation_iterator + : public iterator_adaptor< + permutation_iterator + , IndexIterator, typename detail::iterator_traits::value_type + , use_default, typename detail::iterator_traits::reference> +{ + typedef iterator_adaptor< + permutation_iterator + , IndexIterator, typename detail::iterator_traits::value_type + , use_default, typename detail::iterator_traits::reference> super_t; + + friend class iterator_core_access; + +public: + permutation_iterator() : m_elt_iter() {} + + explicit permutation_iterator(ElementIterator x, IndexIterator y) + : super_t(y), m_elt_iter(x) {} + + template + permutation_iterator( + permutation_iterator const& r + , typename enable_if_convertible::type* = 0 + , typename enable_if_convertible::type* = 0 + ) + : super_t(r.base()), m_elt_iter(r.m_elt_iter) + {} + +private: + typename super_t::reference dereference() const + { return *(m_elt_iter + *this->base()); } + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + template friend class permutation_iterator; +#else + public: +#endif + ElementIterator m_elt_iter; +}; + + +template +permutation_iterator +make_permutation_iterator( ElementIterator e, IndexIterator i ) +{ + return permutation_iterator( e, i ); +} + + +} // namespace boost + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/reverse_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/reverse_iterator.hpp new file mode 100644 index 0000000000..97b6b4861d --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/reverse_iterator.hpp @@ -0,0 +1,69 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP +#define BOOST_REVERSE_ITERATOR_23022003THW_HPP + +#include +#include +#include + +namespace boost +{ + + // + // + // + template + class reverse_iterator + : public iterator_adaptor< reverse_iterator, Iterator > + { + typedef iterator_adaptor< reverse_iterator, Iterator > super_t; + + friend class iterator_core_access; + + public: + reverse_iterator() {} + + explicit reverse_iterator(Iterator x) + : super_t(x) {} + + template + reverse_iterator( + reverse_iterator const& r + , typename enable_if_convertible::type* = 0 + ) + : super_t(r.base()) + {} + + private: + typename super_t::reference dereference() const { return *boost::prior(this->base()); } + + void increment() { --this->base_reference(); } + void decrement() { ++this->base_reference(); } + + void advance(typename super_t::difference_type n) + { + this->base_reference() += -n; + } + + template + typename super_t::difference_type + distance_to(reverse_iterator const& y) const + { + return this->base_reference() - y.base(); + } + }; + + template + reverse_iterator make_reverse_iterator(BidirectionalIterator x) + { + return reverse_iterator(x); + } + +} // namespace boost + +#endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/transform_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/transform_iterator.hpp new file mode 100644 index 0000000000..c365fe0175 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/transform_iterator.hpp @@ -0,0 +1,187 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP +#define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) +# include + +#endif +#include + + +namespace boost +{ + template + class transform_iterator; + + namespace detail + { + + template + struct function_object_result + { + typedef typename UnaryFunc::result_type type; + }; + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + template + struct function_object_result + { + typedef Return type; + }; +#endif + + // Compute the iterator_adaptor instantiation to be used for transform_iterator + template + struct transform_iterator_base + { + private: + // By default, dereferencing the iterator yields the same as + // the function. Do we need to adjust the way + // function_object_result is computed for the standard + // proposal (e.g. using Doug's result_of)? + typedef typename ia_dflt_help< + Reference + , function_object_result + >::type reference; + + // To get the default for Value: remove any reference on the + // result type, but retain any constness to signal + // non-writability. Note that if we adopt Thomas' suggestion + // to key non-writability *only* on the Reference argument, + // we'd need to strip constness here as well. + typedef typename ia_dflt_help< + Value + , remove_reference + >::type cv_value_type; + + public: + typedef iterator_adaptor< + transform_iterator + , Iterator + , cv_value_type + , use_default // Leave the traversal category alone + , reference + > type; + }; + } + + template + class transform_iterator + : public boost::detail::transform_iterator_base::type + { + typedef typename + boost::detail::transform_iterator_base::type + super_t; + + friend class iterator_core_access; + + public: + transform_iterator() { } + + transform_iterator(Iterator const& x, UnaryFunc f) + : super_t(x), m_f(f) { } + + explicit transform_iterator(Iterator const& x) + : super_t(x) + { + // Pro8 is a little too aggressive about instantiating the + // body of this function. +#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) + // don't provide this constructor if UnaryFunc is a + // function pointer type, since it will be 0. Too dangerous. + BOOST_STATIC_ASSERT(is_class::value); +#endif + } + + template< + class OtherUnaryFunction + , class OtherIterator + , class OtherReference + , class OtherValue> + transform_iterator( + transform_iterator const& t + , typename enable_if_convertible::type* = 0 +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) + , typename enable_if_convertible::type* = 0 +#endif + ) + : super_t(t.base()), m_f(t.functor()) + {} + + UnaryFunc functor() const + { return m_f; } + + private: + typename super_t::reference dereference() const + { return m_f(*this->base()); } + + // Probably should be the initial base class so it can be + // optimized away via EBO if it is an empty class. + UnaryFunc m_f; + }; + + template + transform_iterator + make_transform_iterator(Iterator it, UnaryFunc fun) + { + return transform_iterator(it, fun); + } + + // Version which allows explicit specification of the UnaryFunc + // type. + // + // This generator is not provided if UnaryFunc is a function + // pointer type, because it's too dangerous: the default-constructed + // function pointer in the iterator be 0, leading to a runtime + // crash. + template +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typename mpl::if_< +#else + typename iterators::enable_if< +#endif + is_class // We should probably find a cheaper test than is_class<> + , transform_iterator +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + , int[3] +#endif + >::type + make_transform_iterator(Iterator it) + { + return transform_iterator(it, UnaryFunc()); + } + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + template + transform_iterator< Return (*)(Argument), Iterator, Return> + make_transform_iterator(Iterator it, Return (*fun)(Argument)) + { + return transform_iterator(it, fun); + } +#endif + +} // namespace boost + +#include + +#endif // BOOST_TRANSFORM_ITERATOR_23022003THW_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator/zip_iterator.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator/zip_iterator.hpp new file mode 100644 index 0000000000..f3896ad955 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator/zip_iterator.hpp @@ -0,0 +1,585 @@ +// Copyright David Abrahams and Thomas Becker 2000-2006. Distributed +// under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_ +# define BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_ + +#include +#include +#include +#include +#include // for enable_if_convertible +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + + // Zip iterator forward declaration for zip_iterator_base + template + class zip_iterator; + + // One important design goal of the zip_iterator is to isolate all + // functionality whose implementation relies on the current tuple + // implementation. This goal has been achieved as follows: Inside + // the namespace detail there is a namespace tuple_impl_specific. + // This namespace encapsulates all functionality that is specific + // to the current Boost tuple implementation. More precisely, the + // namespace tuple_impl_specific provides the following tuple + // algorithms and meta-algorithms for the current Boost tuple + // implementation: + // + // tuple_meta_transform + // tuple_meta_accumulate + // tuple_transform + // tuple_for_each + // + // If the tuple implementation changes, all that needs to be + // replaced is the implementation of these four (meta-)algorithms. + + namespace detail + { + + // Functors to be used with tuple algorithms + // + template + class advance_iterator + { + public: + advance_iterator(DiffType step) : m_step(step) {} + + template + void operator()(Iterator& it) const + { it += m_step; } + + private: + DiffType m_step; + }; + // + struct increment_iterator + { + template + void operator()(Iterator& it) + { ++it; } + }; + // + struct decrement_iterator + { + template + void operator()(Iterator& it) + { --it; } + }; + // + struct dereference_iterator + { + template + struct apply + { + typedef typename + iterator_traits::reference + type; + }; + + template + typename apply::type operator()(Iterator const& it) + { return *it; } + }; + + + // The namespace tuple_impl_specific provides two meta- + // algorithms and two algorithms for tuples. + // + namespace tuple_impl_specific + { + // Meta-transform algorithm for tuples + // + template + struct tuple_meta_transform; + + template + struct tuple_meta_transform_impl + { + typedef tuples::cons< + typename mpl::apply1< + typename mpl::lambda::type + , typename Tuple::head_type + >::type + , typename tuple_meta_transform< + typename Tuple::tail_type + , UnaryMetaFun + >::type + > type; + }; + + template + struct tuple_meta_transform + : mpl::eval_if< + boost::is_same + , mpl::identity + , tuple_meta_transform_impl + > + { + }; + + // Meta-accumulate algorithm for tuples. Note: The template + // parameter StartType corresponds to the initial value in + // ordinary accumulation. + // + template + struct tuple_meta_accumulate; + + template< + typename Tuple + , class BinaryMetaFun + , typename StartType + > + struct tuple_meta_accumulate_impl + { + typedef typename mpl::apply2< + typename mpl::lambda::type + , typename Tuple::head_type + , typename tuple_meta_accumulate< + typename Tuple::tail_type + , BinaryMetaFun + , StartType + >::type + >::type type; + }; + + template< + typename Tuple + , class BinaryMetaFun + , typename StartType + > + struct tuple_meta_accumulate + : mpl::eval_if< +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + mpl::or_< +#endif + boost::is_same +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + , boost::is_same + > +#endif + , mpl::identity + , tuple_meta_accumulate_impl< + Tuple + , BinaryMetaFun + , StartType + > + > + { + }; + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ + || ( \ + BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, != 0) && defined(_MSC_VER) \ + ) +// Not sure why intel's partial ordering fails in this case, but I'm +// assuming int's an MSVC bug-compatibility feature. + +# define BOOST_TUPLE_ALGO_DISPATCH +# define BOOST_TUPLE_ALGO(algo) algo##_impl +# define BOOST_TUPLE_ALGO_TERMINATOR , int +# define BOOST_TUPLE_ALGO_RECURSE , ... +#else +# define BOOST_TUPLE_ALGO(algo) algo +# define BOOST_TUPLE_ALGO_TERMINATOR +# define BOOST_TUPLE_ALGO_RECURSE +#endif + + // transform algorithm for tuples. The template parameter Fun + // must be a unary functor which is also a unary metafunction + // class that computes its return type based on its argument + // type. For example: + // + // struct to_ptr + // { + // template + // struct apply + // { + // typedef Arg* type; + // } + // + // template + // Arg* operator()(Arg x); + // }; + template + tuples::null_type BOOST_TUPLE_ALGO(tuple_transform) + (tuples::null_type const&, Fun BOOST_TUPLE_ALGO_TERMINATOR) + { return tuples::null_type(); } + + template + typename tuple_meta_transform< + Tuple + , Fun + >::type + + BOOST_TUPLE_ALGO(tuple_transform)( + const Tuple& t, + Fun f + BOOST_TUPLE_ALGO_RECURSE + ) + { + typedef typename tuple_meta_transform< + BOOST_DEDUCED_TYPENAME Tuple::tail_type + , Fun + >::type transformed_tail_type; + + return tuples::cons< + BOOST_DEDUCED_TYPENAME mpl::apply1< + Fun, BOOST_DEDUCED_TYPENAME Tuple::head_type + >::type + , transformed_tail_type + >( + f(boost::tuples::get<0>(t)), tuple_transform(t.get_tail(), f) + ); + } + +#ifdef BOOST_TUPLE_ALGO_DISPATCH + template + typename tuple_meta_transform< + Tuple + , Fun + >::type + + tuple_transform( + const Tuple& t, + Fun f + ) + { + return tuple_transform_impl(t, f, 1); + } +#endif + + // for_each algorithm for tuples. + // + template + Fun BOOST_TUPLE_ALGO(tuple_for_each)( + tuples::null_type + , Fun f BOOST_TUPLE_ALGO_TERMINATOR + ) + { return f; } + + + template + Fun BOOST_TUPLE_ALGO(tuple_for_each)( + Tuple& t + , Fun f BOOST_TUPLE_ALGO_RECURSE) + { + f( t.get_head() ); + return tuple_for_each(t.get_tail(), f); + } + +#ifdef BOOST_TUPLE_ALGO_DISPATCH + template + Fun + tuple_for_each( + Tuple& t, + Fun f + ) + { + return tuple_for_each_impl(t, f, 1); + } +#endif + + // Equality of tuples. NOTE: "==" for tuples currently (7/2003) + // has problems under some compilers, so I just do my own. + // No point in bringing in a bunch of #ifdefs here. This is + // going to go away with the next tuple implementation anyway. + // + inline bool tuple_equal(tuples::null_type, tuples::null_type) + { return true; } + + template + bool tuple_equal( + Tuple1 const& t1, + Tuple2 const& t2 + ) + { + return t1.get_head() == t2.get_head() && + tuple_equal(t1.get_tail(), t2.get_tail()); + } + } + // + // end namespace tuple_impl_specific + + template + struct iterator_reference + { + typedef typename iterator_traits::reference type; + }; + +#ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + // Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work + // out well. Instantiating the nested apply template also + // requires instantiating iterator_traits on the + // placeholder. Instead we just specialize it as a metafunction + // class. + template<> + struct iterator_reference + { + template + struct apply : iterator_reference {}; + }; +#endif + + // Metafunction to obtain the type of the tuple whose element types + // are the reference types of an iterator tuple. + // + template + struct tuple_of_references + : tuple_impl_specific::tuple_meta_transform< + IteratorTuple, + iterator_reference + > + { + }; + + // Metafunction to obtain the minimal traversal tag in a tuple + // of iterators. + // + template + struct minimum_traversal_category_in_iterator_tuple + { + typedef typename tuple_impl_specific::tuple_meta_transform< + IteratorTuple + , iterator_traversal<> + >::type tuple_of_traversal_tags; + + typedef typename tuple_impl_specific::tuple_meta_accumulate< + tuple_of_traversal_tags + , minimum_category<> + , random_access_traversal_tag + >::type type; + }; + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround + template <> + struct minimum_traversal_category_in_iterator_tuple + { + typedef int type; + }; +#endif + + // We need to call tuple_meta_accumulate with mpl::and_ as the + // accumulating functor. To this end, we need to wrap it into + // a struct that has exactly two arguments (that is, template + // parameters) and not five, like mpl::and_ does. + // + template + struct and_with_two_args + : mpl::and_ + { + }; + +# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + // Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work + // out well. In this case I think it's an MPL bug + template<> + struct and_with_two_args + { + template + struct apply : mpl::and_ + {}; + }; +# endif + + /////////////////////////////////////////////////////////////////// + // + // Class zip_iterator_base + // + // Builds and exposes the iterator facade type from which the zip + // iterator will be derived. + // + template + struct zip_iterator_base + { + private: + // Reference type is the type of the tuple obtained from the + // iterators' reference types. + typedef typename + detail::tuple_of_references::type reference; + + // Value type is the same as reference type. + typedef reference value_type; + + // Difference type is the first iterator's difference type + typedef typename iterator_traits< + typename tuples::element<0, IteratorTuple>::type + >::difference_type difference_type; + + // Traversal catetgory is the minimum traversal category in the + // iterator tuple. + typedef typename + detail::minimum_traversal_category_in_iterator_tuple< + IteratorTuple + >::type traversal_category; + public: + + // The iterator facade type from which the zip iterator will + // be derived. + typedef iterator_facade< + zip_iterator, + value_type, + traversal_category, + reference, + difference_type + > type; + }; + + template <> + struct zip_iterator_base + { + typedef int type; + }; + } + + ///////////////////////////////////////////////////////////////////// + // + // zip_iterator class definition + // + template + class zip_iterator : + public detail::zip_iterator_base::type + { + + // Typedef super_t as our base class. + typedef typename + detail::zip_iterator_base::type super_t; + + // iterator_core_access is the iterator's best friend. + friend class iterator_core_access; + + public: + + // Construction + // ============ + + // Default constructor + zip_iterator() { } + + // Constructor from iterator tuple + zip_iterator(IteratorTuple iterator_tuple) + : m_iterator_tuple(iterator_tuple) + { } + + // Copy constructor + template + zip_iterator( + const zip_iterator& other, + typename enable_if_convertible< + OtherIteratorTuple, + IteratorTuple + >::type* = 0 + ) : m_iterator_tuple(other.get_iterator_tuple()) + {} + + // Get method for the iterator tuple. + const IteratorTuple& get_iterator_tuple() const + { return m_iterator_tuple; } + + private: + + // Implementation of Iterator Operations + // ===================================== + + // Dereferencing returns a tuple built from the dereferenced + // iterators in the iterator tuple. + typename super_t::reference dereference() const + { + return detail::tuple_impl_specific::tuple_transform( + get_iterator_tuple(), + detail::dereference_iterator() + ); + } + + // Two zip iterators are equal if all iterators in the iterator + // tuple are equal. NOTE: It should be possible to implement this + // as + // + // return get_iterator_tuple() == other.get_iterator_tuple(); + // + // but equality of tuples currently (7/2003) does not compile + // under several compilers. No point in bringing in a bunch + // of #ifdefs here. + // + template + bool equal(const zip_iterator& other) const + { + return detail::tuple_impl_specific::tuple_equal( + get_iterator_tuple(), + other.get_iterator_tuple() + ); + } + + // Advancing a zip iterator means to advance all iterators in the + // iterator tuple. + void advance(typename super_t::difference_type n) + { + detail::tuple_impl_specific::tuple_for_each( + m_iterator_tuple, + detail::advance_iterator(n) + ); + } + // Incrementing a zip iterator means to increment all iterators in + // the iterator tuple. + void increment() + { + detail::tuple_impl_specific::tuple_for_each( + m_iterator_tuple, + detail::increment_iterator() + ); + } + + // Decrementing a zip iterator means to decrement all iterators in + // the iterator tuple. + void decrement() + { + detail::tuple_impl_specific::tuple_for_each( + m_iterator_tuple, + detail::decrement_iterator() + ); + } + + // Distance is calculated using the first iterator in the tuple. + template + typename super_t::difference_type distance_to( + const zip_iterator& other + ) const + { + return boost::tuples::get<0>(other.get_iterator_tuple()) - + boost::tuples::get<0>(this->get_iterator_tuple()); + } + + // Data Members + // ============ + + // The iterator tuple. + IteratorTuple m_iterator_tuple; + + }; + + // Make function for zip iterator + // + template + zip_iterator + make_zip_iterator(IteratorTuple t) + { return zip_iterator(t); } + +} + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/iterator_adaptors.hpp b/deal.II/contrib/boost-1.45.0/include/boost/iterator_adaptors.hpp new file mode 100644 index 0000000000..ed9579c514 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/iterator_adaptors.hpp @@ -0,0 +1,13 @@ +// Copyright David Abrahams 2004. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/iterator for documentation. + +#ifndef ITERATOR_ADAPTORS_DWA2004725_HPP +# define ITERATOR_ADAPTORS_DWA2004725_HPP + +#define BOOST_ITERATOR_ADAPTORS_VERSION 0x0200 +#include + +#endif // ITERATOR_ADAPTORS_DWA2004725_HPP diff --git a/deal.II/contrib/boost-1.45.0/include/boost/lambda/algorithm.hpp b/deal.II/contrib/boost-1.45.0/include/boost/lambda/algorithm.hpp new file mode 100644 index 0000000000..ced5f4e009 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/lambda/algorithm.hpp @@ -0,0 +1,1377 @@ +// -- algorithm.hpp -- Boost Lambda Library ----------------------------------- +// Copyright (C) 2002 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// Copyright (C) 2002 Gary Powell (gwpowell@hotmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org + +#ifndef BOOST_LAMBDA_ALGORITHM_HPP +#define BOOST_LAMBDA_ALGORITHM_HPP + +#include "boost/lambda/core.hpp" + +#include +#include // for iterator_traits +#include // for std::pair + +namespace boost { + namespace lambda { + +namespace ll { + +// for_each --------------------------------- + +struct for_each { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c) const + { return ::std::for_each(a, b, c); } +}; + +// find --------------------------------- + +struct find { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, const C& c) const + { return ::std::find(a, b, c); } +}; + + +// find_if --------------------------------- + +struct find_if { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, C c) const + { return ::std::find_if(a, b, c); } +}; + +// find_end --------------------------------- + +struct find_end { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, C c, C d) const + { return ::std::find_end(a, b, c, d); } + + template + A + operator()(A a, A b, C c, C d, E e) const + { return ::std::find_end(a, b, c, d, e); } + +}; + +// find_first_of --------------------------------- + +struct find_first_of { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, C c, C d) const + { return ::std::find_first_of(a, b, c, d); } + + template + A + operator()(A a, A b, C c, C d, E e) const + { return ::std::find_first_of(a, b, c, d, e); } + +}; + +// adjacent_find --------------------------------- + +struct adjacent_find { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b) const + { return ::std::adjacent_find(a, b); } + + template + A + operator()(A a, A b, C c) const + { return ::std::adjacent_find(a, b, c); } + +}; + +// count --------------------------------- + +struct count { + + template + struct sig { + typedef typename ::std::iterator_traits< + typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type + >::difference_type type; + }; + + template + typename ::std::iterator_traits::difference_type + operator()(A a, A b, const C& c) const + { return ::std::count(a, b, c); } +}; + +// count_if --------------------------------- + +struct count_if { + + template + struct sig { + typedef typename ::std::iterator_traits< + typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type + >::difference_type type; + }; + + template + typename ::std::iterator_traits::difference_type + operator()(A a, A b, C c) const + { return ::std::count_if(a, b, c); } +}; + + +// mismatch --------------------------------- + +struct mismatch { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type element1_type; + + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type element2_type; + + typedef ::std::pair< element1_type, element2_type > type; + }; + + template + ::std::pair + operator()(A a, A b, C c) const + { return ::std::mismatch(a, b, c); } + + template + ::std::pair + operator()(A a, A b, C c, D d) const + { return ::std::mismatch(a, b, c, d); } + +}; + +// equal --------------------------------- + +struct equal { + + template + struct sig { + typedef bool type; + }; + + template + bool + operator()(A a, A b, C c) const + { return ::std::equal(a, b, c); } + + template + bool + operator()(A a, A b, C c, D d) const + { return ::std::equal(a, b, c, d); } + +}; + +// search -------------------------------- + +struct search { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, C c, C d) const + { return std::search(a, b, c, d);} + + template + A + operator()(A a, A b, C c, C d, E e) const + { return std::search(a, b, c, d, e);} + +}; + +// copy --------------------------------- + +struct copy { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c) const + { return ::std::copy(a, b, c); } + +}; + +// copy_backward --------------------------------- + +struct copy_backward { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c) const + { return ::std::copy_backward(a, b, c); } + +}; + +// swap --------------------------------- + +struct swap { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::swap(a, b); } + +}; + +// swap_ranges --------------------------------- + +struct swap_ranges { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c) const + { return ::std::swap_ranges(a, b, c); } + +}; + +// iter_swap --------------------------------- + +struct iter_swap { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::iter_swap(a, b); } + +}; + + +// transform -------------------------------- + +struct transform { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element< + boost::tuples::length::value - 2, + Args + >::type + >::type type; + }; + + template + C + operator()(A a, A b, C c, D d) const + { return std::transform(a, b, c, d);} + + template + D + operator()(A a, A b, C c, D d, E e) const + { return std::transform(a, b, c, d, e);} + +}; + +// replace --------------------------------- + +struct replace { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b, const C& c, const C& d) const + { ::std::replace(a, b, c, d); } + +}; + +// replace_if --------------------------------- + +struct replace_if { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b, C c, const D& d) const + { ::std::replace_if(a, b, c, d); } + +}; + +// replace_copy --------------------------------- + +struct replace_copy { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c, const D& d, const D& e) const + { return ::std::replace_copy(a, b, c, d, e); } + +}; + +// replace_copy_if --------------------------------- + +struct replace_copy_if { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c, D d, const E& e) const + { return ::std::replace_copy_if(a, b, c, d, e); } + +}; + +// fill --------------------------------- + +struct fill { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b, const C& c) const + { ::std::fill(a, b, c); } + +}; + +// fill_n --------------------------------- + +struct fill_n { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, B b, const C& c) const + { ::std::fill_n(a, b, c); } + +}; + +// generate --------------------------------- + +struct generate { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b, C c) const + { ::std::generate(a, b, c); } + +}; + +// generate_n --------------------------------- + +struct generate_n { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, B b, C c) const + { ::std::generate_n(a, b, c); } + +}; + +// remove --------------------------------- + +struct remove { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, const C& c) const + { return ::std::remove(a, b, c); } +}; + +// remove_if --------------------------------- + +struct remove_if { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, C c) const + { return ::std::remove_if(a, b, c); } +}; + +// remove_copy --------------------------------- + +struct remove_copy { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c, const D& d) const + { return ::std::remove_copy(a, b, c, d); } +}; + +// remove_copy_if --------------------------------- + +struct remove_copy_if { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c, D d) const + { return ::std::remove_copy_if(a, b, c, d); } +}; + +// unique --------------------------------- + +struct unique { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b) const + { return ::std::unique(a, b); } + + template + A + operator()(A a, A b, C c) const + { return ::std::unique(a, b, c); } + +}; + +// unique_copy --------------------------------- + +struct unique_copy { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c) const + { return ::std::unique_copy(a, b, c); } + + template + C + operator()(A a, A b, C c, D d) const + { return ::std::unique_copy(a, b, c, d); } + +}; + +// reverse --------------------------------- + +struct reverse { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::reverse(a, b); } + +}; + +// reverse_copy --------------------------------- + +struct reverse_copy { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c) const + { return ::std::reverse_copy(a, b, c); } + +}; + +// rotate --------------------------------- + +struct rotate { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b, A c) const + { ::std::rotate(a, b, c); } + +}; + +// rotate_copy --------------------------------- + +struct rotate_copy { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + D + operator()(A a, A b, A c, D d) const + { return ::std::rotate_copy(a, b, c, d); } + +}; + +// random_shuffle --------------------------------- + +struct random_shuffle { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::random_shuffle(a, b); } + + template + void + operator()(A a, A b, const C& c) const + { ::std::random_shuffle(a, b, c); } + +}; + + +// partition --------------------------------- + +struct partition { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, C c) const + { return ::std::partition(a, b, c); } + +}; + +// stable_partition --------------------------------- + +struct stable_partition { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, C c) const + { return ::std::stable_partition(a, b, c); } + +}; + +// sort --------------------------------- + +struct sort { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::sort(a, b); } + + template + void + operator()(A a, A b, C c) const + { ::std::sort(a, b, c); } + +}; + +// stable_sort --------------------------------- + +struct stable_sort { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::stable_sort(a, b); } + + template + void + operator()(A a, A b, C c) const + { ::std::stable_sort(a, b, c); } + +}; + +// partial_sort --------------------------------- + +struct partial_sort { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b, A c) const + { ::std::partial_sort(a, b, c); } + + template + void + operator()(A a, A b, A c, D d) const + { ::std::partial_sort(a, b, c, d); } + +}; + +// partial_sort_copy --------------------------------- + +struct partial_sort_copy { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<3, Args>::type + >::type type; + }; + + template + C + operator()(A a, A b, C c, C d) const + { return ::std::partial_sort_copy(a, b, c, d); } + + template + C + operator()(A a, A b, C c, C d, E e) const + { return ::std::partial_sort_copy(a, b, c, d, e); } +}; + +// nth_element --------------------------------- + +struct nth_element { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b, A c) const + { ::std::nth_element(a, b, c); } + + template + void + operator()(A a, A b, A c, D d) const + { ::std::nth_element(a, b, c, d); } + +}; + +// lower_bound --------------------------------- + +struct lower_bound { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, const C& c) const + { return ::std::lower_bound(a, b, c); } + + template + A + operator()(A a, A b, const C& c, D d) const + { return ::std::lower_bound(a, b, c, d); } + +}; + +// upper_bound --------------------------------- + +struct upper_bound { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b, const C& c) const + { return ::std::upper_bound(a, b, c); } + + template + A + operator()(A a, A b, const C& c, D d) const + { return ::std::upper_bound(a, b, c, d); } + +}; + +// equal_range --------------------------------- + +struct equal_range { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type element_type; + + typedef ::std::pair< element_type, element_type > type; + }; + + template + ::std::pair + operator()(A a, A b, const C& c) const + { return ::std::equal_range(a, b, c); } + + template + ::std::pair + operator()(A a, A b, const C& c, D d) const + { return ::std::equal_range(a, b, c, d); } + +}; + +// binary_search --------------------------------- + +struct binary_search { + + template + struct sig { + typedef bool type; + }; + + template + bool + operator()(A a, A b, const C& c) const + { return ::std::binary_search(a, b, c); } + + template + bool + operator()(A a, A b, const C& c, D d) const + { return ::std::binary_search(a, b, c, d); } + +}; + +// merge -------------------------------- + +struct merge { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<5, Args>::type + >::type type; + }; + + template + E + operator()(A a, A b, C c, C d, E e) const + { return std::merge(a, b, c, d, e);} + + template + E + operator()(A a, A b, C c, C d, E e, F f) const + { return std::merge(a, b, c, d, e, f);} + +}; + +// inplace_merge --------------------------------- + +struct inplace_merge { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b, A c) const + { ::std::inplace_merge(a, b, c); } + + template + void + operator()(A a, A b, A c, D d) const + { ::std::inplace_merge(a, b, c, d); } + +}; + +// includes --------------------------------- + +struct includes { + + template + struct sig { + typedef bool type; + }; + + template + bool + operator()(A a, A b, C c, C d) const + { return ::std::includes(a, b, c, d); } + + template + bool + operator()(A a, A b, C c, C d, E e) const + { return ::std::includes(a, b, c, d, e); } + +}; + +// set_union -------------------------------- + +struct set_union { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<5, Args>::type + >::type type; + }; + + template + E + operator()(A a, A b, C c, C d, E e) const + { return std::set_union(a, b, c, d, e);} + + template + E + operator()(A a, A b, C c, C d, E e, F f) const + { return std::set_union(a, b, c, d, e, f);} + +}; + +// set_intersection -------------------------------- + +struct set_intersection { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<5, Args>::type + >::type type; + }; + + template + E + operator()(A a, A b, C c, C d, E e) const + { return std::set_intersection(a, b, c, d, e);} + + template + E + operator()(A a, A b, C c, C d, E e, F f) const + { return std::set_intersection(a, b, c, d, e, f);} + +}; + +// set_difference -------------------------------- + +struct set_difference { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<5, Args>::type + >::type type; + }; + + template + E + operator()(A a, A b, C c, C d, E e) const + { return std::set_difference(a, b, c, d, e);} + + template + E + operator()(A a, A b, C c, C d, E e, F f) const + { return std::set_difference(a, b, c, d, e, f);} + +}; + + +// set_symmetric_difference -------------------------------- + +struct set_symmetric_difference { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<5, Args>::type + >::type type; + }; + + template + E + operator()(A a, A b, C c, C d, E e) const + { return std::set_symmetric_difference(a, b, c, d, e);} + + template + E + operator()(A a, A b, C c, C d, E e, F f) const + { return std::set_symmetric_difference(a, b, c, d, e, f);} + +}; + +// push_heap --------------------------------- + +struct push_heap { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::push_heap(a, b); } + + template + void + operator()(A a, A b, C c) const + { ::std::push_heap(a, b, c); } + +}; + +// pop_heap --------------------------------- + +struct pop_heap { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::pop_heap(a, b); } + + template + void + operator()(A a, A b, C c) const + { ::std::pop_heap(a, b, c); } + +}; + + +// make_heap --------------------------------- + +struct make_heap { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::make_heap(a, b); } + + template + void + operator()(A a, A b, C c) const + { ::std::make_heap(a, b, c); } + +}; + +// sort_heap --------------------------------- + +struct sort_heap { + + template + struct sig { + typedef void type; + }; + + template + void + operator()(A a, A b) const + { ::std::sort_heap(a, b); } + + template + void + operator()(A a, A b, C c) const + { ::std::sort_heap(a, b, c); } + +}; + +// min --------------------------------- + +struct min { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(const A& a, const A& b) const + { return (::std::min)(a, b); } + + template + A + operator()(const A& a, const A& b, C c) const + { return (::std::min)(a, b, c); } + +}; + +// max --------------------------------- + +struct max { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(const A& a, const A& b) const + { return (::std::max)(a, b); } + + template + A + operator()(const A& a, const A& b, C c) const + { return (::std::max)(a, b, c); } + +}; + +struct min_element { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b) const + { return ::std::min_element(a, b); } + + template + A + operator()(A a, A b, C c) const + { return ::std::min_element(a, b, c); } + +}; + +// max_element --------------------------------- + +struct max_element { + + template + struct sig { + typedef typename boost::remove_const< + typename boost::tuples::element<1, Args>::type + >::type type; + }; + + template + A + operator()(A a, A b) const + { return ::std::max_element(a, b); } + + template + A + operator()(A a, A b, C c) const + { return ::std::max_element(a, b, c); } + +}; + + +// lexicographical_compare --------------------------------- + +struct lexicographical_compare { + + template + struct sig { + typedef bool type; + }; + + template + bool + operator()(A a, A b, C c, C d) const + { return ::std::lexicographical_compare(a, b, c, d); } + + template + bool + operator()(A a, A b, C c, C d, E e) const + { return ::std::lexicographical_compare(a, b, c, d, e); } + +}; + +// next_permutation --------------------------------- + +struct next_permutation { + + template + struct sig { + typedef bool type; + }; + + template + bool + operator()(A a, A b) const + { return ::std::next_permutation(a, b); } + + template + bool + operator()(A a, A b, C c) const + { return ::std::next_permutation(a, b, c); } + +}; + +// prev_permutation --------------------------------- + +struct prev_permutation { + + template + struct sig { + typedef bool type; + }; + + template + bool + operator()(A a, A b) const + { return ::std::prev_permutation(a, b); } + + template + bool + operator()(A a, A b, C c) const + { return ::std::prev_permutation(a, b, c); } + +}; + + + + + +} // end of ll namespace + +// There is no good way to call an overloaded member function in a +// lambda expression. +// The macro below defines a function object class for calling a +// const_iterator returning member function of a container. + +#define CALL_MEMBER(X) \ +struct call_##X { \ +template \ + struct sig { \ + typedef typename boost::remove_const< \ + typename boost::tuples::element<1, Args>::type \ + >::type::const_iterator type; \ + }; \ + \ + template \ + typename T::const_iterator \ + operator()(const T& t) const \ + { \ + return t.X(); \ + } \ +}; + +// create call_begin and call_end classes +CALL_MEMBER(begin) +CALL_MEMBER(end) + +#undef CALL_MEMBER + +} // end of lambda namespace +} // end of boost namespace + + + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/lambda/bind.hpp b/deal.II/contrib/boost-1.45.0/include/boost/lambda/bind.hpp new file mode 100644 index 0000000000..0371393cba --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/lambda/bind.hpp @@ -0,0 +1,19 @@ +// -- bind.hpp -- Boost Lambda Library -------------------------------------- + +// Copyright (C) 1999-2001 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// Gary Powell (gwpowell@hotmail.com) +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org + +#ifndef BOOST_LAMBDA_BIND_HPP +#define BOOST_LAMBDA_BIND_HPP + +#include "boost/lambda/core.hpp" + +#include "boost/lambda/detail/bind_functions.hpp" + +#endif diff --git a/deal.II/contrib/boost-1.45.0/include/boost/lambda/casts.hpp b/deal.II/contrib/boost-1.45.0/include/boost/lambda/casts.hpp new file mode 100644 index 0000000000..8b3d3a7822 --- /dev/null +++ b/deal.II/contrib/boost-1.45.0/include/boost/lambda/casts.hpp @@ -0,0 +1,226 @@ +// - casts.hpp -- BLambda Library ------------- +// +// Copyright (C) 2000 Gary Powell (powellg@amazon.com) +// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org + +// ----------------------------------------------- + +#if !defined(BOOST_LAMBDA_CASTS_HPP) +#define BOOST_LAMBDA_CASTS_HPP + +#include "boost/lambda/detail/suppress_unused.hpp" +#include "boost/lambda/core.hpp" + +#include + +namespace boost { +namespace lambda { + +template +struct return_type_N; + +template class cast_action; + +template class static_cast_action; +template class dynamic_cast_action; +template class const_cast_action; +template class reinterpret_cast_action; + +class typeid_action; +class sizeof_action; + +// Cast actions + +template class cast_action > +{ +public: + template + static RET apply(Arg1 &a1) { + return static_cast(a1); + } +}; + +template class cast_action > { +public: + template + static RET apply(Arg1 &a1) { + return dynamic_cast(a1); + } +}; + +template class cast_action > { +public: + template + static RET apply(Arg1 &a1) { + return const_cast(a1); + } +}; + +template class cast_action > { +public: + template + static RET apply(Arg1 &a1) { + return reinterpret_cast(a1); + } +}; + +// typeid action +class typeid_action { +public: + template + static RET apply(Arg1 &a1) { + detail::suppress_unused_variable_warnings(a1); + return typeid(a1); + } +}; + +// sizeof action +class sizeof_action +{ +public: + template + static RET apply(Arg1 &a1) { + return sizeof(a1); + } +}; + + +// return types of casting lambda_functors (all "T" type.) + +template